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.
 
 
 
 
 
 
hy-screen-2.0/docs/assets/index-9fb96bf8-178291961628...

5403 lines
3.2 MiB

var t0e=Object.defineProperty,n0e=Object.defineProperties;var i0e=Object.getOwnPropertyDescriptors;var Dy=Object.getOwnPropertySymbols;var wD=Object.prototype.hasOwnProperty,TD=Object.prototype.propertyIsEnumerable;var BS=(n,e)=>{if(e=Symbol[n])return e;throw Error("Symbol."+n+" is not defined")},xd=Math.pow,zS=(n,e,t)=>e in n?t0e(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,wt=(n,e)=>{for(var t in e||(e={}))wD.call(e,t)&&zS(n,t,e[t]);if(Dy)for(var t of Dy(e))TD.call(e,t)&&zS(n,t,e[t]);return n},tn=(n,e)=>n0e(n,i0e(e));var AD=(n,e)=>{var t={};for(var i in n)wD.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&Dy)for(var i of Dy(n))e.indexOf(i)<0&&TD.call(n,i)&&(t[i]=n[i]);return t};var Ni=(n,e,t)=>(zS(n,typeof e!="symbol"?e+"":e,t),t);var rn=(n,e,t)=>new Promise((i,r)=>{var a=l=>{try{s(t.next(l))}catch(u){r(u)}},o=l=>{try{s(t.throw(l))}catch(u){r(u)}},s=l=>l.done?i(l.value):Promise.resolve(l.value).then(a,o);s((t=t.apply(n,e)).next())}),r0e=function(n,e){this[0]=n,this[1]=e};var CD=n=>{var e=n[BS("asyncIterator")],t=!1,i,r={};return e==null?(e=n[BS("iterator")](),i=a=>r[a]=o=>e[a](o)):(e=e.call(n),i=a=>r[a]=o=>{if(t){if(t=!1,a==="throw")throw o;return o}return t=!0,{done:!1,value:new r0e(new Promise(s=>{var l=e[a](o);if(!(l instanceof Object))throw TypeError("Object expected");s(l)}),1)}}),r[BS("iterator")]=()=>r,i("next"),"throw"in e?i("throw"):r.throw=a=>{throw a},"return"in e&&i("return"),r};import{_ as c_,o as Te,c as Pe,a as O,t as De,r as av,b as gn,d as Wt,w as qa,p as MD,i as M2,n as Xn,u as Tr,e as Ye,f as Bl,g as Dn,h as a0e,j as sj,k as ED,l as dl,m as PD,s as vg,q as o0e,v as Qs,x as s0e,y as pp,z as Ji,A as RD,F as bn,B as Bn,C as Uo,D as kr,E as mi,G as to,H as Kf,I as V2,J as Ws,K as wm,L as l0e,M as u0e,N as wd,O as c0e}from"./index-1782919616283.js";const M5=""+new URL("bottom-menu-arrow-big-180b7071-balabala-1782919616283.svg",import.meta.url).href,E5=""+new URL("bottom-menu-arrow-small-19304179-balabala-1782919616283.svg",import.meta.url).href;/**
* @name: autofit.js
* @author: Larry Zhu
* @version: 3.2.8
* @description: autofit.js 是迄今为止最易用的自适应工具
* @license: MIT
*/let GS=null,f9="",PT="",RT="",US=null,LD=null,Oo=1,H2=!1;const d_={isAutofitRunning:!1,init(n={},e=!0){e&&console.log("autofit.js is running");const{dw:t=1920,dh:i=1080,el:r=typeof n=="string"?n:"body",resize:a=!0,ignore:o=[],transition:s="none",delay:l=0,limit:u=.1,cssMode:c="scale",allowScroll:d=!1}=n;GS=r;const h=document.querySelector(r);if(!h){console.error(`autofit: '${r}' is not exist`);return}const f=document.createElement("style"),p=document.createElement("style");f.lang="text/css",p.lang="text/css",f.id="autofit-style",p.id="ignoreStyle",!d&&(f.innerHTML="body {overflow: hidden;}");const m=document.querySelector("body");m.appendChild(f),m.appendChild(p),h.style.height=`${i}px`,h.style.width=`${t}px`,h.style.transformOrigin="0 0",!d&&(h.style.overflow="hidden"),VS(t,i,h,o,u,c),US=()=>{clearTimeout(LD),l!=0?LD=setTimeout(()=>{VS(t,i,h,o,u,c),H2&&LT(f9,RT,PT)},l):(VS(t,i,h,o,u,c),H2&&LT(f9,RT,PT))},a&&window.addEventListener("resize",US),this.isAutofitRunning=!0,setTimeout(()=>{h.style.transition=`${s}s`})},off(n="body"){try{window.removeEventListener("resize",US);const e=document.querySelector("#autofit-style");e&&e.remove();const t=document.querySelector("#ignoreStyle");t&&t.remove();const i=document.querySelector(GS||n);i&&(i.style.cssText=""),H2&&lj()}catch(e){console.error("autofit: Failed to remove normally",e)}this.isAutofitRunning=!1,console.log("autofit.js is off")},elRectification:null,scale:Oo};function LT(n,e=!0,t=1){if(!d_.isAutofitRunning){console.error("autofit.js:(elRectification): autofit has not been initialized yet");return}lj(),!n&&console.error(`autofit.js:elRectification bad selector: ${n}`),f9=n,PT=t,RT=e;const i=Array.from(document.querySelectorAll(n));if(i.length==0){console.error(`autofit.js:elRectification found no element by selector: "${n}"`);return}for(const r of i){const a=Oo==1?1:Number(Oo)*Number(t);H2||(r.originalWidth=r.clientWidth,r.originalHeight=r.clientHeight),e?(r.style.width=`${r.originalWidth*a}px`,r.style.height=`${r.originalHeight*a}px`):(r.style.width=`${100*a}%`,r.style.height=`${100*a}%`),r.style.transform=`translateZ(0) scale(${1/Number(Oo)})`,r.style.transformOrigin="0 0"}H2=!0}function lj(){if(f9){H2=!1;for(const n of Array.from(document.querySelectorAll(f9)))n.style.width="",n.style.height="",n.style.transform=""}}function VS(n,e,t,i,r,a="scale"){const o=document.documentElement.clientHeight,s=document.documentElement.clientWidth;Oo=s/o<n/e?s/n:o/e,Oo=Math.abs(1-Oo)>r?Oo:1,d_.scale=+Oo;const l=Math.round(o/Number(Oo)),u=Math.round(s/Number(Oo));t.style.height=`${l}px`,t.style.width=`${u}px`,a==="zoom"?t.style.zoom=`${Oo}`:t.style.transform=`translateZ(0) scale(${Oo})`;const c=document.querySelector("#ignoreStyle");c.innerHTML="";for(const d of i){const h=d;let f=h.el||h.dom;if(typeof h=="string"&&(f=h),!f||typeof f=="object"&&!Object.keys(f).length){console.error(`autofit: found invalid or empty selector/object: ${f}`);continue}const p=h.scale?h.scale:1/Number(Oo),m=p!=Oo&&h.fontSize,v=p!=Oo&&h.width,g=p!=Oo&&h.height;c.innerHTML+=`
${f} {
transform: scale(${p})!important;
transform-origin: 0 0;
${v?`width: ${v}!important;`:""}
${g?`height: ${g}!important;`:""}
}`,m&&(c.innerHTML+=`
${f} div ,${f} span,${f} a,${f} * {
font-size: ${m}px;
}`)}}d_.elRectification=LT;function Mc(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function uj(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__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 Il={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},ov={duration:.5,overwrite:!1,delay:0},CM,Vo,ba,S0=1e8,oa=1/S0,IT=Math.PI*2,d0e=IT/4,h0e=0,cj=Math.sqrt,f0e=Math.cos,p0e=Math.sin,Io=function(e){return typeof e=="string"},Fa=function(e){return typeof e=="function"},Vc=function(e){return typeof e=="number"},MM=function(e){return typeof e=="undefined"},Xu=function(e){return typeof e=="object"},el=function(e){return e!==!1},EM=function(){return typeof window!="undefined"},Ny=function(e){return Fa(e)||Io(e)},dj=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},cs=Array.isArray,v0e=/random\([^)]+\)/g,m0e=/,\s*/g,ID=/(?:-?\.?\d|\.)+/gi,hj=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,E2=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,HS=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,fj=/[+-]=-?[.\d]+/,g0e=/[^,'"\[\]\s]+/gi,y0e=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Ma,Cu,DT,PM,Fl={},P5={},pj,vj=function(e){return(P5=sv(e,Fl))&&ol},RM=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},p9=function(e,t){return!t&&console.warn(e)},mj=function(e,t){return e&&(Fl[e]=t)&&P5&&(P5[e]=t)||Fl},v9=function(){return 0},_0e={suppressEvents:!0,isStart:!0,kill:!1},W4={suppressEvents:!0,kill:!1},S0e={suppressEvents:!0},LM={},fh=[],NT={},gj,Tl={},WS={},DD=30,j4=[],IM="",DM=function(e){var t=e[0],i,r;if(Xu(t)||Fa(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(r=j4.length;r--&&!j4[r].targetTest(t););i=j4[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new Uj(e[r],i)))||e.splice(r,1);return e},vp=function(e){return e._gsap||DM(b0(e))[0]._gsap},yj=function(e,t,i){return(i=e[t])&&Fa(i)?e[t]():MM(i)&&e.getAttribute&&e.getAttribute(t)||i},tl=function(e,t){return(e=e.split(",")).forEach(t)||e},Ha=function(e){return Math.round(e*1e5)/1e5||0},Aa=function(e){return Math.round(e*1e7)/1e7||0},W2=function(e,t){var i=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),i==="+"?e+r:i==="-"?e-r:i==="*"?e*r:e/r},b0e=function(e,t){for(var i=t.length,r=0;e.indexOf(t[r])<0&&++r<i;);return r<i},R5=function(){var e=fh.length,t=fh.slice(0),i,r;for(NT={},fh.length=0,i=0;i<e;i++)r=t[i],r&&r._lazy&&(r.render(r._lazy[0],r._lazy[1],!0)._lazy=0)},NM=function(e){return!!(e._initted||e._startAt||e.add)},_j=function(e,t,i,r){fh.length&&!Vo&&R5(),e.render(t,i,r||!!(Vo&&t<0&&NM(e))),fh.length&&!Vo&&R5()},Sj=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(g0e).length<2?t:Io(e)?e.trim():e},bj=function(e){return e},Ol=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},x0e=function(e){return function(t,i){for(var r in i)r in t||r==="duration"&&e||r==="ease"||(t[r]=i[r])}},sv=function(e,t){for(var i in t)e[i]=t[i];return e},ND=function n(e,t){for(var i in t)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(e[i]=Xu(t[i])?n(e[i]||(e[i]={}),t[i]):t[i]);return e},L5=function(e,t){var i={},r;for(r in e)r in t||(i[r]=e[r]);return i},Fg=function(e){var t=e.parent||Ma,i=e.keyframes?x0e(cs(e.keyframes)):Ol;if(el(e.inherit))for(;t;)i(e,t.vars.defaults),t=t.parent||t._dp;return e},w0e=function(e,t){for(var i=e.length,r=i===t.length;r&&i--&&e[i]===t[i];);return i<0},xj=function(e,t,i,r,a){i===void 0&&(i="_first"),r===void 0&&(r="_last");var o=e[r],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[i],e[i]=t),t._next?t._next._prev=t:e[r]=t,t._prev=o,t.parent=t._dp=e,t},h_=function(e,t,i,r){i===void 0&&(i="_first"),r===void 0&&(r="_last");var a=t._prev,o=t._next;a?a._next=o:e[i]===t&&(e[i]=o),o?o._prev=a:e[r]===t&&(e[r]=a),t._next=t._prev=t.parent=null},wh=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},mp=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},T0e=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},kT=function(e,t,i,r){return e._startAt&&(Vo?e._startAt.revert(W4):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},A0e=function n(e){return!e||e._ts&&n(e.parent)},kD=function(e){return e._repeat?lv(e._tTime,e=e.duration()+e._rDelay)*e:0},lv=function(e,t){var i=Math.floor(e=Aa(e/t));return e&&i===e?i-1:i},I5=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},f_=function(e){return e._end=Aa(e._start+(e._tDur/Math.abs(e._ts||e._rts||oa)||0))},p_=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=Aa(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),f_(e),i._dirty||mp(i,e)),e},wj=function(e,t){var i;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(i=I5(e.rawTime(),t),(!t._dur||v3(0,t.totalDuration(),i)-t._tTime>oa)&&t.render(i,!0)),mp(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-oa}},Lu=function(e,t,i,r){return t.parent&&wh(t),t._start=Aa((Vc(i)?i:i||e!==Ma?t0(e,i,t):e._time)+t._delay),t._end=Aa(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),xj(e,t,"_first","_last",e._sort?"_start":0),FT(t)||(e._recent=t),r||wj(e,t),e._ts<0&&p_(e,e._tTime),e},Tj=function(e,t){return(Fl.ScrollTrigger||RM("scrollTrigger",t))&&Fl.ScrollTrigger.create(t,e)},Aj=function(e,t,i,r,a){if(FM(e,t,a),!e._initted)return 1;if(!i&&e._pt&&!Vo&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&gj!==Ml.frame)return fh.push(e),e._lazy=[a,r],1},C0e=function n(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||n(t))},FT=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},M0e=function(e,t,i,r){var a=e.ratio,o=t<0||!t&&(!e._start&&C0e(e)&&!(!e._initted&&FT(e))||(e._ts<0||e._dp._ts<0)&&!FT(e))?0:1,s=e._rDelay,l=0,u,c,d;if(s&&e._repeat&&(l=v3(0,e._tDur,t),c=lv(l,s),e._yoyo&&c&1&&(o=1-o),c!==lv(e._tTime,s)&&(a=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==a||Vo||r||e._zTime===oa||!t&&e._zTime){if(!e._initted&&Aj(e,t,r,i,l))return;for(d=e._zTime,e._zTime=t||(i?oa:0),i||(i=t&&!d),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&&kT(e,t,i,!0),e._onUpdate&&!i&&Pl(e,"onUpdate"),l&&e._repeat&&!i&&e.parent&&Pl(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&wh(e,1),!i&&!Vo&&(Pl(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},E0e=function(e,t,i){var r;if(i>t)for(r=e._first;r&&r._start<=i;){if(r.data==="isPause"&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=i;){if(r.data==="isPause"&&r._start<t)return r;r=r._prev}},uv=function(e,t,i,r){var a=e._repeat,o=Aa(t)||0,s=e._tTime/e._tDur;return s&&!r&&(e._time*=o/e._dur),e._dur=o,e._tDur=a?a<0?1e10:Aa(o*(a+1)+e._rDelay*a):o,s>0&&!r&&p_(e,e._tTime=e._tDur*s),e.parent&&f_(e),i||mp(e.parent,e),e},FD=function(e){return e instanceof Es?mp(e):uv(e,e._dur)},P0e={_start:0,endTime:v9,totalDuration:v9},t0=function n(e,t,i){var r=e.labels,a=e._recent||P0e,o=e.duration()>=S0?a.endTime(!1):e._dur,s,l,u;return Io(t)&&(isNaN(t)||t in r)?(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:i).totalDuration()/100:1)):s<0?(t in r||(r[t]=o),r[t]):(l=parseFloat(t.charAt(s-1)+t.substr(s+1)),u&&i&&(l=l/100*(cs(i)?i[0]:i).totalDuration()),s>1?n(e,t.substr(0,s-1),i)+l:o+l)):t==null?o:+t},Og=function(e,t,i){var r=Vc(t[1]),a=(r?2:1)+(e<2?0:1),o=t[a],s,l;if(r&&(o.duration=t[1]),o.parent=i,e){for(s=o,l=i;l&&!("immediateRender"in s);)s=l.vars.defaults||{},l=el(l.vars.inherit)&&l.parent;o.immediateRender=el(s.immediateRender),e<2?o.runBackwards=1:o.startAt=t[a-1]}return new ro(t[0],o,t[a+1])},Bh=function(e,t){return e||e===0?t(e):t},v3=function(e,t,i){return i<e?e:i>t?t:i},ls=function(e,t){return!Io(e)||!(t=y0e.exec(e))?"":t[1]},R0e=function(e,t,i){return Bh(i,function(r){return v3(e,t,r)})},OT=[].slice,Cj=function(e,t){return e&&Xu(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&Xu(e[0]))&&!e.nodeType&&e!==Cu},L0e=function(e,t,i){return i===void 0&&(i=[]),e.forEach(function(r){var a;return Io(r)&&!t||Cj(r,1)?(a=i).push.apply(a,b0(r)):i.push(r)})||i},b0=function(e,t,i){return ba&&!t&&ba.selector?ba.selector(e):Io(e)&&!i&&(DT||!cv())?OT.call((t||PM).querySelectorAll(e),0):cs(e)?L0e(e,i):Cj(e)?OT.call(e,0):e?[e]:[]},BT=function(e){return e=b0(e)[0]||p9("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return b0(t,i.querySelectorAll?i:i===e?p9("Invalid scope")||PM.createElement("div"):e)}},Mj=function(e){return e.sort(function(){return .5-Math.random()})},Ej=function(e){if(Fa(e))return e;var t=Xu(e)?e:{each:e},i=gp(t.ease),r=t.from||0,a=parseFloat(t.base)||0,o={},s=r>0&&r<1,l=isNaN(r)||s,u=t.axis,c=r,d=r;return Io(r)?c=d={center:.5,edges:.5,end:1}[r]||0:!s&&l&&(c=r[0],d=r[1]),function(h,f,p){var m=(p||t).length,v=o[m],g,_,S,x,A,C,M,I,D;if(!v){if(D=t.grid==="auto"?0:(t.grid||[1,S0])[1],!D){for(M=-S0;M<(M=p[D++].getBoundingClientRect().left)&&D<m;);D<m&&D--}for(v=o[m]=[],g=l?Math.min(D,m)*c-.5:r%D,_=D===S0?0:l?m*d/D-.5:r/D|0,M=0,I=S0,C=0;C<m;C++)S=C%D-g,x=_-(C/D|0),v[C]=A=u?Math.abs(u==="y"?x:S):cj(S*S+x*x),A>M&&(M=A),A<I&&(I=A);r==="random"&&Mj(v),v.max=M-I,v.min=I,v.v=m=(parseFloat(t.amount)||parseFloat(t.each)*(D>m?m-1:u?u==="y"?m/D:D:Math.max(D,m/D))||0)*(r==="edges"?-1:1),v.b=m<0?a-m:a,v.u=ls(t.amount||t.each)||0,i=i&&m<0?Bj(i):i}return m=(v[h]-v.min)/v.max||0,Aa(v.b+(i?i(m):m)*v.v)+v.u}},zT=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var r=Aa(Math.round(parseFloat(i)/e)*e*t);return(r-r%1)/t+(Vc(i)?0:ls(i))}},Pj=function(e,t){var i=cs(e),r,a;return!i&&Xu(e)&&(r=i=e.radius||S0,e.values?(e=b0(e.values),(a=!Vc(e[0]))&&(r*=r)):e=zT(e.increment)),Bh(t,i?Fa(e)?function(o){return a=e(o),Math.abs(a-o)<=r?a:o}:function(o){for(var s=parseFloat(a?o.x:o),l=parseFloat(a?o.y:0),u=S0,c=0,d=e.length,h,f;d--;)a?(h=e[d].x-s,f=e[d].y-l,h=h*h+f*f):h=Math.abs(e[d]-s),h<u&&(u=h,c=d);return c=!r||u<=r?e[c]:o,a||c===o||Vc(o)?c:c+ls(o)}:zT(e))},Rj=function(e,t,i,r){return Bh(cs(e)?!t:i===!0?!!(i=0):!r,function(){return cs(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(r=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((e-i/2+Math.random()*(t-e+i*.99))/i)*i*r)/r})},I0e=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(r){return t.reduce(function(a,o){return o(a)},r)}},D0e=function(e,t){return function(i){return e(parseFloat(i))+(t||ls(i))}},N0e=function(e,t,i){return Ij(e,t,0,1,i)},Lj=function(e,t,i){return Bh(i,function(r){return e[~~t(r)]})},k0e=function n(e,t,i){var r=t-e;return cs(e)?Lj(e,n(0,e.length),t):Bh(i,function(a){return(r+(a-e)%r)%r+e})},F0e=function n(e,t,i){var r=t-e,a=r*2;return cs(e)?Lj(e,n(0,e.length-1),t):Bh(i,function(o){return o=(a+(o-e)%a)%a||0,e+(o>r?a-o:o)})},m9=function(e){return e.replace(v0e,function(t){var i=t.indexOf("[")+1,r=t.substring(i||7,i?t.indexOf("]"):t.length-1).split(m0e);return Rj(i?r:+r[0],i?0:+r[1],+r[2]||1e-5)})},Ij=function(e,t,i,r,a){var o=t-e,s=r-i;return Bh(a,function(l){return i+((l-e)/o*s||0)})},O0e=function n(e,t,i,r){var a=isNaN(e+t)?0:function(f){return(1-f)*e+f*t};if(!a){var o=Io(e),s={},l,u,c,d,h;if(i===!0&&(r=1)&&(i=null),o)e={p:e},t={p:t};else if(cs(e)&&!cs(t)){for(c=[],d=e.length,h=d-2,u=1;u<d;u++)c.push(n(e[u-1],e[u]));d--,a=function(p){p*=d;var m=Math.min(h,~~p);return c[m](p-m)},i=t}else r||(e=sv(cs(e)?[]:{},e));if(!c){for(l in t)kM.call(s,e,l,"get",t[l]);a=function(p){return zM(p,s)||(o?e.p:e)}}}return Bh(i,a)},OD=function(e,t,i){var r=e.labels,a=S0,o,s,l;for(o in r)s=r[o]-t,s<0==!!i&&s&&a>(s=Math.abs(s))&&(l=o,a=s);return l},Pl=function(e,t,i){var r=e.vars,a=r[t],o=ba,s=e._ctx,l,u,c;if(a)return l=r[t+"Params"],u=r.callbackScope||e,i&&fh.length&&R5(),s&&(ba=s),c=l?a.apply(u,l):a.call(u),ba=o,c},mg=function(e){return wh(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Vo),e.progress()<1&&Pl(e,"onInterrupt"),e},P2,Dj=[],Nj=function(e){if(e)if(e=!e.name&&e.default||e,EM()||e.headless){var t=e.name,i=Fa(e),r=t&&!i&&e.init?function(){this._props=[]}:e,a={init:v9,render:zM,add:kM,kill:Q0e,modifier:J0e,rawVars:0},o={targetTest:0,get:0,getSetter:BM,aliases:{},register:0};if(cv(),e!==r){if(Tl[t])return;Ol(r,Ol(L5(e,a),o)),sv(r.prototype,sv(a,L5(e,o))),Tl[r.prop=t]=r,e.targetTest&&(j4.push(r),LM[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}mj(t,r),e.register&&e.register(ol,r,nl)}else Dj.push(e)},ia=255,gg={aqua:[0,ia,ia],lime:[0,ia,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,ia],navy:[0,0,128],white:[ia,ia,ia],olive:[128,128,0],yellow:[ia,ia,0],orange:[ia,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[ia,0,0],pink:[ia,192,203],cyan:[0,ia,ia],transparent:[ia,ia,ia,0]},jS=function(e,t,i){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(i-t)*e*6:e<.5?i:e*3<2?t+(i-t)*(2/3-e)*6:t)*ia+.5|0},kj=function(e,t,i){var r=e?Vc(e)?[e>>16,e>>8&ia,e&ia]:0:gg.black,a,o,s,l,u,c,d,h,f,p;if(!r){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),gg[e])r=gg[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 r=parseInt(e.substr(1,6),16),[r>>16,r>>8&ia,r&ia,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&ia,e&ia]}else if(e.substr(0,3)==="hsl"){if(r=p=e.match(ID),!t)l=+r[0]%360/360,u=+r[1]/100,c=+r[2]/100,o=c<=.5?c*(u+1):c+u-c*u,a=c*2-o,r.length>3&&(r[3]*=1),r[0]=jS(l+1/3,a,o),r[1]=jS(l,a,o),r[2]=jS(l-1/3,a,o);else if(~e.indexOf("="))return r=e.match(hj),i&&r.length<4&&(r[3]=1),r}else r=e.match(ID)||gg.transparent;r=r.map(Number)}return t&&!p&&(a=r[0]/ia,o=r[1]/ia,s=r[2]/ia,d=Math.max(a,o,s),h=Math.min(a,o,s),c=(d+h)/2,d===h?l=u=0:(f=d-h,u=c>.5?f/(2-d-h):f/(d+h),l=d===a?(o-s)/f+(o<s?6:0):d===o?(s-a)/f+2:(a-o)/f+4,l*=60),r[0]=~~(l+.5),r[1]=~~(u*100+.5),r[2]=~~(c*100+.5)),i&&r.length<4&&(r[3]=1),r},Fj=function(e){var t=[],i=[],r=-1;return e.split(ph).forEach(function(a){var o=a.match(E2)||[];t.push.apply(t,o),i.push(r+=o.length+1)}),t.c=i,t},BD=function(e,t,i){var r="",a=(e+r).match(ph),o=t?"hsla(":"rgba(",s=0,l,u,c,d;if(!a)return e;if(a=a.map(function(h){return(h=kj(h,t,1))&&o+(t?h[0]+","+h[1]+"%,"+h[2]+"%,"+h[3]:h.join(","))+")"}),i&&(c=Fj(e),l=i.c,l.join(r)!==c.c.join(r)))for(u=e.replace(ph,"1").split(E2),d=u.length-1;s<d;s++)r+=u[s]+(~l.indexOf(s)?a.shift()||o+"0,0,0,0)":(c.length?c:a.length?a:i).shift());if(!u)for(u=e.split(ph),d=u.length-1;s<d;s++)r+=u[s]+a[s];return r+u[d]},ph=function(){var n="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in gg)n+="|"+e+"\\b";return new RegExp(n+")","gi")}(),B0e=/hsl[a]?\(/,Oj=function(e){var t=e.join(" "),i;if(ph.lastIndex=0,ph.test(t))return i=B0e.test(t),e[1]=BD(e[1],i),e[0]=BD(e[0],i,Fj(e[1])),!0},g9,Ml=function(){var n=Date.now,e=500,t=33,i=n(),r=i,a=1e3/240,o=a,s=[],l,u,c,d,h,f,p=function m(v){var g=n()-r,_=v===!0,S,x,A,C;if((g>e||g<0)&&(i+=g-t),r+=g,A=r-i,S=A-o,(S>0||_)&&(C=++d.frame,h=A-d.time*1e3,d.time=A=A/1e3,o+=S+(S>=a?4:a-S),x=1),_||(l=u(m)),x)for(f=0;f<s.length;f++)s[f](A,h,C,v)};return d={time:0,frame:0,tick:function(){p(!0)},deltaRatio:function(v){return h/(1e3/(v||60))},wake:function(){pj&&(!DT&&EM()&&(Cu=DT=window,PM=Cu.document||{},Fl.gsap=ol,(Cu.gsapVersions||(Cu.gsapVersions=[])).push(ol.version),vj(P5||Cu.GreenSockGlobals||!Cu.gsap&&Cu||{}),Dj.forEach(Nj)),c=typeof requestAnimationFrame!="undefined"&&requestAnimationFrame,l&&d.sleep(),u=c||function(v){return setTimeout(v,o-d.time*1e3+1|0)},g9=1,p(2))},sleep:function(){(c?cancelAnimationFrame:clearTimeout)(l),g9=0,u=v9},lagSmoothing:function(v,g){e=v||1/0,t=Math.min(g||33,e)},fps:function(v){a=1e3/(v||240),o=d.time*1e3+a},add:function(v,g,_){var S=g?function(x,A,C,M){v(x,A,C,M),d.remove(S)}:v;return d.remove(v),s[_?"unshift":"push"](S),cv(),S},remove:function(v,g){~(g=s.indexOf(v))&&s.splice(g,1)&&f>=g&&f--},_listeners:s},d}(),cv=function(){return!g9&&Ml.wake()},vr={},z0e=/^[\d.\-M][\d.\-,\s]/,G0e=/["']/g,U0e=function(e){for(var t={},i=e.substr(1,e.length-3).split(":"),r=i[0],a=1,o=i.length,s,l,u;a<o;a++)l=i[a],s=a!==o-1?l.lastIndexOf(","):l.length,u=l.substr(0,s),t[r]=isNaN(u)?u.replace(G0e,"").trim():+u,r=l.substr(s+1).trim();return t},V0e=function(e){var t=e.indexOf("(")+1,i=e.indexOf(")"),r=e.indexOf("(",t);return e.substring(t,~r&&r<i?e.indexOf(")",i+1):i)},H0e=function(e){var t=(e+"").split("("),i=vr[t[0]];return i&&t.length>1&&i.config?i.config.apply(null,~e.indexOf("{")?[U0e(t[1])]:V0e(e).split(",").map(Sj)):vr._CE&&z0e.test(e)?vr._CE("",e):i},Bj=function(e){return function(t){return 1-e(1-t)}},zj=function n(e,t){for(var i=e._first,r;i;)i instanceof Es?n(i,t):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==t&&(i.timeline?n(i.timeline,t):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=t)),i=i._next},gp=function(e,t){return e&&(Fa(e)?e:vr[e]||H0e(e))||t},Kp=function(e,t,i,r){i===void 0&&(i=function(l){return 1-t(1-l)}),r===void 0&&(r=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var a={easeIn:t,easeOut:i,easeInOut:r},o;return tl(e,function(s){vr[s]=Fl[s]=a,vr[o=s.toLowerCase()]=i;for(var l in a)vr[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=vr[s+"."+l]=a[l]}),a},Gj=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},$S=function n(e,t,i){var r=t>=1?t:1,a=(i||(e?.3:.45))/(t<1?t:1),o=a/IT*(Math.asin(1/r)||0),s=function(c){return c===1?1:r*Math.pow(2,-10*c)*p0e((c-o)*a)+1},l=e==="out"?s:e==="in"?function(u){return 1-s(1-u)}:Gj(s);return a=IT/a,l.config=function(u,c){return n(e,u,c)},l},qS=function n(e,t){t===void 0&&(t=1.70158);var i=function(o){return o?--o*o*((t+1)*o+t)+1:0},r=e==="out"?i:e==="in"?function(a){return 1-i(1-a)}:Gj(i);return r.config=function(a){return n(e,a)},r};tl("Linear,Quad,Cubic,Quart,Quint,Strong",function(n,e){var t=e<5?e+1:e;Kp(n+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(i*2,t)/2:1-Math.pow((1-i)*2,t)/2})});vr.Linear.easeNone=vr.none=vr.Linear.easeIn;Kp("Elastic",$S("in"),$S("out"),$S());(function(n,e){var t=1/e,i=2*t,r=2.5*t,a=function(s){return s<t?n*s*s:s<i?n*Math.pow(s-1.5/e,2)+.75:s<r?n*(s-=2.25/e)*s+.9375:n*Math.pow(s-2.625/e,2)+.984375};Kp("Bounce",function(o){return 1-a(1-o)},a)})(7.5625,2.75);Kp("Expo",function(n){return Math.pow(2,10*(n-1))*n+n*n*n*n*n*n*(1-n)});Kp("Circ",function(n){return-(cj(1-n*n)-1)});Kp("Sine",function(n){return n===1?1:-f0e(n*d0e)+1});Kp("Back",qS("in"),qS("out"),qS());vr.SteppedEase=vr.steps=Fl.SteppedEase={config:function(e,t){e===void 0&&(e=1);var i=1/e,r=e+(t?0:1),a=t?1:0,o=1-oa;return function(s){return((r*v3(0,o,s)|0)+a)*i}}};ov.ease=vr["quad.out"];tl("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(n){return IM+=n+","+n+"Params,"});var Uj=function(e,t){this.id=h0e++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:yj,this.set=t?t.getSetter:BM},y9=function(){function n(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,uv(this,+t.duration,1,1),this.data=t.data,ba&&(this._ctx=ba,ba.data.push(this)),g9||Ml.wake()}var e=n.prototype;return e.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},e.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,uv(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,r){if(cv(),!arguments.length)return this._tTime;var a=this._dp;if(a&&a.smoothChildTiming&&this._ts){for(p_(this,i),!a._dp||a.parent||wj(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&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&Lu(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!r||this._initted&&Math.abs(this._zTime)===oa||!this._initted&&this._dur&&i||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),_j(this,i,r)),this},e.time=function(i,r){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+kD(this))%(this._dur+this._rDelay)||(i?this._dur:0),r):this._time},e.totalProgress=function(i,r){return arguments.length?this.totalTime(this.totalDuration()*i,r):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(i,r){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+kD(this),r):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(i,r){var a=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*a,r):this._repeat?lv(this._tTime,a)+1:1},e.timeScale=function(i,r){if(!arguments.length)return this._rts===-oa?0:this._rts;if(this._rts===i)return this;var a=this.parent&&this._ts?I5(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-oa?0:this._rts,this.totalTime(v3(-Math.abs(this._delay),this.totalDuration(),a),r!==!1),f_(this),T0e(this)},e.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(cv(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==oa&&(this._tTime-=oa)))),this):this._ps},e.startTime=function(i){if(arguments.length){this._start=Aa(i);var r=this.parent||this._dp;return r&&(r._sort||!this.parent)&&Lu(r,this,this._start-this._delay),this}return this._start},e.endTime=function(i){return this._start+(el(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var r=this.parent||this._dp;return r?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?I5(r.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){i===void 0&&(i=S0e);var r=Vo;return Vo=i,NM(this)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),Vo=r,this},e.globalTime=function(i){for(var r=this,a=arguments.length?i:r.rawTime();r;)a=r._start+a/(Math.abs(r._ts)||1),r=r._dp;return!this.parent&&this._sat?this._sat.globalTime(i):a},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,FD(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var r=this._time;return this._rDelay=i,FD(this),r?this.time(r):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,r){return this.totalTime(t0(this,i),el(r))},e.restart=function(i,r){return this.play().totalTime(i?-this._delay:0,el(r)),this._dur||(this._zTime=-oa),this},e.play=function(i,r){return i!=null&&this.seek(i,r),this.reversed(!1).paused(!1)},e.reverse=function(i,r){return i!=null&&this.seek(i||this.totalDuration(),r),this.reversed(!0).paused(!1)},e.pause=function(i,r){return i!=null&&this.seek(i,r),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-oa:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-oa,this},e.isActive=function(){var i=this.parent||this._dp,r=this._start,a;return!!(!i||this._ts&&this._initted&&i.isActive()&&(a=i.rawTime(!0))>=r&&a<this.endTime(!0)-oa)},e.eventCallback=function(i,r,a){var o=this.vars;return arguments.length>1?(r?(o[i]=r,a&&(o[i+"Params"]=a),i==="onUpdate"&&(this._onUpdate=r)):delete o[i],this):o[i]},e.then=function(i){var r=this,a=r._prom;return new Promise(function(o){var s=Fa(i)?i:bj,l=function(){var c=r.then;r.then=null,a&&a(),Fa(s)&&(s=s(r))&&(s.then||s===r)&&(r.then=c),o(s),r.then=c};r._initted&&r.totalProgress()===1&&r._ts>=0||!r._tTime&&r._ts<0?l():r._prom=l})},e.kill=function(){mg(this)},n}();Ol(y9.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:-oa,_prom:0,_ps:!1,_rts:1});var Es=function(n){uj(e,n);function e(i,r){var a;return i===void 0&&(i={}),a=n.call(this,i)||this,a.labels={},a.smoothChildTiming=!!i.smoothChildTiming,a.autoRemoveChildren=!!i.autoRemoveChildren,a._sort=el(i.sortChildren),Ma&&Lu(i.parent||Ma,Mc(a),r),i.reversed&&a.reverse(),i.paused&&a.paused(!0),i.scrollTrigger&&Tj(Mc(a),i.scrollTrigger),a}var t=e.prototype;return t.to=function(r,a,o){return Og(0,arguments,this),this},t.from=function(r,a,o){return Og(1,arguments,this),this},t.fromTo=function(r,a,o,s){return Og(2,arguments,this),this},t.set=function(r,a,o){return a.duration=0,a.parent=this,Fg(a).repeatDelay||(a.repeat=0),a.immediateRender=!!a.immediateRender,new ro(r,a,t0(this,o),1),this},t.call=function(r,a,o){return Lu(this,ro.delayedCall(0,r,a),o)},t.staggerTo=function(r,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 ro(r,o,t0(this,l)),this},t.staggerFrom=function(r,a,o,s,l,u,c){return o.runBackwards=1,Fg(o).immediateRender=el(o.immediateRender),this.staggerTo(r,a,o,s,l,u,c)},t.staggerFromTo=function(r,a,o,s,l,u,c,d){return s.startAt=o,Fg(s).immediateRender=el(s.immediateRender),this.staggerTo(r,a,s,l,u,c,d)},t.render=function(r,a,o){var s=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,c=r<=0?0:Aa(r),d=this._zTime<0!=r<0&&(this._initted||!u),h,f,p,m,v,g,_,S,x,A,C,M;if(this!==Ma&&c>l&&r>=0&&(c=l),c!==this._tTime||o||d){if(s!==this._time&&u&&(c+=this._time-s,r+=this._time-s),h=c,x=this._start,S=this._ts,g=!S,d&&(u||(s=this._zTime),(r||!a)&&(this._zTime=r)),this._repeat){if(C=this._yoyo,v=u+this._rDelay,this._repeat<-1&&r<0)return this.totalTime(v*100+r,a,o);if(h=Aa(c%v),c===l?(m=this._repeat,h=u):(A=Aa(c/v),m=~~A,m&&m===A&&(h=u,m--),h>u&&(h=u)),A=lv(this._tTime,v),!s&&this._tTime&&A!==m&&this._tTime-A*v-this._dur<=0&&(A=m),C&&m&1&&(h=u-h,M=1),m!==A&&!this._lock){var I=C&&A&1,D=I===(C&&m&1);if(m<A&&(I=!I),s=I?0:c%u?u:c,this._lock=1,this.render(s||(M?0:Aa(m*v)),a,!u)._lock=0,this._tTime=c,!a&&this.parent&&Pl(this,"onRepeat"),this.vars.repeatRefresh&&!M&&(this.invalidate()._lock=1,A=m),s&&s!==this._time||g!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,D&&(this._lock=2,s=I?u:-1e-4,this.render(s,!0),this.vars.repeatRefresh&&!M&&this.invalidate()),this._lock=0,!this._ts&&!g)return this;zj(this,M)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(_=E0e(this,Aa(s),Aa(h)),_&&(c-=h-(h=_._start))),this._tTime=c,this._time=h,this._act=!S,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=r,s=0),!s&&c&&u&&!a&&!A&&(Pl(this,"onStart"),this._tTime!==c))return this;if(h>=s&&r>=0)for(f=this._first;f;){if(p=f._next,(f._act||h>=f._start)&&f._ts&&_!==f){if(f.parent!==this)return this.render(r,a,o);if(f.render(f._ts>0?(h-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(h-f._start)*f._ts,a,o),h!==this._time||!this._ts&&!g){_=0,p&&(c+=this._zTime=-oa);break}}f=p}else{f=this._last;for(var E=r<0?r:h;f;){if(p=f._prev,(f._act||E<=f._end)&&f._ts&&_!==f){if(f.parent!==this)return this.render(r,a,o);if(f.render(f._ts>0?(E-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(E-f._start)*f._ts,a,o||Vo&&NM(f)),h!==this._time||!this._ts&&!g){_=0,p&&(c+=this._zTime=E?-oa:oa);break}}f=p}}if(_&&!a&&(this.pause(),_.render(h>=s?0:-oa)._zTime=h>=s?1:-1,this._ts))return this._start=x,f_(this),this.render(r,a,o);this._onUpdate&&!a&&Pl(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&s)&&(x===this._start||Math.abs(S)!==Math.abs(this._ts))&&(this._lock||((r||!u)&&(c===l&&this._ts>0||!c&&this._ts<0)&&wh(this,1),!a&&!(r<0&&!s)&&(c||s||!l)&&(Pl(this,c===l&&r>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(r,a){var o=this;if(Vc(a)||(a=t0(this,a,r)),!(r instanceof y9)){if(cs(r))return r.forEach(function(s){return o.add(s,a)}),this;if(Io(r))return this.addLabel(r,a);if(Fa(r))r=ro.delayedCall(0,r);else return this}return this!==r?Lu(this,r,a):this},t.getChildren=function(r,a,o,s){r===void 0&&(r=!0),a===void 0&&(a=!0),o===void 0&&(o=!0),s===void 0&&(s=-S0);for(var l=[],u=this._first;u;)u._start>=s&&(u instanceof ro?a&&l.push(u):(o&&l.push(u),r&&l.push.apply(l,u.getChildren(!0,a,o)))),u=u._next;return l},t.getById=function(r){for(var a=this.getChildren(1,1,1),o=a.length;o--;)if(a[o].vars.id===r)return a[o]},t.remove=function(r){return Io(r)?this.removeLabel(r):Fa(r)?this.killTweensOf(r):(r.parent===this&&h_(this,r),r===this._recent&&(this._recent=this._last),mp(this))},t.totalTime=function(r,a){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Aa(Ml.time-(this._ts>0?r/this._ts:(this.totalDuration()-r)/-this._ts))),n.prototype.totalTime.call(this,r,a),this._forcing=0,this):this._tTime},t.addLabel=function(r,a){return this.labels[r]=t0(this,a),this},t.removeLabel=function(r){return delete this.labels[r],this},t.addPause=function(r,a,o){var s=ro.delayedCall(0,a||v9,o);return s.data="isPause",this._hasPause=1,Lu(this,s,t0(this,r))},t.removePause=function(r){var a=this._first;for(r=t0(this,r);a;)a._start===r&&a.data==="isPause"&&wh(a),a=a._next},t.killTweensOf=function(r,a,o){for(var s=this.getTweensOf(r,o),l=s.length;l--;)Zd!==s[l]&&s[l].kill(r,a);return this},t.getTweensOf=function(r,a){for(var o=[],s=b0(r),l=this._first,u=Vc(a),c;l;)l instanceof ro?b0e(l._targets,s)&&(u?(!Zd||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(r,a){a=a||{};var o=this,s=t0(o,r),l=a,u=l.startAt,c=l.onStart,d=l.onStartParams,h=l.immediateRender,f,p=ro.to(o,Ol({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())||oa,onStart:function(){if(o.pause(),!f){var v=a.duration||Math.abs((s-(u&&"time"in u?u.time:o._time))/o.timeScale());p._dur!==v&&uv(p,v,0,1).render(p._time,!0,!0),f=1}c&&c.apply(p,d||[])}},a));return h?p.render(0):p},t.tweenFromTo=function(r,a,o){return this.tweenTo(a,Ol({startAt:{time:t0(this,r)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(r){return r===void 0&&(r=this._time),OD(this,t0(this,r))},t.previousLabel=function(r){return r===void 0&&(r=this._time),OD(this,t0(this,r),1)},t.currentLabel=function(r){return arguments.length?this.seek(r,!0):this.previousLabel(this._time+oa)},t.shiftChildren=function(r,a,o){o===void 0&&(o=0);var s=this._first,l=this.labels,u;for(r=Aa(r);s;)s._start>=o&&(s._start+=r,s._end+=r),s=s._next;if(a)for(u in l)l[u]>=o&&(l[u]+=r);return mp(this)},t.invalidate=function(r){var a=this._first;for(this._lock=0;a;)a.invalidate(r),a=a._next;return n.prototype.invalidate.call(this,r)},t.clear=function(r){r===void 0&&(r=!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),r&&(this.labels={}),mp(this)},t.totalDuration=function(r){var a=0,o=this,s=o._last,l=S0,u,c,d;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-r:r));if(o._dirty){for(d=o.parent;s;)u=s._prev,s._dirty&&s.totalDuration(),c=s._start,c>l&&o._sort&&s._ts&&!o._lock?(o._lock=1,Lu(o,s,c-s._delay,1)._lock=0):l=c,c<0&&s._ts&&(a-=c,(!d&&!o._dp||d&&d.smoothChildTiming)&&(o._start+=Aa(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;uv(o,o===Ma&&o._time>a?o._time:a,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(r){if(Ma._ts&&(_j(Ma,I5(r,Ma)),gj=Ml.frame),Ml.frame>=DD){DD+=Il.autoSleep||120;var a=Ma._first;if((!a||!a._ts)&&Il.autoSleep&&Ml._listeners.length<2){for(;a&&!a._ts;)a=a._next;a||Ml.sleep()}}},e}(y9);Ol(Es.prototype,{_lock:0,_hasPause:0,_forcing:0});var W0e=function(e,t,i,r,a,o,s){var l=new nl(this._pt,e,t,0,1,qj,null,a),u=0,c=0,d,h,f,p,m,v,g,_;for(l.b=i,l.e=r,i+="",r+="",(g=~r.indexOf("random("))&&(r=m9(r)),o&&(_=[i,r],o(_,e,t),i=_[0],r=_[1]),h=i.match(HS)||[];d=HS.exec(r);)p=d[0],m=r.substring(u,d.index),f?f=(f+1)%5:m.substr(-5)==="rgba("&&(f=1),p!==h[c++]&&(v=parseFloat(h[c-1])||0,l._pt={_next:l._pt,p:m||c===1?m:",",s:v,c:p.charAt(1)==="="?W2(v,p)-v:parseFloat(p)-v,m:f&&f<4?Math.round:0},u=HS.lastIndex);return l.c=u<r.length?r.substring(u,r.length):"",l.fp=s,(fj.test(r)||g)&&(l.e=0),this._pt=l,l},kM=function(e,t,i,r,a,o,s,l,u,c){Fa(r)&&(r=r(a||0,e,o));var d=e[t],h=i!=="get"?i:Fa(d)?u?e[t.indexOf("set")||!Fa(e["get"+t.substr(3)])?t:"get"+t.substr(3)](u):e[t]():d,f=Fa(d)?u?Y0e:jj:OM,p;if(Io(r)&&(~r.indexOf("random(")&&(r=m9(r)),r.charAt(1)==="="&&(p=W2(h,r)+(ls(h)||0),(p||p===0)&&(r=p))),!c||h!==r||GT)return!isNaN(h*r)&&r!==""?(p=new nl(this._pt,e,t,+h||0,r-(h||0),typeof d=="boolean"?Z0e:$j,0,f),u&&(p.fp=u),s&&p.modifier(s,this,e),this._pt=p):(!d&&!(t in e)&&RM(t,r),W0e.call(this,e,t,h,r,f,l||Il.stringFilter,u))},j0e=function(e,t,i,r,a){if(Fa(e)&&(e=Bg(e,a,t,i,r)),!Xu(e)||e.style&&e.nodeType||cs(e)||dj(e))return Io(e)?Bg(e,a,t,i,r):e;var o={},s;for(s in e)o[s]=Bg(e[s],a,t,i,r);return o},Vj=function(e,t,i,r,a,o){var s,l,u,c;if(Tl[e]&&(s=new Tl[e]).init(a,s.rawVars?t[e]:j0e(t[e],r,a,o,i),i,r,o)!==!1&&(i._pt=l=new nl(i._pt,a,e,0,1,s.render,s,0,s.priority),i!==P2))for(u=i._ptLookup[i._targets.indexOf(a)],c=s._props.length;c--;)u[s._props[c]]=l;return s},Zd,GT,FM=function n(e,t,i){var r=e.vars,a=r.ease,o=r.startAt,s=r.immediateRender,l=r.lazy,u=r.onUpdate,c=r.runBackwards,d=r.yoyoEase,h=r.keyframes,f=r.autoRevert,p=e._dur,m=e._startAt,v=e._targets,g=e.parent,_=g&&g.data==="nested"?g.vars.targets:v,S=e._overwrite==="auto"&&!CM,x=e.timeline,A,C,M,I,D,E,P,F,V,G,W,Y,Q;if(x&&(!h||!a)&&(a="none"),e._ease=gp(a,ov.ease),e._yEase=d?Bj(gp(d===!0?a:d,ov.ease)):0,d&&e._yoyo&&!e._repeat&&(d=e._yEase,e._yEase=e._ease,e._ease=d),e._from=!x&&!!r.runBackwards,!x||h&&!r.stagger){if(F=v[0]?vp(v[0]).harness:0,Y=F&&r[F.prop],A=L5(r,LM),m&&(m._zTime<0&&m.progress(1),t<0&&c&&s&&!f?m.render(-1,!0):m.revert(c&&p?W4:_0e),m._lazy=0),o){if(wh(e._startAt=ro.set(v,Ol({data:"isStart",overwrite:!1,parent:g,immediateRender:!0,lazy:!m&&el(l),startAt:null,delay:0,onUpdate:u&&function(){return Pl(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(Vo||!s&&!f)&&e._startAt.revert(W4),s&&p&&t<=0&&i<=0){t&&(e._zTime=t);return}}else if(c&&p&&!m){if(t&&(s=!1),M=Ol({overwrite:!1,data:"isFromStart",lazy:s&&!m&&el(l),immediateRender:s,stagger:0,parent:g},A),Y&&(M[F.prop]=Y),wh(e._startAt=ro.set(v,M)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(Vo?e._startAt.revert(W4):e._startAt.render(-1,!0)),e._zTime=t,!s)n(e._startAt,oa,oa);else if(!t)return}for(e._pt=e._ptCache=0,l=p&&el(l)||l&&!p,C=0;C<v.length;C++){if(D=v[C],P=D._gsap||DM(v)[C]._gsap,e._ptLookup[C]=G={},NT[P.id]&&fh.length&&R5(),W=_===v?C:_.indexOf(D),F&&(V=new F).init(D,Y||A,e,W,_)!==!1&&(e._pt=I=new nl(e._pt,D,V.name,0,1,V.render,V,0,V.priority),V._props.forEach(function(K){G[K]=I}),V.priority&&(E=1)),!F||Y)for(M in A)Tl[M]&&(V=Vj(M,A,e,W,D,_))?V.priority&&(E=1):G[M]=I=kM.call(e,D,M,"get",A[M],W,_,0,r.stringFilter);e._op&&e._op[C]&&e.kill(D,e._op[C]),S&&e._pt&&(Zd=e,Ma.killTweensOf(D,G,e.globalTime(t)),Q=!e.parent,Zd=0),e._pt&&l&&(NT[P.id]=1)}E&&Xj(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!Q,h&&t<=0&&x.render(S0,!0,!0)},$0e=function(e,t,i,r,a,o,s,l){var u=(e._pt&&e._ptCache||(e._ptCache={}))[t],c,d,h,f;if(!u)for(u=e._ptCache[t]=[],h=e._ptLookup,f=e._targets.length;f--;){if(c=h[f][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 GT=1,e.vars[t]="+=0",FM(e,s),GT=0,l?p9(t+" not eligible for reset"):1;u.push(c)}for(f=u.length;f--;)d=u[f],c=d._pt||d,c.s=(r||r===0)&&!a?r:c.s+(r||0)+o*c.c,c.c=i-c.s,d.e&&(d.e=Ha(i)+ls(d.e)),d.b&&(d.b=c.s+ls(d.b))},q0e=function(e,t){var i=e[0]?vp(e[0]).harness:0,r=i&&i.aliases,a,o,s,l;if(!r)return t;a=sv({},t);for(o in r)if(o in a)for(l=r[o].split(","),s=l.length;s--;)a[l[s]]=a[o];return a},X0e=function(e,t,i,r){var a=t.ease||r||"power1.inOut",o,s;if(cs(t))s=i[e]||(i[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=i[o]||(i[o]=[]),o==="ease"||s.push({t:parseFloat(e),v:t[o],e:a})},Bg=function(e,t,i,r,a){return Fa(e)?e.call(t,i,r,a):Io(e)&&~e.indexOf("random(")?m9(e):e},Hj=IM+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Wj={};tl(Hj+",id,stagger,delay,duration,paused,scrollTrigger",function(n){return Wj[n]=1});var ro=function(n){uj(e,n);function e(i,r,a,o){var s;typeof r=="number"&&(a.duration=r,r=a,a=null),s=n.call(this,o?r:Fg(r))||this;var l=s.vars,u=l.duration,c=l.delay,d=l.immediateRender,h=l.stagger,f=l.overwrite,p=l.keyframes,m=l.defaults,v=l.scrollTrigger,g=l.yoyoEase,_=r.parent||Ma,S=(cs(i)||dj(i)?Vc(i[0]):"length"in r)?[i]:b0(i),x,A,C,M,I,D,E,P;if(s._targets=S.length?DM(S):p9("GSAP target "+i+" not found. https://gsap.com",!Il.nullTargetWarn)||[],s._ptLookup=[],s._overwrite=f,p||h||Ny(u)||Ny(c)){if(r=s.vars,x=s.timeline=new Es({data:"nested",defaults:m||{},targets:_&&_.data==="nested"?_.vars.targets:S}),x.kill(),x.parent=x._dp=Mc(s),x._start=0,h||Ny(u)||Ny(c)){if(M=S.length,E=h&&Ej(h),Xu(h))for(I in h)~Hj.indexOf(I)&&(P||(P={}),P[I]=h[I]);for(A=0;A<M;A++)C=L5(r,Wj),C.stagger=0,g&&(C.yoyoEase=g),P&&sv(C,P),D=S[A],C.duration=+Bg(u,Mc(s),A,D,S),C.delay=(+Bg(c,Mc(s),A,D,S)||0)-s._delay,!h&&M===1&&C.delay&&(s._delay=c=C.delay,s._start+=c,C.delay=0),x.to(D,C,E?E(A,D,S):0),x._ease=vr.none;x.duration()?u=c=0:s.timeline=0}else if(p){Fg(Ol(x.vars.defaults,{ease:"none"})),x._ease=gp(p.ease||r.ease||"none");var F=0,V,G,W;if(cs(p))p.forEach(function(Y){return x.to(S,Y,">")}),x.duration();else{C={};for(I in p)I==="ease"||I==="easeEach"||X0e(I,p[I],C,p.easeEach);for(I in C)for(V=C[I].sort(function(Y,Q){return Y.t-Q.t}),F=0,A=0;A<V.length;A++)G=V[A],W={ease:G.e,duration:(G.t-(A?V[A-1].t:0))/100*u},W[I]=G.v,x.to(S,W,F),F+=W.duration;x.duration()<u&&x.to({},{duration:u-x.duration()})}}u||s.duration(u=x.duration())}else s.timeline=0;return f===!0&&!CM&&(Zd=Mc(s),Ma.killTweensOf(S),Zd=0),Lu(_,Mc(s),a),r.reversed&&s.reverse(),r.paused&&s.paused(!0),(d||!u&&!p&&s._start===Aa(_._time)&&el(d)&&A0e(Mc(s))&&_.data!=="nested")&&(s._tTime=-oa,s.render(Math.max(0,-c)||0)),v&&Tj(Mc(s),v),s}var t=e.prototype;return t.render=function(r,a,o){var s=this._time,l=this._tDur,u=this._dur,c=r<0,d=r>l-oa&&!c?l:r<oa?0:r,h,f,p,m,v,g,_,S,x;if(!u)M0e(this,r,a,o);else if(d!==this._tTime||!r||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c||this._lazy){if(h=d,S=this.timeline,this._repeat){if(m=u+this._rDelay,this._repeat<-1&&c)return this.totalTime(m*100+r,a,o);if(h=Aa(d%m),d===l?(p=this._repeat,h=u):(v=Aa(d/m),p=~~v,p&&p===v?(h=u,p--):h>u&&(h=u)),g=this._yoyo&&p&1,g&&(x=this._yEase,h=u-h),v=lv(this._tTime,m),h===s&&!o&&this._initted&&p===v)return this._tTime=d,this;p!==v&&(S&&this._yEase&&zj(S,g),this.vars.repeatRefresh&&!g&&!this._lock&&h!==m&&this._initted&&(this._lock=o=1,this.render(Aa(m*p),!0).invalidate()._lock=0))}if(!this._initted){if(Aj(this,c?r:h,o,a,d))return this._tTime=0,this;if(s!==this._time&&!(o&&this.vars.repeatRefresh&&p!==v))return this;if(u!==this._dur)return this.render(r,a,o)}if(this._tTime=d,this._time=h,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=_=(x||this._ease)(h/u),this._from&&(this.ratio=_=1-_),!s&&d&&!a&&!v&&(Pl(this,"onStart"),this._tTime!==d))return this;for(f=this._pt;f;)f.r(_,f.d),f=f._next;S&&S.render(r<0?r:S._dur*S._ease(h/this._dur),a,o)||this._startAt&&(this._zTime=r),this._onUpdate&&!a&&(c&&kT(this,r,a,o),Pl(this,"onUpdate")),this._repeat&&p!==v&&this.vars.onRepeat&&!a&&this.parent&&Pl(this,"onRepeat"),(d===this._tDur||!d)&&this._tTime===d&&(c&&!this._onUpdate&&kT(this,r,!0,!0),(r||!u)&&(d===this._tDur&&this._ts>0||!d&&this._ts<0)&&wh(this,1),!a&&!(c&&!s)&&(d||s||g)&&(Pl(this,d===l?"onComplete":"onReverseComplete",!0),this._prom&&!(d<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(r){return(!r||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(r),n.prototype.invalidate.call(this,r)},t.resetTo=function(r,a,o,s,l){g9||Ml.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||FM(this,u),c=this._ease(u/this._dur),$0e(this,r,a,o,s,c,u,l)?this.resetTo(r,a,o,s,1):(p_(this,0),this.parent||xj(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(r,a){if(a===void 0&&(a="all"),!r&&(!a||a==="all"))return this._lazy=this._pt=0,this.parent?mg(this):this.scrollTrigger&&this.scrollTrigger.kill(!!Vo),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(r,a,Zd&&Zd.vars.overwrite!==!0)._first||mg(this),this.parent&&o!==this.timeline.totalDuration()&&uv(this,this._dur*this.timeline._tDur/o,0,1),this}var s=this._targets,l=r?b0(r):s,u=this._ptLookup,c=this._pt,d,h,f,p,m,v,g;if((!a||a==="all")&&w0e(s,l))return a==="all"&&(this._pt=0),mg(this);for(d=this._op=this._op||[],a!=="all"&&(Io(a)&&(m={},tl(a,function(_){return m[_]=1}),a=m),a=q0e(s,a)),g=s.length;g--;)if(~l.indexOf(s[g])){h=u[g],a==="all"?(d[g]=a,p=h,f={}):(f=d[g]=d[g]||{},p=a);for(m in p)v=h&&h[m],v&&((!("kill"in v.d)||v.d.kill(m)===!0)&&h_(this,v,"_pt"),delete h[m]),f!=="all"&&(f[m]=1)}return this._initted&&!this._pt&&c&&mg(this),this},e.to=function(r,a){return new e(r,a,arguments[2])},e.from=function(r,a){return Og(1,arguments)},e.delayedCall=function(r,a,o,s){return new e(a,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:r,onComplete:a,onReverseComplete:a,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:s})},e.fromTo=function(r,a,o){return Og(2,arguments)},e.set=function(r,a){return a.duration=0,a.repeatDelay||(a.repeat=0),new e(r,a)},e.killTweensOf=function(r,a,o){return Ma.killTweensOf(r,a,o)},e}(y9);Ol(ro.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});tl("staggerTo,staggerFrom,staggerFromTo",function(n){ro[n]=function(){var e=new Es,t=OT.call(arguments,0);return t.splice(n==="staggerFromTo"?5:4,0,0),e[n].apply(e,t)}});var OM=function(e,t,i){return e[t]=i},jj=function(e,t,i){return e[t](i)},Y0e=function(e,t,i,r){return e[t](r.fp,i)},K0e=function(e,t,i){return e.setAttribute(t,i)},BM=function(e,t){return Fa(e[t])?jj:MM(e[t])&&e.setAttribute?K0e:OM},$j=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},Z0e=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},qj=function(e,t){var i=t._pt,r="";if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;i;)r=i.p+(i.m?i.m(i.s+i.c*e):Math.round((i.s+i.c*e)*1e4)/1e4)+r,i=i._next;r+=t.c}t.set(t.t,t.p,r,t)},zM=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},J0e=function(e,t,i,r){for(var a=this._pt,o;a;)o=a._next,a.p===r&&a.modifier(e,t,i),a=o},Q0e=function(e){for(var t=this._pt,i,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?h_(this,t,"_pt"):t.dep||(i=1),t=r;return!i},eue=function(e,t,i,r){r.mSet(e,t,r.m.call(r.tween,i,r.mt),r)},Xj=function(e){for(var t=e._pt,i,r,a,o;t;){for(i=t._next,r=a;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:o)?t._prev._next=t:a=t,(t._next=r)?r._prev=t:o=t,t=i}e._pt=a},nl=function(){function n(t,i,r,a,o,s,l,u,c){this.t=i,this.s=a,this.c=o,this.p=r,this.r=s||$j,this.d=l||this,this.set=u||OM,this.pr=c||0,this._next=t,t&&(t._prev=this)}var e=n.prototype;return e.modifier=function(i,r,a){this.mSet=this.mSet||this.set,this.set=eue,this.m=i,this.mt=a,this.tween=r},n}();tl(IM+"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(n){return LM[n]=1});Fl.TweenMax=Fl.TweenLite=ro;Fl.TimelineLite=Fl.TimelineMax=Es;Ma=new Es({sortChildren:!1,defaults:ov,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Il.stringFilter=Oj;var yp=[],$4={},tue=[],zD=0,nue=0,XS=function(e){return($4[e]||tue).map(function(t){return t()})},UT=function(){var e=Date.now(),t=[];e-zD>2&&(XS("matchMediaInit"),yp.forEach(function(i){var r=i.queries,a=i.conditions,o,s,l,u;for(s in r)o=Cu.matchMedia(r[s]).matches,o&&(l=1),o!==a[s]&&(a[s]=o,u=1);u&&(i.revert(),l&&t.push(i))}),XS("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i,function(r){return i.add(null,r)})}),zD=e,XS("matchMedia"))},Yj=function(){function n(t,i){this.selector=i&&BT(i),this.data=[],this._r=[],this.isReverted=!1,this.id=nue++,t&&this.add(t)}var e=n.prototype;return e.add=function(i,r,a){Fa(i)&&(a=r,r=i,i=Fa);var o=this,s=function(){var u=ba,c=o.selector,d;return u&&u!==o&&u.data.push(o),a&&(o.selector=BT(a)),ba=o,d=r.apply(o,arguments),Fa(d)&&o._r.push(d),ba=u,o.selector=c,o.isReverted=!1,d};return o.last=s,i===Fa?s(o,function(l){return o.add(null,l)}):i?o[i]=s:s},e.ignore=function(i){var r=ba;ba=null,i(this),ba=r},e.getTweens=function(){var i=[];return this.data.forEach(function(r){return r instanceof n?i.push.apply(i,r.getTweens()):r instanceof ro&&!(r.parent&&r.parent.data==="nested")&&i.push(r)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,r){var a=this;if(i?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,d){return d.g-c.g||-1/0}).forEach(function(c){return c.t.revert(i)}),l=a.data.length;l--;)u=a.data[l],u instanceof Es?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof ro)&&u.revert&&u.revert(i);a._r.forEach(function(c){return c(i,a)}),a.isReverted=!0}():this.data.forEach(function(s){return s.kill&&s.kill()}),this.clear(),r)for(var o=yp.length;o--;)yp[o].id===this.id&&yp.splice(o,1)},e.revert=function(i){this.kill(i||{})},n}(),iue=function(){function n(t){this.contexts=[],this.scope=t,ba&&ba.data.push(this)}var e=n.prototype;return e.add=function(i,r,a){Xu(i)||(i={matches:i});var o=new Yj(0,a||this.scope),s=o.conditions={},l,u,c;ba&&!o.selector&&(o.selector=ba.selector),this.contexts.push(o),r=o.add("onMatch",r),o.queries=i;for(u in i)u==="all"?c=1:(l=Cu.matchMedia(i[u]),l&&(yp.indexOf(o)<0&&yp.push(o),(s[u]=l.matches)&&(c=1),l.addListener?l.addListener(UT):l.addEventListener("change",UT)));return c&&r(o,function(d){return o.add(null,d)}),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(r){return r.kill(i,!0)})},n}(),D5={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(r){return Nj(r)})},timeline:function(e){return new Es(e)},getTweensOf:function(e,t){return Ma.getTweensOf(e,t)},getProperty:function(e,t,i,r){Io(e)&&(e=b0(e)[0]);var a=vp(e||{}).get,o=i?bj:Sj;return i==="native"&&(i=""),e&&(t?o((Tl[t]&&Tl[t].get||a)(e,t,i,r)):function(s,l,u){return o((Tl[s]&&Tl[s].get||a)(e,s,l,u))})},quickSetter:function(e,t,i){if(e=b0(e),e.length>1){var r=e.map(function(c){return ol.quickSetter(c,t,i)}),a=r.length;return function(c){for(var d=a;d--;)r[d](c)}}e=e[0]||{};var o=Tl[t],s=vp(e),l=s.harness&&(s.harness.aliases||{})[t]||t,u=o?function(c){var d=new o;P2._pt=0,d.init(e,i?c+i:c,P2,0,[e]),d.render(1,d),P2._pt&&zM(1,P2)}:s.set(e,l);return o?u:function(c){return u(e,l,i?c+i:c,s,1)}},quickTo:function(e,t,i){var r,a=ol.to(e,Ol((r={},r[t]="+=0.1",r.paused=!0,r.stagger=0,r),i||{})),o=function(l,u,c){return a.resetTo(t,l,u,c)};return o.tween=a,o},isTweening:function(e){return Ma.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=gp(e.ease,ov.ease)),ND(ov,e||{})},config:function(e){return ND(Il,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,r=e.plugins,a=e.defaults,o=e.extendTimeline;(r||"").split(",").forEach(function(s){return s&&!Tl[s]&&!Fl[s]&&p9(t+" effect requires "+s+" plugin.")}),WS[t]=function(s,l,u){return i(b0(s),Ol(l||{},a),u)},o&&(Es.prototype[t]=function(s,l,u){return this.add(WS[t](s,Xu(l)?l:(u=l)&&{},this),u)})},registerEase:function(e,t){vr[e]=gp(t)},parseEase:function(e,t){return arguments.length?gp(e,t):vr},getById:function(e){return Ma.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var i=new Es(e),r,a;for(i.smoothChildTiming=el(e.smoothChildTiming),Ma.remove(i),i._dp=0,i._time=i._tTime=Ma._time,r=Ma._first;r;)a=r._next,(t||!(!r._dur&&r instanceof ro&&r.vars.onComplete===r._targets[0]))&&Lu(i,r,r._start-r._delay),r=a;return Lu(Ma,i,0),i},context:function(e,t){return e?new Yj(e,t):ba},matchMedia:function(e){return new iue(e)},matchMediaRefresh:function(){return yp.forEach(function(e){var t=e.conditions,i,r;for(r in t)t[r]&&(t[r]=!1,i=1);i&&e.revert()})||UT()},addEventListener:function(e,t){var i=$4[e]||($4[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=$4[e],r=i&&i.indexOf(t);r>=0&&i.splice(r,1)},utils:{wrap:k0e,wrapYoyo:F0e,distribute:Ej,random:Rj,snap:Pj,normalize:N0e,getUnit:ls,clamp:R0e,splitColor:kj,toArray:b0,selector:BT,mapRange:Ij,pipe:I0e,unitize:D0e,interpolate:O0e,shuffle:Mj},install:vj,effects:WS,ticker:Ml,updateRoot:Es.updateRoot,plugins:Tl,globalTimeline:Ma,core:{PropTween:nl,globals:mj,Tween:ro,Timeline:Es,Animation:y9,getCache:vp,_removeLinkedListItem:h_,reverting:function(){return Vo},context:function(e){return e&&ba&&(ba.data.push(e),e._ctx=ba),ba},suppressOverwrites:function(e){return CM=e}}};tl("to,from,fromTo,delayedCall,set,killTweensOf",function(n){return D5[n]=ro[n]});Ml.add(Es.updateRoot);P2=D5.to({},{duration:0});var rue=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},aue=function(e,t){var i=e._targets,r,a,o;for(r in t)for(a=i.length;a--;)o=e._ptLookup[a][r],o&&(o=o.d)&&(o._pt&&(o=rue(o,r)),o&&o.modifier&&o.modifier(t[r],e,i[a],r))},YS=function(e,t){return{name:e,headless:1,rawVars:1,init:function(r,a,o){o._onInit=function(s){var l,u;if(Io(a)&&(l={},tl(a,function(c){return l[c]=1}),a=l),t){l={};for(u in a)l[u]=t(a[u]);a=l}aue(s,a)}}}},ol=D5.registerPlugin({name:"attr",init:function(e,t,i,r,a){var o,s,l;this.tween=i;for(o in t)l=e.getAttribute(o)||"",s=this.add(e,"setAttribute",(l||0)+"",t[o],r,a,0,0,o),s.op=o,s.b=l,this._props.push(o)},render:function(e,t){for(var i=t._pt;i;)Vo?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",headless:1,init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},YS("roundProps",zT),YS("modifiers"),YS("snap",Pj))||D5;ro.version=Es.version=ol.version="3.14.2";pj=1;EM()&&cv();vr.Power0;vr.Power1;vr.Power2;vr.Power3;vr.Power4;vr.Linear;vr.Quad;vr.Cubic;vr.Quart;vr.Quint;vr.Strong;vr.Elastic;vr.Back;vr.SteppedEase;vr.Bounce;vr.Sine;vr.Expo;vr.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 GD,Jd,j2,GM,np,UD,UM,oue=function(){return typeof window!="undefined"},Hc={},Gf=180/Math.PI,$2=Math.PI/180,A1=Math.atan2,VD=1e8,VM=/([A-Z])/g,sue=/(left|right|width|margin|padding|x)/i,lue=/[\s,\(]\S/,Ou={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},VT=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},uue=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)},cue=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)},due=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)},hue=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},Kj=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Zj=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},fue=function(e,t,i){return e.style[t]=i},pue=function(e,t,i){return e.style.setProperty(t,i)},vue=function(e,t,i){return e._gsap[t]=i},mue=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},gue=function(e,t,i,r,a){var o=e._gsap;o.scaleX=o.scaleY=i,o.renderTransform(a,o)},yue=function(e,t,i,r,a){var o=e._gsap;o[t]=i,o.renderTransform(a,o)},Ea="transform",il=Ea+"Origin",_ue=function n(e,t){var i=this,r=this.target,a=r.style,o=r._gsap;if(e in Hc&&a){if(this.tfm=this.tfm||{},e!=="transform")e=Ou[e]||e,~e.indexOf(",")?e.split(",").forEach(function(s){return i.tfm[s]=Rc(r,s)}):this.tfm[e]=o.x?o[e]:Rc(r,e),e===il&&(this.tfm.zOrigin=o.zOrigin);else return Ou.transform.split(",").forEach(function(s){return n.call(i,s,t)});if(this.props.indexOf(Ea)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(il,t,"")),e=Ea}(a||t)&&this.props.push(e,t,a[e])},Jj=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},Sue=function(){var e=this.props,t=this.target,i=t.style,r=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]?i[e[a]]=e[a+2]:i.removeProperty(e[a].substr(0,2)==="--"?e[a]:e[a].replace(VM,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)r[o]=this.tfm[o];r.svg&&(r.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),a=UM(),(!a||!a.isStart)&&!i[Ea]&&(Jj(i),r.zOrigin&&i[il]&&(i[il]+=" "+r.zOrigin+"px",r.zOrigin=0,r.renderTransform()),r.uncache=1)}},Qj=function(e,t){var i={target:e,props:[],revert:Sue,save:_ue};return e._gsap||ol.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(r){return i.save(r)}),i},e$,HT=function(e,t){var i=Jd.createElementNS?Jd.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Jd.createElement(e);return i&&i.style?i:Jd.createElement(e)},Rl=function n(e,t,i){var r=getComputedStyle(e);return r[t]||r.getPropertyValue(t.replace(VM,"-$1").toLowerCase())||r.getPropertyValue(t)||!i&&n(e,dv(t)||t,1)||""},HD="O,Moz,ms,Ms,Webkit".split(","),dv=function(e,t,i){var r=t||np,a=r.style,o=5;if(e in a&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(HD[o]+e in a););return o<0?null:(o===3?"ms":o>=0?HD[o]:"")+e},WT=function(){oue()&&window.document&&(GD=window,Jd=GD.document,j2=Jd.documentElement,np=HT("div")||{style:{}},HT("div"),Ea=dv(Ea),il=Ea+"Origin",np.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",e$=!!dv("perspective"),UM=ol.core.reverting,GM=1)},WD=function(e){var t=e.ownerSVGElement,i=HT("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=e.cloneNode(!0),a;r.style.display="block",i.appendChild(r),j2.appendChild(i);try{a=r.getBBox()}catch(o){}return i.removeChild(r),j2.removeChild(i),a},jD=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},t$=function(e){var t,i;try{t=e.getBBox()}catch(r){t=WD(e),i=1}return t&&(t.width||t.height)||i||(t=WD(e)),t&&!t.width&&!t.x&&!t.y?{x:+jD(e,["x","cx","x1"])||0,y:+jD(e,["y","cy","y1"])||0,width:0,height:0}:t},n$=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&t$(e))},Th=function(e,t){if(t){var i=e.style,r;t in Hc&&t!==il&&(t=Ea),i.removeProperty?(r=t.substr(0,2),(r==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),i.removeProperty(r==="--"?t:t.replace(VM,"-$1").toLowerCase())):i.removeAttribute(t)}},Qd=function(e,t,i,r,a,o){var s=new nl(e._pt,t,i,0,1,o?Zj:Kj);return e._pt=s,s.b=r,s.e=a,e._props.push(i),s},$D={deg:1,rad:1,turn:1},bue={grid:1,flex:1},Ah=function n(e,t,i,r){var a=parseFloat(i)||0,o=(i+"").trim().substr((a+"").length)||"px",s=np.style,l=sue.test(t),u=e.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),d=100,h=r==="px",f=r==="%",p,m,v,g;if(r===o||!a||$D[r]||$D[o])return a;if(o!=="px"&&!h&&(a=n(e,t,i,"px")),g=e.getCTM&&n$(e),(f||o==="%")&&(Hc[t]||~t.indexOf("adius")))return p=g?e.getBBox()[l?"width":"height"]:e[c],Ha(f?a/p*d:a/100*p);if(s[l?"width":"height"]=d+(h?o:r),m=r!=="rem"&&~t.indexOf("adius")||r==="em"&&e.appendChild&&!u?e:e.parentNode,g&&(m=(e.ownerSVGElement||{}).parentNode),(!m||m===Jd||!m.appendChild)&&(m=Jd.body),v=m._gsap,v&&f&&v.width&&l&&v.time===Ml.time&&!v.uncache)return Ha(a/v.width*d);if(f&&(t==="height"||t==="width")){var _=e.style[t];e.style[t]=d+r,p=e[c],_?e.style[t]=_:Th(e,t)}else(f||o==="%")&&!bue[Rl(m,"display")]&&(s.position=Rl(e,"position")),m===e&&(s.position="static"),m.appendChild(np),p=np[c],m.removeChild(np),s.position="absolute";return l&&f&&(v=vp(m),v.time=Ml.time,v.width=m[c]),Ha(h?p*a/d:p&&a?d/p*a:0)},Rc=function(e,t,i,r){var a;return GM||WT(),t in Ou&&t!=="transform"&&(t=Ou[t],~t.indexOf(",")&&(t=t.split(",")[0])),Hc[t]&&t!=="transform"?(a=S9(e,r),a=t!=="transformOrigin"?a[t]:a.svg?a.origin:k5(Rl(e,il))+" "+a.zOrigin+"px"):(a=e.style[t],(!a||a==="auto"||r||~(a+"").indexOf("calc("))&&(a=N5[t]&&N5[t](e,t,i)||Rl(e,t)||yj(e,t)||(t==="opacity"?1:0))),i&&!~(a+"").trim().indexOf(" ")?Ah(e,t,a,i)+i:a},xue=function(e,t,i,r){if(!i||i==="none"){var a=dv(t,e,1),o=a&&Rl(e,a,1);o&&o!==i?(t=a,i=o):t==="borderColor"&&(i=Rl(e,"borderTopColor"))}var s=new nl(this._pt,e.style,t,0,1,qj),l=0,u=0,c,d,h,f,p,m,v,g,_,S,x,A;if(s.b=i,s.e=r,i+="",r+="",r.substring(0,6)==="var(--"&&(r=Rl(e,r.substring(4,r.indexOf(")")))),r==="auto"&&(m=e.style[t],e.style[t]=r,r=Rl(e,t)||r,m?e.style[t]=m:Th(e,t)),c=[i,r],Oj(c),i=c[0],r=c[1],h=i.match(E2)||[],A=r.match(E2)||[],A.length){for(;d=E2.exec(r);)v=d[0],_=r.substring(l,d.index),p?p=(p+1)%5:(_.substr(-5)==="rgba("||_.substr(-5)==="hsla(")&&(p=1),v!==(m=h[u++]||"")&&(f=parseFloat(m)||0,x=m.substr((f+"").length),v.charAt(1)==="="&&(v=W2(f,v)+x),g=parseFloat(v),S=v.substr((g+"").length),l=E2.lastIndex-S.length,S||(S=S||Il.units[t]||x,l===r.length&&(r+=S,s.e+=S)),x!==S&&(f=Ah(e,t,m,S)||0),s._pt={_next:s._pt,p:_||u===1?_:",",s:f,c:g-f,m:p&&p<4||t==="zIndex"?Math.round:0});s.c=l<r.length?r.substring(l,r.length):""}else s.r=t==="display"&&r==="none"?Zj:Kj;return fj.test(r)&&(s.e=0),this._pt=s,s},qD={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},wue=function(e){var t=e.split(" "),i=t[0],r=t[1]||"50%";return(i==="top"||i==="bottom"||r==="left"||r==="right")&&(e=i,i=r,r=e),t[0]=qD[i]||i,t[1]=qD[r]||r,t.join(" ")},Tue=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var i=t.t,r=i.style,a=t.u,o=i._gsap,s,l,u;if(a==="all"||a===!0)r.cssText="",l=1;else for(a=a.split(","),u=a.length;--u>-1;)s=a[u],Hc[s]&&(l=1,s=s==="transformOrigin"?il:Ea),Th(i,s);l&&(Th(i,Ea),o&&(o.svg&&i.removeAttribute("transform"),r.scale=r.rotate=r.translate="none",S9(i,1),o.uncache=1,Jj(r)))}},N5={clearProps:function(e,t,i,r,a){if(a.data!=="isFromStart"){var o=e._pt=new nl(e._pt,t,i,0,0,Tue);return o.u=r,o.pr=-10,o.tween=a,e._props.push(i),1}}},_9=[1,0,0,1,0,0],i$={},r$=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},XD=function(e){var t=Rl(e,Ea);return r$(t)?_9:t.substr(7).match(hj).map(Ha)},HM=function(e,t){var i=e._gsap||vp(e),r=e.style,a=XD(e),o,s,l,u;return i.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"?_9:a):(a===_9&&!e.offsetParent&&e!==j2&&!i.svg&&(l=r.display,r.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,s=e.nextElementSibling,j2.appendChild(e)),a=XD(e),l?r.display=l:Th(e,"display"),u&&(s?o.insertBefore(e,s):o?o.appendChild(e):j2.removeChild(e))),t&&a.length>6?[a[0],a[1],a[4],a[5],a[12],a[13]]:a)},jT=function(e,t,i,r,a,o){var s=e._gsap,l=a||HM(e,!0),u=s.xOrigin||0,c=s.yOrigin||0,d=s.xOffset||0,h=s.yOffset||0,f=l[0],p=l[1],m=l[2],v=l[3],g=l[4],_=l[5],S=t.split(" "),x=parseFloat(S[0])||0,A=parseFloat(S[1])||0,C,M,I,D;i?l!==_9&&(M=f*v-p*m)&&(I=x*(v/M)+A*(-m/M)+(m*_-v*g)/M,D=x*(-p/M)+A*(f/M)-(f*_-p*g)/M,x=I,A=D):(C=t$(e),x=C.x+(~S[0].indexOf("%")?x/100*C.width:x),A=C.y+(~(S[1]||S[0]).indexOf("%")?A/100*C.height:A)),r||r!==!1&&s.smooth?(g=x-u,_=A-c,s.xOffset=d+(g*f+_*m)-g,s.yOffset=h+(g*p+_*v)-_):s.xOffset=s.yOffset=0,s.xOrigin=x,s.yOrigin=A,s.smooth=!!r,s.origin=t,s.originIsAbsolute=!!i,e.style[il]="0px 0px",o&&(Qd(o,s,"xOrigin",u,x),Qd(o,s,"yOrigin",c,A),Qd(o,s,"xOffset",d,s.xOffset),Qd(o,s,"yOffset",h,s.yOffset)),e.setAttribute("data-svg-origin",x+" "+A)},S9=function(e,t){var i=e._gsap||new Uj(e);if("x"in i&&!t&&!i.uncache)return i;var r=e.style,a=i.scaleX<0,o="px",s="deg",l=getComputedStyle(e),u=Rl(e,il)||"0",c,d,h,f,p,m,v,g,_,S,x,A,C,M,I,D,E,P,F,V,G,W,Y,Q,K,ae,ie,he,Ee,He,xe,Fe;return c=d=h=m=v=g=_=S=x=0,f=p=1,i.svg=!!(e.getCTM&&n$(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(r[Ea]=(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[Ea]!=="none"?l[Ea]:"")),r.scale=r.rotate=r.translate="none"),M=HM(e,i.svg),i.svg&&(i.uncache?(K=e.getBBox(),u=i.xOrigin-K.x+"px "+(i.yOrigin-K.y)+"px",Q=""):Q=!t&&e.getAttribute("data-svg-origin"),jT(e,Q||u,!!Q||i.originIsAbsolute,i.smooth!==!1,M)),A=i.xOrigin||0,C=i.yOrigin||0,M!==_9&&(P=M[0],F=M[1],V=M[2],G=M[3],c=W=M[4],d=Y=M[5],M.length===6?(f=Math.sqrt(P*P+F*F),p=Math.sqrt(G*G+V*V),m=P||F?A1(F,P)*Gf:0,_=V||G?A1(V,G)*Gf+m:0,_&&(p*=Math.abs(Math.cos(_*$2))),i.svg&&(c-=A-(A*P+C*V),d-=C-(A*F+C*G))):(Fe=M[6],He=M[7],ie=M[8],he=M[9],Ee=M[10],xe=M[11],c=M[12],d=M[13],h=M[14],I=A1(Fe,Ee),v=I*Gf,I&&(D=Math.cos(-I),E=Math.sin(-I),Q=W*D+ie*E,K=Y*D+he*E,ae=Fe*D+Ee*E,ie=W*-E+ie*D,he=Y*-E+he*D,Ee=Fe*-E+Ee*D,xe=He*-E+xe*D,W=Q,Y=K,Fe=ae),I=A1(-V,Ee),g=I*Gf,I&&(D=Math.cos(-I),E=Math.sin(-I),Q=P*D-ie*E,K=F*D-he*E,ae=V*D-Ee*E,xe=G*E+xe*D,P=Q,F=K,V=ae),I=A1(F,P),m=I*Gf,I&&(D=Math.cos(I),E=Math.sin(I),Q=P*D+F*E,K=W*D+Y*E,F=F*D-P*E,Y=Y*D-W*E,P=Q,W=K),v&&Math.abs(v)+Math.abs(m)>359.9&&(v=m=0,g=180-g),f=Ha(Math.sqrt(P*P+F*F+V*V)),p=Ha(Math.sqrt(Y*Y+Fe*Fe)),I=A1(W,Y),_=Math.abs(I)>2e-4?I*Gf:0,x=xe?1/(xe<0?-xe:xe):0),i.svg&&(Q=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!r$(Rl(e,Ea)),Q&&e.setAttribute("transform",Q))),Math.abs(_)>90&&Math.abs(_)<270&&(a?(f*=-1,_+=m<=0?180:-180,m+=m<=0?180:-180):(p*=-1,_+=_<=0?180:-180)),t=t||i.uncache,i.x=c-((i.xPercent=c&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-c)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+o,i.y=d-((i.yPercent=d&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-d)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+o,i.z=h+o,i.scaleX=Ha(f),i.scaleY=Ha(p),i.rotation=Ha(m)+s,i.rotationX=Ha(v)+s,i.rotationY=Ha(g)+s,i.skewX=_+s,i.skewY=S+s,i.transformPerspective=x+o,(i.zOrigin=parseFloat(u.split(" ")[2])||!t&&i.zOrigin||0)&&(r[il]=k5(u)),i.xOffset=i.yOffset=0,i.force3D=Il.force3D,i.renderTransform=i.svg?Cue:e$?a$:Aue,i.uncache=0,i},k5=function(e){return(e=e.split(" "))[0]+" "+e[1]},KS=function(e,t,i){var r=ls(t);return Ha(parseFloat(t)+parseFloat(Ah(e,"x",i+"px",r)))+r},Aue=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,a$(e,t)},sf="0deg",Tm="0px",lf=") ",a$=function(e,t){var i=t||this,r=i.xPercent,a=i.yPercent,o=i.x,s=i.y,l=i.z,u=i.rotation,c=i.rotationY,d=i.rotationX,h=i.skewX,f=i.skewY,p=i.scaleX,m=i.scaleY,v=i.transformPerspective,g=i.force3D,_=i.target,S=i.zOrigin,x="",A=g==="auto"&&e&&e!==1||g===!0;if(S&&(d!==sf||c!==sf)){var C=parseFloat(c)*$2,M=Math.sin(C),I=Math.cos(C),D;C=parseFloat(d)*$2,D=Math.cos(C),o=KS(_,o,M*D*-S),s=KS(_,s,-Math.sin(C)*-S),l=KS(_,l,I*D*-S+S)}v!==Tm&&(x+="perspective("+v+lf),(r||a)&&(x+="translate("+r+"%, "+a+"%) "),(A||o!==Tm||s!==Tm||l!==Tm)&&(x+=l!==Tm||A?"translate3d("+o+", "+s+", "+l+") ":"translate("+o+", "+s+lf),u!==sf&&(x+="rotate("+u+lf),c!==sf&&(x+="rotateY("+c+lf),d!==sf&&(x+="rotateX("+d+lf),(h!==sf||f!==sf)&&(x+="skew("+h+", "+f+lf),(p!==1||m!==1)&&(x+="scale("+p+", "+m+lf),_.style[Ea]=x||"translate(0, 0)"},Cue=function(e,t){var i=t||this,r=i.xPercent,a=i.yPercent,o=i.x,s=i.y,l=i.rotation,u=i.skewX,c=i.skewY,d=i.scaleX,h=i.scaleY,f=i.target,p=i.xOrigin,m=i.yOrigin,v=i.xOffset,g=i.yOffset,_=i.forceCSS,S=parseFloat(o),x=parseFloat(s),A,C,M,I,D;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=$2,u*=$2,A=Math.cos(l)*d,C=Math.sin(l)*d,M=Math.sin(l-u)*-h,I=Math.cos(l-u)*h,u&&(c*=$2,D=Math.tan(u-c),D=Math.sqrt(1+D*D),M*=D,I*=D,c&&(D=Math.tan(c),D=Math.sqrt(1+D*D),A*=D,C*=D)),A=Ha(A),C=Ha(C),M=Ha(M),I=Ha(I)):(A=d,I=h,C=M=0),(S&&!~(o+"").indexOf("px")||x&&!~(s+"").indexOf("px"))&&(S=Ah(f,"x",o,"px"),x=Ah(f,"y",s,"px")),(p||m||v||g)&&(S=Ha(S+p-(p*A+m*M)+v),x=Ha(x+m-(p*C+m*I)+g)),(r||a)&&(D=f.getBBox(),S=Ha(S+r/100*D.width),x=Ha(x+a/100*D.height)),D="matrix("+A+","+C+","+M+","+I+","+S+","+x+")",f.setAttribute("transform",D),_&&(f.style[Ea]=D)},Mue=function(e,t,i,r,a){var o=360,s=Io(a),l=parseFloat(a)*(s&&~a.indexOf("rad")?Gf:1),u=l-r,c=r+u+"deg",d,h;return s&&(d=a.split("_")[1],d==="short"&&(u%=o,u!==u%(o/2)&&(u+=u<0?o:-o)),d==="cw"&&u<0?u=(u+o*VD)%o-~~(u/o)*o:d==="ccw"&&u>0&&(u=(u-o*VD)%o-~~(u/o)*o)),e._pt=h=new nl(e._pt,t,i,r,u,uue),h.e=c,h.u="deg",e._props.push(i),h},YD=function(e,t){for(var i in t)e[i]=t[i];return e},Eue=function(e,t,i){var r=YD({},i._gsap),a="perspective,force3D,transformOrigin,svgOrigin",o=i.style,s,l,u,c,d,h,f,p;r.svg?(u=i.getAttribute("transform"),i.setAttribute("transform",""),o[Ea]=t,s=S9(i,1),Th(i,Ea),i.setAttribute("transform",u)):(u=getComputedStyle(i)[Ea],o[Ea]=t,s=S9(i,1),o[Ea]=u);for(l in Hc)u=r[l],c=s[l],u!==c&&a.indexOf(l)<0&&(f=ls(u),p=ls(c),d=f!==p?Ah(i,l,u,p):parseFloat(u),h=parseFloat(c),e._pt=new nl(e._pt,s,l,d,h-d,VT),e._pt.u=p||0,e._props.push(l));YD(s,r)};tl("padding,margin,Width,Radius",function(n,e){var t="Top",i="Right",r="Bottom",a="Left",o=(e<3?[t,i,r,a]:[t+a,t+i,r+i,r+a]).map(function(s){return e<2?n+s:"border"+s+n});N5[e>1?"border"+n:n]=function(s,l,u,c,d){var h,f;if(arguments.length<4)return h=o.map(function(p){return Rc(s,p,u)}),f=h.join(" "),f.split(h[0]).length===5?h[0]:f;h=(c+"").split(" "),f={},o.forEach(function(p,m){return f[p]=h[m]=h[m]||h[(m-1)/2|0]}),s.init(l,f,d)}});var o$={name:"css",register:WT,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,r,a){var o=this._props,s=e.style,l=i.vars.startAt,u,c,d,h,f,p,m,v,g,_,S,x,A,C,M,I,D;GM||WT(),this.styles=this.styles||Qj(e),I=this.styles.props,this.tween=i;for(m in t)if(m!=="autoRound"&&(c=t[m],!(Tl[m]&&Vj(m,t,i,r,e,a)))){if(f=typeof c,p=N5[m],f==="function"&&(c=c.call(i,r,e,a),f=typeof c),f==="string"&&~c.indexOf("random(")&&(c=m9(c)),p)p(this,e,m,c,i)&&(M=1);else if(m.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(m)+"").trim(),c+="",ph.lastIndex=0,ph.test(u)||(v=ls(u),g=ls(c),g?v!==g&&(u=Ah(e,m,u,g)+g):v&&(c+=v)),this.add(s,"setProperty",u,c,r,a,0,0,m),o.push(m),I.push(m,0,s[m]);else if(f!=="undefined"){if(l&&m in l?(u=typeof l[m]=="function"?l[m].call(i,r,e,a):l[m],Io(u)&&~u.indexOf("random(")&&(u=m9(u)),ls(u+"")||u==="auto"||(u+=Il.units[m]||ls(Rc(e,m))||""),(u+"").charAt(1)==="="&&(u=Rc(e,m))):u=Rc(e,m),h=parseFloat(u),_=f==="string"&&c.charAt(1)==="="&&c.substr(0,2),_&&(c=c.substr(2)),d=parseFloat(c),m in Ou&&(m==="autoAlpha"&&(h===1&&Rc(e,"visibility")==="hidden"&&d&&(h=0),I.push("visibility",0,s.visibility),Qd(this,s,"visibility",h?"inherit":"hidden",d?"inherit":"hidden",!d)),m!=="scale"&&m!=="transform"&&(m=Ou[m],~m.indexOf(",")&&(m=m.split(",")[0]))),S=m in Hc,S){if(this.styles.save(m),D=c,f==="string"&&c.substring(0,6)==="var(--"){if(c=Rl(e,c.substring(4,c.indexOf(")"))),c.substring(0,5)==="calc("){var E=e.style.perspective;e.style.perspective=c,c=Rl(e,"perspective"),E?e.style.perspective=E:Th(e,"perspective")}d=parseFloat(c)}if(x||(A=e._gsap,A.renderTransform&&!t.parseTransform||S9(e,t.parseTransform),C=t.smoothOrigin!==!1&&A.smooth,x=this._pt=new nl(this._pt,s,Ea,0,1,A.renderTransform,A,0,-1),x.dep=1),m==="scale")this._pt=new nl(this._pt,A,"scaleY",A.scaleY,(_?W2(A.scaleY,_+d):d)-A.scaleY||0,VT),this._pt.u=0,o.push("scaleY",m),m+="X";else if(m==="transformOrigin"){I.push(il,0,s[il]),c=wue(c),A.svg?jT(e,c,0,C,0,this):(g=parseFloat(c.split(" ")[2])||0,g!==A.zOrigin&&Qd(this,A,"zOrigin",A.zOrigin,g),Qd(this,s,m,k5(u),k5(c)));continue}else if(m==="svgOrigin"){jT(e,c,1,C,0,this);continue}else if(m in i$){Mue(this,A,m,h,_?W2(h,_+c):c);continue}else if(m==="smoothOrigin"){Qd(this,A,"smooth",A.smooth,c);continue}else if(m==="force3D"){A[m]=c;continue}else if(m==="transform"){Eue(this,c,e);continue}}else m in s||(m=dv(m)||m);if(S||(d||d===0)&&(h||h===0)&&!lue.test(c)&&m in s)v=(u+"").substr((h+"").length),d||(d=0),g=ls(c)||(m in Il.units?Il.units[m]:v),v!==g&&(h=Ah(e,m,u,g)),this._pt=new nl(this._pt,S?A:s,m,h,(_?W2(h,_+d):d)-h,!S&&(g==="px"||m==="zIndex")&&t.autoRound!==!1?hue:VT),this._pt.u=g||0,S&&D!==c?(this._pt.b=u,this._pt.e=D,this._pt.r=due):v!==g&&g!=="%"&&(this._pt.b=u,this._pt.r=cue);else if(m in s)xue.call(this,e,m,u,_?_+c:c);else if(m in e)this.add(e,m,u||e[m],_?_+c:c,r,a);else if(m!=="parseTransform"){RM(m,c);continue}S||(m in s?I.push(m,0,s[m]):typeof e[m]=="function"?I.push(m,2,e[m]()):I.push(m,1,u||e[m])),o.push(m)}}M&&Xj(this)},render:function(e,t){if(t.tween._time||!UM())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:Rc,aliases:Ou,getSetter:function(e,t,i){var r=Ou[t];return r&&r.indexOf(",")<0&&(t=r),t in Hc&&t!==il&&(e._gsap.x||Rc(e,"x"))?i&&UD===i?t==="scale"?mue:vue:(UD=i||{})&&(t==="scale"?gue:yue):e.style&&!MM(e.style[t])?fue:~t.indexOf("-")?pue:BM(e,t)},core:{_removeProperty:Th,_getMatrix:HM}};ol.utils.checkPrefix=dv;ol.core.getStyleSaver=Qj;(function(n,e,t,i){var r=tl(n+","+e+","+t,function(a){Hc[a]=1});tl(e,function(a){Il.units[a]="deg",i$[a]=1}),Ou[r[13]]=n+","+e,tl(i,function(a){var o=a.split(":");Ou[o[1]]=r[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");tl("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(n){Il.units[n]="px"});ol.registerPlugin(o$);var ka=ol.registerPlugin(o$)||ol;ka.core.Tween;const Pue={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 n=1;return{maskId:"svgline-"+n,radialGradientId:"radialGradient-"+n}},mounted(){let n=this._.uid;this.maskId="svgline-"+n,this.radialGradientId="radialGradient-"+n}},Rue={class:"svg-line-animation"},Lue=["viewBox"],Iue=["id"],Due=["stop-opacity"],Nue=["stop-opacity"],kue=["id"],Fue=["r","fill"],Oue=["begin","dur","path","keyPoints"],Bue=["d","stroke","stroke-width","mask"];function zue(n,e,t,i,r,a){return Te(),Pe("div",Rue,[(Te(),Pe("svg",{width:"100%",height:"100%",viewBox:`0 0 ${t.width} ${t.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[O("defs",null,[O("radialGradient",{id:r.radialGradientId,cx:"50%",cy:"50%",fx:"100%",fy:"50%",r:"50%"},[O("stop",{offset:"0%","stop-color":"#fff","stop-opacity":t.dir[1]},null,8,Due),O("stop",{offset:"100%","stop-color":"#fff","stop-opacity":t.dir[0]},null,8,Nue)],8,Iue),O("mask",{id:r.maskId},[O("circle",{r:t.length,cx:"0",cy:"0",fill:`url(#${r.radialGradientId})`},[O("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,Oue)],8,Fue)],8,kue)]),O("path",{class:"path-line",d:t.path,stroke:t.color,"stroke-width":t.strokeWidth,mask:`url(#${r.maskId})`},null,8,Bue)],8,Lue))])}const F5=c_(Pue,[["render",zue]]);const Gue={class:"m-header"},Uue={class:"m-header-wrap"},Vue={class:"m-header-title"},Hue={class:"m-header-subtext"},Wue={class:"m-header-left",style:{color:"#fff"}},jue={class:"m-header-right"},$ue={class:"m-header-line"},que={__name:"index",props:{title:{type:String,default:"红原县数字畜牧业监管平台"},subText:{type:String,default:"Hongyuan Digital Animal Husbandry Supervision Platform"}},setup(n){return(e,t)=>(Te(),Pe("div",Gue,[O("div",Uue,[O("div",Vue,De(n.title),1),O("div",Hue,De(n.subText),1)]),O("div",Wue,[av(e.$slots,"left")]),O("div",jue,[av(e.$slots,"right")]),O("div",$ue,[gn(F5,{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"}),gn(F5,{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 Xue={class:"m-menu"},Yue={__name:"index",props:{defaultActive:{type:[String,Number],default:""}},emits:["select"],setup(n,{emit:e}){const t=e,i=n,r=Wt(i.defaultActive);return MD("updateActive",o=>{r.value=o,t("select",o)}),MD("activeIndex",r),qa(()=>i.defaultActive,o=>{o!==r.value&&(r.value=o)}),(o,s)=>(Te(),Pe("div",Xue,[av(o.$slots,"default")]))}},Kue={__name:"index",props:{index:{type:[String,Number],required:!0}},setup(n){const e=n,t=M2("updateActive"),i=M2("activeIndex"),r=()=>{t(e.index)};return(a,o)=>(Te(),Pe("div",{class:Xn(["m-menu-item",{"is-active":n.index===Tr(i)}]),onClick:r},[av(a.$slots,"default")],2))}};let KD=0;const ZD="webkit moz ms o".split(" ");let Mu,Eu;const Zue=typeof window=="undefined";if(Zue)Mu=function(){},Eu=function(){};else{Mu=window.requestAnimationFrame,Eu=window.cancelAnimationFrame;let n;for(let e=0;e<ZD.length&&!(Mu&&Eu);e++)n=ZD[e],Mu=Mu||window[n+"RequestAnimationFrame"],Eu=Eu||window[n+"CancelAnimationFrame"]||window[n+"CancelRequestAnimationFrame"];(!Mu||!Eu)&&(Mu=function(e){const t=new Date().getTime(),i=Math.max(0,16-(t-KD)),r=window.setTimeout(()=>{e(t+i)},i);return KD=t+i,r},Eu=function(e){window.clearTimeout(e)})}const Jue={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(n){return n>=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(n,e,t,i){return t*(-Math.pow(2,-10*n/i)+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=Mu(this.count)},pauseResume(){this.paused?(this.resume(),this.paused=!1):(this.pause(),this.paused=!0)},pause(){Eu(this.rAF)},resume(){this.startTime=null,this.localDuration=+this.remaining,this.localStartVal=+this.printVal,Mu(this.count)},reset(){this.startTime=null,Eu(this.rAF),this.displayValue=this.formatNumber(this.startVal)},count(n){this.startTime||(this.startTime=n),this.timestamp=n;const e=n-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=Mu(this.count):this.$emit("callback")},isNumber(n){return!isNaN(parseFloat(n))},formatNumber(n){n=n.toFixed(this.decimals),n+="";const e=n.split(".");let t=e[0];const i=e.length>1?this.decimal+e[1]:"",r=/(\d+)(\d{3})/;if(this.separator&&!this.isNumber(this.separator))for(;r.test(t);)t=t.replace(r,"$1"+this.separator+"$2");return this.prefix+t+i+this.suffix}},destroyed(){Eu(this.rAF)}};function Que(n,e,t,i,r,a){return Te(),Pe("span",null,De(r.displayValue),1)}const s$=c_(Jue,[["render",Que]]);typeof window!="undefined"&&window.Vue&&window.Vue.component("count-to",s$);const ece={class:"count-card-left"},tce={class:"count-card-title"},nce={class:"title-zh"},ice={key:0,class:"title-en"},rce={class:"count-card-right"},ace={class:"unit"},oce={__name:"index",props:{info:{type:Object,default:()=>({icon:"xiaoshoujine",zh:"2023年销售金额",en:"Sales amount in 2023",value:9500,unit:"万元",decimals:0})}},setup(n){const e=n,t=Wt(!0),i=Wt(!1),r=Wt(0);let a=null;const o=Ye(()=>e.info.duration||1800);qa(()=>[e.info.value,e.info.zh],()=>{a&&window.clearTimeout(a),t.value=!0,i.value=!1,r.value+=1},{immediate:!0});function s(c){return c.toUpperCase()}function l(){t.value=!0,i.value=!1}function u(){t.value=!1,i.value=!0,a&&window.clearTimeout(a),a=window.setTimeout(()=>{i.value=!1},900)}return Bl(()=>{a&&window.clearTimeout(a)}),(c,d)=>(Te(),Pe("div",{class:Xn(["count-card",{"is-counting":t.value,"is-settled":i.value}])},[O("div",ece,[O("div",{class:Xn(["count-card-icon","icon-"+n.info.icon])},null,2),O("div",tce,[O("div",nce,De(n.info.zh),1),n.info.en?(Te(),Pe("div",ice,De(s(n.info.en)),1)):Dn("",!0)])]),O("div",rce,[(Te(),Pe("div",{class:"value",key:r.value},[gn(Tr(s$),{startVal:0,endVal:n.info.value,decimals:n.info.decimals,duration:o.value,separator:"",autoplay:!0,onMountedCallback:l,onCallback:u},null,8,["endVal","decimals","duration"])])),O("div",ace,De(n.info.unit),1)])],2))}};/*! *****************************************************************************
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 $T=function(n,e){return $T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},$T(n,e)};function ot(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");$T(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var sce=function(){function n(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return n}(),lce=function(){function n(){this.browser=new sce,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 n}(),Gd=new lce;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Gd.wxa=!0,Gd.touchEventsSupported=!0):typeof document=="undefined"&&typeof self!="undefined"?Gd.worker=!0:!Gd.hasGlobalWindow||"Deno"in window?(Gd.node=!0,Gd.svgSupported=!0):uce(navigator.userAgent,Gd);function uce(n,e){var t=e.browser,i=n.match(/Firefox\/([\d.]+)/),r=n.match(/MSIE\s([\d.]+)/)||n.match(/Trident\/.+?rv:(([\d.]+))/),a=n.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(n);i&&(t.firefox=!0,t.version=i[1]),r&&(t.ie=!0,t.version=r[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 qi=Gd;var WM=12,l$="sans-serif",Ch=WM+"px "+l$,cce=20,dce=100,hce="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function fce(n){var e={};if(typeof JSON=="undefined")return e;for(var t=0;t<n.length;t++){var i=String.fromCharCode(t+32),r=(n.charCodeAt(t)-cce)/dce;e[i]=r}return e}var pce=fce(hce),Mh={createCanvas:function(){return typeof document!="undefined"&&document.createElement("canvas")},measureText:function(){var n,e;return function(t,i){if(!n){var r=Mh.createCanvas();n=r&&r.getContext("2d")}if(n)return e!==i&&(e=n.font=i||Ch),n.measureText(t);t=t||"",i=i||Ch;var a=/((?:\d+)?\.?\d*)px/.exec(i),o=a&&+a[1]||WM,s=0;if(i.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=pce[t[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(n,e,t){var i=new Image;return i.onload=e,i.onerror=t,i.src=n,i}},u$=Yu(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(n,e){return n["[object "+e+"]"]=!0,n},{}),c$=Yu(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(n,e){return n["[object "+e+"Array]"]=!0,n},{}),Fv=Object.prototype.toString,v_=Array.prototype,vce=v_.forEach,mce=v_.filter,jM=v_.slice,gce=v_.map,JD=function(){}.constructor,ky=JD?JD.prototype:null,$M="__proto__",yce=2311;function d$(){return yce++}function qM(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];typeof console!="undefined"&&console.error.apply(console,n)}function Zn(n){if(n==null||typeof n!="object")return n;var e=n,t=Fv.call(n);if(t==="[object Array]"){if(!zg(n)){e=[];for(var i=0,r=n.length;i<r;i++)e[i]=Zn(n[i])}}else if(c$[t]){if(!zg(n)){var a=n.constructor;if(a.from)e=a.from(n);else{e=new a(n.length);for(var i=0,r=n.length;i<r;i++)e[i]=n[i]}}}else if(!u$[t]&&!zg(n)&&!hv(n)){e={};for(var o in n)n.hasOwnProperty(o)&&o!==$M&&(e[o]=Zn(n[o]))}return e}function ui(n,e,t){if(!Kn(e)||!Kn(n))return t?Zn(e):n;for(var i in e)if(e.hasOwnProperty(i)&&i!==$M){var r=n[i],a=e[i];Kn(a)&&Kn(r)&&!$t(a)&&!$t(r)&&!hv(a)&&!hv(r)&&!QD(a)&&!QD(r)&&!zg(a)&&!zg(r)?ui(r,a,t):(t||!(i in n))&&(n[i]=Zn(e[i]))}return n}function XM(n,e){for(var t=n[0],i=1,r=n.length;i<r;i++)t=ui(t,n[i],e);return t}function It(n,e){if(Object.assign)Object.assign(n,e);else for(var t in e)e.hasOwnProperty(t)&&t!==$M&&(n[t]=e[t]);return n}function qn(n,e,t){for(var i=Li(e),r=0,a=i.length;r<a;r++){var o=i[r];(t?e[o]!=null:n[o]==null)&&(n[o]=e[o])}return n}function xi(n,e){if(n){if(n.indexOf)return n.indexOf(e);for(var t=0,i=n.length;t<i;t++)if(n[t]===e)return t}return-1}function _ce(n,e){var t=n.prototype;function i(){}i.prototype=e.prototype,n.prototype=new i;for(var r in t)t.hasOwnProperty(r)&&(n.prototype[r]=t[r]);n.prototype.constructor=n,n.superClass=e}function Za(n,e,t){if(n="prototype"in n?n.prototype:n,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),r=0;r<i.length;r++){var a=i[r];a!=="constructor"&&(t?e[a]!=null:n[a]==null)&&(n[a]=e[a])}else qn(n,e,t)}function ds(n){return!n||typeof n=="string"?!1:typeof n.length=="number"}function ne(n,e,t){if(n&&e)if(n.forEach&&n.forEach===vce)n.forEach(e,t);else if(n.length===+n.length)for(var i=0,r=n.length;i<r;i++)e.call(t,n[i],i,n);else for(var a in n)n.hasOwnProperty(a)&&e.call(t,n[a],a,n)}function Xt(n,e,t){if(!n)return[];if(!e)return YM(n);if(n.map&&n.map===gce)return n.map(e,t);for(var i=[],r=0,a=n.length;r<a;r++)i.push(e.call(t,n[r],r,n));return i}function Yu(n,e,t,i){if(n&&e){for(var r=0,a=n.length;r<a;r++)t=e.call(i,t,n[r],r,n);return t}}function dr(n,e,t){if(!n)return[];if(!e)return YM(n);if(n.filter&&n.filter===mce)return n.filter(e,t);for(var i=[],r=0,a=n.length;r<a;r++)e.call(t,n[r],r,n)&&i.push(n[r]);return i}function Sce(n,e,t){if(n&&e){for(var i=0,r=n.length;i<r;i++)if(e.call(t,n[i],i,n))return n[i]}}function Li(n){if(!n)return[];if(Object.keys)return Object.keys(n);var e=[];for(var t in n)n.hasOwnProperty(t)&&e.push(t);return e}function bce(n,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return function(){return n.apply(e,t.concat(jM.call(arguments)))}}var An=ky&&$n(ky.bind)?ky.call.bind(ky.bind):bce;function si(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return n.apply(this,e.concat(jM.call(arguments)))}}function $t(n){return Array.isArray?Array.isArray(n):Fv.call(n)==="[object Array]"}function $n(n){return typeof n=="function"}function xn(n){return typeof n=="string"}function qT(n){return Fv.call(n)==="[object String]"}function Yi(n){return typeof n=="number"}function Kn(n){var e=typeof n;return e==="function"||!!n&&e==="object"}function QD(n){return!!u$[Fv.call(n)]}function sl(n){return!!c$[Fv.call(n)]}function hv(n){return typeof n=="object"&&typeof n.nodeType=="number"&&typeof n.ownerDocument=="object"}function m_(n){return n.colorStops!=null}function xce(n){return n.image!=null}function wce(n){return Fv.call(n)==="[object RegExp]"}function b9(n){return n!==n}function Ro(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];for(var t=0,i=n.length;t<i;t++)if(n[t]!=null)return n[t]}function ai(n,e){return n!=null?n:e}function Hu(n,e,t){return n!=null?n:e!=null?e:t}function YM(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return jM.apply(n,e)}function KM(n){if(typeof n=="number")return[n,n,n,n];var e=n.length;return e===2?[n[0],n[1],n[0],n[1]]:e===3?[n[0],n[1],n[2],n[1]]:n}function Ls(n,e){if(!n)throw new Error(e)}function K0(n){return n==null?null:typeof n.trim=="function"?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var h$="__ec_primitive__";function O5(n){n[h$]=!0}function zg(n){return n[h$]}var Tce=function(){function n(){this.data={}}return n.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},n.prototype.has=function(e){return this.data.hasOwnProperty(e)},n.prototype.get=function(e){return this.data[e]},n.prototype.set=function(e,t){return this.data[e]=t,this},n.prototype.keys=function(){return Li(this.data)},n.prototype.forEach=function(e){var t=this.data;for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},n}(),f$=typeof Map=="function";function Ace(){return f$?new Map:new Tce}var Cce=function(){function n(e){var t=$t(e);this.data=Ace();var i=this;e instanceof n?e.each(r):e&&ne(e,r);function r(a,o){t?i.set(a,o):i.set(o,a)}}return n.prototype.hasKey=function(e){return this.data.has(e)},n.prototype.get=function(e){return this.data.get(e)},n.prototype.set=function(e,t){return this.data.set(e,t),t},n.prototype.each=function(e,t){this.data.forEach(function(i,r){e.call(t,i,r)})},n.prototype.keys=function(){var e=this.data.keys();return f$?Array.from(e):e},n.prototype.removeKey=function(e){this.data.delete(e)},n}();function In(n){return new Cce(n)}function x9(n,e){for(var t=new n.constructor(n.length+e.length),i=0;i<n.length;i++)t[i]=n[i];for(var r=n.length,i=0;i<e.length;i++)t[i+r]=e[i];return t}function g_(n,e){var t;if(Object.create)t=Object.create(n);else{var i=function(){};i.prototype=n,t=new i}return e&&It(t,e),t}function p$(n){var e=n.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function Mn(n,e){return n.hasOwnProperty(e)}function Ba(){}var q4=180/Math.PI;function Zp(n,e){return n==null&&(n=0),e==null&&(e=0),[n,e]}function Ts(n,e){return n[0]=e[0],n[1]=e[1],n}function Oc(n){return[n[0],n[1]]}function Mce(n,e,t){return n[0]=e,n[1]=t,n}function eN(n,e,t){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n}function XT(n,e,t,i){return n[0]=e[0]+t[0]*i,n[1]=e[1]+t[1]*i,n}function ip(n,e,t){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n}function YT(n){return Math.sqrt(Ece(n))}function Ece(n){return n[0]*n[0]+n[1]*n[1]}function X4(n,e,t){return n[0]=e[0]*t,n[1]=e[1]*t,n}function Ov(n,e){var t=YT(e);return t===0?(n[0]=0,n[1]=0):(n[0]=e[0]/t,n[1]=e[1]/t),n}function KT(n,e){return Math.sqrt((n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]))}var eh=KT;function Pce(n,e){return(n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1])}var _p=Pce;function Y4(n,e,t,i){return n[0]=e[0]+i*(t[0]-e[0]),n[1]=e[1]+i*(t[1]-e[1]),n}function Ho(n,e,t){var i=e[0],r=e[1];return n[0]=t[0]*i+t[2]*r+t[4],n[1]=t[1]*i+t[3]*r+t[5],n}function th(n,e,t){return n[0]=Math.min(e[0],t[0]),n[1]=Math.min(e[1],t[1]),n}function nh(n,e,t){return n[0]=Math.max(e[0],t[0]),n[1]=Math.max(e[1],t[1]),n}var C1=function(){function n(e,t){this.target=e,this.topTarget=t&&t.topTarget}return n}(),Rce=function(){function n(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return n.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 C1(t,e),"dragstart",e.event))},n.prototype._drag=function(e){var t=this._draggingTarget;if(t){var i=e.offsetX,r=e.offsetY,a=i-this._x,o=r-this._y;this._x=i,this._y=r,t.drift(a,o,e),this.handler.dispatchToElement(new C1(t,e),"drag",e.event);var s=this.handler.findHover(i,r,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new C1(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new C1(s,e),"dragenter",e.event))}},n.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new C1(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new C1(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},n}();const Lce=Rce;var Ice=function(){function n(e){e&&(this._$eventProcessor=e)}return n.prototype.on=function(e,t,i,r){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof t=="function"&&(r=i,i=t,t=null),!i||!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===i)return this;var l={h:i,query:t,ctx:r||this,callAtLast:i.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},n.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},n.prototype.off=function(e,t){var i=this._$handlers;if(!i)return this;if(!e)return this._$handlers={},this;if(t){if(i[e]){for(var r=[],a=0,o=i[e].length;a<o;a++)i[e][a].h!==t&&r.push(i[e][a]);i[e]=r}i[e]&&i[e].length===0&&delete i[e]}else delete i[e];return this},n.prototype.trigger=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(!this._$handlers)return this;var r=this._$handlers[e],a=this._$eventProcessor;if(r)for(var o=t.length,s=r.length,l=0;l<s;l++){var u=r[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},n.prototype.triggerWithContext=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(!this._$handlers)return this;var r=this._$handlers[e],a=this._$eventProcessor;if(r)for(var o=t.length,s=t[o-1],l=r.length,u=0;u<l;u++){var c=r[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},n}();const P0=Ice;var Dce=Math.log(2);function ZT(n,e,t,i,r,a){var o=i+"-"+r,s=n.length;if(a.hasOwnProperty(o))return a[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~r)/Dce);return n[t][l]}for(var u=i|1<<t,c=t+1;i&1<<c;)c++;for(var d=0,h=0,f=0;h<s;h++){var p=1<<h;p&r||(d+=(f%2?-1:1)*n[t][h]*ZT(n,e-1,c,u,r|p,a),f++)}return a[o]=d,d}function tN(n,e){var t=[[n[0],n[1],1,0,0,0,-e[0]*n[0],-e[0]*n[1]],[0,0,0,n[0],n[1],1,-e[1]*n[0],-e[1]*n[1]],[n[2],n[3],1,0,0,0,-e[2]*n[2],-e[2]*n[3]],[0,0,0,n[2],n[3],1,-e[3]*n[2],-e[3]*n[3]],[n[4],n[5],1,0,0,0,-e[4]*n[4],-e[4]*n[5]],[0,0,0,n[4],n[5],1,-e[5]*n[4],-e[5]*n[5]],[n[6],n[7],1,0,0,0,-e[6]*n[6],-e[6]*n[7]],[0,0,0,n[6],n[7],1,-e[7]*n[6],-e[7]*n[7]]],i={},r=ZT(t,8,0,0,0,i);if(r!==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)*ZT(t,7,o===0?1:0,1<<o,1<<s,i)/r*e[o];return function(l,u,c){var d=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/d,l[1]=(u*a[3]+c*a[4]+a[5])/d}}}var nN="___zrEVENTSAVED",ZS=[];function Nce(n,e,t,i,r){return JT(ZS,e,i,r,!0)&&JT(n,t,ZS[0],ZS[1])}function JT(n,e,t,i,r){if(e.getBoundingClientRect&&qi.domSupported&&!v$(e)){var a=e[nN]||(e[nN]={}),o=kce(e,a),s=Fce(o,a,r);if(s)return s(n,t,i),!0}return!1}function kce(n,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var i=["left","right"],r=["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",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),n.appendChild(o),t.push(o)}return t}function Fce(n,e,t){for(var i=t?"invTrans":"trans",r=e[i],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=n[u].getBoundingClientRect(),d=2*u,h=c.left,f=c.top;o.push(h,f),l=l&&a&&h===a[d]&&f===a[d+1],s.push(n[u].offsetLeft,n[u].offsetTop)}return l&&r?r:(e.srcCoords=o,e[i]=t?tN(s,o):tN(o,s))}function v$(n){return n.nodeName.toUpperCase()==="CANVAS"}var Oce=/([&<>"'])/g,Bce={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function os(n){return n==null?"":(n+"").replace(Oce,function(e,t){return Bce[t]})}var zce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,JS=[],Gce=qi.browser.firefox&&+qi.browser.version.split(".")[0]<39;function QT(n,e,t,i){return t=t||{},i?iN(n,e,t):Gce&&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):iN(n,e,t),t}function iN(n,e,t){if(qi.domSupported&&n.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(v$(n)){var a=n.getBoundingClientRect();t.zrX=i-a.left,t.zrY=r-a.top;return}else if(JT(JS,n,i,r)){t.zrX=JS[0],t.zrY=JS[1];return}}t.zrX=t.zrY=0}function ZM(n){return n||window.event}function o0(n,e,t){if(e=ZM(e),e.zrX!=null)return e;var i=e.type,r=i&&i.indexOf("touch")>=0;if(r){var o=i!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&QT(n,o,e,t)}else{QT(n,e,e,t);var a=Uce(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&zce.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function Uce(n){var e=n.wheelDelta;if(e)return e;var t=n.deltaX,i=n.deltaY;if(t==null||i==null)return e;var r=Math.abs(i!==0?i:t),a=i>0?-1:i<0?1:t>0?-1:1;return 3*r*a}function eA(n,e,t,i){n.addEventListener(e,t,i)}function Vce(n,e,t,i){n.removeEventListener(e,t,i)}var Wc=function(n){n.preventDefault(),n.stopPropagation(),n.cancelBubble=!0};function rN(n){return n.which===2||n.which===3}var Hce=function(){function n(){this._track=[]}return n.prototype.recognize=function(e,t,i){return this._doTrack(e,t,i),this._recognize(e)},n.prototype.clear=function(){return this._track.length=0,this},n.prototype._doTrack=function(e,t,i){var r=e.touches;if(r){for(var a={points:[],touches:[],target:t,event:e},o=0,s=r.length;o<s;o++){var l=r[o],u=QT(i,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},n.prototype._recognize=function(e){for(var t in QS)if(QS.hasOwnProperty(t)){var i=QS[t](this._track,e);if(i)return i}},n}();function aN(n){var e=n[1][0]-n[0][0],t=n[1][1]-n[0][1];return Math.sqrt(e*e+t*t)}function Wce(n){return[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]}var QS={pinch:function(n,e){var t=n.length;if(t){var i=(n[t-1]||{}).points,r=(n[t-2]||{}).points||i;if(r&&r.length>1&&i&&i.length>1){var a=aN(i)/aN(r);!isFinite(a)&&(a=1),e.pinchScale=a;var o=Wce(i);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:n[0].target,event:e}}}}};function Dl(){return[1,0,0,1,0,0]}function y_(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=1,n[4]=0,n[5]=0,n}function JM(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n}function Bc(n,e,t){var i=e[0]*t[0]+e[2]*t[1],r=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 n[0]=i,n[1]=r,n[2]=a,n[3]=o,n[4]=s,n[5]=l,n}function Ku(n,e,t){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4]+t[0],n[5]=e[5]+t[1],n}function Jp(n,e,t,i){i===void 0&&(i=[0,0]);var r=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(t),d=Math.cos(t);return n[0]=r*d+s*c,n[1]=-r*c+s*d,n[2]=a*d+l*c,n[3]=-a*c+d*l,n[4]=d*(o-i[0])+c*(u-i[1])+i[0],n[5]=d*(u-i[1])-c*(o-i[0])+i[1],n}function QM(n,e,t){var i=t[0],r=t[1];return n[0]=e[0]*i,n[1]=e[1]*r,n[2]=e[2]*i,n[3]=e[3]*r,n[4]=e[4]*i,n[5]=e[5]*r,n}function Bv(n,e){var t=e[0],i=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=t*o-a*i;return l?(l=1/l,n[0]=o*l,n[1]=-a*l,n[2]=-i*l,n[3]=t*l,n[4]=(i*s-o*r)*l,n[5]=(a*r-t*s)*l,n):null}function jce(n){var e=Dl();return JM(e,n),e}var $ce=function(){function n(e,t){this.x=e||0,this.y=t||0}return n.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},n.prototype.clone=function(){return new n(this.x,this.y)},n.prototype.set=function(e,t){return this.x=e,this.y=t,this},n.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},n.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},n.prototype.scale=function(e){this.x*=e,this.y*=e},n.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},n.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},n.prototype.dot=function(e){return this.x*e.x+this.y*e.y},n.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},n.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},n.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},n.prototype.distance=function(e){var t=this.x-e.x,i=this.y-e.y;return Math.sqrt(t*t+i*i)},n.prototype.distanceSquare=function(e){var t=this.x-e.x,i=this.y-e.y;return t*t+i*i},n.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},n.prototype.transform=function(e){if(e){var t=this.x,i=this.y;return this.x=e[0]*t+e[2]*i+e[4],this.y=e[1]*t+e[3]*i+e[5],this}},n.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},n.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},n.set=function(e,t,i){e.x=t,e.y=i},n.copy=function(e,t){e.x=t.x,e.y=t.y},n.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},n.lenSquare=function(e){return e.x*e.x+e.y*e.y},n.dot=function(e,t){return e.x*t.x+e.y*t.y},n.add=function(e,t,i){e.x=t.x+i.x,e.y=t.y+i.y},n.sub=function(e,t,i){e.x=t.x-i.x,e.y=t.y-i.y},n.scale=function(e,t,i){e.x=t.x*i,e.y=t.y*i},n.scaleAndAdd=function(e,t,i,r){e.x=t.x+i.x*r,e.y=t.y+i.y*r},n.lerp=function(e,t,i,r){var a=1-r;e.x=a*t.x+r*i.x,e.y=a*t.y+r*i.y},n}();const fi=$ce;var Fy=Math.min,Oy=Math.max,uf=new fi,cf=new fi,df=new fi,hf=new fi,Am=new fi,Cm=new fi,qce=function(){function n(e,t,i,r){i<0&&(e=e+i,i=-i),r<0&&(t=t+r,r=-r),this.x=e,this.y=t,this.width=i,this.height=r}return n.prototype.union=function(e){var t=Fy(e.x,this.x),i=Fy(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Oy(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Oy(e.y+e.height,this.y+this.height)-i:this.height=e.height,this.x=t,this.y=i},n.prototype.applyTransform=function(e){n.applyTransform(this,this,e)},n.prototype.calculateTransform=function(e){var t=this,i=e.width/t.width,r=e.height/t.height,a=Dl();return Ku(a,a,[-t.x,-t.y]),QM(a,a,[i,r]),Ku(a,a,[e.x,e.y]),a},n.prototype.intersect=function(e,t){if(!e)return!1;e instanceof n||(e=n.create(e));var i=this,r=i.x,a=i.x+i.width,o=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,c=e.y,d=e.y+e.height,h=!(a<l||u<r||s<c||d<o);if(t){var f=1/0,p=0,m=Math.abs(a-l),v=Math.abs(u-r),g=Math.abs(s-c),_=Math.abs(d-o),S=Math.min(m,v),x=Math.min(g,_);a<l||u<r?S>p&&(p=S,m<v?fi.set(Cm,-m,0):fi.set(Cm,v,0)):S<f&&(f=S,m<v?fi.set(Am,m,0):fi.set(Am,-v,0)),s<c||d<o?x>p&&(p=x,g<_?fi.set(Cm,0,-g):fi.set(Cm,0,_)):S<f&&(f=S,g<_?fi.set(Am,0,g):fi.set(Am,0,-_))}return t&&fi.copy(t,h?Am:Cm),h},n.prototype.contain=function(e,t){var i=this;return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height},n.prototype.clone=function(){return new n(this.x,this.y,this.width,this.height)},n.prototype.copy=function(e){n.copy(this,e)},n.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},n.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},n.prototype.isZero=function(){return this.width===0||this.height===0},n.create=function(e){return new n(e.x,e.y,e.width,e.height)},n.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},n.applyTransform=function(e,t,i){if(!i){e!==t&&n.copy(e,t);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],a=i[3],o=i[4],s=i[5];e.x=t.x*r+o,e.y=t.y*a+s,e.width=t.width*r,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}uf.x=df.x=t.x,uf.y=hf.y=t.y,cf.x=hf.x=t.x+t.width,cf.y=df.y=t.y+t.height,uf.transform(i),hf.transform(i),cf.transform(i),df.transform(i),e.x=Fy(uf.x,cf.x,df.x,hf.x),e.y=Fy(uf.y,cf.y,df.y,hf.y);var l=Oy(uf.x,cf.x,df.x,hf.x),u=Oy(uf.y,cf.y,df.y,hf.y);e.width=l-e.x,e.height=u-e.y},n}();const gi=qce;var m$="silent";function Xce(n,e,t){return{type:n,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:Yce}}function Yce(){Wc(this.event)}var Kce=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(P0),Mm=function(){function n(e,t){this.x=e,this.y=t}return n}(),Zce=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],eb=new gi(0,0,0,0),g$=function(n){ot(e,n);function e(t,i,r,a,o){var s=n.call(this)||this;return s._hovered=new Mm(0,0),s.storage=t,s.painter=i,s.painterRoot=a,s._pointerSize=o,r=r||new Kce,s.proxy=null,s.setHandlerProxy(r),s._draggingMgr=new Lce(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(ne(Zce,function(i){t.on&&t.on(i,this[i],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var i=t.zrX,r=t.zrY,a=y$(this,i,r),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 Mm(i,r):this.findHover(i,r),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 i=t.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Mm(0,0)},e.prototype.dispatch=function(t,i){var r=this[t];r&&r.call(this,i)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var i=this.proxy;i.setCursor&&i.setCursor(t)},e.prototype.dispatchToElement=function(t,i,r){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var o="on"+i,s=Xce(i,t,r);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(i,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(i,s)}))}},e.prototype.findHover=function(t,i,r){var a=this.storage.getDisplayList(),o=new Mm(t,i);if(oN(a,o,t,i,r),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new gi(t-u,i-u,l,l),d=a.length-1;d>=0;d--){var h=a[d];h!==r&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(eb.copy(h.getBoundingRect()),h.transform&&eb.applyTransform(h.transform),eb.intersect(c)&&s.push(h))}if(s.length)for(var f=4,p=Math.PI/12,m=Math.PI*2,v=0;v<u;v+=f)for(var g=0;g<m;g+=p){var _=t+v*Math.cos(g),S=i+v*Math.sin(g);if(oN(s,o,_,S,r),o.target)return o}}return o},e.prototype.processGesture=function(t,i){this._gestureMgr||(this._gestureMgr=new Hce);var r=this._gestureMgr;i==="start"&&r.clear();var a=r.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(i==="end"&&r.clear(),a){var o=a.type;t.gestureEvent=o;var s=new Mm;s.target=a.target,this.dispatchToElement(s,o,a.event)}},e}(P0);ne(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(n){g$.prototype[n]=function(e){var t=e.zrX,i=e.zrY,r=y$(this,t,i),a,o;if((n!=="mouseup"||!r)&&(a=this.findHover(t,i),o=a.target),n==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(n==="mouseup")this._upEl=o;else if(n==="click"){if(this._downEl!==this._upEl||!this._downPoint||eh(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,n,e)}});function Jce(n,e,t){if(n[n.rectHover?"rectContain":"contain"](e,t)){for(var i=n,r=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(e,t))return!1}i.silent&&(r=!0);var s=i.__hostTarget;i=s||i.parent}return r?m$:!0}return!1}function oN(n,e,t,i,r){for(var a=n.length-1;a>=0;a--){var o=n[a],s=void 0;if(o!==r&&!o.ignore&&(s=Jce(o,t,i))&&(!e.topTarget&&(e.topTarget=o),s!==m$)){e.target=o;break}}}function y$(n,e,t){var i=n.painter;return e<0||e>i.getWidth()||t<0||t>i.getHeight()}const Qce=g$;var _$=32,Em=7;function ede(n){for(var e=0;n>=_$;)e|=n&1,n>>=1;return n+e}function sN(n,e,t,i){var r=e+1;if(r===t)return 1;if(i(n[r++],n[e])<0){for(;r<t&&i(n[r],n[r-1])<0;)r++;tde(n,e,r)}else for(;r<t&&i(n[r],n[r-1])>=0;)r++;return r-e}function tde(n,e,t){for(t--;e<t;){var i=n[e];n[e++]=n[t],n[t--]=i}}function lN(n,e,t,i,r){for(i===e&&i++;i<t;i++){for(var a=n[i],o=e,s=i,l;o<s;)l=o+s>>>1,r(a,n[l])<0?s=l:o=l+1;var u=i-o;switch(u){case 3:n[o+3]=n[o+2];case 2:n[o+2]=n[o+1];case 1:n[o+1]=n[o];break;default:for(;u>0;)n[o+u]=n[o+u-1],u--}n[o]=a}}function tb(n,e,t,i,r,a){var o=0,s=0,l=1;if(a(n,e[t+r])>0){for(s=i-r;l<s&&a(n,e[t+r+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;l<s&&a(n,e[t+r-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}for(o++;o<l;){var c=o+(l-o>>>1);a(n,e[t+c])>0?o=c+1:l=c}return l}function nb(n,e,t,i,r,a){var o=0,s=0,l=1;if(a(n,e[t+r])<0){for(s=r+1;l<s&&a(n,e[t+r-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}else{for(s=i-r;l<s&&a(n,e[t+r+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;o<l;){var c=o+(l-o>>>1);a(n,e[t+c])<0?l=c:o=c+1}return l}function nde(n,e){var t=Em,i,r,a=0,o=[];i=[],r=[];function s(f,p){i[a]=f,r[a]=p,a+=1}function l(){for(;a>1;){var f=a-2;if(f>=1&&r[f-1]<=r[f]+r[f+1]||f>=2&&r[f-2]<=r[f]+r[f-1])r[f-1]<r[f+1]&&f--;else if(r[f]>r[f+1])break;c(f)}}function u(){for(;a>1;){var f=a-2;f>0&&r[f-1]<r[f+1]&&f--,c(f)}}function c(f){var p=i[f],m=r[f],v=i[f+1],g=r[f+1];r[f]=m+g,f===a-3&&(i[f+1]=i[f+2],r[f+1]=r[f+2]),a--;var _=nb(n[v],n,p,m,0,e);p+=_,m-=_,m!==0&&(g=tb(n[p+m-1],n,v,g,g-1,e),g!==0&&(m<=g?d(p,m,v,g):h(p,m,v,g)))}function d(f,p,m,v){var g=0;for(g=0;g<p;g++)o[g]=n[f+g];var _=0,S=m,x=f;if(n[x++]=n[S++],--v===0){for(g=0;g<p;g++)n[x+g]=o[_+g];return}if(p===1){for(g=0;g<v;g++)n[x+g]=n[S+g];n[x+v]=o[_];return}for(var A=t,C,M,I;;){C=0,M=0,I=!1;do if(e(n[S],o[_])<0){if(n[x++]=n[S++],M++,C=0,--v===0){I=!0;break}}else if(n[x++]=o[_++],C++,M=0,--p===1){I=!0;break}while((C|M)<A);if(I)break;do{if(C=nb(n[S],o,_,p,0,e),C!==0){for(g=0;g<C;g++)n[x+g]=o[_+g];if(x+=C,_+=C,p-=C,p<=1){I=!0;break}}if(n[x++]=n[S++],--v===0){I=!0;break}if(M=tb(o[_],n,S,v,0,e),M!==0){for(g=0;g<M;g++)n[x+g]=n[S+g];if(x+=M,S+=M,v-=M,v===0){I=!0;break}}if(n[x++]=o[_++],--p===1){I=!0;break}A--}while(C>=Em||M>=Em);if(I)break;A<0&&(A=0),A+=2}if(t=A,t<1&&(t=1),p===1){for(g=0;g<v;g++)n[x+g]=n[S+g];n[x+v]=o[_]}else{if(p===0)throw new Error;for(g=0;g<p;g++)n[x+g]=o[_+g]}}function h(f,p,m,v){var g=0;for(g=0;g<v;g++)o[g]=n[m+g];var _=f+p-1,S=v-1,x=m+v-1,A=0,C=0;if(n[x--]=n[_--],--p===0){for(A=x-(v-1),g=0;g<v;g++)n[A+g]=o[g];return}if(v===1){for(x-=p,_-=p,C=x+1,A=_+1,g=p-1;g>=0;g--)n[C+g]=n[A+g];n[x]=o[S];return}for(var M=t;;){var I=0,D=0,E=!1;do if(e(o[S],n[_])<0){if(n[x--]=n[_--],I++,D=0,--p===0){E=!0;break}}else if(n[x--]=o[S--],D++,I=0,--v===1){E=!0;break}while((I|D)<M);if(E)break;do{if(I=p-nb(o[S],n,f,p,p-1,e),I!==0){for(x-=I,_-=I,p-=I,C=x+1,A=_+1,g=I-1;g>=0;g--)n[C+g]=n[A+g];if(p===0){E=!0;break}}if(n[x--]=o[S--],--v===1){E=!0;break}if(D=v-tb(n[_],o,0,v,v-1,e),D!==0){for(x-=D,S-=D,v-=D,C=x+1,A=S+1,g=0;g<D;g++)n[C+g]=o[A+g];if(v<=1){E=!0;break}}if(n[x--]=n[_--],--p===0){E=!0;break}M--}while(I>=Em||D>=Em);if(E)break;M<0&&(M=0),M+=2}if(t=M,t<1&&(t=1),v===1){for(x-=p,_-=p,C=x+1,A=_+1,g=p-1;g>=0;g--)n[C+g]=n[A+g];n[x]=o[S]}else{if(v===0)throw new Error;for(A=x-(v-1),g=0;g<v;g++)n[A+g]=o[g]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function K4(n,e,t,i){t||(t=0),i||(i=n.length);var r=i-t;if(!(r<2)){var a=0;if(r<_$){a=sN(n,t,i,e),lN(n,t,i,t+a,e);return}var o=nde(n,e),s=ede(r);do{if(a=sN(n,t,i,e),a<s){var l=r;l>s&&(l=s),lN(n,t,t+l,t+a,e),a=l}o.pushRun(t,a),o.mergeRuns(),r-=a,t+=a}while(r!==0);o.forceMergeRuns()}}var El=1,yg=2,y2=4,uN=!1;function ib(){uN||(uN=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function cN(n,e){return n.zlevel===e.zlevel?n.z===e.z?n.z2-e.z2:n.z-e.z:n.zlevel-e.zlevel}var ide=function(){function n(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=cN}return n.prototype.traverse=function(e,t){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(e,t)},n.prototype.getDisplayList=function(e,t){t=t||!1;var i=this._displayList;return(e||!i.length)&&this.updateDisplayList(t),i},n.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,i=this._displayList,r=0,a=t.length;r<a;r++)this._updateAndAddDisplayable(t[r],null,e);i.length=this._displayListLen,K4(i,cN)},n.prototype._updateAndAddDisplayable=function(e,t,i){if(!(e.ignore&&!i)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t?t=t.slice():t=[];for(var a=r,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|=El),this._updateAndAddDisplayable(u,t,i)}e.__dirty=0}else{var c=e;t&&t.length?c.__clipPaths=t:c.__clipPaths&&c.__clipPaths.length>0&&(c.__clipPaths=[]),isNaN(c.z)&&(ib(),c.z=0),isNaN(c.z2)&&(ib(),c.z2=0),isNaN(c.zlevel)&&(ib(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var d=e.getDecalElement&&e.getDecalElement();d&&this._updateAndAddDisplayable(d,t,i);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,t,i);var f=e.getTextContent();f&&this._updateAndAddDisplayable(f,t,i)}},n.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},n.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,i=e.length;t<i;t++)this.delRoot(e[t]);return}var r=xi(this._roots,e);r>=0&&this._roots.splice(r,1)},n.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},n.prototype.getRoots=function(){return this._roots},n.prototype.dispose=function(){this._displayList=null,this._roots=null},n}();const rde=ide;var S$;S$=qi.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(n){return setTimeout(n,16)};const tA=S$;var Z4={linear:function(n){return n},quadraticIn:function(n){return n*n},quadraticOut:function(n){return n*(2-n)},quadraticInOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)},cubicIn:function(n){return n*n*n},cubicOut:function(n){return--n*n*n+1},cubicInOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)},quarticIn:function(n){return n*n*n*n},quarticOut:function(n){return 1- --n*n*n*n},quarticInOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)},quinticIn:function(n){return n*n*n*n*n},quinticOut:function(n){return--n*n*n*n*n+1},quinticInOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)},sinusoidalIn:function(n){return 1-Math.cos(n*Math.PI/2)},sinusoidalOut:function(n){return Math.sin(n*Math.PI/2)},sinusoidalInOut:function(n){return .5*(1-Math.cos(Math.PI*n))},exponentialIn:function(n){return n===0?0:Math.pow(1024,n-1)},exponentialOut:function(n){return n===1?1:1-Math.pow(2,-10*n)},exponentialInOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)},circularIn:function(n){return 1-Math.sqrt(1-n*n)},circularOut:function(n){return Math.sqrt(1- --n*n)},circularInOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)},elasticIn:function(n){var e,t=.1,i=.4;return n===0?0:n===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(n-=1))*Math.sin((n-e)*(2*Math.PI)/i)))},elasticOut:function(n){var e,t=.1,i=.4;return n===0?0:n===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*n)*Math.sin((n-e)*(2*Math.PI)/i)+1)},elasticInOut:function(n){var e,t=.1,i=.4;return n===0?0:n===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),(n*=2)<1?-.5*(t*Math.pow(2,10*(n-=1))*Math.sin((n-e)*(2*Math.PI)/i)):t*Math.pow(2,-10*(n-=1))*Math.sin((n-e)*(2*Math.PI)/i)*.5+1)},backIn:function(n){var e=1.70158;return n*n*((e+1)*n-e)},backOut:function(n){var e=1.70158;return--n*n*((e+1)*n+e)+1},backInOut:function(n){var e=2.5949095;return(n*=2)<1?.5*(n*n*((e+1)*n-e)):.5*((n-=2)*n*((e+1)*n+e)+2)},bounceIn:function(n){return 1-Z4.bounceOut(1-n)},bounceOut:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},bounceInOut:function(n){return n<.5?Z4.bounceIn(n*2)*.5:Z4.bounceOut(n*2-1)*.5+.5}};const b$=Z4;var By=Math.pow,vh=Math.sqrt,B5=1e-8,x$=1e-4,dN=vh(3),zy=1/3,Iu=Zp(),h0=Zp(),q2=Zp();function ih(n){return n>-B5&&n<B5}function w$(n){return n>B5||n<-B5}function vo(n,e,t,i,r){var a=1-r;return a*a*(a*n+3*r*e)+r*r*(r*i+3*a*t)}function hN(n,e,t,i,r){var a=1-r;return 3*(((e-n)*a+2*(t-e)*r)*a+(i-t)*r*r)}function z5(n,e,t,i,r,a){var o=i+3*(e-t)-n,s=3*(t-e*2+n),l=3*(e-n),u=n-r,c=s*s-3*o*l,d=s*l-9*o*u,h=l*l-3*s*u,f=0;if(ih(c)&&ih(d))if(ih(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[f++]=p)}else{var m=d*d-4*c*h;if(ih(m)){var v=d/c,p=-s/o+v,g=-v/2;p>=0&&p<=1&&(a[f++]=p),g>=0&&g<=1&&(a[f++]=g)}else if(m>0){var _=vh(m),S=c*s+1.5*o*(-d+_),x=c*s+1.5*o*(-d-_);S<0?S=-By(-S,zy):S=By(S,zy),x<0?x=-By(-x,zy):x=By(x,zy);var p=(-s-(S+x))/(3*o);p>=0&&p<=1&&(a[f++]=p)}else{var A=(2*c*s-3*o*d)/(2*vh(c*c*c)),C=Math.acos(A)/3,M=vh(c),I=Math.cos(C),p=(-s-2*M*I)/(3*o),g=(-s+M*(I+dN*Math.sin(C)))/(3*o),D=(-s+M*(I-dN*Math.sin(C)))/(3*o);p>=0&&p<=1&&(a[f++]=p),g>=0&&g<=1&&(a[f++]=g),D>=0&&D<=1&&(a[f++]=D)}}return f}function T$(n,e,t,i,r){var a=6*t-12*e+6*n,o=9*e+3*i-3*n-9*t,s=3*e-3*n,l=0;if(ih(o)){if(w$(a)){var u=-s/a;u>=0&&u<=1&&(r[l++]=u)}}else{var c=a*a-4*o*s;if(ih(c))r[0]=-a/(2*o);else if(c>0){var d=vh(c),u=(-a+d)/(2*o),h=(-a-d)/(2*o);u>=0&&u<=1&&(r[l++]=u),h>=0&&h<=1&&(r[l++]=h)}}return l}function Eh(n,e,t,i,r,a){var o=(e-n)*r+n,s=(t-e)*r+e,l=(i-t)*r+t,u=(s-o)*r+o,c=(l-s)*r+s,d=(c-u)*r+u;a[0]=n,a[1]=o,a[2]=u,a[3]=d,a[4]=d,a[5]=c,a[6]=l,a[7]=i}function A$(n,e,t,i,r,a,o,s,l,u,c){var d,h=.005,f=1/0,p,m,v,g;Iu[0]=l,Iu[1]=u;for(var _=0;_<1;_+=.05)h0[0]=vo(n,t,r,o,_),h0[1]=vo(e,i,a,s,_),v=_p(Iu,h0),v<f&&(d=_,f=v);f=1/0;for(var S=0;S<32&&!(h<x$);S++)p=d-h,m=d+h,h0[0]=vo(n,t,r,o,p),h0[1]=vo(e,i,a,s,p),v=_p(h0,Iu),p>=0&&v<f?(d=p,f=v):(q2[0]=vo(n,t,r,o,m),q2[1]=vo(e,i,a,s,m),g=_p(q2,Iu),m<=1&&g<f?(d=m,f=g):h*=.5);return c&&(c[0]=vo(n,t,r,o,d),c[1]=vo(e,i,a,s,d)),vh(f)}function ade(n,e,t,i,r,a,o,s,l){for(var u=n,c=e,d=0,h=1/l,f=1;f<=l;f++){var p=f*h,m=vo(n,t,r,o,p),v=vo(e,i,a,s,p),g=m-u,_=v-c;d+=Math.sqrt(g*g+_*_),u=m,c=v}return d}function Po(n,e,t,i){var r=1-i;return r*(r*n+2*i*e)+i*i*t}function nA(n,e,t,i){return 2*((1-i)*(e-n)+i*(t-e))}function ode(n,e,t,i,r){var a=n-2*e+t,o=2*(e-n),s=n-i,l=0;if(ih(a)){if(w$(o)){var u=-s/o;u>=0&&u<=1&&(r[l++]=u)}}else{var c=o*o-4*a*s;if(ih(c)){var u=-o/(2*a);u>=0&&u<=1&&(r[l++]=u)}else if(c>0){var d=vh(c),u=(-o+d)/(2*a),h=(-o-d)/(2*a);u>=0&&u<=1&&(r[l++]=u),h>=0&&h<=1&&(r[l++]=h)}}return l}function C$(n,e,t){var i=n+t-2*e;return i===0?.5:(n-e)/i}function w9(n,e,t,i,r){var a=(e-n)*i+n,o=(t-e)*i+e,s=(o-a)*i+a;r[0]=n,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=t}function M$(n,e,t,i,r,a,o,s,l){var u,c=.005,d=1/0;Iu[0]=o,Iu[1]=s;for(var h=0;h<1;h+=.05){h0[0]=Po(n,t,r,h),h0[1]=Po(e,i,a,h);var f=_p(Iu,h0);f<d&&(u=h,d=f)}d=1/0;for(var p=0;p<32&&!(c<x$);p++){var m=u-c,v=u+c;h0[0]=Po(n,t,r,m),h0[1]=Po(e,i,a,m);var f=_p(h0,Iu);if(m>=0&&f<d)u=m,d=f;else{q2[0]=Po(n,t,r,v),q2[1]=Po(e,i,a,v);var g=_p(q2,Iu);v<=1&&g<d?(u=v,d=g):c*=.5}}return l&&(l[0]=Po(n,t,r,u),l[1]=Po(e,i,a,u)),vh(d)}function sde(n,e,t,i,r,a,o){for(var s=n,l=e,u=0,c=1/o,d=1;d<=o;d++){var h=d*c,f=Po(n,t,r,h),p=Po(e,i,a,h),m=f-s,v=p-l;u+=Math.sqrt(m*m+v*v),s=f,l=p}return u}var lde=/cubic-bezier\(([0-9,\.e ]+)\)/;function eE(n){var e=n&&lde.exec(n);if(e){var t=e[1].split(","),i=+K0(t[0]),r=+K0(t[1]),a=+K0(t[2]),o=+K0(t[3]);if(isNaN(i+r+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:z5(0,i,a,1,l,s)&&vo(0,r,o,1,s[0])}}}var ude=function(){function n(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||Ba,this.ondestroy=e.ondestroy||Ba,this.onrestart=e.onrestart||Ba,e.easing&&this.setEasing(e.easing)}return n.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var i=this._life,r=e-this._startTime-this._pausedTime,a=r/i;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=r%i;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},n.prototype.pause=function(){this._paused=!0},n.prototype.resume=function(){this._paused=!1},n.prototype.setEasing=function(e){this.easing=e,this.easingFunc=$n(e)?e:b$[e]||eE(e)},n}();const cde=ude;var E$=function(){function n(e){this.value=e}return n}(),dde=function(){function n(){this._len=0}return n.prototype.insert=function(e){var t=new E$(e);return this.insertEntry(t),t},n.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++},n.prototype.remove=function(e){var t=e.prev,i=e.next;t?t.next=i:this.head=i,i?i.prev=t:this.tail=t,e.next=e.prev=null,this._len--},n.prototype.len=function(){return this._len},n.prototype.clear=function(){this.head=this.tail=null,this._len=0},n}(),hde=function(){function n(e){this._list=new dde,this._maxSize=10,this._map={},this._maxSize=e}return n.prototype.put=function(e,t){var i=this._list,r=this._map,a=null;if(r[e]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete r[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new E$(t),s.key=e,i.insertEntry(s),r[e]=s}return a},n.prototype.get=function(e){var t=this._map[e],i=this._list;if(t!=null)return t!==i.tail&&(i.remove(t),i.insertEntry(t)),t.value},n.prototype.clear=function(){this._list.clear(),this._map={}},n.prototype.len=function(){return this._list.len()},n}();const m3=hde;var fN={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 Q0(n){return n=Math.round(n),n<0?0:n>255?255:n}function fde(n){return n=Math.round(n),n<0?0:n>360?360:n}function T9(n){return n<0?0:n>1?1:n}function rb(n){var e=n;return e.length&&e.charAt(e.length-1)==="%"?Q0(parseFloat(e)/100*255):Q0(parseInt(e,10))}function Sp(n){var e=n;return e.length&&e.charAt(e.length-1)==="%"?T9(parseFloat(e)/100):T9(parseFloat(e))}function ab(n,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?n+(e-n)*t*6:t*2<1?e:t*3<2?n+(e-n)*(2/3-t)*6:n}function rh(n,e,t){return n+(e-n)*t}function e0(n,e,t,i,r){return n[0]=e,n[1]=t,n[2]=i,n[3]=r,n}function iA(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n}var P$=new m3(20),Gy=null;function M1(n,e){Gy&&iA(Gy,e),Gy=P$.put(n,Gy||e.slice())}function Nl(n,e){if(n){e=e||[];var t=P$.get(n);if(t)return iA(e,t);n=n+"";var i=n.replace(/ /g,"").toLowerCase();if(i in fN)return iA(e,fN[i]),M1(n,e),e;var r=i.length;if(i.charAt(0)==="#"){if(r===4||r===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){e0(e,0,0,0,1);return}return e0(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,r===5?parseInt(i.slice(4),16)/15:1),M1(n,e),e}else if(r===7||r===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){e0(e,0,0,0,1);return}return e0(e,(a&16711680)>>16,(a&65280)>>8,a&255,r===9?parseInt(i.slice(7),16)/255:1),M1(n,e),e}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===r){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?e0(e,+u[0],+u[1],+u[2],1):e0(e,0,0,0,1);c=Sp(u.pop());case"rgb":if(u.length>=3)return e0(e,rb(u[0]),rb(u[1]),rb(u[2]),u.length===3?c:Sp(u[3])),M1(n,e),e;e0(e,0,0,0,1);return;case"hsla":if(u.length!==4){e0(e,0,0,0,1);return}return u[3]=Sp(u[3]),rA(u,e),M1(n,e),e;case"hsl":if(u.length!==3){e0(e,0,0,0,1);return}return rA(u,e),M1(n,e),e;default:return}}e0(e,0,0,0,1)}}function rA(n,e){var t=(parseFloat(n[0])%360+360)%360/360,i=Sp(n[1]),r=Sp(n[2]),a=r<=.5?r*(i+1):r+i-r*i,o=r*2-a;return e=e||[],e0(e,Q0(ab(o,a,t+1/3)*255),Q0(ab(o,a,t)*255),Q0(ab(o,a,t-1/3)*255),1),n.length===4&&(e[3]=n[3]),e}function pde(n){if(n){var e=n[0]/255,t=n[1]/255,i=n[2]/255,r=Math.min(e,t,i),a=Math.max(e,t,i),o=a-r,s=(a+r)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+r):u=o/(2-a-r);var c=((a-e)/6+o/2)/o,d=((a-t)/6+o/2)/o,h=((a-i)/6+o/2)/o;e===a?l=h-d:t===a?l=1/3+c-h:i===a&&(l=2/3+d-c),l<0&&(l+=1),l>1&&(l-=1)}var f=[l*360,u,s];return n[3]!=null&&f.push(n[3]),f}}function aA(n,e){var t=Nl(n);if(t){for(var i=0;i<3;i++)e<0?t[i]=t[i]*(1-e)|0:t[i]=(255-t[i])*e+t[i]|0,t[i]>255?t[i]=255:t[i]<0&&(t[i]=0);return zc(t,t.length===4?"rgba":"rgb")}}function ob(n,e,t){if(!(!(e&&e.length)||!(n>=0&&n<=1))){t=t||[];var i=n*(e.length-1),r=Math.floor(i),a=Math.ceil(i),o=e[r],s=e[a],l=i-r;return t[0]=Q0(rh(o[0],s[0],l)),t[1]=Q0(rh(o[1],s[1],l)),t[2]=Q0(rh(o[2],s[2],l)),t[3]=T9(rh(o[3],s[3],l)),t}}function vde(n,e,t){if(!(!(e&&e.length)||!(n>=0&&n<=1))){var i=n*(e.length-1),r=Math.floor(i),a=Math.ceil(i),o=Nl(e[r]),s=Nl(e[a]),l=i-r,u=zc([Q0(rh(o[0],s[0],l)),Q0(rh(o[1],s[1],l)),Q0(rh(o[2],s[2],l)),T9(rh(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:r,rightIndex:a,value:i}:u}}function Gg(n,e,t,i){var r=Nl(n);if(n)return r=pde(r),e!=null&&(r[0]=fde(e)),t!=null&&(r[1]=Sp(t)),i!=null&&(r[2]=Sp(i)),zc(rA(r),"rgba")}function G5(n,e){var t=Nl(n);if(t&&e!=null)return t[3]=T9(e),zc(t,"rgba")}function zc(n,e){if(!(!n||!n.length)){var t=n[0]+","+n[1]+","+n[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+n[3]),e+"("+t+")"}}function U5(n,e){var t=Nl(n);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var pN=new m3(100);function oA(n){if(xn(n)){var e=pN.get(n);return e||(e=aA(n,-.1),pN.put(n,e)),e}else if(m_(n)){var t=It({},n);return t.colorStops=Xt(n.colorStops,function(i){return{offset:i.offset,color:aA(i.color,-.1)}}),t}return n}var V5=Math.round;function A9(n){var e;if(!n||n==="transparent")n="none";else if(typeof n=="string"&&n.indexOf("rgba")>-1){var t=Nl(n);t&&(n="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:n,opacity:e==null?1:e}}var vN=1e-4;function ah(n){return n<vN&&n>-vN}function Uy(n){return V5(n*1e3)/1e3}function sA(n){return V5(n*1e4)/1e4}function mde(n){return"matrix("+Uy(n[0])+","+Uy(n[1])+","+Uy(n[2])+","+Uy(n[3])+","+sA(n[4])+","+sA(n[5])+")"}var gde={left:"start",right:"end",center:"middle",middle:"middle"};function yde(n,e,t){return t==="top"?n+=e/2:t==="bottom"&&(n-=e/2),n}function _de(n){return n&&(n.shadowBlur||n.shadowOffsetX||n.shadowOffsetY)}function Sde(n){var e=n.style,t=n.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 R$(n){return n&&!!n.image}function bde(n){return n&&!!n.svgElement}function tE(n){return R$(n)||bde(n)}function L$(n){return n.type==="linear"}function I$(n){return n.type==="radial"}function D$(n){return n&&(n.type==="linear"||n.type==="radial")}function __(n){return"url(#"+n+")"}function N$(n){var e=n.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function k$(n){var e=n.x||0,t=n.y||0,i=(n.rotation||0)*q4,r=ai(n.scaleX,1),a=ai(n.scaleY,1),o=n.skewX||0,s=n.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),i&&l.push("rotate("+i+")"),(r!==1||a!==1)&&l.push("scale("+r+","+a+")"),(o||s)&&l.push("skew("+V5(o*q4)+"deg, "+V5(s*q4)+"deg)"),l.join(" ")}var xde=function(){return qi.hasGlobalWindow&&$n(window.btoa)?function(n){return window.btoa(unescape(encodeURIComponent(n)))}:typeof Buffer!="undefined"?function(n){return Buffer.from(n).toString("base64")}:function(n){return null}}(),lA=Array.prototype.slice;function Ec(n,e,t){return(e-n)*t+n}function sb(n,e,t,i){for(var r=e.length,a=0;a<r;a++)n[a]=Ec(e[a],t[a],i);return n}function wde(n,e,t,i){for(var r=e.length,a=r&&e[0].length,o=0;o<r;o++){n[o]||(n[o]=[]);for(var s=0;s<a;s++)n[o][s]=Ec(e[o][s],t[o][s],i)}return n}function Vy(n,e,t,i){for(var r=e.length,a=0;a<r;a++)n[a]=e[a]+t[a]*i;return n}function mN(n,e,t,i){for(var r=e.length,a=r&&e[0].length,o=0;o<r;o++){n[o]||(n[o]=[]);for(var s=0;s<a;s++)n[o][s]=e[o][s]+t[o][s]*i}return n}function Tde(n,e){for(var t=n.length,i=e.length,r=t>i?e:n,a=Math.min(t,i),o=r[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(t,i);s++)r.push({offset:o.offset,color:o.color.slice()})}function Ade(n,e,t){var i=n,r=e;if(!(!i.push||!r.push)){var a=i.length,o=r.length;if(a!==o){var s=a>o;if(s)i.length=o;else for(var l=a;l<o;l++)i.push(t===1?r[l]:lA.call(r[l]))}for(var u=i[0]&&i[0].length,l=0;l<i.length;l++)if(t===1)isNaN(i[l])&&(i[l]=r[l]);else for(var c=0;c<u;c++)isNaN(i[l][c])&&(i[l][c]=r[l][c])}}function Ug(n){if(ds(n)){var e=n.length;if(ds(n[0])){for(var t=[],i=0;i<e;i++)t.push(lA.call(n[i]));return t}return lA.call(n)}return n}function J4(n){return n[0]=Math.floor(n[0])||0,n[1]=Math.floor(n[1])||0,n[2]=Math.floor(n[2])||0,n[3]=n[3]==null?1:n[3],"rgba("+n.join(",")+")"}function Cde(n){return ds(n&&n[0])?2:1}var Hy=0,Q4=1,F$=2,_g=3,uA=4,cA=5,gN=6;function yN(n){return n===uA||n===cA}function Wy(n){return n===Q4||n===F$}var Pm=[0,0,0,0],Mde=function(){function n(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return n.prototype.isFinished=function(){return this._finished},n.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},n.prototype.needsAnimate=function(){return this.keyframes.length>=1},n.prototype.getAdditiveTrack=function(){return this._additiveTrack},n.prototype.addKeyframe=function(e,t,i){this._needsSort=!0;var r=this.keyframes,a=r.length,o=!1,s=gN,l=t;if(ds(t)){var u=Cde(t);s=u,(u===1&&!Yi(t[0])||u===2&&!Yi(t[0][0]))&&(o=!0)}else if(Yi(t)&&!b9(t))s=Hy;else if(xn(t))if(!isNaN(+t))s=Hy;else{var c=Nl(t);c&&(l=c,s=_g)}else if(m_(t)){var d=It({},l);d.colorStops=Xt(t.colorStops,function(f){return{offset:f.offset,color:Nl(f.color)}}),L$(t)?s=uA:I$(t)&&(s=cA),l=d}a===0?this.valType=s:(s!==this.valType||s===gN)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:t,percent:0};return i&&(h.easing=i,h.easingFunc=$n(i)?i:b$[i]||eE(i)),r.push(h),h},n.prototype.prepare=function(e,t){var i=this.keyframes;this._needsSort&&i.sort(function(m,v){return m.time-v.time});for(var r=this.valType,a=i.length,o=i[a-1],s=this.discrete,l=Wy(r),u=yN(r),c=0;c<a;c++){var d=i[c],h=d.value,f=o.value;d.percent=d.time/e,s||(l&&c!==a-1?Ade(h,f,r):u&&Tde(h.colorStops,f.colorStops))}if(!s&&r!==cA&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=i[0].value,c=0;c<a;c++)r===Hy?i[c].additiveValue=i[c].value-p:r===_g?i[c].additiveValue=Vy([],i[c].value,p,-1):Wy(r)&&(i[c].additiveValue=r===Q4?Vy([],i[c].value,p,-1):mN([],i[c].value,p,-1))}},n.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i=this._additiveTrack!=null,r=i?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===_g,c,d=this._lastFr,h=Math.min,f,p;if(s===1)f=p=o[0];else{if(t<0)c=0;else if(t<this._lastFrP){var m=h(d+1,s-1);for(c=m;c>=0&&!(o[c].percent<=t);c--);c=h(c,s-2)}else{for(c=d;c<s&&!(o[c].percent>t);c++);c=h(c-1,s-2)}p=o[c+1],f=o[c]}if(f&&p){this._lastFr=c,this._lastFrP=t;var v=p.percent-f.percent,g=v===0?1:h((t-f.percent)/v,1);p.easingFunc&&(g=p.easingFunc(g));var _=i?this._additiveValue:u?Pm:e[l];if((Wy(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)e[l]=g<1?f.rawValue:p.rawValue;else if(Wy(a))a===Q4?sb(_,f[r],p[r],g):wde(_,f[r],p[r],g);else if(yN(a)){var S=f[r],x=p[r],A=a===uA;e[l]={type:A?"linear":"radial",x:Ec(S.x,x.x,g),y:Ec(S.y,x.y,g),colorStops:Xt(S.colorStops,function(M,I){var D=x.colorStops[I];return{offset:Ec(M.offset,D.offset,g),color:J4(sb([],M.color,D.color,g))}}),global:x.global},A?(e[l].x2=Ec(S.x2,x.x2,g),e[l].y2=Ec(S.y2,x.y2,g)):e[l].r=Ec(S.r,x.r,g)}else if(u)sb(_,f[r],p[r],g),i||(e[l]=J4(_));else{var C=Ec(f[r],p[r],g);i?this._additiveValue=C:e[l]=C}i&&this._addToTarget(e)}}},n.prototype._addToTarget=function(e){var t=this.valType,i=this.propName,r=this._additiveValue;t===Hy?e[i]=e[i]+r:t===_g?(Nl(e[i],Pm),Vy(Pm,Pm,r,1),e[i]=J4(Pm)):t===Q4?Vy(e[i],e[i],r,1):t===F$&&mN(e[i],e[i],r,1)},n}(),nE=function(){function n(e,t,i,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){qM("Can' use additive animation on looped animation.");return}this._additiveAnimators=r,this._allowDiscrete=i}return n.prototype.getMaxTime=function(){return this._maxTime},n.prototype.getDelay=function(){return this._delay},n.prototype.getLoop=function(){return this._loop},n.prototype.getTarget=function(){return this._target},n.prototype.changeTarget=function(e){this._target=e},n.prototype.when=function(e,t,i){return this.whenWithKeys(e,t,Li(t),i)},n.prototype.whenWithKeys=function(e,t,i,r){for(var a=this._tracks,o=0;o<i.length;o++){var s=i[o],l=a[s];if(!l){l=a[s]=new Mde(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var d=c.keyframes,h=d[d.length-1];u=h&&h.value,c.valType===_g&&u&&(u=J4(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,Ug(u),r),this._trackKeys.push(s)}l.addKeyframe(e,Ug(t[s]),r)}return this._maxTime=Math.max(this._maxTime,e),this},n.prototype.pause=function(){this._clip.pause(),this._paused=!0},n.prototype.resume=function(){this._clip.resume(),this._paused=!1},n.prototype.isPaused=function(){return!!this._paused},n.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},n.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,i=0;i<t;i++)e[i].call(this)},n.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var i=0;i<t.length;i++)t[i].call(this)},n.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,i=0;i<t.length;i++)e[t[i]].setFinished()},n.prototype._getAdditiveTrack=function(e){var t,i=this._additiveAnimators;if(i)for(var r=0;r<i.length;r++){var a=i[r].getTrack(e);a&&(t=a)}return t},n.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,i=[],r=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(r,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var d=u[c-1];d&&(t._target[s.propName]=d.rawValue),s.setFinished()}else i.push(s)}if(i.length||this._force){var h=new cde({life:r,loop:this._loop,delay:this._delay||0,onframe:function(f){t._started=2;var p=t._additiveAnimators;if(p){for(var m=!1,v=0;v<p.length;v++)if(p[v]._clip){m=!0;break}m||(t._additiveAnimators=null)}for(var v=0;v<i.length;v++)i[v].step(t._target,f);var g=t._onframeCbs;if(g)for(var v=0;v<g.length;v++)g[v](t._target,f)},ondestroy:function(){t._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),e&&h.setEasing(e)}else this._doneCallback();return this}},n.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},n.prototype.delay=function(e){return this._delay=e,this},n.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},n.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},n.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},n.prototype.getClip=function(){return this._clip},n.prototype.getTrack=function(e){return this._tracks[e]},n.prototype.getTracks=function(){var e=this;return Xt(this._trackKeys,function(t){return e._tracks[t]})},n.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var i=this._tracks,r=this._trackKeys,a=0;a<e.length;a++){var o=i[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<r.length;a++)if(!i[r[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},n.prototype.saveTo=function(e,t,i){if(e){t=t||this._trackKeys;for(var r=0;r<t.length;r++){var a=t[r],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[i?0:s.length-1];l&&(e[a]=Ug(l.rawValue))}}}},n.prototype.__changeFinalValue=function(e,t){t=t||Li(e);for(var i=0;i<t.length;i++){var r=t[i],a=this._tracks[r];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,e[r]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},n}();function R2(){return new Date().getTime()}var Ede=function(n){ot(e,n);function e(t){var i=n.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,t=t||{},i.stage=t.stage||{},i}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 i=t.getClip();i&&this.addClip(i)},e.prototype.removeClip=function(t){if(t.animation){var i=t.prev,r=t.next;i?i.next=r:this._head=r,r?r.prev=i:this._tail=i,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var i=t.getClip();i&&this.removeClip(i),t.animation=null},e.prototype.update=function(t){for(var i=R2()-this._pausedTime,r=i-this._time,a=this._head;a;){var o=a.next,s=a.step(i,r);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=i,t||(this.trigger("frame",r),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function i(){t._running&&(tA(i),!t._paused&&t.update())}tA(i)},e.prototype.start=function(){this._running||(this._time=R2(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=R2(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=R2()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var i=t.next;t.prev=t.next=t.animation=null,t=i}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,i){i=i||{},this.start();var r=new nE(t,i.loop);return this.addAnimator(r),r},e}(P0);const Pde=Ede;var Rde=300,lb=qi.domSupported,ub=function(){var n=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=Xt(n,function(r){var a=r.replace("mouse","pointer");return t.hasOwnProperty(a)?a:r});return{mouse:n,touch:e,pointer:i}}(),_N={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},SN=!1;function dA(n){var e=n.pointerType;return e==="pen"||e==="touch"}function Lde(n){n.touching=!0,n.touchTimer!=null&&(clearTimeout(n.touchTimer),n.touchTimer=null),n.touchTimer=setTimeout(function(){n.touching=!1,n.touchTimer=null},700)}function cb(n){n&&(n.zrByTouch=!0)}function Ide(n,e){return o0(n.dom,new Dde(n,e),!0)}function O$(n,e){for(var t=e,i=!1;t&&t.nodeType!==9&&!(i=t.domBelongToZr||t!==e&&t===n.painterRoot);)t=t.parentNode;return i}var Dde=function(){function n(e,t){this.stopPropagation=Ba,this.stopImmediatePropagation=Ba,this.preventDefault=Ba,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return n}(),W0={mousedown:function(n){n=o0(this.dom,n),this.__mayPointerCapture=[n.zrX,n.zrY],this.trigger("mousedown",n)},mousemove:function(n){n=o0(this.dom,n);var e=this.__mayPointerCapture;e&&(n.zrX!==e[0]||n.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",n)},mouseup:function(n){n=o0(this.dom,n),this.__togglePointerCapture(!1),this.trigger("mouseup",n)},mouseout:function(n){n=o0(this.dom,n);var e=n.toElement||n.relatedTarget;O$(this,e)||(this.__pointerCapturing&&(n.zrEventControl="no_globalout"),this.trigger("mouseout",n))},wheel:function(n){SN=!0,n=o0(this.dom,n),this.trigger("mousewheel",n)},mousewheel:function(n){SN||(n=o0(this.dom,n),this.trigger("mousewheel",n))},touchstart:function(n){n=o0(this.dom,n),cb(n),this.__lastTouchMoment=new Date,this.handler.processGesture(n,"start"),W0.mousemove.call(this,n),W0.mousedown.call(this,n)},touchmove:function(n){n=o0(this.dom,n),cb(n),this.handler.processGesture(n,"change"),W0.mousemove.call(this,n)},touchend:function(n){n=o0(this.dom,n),cb(n),this.handler.processGesture(n,"end"),W0.mouseup.call(this,n),+new Date-+this.__lastTouchMoment<Rde&&W0.click.call(this,n)},pointerdown:function(n){W0.mousedown.call(this,n)},pointermove:function(n){dA(n)||W0.mousemove.call(this,n)},pointerup:function(n){W0.mouseup.call(this,n)},pointerout:function(n){dA(n)||W0.mouseout.call(this,n)}};ne(["click","dblclick","contextmenu"],function(n){W0[n]=function(e){e=o0(this.dom,e),this.trigger(n,e)}});var hA={pointermove:function(n){dA(n)||hA.mousemove.call(this,n)},pointerup:function(n){hA.mouseup.call(this,n)},mousemove:function(n){this.trigger("mousemove",n)},mouseup:function(n){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",n),e&&(n.zrEventControl="only_globalout",this.trigger("mouseout",n))}};function Nde(n,e){var t=e.domHandlers;qi.pointerEventsSupported?ne(ub.pointer,function(i){e5(e,i,function(r){t[i].call(n,r)})}):(qi.touchEventsSupported&&ne(ub.touch,function(i){e5(e,i,function(r){t[i].call(n,r),Lde(e)})}),ne(ub.mouse,function(i){e5(e,i,function(r){r=ZM(r),e.touching||t[i].call(n,r)})}))}function kde(n,e){qi.pointerEventsSupported?ne(_N.pointer,t):qi.touchEventsSupported||ne(_N.mouse,t);function t(i){function r(a){a=ZM(a),O$(n,a.target)||(a=Ide(n,a),e.domHandlers[i].call(n,a))}e5(e,i,r,{capture:!0})}}function e5(n,e,t,i){n.mounted[e]=t,n.listenerOpts[e]=i,eA(n.domTarget,e,t,i)}function db(n){var e=n.mounted;for(var t in e)e.hasOwnProperty(t)&&Vce(n.domTarget,t,e[t],n.listenerOpts[t]);n.mounted={}}var bN=function(){function n(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return n}(),Fde=function(n){ot(e,n);function e(t,i){var r=n.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=i,r._localHandlerScope=new bN(t,W0),lb&&(r._globalHandlerScope=new bN(document,hA)),Nde(r,r._localHandlerScope),r}return e.prototype.dispose=function(){db(this._localHandlerScope),lb&&db(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,lb&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var i=this._globalHandlerScope;t?kde(this,i):db(i)}},e}(P0);const Ode=Fde;var B$=1;qi.hasGlobalWindow&&(B$=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var H5=B$,fA=.4,pA="#333",vA="#ccc",Bde="#eee",xN=y_,wN=5e-5;function ff(n){return n>wN||n<-wN}var pf=[],E1=[],hb=Dl(),fb=Math.abs,zde=function(){function n(){}return n.prototype.getLocalTransform=function(e){return n.getLocalTransform(this,e)},n.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},n.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},n.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},n.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},n.prototype.needLocalTransform=function(){return ff(this.rotation)||ff(this.x)||ff(this.y)||ff(this.scaleX-1)||ff(this.scaleY-1)||ff(this.skewX)||ff(this.skewY)},n.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),i=this.transform;if(!(t||e)){i&&(xN(i),this.invTransform=null);return}i=i||Dl(),t?this.getLocalTransform(i):xN(i),e&&(t?Bc(i,e,i):JM(i,e)),this.transform=i,this._resolveGlobalScaleRatio(i)},n.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(pf);var i=pf[0]<0?-1:1,r=pf[1]<0?-1:1,a=((pf[0]-i)*t+i)/pf[0]||0,o=((pf[1]-r)*t+r)/pf[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Dl(),Bv(this.invTransform,e)},n.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},n.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),a=Math.PI/2+r-Math.atan2(e[3],e[2]);i=Math.sqrt(i)*Math.cos(a),t=Math.sqrt(t),this.skewX=a,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=i,this.originX=0,this.originY=0}},n.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Dl(),Bc(E1,e.invTransform,t),t=E1);var i=this.originX,r=this.originY;(i||r)&&(hb[4]=i,hb[5]=r,Bc(E1,t,hb),E1[4]-=i,E1[5]-=r,t=E1),this.setLocalTransform(t)}},n.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)},n.prototype.transformCoordToLocal=function(e,t){var i=[e,t],r=this.invTransform;return r&&Ho(i,i,r),i},n.prototype.transformCoordToGlobal=function(e,t){var i=[e,t],r=this.transform;return r&&Ho(i,i,r),i},n.prototype.getLineScale=function(){var e=this.transform;return e&&fb(e[0]-1)>1e-10&&fb(e[3]-1)>1e-10?Math.sqrt(fb(e[0]*e[3]-e[2]*e[1])):1},n.prototype.copyTransform=function(e){z$(this,e)},n.getLocalTransform=function(e,t){t=t||[];var i=e.originX||0,r=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,d=e.y,h=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(i||r||s||l){var p=i+s,m=r+l;t[4]=-p*a-h*m*o,t[5]=-m*o-f*p*a}else t[4]=t[5]=0;return t[0]=a,t[3]=o,t[1]=f*a,t[2]=h*o,u&&Jp(t,t,u),t[4]+=i+c,t[5]+=r+d,t},n.initDefaultProps=function(){var e=n.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}(),n}(),Zu=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function z$(n,e){for(var t=0;t<Zu.length;t++){var i=Zu[t];n[i]=e[i]}}const Dc=zde;var TN={};function kl(n,e){e=e||Ch;var t=TN[e];t||(t=TN[e]=new m3(500));var i=t.get(n);return i==null&&(i=Mh.measureText(n,e).width,t.put(n,i)),i}function AN(n,e,t,i){var r=kl(n,e),a=S_(e),o=Sg(0,r,t),s=_2(0,a,i),l=new gi(o,s,r,a);return l}function g3(n,e,t,i){var r=((n||"")+"").split(`
`),a=r.length;if(a===1)return AN(r[0],e,t,i);for(var o=new gi(0,0,0,0),s=0;s<r.length;s++){var l=AN(r[s],e,t,i);s===0?o.copy(l):o.union(l)}return o}function Sg(n,e,t){return t==="right"?n-=e:t==="center"&&(n-=e/2),n}function _2(n,e,t){return t==="middle"?n-=e/2:t==="bottom"&&(n-=e),n}function S_(n){return kl("国",n)}function nu(n,e){return typeof n=="string"?n.lastIndexOf("%")>=0?parseFloat(n)/100*e:parseFloat(n):n}function W5(n,e,t){var i=e.position||"inside",r=e.distance!=null?e.distance:5,a=t.height,o=t.width,s=a/2,l=t.x,u=t.y,c="left",d="top";if(i instanceof Array)l+=nu(i[0],t.width),u+=nu(i[1],t.height),c=null,d=null;else switch(i){case"left":l-=r,u+=s,c="right",d="middle";break;case"right":l+=r+o,u+=s,d="middle";break;case"top":l+=o/2,u-=r,c="center",d="bottom";break;case"bottom":l+=o/2,u+=a+r,c="center";break;case"inside":l+=o/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=r,u+=s,d="middle";break;case"insideRight":l+=o-r,u+=s,c="right",d="middle";break;case"insideTop":l+=o/2,u+=r,c="center";break;case"insideBottom":l+=o/2,u+=a-r,c="center",d="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=o-r,u+=r,c="right";break;case"insideBottomLeft":l+=r,u+=a-r,d="bottom";break;case"insideBottomRight":l+=o-r,u+=a-r,c="right",d="bottom";break}return n=n||{},n.x=l,n.y=u,n.align=c,n.verticalAlign=d,n}var pb="__zr_normal__",vb=Zu.concat(["ignore"]),Gde=Yu(Zu,function(n,e){return n[e]=!0,n},{ignore:!1}),P1={},Ude=new gi(0,0,0,0),iE=function(){function n(e){this.id=d$(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return n.prototype._init=function(e){this.attr(e)},n.prototype.drift=function(e,t,i){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},n.prototype.beforeUpdate=function(){},n.prototype.afterUpdate=function(){},n.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},n.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var i=this.textConfig,r=i.local,a=t.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=r?this:null;var u=!1;if(a.copyTransform(t),i.position!=null){var c=Ude;i.layoutRect?c.copy(i.layoutRect):c.copy(this.getBoundingRect()),r||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(P1,i,c):W5(P1,i,c),a.x=P1.x,a.y=P1.y,o=P1.align,s=P1.verticalAlign;var d=i.origin;if(d&&i.rotation!=null){var h=void 0,f=void 0;d==="center"?(h=c.width*.5,f=c.height*.5):(h=nu(d[0],c.width),f=nu(d[1],c.height)),u=!0,a.originX=-a.x+h+(r?0:c.x),a.originY=-a.y+f+(r?0:c.y)}}i.rotation!=null&&(a.rotation=i.rotation);var p=i.offset;p&&(a.x+=p[0],a.y+=p[1],u||(a.originX=-p[0],a.originY=-p[1]));var m=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,v=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,_=void 0,S=void 0;m&&this.canBeInsideText()?(g=i.insideFill,_=i.insideStroke,(g==null||g==="auto")&&(g=this.getInsideTextFill()),(_==null||_==="auto")&&(_=this.getInsideTextStroke(g),S=!0)):(g=i.outsideFill,_=i.outsideStroke,(g==null||g==="auto")&&(g=this.getOutsideFill()),(_==null||_==="auto")&&(_=this.getOutsideStroke(g),S=!0)),g=g||"#000",(g!==v.fill||_!==v.stroke||S!==v.autoStroke||o!==v.align||s!==v.verticalAlign)&&(l=!0,v.fill=g,v.stroke=_,v.autoStroke=S,v.align=o,v.verticalAlign=s,t.setDefaultTextStyle(v)),t.__dirty|=El,l&&t.dirtyStyle(!0)}},n.prototype.canBeInsideText=function(){return!0},n.prototype.getInsideTextFill=function(){return"#fff"},n.prototype.getInsideTextStroke=function(e){return"#000"},n.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?vA:pA},n.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),i=typeof t=="string"&&Nl(t);i||(i=[255,255,255,1]);for(var r=i[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*r+(a?0:255)*(1-r);return i[3]=1,zc(i,"rgba")},n.prototype.traverse=function(e,t){},n.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||{},It(this.extra,t)):this[e]=t},n.prototype.hide=function(){this.ignore=!0,this.markRedraw()},n.prototype.show=function(){this.ignore=!1,this.markRedraw()},n.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(Kn(e))for(var i=e,r=Li(i),a=0;a<r.length;a++){var o=r[a];this.attrKV(o,e[o])}return this.markRedraw(),this},n.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,i=0;i<this.animators.length;i++){var r=this.animators[i],a=r.__fromStateTransition;if(!(r.getLoop()||a&&a!==pb)){var o=r.targetName,s=o?t[o]:t;r.saveTo(s)}}},n.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,vb)},n.prototype._savePrimaryToNormal=function(e,t,i){for(var r=0;r<i.length;r++){var a=i[r];e[a]!=null&&!(a in t)&&(t[a]=this[a])}},n.prototype.hasState=function(){return this.currentStates.length>0},n.prototype.getState=function(e){return this.states[e]},n.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},n.prototype.clearStates=function(e){this.useState(pb,!1,e)},n.prototype.useState=function(e,t,i,r){var a=e===pb,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(xi(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){qM("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||r);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!i&&!this.__inHover&&l&&l.duration>0,l);var d=this._textContent,h=this._textGuide;return d&&d.useState(e,t,i,c),h&&h.useState(e,t,i,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&=~El),u}}},n.prototype.useStates=function(e,t,i){if(!e.length)this.clearStates();else{var r=[],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&&r.push(c)}var d=r[o-1],h=!!(d&&d.hoverLayer||i);h&&this._toggleHoverLayerFlag(!0);var f=this._mergeStates(r),p=this.stateTransition;this.saveCurrentToNormalState(f),this._applyStateObj(e.join(","),f,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var m=this._textContent,v=this._textGuide;m&&m.useStates(e,t,h),v&&v.useStates(e,t,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~El)}},n.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},n.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},n.prototype.removeState=function(e){var t=xi(this.currentStates,e);if(t>=0){var i=this.currentStates.slice();i.splice(t,1),this.useStates(i)}},n.prototype.replaceState=function(e,t,i){var r=this.currentStates.slice(),a=xi(r,e),o=xi(r,t)>=0;a>=0?o?r.splice(a,1):r[a]=t:i&&!o&&r.push(t),this.useStates(r)},n.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},n.prototype._mergeStates=function(e){for(var t={},i,r=0;r<e.length;r++){var a=e[r];It(t,a),a.textConfig&&(i=i||{},It(i,a.textConfig))}return i&&(t.textConfig=i),t},n.prototype._applyStateObj=function(e,t,i,r,a,o){var s=!(t&&r);t&&t.textConfig?(this.textConfig=It({},r?this.textConfig:i.textConfig),It(this.textConfig,t.textConfig)):s&&i.textConfig&&(this.textConfig=i.textConfig);for(var l={},u=!1,c=0;c<vb.length;c++){var d=vb[c],h=a&&Gde[d];t&&t[d]!=null?h?(u=!0,l[d]=t[d]):this[d]=t[d]:s&&i[d]!=null&&(h?(u=!0,l[d]=i[d]):this[d]=i[d])}if(!a)for(var c=0;c<this.animators.length;c++){var f=this.animators[c],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||i)[p]:t||i)}u&&this._transitionState(e,l,o)},n.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}},n.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},n.prototype.getClipPath=function(){return this._clipPath},n.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},n.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},n.prototype.getTextContent=function(){return this._textContent},n.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Dc,this._attachComponent(e),this._textContent=e,this.markRedraw())},n.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),It(this.textConfig,e),this.markRedraw()},n.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},n.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},n.prototype.getTextGuideLine=function(){return this._textGuide},n.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},n.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},n.prototype.markRedraw=function(){this.__dirty|=El;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},n.prototype.dirty=function(){this.markRedraw()},n.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,i=this._textGuide;t&&(t.__inHover=e),i&&(i.__inHover=e)},n.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.addAnimator(t[i]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},n.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.removeAnimator(t[i]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},n.prototype.animate=function(e,t,i){var r=e?this[e]:this,a=new nE(r,t,i);return e&&(a.targetName=e),this.addAnimator(a,e),a},n.prototype.addAnimator=function(e,t){var i=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var a=r.animators,o=xi(a,e);o>=0&&a.splice(o,1)}),this.animators.push(e),i&&i.animation.addAnimator(e),i&&i.wakeUp()},n.prototype.updateDuringAnimation=function(e){this.markRedraw()},n.prototype.stopAnimation=function(e,t){for(var i=this.animators,r=i.length,a=[],o=0;o<r;o++){var s=i[o];!e||e===s.scope?s.stop(t):a.push(s)}return this.animators=a,this},n.prototype.animateTo=function(e,t,i){mb(this,e,t,i)},n.prototype.animateFrom=function(e,t,i){mb(this,e,t,i,!0)},n.prototype._transitionState=function(e,t,i,r){for(var a=mb(this,t,i,r),o=0;o<a.length;o++)a[o].__fromStateTransition=e},n.prototype.getBoundingRect=function(){return null},n.prototype.getPaintRect=function(){return null},n.initDefaultProps=function(){var e=n.prototype;e.type="element",e.name="",e.ignore=e.silent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=El;function t(i,r,a,o){Object.defineProperty(e,i,{get:function(){if(!this[r]){var l=this[r]=[];s(this,l)}return this[r]},set:function(l){this[a]=l[0],this[o]=l[1],this[r]=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"))}(),n}();Za(iE,P0);Za(iE,Dc);function mb(n,e,t,i,r){t=t||{};var a=[];G$(n,"",n,e,t,i,a,r);var o=a.length,s=!1,l=t.done,u=t.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},d=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&t.during&&a[0].during(function(p,m){t.during(m)});for(var h=0;h<a.length;h++){var f=a[h];c&&f.done(c),d&&f.aborted(d),t.force&&f.duration(t.duration),f.start(t.easing)}return a}function gb(n,e,t){for(var i=0;i<t;i++)n[i]=e[i]}function Vde(n){return ds(n[0])}function Hde(n,e,t){if(ds(e[t]))if(ds(n[t])||(n[t]=[]),sl(e[t])){var i=e[t].length;n[t].length!==i&&(n[t]=new e[t].constructor(i),gb(n[t],e[t],i))}else{var r=e[t],a=n[t],o=r.length;if(Vde(r))for(var s=r[0].length,l=0;l<o;l++)a[l]?gb(a[l],r[l],s):a[l]=Array.prototype.slice.call(r[l]);else gb(a,r,o);a.length=r.length}else n[t]=e[t]}function Wde(n,e){return n===e||ds(n)&&ds(e)&&jde(n,e)}function jde(n,e){var t=n.length;if(t!==e.length)return!1;for(var i=0;i<t;i++)if(n[i]!==e[i])return!1;return!0}function G$(n,e,t,i,r,a,o,s){for(var l=Li(i),u=r.duration,c=r.delay,d=r.additive,h=r.setToFinal,f=!Kn(a),p=n.animators,m=[],v=0;v<l.length;v++){var g=l[v],_=i[g];if(_!=null&&t[g]!=null&&(f||a[g]))if(Kn(_)&&!ds(_)&&!m_(_)){if(e){s||(t[g]=_,n.updateDuringAnimation(e));continue}G$(n,g,t[g],_,r,a&&a[g],o,s)}else m.push(g);else s||(t[g]=_,n.updateDuringAnimation(e),m.push(g))}var S=m.length;if(!d&&S)for(var x=0;x<p.length;x++){var A=p[x];if(A.targetName===e){var C=A.stopTracks(m);if(C){var M=xi(p,A);p.splice(M,1)}}}if(r.force||(m=dr(m,function(P){return!Wde(i[P],t[P])}),S=m.length),S>0||r.force&&!o.length){var I=void 0,D=void 0,E=void 0;if(s){D={},h&&(I={});for(var x=0;x<S;x++){var g=m[x];D[g]=t[g],h?I[g]=i[g]:t[g]=i[g]}}else if(h){E={};for(var x=0;x<S;x++){var g=m[x];E[g]=Ug(t[g]),Hde(t,i,g)}}var A=new nE(t,!1,!1,d?dr(p,function(F){return F.targetName===e}):null);A.targetName=e,r.scope&&(A.scope=r.scope),h&&I&&A.whenWithKeys(0,I,m),E&&A.whenWithKeys(0,E,m),A.whenWithKeys(u==null?500:u,s?D:i,m).delay(c||0),n.addAnimator(A,e),o.push(A)}}const U$=iE;var V$=function(n){ot(e,n);function e(t){var i=n.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(t),i}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 i=this._children,r=0;r<i.length;r++)if(i[r].name===t)return i[r]},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,i){if(t&&t!==this&&t.parent!==this&&i&&i.parent===this){var r=this._children,a=r.indexOf(i);a>=0&&(r.splice(a,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,i){var r=xi(this._children,t);return r>=0&&this.replaceAt(i,r),this},e.prototype.replaceAt=function(t,i){var r=this._children,a=r[i];if(t&&t!==this&&t.parent!==this&&t!==a){r[i]=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 i=this.__zr;i&&i!==t.__zr&&t.addSelfToZr(i),i&&i.refresh()},e.prototype.remove=function(t){var i=this.__zr,r=this._children,a=xi(r,t);return a<0?this:(r.splice(a,1),t.parent=null,i&&t.removeSelfFromZr(i),i&&i.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,i=this.__zr,r=0;r<t.length;r++){var a=t[r];i&&a.removeSelfFromZr(i),a.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,i){for(var r=this._children,a=0;a<r.length;a++){var o=r[a];t.call(i,o,a)}return this},e.prototype.traverse=function(t,i){for(var r=0;r<this._children.length;r++){var a=this._children[r],o=t.call(i,a);a.isGroup&&!o&&a.traverse(t,i)}return this},e.prototype.addSelfToZr=function(t){n.prototype.addSelfToZr.call(this,t);for(var i=0;i<this._children.length;i++){var r=this._children[i];r.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){n.prototype.removeSelfFromZr.call(this,t);for(var i=0;i<this._children.length;i++){var r=this._children[i];r.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var i=new gi(0,0,0,0),r=t||this._children,a=[],o=null,s=0;s<r.length;s++){var l=r[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(gi.applyTransform(i,u,c),o=o||i.clone(),o.union(i)):(o=o||u.clone(),o.union(u))}}return o||i},e}(U$);V$.prototype.type="group";const ei=V$;/*!
* 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 t5={},H$={};function $de(n){delete H$[n]}function qde(n){if(!n)return!1;if(typeof n=="string")return U5(n,1)<fA;if(n.colorStops){for(var e=n.colorStops,t=0,i=e.length,r=0;r<i;r++)t+=U5(e[r].color,1);return t/=i,t<fA}return!1}var Xde=function(){function n(e,t,i){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=t,this.id=e;var a=new rde,o=i.renderer||"canvas";t5[o]||(o=Li(t5)[0]),i.useDirtyRect=i.useDirtyRect==null?!1:i.useDirtyRect;var s=new t5[o](t,a,i,e),l=i.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!qi.node&&!qi.worker&&!l?new Ode(s.getViewportRoot(),s.root):null,c=i.useCoarsePointer,d=c==null||c==="auto"?qi.touchEventsSupported:!!c,h=44,f;d&&(f=ai(i.pointerSize,h)),this.handler=new Qce(a,s,u,s.root,f),this.animation=new Pde({stage:{update:l?null:function(){return r._flush(!0)}}}),l||this.animation.start()}return n.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},n.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},n.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},n.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=qde(e))},n.prototype.getBackgroundColor=function(){return this._backgroundColor},n.prototype.setDarkMode=function(e){this._darkMode=e},n.prototype.isDarkMode=function(){return this._darkMode},n.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},n.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},n.prototype.flush=function(){this._disposed||this._flush(!1)},n.prototype._flush=function(e){var t,i=R2();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=R2();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},n.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},n.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},n.prototype.refreshHover=function(){this._needsRefreshHover=!0},n.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},n.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},n.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},n.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},n.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},n.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},n.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},n.prototype.on=function(e,t,i){return this._disposed||this.handler.on(e,t,i),this},n.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},n.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},n.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof ei&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},n.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,$de(this.id))},n}();function CN(n,e){var t=new Xde(d$(),n,e);return H$[t.id]=t,t}function Yde(n,e){t5[n]=e}var mA;function Kde(n){if(typeof mA=="function")return mA(n)}function Zde(n){mA=n}var MN=1e-4,W$=20;function Jde(n){return n.replace(/^\s+|\s+$/g,"")}function pr(n,e,t,i){var r=e[0],a=e[1],o=t[0],s=t[1],l=a-r,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(i)if(l>0){if(n<=r)return o;if(n>=a)return s}else{if(n>=r)return o;if(n<=a)return s}else{if(n===r)return o;if(n===a)return s}return(n-r)/l*u+o}function _n(n,e){switch(n){case"center":case"middle":n="50%";break;case"left":case"top":n="0%";break;case"right":case"bottom":n="100%";break}return xn(n)?Jde(n).match(/%$/)?parseFloat(n)/100*e:parseFloat(n):n==null?NaN:+n}function Ra(n,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),W$),n=(+n).toFixed(e),t?n:+n}function x0(n){return n.sort(function(e,t){return e-t}),n}function Bu(n){if(n=+n,isNaN(n))return 0;if(n>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(n*e)/e===n)return t}return Qde(n)}function Qde(n){var e=n.toString().toLowerCase(),t=e.indexOf("e"),i=t>0?+e.slice(t+1):0,r=t>0?t:e.length,a=e.indexOf("."),o=a<0?0:r-1-a;return Math.max(0,o-i)}function j$(n,e){var t=Math.log,i=Math.LN10,r=Math.floor(t(n[1]-n[0])/i),a=Math.round(t(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20}function ehe(n,e){var t=Yu(n,function(f,p){return f+(isNaN(p)?0:p)},0);if(t===0)return[];for(var i=Math.pow(10,e),r=Xt(n,function(f){return(isNaN(f)?0:f)/t*i*100}),a=i*100,o=Xt(r,function(f){return Math.floor(f)}),s=Yu(o,function(f,p){return f+p},0),l=Xt(r,function(f,p){return f-o[p]});s<a;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,h=l.length;d<h;++d)l[d]>u&&(u=l[d],c=d);++o[c],l[c]=0,++s}return Xt(o,function(f){return f/i})}function the(n,e){var t=Math.max(Bu(n),Bu(e)),i=n+e;return t>W$?i:Ra(i,t)}var EN=9007199254740991;function $$(n){var e=Math.PI*2;return(n%e+e)%e}function C9(n){return n>-MN&&n<MN}var nhe=/^(?:(\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 Ju(n){if(n instanceof Date)return n;if(xn(n)){var e=nhe.exec(n);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(n==null)return new Date(NaN);return new Date(Math.round(n))}function ihe(n){return Math.pow(10,rE(n))}function rE(n){if(n===0)return 0;var e=Math.floor(Math.log(n)/Math.LN10);return n/Math.pow(10,e)>=10&&e++,e}function q$(n,e){var t=rE(n),i=Math.pow(10,t),r=n/i,a;return e?r<1.5?a=1:r<2.5?a=2:r<4?a=3:r<7?a=5:a=10:r<1?a=1:r<2?a=2:r<3?a=3:r<5?a=5:a=10,n=a*i,t>=-20?+n.toFixed(t<0?-t:0):n}function yb(n,e){var t=(n.length-1)*e+1,i=Math.floor(t),r=+n[i-1],a=t-i;return a?r+a*(n[i]-r):r}function PN(n){n.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,i=0;i<n.length;){for(var r=n[i].interval,a=n[i].close,o=0;o<2;o++)r[o]<=e&&(r[o]=e,a[o]=o?1:1-t),e=r[o],t=a[o];r[0]===r[1]&&a[0]*a[1]!==1?n.splice(i,1):i++}return n;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 jc(n){var e=parseFloat(n);return e==n&&(e!==0||!xn(n)||n.indexOf("x")<=0)?e:NaN}function X$(n){return!isNaN(jc(n))}function Y$(){return Math.round(Math.random()*9)}function K$(n,e){return e===0?n:K$(e,n%e)}function RN(n,e){return n==null?e:e==null?n:n*e/K$(n,e)}function ur(n){throw new Error(n)}function LN(n,e,t){return(e-n)*t+n}var Z$="series\0",J$="\0_ec_\0";function Ar(n){return n instanceof Array?n:n==null?[]:[n]}function Fp(n,e,t){if(n){n[e]=n[e]||{},n.emphasis=n.emphasis||{},n.emphasis[e]=n.emphasis[e]||{};for(var i=0,r=t.length;i<r;i++){var a=t[i];!n.emphasis[e].hasOwnProperty(a)&&n[e].hasOwnProperty(a)&&(n.emphasis[e][a]=n[e][a])}}}var IN=["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 zv(n){return Kn(n)&&!$t(n)&&!(n instanceof Date)?n.value:n}function rhe(n){return Kn(n)&&!(n instanceof Array)}function Q$(n,e,t){var i=t==="normalMerge",r=t==="replaceMerge",a=t==="replaceAll";n=n||[],e=(e||[]).slice();var o=In();ne(e,function(l,u){if(!Kn(l)){e[u]=null;return}});var s=ahe(n,o,t);return(i||r)&&ohe(s,n,o,e),i&&she(s,e),i||r?lhe(s,e,r):a&&uhe(s,e),che(s),s}function ahe(n,e,t){var i=[];if(t==="replaceAll")return i;for(var r=0;r<n.length;r++){var a=n[r];a&&a.id!=null&&e.set(a.id,r),i.push({existing:t==="replaceMerge"||M9(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return i}function ohe(n,e,t,i){ne(i,function(r,a){if(!(!r||r.id==null)){var o=Vg(r.id),s=t.get(o);if(s!=null){var l=n[s];Ls(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=r,l.existing=e[s],i[a]=null}}})}function she(n,e){ne(e,function(t,i){if(!(!t||t.name==null))for(var r=0;r<n.length;r++){var a=n[r].existing;if(!n[r].newOption&&a&&(a.id==null||t.id==null)&&!M9(t)&&!M9(a)&&eq("name",a,t)){n[r].newOption=t,e[i]=null;return}}})}function lhe(n,e,t){ne(e,function(i){if(i){for(var r,a=0;(r=n[a])&&(r.newOption||M9(r.existing)||r.existing&&i.id!=null&&!eq("id",i,r.existing));)a++;r?(r.newOption=i,r.brandNew=t):n.push({newOption:i,brandNew:t,existing:null,keyInfo:null}),a++}})}function uhe(n,e){ne(e,function(t){n.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function che(n){var e=In();ne(n,function(t){var i=t.existing;i&&e.set(i.id,t)}),ne(n,function(t){var i=t.newOption;Ls(!i||i.id==null||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&i.id!=null&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})}),ne(n,function(t,i){var r=t.existing,a=t.newOption,o=t.keyInfo;if(Kn(a)){if(o.name=a.name!=null?Vg(a.name):r?r.name:Z$+i,r)o.id=Vg(r.id);else if(a.id!=null)o.id=Vg(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 eq(n,e,t){var i=lo(e[n],null),r=lo(t[n],null);return i!=null&&r!=null&&i===r}function Vg(n){return lo(n,"")}function lo(n,e){return n==null?e:xn(n)?n:Yi(n)||qT(n)?n+"":e}function aE(n){var e=n.name;return!!(e&&e.indexOf(Z$))}function M9(n){return n&&n.id!=null&&Vg(n.id).indexOf(J$)===0}function dhe(n){return J$+n}function hhe(n,e,t){ne(n,function(i){var r=i.newOption;Kn(r)&&(i.keyInfo.mainType=e,i.keyInfo.subType=fhe(e,r,i.existing,t))})}function fhe(n,e,t,i){var r=e.type?e.type:t?t.subType:i.determineSubType(n,e);return r}function phe(n,e){var t={},i={};return r(n||[],t),r(e||[],i,t),[a(t),a(i)];function r(o,s,l){for(var u=0,c=o.length;u<c;u++){var d=lo(o[u].seriesId,null);if(d==null)return;for(var h=Ar(o[u].dataIndex),f=l&&l[d],p=0,m=h.length;p<m;p++){var v=h[p];f&&f[v]?f[v]=null:(s[d]||(s[d]={}))[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 Op(n,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return $t(e.dataIndex)?Xt(e.dataIndex,function(t){return n.indexOfRawIndex(t)}):n.indexOfRawIndex(e.dataIndex);if(e.name!=null)return $t(e.name)?Xt(e.name,function(t){return n.indexOfName(t)}):n.indexOfName(e.name)}function Gi(){var n="__ec_inner_"+vhe++;return function(e){return e[n]||(e[n]={})}}var vhe=Y$();function Hg(n,e,t){var i=oE(e,t),r=i.mainTypeSpecified,a=i.queryOptionMap,o=i.others,s=o,l=t?t.defaultMainType:null;return!r&&l&&a.set(l,{}),a.each(function(u,c){var d=y3(n,c,u,{useDefault:l===c,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});s[c+"Models"]=d.models,s[c+"Model"]=d.models[0]}),s}function oE(n,e){var t;if(xn(n)){var i={};i[n+"Index"]=0,t=i}else t=n;var r=In(),a={},o=!1;return ne(t,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],d=(u[2]||"").toLowerCase();if(!(!c||!d||e&&e.includeMainTypes&&xi(e.includeMainTypes,c)<0)){o=o||!!c;var h=r.get(c)||r.set(c,{});h[d]=s}}),{mainTypeSpecified:o,queryOptionMap:r,others:a}}var Xa={useDefault:!0,enableAll:!1,enableNone:!1},mhe={useDefault:!1,enableAll:!0,enableNone:!0};function y3(n,e,t,i){i=i||Xa;var r=t.index,a=t.id,o=t.name,s={models:null,specified:r!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=i.useDefault&&(l=n.getComponent(e))?[l]:[],s}return r==="none"||r===!1?(Ls(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(r==="all"&&(Ls(i.enableAll,'`"all"` is not a valid value on index option.'),r=a=o=null),s.models=n.queryComponents({mainType:e,index:r,id:a,name:o}),s)}function tq(n,e,t){n.setAttribute?n.setAttribute(e,t):n[e]=t}function ghe(n,e){return n.getAttribute?n.getAttribute(e):n[e]}function yhe(n){return n==="auto"?qi.domSupported?"html":"richText":n||"html"}function gA(n,e){var t=In(),i=[];return ne(n,function(r){var a=e(r);(t.get(a)||(i.push(a),t.set(a,[]))).push(r)}),{keys:i,buckets:t}}function nq(n,e,t,i,r){var a=e==null||e==="auto";if(i==null)return i;if(Yi(i)){var o=LN(t||0,i,r);return Ra(o,a?Math.max(Bu(t||0),Bu(i)):e)}else{if(xn(i))return r<1?t:i;for(var s=[],l=t,u=i,c=Math.max(l?l.length:0,u.length),d=0;d<c;++d){var h=n.getDimensionInfo(d);if(h&&h.type==="ordinal")s[d]=(r<1&&l?l:u)[d];else{var f=l&&l[d]?l[d]:0,p=u[d],o=LN(f,p,r);s[d]=Ra(o,a?Math.max(Bu(f),Bu(p)):e)}}return s}}var _he=".",vf="___EC__COMPONENT__CONTAINER___",iq="___EC__EXTENDED_CLASS___";function zu(n){var e={main:"",sub:""};if(n){var t=n.split(_he);e.main=t[0]||"",e.sub=t[1]||""}return e}function She(n){Ls(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n),'componentType "'+n+'" illegal')}function bhe(n){return!!(n&&n[iq])}function sE(n,e){n.$constructor=n,n.extend=function(t){var i=this,r;return xhe(i)?r=function(a){ot(o,a);function o(){return a.apply(this,arguments)||this}return o}(i):(r=function(){(t.$constructor||i).apply(this,arguments)},_ce(r,this)),It(r.prototype,t),r[iq]=!0,r.extend=this.extend,r.superCall=Ahe,r.superApply=Che,r.superClass=i,r}}function xhe(n){return $n(n)&&/^class\s/.test(Function.prototype.toString.call(n))}function rq(n,e){n.extend=e.extend}var whe=Math.round(Math.random()*10);function The(n){var e=["__\0is_clz",whe++].join("_");n.prototype[e]=!0,n.isInstance=function(t){return!!(t&&t[e])}}function Ahe(n,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return this.superClass.prototype[e].apply(n,t)}function Che(n,e,t){return this.superClass.prototype[e].apply(n,t)}function b_(n){var e={};n.registerClass=function(i){var r=i.type||i.prototype.type;if(r){She(r),i.prototype.type=r;var a=zu(r);if(!a.sub)e[a.main]=i;else if(a.sub!==vf){var o=t(a);o[a.sub]=i}}return i},n.getClass=function(i,r,a){var o=e[i];if(o&&o[vf]&&(o=r?o[r]:null),a&&!o)throw new Error(r?"Component "+i+"."+(r||"")+" is used but not imported.":i+".type should be specified.");return o},n.getClassesByMainType=function(i){var r=zu(i),a=[],o=e[r.main];return o&&o[vf]?ne(o,function(s,l){l!==vf&&a.push(s)}):a.push(o),a},n.hasClass=function(i){var r=zu(i);return!!e[r.main]},n.getAllClassMainTypes=function(){var i=[];return ne(e,function(r,a){i.push(a)}),i},n.hasSubTypes=function(i){var r=zu(i),a=e[r.main];return a&&a[vf]};function t(i){var r=e[i.main];return(!r||!r[vf])&&(r=e[i.main]={},r[vf]=!0),r}}function Bp(n,e){for(var t=0;t<n.length;t++)n[t][1]||(n[t][1]=n[t][0]);return e=e||!1,function(i,r,a){for(var o={},s=0;s<n.length;s++){var l=n[s][1];if(!(r&&xi(r,l)>=0||a&&xi(a,l)<0)){var u=i.getShallow(l,e);u!=null&&(o[n[s][0]]=u)}}return o}}var Mhe=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Ehe=Bp(Mhe),Phe=function(){function n(){}return n.prototype.getAreaStyle=function(e,t){return Ehe(this,e,t)},n}(),yA=new m3(50);function Rhe(n){if(typeof n=="string"){var e=yA.get(n);return e&&e.image}else return n}function lE(n,e,t,i,r){if(n)if(typeof n=="string"){if(e&&e.__zrImageSrc===n||!t)return e;var a=yA.get(n),o={hostEl:t,cb:i,cbPayload:r};return a?(e=a.image,!x_(e)&&a.pending.push(o)):(e=Mh.loadImage(n,DN,DN),e.__zrImageSrc=n,yA.put(n,e.__cachedImgObj={image:e,pending:[o]})),e}else return n;else return e}function DN(){var n=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<n.pending.length;e++){var t=n.pending[e],i=t.cb;i&&i(this,t.cbPayload),t.hostEl.dirty()}n.pending.length=0}function x_(n){return n&&n.width&&n.height}var _b=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Lhe(n,e,t,i,r,a){if(!t){n.text="",n.isTruncated=!1;return}var o=(e+"").split(`
`);a=aq(t,i,r,a);for(var s=!1,l={},u=0,c=o.length;u<c;u++)oq(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;n.text=o.join(`
`),n.isTruncated=s}function aq(n,e,t,i){i=i||{};var r=It({},i);r.font=e,t=ai(t,"..."),r.maxIterations=ai(i.maxIterations,2);var a=r.minChar=ai(i.minChar,0);r.cnCharWidth=kl("国",e);var o=r.ascCharWidth=kl("a",e);r.placeholder=ai(i.placeholder,"");for(var s=n=Math.max(0,n-1),l=0;l<a&&s>=o;l++)s-=o;var u=kl(t,e);return u>s&&(t="",u=0),s=n-u,r.ellipsis=t,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=n,r}function oq(n,e,t){var i=t.containerWidth,r=t.font,a=t.contentWidth;if(!i){n.textLine="",n.isTruncated=!1;return}var o=kl(e,r);if(o<=i){n.textLine=e,n.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?Ihe(e,a,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*a/o):0;e=e.substr(0,l),o=kl(e,r)}e===""&&(e=t.placeholder),n.textLine=e,n.isTruncated=!0}function Ihe(n,e,t,i){for(var r=0,a=0,o=n.length;a<o&&r<e;a++){var s=n.charCodeAt(a);r+=0<=s&&s<=127?t:i}return a}function Dhe(n,e){n!=null&&(n+="");var t=e.overflow,i=e.padding,r=e.font,a=t==="truncate",o=S_(r),s=ai(e.lineHeight,o),l=!!e.backgroundColor,u=e.lineOverflow==="truncate",c=!1,d=e.width,h;d!=null&&(t==="break"||t==="breakAll")?h=n?sq(n,e.font,d,t==="breakAll",0).lines:[]:h=n?n.split(`
`):[];var f=h.length*s,p=ai(e.height,f);if(f>p&&u){var m=Math.floor(p/s);c=c||h.length>m,h=h.slice(0,m)}if(n&&a&&d!=null)for(var v=aq(d,r,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),g={},_=0;_<h.length;_++)oq(g,h[_],v),h[_]=g.textLine,c=c||g.isTruncated;for(var S=p,x=0,_=0;_<h.length;_++)x=Math.max(kl(h[_],r),x);d==null&&(d=x);var A=x;return i&&(S+=i[0]+i[2],A+=i[1]+i[3],d+=i[1]+i[3]),l&&(A=d),{lines:h,height:p,outerWidth:A,outerHeight:S,lineHeight:s,calculatedLineHeight:o,contentWidth:x,contentHeight:f,width:d,isTruncated:c}}var Nhe=function(){function n(){}return n}(),NN=function(){function n(e){this.tokens=[],e&&(this.tokens=e)}return n}(),khe=function(){function n(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return n}();function Fhe(n,e){var t=new khe;if(n!=null&&(n+=""),!n)return t;for(var i=e.width,r=e.height,a=e.overflow,o=(a==="break"||a==="breakAll")&&i!=null?{width:i,accumWidth:0,breakAll:a==="breakAll"}:null,s=_b.lastIndex=0,l;(l=_b.exec(n))!=null;){var u=l.index;u>s&&Sb(t,n.substring(s,u),e,o),Sb(t,l[2],e,o,l[1]),s=_b.lastIndex}s<n.length&&Sb(t,n.substring(s,n.length),e,o);var c=[],d=0,h=0,f=e.padding,p=a==="truncate",m=e.lineOverflow==="truncate",v={};function g(ie,he,Ee){ie.width=he,ie.lineHeight=Ee,d+=Ee,h=Math.max(h,he)}e:for(var _=0;_<t.lines.length;_++){for(var S=t.lines[_],x=0,A=0,C=0;C<S.tokens.length;C++){var M=S.tokens[C],I=M.styleName&&e.rich[M.styleName]||{},D=M.textPadding=I.padding,E=D?D[1]+D[3]:0,P=M.font=I.font||e.font;M.contentHeight=S_(P);var F=ai(I.height,M.contentHeight);if(M.innerHeight=F,D&&(F+=D[0]+D[2]),M.height=F,M.lineHeight=Hu(I.lineHeight,e.lineHeight,F),M.align=I&&I.align||e.align,M.verticalAlign=I&&I.verticalAlign||"middle",m&&r!=null&&d+M.lineHeight>r){var V=t.lines.length;C>0?(S.tokens=S.tokens.slice(0,C),g(S,A,x),t.lines=t.lines.slice(0,_+1)):t.lines=t.lines.slice(0,_),t.isTruncated=t.isTruncated||t.lines.length<V;break e}var G=I.width,W=G==null||G==="auto";if(typeof G=="string"&&G.charAt(G.length-1)==="%")M.percentWidth=G,c.push(M),M.contentWidth=kl(M.text,P);else{if(W){var Y=I.backgroundColor,Q=Y&&Y.image;Q&&(Q=Rhe(Q),x_(Q)&&(M.width=Math.max(M.width,Q.width*F/Q.height)))}var K=p&&i!=null?i-A:null;K!=null&&K<M.width?!W||K<E?(M.text="",M.width=M.contentWidth=0):(Lhe(v,M.text,K-E,P,e.ellipsis,{minChar:e.truncateMinChar}),M.text=v.text,t.isTruncated=t.isTruncated||v.isTruncated,M.width=M.contentWidth=kl(M.text,P)):M.contentWidth=kl(M.text,P)}M.width+=E,A+=M.width,I&&(x=Math.max(x,M.lineHeight))}g(S,A,x)}t.outerWidth=t.width=ai(i,h),t.outerHeight=t.height=ai(r,d),t.contentHeight=d,t.contentWidth=h,f&&(t.outerWidth+=f[1]+f[3],t.outerHeight+=f[0]+f[2]);for(var _=0;_<c.length;_++){var M=c[_],ae=M.percentWidth;M.width=parseInt(ae,10)/100*t.width}return t}function Sb(n,e,t,i,r){var a=e==="",o=r&&t.rich[r]||{},s=n.lines,l=o.font||t.font,u=!1,c,d;if(i){var h=o.padding,f=h?h[1]+h[3]:0;if(o.width!=null&&o.width!=="auto"){var p=nu(o.width,i.width)+f;s.length>0&&p+i.accumWidth>i.width&&(c=e.split(`
`),u=!0),i.accumWidth=p}else{var m=sq(e,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=m.accumWidth+f,d=m.linesWidths,c=m.lines}}else c=e.split(`
`);for(var v=0;v<c.length;v++){var g=c[v],_=new Nhe;if(_.styleName=r,_.text=g,_.isLineHolder=!g&&!a,typeof o.width=="number"?_.width=o.width:_.width=d?d[v]:kl(g,l),!v&&!u){var S=(s[s.length-1]||(s[0]=new NN)).tokens,x=S.length;x===1&&S[0].isLineHolder?S[0]=_:(g||!x||a)&&S.push(_)}else s.push(new NN([_]))}}function Ohe(n){var e=n.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var Bhe=Yu(",&?/;] ".split(""),function(n,e){return n[e]=!0,n},{});function zhe(n){return Ohe(n)?!!Bhe[n]:!0}function sq(n,e,t,i,r){for(var a=[],o=[],s="",l="",u=0,c=0,d=0;d<n.length;d++){var h=n.charAt(d);if(h===`
`){l&&(s+=l,c+=u),a.push(s),o.push(c),s="",l="",u=0,c=0;continue}var f=kl(h,e),p=i?!1:!zhe(h);if(a.length?c+f>t:r+c+f>t){c?(s||l)&&(p?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=h,u+=f,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=h,c=f)):p?(a.push(l),o.push(u),l=h,u=f):(a.push(h),o.push(f));continue}c+=f,p?(l+=h,u+=f):(l&&(s+=l,l="",u=0),s+=h)}return!a.length&&!s&&(s=n,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=r),{accumWidth:c,lines:a,linesWidths:o}}var _A="__zr_style_"+Math.round(Math.random()*10),bp={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},w_={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};bp[_A]=!0;var kN=["z","z2","invisible"],Ghe=["invisible"],Uhe=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype._init=function(t){for(var i=Li(t),r=0;r<i.length;r++){var a=i[r];a==="style"?this.useStyle(t[a]):n.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,i,r,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Vhe(this,t,i)||o&&!o[0]&&!o[3])return!1;if(r&&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,i){return this.rectContain(t,i)},e.prototype.traverse=function(t,i){t.call(i,this)},e.prototype.rectContain=function(t,i){var r=this.transformCoordToLocal(t,i),a=this.getBoundingRect();return a.contain(r[0],r[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,r=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new gi(0,0,0,0)),i?gi.applyTransform(t,r,i):t.copy(r),(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 gi(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,i){t!=="style"?n.prototype.attrKV.call(this,t,i):this.style?this.setStyle(i):this.useStyle(i)},e.prototype.setStyle=function(t,i){return typeof t=="string"?this.style[t]=i:It(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=yg,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&yg)},e.prototype.styleUpdated=function(){this.__dirty&=~yg},e.prototype.createStyle=function(t){return g_(bp,t)},e.prototype.useStyle=function(t){t[_A]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[_A]},e.prototype._innerSaveToNormal=function(t){n.prototype._innerSaveToNormal.call(this,t);var i=this._normalState;t.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,i,kN)},e.prototype._applyStateObj=function(t,i,r,a,o,s){n.prototype._applyStateObj.call(this,t,i,r,a,o,s);var l=!(i&&a),u;if(i&&i.style?o?a?u=i.style:(u=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(u,i.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:r.style),this._mergeStyle(u,i.style)):l&&(u=r.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var d=Li(c),h=0;h<d.length;h++){var f=d[h];f in u&&(u[f]=u[f],this.style[f]=c[f])}for(var p=Li(u),h=0;h<p.length;h++){var f=p[h];this.style[f]=this.style[f]}this._transitionState(t,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var m=this.__inHover?Ghe:kN,h=0;h<m.length;h++){var f=m[h];i&&i[f]!=null?this[f]=i[f]:l&&r[f]!=null&&(this[f]=r[f])}},e.prototype._mergeStates=function(t){for(var i=n.prototype._mergeStates.call(this,t),r,a=0;a<t.length;a++){var o=t[a];o.style&&(r=r||{},this._mergeStyle(r,o.style))}return r&&(i.style=r),i},e.prototype._mergeStyle=function(t,i){return It(t,i),t},e.prototype.getAnimationStyleProps=function(){return w_},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=El|yg}(),e}(U$),bb=new gi(0,0,0,0),xb=new gi(0,0,0,0);function Vhe(n,e,t){return bb.copy(n.getBoundingRect()),n.transform&&bb.applyTransform(n.transform),xb.width=e,xb.height=t,!bb.intersect(xb)}const M0=Uhe;var js=Math.min,$s=Math.max,wb=Math.sin,Tb=Math.cos,mf=Math.PI*2,jy=Zp(),$y=Zp(),qy=Zp();function T_(n,e,t){if(n.length!==0){for(var i=n[0],r=i[0],a=i[0],o=i[1],s=i[1],l=1;l<n.length;l++)i=n[l],r=js(r,i[0]),a=$s(a,i[0]),o=js(o,i[1]),s=$s(s,i[1]);e[0]=r,e[1]=o,t[0]=a,t[1]=s}}function FN(n,e,t,i,r,a){r[0]=js(n,t),r[1]=js(e,i),a[0]=$s(n,t),a[1]=$s(e,i)}var ON=[],BN=[];function Hhe(n,e,t,i,r,a,o,s,l,u){var c=T$,d=vo,h=c(n,t,r,o,ON);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var f=0;f<h;f++){var p=d(n,t,r,o,ON[f]);l[0]=js(p,l[0]),u[0]=$s(p,u[0])}h=c(e,i,a,s,BN);for(var f=0;f<h;f++){var m=d(e,i,a,s,BN[f]);l[1]=js(m,l[1]),u[1]=$s(m,u[1])}l[0]=js(n,l[0]),u[0]=$s(n,u[0]),l[0]=js(o,l[0]),u[0]=$s(o,u[0]),l[1]=js(e,l[1]),u[1]=$s(e,u[1]),l[1]=js(s,l[1]),u[1]=$s(s,u[1])}function Whe(n,e,t,i,r,a,o,s){var l=C$,u=Po,c=$s(js(l(n,t,r),1),0),d=$s(js(l(e,i,a),1),0),h=u(n,t,r,c),f=u(e,i,a,d);o[0]=js(n,r,h),o[1]=js(e,a,f),s[0]=$s(n,r,h),s[1]=$s(e,a,f)}function jhe(n,e,t,i,r,a,o,s,l){var u=th,c=nh,d=Math.abs(r-a);if(d%mf<1e-4&&d>1e-4){s[0]=n-t,s[1]=e-i,l[0]=n+t,l[1]=e+i;return}if(jy[0]=Tb(r)*t+n,jy[1]=wb(r)*i+e,$y[0]=Tb(a)*t+n,$y[1]=wb(a)*i+e,u(s,jy,$y),c(l,jy,$y),r=r%mf,r<0&&(r=r+mf),a=a%mf,a<0&&(a=a+mf),r>a&&!o?a+=mf:r<a&&o&&(r+=mf),o){var h=a;a=r,r=h}for(var f=0;f<a;f+=Math.PI/2)f>r&&(qy[0]=Tb(f)*t+n,qy[1]=wb(f)*i+e,u(s,qy,s),c(l,qy,l))}var Rr={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},gf=[],yf=[],pu=[],Td=[],vu=[],mu=[],Ab=Math.min,Cb=Math.max,_f=Math.cos,Sf=Math.sin,gc=Math.abs,SA=Math.PI,Ud=SA*2,Mb=typeof Float32Array!="undefined",Rm=[];function Eb(n){var e=Math.round(n/SA*1e8)/1e8;return e%2*SA}function uE(n,e){var t=Eb(n[0]);t<0&&(t+=Ud);var i=t-n[0],r=n[1];r+=i,!e&&r-t>=Ud?r=t+Ud:e&&t-r>=Ud?r=t-Ud:!e&&t>r?r=t+(Ud-Eb(t-r)):e&&t<r&&(r=t-(Ud-Eb(r-t))),n[0]=t,n[1]=r}var Qu=function(){function n(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 n.prototype.increaseVersion=function(){this._version++},n.prototype.getVersion=function(){return this._version},n.prototype.setScale=function(e,t,i){i=i||0,i>0&&(this._ux=gc(i/H5/e)||0,this._uy=gc(i/H5/t)||0)},n.prototype.setDPR=function(e){this.dpr=e},n.prototype.setContext=function(e){this._ctx=e},n.prototype.getContext=function(){return this._ctx},n.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},n.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},n.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Rr.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},n.prototype.lineTo=function(e,t){var i=gc(e-this._xi),r=gc(t-this._yi),a=i>this._ux||r>this._uy;if(this.addData(Rr.L,e,t),this._ctx&&a&&this._ctx.lineTo(e,t),a)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=i*i+r*r;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},n.prototype.bezierCurveTo=function(e,t,i,r,a,o){return this._drawPendingPt(),this.addData(Rr.C,e,t,i,r,a,o),this._ctx&&this._ctx.bezierCurveTo(e,t,i,r,a,o),this._xi=a,this._yi=o,this},n.prototype.quadraticCurveTo=function(e,t,i,r){return this._drawPendingPt(),this.addData(Rr.Q,e,t,i,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,i,r),this._xi=i,this._yi=r,this},n.prototype.arc=function(e,t,i,r,a,o){this._drawPendingPt(),Rm[0]=r,Rm[1]=a,uE(Rm,o),r=Rm[0],a=Rm[1];var s=a-r;return this.addData(Rr.A,e,t,i,i,r,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,i,r,a,o),this._xi=_f(a)*i+e,this._yi=Sf(a)*i+t,this},n.prototype.arcTo=function(e,t,i,r,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,i,r,a),this},n.prototype.rect=function(e,t,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,i,r),this.addData(Rr.R,e,t,i,r),this},n.prototype.closePath=function(){this._drawPendingPt(),this.addData(Rr.Z);var e=this._ctx,t=this._x0,i=this._y0;return e&&e.closePath(),this._xi=t,this._yi=i,this},n.prototype.fill=function(e){e&&e.fill(),this.toStatic()},n.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},n.prototype.len=function(){return this._len},n.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&Mb&&(this.data=new Float32Array(t));for(var i=0;i<t;i++)this.data[i]=e[i];this._len=t},n.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,i=0,r=this._len,a=0;a<t;a++)i+=e[a].len();Mb&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+i));for(var a=0;a<t;a++)for(var o=e[a].data,s=0;s<o.length;s++)this.data[r++]=o[s];this._len=r},n.prototype.addData=function(e,t,i,r,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 d=0;d<arguments.length;d++)c[this._len++]=arguments[d]}},n.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},n.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}},n.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,Mb&&this._len>11&&(this.data=new Float32Array(e)))}},n.prototype.getBoundingRect=function(){pu[0]=pu[1]=vu[0]=vu[1]=Number.MAX_VALUE,Td[0]=Td[1]=mu[0]=mu[1]=-Number.MAX_VALUE;var e=this.data,t=0,i=0,r=0,a=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(t=e[o],i=e[o+1],r=t,a=i),s){case Rr.M:t=r=e[o++],i=a=e[o++],vu[0]=r,vu[1]=a,mu[0]=r,mu[1]=a;break;case Rr.L:FN(t,i,e[o],e[o+1],vu,mu),t=e[o++],i=e[o++];break;case Rr.C:Hhe(t,i,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],vu,mu),t=e[o++],i=e[o++];break;case Rr.Q:Whe(t,i,e[o++],e[o++],e[o],e[o+1],vu,mu),t=e[o++],i=e[o++];break;case Rr.A:var u=e[o++],c=e[o++],d=e[o++],h=e[o++],f=e[o++],p=e[o++]+f;o+=1;var m=!e[o++];l&&(r=_f(f)*d+u,a=Sf(f)*h+c),jhe(u,c,d,h,f,p,m,vu,mu),t=_f(p)*d+u,i=Sf(p)*h+c;break;case Rr.R:r=t=e[o++],a=i=e[o++];var v=e[o++],g=e[o++];FN(r,a,r+v,a+g,vu,mu);break;case Rr.Z:t=r,i=a;break}th(pu,pu,vu),nh(Td,Td,mu)}return o===0&&(pu[0]=pu[1]=Td[0]=Td[1]=0),new gi(pu[0],pu[1],Td[0]-pu[0],Td[1]-pu[1])},n.prototype._calculateLength=function(){var e=this.data,t=this._len,i=this._ux,r=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,d=0,h=0;h<t;){var f=e[h++],p=h===1;p&&(a=e[h],o=e[h+1],s=a,l=o);var m=-1;switch(f){case Rr.M:a=s=e[h++],o=l=e[h++];break;case Rr.L:{var v=e[h++],g=e[h++],_=v-a,S=g-o;(gc(_)>i||gc(S)>r||h===t-1)&&(m=Math.sqrt(_*_+S*S),a=v,o=g);break}case Rr.C:{var x=e[h++],A=e[h++],v=e[h++],g=e[h++],C=e[h++],M=e[h++];m=ade(a,o,x,A,v,g,C,M,10),a=C,o=M;break}case Rr.Q:{var x=e[h++],A=e[h++],v=e[h++],g=e[h++];m=sde(a,o,x,A,v,g,10),a=v,o=g;break}case Rr.A:var I=e[h++],D=e[h++],E=e[h++],P=e[h++],F=e[h++],V=e[h++],G=V+F;h+=1,p&&(s=_f(F)*E+I,l=Sf(F)*P+D),m=Cb(E,P)*Ab(Ud,Math.abs(V)),a=_f(G)*E+I,o=Sf(G)*P+D;break;case Rr.R:{s=a=e[h++],l=o=e[h++];var W=e[h++],Y=e[h++];m=W*2+Y*2;break}case Rr.Z:{var _=s-a,S=l-o;m=Math.sqrt(_*_+S*S),a=s,o=l;break}}m>=0&&(u[d++]=m,c+=m)}return this._pathLen=c,c},n.prototype.rebuildPath=function(e,t){var i=this.data,r=this._ux,a=this._uy,o=this._len,s,l,u,c,d,h,f=t<1,p,m,v=0,g=0,_,S=0,x,A;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))e:for(var C=0;C<o;){var M=i[C++],I=C===1;switch(I&&(u=i[C],c=i[C+1],s=u,l=c),M!==Rr.L&&S>0&&(e.lineTo(x,A),S=0),M){case Rr.M:s=u=i[C++],l=c=i[C++],e.moveTo(u,c);break;case Rr.L:{d=i[C++],h=i[C++];var D=gc(d-u),E=gc(h-c);if(D>r||E>a){if(f){var P=p[g++];if(v+P>_){var F=(_-v)/P;e.lineTo(u*(1-F)+d*F,c*(1-F)+h*F);break e}v+=P}e.lineTo(d,h),u=d,c=h,S=0}else{var V=D*D+E*E;V>S&&(x=d,A=h,S=V)}break}case Rr.C:{var G=i[C++],W=i[C++],Y=i[C++],Q=i[C++],K=i[C++],ae=i[C++];if(f){var P=p[g++];if(v+P>_){var F=(_-v)/P;Eh(u,G,Y,K,F,gf),Eh(c,W,Q,ae,F,yf),e.bezierCurveTo(gf[1],yf[1],gf[2],yf[2],gf[3],yf[3]);break e}v+=P}e.bezierCurveTo(G,W,Y,Q,K,ae),u=K,c=ae;break}case Rr.Q:{var G=i[C++],W=i[C++],Y=i[C++],Q=i[C++];if(f){var P=p[g++];if(v+P>_){var F=(_-v)/P;w9(u,G,Y,F,gf),w9(c,W,Q,F,yf),e.quadraticCurveTo(gf[1],yf[1],gf[2],yf[2]);break e}v+=P}e.quadraticCurveTo(G,W,Y,Q),u=Y,c=Q;break}case Rr.A:var ie=i[C++],he=i[C++],Ee=i[C++],He=i[C++],xe=i[C++],Fe=i[C++],pt=i[C++],Ot=!i[C++],bt=Ee>He?Ee:He,ht=gc(Ee-He)>.001,Kt=xe+Fe,Tt=!1;if(f){var P=p[g++];v+P>_&&(Kt=xe+Fe*(_-v)/P,Tt=!0),v+=P}if(ht&&e.ellipse?e.ellipse(ie,he,Ee,He,pt,xe,Kt,Ot):e.arc(ie,he,bt,xe,Kt,Ot),Tt)break e;I&&(s=_f(xe)*Ee+ie,l=Sf(xe)*He+he),u=_f(Kt)*Ee+ie,c=Sf(Kt)*He+he;break;case Rr.R:s=u=i[C],l=c=i[C+1],d=i[C++],h=i[C++];var Ae=i[C++],Lt=i[C++];if(f){var P=p[g++];if(v+P>_){var vt=_-v;e.moveTo(d,h),e.lineTo(d+Ab(vt,Ae),h),vt-=Ae,vt>0&&e.lineTo(d+Ae,h+Ab(vt,Lt)),vt-=Lt,vt>0&&e.lineTo(d+Cb(Ae-vt,0),h+Lt),vt-=Ae,vt>0&&e.lineTo(d,h+Cb(Lt-vt,0));break e}v+=P}e.rect(d,h,Ae,Lt);break;case Rr.Z:if(f){var P=p[g++];if(v+P>_){var F=(_-v)/P;e.lineTo(u*(1-F)+s*F,c*(1-F)+l*F);break e}v+=P}e.closePath(),u=s,c=l}}},n.prototype.clone=function(){var e=new n,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},n.CMD=Rr,n.initDefaultProps=function(){var e=n.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),n}();function Hd(n,e,t,i,r,a,o){if(r===0)return!1;var s=r,l=0,u=n;if(o>e+s&&o>i+s||o<e-s&&o<i-s||a>n+s&&a>t+s||a<n-s&&a<t-s)return!1;if(n!==t)l=(e-i)/(n-t),u=(n*i-t*e)/(n-t);else return Math.abs(a-n)<=s/2;var c=l*a-o+u,d=c*c/(l*l+1);return d<=s/2*s/2}function $he(n,e,t,i,r,a,o,s,l,u,c){if(l===0)return!1;var d=l;if(c>e+d&&c>i+d&&c>a+d&&c>s+d||c<e-d&&c<i-d&&c<a-d&&c<s-d||u>n+d&&u>t+d&&u>r+d&&u>o+d||u<n-d&&u<t-d&&u<r-d&&u<o-d)return!1;var h=A$(n,e,t,i,r,a,o,s,u,c,null);return h<=d/2}function lq(n,e,t,i,r,a,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>i+u&&l>a+u||l<e-u&&l<i-u&&l<a-u||s>n+u&&s>t+u&&s>r+u||s<n-u&&s<t-u&&s<r-u)return!1;var c=M$(n,e,t,i,r,a,s,l,null);return c<=u/2}var zN=Math.PI*2;function Ll(n){return n%=zN,n<0&&(n+=zN),n}var Lm=Math.PI*2;function qhe(n,e,t,i,r,a,o,s,l){if(o===0)return!1;var u=o;s-=n,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>t||c+u<t)return!1;if(Math.abs(i-r)%Lm<1e-4)return!0;if(a){var d=i;i=Ll(r),r=Ll(d)}else i=Ll(i),r=Ll(r);i>r&&(r+=Lm);var h=Math.atan2(l,s);return h<0&&(h+=Lm),h>=i&&h<=r||h+Lm>=i&&h+Lm<=r}function Pc(n,e,t,i,r,a){if(a>e&&a>i||a<e&&a<i||i===e)return 0;var o=(a-e)/(i-e),s=i<e?1:-1;(o===1||o===0)&&(s=i<e?.5:-.5);var l=o*(t-n)+n;return l===r?1/0:l>r?s:0}var Ad=Qu.CMD,bf=Math.PI*2,Xhe=1e-4;function Yhe(n,e){return Math.abs(n-e)<Xhe}var Cs=[-1,-1,-1],u0=[-1,-1];function Khe(){var n=u0[0];u0[0]=u0[1],u0[1]=n}function Zhe(n,e,t,i,r,a,o,s,l,u){if(u>e&&u>i&&u>a&&u>s||u<e&&u<i&&u<a&&u<s)return 0;var c=z5(e,i,a,s,u,Cs);if(c===0)return 0;for(var d=0,h=-1,f=void 0,p=void 0,m=0;m<c;m++){var v=Cs[m],g=v===0||v===1?.5:1,_=vo(n,t,r,o,v);_<l||(h<0&&(h=T$(e,i,a,s,u0),u0[1]<u0[0]&&h>1&&Khe(),f=vo(e,i,a,s,u0[0]),h>1&&(p=vo(e,i,a,s,u0[1]))),h===2?v<u0[0]?d+=f<e?g:-g:v<u0[1]?d+=p<f?g:-g:d+=s<p?g:-g:v<u0[0]?d+=f<e?g:-g:d+=s<f?g:-g)}return d}function Jhe(n,e,t,i,r,a,o,s){if(s>e&&s>i&&s>a||s<e&&s<i&&s<a)return 0;var l=ode(e,i,a,s,Cs);if(l===0)return 0;var u=C$(e,i,a);if(u>=0&&u<=1){for(var c=0,d=Po(e,i,a,u),h=0;h<l;h++){var f=Cs[h]===0||Cs[h]===1?.5:1,p=Po(n,t,r,Cs[h]);p<o||(Cs[h]<u?c+=d<e?f:-f:c+=a<d?f:-f)}return c}else{var f=Cs[0]===0||Cs[0]===1?.5:1,p=Po(n,t,r,Cs[0]);return p<o?0:a<e?f:-f}}function Qhe(n,e,t,i,r,a,o,s){if(s-=e,s>t||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Cs[0]=-l,Cs[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=bf-1e-4){i=0,r=bf;var c=a?1:-1;return o>=Cs[0]+n&&o<=Cs[1]+n?c:0}if(i>r){var d=i;i=r,r=d}i<0&&(i+=bf,r+=bf);for(var h=0,f=0;f<2;f++){var p=Cs[f];if(p+n>o){var m=Math.atan2(s,p),c=a?1:-1;m<0&&(m=bf+m),(m>=i&&m<=r||m+bf>=i&&m+bf<=r)&&(m>Math.PI/2&&m<Math.PI*1.5&&(c=-c),h+=c)}}return h}function uq(n,e,t,i,r){for(var a=n.data,o=n.len(),s=0,l=0,u=0,c=0,d=0,h,f,p=0;p<o;){var m=a[p++],v=p===1;switch(m===Ad.M&&p>1&&(t||(s+=Pc(l,u,c,d,i,r))),v&&(l=a[p],u=a[p+1],c=l,d=u),m){case Ad.M:c=a[p++],d=a[p++],l=c,u=d;break;case Ad.L:if(t){if(Hd(l,u,a[p],a[p+1],e,i,r))return!0}else s+=Pc(l,u,a[p],a[p+1],i,r)||0;l=a[p++],u=a[p++];break;case Ad.C:if(t){if($he(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,i,r))return!0}else s+=Zhe(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],i,r)||0;l=a[p++],u=a[p++];break;case Ad.Q:if(t){if(lq(l,u,a[p++],a[p++],a[p],a[p+1],e,i,r))return!0}else s+=Jhe(l,u,a[p++],a[p++],a[p],a[p+1],i,r)||0;l=a[p++],u=a[p++];break;case Ad.A:var g=a[p++],_=a[p++],S=a[p++],x=a[p++],A=a[p++],C=a[p++];p+=1;var M=!!(1-a[p++]);h=Math.cos(A)*S+g,f=Math.sin(A)*x+_,v?(c=h,d=f):s+=Pc(l,u,h,f,i,r);var I=(i-g)*x/S+g;if(t){if(qhe(g,_,x,A,A+C,M,e,I,r))return!0}else s+=Qhe(g,_,x,A,A+C,M,I,r);l=Math.cos(A+C)*S+g,u=Math.sin(A+C)*x+_;break;case Ad.R:c=l=a[p++],d=u=a[p++];var D=a[p++],E=a[p++];if(h=c+D,f=d+E,t){if(Hd(c,d,h,d,e,i,r)||Hd(h,d,h,f,e,i,r)||Hd(h,f,c,f,e,i,r)||Hd(c,f,c,d,e,i,r))return!0}else s+=Pc(h,d,h,f,i,r),s+=Pc(c,f,c,d,i,r);break;case Ad.Z:if(t){if(Hd(l,u,c,d,e,i,r))return!0}else s+=Pc(l,u,c,d,i,r);l=c,u=d;break}}return!t&&!Yhe(u,d)&&(s+=Pc(l,u,c,d,i,r)||0),s!==0}function efe(n,e,t){return uq(n,0,!1,e,t)}function tfe(n,e,t,i){return uq(n,e,!0,t,i)}var j5=qn({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},bp),nfe={style:qn({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},w_.style)},Pb=Zu.concat(["invisible","culling","z","z2","zlevel","parent"]),ife=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.update=function(){var t=this;n.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(l){t.buildPath(l,t.shape)}),r.silent=!0;var a=r.style;for(var o in i)a[o]!==i[o]&&(a[o]=i[o]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var s=0;s<Pb.length;++s)r[Pb[s]]=this[Pb[s]];r.__dirty|=El}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var i=Li(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var a=0;a<i.length;a++){var o=i[a],s=t[o];o==="style"?this.style?It(this.style,s):this.useStyle(s):o==="shape"?It(this.shape,s):n.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(xn(t)){var i=U5(t,0);return i>.5?pA:i>.2?Bde:vA}else if(t)return vA}return pA},e.prototype.getInsideTextStroke=function(t){var i=this.style.fill;if(xn(i)){var r=this.__zr,a=!!(r&&r.isDarkMode()),o=U5(t,0)<fA;if(a===o)return i}},e.prototype.buildPath=function(t,i,r){},e.prototype.pathUpdated=function(){this.__dirty&=~y2},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 Qu(!1)},e.prototype.hasStroke=function(){var t=this.style,i=t.stroke;return!(i==null||i==="none"||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,i=this.style,r=!t;if(r){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&y2)&&(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||r){s.copy(t);var l=i.strokeNoScale?this.getLineScale():1,u=i.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,i){var r=this.transformCoordToLocal(t,i),a=this.getBoundingRect(),o=this.style;if(t=r[0],i=r[1],a.contain(t,i)){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)),tfe(s,l/u,t,i)))return!0}if(this.hasFill())return efe(s,t,i)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=y2,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,i){t==="shape"?this.setShape(i):n.prototype.attrKV.call(this,t,i)},e.prototype.setShape=function(t,i){var r=this.shape;return r||(r=this.shape={}),typeof t=="string"?r[t]=i:It(r,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&y2)},e.prototype.createStyle=function(t){return g_(j5,t)},e.prototype._innerSaveToNormal=function(t){n.prototype._innerSaveToNormal.call(this,t);var i=this._normalState;t.shape&&!i.shape&&(i.shape=It({},this.shape))},e.prototype._applyStateObj=function(t,i,r,a,o,s){n.prototype._applyStateObj.call(this,t,i,r,a,o,s);var l=!(i&&a),u;if(i&&i.shape?o?a?u=i.shape:(u=It({},r.shape),It(u,i.shape)):(u=It({},a?this.shape:r.shape),It(u,i.shape)):l&&(u=r.shape),u)if(o){this.shape=It({},this.shape);for(var c={},d=Li(u),h=0;h<d.length;h++){var f=d[h];typeof u[f]=="object"?this.shape[f]=u[f]:c[f]=u[f]}this._transitionState(t,{shape:c},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(t){for(var i=n.prototype._mergeStates.call(this,t),r,a=0;a<t.length;a++){var o=t[a];o.shape&&(r=r||{},this._mergeStyle(r,o.shape))}return r&&(i.shape=r),i},e.prototype.getAnimationStyleProps=function(){return nfe},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var i=function(a){ot(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 Zn(t.style)},o.prototype.getDefaultShape=function(){return Zn(t.shape)},o}(e);for(var r in t)typeof t[r]=="function"&&(i.prototype[r]=t[r]);return i},e.initDefaultProps=function(){var t=e.prototype;t.type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=El|yg|y2}(),e}(M0);const Ei=ife;var rfe=qn({strokeFirst:!0,font:Ch,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},j5),cq=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.hasStroke=function(){var t=this.style,i=t.stroke;return i!=null&&i!=="none"&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.createStyle=function(t){return g_(rfe,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var i=t.text;i!=null?i+="":i="";var r=g3(i,t.font,t.textAlign,t.textBaseline);if(r.x+=t.x||0,r.y+=t.y||0,this.hasStroke()){var a=t.lineWidth;r.x-=a/2,r.y-=a/2,r.width+=a,r.height+=a}this._rect=r}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(M0);cq.prototype.type="tspan";const E9=cq;var afe=qn({x:0,y:0},bp),ofe={style:qn({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},w_.style)};function sfe(n){return!!(n&&typeof n!="string"&&n.width&&n.height)}var dq=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return g_(afe,t)},e.prototype._getSize=function(t){var i=this.style,r=i[t];if(r!=null)return r;var a=sfe(i.image)?i.image:this.__image;if(!a)return 0;var o=t==="width"?"height":"width",s=i[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 ofe},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new gi(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(M0);dq.prototype.type="image";const qo=dq;function lfe(n,e){var t=e.x,i=e.y,r=e.width,a=e.height,o=e.r,s,l,u,c;r<0&&(t=t+r,r=-r),a<0&&(i=i+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 d;s+l>r&&(d=s+l,s*=r/d,l*=r/d),u+c>r&&(d=u+c,u*=r/d,c*=r/d),l+u>a&&(d=l+u,l*=a/d,u*=a/d),s+c>a&&(d=s+c,s*=a/d,c*=a/d),n.moveTo(t+s,i),n.lineTo(t+r-l,i),l!==0&&n.arc(t+r-l,i+l,l,-Math.PI/2,0),n.lineTo(t+r,i+a-u),u!==0&&n.arc(t+r-u,i+a-u,u,0,Math.PI/2),n.lineTo(t+c,i+a),c!==0&&n.arc(t+c,i+a-c,c,Math.PI/2,Math.PI),n.lineTo(t,i+s),s!==0&&n.arc(t+s,i+s,s,Math.PI,Math.PI*1.5)}var L2=Math.round;function hq(n,e,t){if(e){var i=e.x1,r=e.x2,a=e.y1,o=e.y2;n.x1=i,n.x2=r,n.y1=a,n.y2=o;var s=t&&t.lineWidth;return s&&(L2(i*2)===L2(r*2)&&(n.x1=n.x2=rp(i,s,!0)),L2(a*2)===L2(o*2)&&(n.y1=n.y2=rp(a,s,!0))),n}}function fq(n,e,t){if(e){var i=e.x,r=e.y,a=e.width,o=e.height;n.x=i,n.y=r,n.width=a,n.height=o;var s=t&&t.lineWidth;return s&&(n.x=rp(i,s,!0),n.y=rp(r,s,!0),n.width=Math.max(rp(i+a,s,!1)-n.x,a===0?0:1),n.height=Math.max(rp(r+o,s,!1)-n.y,o===0?0:1)),n}}function rp(n,e,t){if(!e)return n;var i=L2(n*2);return(i+L2(e))%2===0?i/2:(i+(t?1:-1))/2}var ufe=function(){function n(){this.x=0,this.y=0,this.width=0,this.height=0}return n}(),cfe={},pq=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new ufe},e.prototype.buildPath=function(t,i){var r,a,o,s;if(this.subPixelOptimize){var l=fq(cfe,i,this.style);r=l.x,a=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else r=i.x,a=i.y,o=i.width,s=i.height;i.r?lfe(t,i):t.rect(r,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Ei);pq.prototype.type="rect";const Hi=pq;var GN={fill:"#000"},UN=2,dfe={style:qn({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},w_.style)},vq=function(n){ot(e,n);function e(t){var i=n.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=GN,i.attr(t),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){n.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var i=this._children[t];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},e.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):n.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(t){var i=this.innerTransformable;return i?i.getLocalTransform(t):n.prototype.getLocalTransform.call(this,t)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),n.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,pfe(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(t){n.prototype.addSelfToZr.call(this,t);for(var i=0;i<this._children.length;i++)this._children[i].__zr=t},e.prototype.removeSelfFromZr=function(t){n.prototype.removeSelfFromZr.call(this,t);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new gi(0,0,0,0),i=this._children,r=[],a=null,o=0;o<i.length;o++){var s=i[o],l=s.getBoundingRect(),u=s.getLocalTransform(r);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||GN},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,i){if(!i)return t;var r=i.rich,a=t.rich||r&&{};return It(t,i),r&&a?(this._mergeRich(a,r),t.rich=a):a&&(t.rich=a),t},e.prototype._mergeRich=function(t,i){for(var r=Li(i),a=0;a<r.length;a++){var o=r[a];t[o]=t[o]||{},It(t[o],i[o])}},e.prototype.getAnimationStyleProps=function(){return dfe},e.prototype._getOrCreateChild=function(t){var i=this._children[this._childCursor];return(!i||!(i instanceof t))&&(i=new t),this._children[this._childCursor++]=i,i.__zr=this.__zr,i.parent=this,i},e.prototype._updatePlainTexts=function(){var t=this.style,i=t.font||Ch,r=t.padding,a=XN(t),o=Dhe(a,t),s=Rb(t),l=!!t.backgroundColor,u=o.outerHeight,c=o.outerWidth,d=o.contentWidth,h=o.lines,f=o.lineHeight,p=this._defaultStyle;this.isTruncated=!!o.isTruncated;var m=t.x||0,v=t.y||0,g=t.align||p.align||"left",_=t.verticalAlign||p.verticalAlign||"top",S=m,x=_2(v,o.contentHeight,_);if(s||r){var A=Sg(m,c,g),C=_2(v,u,_);s&&this._renderBackground(t,t,A,C,c,u)}x+=f/2,r&&(S=qN(m,g,r),_==="top"?x+=r[0]:_==="bottom"&&(x-=r[2]));for(var M=0,I=!1,D=$N("fill"in t?t.fill:(I=!0,p.fill)),E=jN("stroke"in t?t.stroke:!l&&(!p.autoStroke||I)?(M=UN,p.stroke):null),P=t.textShadowBlur>0,F=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),V=o.calculatedLineHeight,G=0;G<h.length;G++){var W=this._getOrCreateChild(E9),Y=W.createStyle();W.useStyle(Y),Y.text=h[G],Y.x=S,Y.y=x,g&&(Y.textAlign=g),Y.textBaseline="middle",Y.opacity=t.opacity,Y.strokeFirst=!0,P&&(Y.shadowBlur=t.textShadowBlur||0,Y.shadowColor=t.textShadowColor||"transparent",Y.shadowOffsetX=t.textShadowOffsetX||0,Y.shadowOffsetY=t.textShadowOffsetY||0),Y.stroke=E,Y.fill=D,E&&(Y.lineWidth=t.lineWidth||M,Y.lineDash=t.lineDash,Y.lineDashOffset=t.lineDashOffset||0),Y.font=i,HN(Y,t),x+=f,F&&W.setBoundingRect(new gi(Sg(Y.x,d,Y.textAlign),_2(Y.y,V,Y.textBaseline),d,V))}},e.prototype._updateRichTexts=function(){var t=this.style,i=XN(t),r=Fhe(i,t),a=r.width,o=r.outerWidth,s=r.outerHeight,l=t.padding,u=t.x||0,c=t.y||0,d=this._defaultStyle,h=t.align||d.align,f=t.verticalAlign||d.verticalAlign;this.isTruncated=!!r.isTruncated;var p=Sg(u,o,h),m=_2(c,s,f),v=p,g=m;l&&(v+=l[3],g+=l[0]);var _=v+a;Rb(t)&&this._renderBackground(t,t,p,m,o,s);for(var S=!!t.backgroundColor,x=0;x<r.lines.length;x++){for(var A=r.lines[x],C=A.tokens,M=C.length,I=A.lineHeight,D=A.width,E=0,P=v,F=_,V=M-1,G=void 0;E<M&&(G=C[E],!G.align||G.align==="left");)this._placeToken(G,t,I,g,P,"left",S),D-=G.width,P+=G.width,E++;for(;V>=0&&(G=C[V],G.align==="right");)this._placeToken(G,t,I,g,F,"right",S),D-=G.width,F-=G.width,V--;for(P+=(a-(P-v)-(_-F)-D)/2;E<=V;)G=C[E],this._placeToken(G,t,I,g,P+G.width/2,"center",S),P+=G.width,E++;g+=I}},e.prototype._placeToken=function(t,i,r,a,o,s,l){var u=i.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,d=a+r/2;c==="top"?d=a+t.height/2:c==="bottom"&&(d=a+r-t.height/2);var h=!t.isLineHolder&&Rb(u);h&&this._renderBackground(u,i,s==="right"?o-t.width:s==="center"?o-t.width/2:o,d-t.height/2,t.width,t.height);var f=!!u.backgroundColor,p=t.textPadding;p&&(o=qN(o,s,p),d-=t.height/2-p[0]-t.innerHeight/2);var m=this._getOrCreateChild(E9),v=m.createStyle();m.useStyle(v);var g=this._defaultStyle,_=!1,S=0,x=$N("fill"in u?u.fill:"fill"in i?i.fill:(_=!0,g.fill)),A=jN("stroke"in u?u.stroke:"stroke"in i?i.stroke:!f&&!l&&(!g.autoStroke||_)?(S=UN,g.stroke):null),C=u.textShadowBlur>0||i.textShadowBlur>0;v.text=t.text,v.x=o,v.y=d,C&&(v.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,v.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",v.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,v.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),v.textAlign=s,v.textBaseline="middle",v.font=t.font||Ch,v.opacity=Hu(u.opacity,i.opacity,1),HN(v,u),A&&(v.lineWidth=Hu(u.lineWidth,i.lineWidth,S),v.lineDash=ai(u.lineDash,i.lineDash),v.lineDashOffset=i.lineDashOffset||0,v.stroke=A),x&&(v.fill=x);var M=t.contentWidth,I=t.contentHeight;m.setBoundingRect(new gi(Sg(v.x,M,v.textAlign),_2(v.y,I,v.textBaseline),M,I))},e.prototype._renderBackground=function(t,i,r,a,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,d=l&&l.image,h=l&&!d,f=t.borderRadius,p=this,m,v;if(h||t.lineHeight||u&&c){m=this._getOrCreateChild(Hi),m.useStyle(m.createStyle()),m.style.fill=null;var g=m.shape;g.x=r,g.y=a,g.width=o,g.height=s,g.r=f,m.dirtyShape()}if(h){var _=m.style;_.fill=l||null,_.fillOpacity=ai(t.fillOpacity,1)}else if(d){v=this._getOrCreateChild(qo),v.onload=function(){p.dirtyStyle()};var S=v.style;S.image=l.image,S.x=r,S.y=a,S.width=o,S.height=s}if(u&&c){var _=m.style;_.lineWidth=u,_.stroke=c,_.strokeOpacity=ai(t.strokeOpacity,1),_.lineDash=t.borderDash,_.lineDashOffset=t.borderDashOffset||0,m.strokeContainThreshold=0,m.hasFill()&&m.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var x=(m||v).style;x.shadowBlur=t.shadowBlur||0,x.shadowColor=t.shadowColor||"transparent",x.shadowOffsetX=t.shadowOffsetX||0,x.shadowOffsetY=t.shadowOffsetY||0,x.opacity=Hu(t.opacity,i.opacity,1)},e.makeFont=function(t){var i="";return gq(t)&&(i=[t.fontStyle,t.fontWeight,mq(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),i&&K0(i)||t.textFont||t.font},e}(M0),hfe={left:!0,right:1,center:1},ffe={top:1,bottom:1,middle:1},VN=["fontStyle","fontWeight","fontSize","fontFamily"];function mq(n){return typeof n=="string"&&(n.indexOf("px")!==-1||n.indexOf("rem")!==-1||n.indexOf("em")!==-1)?n:isNaN(+n)?WM+"px":n+"px"}function HN(n,e){for(var t=0;t<VN.length;t++){var i=VN[t],r=e[i];r!=null&&(n[i]=r)}}function gq(n){return n.fontSize!=null||n.fontFamily||n.fontWeight}function pfe(n){return WN(n),ne(n.rich,WN),n}function WN(n){if(n){n.font=vq.makeFont(n);var e=n.align;e==="middle"&&(e="center"),n.align=e==null||hfe[e]?e:"left";var t=n.verticalAlign;t==="center"&&(t="middle"),n.verticalAlign=t==null||ffe[t]?t:"top";var i=n.padding;i&&(n.padding=KM(n.padding))}}function jN(n,e){return n==null||e<=0||n==="transparent"||n==="none"?null:n.image||n.colorStops?"#000":n}function $N(n){return n==null||n==="none"?null:n.image||n.colorStops?"#000":n}function qN(n,e,t){return e==="right"?n-t[1]:e==="center"?n+t[3]/2-t[1]/2:n+t[3]}function XN(n){var e=n.text;return e!=null&&(e+=""),e}function Rb(n){return!!(n.backgroundColor||n.lineHeight||n.borderWidth&&n.borderColor)}const Xi=vq;var ni=Gi(),bA=function(n,e,t,i){if(i){var r=ni(i);r.dataIndex=t,r.dataType=e,r.seriesIndex=n,r.ssrType="chart",i.type==="group"&&i.traverse(function(a){var o=ni(a);o.seriesIndex=n,o.dataIndex=t,o.dataType=e,o.ssrType="chart"})}},YN=1,KN={},yq=Gi(),cE=Gi(),dE=0,_3=1,A_=2,Is=["emphasis","blur","select"],P9=["normal","emphasis","blur","select"],Gv=10,vfe=9,xp="highlight",n5="downplay",Wg="select",i5="unselect",jg="toggleSelect";function R1(n){return n!=null&&n!=="none"}function C_(n,e,t){n.onHoverStateChange&&(n.hoverState||0)!==t&&n.onHoverStateChange(e),n.hoverState=t}function _q(n){C_(n,"emphasis",A_)}function Sq(n){n.hoverState===A_&&C_(n,"normal",dE)}function hE(n){C_(n,"blur",_3)}function bq(n){n.hoverState===_3&&C_(n,"normal",dE)}function mfe(n){n.selected=!0}function gfe(n){n.selected=!1}function ZN(n,e,t){e(n,t)}function td(n,e,t){ZN(n,e,t),n.isGroup&&n.traverse(function(i){ZN(i,e,t)})}function $5(n,e){switch(e){case"emphasis":n.hoverState=A_;break;case"normal":n.hoverState=dE;break;case"blur":n.hoverState=_3;break;case"select":n.selected=!0}}function yfe(n,e,t,i){for(var r=n.style,a={},o=0;o<e.length;o++){var s=e[o],l=r[s];a[s]=l==null?i&&i[s]:l}for(var o=0;o<n.animators.length;o++){var u=n.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(t)<0&&u.targetName==="style"&&u.saveTo(a,e)}return a}function _fe(n,e,t,i){var r=t&&xi(t,"select")>=0,a=!1;if(n instanceof Ei){var o=yq(n),s=r&&o.selectFill||o.normalFill,l=r&&o.selectStroke||o.normalStroke;if(R1(s)||R1(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=It({},i),u=It({},u),u.fill=s):!R1(u.fill)&&R1(s)?(a=!0,i=It({},i),u=It({},u),u.fill=oA(s)):!R1(u.stroke)&&R1(l)&&(a||(i=It({},i),u=It({},u)),u.stroke=oA(l)),i.style=u}}if(i&&i.z2==null){a||(i=It({},i));var c=n.z2EmphasisLift;i.z2=n.z2+(c!=null?c:Gv)}return i}function Sfe(n,e,t){if(t&&t.z2==null){t=It({},t);var i=n.z2SelectLift;t.z2=n.z2+(i!=null?i:vfe)}return t}function bfe(n,e,t){var i=xi(n.currentStates,e)>=0,r=n.style.opacity,a=i?null:yfe(n,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=It({},t),o=It({opacity:i?r:a.opacity*.1},o),t.style=o),t}function Lb(n,e){var t=this.states[n];if(this.style){if(n==="emphasis")return _fe(this,n,e,t);if(n==="blur")return bfe(this,n,t);if(n==="select")return Sfe(this,n,t)}return t}function zp(n){n.stateProxy=Lb;var e=n.getTextContent(),t=n.getTextGuideLine();e&&(e.stateProxy=Lb),t&&(t.stateProxy=Lb)}function JN(n,e){!Aq(n,e)&&!n.__highByOuter&&td(n,_q)}function QN(n,e){!Aq(n,e)&&!n.__highByOuter&&td(n,Sq)}function $c(n,e){n.__highByOuter|=1<<(e||0),td(n,_q)}function qc(n,e){!(n.__highByOuter&=~(1<<(e||0)))&&td(n,Sq)}function xq(n){td(n,hE)}function fE(n){td(n,bq)}function wq(n){td(n,mfe)}function Tq(n){td(n,gfe)}function Aq(n,e){return n.__highDownSilentOnTouch&&e.zrByTouch}function Cq(n){var e=n.getModel(),t=[],i=[];e.eachComponent(function(r,a){var o=cE(a),s=r==="series",l=s?n.getViewOfSeriesModel(a):n.getViewOfComponentModel(a);!s&&i.push(l),o.isBlured&&(l.group.traverse(function(u){bq(u)}),s&&t.push(a)),o.isBlured=!1}),ne(i,function(r){r&&r.toggleBlurSeries&&r.toggleBlurSeries(t,!1,e)})}function xA(n,e,t,i){var r=i.getModel();t=t||"coordinateSystem";function a(u,c){for(var d=0;d<c.length;d++){var h=u.getItemGraphicEl(c[d]);h&&fE(h)}}if(n!=null&&!(!e||e==="none")){var o=r.getSeriesByIndex(n),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];r.eachSeries(function(u){var c=o===u,d=u.coordinateSystem;d&&d.master&&(d=d.master);var h=d&&s?d===s:c;if(!(t==="series"&&!c||t==="coordinateSystem"&&!h||e==="series"&&c)){var f=i.getViewOfSeriesModel(u);if(f.group.traverse(function(v){v.__highByOuter&&c&&e==="self"||hE(v)}),ds(e))a(u.getData(),e);else if(Kn(e))for(var p=Li(e),m=0;m<p.length;m++)a(u.getData(p[m]),e[p[m]]);l.push(u),cE(u).isBlured=!0}}),r.eachComponent(function(u,c){if(u!=="series"){var d=i.getViewOfComponentModel(c);d&&d.toggleBlurSeries&&d.toggleBlurSeries(l,!0,r)}})}}function wA(n,e,t){if(!(n==null||e==null)){var i=t.getModel().getComponent(n,e);if(i){cE(i).isBlured=!0;var r=t.getViewOfComponentModel(i);!r||!r.focusBlurEnabled||r.group.traverse(function(a){hE(a)})}}}function xfe(n,e,t){var i=n.seriesIndex,r=n.getData(e.dataType);if(r){var a=Op(r,e);a=($t(a)?a[0]:a)||0;var o=r.getItemGraphicEl(a);if(!o)for(var s=r.count(),l=0;!o&&l<s;)o=r.getItemGraphicEl(l++);if(o){var u=ni(o);xA(i,u.focus,u.blurScope,t)}else{var c=n.get(["emphasis","focus"]),d=n.get(["emphasis","blurScope"]);c!=null&&xA(i,c,d,t)}}}function pE(n,e,t,i){var r={focusSelf:!1,dispatchers:null};if(n==null||n==="series"||e==null||t==null)return r;var a=i.getModel().getComponent(n,e);if(!a)return r;var o=i.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return r;for(var s=o.findHighDownDispatchers(t),l,u=0;u<s.length;u++)if(ni(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function wfe(n,e,t){var i=ni(n),r=pE(i.componentMainType,i.componentIndex,i.componentHighDownName,t),a=r.dispatchers,o=r.focusSelf;a?(o&&wA(i.componentMainType,i.componentIndex,t),ne(a,function(s){return JN(s,e)})):(xA(i.seriesIndex,i.focus,i.blurScope,t),i.focus==="self"&&wA(i.componentMainType,i.componentIndex,t),JN(n,e))}function Tfe(n,e,t){Cq(t);var i=ni(n),r=pE(i.componentMainType,i.componentIndex,i.componentHighDownName,t).dispatchers;r?ne(r,function(a){return QN(a,e)}):QN(n,e)}function Afe(n,e,t){if(AA(e)){var i=e.dataType,r=n.getData(i),a=Op(r,e);$t(a)||(a=[a]),n[e.type===jg?"toggleSelect":e.type===Wg?"select":"unselect"](a,i)}}function ek(n){var e=n.getAllData();ne(e,function(t){var i=t.data,r=t.type;i.eachItemGraphicEl(function(a,o){n.isSelected(o,r)?wq(a):Tq(a)})})}function Cfe(n){var e=[];return n.eachSeries(function(t){var i=t.getAllData();ne(i,function(r){r.data;var a=r.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 wp(n,e,t){ap(n,!0),td(n,zp),TA(n,e,t)}function Mfe(n){ap(n,!1)}function ya(n,e,t,i){i?Mfe(n):wp(n,e,t)}function TA(n,e,t){var i=ni(n);e!=null?(i.focus=e,i.blurScope=t):i.focus&&(i.focus=null)}var tk=["emphasis","blur","select"],Efe={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function jo(n,e,t,i){t=t||"itemStyle";for(var r=0;r<tk.length;r++){var a=tk[r],o=e.getModel([a,t]),s=n.ensureState(a);s.style=i?i(o):o[Efe[t]]()}}function ap(n,e){var t=e===!1,i=n;n.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=n.highDownSilentOnTouch),(!t||i.__highDownDispatcher)&&(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!t)}function R9(n){return!!(n&&n.__highDownDispatcher)}function Pfe(n,e,t){var i=ni(n);i.componentMainType=e.mainType,i.componentIndex=e.componentIndex,i.componentHighDownName=t}function Rfe(n){var e=KN[n];return e==null&&YN<=32&&(e=KN[n]=YN++),e}function AA(n){var e=n.type;return e===Wg||e===i5||e===jg}function nk(n){var e=n.type;return e===xp||e===n5}function Lfe(n){var e=yq(n);e.normalFill=n.style.fill,e.normalStroke=n.style.stroke;var t=n.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var L1=Qu.CMD,Ife=[[],[],[]],ik=Math.sqrt,Dfe=Math.atan2;function Mq(n,e){if(e){var t=n.data,i=n.len(),r,a,o,s,l,u,c=L1.M,d=L1.C,h=L1.L,f=L1.R,p=L1.A,m=L1.Q;for(o=0,s=0;o<i;){switch(r=t[o++],s=o,a=0,r){case c:a=1;break;case h:a=1;break;case d:a=3;break;case m:a=2;break;case p:var v=e[4],g=e[5],_=ik(e[0]*e[0]+e[1]*e[1]),S=ik(e[2]*e[2]+e[3]*e[3]),x=Dfe(-e[1]/S,e[0]/_);t[o]*=_,t[o++]+=v,t[o]*=S,t[o++]+=g,t[o++]*=_,t[o++]*=S,t[o++]+=x,t[o++]+=x,o+=2,s=o;break;case f:u[0]=t[o++],u[1]=t[o++],Ho(u,u,e),t[s++]=u[0],t[s++]=u[1],u[0]+=t[o++],u[1]+=t[o++],Ho(u,u,e),t[s++]=u[0],t[s++]=u[1]}for(l=0;l<a;l++){var A=Ife[l];A[0]=t[o++],A[1]=t[o++],Ho(A,A,e),t[s++]=A[0],t[s++]=A[1]}}n.increaseVersion()}}var Ib=Math.sqrt,Xy=Math.sin,Yy=Math.cos,Im=Math.PI;function rk(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1])}function CA(n,e){return(n[0]*e[0]+n[1]*e[1])/(rk(n)*rk(e))}function ak(n,e){return(n[0]*e[1]<n[1]*e[0]?-1:1)*Math.acos(CA(n,e))}function ok(n,e,t,i,r,a,o,s,l,u,c){var d=l*(Im/180),h=Yy(d)*(n-t)/2+Xy(d)*(e-i)/2,f=-1*Xy(d)*(n-t)/2+Yy(d)*(e-i)/2,p=h*h/(o*o)+f*f/(s*s);p>1&&(o*=Ib(p),s*=Ib(p));var m=(r===a?-1:1)*Ib((o*o*(s*s)-o*o*(f*f)-s*s*(h*h))/(o*o*(f*f)+s*s*(h*h)))||0,v=m*o*f/s,g=m*-s*h/o,_=(n+t)/2+Yy(d)*v-Xy(d)*g,S=(e+i)/2+Xy(d)*v+Yy(d)*g,x=ak([1,0],[(h-v)/o,(f-g)/s]),A=[(h-v)/o,(f-g)/s],C=[(-1*h-v)/o,(-1*f-g)/s],M=ak(A,C);if(CA(A,C)<=-1&&(M=Im),CA(A,C)>=1&&(M=0),M<0){var I=Math.round(M/Im*1e6)/1e6;M=Im*2+I%2*Im}c.addData(u,_,S,o,s,x,M,d,a)}var Nfe=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,kfe=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ffe(n){var e=new Qu;if(!n)return e;var t=0,i=0,r=t,a=i,o,s=Qu.CMD,l=n.match(Nfe);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),h=void 0,f=c.match(kfe)||[],p=f.length,m=0;m<p;m++)f[m]=parseFloat(f[m]);for(var v=0;v<p;){var g=void 0,_=void 0,S=void 0,x=void 0,A=void 0,C=void 0,M=void 0,I=t,D=i,E=void 0,P=void 0;switch(d){case"l":t+=f[v++],i+=f[v++],h=s.L,e.addData(h,t,i);break;case"L":t=f[v++],i=f[v++],h=s.L,e.addData(h,t,i);break;case"m":t+=f[v++],i+=f[v++],h=s.M,e.addData(h,t,i),r=t,a=i,d="l";break;case"M":t=f[v++],i=f[v++],h=s.M,e.addData(h,t,i),r=t,a=i,d="L";break;case"h":t+=f[v++],h=s.L,e.addData(h,t,i);break;case"H":t=f[v++],h=s.L,e.addData(h,t,i);break;case"v":i+=f[v++],h=s.L,e.addData(h,t,i);break;case"V":i=f[v++],h=s.L,e.addData(h,t,i);break;case"C":h=s.C,e.addData(h,f[v++],f[v++],f[v++],f[v++],f[v++],f[v++]),t=f[v-2],i=f[v-1];break;case"c":h=s.C,e.addData(h,f[v++]+t,f[v++]+i,f[v++]+t,f[v++]+i,f[v++]+t,f[v++]+i),t+=f[v-2],i+=f[v-1];break;case"S":g=t,_=i,E=e.len(),P=e.data,o===s.C&&(g+=t-P[E-4],_+=i-P[E-3]),h=s.C,I=f[v++],D=f[v++],t=f[v++],i=f[v++],e.addData(h,g,_,I,D,t,i);break;case"s":g=t,_=i,E=e.len(),P=e.data,o===s.C&&(g+=t-P[E-4],_+=i-P[E-3]),h=s.C,I=t+f[v++],D=i+f[v++],t+=f[v++],i+=f[v++],e.addData(h,g,_,I,D,t,i);break;case"Q":I=f[v++],D=f[v++],t=f[v++],i=f[v++],h=s.Q,e.addData(h,I,D,t,i);break;case"q":I=f[v++]+t,D=f[v++]+i,t+=f[v++],i+=f[v++],h=s.Q,e.addData(h,I,D,t,i);break;case"T":g=t,_=i,E=e.len(),P=e.data,o===s.Q&&(g+=t-P[E-4],_+=i-P[E-3]),t=f[v++],i=f[v++],h=s.Q,e.addData(h,g,_,t,i);break;case"t":g=t,_=i,E=e.len(),P=e.data,o===s.Q&&(g+=t-P[E-4],_+=i-P[E-3]),t+=f[v++],i+=f[v++],h=s.Q,e.addData(h,g,_,t,i);break;case"A":S=f[v++],x=f[v++],A=f[v++],C=f[v++],M=f[v++],I=t,D=i,t=f[v++],i=f[v++],h=s.A,ok(I,D,t,i,C,M,S,x,A,h,e);break;case"a":S=f[v++],x=f[v++],A=f[v++],C=f[v++],M=f[v++],I=t,D=i,t+=f[v++],i+=f[v++],h=s.A,ok(I,D,t,i,C,M,S,x,A,h,e);break}}(d==="z"||d==="Z")&&(h=s.Z,e.addData(h),t=r,i=a),o=h}return e.toStatic(),e}var Eq=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e}(Ei);function Pq(n){return n.setData!=null}function Rq(n,e){var t=Ffe(n),i=It({},e);return i.buildPath=function(r){if(Pq(r)){r.setData(t.data);var a=r.getContext();a&&r.rebuildPath(a,1)}else{var a=r;t.rebuildPath(a,1)}},i.applyTransform=function(r){Mq(t,r),this.dirtyShape()},i}function Lq(n,e){return new Eq(Rq(n,e))}function Ofe(n,e){var t=Rq(n,e),i=function(r){ot(a,r);function a(o){var s=r.call(this,o)||this;return s.applyTransform=t.applyTransform,s.buildPath=t.buildPath,s}return a}(Eq);return i}function Bfe(n,e){for(var t=[],i=n.length,r=0;r<i;r++){var a=n[r];t.push(a.getUpdatedPathProxy(!0))}var o=new Ei(e);return o.createPathProxy(),o.buildPath=function(s){if(Pq(s)){s.appendPath(t);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function vE(n,e){e=e||{};var t=new Ei;return n.shape&&t.setShape(n.shape),t.setStyle(n.style),e.bakeTransform?Mq(t.path,n.getComputedTransform()):e.toLocal?t.setLocalTransform(n.getComputedTransform()):t.copyTransform(n),t.buildPath=n.buildPath,t.applyTransform=t.applyTransform,t.z=n.z,t.z2=n.z2,t.zlevel=n.zlevel,t}var zfe=function(){function n(){this.cx=0,this.cy=0,this.r=0}return n}(),Iq=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new zfe},e.prototype.buildPath=function(t,i){t.moveTo(i.cx+i.r,i.cy),t.arc(i.cx,i.cy,i.r,0,Math.PI*2)},e}(Ei);Iq.prototype.type="circle";const zh=Iq;var Gfe=function(){function n(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return n}(),Dq=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Gfe},e.prototype.buildPath=function(t,i){var r=.5522848,a=i.cx,o=i.cy,s=i.rx,l=i.ry,u=s*r,c=l*r;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}(Ei);Dq.prototype.type="ellipse";const mE=Dq;var Nq=Math.PI,Db=Nq*2,xf=Math.sin,I1=Math.cos,Ufe=Math.acos,Jo=Math.atan2,sk=Math.abs,$g=Math.sqrt,bg=Math.max,gu=Math.min,H0=1e-4;function Vfe(n,e,t,i,r,a,o,s){var l=t-n,u=i-e,c=o-r,d=s-a,h=d*l-c*u;if(!(h*h<H0))return h=(c*(e-a)-d*(n-r))/h,[n+h*l,e+h*u]}function Ky(n,e,t,i,r,a,o){var s=n-t,l=e-i,u=(o?a:-a)/$g(s*s+l*l),c=u*l,d=-u*s,h=n+c,f=e+d,p=t+c,m=i+d,v=(h+p)/2,g=(f+m)/2,_=p-h,S=m-f,x=_*_+S*S,A=r-a,C=h*m-p*f,M=(S<0?-1:1)*$g(bg(0,A*A*x-C*C)),I=(C*S-_*M)/x,D=(-C*_-S*M)/x,E=(C*S+_*M)/x,P=(-C*_+S*M)/x,F=I-v,V=D-g,G=E-v,W=P-g;return F*F+V*V>G*G+W*W&&(I=E,D=P),{cx:I,cy:D,x0:-c,y0:-d,x1:I*(r/A-1),y1:D*(r/A-1)}}function Hfe(n){var e;if($t(n)){var t=n.length;if(!t)return n;t===1?e=[n[0],n[0],0,0]:t===2?e=[n[0],n[0],n[1],n[1]]:t===3?e=n.concat(n[2]):e=n}else e=[n,n,n,n];return e}function Wfe(n,e){var t,i=bg(e.r,0),r=bg(e.r0||0,0),a=i>0,o=r>0;if(!(!a&&!o)){if(a||(i=r,r=0),r>i){var s=i;i=r,r=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,d=e.cy,h=!!e.clockwise,f=sk(u-l),p=f>Db&&f%Db;if(p>H0&&(f=p),!(i>H0))n.moveTo(c,d);else if(f>Db-H0)n.moveTo(c+i*I1(l),d+i*xf(l)),n.arc(c,d,i,l,u,!h),r>H0&&(n.moveTo(c+r*I1(u),d+r*xf(u)),n.arc(c,d,r,u,l,h));else{var m=void 0,v=void 0,g=void 0,_=void 0,S=void 0,x=void 0,A=void 0,C=void 0,M=void 0,I=void 0,D=void 0,E=void 0,P=void 0,F=void 0,V=void 0,G=void 0,W=i*I1(l),Y=i*xf(l),Q=r*I1(u),K=r*xf(u),ae=f>H0;if(ae){var ie=e.cornerRadius;ie&&(t=Hfe(ie),m=t[0],v=t[1],g=t[2],_=t[3]);var he=sk(i-r)/2;if(S=gu(he,g),x=gu(he,_),A=gu(he,m),C=gu(he,v),D=M=bg(S,x),E=I=bg(A,C),(M>H0||I>H0)&&(P=i*I1(u),F=i*xf(u),V=r*I1(l),G=r*xf(l),f<Nq)){var Ee=Vfe(W,Y,V,G,P,F,Q,K);if(Ee){var He=W-Ee[0],xe=Y-Ee[1],Fe=P-Ee[0],pt=F-Ee[1],Ot=1/xf(Ufe((He*Fe+xe*pt)/($g(He*He+xe*xe)*$g(Fe*Fe+pt*pt)))/2),bt=$g(Ee[0]*Ee[0]+Ee[1]*Ee[1]);D=gu(M,(i-bt)/(Ot+1)),E=gu(I,(r-bt)/(Ot-1))}}}if(!ae)n.moveTo(c+W,d+Y);else if(D>H0){var ht=gu(g,D),Kt=gu(_,D),Tt=Ky(V,G,W,Y,i,ht,h),Ae=Ky(P,F,Q,K,i,Kt,h);n.moveTo(c+Tt.cx+Tt.x0,d+Tt.cy+Tt.y0),D<M&&ht===Kt?n.arc(c+Tt.cx,d+Tt.cy,D,Jo(Tt.y0,Tt.x0),Jo(Ae.y0,Ae.x0),!h):(ht>0&&n.arc(c+Tt.cx,d+Tt.cy,ht,Jo(Tt.y0,Tt.x0),Jo(Tt.y1,Tt.x1),!h),n.arc(c,d,i,Jo(Tt.cy+Tt.y1,Tt.cx+Tt.x1),Jo(Ae.cy+Ae.y1,Ae.cx+Ae.x1),!h),Kt>0&&n.arc(c+Ae.cx,d+Ae.cy,Kt,Jo(Ae.y1,Ae.x1),Jo(Ae.y0,Ae.x0),!h))}else n.moveTo(c+W,d+Y),n.arc(c,d,i,l,u,!h);if(!(r>H0)||!ae)n.lineTo(c+Q,d+K);else if(E>H0){var ht=gu(m,E),Kt=gu(v,E),Tt=Ky(Q,K,P,F,r,-Kt,h),Ae=Ky(W,Y,V,G,r,-ht,h);n.lineTo(c+Tt.cx+Tt.x0,d+Tt.cy+Tt.y0),E<I&&ht===Kt?n.arc(c+Tt.cx,d+Tt.cy,E,Jo(Tt.y0,Tt.x0),Jo(Ae.y0,Ae.x0),!h):(Kt>0&&n.arc(c+Tt.cx,d+Tt.cy,Kt,Jo(Tt.y0,Tt.x0),Jo(Tt.y1,Tt.x1),!h),n.arc(c,d,r,Jo(Tt.cy+Tt.y1,Tt.cx+Tt.x1),Jo(Ae.cy+Ae.y1,Ae.cx+Ae.x1),h),ht>0&&n.arc(c+Ae.cx,d+Ae.cy,ht,Jo(Ae.y1,Ae.x1),Jo(Ae.y0,Ae.x0),!h))}else n.lineTo(c+Q,d+K),n.arc(c,d,r,u,l,h)}n.closePath()}}}var jfe=function(){function n(){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 n}(),kq=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new jfe},e.prototype.buildPath=function(t,i){Wfe(t,i)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Ei);kq.prototype.type="sector";const ll=kq;var $fe=function(){function n(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return n}(),Fq=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new $fe},e.prototype.buildPath=function(t,i){var r=i.cx,a=i.cy,o=Math.PI*2;t.moveTo(r+i.r,a),t.arc(r,a,i.r,0,o,!1),t.moveTo(r+i.r0,a),t.arc(r,a,i.r0,0,o,!0)},e}(Ei);Fq.prototype.type="ring";const M_=Fq;function qfe(n,e,t,i){var r=[],a=[],o=[],s=[],l,u,c,d;if(i){c=[1/0,1/0],d=[-1/0,-1/0];for(var h=0,f=n.length;h<f;h++)th(c,c,n[h]),nh(d,d,n[h]);th(c,c,i[0]),nh(d,d,i[1])}for(var h=0,f=n.length;h<f;h++){var p=n[h];if(t)l=n[h?h-1:f-1],u=n[(h+1)%f];else if(h===0||h===f-1){r.push(Oc(n[h]));continue}else l=n[h-1],u=n[h+1];ip(a,u,l),X4(a,a,e);var m=KT(p,l),v=KT(p,u),g=m+v;g!==0&&(m/=g,v/=g),X4(o,a,-m),X4(s,a,v);var _=eN([],p,o),S=eN([],p,s);i&&(nh(_,_,c),th(_,_,d),nh(S,S,c),th(S,S,d)),r.push(_),r.push(S)}return t&&r.push(r.shift()),r}function Oq(n,e,t){var i=e.smooth,r=e.points;if(r&&r.length>=2){if(i){var a=qfe(r,i,t,e.smoothConstraint);n.moveTo(r[0][0],r[0][1]);for(var o=r.length,s=0;s<(t?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=r[(s+1)%o];n.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{n.moveTo(r[0][0],r[0][1]);for(var s=1,d=r.length;s<d;s++)n.lineTo(r[s][0],r[s][1])}t&&n.closePath()}}var Xfe=function(){function n(){this.points=null,this.smooth=0,this.smoothConstraint=null}return n}(),Bq=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Xfe},e.prototype.buildPath=function(t,i){Oq(t,i,!0)},e}(Ei);Bq.prototype.type="polygon";const ul=Bq;var Yfe=function(){function n(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return n}(),zq=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Yfe},e.prototype.buildPath=function(t,i){Oq(t,i,!1)},e}(Ei);zq.prototype.type="polyline";const hl=zq;var Kfe={},Zfe=function(){function n(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return n}(),Gq=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Zfe},e.prototype.buildPath=function(t,i){var r,a,o,s;if(this.subPixelOptimize){var l=hq(Kfe,i,this.style);r=l.x1,a=l.y1,o=l.x2,s=l.y2}else r=i.x1,a=i.y1,o=i.x2,s=i.y2;var u=i.percent;u!==0&&(t.moveTo(r,a),u<1&&(o=r*(1-u)+o*u,s=a*(1-u)+s*u),t.lineTo(o,s))},e.prototype.pointAt=function(t){var i=this.shape;return[i.x1*(1-t)+i.x2*t,i.y1*(1-t)+i.y2*t]},e}(Ei);Gq.prototype.type="line";const Lo=Gq;var Bs=[],Jfe=function(){function n(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return n}();function lk(n,e,t){var i=n.cpx2,r=n.cpy2;return i!=null||r!=null?[(t?hN:vo)(n.x1,n.cpx1,n.cpx2,n.x2,e),(t?hN:vo)(n.y1,n.cpy1,n.cpy2,n.y2,e)]:[(t?nA:Po)(n.x1,n.cpx1,n.x2,e),(t?nA:Po)(n.y1,n.cpy1,n.y2,e)]}var Uq=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Jfe},e.prototype.buildPath=function(t,i){var r=i.x1,a=i.y1,o=i.x2,s=i.y2,l=i.cpx1,u=i.cpy1,c=i.cpx2,d=i.cpy2,h=i.percent;h!==0&&(t.moveTo(r,a),c==null||d==null?(h<1&&(w9(r,l,o,h,Bs),l=Bs[1],o=Bs[2],w9(a,u,s,h,Bs),u=Bs[1],s=Bs[2]),t.quadraticCurveTo(l,u,o,s)):(h<1&&(Eh(r,l,c,o,h,Bs),l=Bs[1],c=Bs[2],o=Bs[3],Eh(a,u,d,s,h,Bs),u=Bs[1],d=Bs[2],s=Bs[3]),t.bezierCurveTo(l,u,c,d,o,s)))},e.prototype.pointAt=function(t){return lk(this.shape,t,!1)},e.prototype.tangentAt=function(t){var i=lk(this.shape,t,!0);return Ov(i,i)},e}(Ei);Uq.prototype.type="bezier-curve";const E_=Uq;var Qfe=function(){function n(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return n}(),Vq=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Qfe},e.prototype.buildPath=function(t,i){var r=i.cx,a=i.cy,o=Math.max(i.r,0),s=i.startAngle,l=i.endAngle,u=i.clockwise,c=Math.cos(s),d=Math.sin(s);t.moveTo(c*o+r,d*o+a),t.arc(r,a,o,s,l,!u)},e}(Ei);Vq.prototype.type="arc";const gE=Vq;var epe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="compound",t}return e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,i=this.shapeChanged(),r=0;r<t.length;r++)i=i||t[r].shapeChanged();i&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],i=this.getGlobalScale(),r=0;r<t.length;r++)t[r].path||t[r].createPathProxy(),t[r].path.setScale(i[0],i[1],t[r].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,i){for(var r=i.paths||[],a=0;a<r.length;a++)r[a].buildPath(t,r[a].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],i=0;i<t.length;i++)t[i].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Ei.prototype.getBoundingRect.call(this)},e}(Ei);const yE=epe;var tpe=function(){function n(e){this.colorStops=e||[]}return n.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},n}();const Hq=tpe;var npe=function(n){ot(e,n);function e(t,i,r,a,o,s){var l=n.call(this,o)||this;return l.x=t==null?0:t,l.y=i==null?0:i,l.x2=r==null?1:r,l.y2=a==null?0:a,l.type="linear",l.global=s||!1,l}return e}(Hq);const po=npe;var ipe=function(n){ot(e,n);function e(t,i,r,a,o){var s=n.call(this,a)||this;return s.x=t==null?.5:t,s.y=i==null?.5:i,s.r=r==null?.5:r,s.type="radial",s.global=o||!1,s}return e}(Hq);const Wq=ipe;var wf=[0,0],Tf=[0,0],Zy=new fi,Jy=new fi,rpe=function(){function n(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new fi;for(var i=0;i<2;i++)this._axes[i]=new fi;e&&this.fromBoundingRect(e,t)}return n.prototype.fromBoundingRect=function(e,t){var i=this._corners,r=this._axes,a=e.x,o=e.y,s=a+e.width,l=o+e.height;if(i[0].set(a,o),i[1].set(s,o),i[2].set(s,l),i[3].set(a,l),t)for(var u=0;u<4;u++)i[u].transform(t);fi.sub(r[0],i[1],i[0]),fi.sub(r[1],i[3],i[0]),r[0].normalize(),r[1].normalize();for(var u=0;u<2;u++)this._origin[u]=r[u].dot(i[0])},n.prototype.intersect=function(e,t){var i=!0,r=!t;return Zy.set(1/0,1/0),Jy.set(0,0),!this._intersectCheckOneSide(this,e,Zy,Jy,r,1)&&(i=!1,r)||!this._intersectCheckOneSide(e,this,Zy,Jy,r,-1)&&(i=!1,r)||r||fi.copy(t,i?Zy:Jy),i},n.prototype._intersectCheckOneSide=function(e,t,i,r,a,o){for(var s=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,e._corners,wf),this._getProjMinMaxOnAxis(l,t._corners,Tf),wf[1]<Tf[0]||wf[0]>Tf[1]){if(s=!1,a)return s;var c=Math.abs(Tf[0]-wf[1]),d=Math.abs(wf[0]-Tf[1]);Math.min(c,d)>r.len()&&(c<d?fi.scale(r,u,-c*o):fi.scale(r,u,d*o))}else if(i){var c=Math.abs(Tf[0]-wf[1]),d=Math.abs(wf[0]-Tf[1]);Math.min(c,d)<i.len()&&(c<d?fi.scale(i,u,c*o):fi.scale(i,u,-d*o))}}return s},n.prototype._getProjMinMaxOnAxis=function(e,t,i){for(var r=this._axes[e],a=this._origin,o=t[0].dot(r)+a[e],s=o,l=o,u=1;u<t.length;u++){var c=t[u].dot(r)+a[e];s=Math.min(c,s),l=Math.max(c,l)}i[0]=s,i[1]=l},n}();const q5=rpe;var ape=[],ope=function(n){ot(e,n);function e(){var t=n!==null&&n.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,i){t.call(i,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,i){i?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,i){i=i||!1;for(var r=0;r<t.length;r++)this.addDisplayable(t[r],i)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var i=this._cursor;i<this._displayables.length;i++)t&&t(this._displayables[i]);for(var i=0;i<this._temporaryDisplayables.length;i++)t&&t(this._temporaryDisplayables[i])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var i=this._displayables[t];i.parent=this,i.update(),i.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var i=this._temporaryDisplayables[t];i.parent=this,i.update(),i.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new gi(1/0,1/0,-1/0,-1/0),i=0;i<this._displayables.length;i++){var r=this._displayables[i],a=r.getBoundingRect().clone();r.needLocalTransform()&&a.applyTransform(r.getLocalTransform(ape)),t.union(a)}this._rect=t}return this._rect},e.prototype.contain=function(t,i){var r=this.transformCoordToLocal(t,i),a=this.getBoundingRect();if(a.contain(r[0],r[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(t,i))return!0}return!1},e}(M0);const spe=ope;var jq=Gi();function Uv(n,e,t,i,r){var a;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();a=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=n==="update";if(s){var u=void 0,c=void 0,d=void 0;i?(u=ai(i.duration,200),c=ai(i.easing,"cubicOut"),d=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),d=e.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(c=a.easing),a.delay!=null&&(d=a.delay)),$n(d)&&(d=d(t,r)),$n(u)&&(u=u(t));var h={duration:u||0,delay:d,easing:c};return h}else return null}function _E(n,e,t,i,r,a,o){var s=!1,l;$n(r)?(o=a,a=r,r=null):Kn(r)&&(a=r.cb,o=r.during,s=r.isFrom,l=r.removeOpt,r=r.dataIndex);var u=n==="leave";u||e.stopAnimation("leave");var c=Uv(n,i,r,u?l||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null);if(c&&c.duration>0){var d=c.duration,h=c.delay,f=c.easing,p={duration:d,delay:h||0,easing:f,done:a,force:!!a||!!o,setToFinal:!u,scope:n,during:o};s?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),a&&a()}function Qi(n,e,t,i,r,a){_E("update",n,e,t,i,r,a)}function sa(n,e,t,i,r,a){_E("enter",n,e,t,i,r,a)}function X2(n){if(!n.__zr)return!0;for(var e=0;e<n.animators.length;e++){var t=n.animators[e];if(t.scope==="leave")return!0}return!1}function Ph(n,e,t,i,r,a){X2(n)||_E("leave",n,e,t,i,r,a)}function uk(n,e,t,i){n.removeTextContent(),n.removeTextGuideLine(),Ph(n,{style:{opacity:0}},e,t,i)}function L9(n,e,t){function i(){n.parent&&n.parent.remove(n)}n.isGroup?n.traverse(function(r){r.isGroup||uk(r,e,t,i)}):uk(n,e,t,i)}function iu(n){jq(n).oldStyle=n.style}function lpe(n){return jq(n).oldStyle}var X5=Math.max,Y5=Math.min,MA={};function upe(n){return Ei.extend(n)}var cpe=Ofe;function dpe(n,e){return cpe(n,e)}function au(n,e){MA[n]=e}function SE(n){if(MA.hasOwnProperty(n))return MA[n]}function P_(n,e,t,i){var r=Lq(n,e);return t&&(i==="center"&&(t=qq(t,r.getBoundingRect())),Xq(r,t)),r}function $q(n,e,t){var i=new qo({style:{image:n,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(r){if(t==="center"){var a={width:r.width,height:r.height};i.setStyle(qq(e,a))}}});return i}function qq(n,e){var t=e.width/e.height,i=n.height*t,r;i<=n.width?r=n.height:(i=n.width,r=i/t);var a=n.x+n.width/2,o=n.y+n.height/2;return{x:a-i/2,y:o-r/2,width:i,height:r}}var m0=Bfe;function Xq(n,e){if(n.applyTransform){var t=n.getBoundingRect(),i=t.calculateTransform(e);n.applyTransform(i)}}function fv(n,e){return hq(n,n,{lineWidth:e}),n}function hpe(n){return fq(n.shape,n.shape,n.style),n}var r5=rp;function Tp(n,e){for(var t=y_([]);n&&n!==e;)Bc(t,n.getLocalTransform(),t),n=n.parent;return t}function eu(n,e,t){return e&&!ds(e)&&(e=Dc.getLocalTransform(e)),t&&(e=Bv([],e)),Ho([],n,e)}function R_(n,e,t){var i=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),r=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),a=[n==="left"?-i:n==="right"?i:0,n==="top"?-r:n==="bottom"?r:0];return a=eu(a,e,t),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function ck(n){return!n.isGroup}function fpe(n){return n.shape!=null}function S3(n,e,t){if(!n||!e)return;function i(o){var s={};return o.traverse(function(l){ck(l)&&l.anid&&(s[l.anid]=l)}),s}function r(o){var s={x:o.x,y:o.y,rotation:o.rotation};return fpe(o)&&(s.shape=It({},o.shape)),s}var a=i(n);e.traverse(function(o){if(ck(o)&&o.anid){var s=a[o.anid];if(s){var l=r(o);o.attr(r(s)),Qi(o,l,t,ni(o).dataIndex)}}})}function Yq(n,e){return Xt(n,function(t){var i=t[0];i=X5(i,e.x),i=Y5(i,e.x+e.width);var r=t[1];return r=X5(r,e.y),r=Y5(r,e.y+e.height),[i,r]})}function ppe(n,e){var t=X5(n.x,e.x),i=Y5(n.x+n.width,e.x+e.width),r=X5(n.y,e.y),a=Y5(n.y+n.height,e.y+e.height);if(i>=t&&a>=r)return{x:t,y:r,width:i-t,height:a-r}}function b3(n,e,t){var i=It({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},n)return n.indexOf("image://")===0?(r.image=n.slice(8),qn(r,t),new qo(i)):P_(n.replace("path://",""),i,t,"center")}function xg(n,e,t,i,r){for(var a=0,o=r[r.length-1];a<r.length;a++){var s=r[a];if(Kq(n,e,t,i,s[0],s[1],o[0],o[1]))return!0;o=s}}function Kq(n,e,t,i,r,a,o,s){var l=t-n,u=i-e,c=o-r,d=s-a,h=Nb(c,d,l,u);if(vpe(h))return!1;var f=n-r,p=e-a,m=Nb(f,p,l,u)/h;if(m<0||m>1)return!1;var v=Nb(f,p,c,d)/h;return!(v<0||v>1)}function Nb(n,e,t,i){return n*i-t*e}function vpe(n){return n<=1e-6&&n>=-1e-6}function Qp(n){var e=n.itemTooltipOption,t=n.componentModel,i=n.itemName,r=xn(e)?{formatter:e}:e,a=t.mainType,o=t.componentIndex,s={componentType:a,name:i,$vars:["name"]};s[a+"Index"]=o;var l=n.formatterParamsExtra;l&&ne(Li(l),function(c){Mn(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=ni(n.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:i,option:qn({content:i,encodeHTMLContent:!0,formatterParams:s},r)}}function dk(n,e){var t;n.isGroup&&(t=e(n)),t||n.traverse(e)}function Gh(n,e){if(n)if($t(n))for(var t=0;t<n.length;t++)dk(n[t],e);else dk(n,e)}au("circle",zh);au("ellipse",mE);au("sector",ll);au("ring",M_);au("polygon",ul);au("polyline",hl);au("rect",Hi);au("line",Lo);au("bezierCurve",E_);au("arc",gE);const e1=Object.freeze(Object.defineProperty({__proto__:null,Arc:gE,BezierCurve:E_,BoundingRect:gi,Circle:zh,CompoundPath:yE,Ellipse:mE,Group:ei,Image:qo,IncrementalDisplayable:spe,Line:Lo,LinearGradient:po,OrientedBoundingRect:q5,Path:Ei,Point:fi,Polygon:ul,Polyline:hl,RadialGradient:Wq,Rect:Hi,Ring:M_,Sector:ll,Text:Xi,applyTransform:eu,clipPointsByRect:Yq,clipRectByRect:ppe,createIcon:b3,extendPath:dpe,extendShape:upe,getShapeClass:SE,getTransform:Tp,groupTransition:S3,initProps:sa,isElementRemoved:X2,lineLineIntersect:Kq,linePolygonIntersect:xg,makeImage:$q,makePath:P_,mergePath:m0,registerShape:au,removeElement:Ph,removeElementWithFadeOut:L9,resizePath:Xq,setTooltipConfig:Qp,subPixelOptimize:r5,subPixelOptimizeLine:fv,subPixelOptimizeRect:hpe,transformDirection:R_,traverseElements:Gh,updateProps:Qi},Symbol.toStringTag,{value:"Module"}));var L_={};function Zq(n,e){for(var t=0;t<Is.length;t++){var i=Is[t],r=e[i],a=n.ensureState(i);a.style=a.style||{},a.style.text=r}var o=n.currentStates.slice();n.clearStates(!0),n.setStyle({text:e.normal}),n.useStates(o,!0)}function EA(n,e,t){var i=n.labelFetcher,r=n.labelDataIndex,a=n.labelDimIndex,o=e.normal,s;i&&(s=i.getFormattedLabel(r,"normal",null,a,o&&o.get("formatter"),t!=null?{interpolatedValue:t}:null)),s==null&&(s=$n(n.defaultText)?n.defaultText(r,n,t):n.defaultText);for(var l={normal:s},u=0;u<Is.length;u++){var c=Is[u],d=e[c];l[c]=ai(i?i.getFormattedLabel(r,c,null,a,d&&d.get("formatter")):null,s)}return l}function $o(n,e,t,i){t=t||L_;for(var r=n instanceof Xi,a=!1,o=0;o<P9.length;o++){var s=e[P9[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=r?n:n.getTextContent();if(a){r||(l||(l=new Xi,n.setTextContent(l)),n.stateProxy&&(l.stateProxy=n.stateProxy));var u=EA(t,e),c=e.normal,d=!!c.getShallow("show"),h=qr(c,i&&i.normal,t,!1,!r);h.text=u.normal,r||n.setTextConfig(K5(c,t,!1));for(var o=0;o<Is.length;o++){var f=Is[o],s=e[f];if(s){var p=l.ensureState(f),m=!!ai(s.getShallow("show"),d);if(m!==d&&(p.ignore=!m),p.style=qr(s,i&&i[f],t,!0,!r),p.style.text=u[f],!r){var v=n.ensureState(f);v.textConfig=K5(s,t,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(h.x=l.style.x),l.style.y!=null&&(h.y=l.style.y),l.ignore=!d,l.useStyle(h),l.dirty(),t.enableTextSetter&&(Vv(l).setLabelText=function(g){var _=EA(t,e,g);Zq(l,_)})}else l&&(l.ignore=!0);n.dirty()}function _o(n,e){e=e||"label";for(var t={normal:n.getModel(e)},i=0;i<Is.length;i++){var r=Is[i];t[r]=n.getModel([r,e])}return t}function qr(n,e,t,i,r){var a={};return mpe(a,n,t,i,r),e&&It(a,e),a}function K5(n,e,t){e=e||{};var i={},r,a=n.getShallow("rotate"),o=ai(n.getShallow("distance"),t?null:5),s=n.getShallow("offset");return r=n.getShallow("position")||(t?null:"inside"),r==="outside"&&(r=e.defaultOutsidePosition||"top"),r!=null&&(i.position=r),s!=null&&(i.offset=s),a!=null&&(a*=Math.PI/180,i.rotation=a),o!=null&&(i.distance=o),i.outsideFill=n.get("color")==="inherit"?e.inheritColor||null:"auto",i}function mpe(n,e,t,i,r){t=t||L_;var a=e.ecModel,o=a&&a.option.textStyle,s=gpe(e),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var c=e.getModel(["rich",u]);vk(l[u]={},c,o,t,i,r,!1,!0)}}l&&(n.rich=l);var d=e.get("overflow");d&&(n.overflow=d);var h=e.get("minMargin");h!=null&&(n.margin=h),vk(n,e,o,t,i,r,!0,!1)}function gpe(n){for(var e;n&&n!==n.ecModel;){var t=(n.option||L_).rich;if(t){e=e||{};for(var i=Li(t),r=0;r<i.length;r++){var a=i[r];e[a]=1}}n=n.parentModel}return e}var hk=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],fk=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],pk=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function vk(n,e,t,i,r,a,o,s){t=!r&&t||L_;var l=i&&i.inheritColor,u=e.getShallow("color"),c=e.getShallow("textBorderColor"),d=ai(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&&(n.fill=u),c!=null&&(n.stroke=c);var h=ai(e.getShallow("textBorderWidth"),t.textBorderWidth);h!=null&&(n.lineWidth=h);var f=ai(e.getShallow("textBorderType"),t.textBorderType);f!=null&&(n.lineDash=f);var p=ai(e.getShallow("textBorderDashOffset"),t.textBorderDashOffset);p!=null&&(n.lineDashOffset=p),!r&&d==null&&!s&&(d=i&&i.defaultOpacity),d!=null&&(n.opacity=d),!r&&!a&&n.fill==null&&i.inheritColor&&(n.fill=i.inheritColor);for(var m=0;m<hk.length;m++){var v=hk[m],g=ai(e.getShallow(v),t[v]);g!=null&&(n[v]=g)}for(var m=0;m<fk.length;m++){var v=fk[m],g=e.getShallow(v);g!=null&&(n[v]=g)}if(n.verticalAlign==null){var _=e.getShallow("baseline");_!=null&&(n.verticalAlign=_)}if(!o||!i.disableBox){for(var m=0;m<pk.length;m++){var v=pk[m],g=e.getShallow(v);g!=null&&(n[v]=g)}var S=e.getShallow("borderType");S!=null&&(n.borderDash=S),(n.backgroundColor==="auto"||n.backgroundColor==="inherit")&&l&&(n.backgroundColor=l),(n.borderColor==="auto"||n.borderColor==="inherit")&&l&&(n.borderColor=l)}}function bE(n,e){var t=e&&e.getModel("textStyle");return K0([n.fontStyle||t&&t.getShallow("fontStyle")||"",n.fontWeight||t&&t.getShallow("fontWeight")||"",(n.fontSize||t&&t.getShallow("fontSize")||12)+"px",n.fontFamily||t&&t.getShallow("fontFamily")||"sans-serif"].join(" "))}var Vv=Gi();function Jq(n,e,t,i){if(n){var r=Vv(n);r.prevValue=r.value,r.value=t;var a=e.normal;r.valueAnimation=a.get("valueAnimation"),r.valueAnimation&&(r.precision=a.get("precision"),r.defaultInterpolatedText=i,r.statesModels=e)}}function Qq(n,e,t,i,r){var a=Vv(n);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=ai(a.interpolatedValue,a.prevValue),l=a.value;function u(c){var d=nq(t,a.precision,s,l,c);a.interpolatedValue=c===1?null:d;var h=EA({labelDataIndex:e,labelFetcher:r,defaultText:o?o(d):d+""},a.statesModels,d);Zq(n,h)}n.percent=0,(a.prevValue==null?sa:Qi)(n,{percent:1},i,e,null,u)}var ype=["textStyle","color"],kb=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Fb=new Xi,_pe=function(){function n(){}return n.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(ype):null)},n.prototype.getFont=function(){return bE({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},n.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<kb.length;i++)t[kb[i]]=this.getShallow(kb[i]);return Fb.useStyle(t),Fb.update(),Fb.getBoundingRect()},n}();const Spe=_pe;var eX=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],bpe=Bp(eX),xpe=function(){function n(){}return n.prototype.getLineStyle=function(e){return bpe(this,e)},n}(),tX=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],wpe=Bp(tX),Tpe=function(){function n(){}return n.prototype.getItemStyle=function(e,t){return wpe(this,e,t)},n}(),t1=function(){function n(e,t,i){this.parentModel=t,this.ecModel=i,this.option=e}return n.prototype.init=function(e,t,i){},n.prototype.mergeOption=function(e,t){ui(this.option,e,!0)},n.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},n.prototype.getShallow=function(e,t){var i=this.option,r=i==null?i:i[e];if(r==null&&!t){var a=this.parentModel;a&&(r=a.getShallow(e))}return r},n.prototype.getModel=function(e,t){var i=e!=null,r=i?this.parsePath(e):null,a=i?this._doGet(r):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(r)),new n(a,t,this.ecModel)},n.prototype.isEmpty=function(){return this.option==null},n.prototype.restoreData=function(){},n.prototype.clone=function(){var e=this.constructor;return new e(Zn(this.option))},n.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},n.prototype.resolveParentPath=function(e){return e},n.prototype.isAnimationEnabled=function(){if(!qi.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},n.prototype._doGet=function(e,t){var i=this.option;if(!e)return i;for(var r=0;r<e.length&&!(e[r]&&(i=i&&typeof i=="object"?i[e[r]]:null,i==null));r++);return i==null&&t&&(i=t._doGet(this.resolveParentPath(e),t.parentModel)),i},n}();sE(t1);The(t1);Za(t1,xpe);Za(t1,Tpe);Za(t1,Phe);Za(t1,Spe);const Xr=t1;var Ape=Math.round(Math.random()*10);function Hv(n){return[n||"",Ape++].join("_")}function Cpe(n){var e={};n.registerSubTypeDefaulter=function(t,i){var r=zu(t);e[r.main]=i},n.determineSubType=function(t,i){var r=i.type;if(!r){var a=zu(t).main;n.hasSubTypes(t)&&e[a]&&(r=e[a](i))}return r}}function Mpe(n,e){n.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=t(o),c=u.graph,d=u.noEntryList,h={};for(ne(a,function(_){h[_]=!0});d.length;){var f=d.pop(),p=c[f],m=!!h[f];m&&(s.call(l,f,p.originalDeps.slice()),delete h[f]),ne(p.successor,m?g:v)}ne(h,function(){var _="";throw new Error(_)});function v(_){c[_].entryCount--,c[_].entryCount===0&&d.push(_)}function g(_){h[_]=!0,v(_)}};function t(a){var o={},s=[];return ne(a,function(l){var u=i(o,l),c=u.originalDeps=e(l),d=r(c,a);u.entryCount=d.length,u.entryCount===0&&s.push(l),ne(d,function(h){xi(u.predecessor,h)<0&&u.predecessor.push(h);var f=i(o,h);xi(f.successor,h)<0&&f.successor.push(l)})}),{graph:o,noEntryList:s}}function i(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function r(a,o){var s=[];return ne(a,function(l){xi(o,l)>=0&&s.push(l)}),s}}function Uh(n,e){return ui(ui({},n,!0),e,!0)}const Epe={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:". "}}}},Ppe={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 Z5="ZH",xE="EN",Y2=xE,a5={},wE={},nX=qi.domSupported?function(){var n=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Y2).toUpperCase();return n.indexOf(Z5)>-1?Z5:Y2}():Y2;function iX(n,e){n=n.toUpperCase(),wE[n]=new Xr(e),a5[n]=e}function Rpe(n){if(xn(n)){var e=a5[n.toUpperCase()]||{};return n===Z5||n===xE?Zn(e):ui(Zn(e),Zn(a5[Y2]),!1)}else return ui(Zn(n),Zn(a5[Y2]),!1)}function PA(n){return wE[n]}function Lpe(){return wE[Y2]}iX(xE,Epe);iX(Z5,Ppe);var TE=1e3,AE=TE*60,qg=AE*60,g0=qg*24,mk=g0*365,wg={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}"},Qy="{yyyy}-{MM}-{dd}",gk={year:"{yyyy}",month:"{yyyy}-{MM}",day:Qy,hour:Qy+" "+wg.hour,minute:Qy+" "+wg.minute,second:Qy+" "+wg.second,millisecond:wg.none},Ob=["year","month","day","hour","minute","second","millisecond"],rX=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Cd(n,e){return n+="","0000".substr(0,e-n.length)+n}function K2(n){switch(n){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return n}}function Ipe(n){return n===K2(n)}function Dpe(n){switch(n){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function I_(n,e,t,i){var r=Ju(n),a=r[CE(t)](),o=r[Z2(t)]()+1,s=Math.floor((o-1)/3)+1,l=r[D_(t)](),u=r["get"+(t?"UTC":"")+"Day"](),c=r[I9(t)](),d=(c-1)%12+1,h=r[N_(t)](),f=r[k_(t)](),p=r[F_(t)](),m=c>=12?"pm":"am",v=m.toUpperCase(),g=i instanceof Xr?i:PA(i||nX)||Lpe(),_=g.getModel("time"),S=_.get("month"),x=_.get("monthAbbr"),A=_.get("dayOfWeek"),C=_.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,m+"").replace(/{A}/g,v+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Cd(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,S[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,Cd(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Cd(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,A[u]).replace(/{ee}/g,C[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Cd(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Cd(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,Cd(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Cd(f,2)).replace(/{s}/g,f+"").replace(/{SSS}/g,Cd(p,3)).replace(/{S}/g,p+"")}function Npe(n,e,t,i,r){var a=null;if(xn(t))a=t;else if($n(t))a=t(n.value,e,{level:n.level});else{var o=It({},wg);if(n.level>0)for(var s=0;s<Ob.length;++s)o[Ob[s]]="{primary|"+o[Ob[s]]+"}";var l=t?t.inherit===!1?t:qn(t,o):o,u=aX(n.value,r);if(l[u])a=l[u];else if(l.inherit){for(var c=rX.indexOf(u),s=c-1;s>=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if($t(a)){var d=n.level==null?0:n.level>=0?n.level:a.length+n.level;d=Math.min(d,a.length-1),a=a[d]}}return I_(new Date(n.value),a,r,i)}function aX(n,e){var t=Ju(n),i=t[Z2(e)]()+1,r=t[D_(e)](),a=t[I9(e)](),o=t[N_(e)](),s=t[k_(e)](),l=t[F_(e)](),u=l===0,c=u&&s===0,d=c&&o===0,h=d&&a===0,f=h&&r===1,p=f&&i===1;return p?"year":f?"month":h?"day":d?"hour":c?"minute":u?"second":"millisecond"}function yk(n,e,t){var i=Yi(n)?Ju(n):n;switch(e=e||aX(n,t),e){case"year":return i[CE(t)]();case"half-year":return i[Z2(t)]()>=6?1:0;case"quarter":return Math.floor((i[Z2(t)]()+1)/4);case"month":return i[Z2(t)]();case"day":return i[D_(t)]();case"half-day":return i[I9(t)]()/24;case"hour":return i[I9(t)]();case"minute":return i[N_(t)]();case"second":return i[k_(t)]();case"millisecond":return i[F_(t)]()}}function CE(n){return n?"getUTCFullYear":"getFullYear"}function Z2(n){return n?"getUTCMonth":"getMonth"}function D_(n){return n?"getUTCDate":"getDate"}function I9(n){return n?"getUTCHours":"getHours"}function N_(n){return n?"getUTCMinutes":"getMinutes"}function k_(n){return n?"getUTCSeconds":"getSeconds"}function F_(n){return n?"getUTCMilliseconds":"getMilliseconds"}function kpe(n){return n?"setUTCFullYear":"setFullYear"}function oX(n){return n?"setUTCMonth":"setMonth"}function sX(n){return n?"setUTCDate":"setDate"}function lX(n){return n?"setUTCHours":"setHours"}function uX(n){return n?"setUTCMinutes":"setMinutes"}function cX(n){return n?"setUTCSeconds":"setSeconds"}function dX(n){return n?"setUTCMilliseconds":"setMilliseconds"}function hX(n){if(!X$(n))return xn(n)?n:"-";var e=(n+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function fX(n,e){return n=(n||"").toLowerCase().replace(/-(.)/g,function(t,i){return i.toUpperCase()}),e&&n&&(n=n.charAt(0).toUpperCase()+n.slice(1)),n}var Wv=KM;function RA(n,e,t){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function r(c){return c&&K0(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=n instanceof Date;if(o||s){var l=o?Ju(n):n;if(isNaN(+l)){if(s)return"-"}else return I_(l,i,t)}if(e==="ordinal")return qT(n)?r(n):Yi(n)&&a(n)?n+"":"-";var u=jc(n);return a(u)?hX(u):qT(n)?r(n):typeof n=="boolean"?n+"":"-"}var _k=["a","b","c","d","e","f","g"],Bb=function(n,e){return"{"+n+(e==null?"":e)+"}"};function pX(n,e,t){$t(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],a=0;a<r.length;a++){var o=_k[a];n=n.replace(Bb(o),Bb(o,0))}for(var s=0;s<i;s++)for(var l=0;l<r.length;l++){var u=e[s][r[l]];n=n.replace(Bb(_k[l],s),t?os(u):u)}return n}function Fpe(n,e,t){return ne(e,function(i,r){n=n.replace("{"+r+"}",t?os(i):i)}),n}function Ope(n,e){var t=xn(n)?{color:n,extraCssText:e}:n||{},i=t.color,r=t.type;e=t.extraCssText;var a=t.renderMode||"html";if(!i)return"";if(a==="html")return r==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+os(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+os(i)+";"+(e||"")+'"></span>';var o=t.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:r==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function Gp(n,e){return e=e||"transparent",xn(n)?n:Kn(n)&&n.colorStops&&(n.colorStops[0]||{}).color||e}function J5(n,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=n}else window.open(n,e)}var o5=ne,vX=["left","right","top","bottom","width","height"],op=[["width","left","right"],["height","top","bottom"]];function ME(n,e,t,i,r){var a=0,o=0;i==null&&(i=1/0),r==null&&(r=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),d=e.childAt(u+1),h=d&&d.getBoundingRect(),f,p;if(n==="horizontal"){var m=c.width+(h?-h.x+c.x:0);f=a+m,f>i||l.newline?(a=0,f=m,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var v=c.height+(h?-h.y+c.y:0);p=o+v,p>r||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(),n==="horizontal"?a=f+t:o=p+t)})}var Ap=ME;si(ME,"vertical");si(ME,"horizontal");function Bpe(n,e,t){var i=e.width,r=e.height,a=_n(n.left,i),o=_n(n.top,r),s=_n(n.right,i),l=_n(n.bottom,r);return(isNaN(a)||isNaN(parseFloat(n.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(n.right)))&&(s=i),(isNaN(o)||isNaN(parseFloat(n.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(n.bottom)))&&(l=r),t=Wv(t||0),{width:Math.max(s-a-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function uo(n,e,t){t=Wv(t||0);var i=e.width,r=e.height,a=_n(n.left,i),o=_n(n.top,r),s=_n(n.right,i),l=_n(n.bottom,r),u=_n(n.width,i),c=_n(n.height,r),d=t[2]+t[0],h=t[1]+t[3],f=n.aspect;switch(isNaN(u)&&(u=i-s-h-a),isNaN(c)&&(c=r-l-d-o),f!=null&&(isNaN(u)&&isNaN(c)&&(f>i/r?u=i*.8:c=r*.8),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(a)&&(a=i-s-u-h),isNaN(o)&&(o=r-l-c-d),n.left||n.right){case"center":a=i/2-u/2-t[3];break;case"right":a=i-u-h;break}switch(n.top||n.bottom){case"middle":case"center":o=r/2-c/2-t[0];break;case"bottom":o=r-c-d;break}a=a||0,o=o||0,isNaN(u)&&(u=i-h-a-(s||0)),isNaN(c)&&(c=r-d-o-(l||0));var p=new gi(a+t[3],o+t[0],u,c);return p.margin=t,p}function O_(n,e,t,i,r,a){var o=!r||!r.hv||r.hv[0],s=!r||!r.hv||r.hv[1],l=r&&r.boundingMode||"all";if(a=a||n,a.x=n.x,a.y=n.y,!o&&!s)return!1;var u;if(l==="raw")u=n.type==="group"?new gi(0,0,+e.width||0,+e.height||0):n.getBoundingRect();else if(u=n.getBoundingRect(),n.needLocalTransform()){var c=n.getLocalTransform();u=u.clone(),u.applyTransform(c)}var d=uo(qn({width:u.width,height:u.height},e),t,i),h=o?d.x-u.x:0,f=s?d.y-u.y:0;return l==="raw"?(a.x=h,a.y=f):(a.x+=h,a.y+=f),a===n&&n.markRedraw(),!0}function zpe(n,e){return n[op[e][0]]!=null||n[op[e][1]]!=null&&n[op[e][2]]!=null}function D9(n){var e=n.layoutMode||n.constructor.layoutMode;return Kn(e)?e:e?{type:e}:null}function Rh(n,e,t){var i=t&&t.ignoreSize;!$t(i)&&(i=[i,i]);var r=o(op[0],0),a=o(op[1],1);u(op[0],n,r),u(op[1],n,a);function o(c,d){var h={},f=0,p={},m=0,v=2;if(o5(c,function(S){p[S]=n[S]}),o5(c,function(S){s(e,S)&&(h[S]=p[S]=e[S]),l(h,S)&&f++,l(p,S)&&m++}),i[d])return l(e,c[1])?p[c[2]]=null:l(e,c[2])&&(p[c[1]]=null),p;if(m===v||!f)return p;if(f>=v)return h;for(var g=0;g<c.length;g++){var _=c[g];if(!s(h,_)&&s(n,_)){h[_]=n[_];break}}return h}function s(c,d){return c.hasOwnProperty(d)}function l(c,d){return c[d]!=null&&c[d]!=="auto"}function u(c,d,h){o5(c,function(f){d[f]=h[f]})}}function jv(n){return mX({},n)}function mX(n,e){return e&&n&&o5(vX,function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}var Gpe=Gi(),$v=function(n){ot(e,n);function e(t,i,r){var a=n.call(this,t,i,r)||this;return a.uid=Hv("ec_cpt_model"),a}return e.prototype.init=function(t,i,r){this.mergeDefaultAndTheme(t,r)},e.prototype.mergeDefaultAndTheme=function(t,i){var r=D9(this),a=r?jv(t):{},o=i.getTheme();ui(t,o.get(this.mainType)),ui(t,this.getDefaultOption()),r&&Rh(t,a,r)},e.prototype.mergeOption=function(t,i){ui(this.option,t,!0);var r=D9(this);r&&Rh(this.option,t,r)},e.prototype.optionUpdated=function(t,i){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!bhe(t))return t.defaultOption;var i=Gpe(this);if(!i.defaultOption){for(var r=[],a=t;a;){var o=a.prototype.defaultOption;o&&r.push(o),a=a.superClass}for(var s={},l=r.length-1;l>=0;l--)s=ui(s,r[l],!0);i.defaultOption=s}return i.defaultOption},e.prototype.getReferringComponents=function(t,i){var r=t+"Index",a=t+"Id";return y3(this.ecModel,t,{index:this.get(r,!0),id:this.get(a,!0)},i)},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}(Xr);rq($v,Xr);b_($v);Cpe($v);Mpe($v,Upe);function Upe(n){var e=[];return ne($v.getClassesByMainType(n),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=Xt(e,function(t){return zu(t).main}),n!=="dataset"&&xi(e,"dataset")<=0&&e.unshift("dataset"),e}const $i=$v;var gX="";typeof navigator!="undefined"&&(gX=navigator.platform||"");var D1="rgba(0, 0, 0, 0.2)";const Vpe={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:D1,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:D1,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:D1,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:D1,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:D1,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:D1,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:gX.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 yX=In(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),R0="original",hs="arrayRows",L0="objectRows",tc="keyedColumns",mh="typedArray",_X="unknown",Wu="column",qv="row",Go={Must:1,Might:2,Not:3},SX=Gi();function Hpe(n){SX(n).datasetMap=In()}function bX(n,e,t){var i={},r=PE(e);if(!r||!n)return i;var a=[],o=[],s=e.ecModel,l=SX(s).datasetMap,u=r.uid+"_"+t.seriesLayoutBy,c,d;n=n.slice(),ne(n,function(m,v){var g=Kn(m)?m:n[v]={name:m};g.type==="ordinal"&&c==null&&(c=v,d=p(g)),i[g.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:d,valueWayDim:0});ne(n,function(m,v){var g=m.name,_=p(m);if(c==null){var S=h.valueWayDim;f(i[g],S,_),f(o,S,_),h.valueWayDim+=_}else if(c===v)f(i[g],0,_),f(a,0,_);else{var S=h.categoryWayDim;f(i[g],S,_),f(o,S,_),h.categoryWayDim+=_}});function f(m,v,g){for(var _=0;_<g;_++)m.push(v+_)}function p(m){var v=m.dimsDef;return v?v.length:1}return a.length&&(i.itemName=a),o.length&&(i.seriesName=o),i}function EE(n,e,t){var i={},r=PE(n);if(!r)return i;var a=e.sourceFormat,o=e.dimensionsDefine,s;(a===L0||a===tc)&&ne(o,function(c,d){(Kn(c)?c.name:c)==="name"&&(s=d)});var l=function(){for(var c={},d={},h=[],f=0,p=Math.min(5,t);f<p;f++){var m=wX(e.data,a,e.seriesLayoutBy,o,e.startIndex,f);h.push(m);var v=m===Go.Not;if(v&&c.v==null&&f!==s&&(c.v=f),(c.n==null||c.n===c.v||!v&&h[c.n]===Go.Not)&&(c.n=f),g(c)&&h[c.n]!==Go.Not)return c;v||(m===Go.Might&&d.v==null&&f!==s&&(d.v=f),(d.n==null||d.n===d.v)&&(d.n=f))}function g(_){return _.v!=null&&_.n!=null}return g(c)?c:g(d)?d:null}();if(l){i.value=[l.v];var u=s!=null?s:l.n;i.itemName=[u],i.seriesName=[u]}return i}function PE(n){var e=n.get("data",!0);if(!e)return y3(n.ecModel,"dataset",{index:n.get("datasetIndex",!0),id:n.get("datasetId",!0)},Xa).models[0]}function Wpe(n){return!n.get("transform",!0)&&!n.get("fromTransformResult",!0)?[]:y3(n.ecModel,"dataset",{index:n.get("fromDatasetIndex",!0),id:n.get("fromDatasetId",!0)},Xa).models}function xX(n,e){return wX(n.data,n.sourceFormat,n.seriesLayoutBy,n.dimensionsDefine,n.startIndex,e)}function wX(n,e,t,i,r,a){var o,s=5;if(sl(n))return Go.Not;var l,u;if(i){var c=i[a];Kn(c)?(l=c.name,u=c.type):xn(c)&&(l=c)}if(u!=null)return u==="ordinal"?Go.Must:Go.Not;if(e===hs){var d=n;if(t===qv){for(var h=d[a],f=0;f<(h||[]).length&&f<s;f++)if((o=x(h[r+f]))!=null)return o}else for(var f=0;f<d.length&&f<s;f++){var p=d[r+f];if(p&&(o=x(p[a]))!=null)return o}}else if(e===L0){var m=n;if(!l)return Go.Not;for(var f=0;f<m.length&&f<s;f++){var v=m[f];if(v&&(o=x(v[l]))!=null)return o}}else if(e===tc){var g=n;if(!l)return Go.Not;var h=g[l];if(!h||sl(h))return Go.Not;for(var f=0;f<h.length&&f<s;f++)if((o=x(h[f]))!=null)return o}else if(e===R0)for(var _=n,f=0;f<_.length&&f<s;f++){var v=_[f],S=zv(v);if(!$t(S))return Go.Not;if((o=x(S[a]))!=null)return o}function x(A){var C=xn(A);if(A!=null&&Number.isFinite(Number(A))&&A!=="")return C?Go.Might:Go.Not;if(C&&A!=="-")return Go.Must}return Go.Not}var LA=In();function jpe(n,e){Ls(LA.get(n)==null&&e),LA.set(n,e)}function $pe(n,e,t){var i=LA.get(e);if(!i)return t;var r=i(n);return r?t.concat(r):t}var Sk=Gi(),qpe=Gi(),RE=function(){function n(){}return n.prototype.getColorFromPalette=function(e,t,i){var r=Ar(this.get("color",!0)),a=this.get("colorLayer",!0);return TX(this,Sk,r,a,e,t,i)},n.prototype.clearColorPalette=function(){Ype(this,Sk)},n}();function IA(n,e,t,i){var r=Ar(n.get(["aria","decal","decals"]));return TX(n,qpe,r,null,e,t,i)}function Xpe(n,e){for(var t=n.length,i=0;i<t;i++)if(n[i].length>e)return n[i];return n[t-1]}function TX(n,e,t,i,r,a,o){a=a||n;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(r))return u[r];var c=o==null||!i?t:Xpe(i,o);if(c=c||t,!(!c||!c.length)){var d=c[l];return r&&(u[r]=d),s.paletteIdx=(l+1)%c.length,d}}function Ype(n,e){e(n).paletteIdx=0,e(n).paletteNameMap={}}var e6,Dm,bk,xk="\0_ec_inner",Kpe=1,AX=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.init=function(t,i,r,a,o,s){a=a||{},this.option=null,this._theme=new Xr(a),this._locale=new Xr(o),this._optionManager=s},e.prototype.setOption=function(t,i,r){var a=Ak(i);this._optionManager.setOption(t,r,a),this._resetOption(null,a)},e.prototype.resetOption=function(t,i){return this._resetOption(t,Ak(i))},e.prototype._resetOption=function(t,i){var r=!1,a=this._optionManager;if(!t||t==="recreate"){var o=a.mountOption(t==="recreate");!this.option||t==="recreate"?bk(this,o):(this.restoreData(),this._mergeOption(o,i)),r=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=a.getTimelineOption(this);s&&(r=!0,this._mergeOption(s,i))}if(!t||t==="recreate"||t==="media"){var l=a.getMediaOption(this);l.length&&ne(l,function(u){r=!0,this._mergeOption(u,i)},this)}return r},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,i){var r=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=In(),u=i&&i.replaceMergeMainTypeMap;Hpe(this),ne(t,function(d,h){d!=null&&($i.hasClass(h)?h&&(s.push(h),l.set(h,!0)):r[h]=r[h]==null?Zn(d):ui(r[h],d,!0))}),u&&u.each(function(d,h){$i.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),$i.topologicalTravel(s,$i.getAllClassMainTypes(),c,this);function c(d){var h=$pe(this,d,Ar(t[d])),f=a.get(d),p=f?u&&u.get(d)?"replaceMerge":"normalMerge":"replaceAll",m=Q$(f,h,p);hhe(m,d,$i),r[d]=null,a.set(d,null),o.set(d,0);var v=[],g=[],_=0,S;ne(m,function(x,A){var C=x.existing,M=x.newOption;if(!M)C&&(C.mergeOption({},this),C.optionUpdated({},!1));else{var I=d==="series",D=$i.getClass(d,x.keyInfo.subType,!I);if(!D)return;if(d==="tooltip"){if(S)return;S=!0}if(C&&C.constructor===D)C.name=x.keyInfo.name,C.mergeOption(M,this),C.optionUpdated(M,!1);else{var E=It({componentIndex:A},x.keyInfo);C=new D(M,this,this,E),It(C,E),x.brandNew&&(C.__requireNewView=!0),C.init(M,this,this),C.optionUpdated(null,!0)}}C?(v.push(C.option),g.push(C),_++):(v.push(void 0),g.push(void 0))},this),r[d]=v,a.set(d,g),o.set(d,_),d==="series"&&e6(this)}this._seriesIndices||e6(this)},e.prototype.getOption=function(){var t=Zn(this.option);return ne(t,function(i,r){if($i.hasClass(r)){for(var a=Ar(i),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!M9(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,t[r]=a}}),delete t[xk],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,i){var r=this._componentsMap.get(t);if(r){var a=r[i||0];if(a)return a;if(i==null){for(var o=0;o<r.length;o++)if(r[o])return r[o]}}},e.prototype.queryComponents=function(t){var i=t.mainType;if(!i)return[];var r=t.index,a=t.id,o=t.name,s=this._componentsMap.get(i);if(!s||!s.length)return[];var l;return r!=null?(l=[],ne(Ar(r),function(u){s[u]&&l.push(s[u])})):a!=null?l=wk("id",a,s):o!=null?l=wk("name",o,s):l=dr(s,function(u){return!!u}),Tk(l,t)},e.prototype.findComponents=function(t){var i=t.query,r=t.mainType,a=s(i),o=a?this.queryComponents(a):dr(this._componentsMap.get(r),function(u){return!!u});return l(Tk(o,t));function s(u){var c=r+"Index",d=r+"Id",h=r+"Name";return u&&(u[c]!=null||u[d]!=null||u[h]!=null)?{mainType:r,index:u[c],id:u[d],name:u[h]}:null}function l(u){return t.filter?dr(u,t.filter):u}},e.prototype.eachComponent=function(t,i,r){var a=this._componentsMap;if($n(t)){var o=i,s=t;a.each(function(d,h){for(var f=0;d&&f<d.length;f++){var p=d[f];p&&s.call(o,h,p,p.componentIndex)}})}else for(var l=xn(t)?a.get(t):Kn(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var c=l[u];c&&i.call(r,c,c.componentIndex)}},e.prototype.getSeriesByName=function(t){var i=lo(t,null);return dr(this._componentsMap.get("series"),function(r){return!!r&&i!=null&&r.name===i})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return dr(this._componentsMap.get("series"),function(i){return!!i&&i.subType===t})},e.prototype.getSeries=function(){return dr(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,i){Dm(this),ne(this._seriesIndices,function(r){var a=this._componentsMap.get("series")[r];t.call(i,a,r)},this)},e.prototype.eachRawSeries=function(t,i){ne(this._componentsMap.get("series"),function(r){r&&t.call(i,r,r.componentIndex)})},e.prototype.eachSeriesByType=function(t,i,r){Dm(this),ne(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===t&&i.call(r,o,a)},this)},e.prototype.eachRawSeriesByType=function(t,i,r){return ne(this.getSeriesByType(t),i,r)},e.prototype.isSeriesFiltered=function(t){return Dm(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,i){Dm(this);var r=[];ne(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];t.call(i,o,a)&&r.push(a)},this),this._seriesIndices=r,this._seriesIndicesMap=In(r)},e.prototype.restoreData=function(t){e6(this);var i=this._componentsMap,r=[];i.each(function(a,o){$i.hasClass(o)&&r.push(o)}),$i.topologicalTravel(r,$i.getAllClassMainTypes(),function(a){ne(i.get(a),function(o){o&&(a!=="series"||!Zpe(o,t))&&o.restoreData()})})},e.internalField=function(){e6=function(t){var i=t._seriesIndices=[];ne(t._componentsMap.get("series"),function(r){r&&i.push(r.componentIndex)}),t._seriesIndicesMap=In(i)},Dm=function(t){},bk=function(t,i){t.option={},t.option[xk]=Kpe,t._componentsMap=In({series:[]}),t._componentsCount=In();var r=i.aria;Kn(r)&&r.enabled==null&&(r.enabled=!0),Jpe(i,t._theme.option),ui(i,Vpe,!1),t._mergeOption(i,null)}}(),e}(Xr);function Zpe(n,e){if(e){var t=e.seriesIndex,i=e.seriesId,r=e.seriesName;return t!=null&&n.componentIndex!==t||i!=null&&n.id!==i||r!=null&&n.name!==r}}function Jpe(n,e){var t=n.color&&!n.colorLayer;ne(e,function(i,r){r==="colorLayer"&&t||$i.hasClass(r)||(typeof i=="object"?n[r]=n[r]?ui(n[r],i,!1):Zn(i):n[r]==null&&(n[r]=i))})}function wk(n,e,t){if($t(e)){var i=In();return ne(e,function(a){if(a!=null){var o=lo(a,null);o!=null&&i.set(a,!0)}}),dr(t,function(a){return a&&i.get(a[n])})}else{var r=lo(e,null);return dr(t,function(a){return a&&r!=null&&a[n]===r})}}function Tk(n,e){return e.hasOwnProperty("subType")?dr(n,function(t){return t&&t.subType===e.subType}):n}function Ak(n){var e=In();return n&&ne(Ar(n.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}Za(AX,RE);const CX=AX;var Qpe=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],e1e=function(){function n(e){ne(Qpe,function(t){this[t]=An(e[t],e)},this)}return n}();const MX=e1e;var zb={},t1e=function(){function n(){this._coordinateSystems=[]}return n.prototype.create=function(e,t){var i=[];ne(zb,function(r,a){var o=r.create(e,t);i=i.concat(o||[])}),this._coordinateSystems=i},n.prototype.update=function(e,t){ne(this._coordinateSystems,function(i){i.update&&i.update(e,t)})},n.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},n.register=function(e,t){zb[e]=t},n.get=function(e){return zb[e]},n}();const x3=t1e;var n1e=/^(min|max)?(.+)$/,i1e=function(){function n(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return n.prototype.setOption=function(e,t,i){e&&(ne(Ar(e.series),function(o){o&&o.data&&sl(o.data)&&O5(o.data)}),ne(Ar(e.dataset),function(o){o&&o.source&&sl(o.source)&&O5(o.source)})),e=Zn(e);var r=this._optionBackup,a=r1e(e,t,!r);this._newBaseOption=a.baseOption,r?(a.timelineOptions.length&&(r.timelineOptions=a.timelineOptions),a.mediaList.length&&(r.mediaList=a.mediaList),a.mediaDefault&&(r.mediaDefault=a.mediaDefault)):this._optionBackup=a},n.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],Zn(e?t.baseOption:this._newBaseOption)},n.prototype.getTimelineOption=function(e){var t,i=this._timelineOptions;if(i.length){var r=e.getComponent("timeline");r&&(t=Zn(i[r.getCurrentIndex()]))}return t},n.prototype.getMediaOption=function(e){var t=this._api.getWidth(),i=this._api.getHeight(),r=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!r.length&&!a)return s;for(var l=0,u=r.length;l<u;l++)a1e(r[l].query,t,i)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!s1e(o,this._currentMediaIndices)&&(s=Xt(o,function(c){return Zn(c===-1?a.option:r[c].option)})),this._currentMediaIndices=o,s},n}();function r1e(n,e,t){var i=[],r,a,o=n.baseOption,s=n.timeline,l=n.options,u=n.media,c=!!n.media,d=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((d||c)&&(n.options=n.media=null),a=n),c&&$t(u)&&ne(u,function(f){f&&f.option&&(f.query?i.push(f):r||(r=f))}),h(a),ne(l,function(f){return h(f)}),ne(i,function(f){return h(f.option)});function h(f){ne(e,function(p){p(f,t)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:r,mediaList:i}}function a1e(n,e,t){var i={width:e,height:t,aspectratio:e/t},r=!0;return ne(n,function(a,o){var s=o.match(n1e);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();o1e(i[u],a,l)||(r=!1)}}),r}function o1e(n,e,t){return t==="min"?n>=e:t==="max"?n<=e:n===e}function s1e(n,e){return n.join(",")===e.join(",")}const l1e=i1e;var B0=ne,N9=Kn,Ck=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Gb(n){var e=n&&n.itemStyle;if(e)for(var t=0,i=Ck.length;t<i;t++){var r=Ck[t],a=e.normal,o=e.emphasis;a&&a[r]&&(n[r]=n[r]||{},n[r].normal?ui(n[r].normal,a[r]):n[r].normal=a[r],a[r]=null),o&&o[r]&&(n[r]=n[r]||{},n[r].emphasis?ui(n[r].emphasis,o[r]):n[r].emphasis=o[r],o[r]=null)}}function is(n,e,t){if(n&&n[e]&&(n[e].normal||n[e].emphasis)){var i=n[e].normal,r=n[e].emphasis;i&&(t?(n[e].normal=n[e].emphasis=null,qn(n[e],i)):n[e]=i),r&&(n.emphasis=n.emphasis||{},n.emphasis[e]=r,r.focus&&(n.emphasis.focus=r.focus),r.blurScope&&(n.emphasis.blurScope=r.blurScope))}}function Tg(n){is(n,"itemStyle"),is(n,"lineStyle"),is(n,"areaStyle"),is(n,"label"),is(n,"labelLine"),is(n,"upperLabel"),is(n,"edgeLabel")}function Va(n,e){var t=N9(n)&&n[e],i=N9(t)&&t.textStyle;if(i)for(var r=0,a=IN.length;r<a;r++){var o=IN[r];i.hasOwnProperty(o)&&(t[o]=i[o])}}function s0(n){n&&(Tg(n),Va(n,"label"),n.emphasis&&Va(n.emphasis,"label"))}function u1e(n){if(N9(n)){Gb(n),Tg(n),Va(n,"label"),Va(n,"upperLabel"),Va(n,"edgeLabel"),n.emphasis&&(Va(n.emphasis,"label"),Va(n.emphasis,"upperLabel"),Va(n.emphasis,"edgeLabel"));var e=n.markPoint;e&&(Gb(e),s0(e));var t=n.markLine;t&&(Gb(t),s0(t));var i=n.markArea;i&&s0(i);var r=n.data;if(n.type==="graph"){r=r||n.nodes;var a=n.links||n.edges;if(a&&!sl(a))for(var o=0;o<a.length;o++)s0(a[o]);ne(n.categories,function(u){Tg(u)})}if(r&&!sl(r))for(var o=0;o<r.length;o++)s0(r[o]);if(e=n.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)s0(s[o]);if(t=n.markLine,t&&t.data)for(var l=t.data,o=0;o<l.length;o++)$t(l[o])?(s0(l[o][0]),s0(l[o][1])):s0(l[o]);n.type==="gauge"?(Va(n,"axisLabel"),Va(n,"title"),Va(n,"detail")):n.type==="treemap"?(is(n.breadcrumb,"itemStyle"),ne(n.levels,function(u){Tg(u)})):n.type==="tree"&&Tg(n.leaves)}}function yc(n){return $t(n)?n:n?[n]:[]}function Mk(n){return($t(n)?n[0]:n)||{}}function c1e(n,e){B0(yc(n.series),function(i){N9(i)&&u1e(i)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),B0(t,function(i){B0(yc(n[i]),function(r){r&&(Va(r,"axisLabel"),Va(r.axisPointer,"label"))})}),B0(yc(n.parallel),function(i){var r=i&&i.parallelAxisDefault;Va(r,"axisLabel"),Va(r&&r.axisPointer,"label")}),B0(yc(n.calendar),function(i){is(i,"itemStyle"),Va(i,"dayLabel"),Va(i,"monthLabel"),Va(i,"yearLabel")}),B0(yc(n.radar),function(i){Va(i,"name"),i.name&&i.axisName==null&&(i.axisName=i.name,delete i.name),i.nameGap!=null&&i.axisNameGap==null&&(i.axisNameGap=i.nameGap,delete i.nameGap)}),B0(yc(n.geo),function(i){N9(i)&&(s0(i),B0(yc(i.regions),function(r){s0(r)}))}),B0(yc(n.timeline),function(i){s0(i),is(i,"label"),is(i,"itemStyle"),is(i,"controlStyle",!0);var r=i.data;$t(r)&&ne(r,function(a){Kn(a)&&(is(a,"label"),is(a,"itemStyle"))})}),B0(yc(n.toolbox),function(i){is(i,"iconStyle"),B0(i.feature,function(r){is(r,"iconStyle")})}),Va(Mk(n.axisPointer),"label"),Va(Mk(n.tooltip).axisPointer,"label")}function d1e(n,e){for(var t=e.split(","),i=n,r=0;r<t.length&&(i=i&&i[t[r]],i!=null);r++);return i}function h1e(n,e,t,i){for(var r=e.split(","),a=n,o,s=0;s<r.length-1;s++)o=r[s],a[o]==null&&(a[o]={}),a=a[o];(i||a[r[s]]==null)&&(a[r[s]]=t)}function Ek(n){n&&ne(f1e,function(e){e[0]in n&&!(e[1]in n)&&(n[e[1]]=n[e[0]])})}var f1e=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],p1e=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Ub=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Nm(n){var e=n&&n.itemStyle;if(e)for(var t=0;t<Ub.length;t++){var i=Ub[t][1],r=Ub[t][0];e[i]!=null&&(e[r]=e[i])}}function Pk(n){n&&n.alignTo==="edge"&&n.margin!=null&&n.edgeDistance==null&&(n.edgeDistance=n.margin)}function Rk(n){n&&n.downplay&&!n.blur&&(n.blur=n.downplay)}function v1e(n){n&&n.focusNodeAdjacency!=null&&(n.emphasis=n.emphasis||{},n.emphasis.focus==null&&(n.emphasis.focus="adjacency"))}function EX(n,e){if(n)for(var t=0;t<n.length;t++)e(n[t]),n[t]&&EX(n[t].children,e)}function PX(n,e){c1e(n,e),n.series=Ar(n.series),ne(n.series,function(t){if(Kn(t)){var i=t.type;if(i==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow);else if(i==="pie"||i==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise),Pk(t.label);var r=t.data;if(r&&!sl(r))for(var a=0;a<r.length;a++)Pk(r[a]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if(i==="gauge"){var o=d1e(t,"pointer.color");o!=null&&h1e(t,"itemStyle.color",o)}else if(i==="bar"){Nm(t),Nm(t.backgroundStyle),Nm(t.emphasis);var r=t.data;if(r&&!sl(r))for(var a=0;a<r.length;a++)typeof r[a]=="object"&&(Nm(r[a]),Nm(r[a]&&r[a].emphasis))}else if(i==="sunburst"){var s=t.highlightPolicy;s&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=s)),Rk(t),EX(t.data,Rk)}else i==="graph"||i==="sankey"?v1e(t):i==="map"&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&qn(t,t.mapLocation));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(t.emphasis.scale=t.hoverAnimation)),Ek(t)}}),n.dataRange&&(n.visualMap=n.dataRange),ne(p1e,function(t){var i=n[t];i&&($t(i)||(i=[i]),ne(i,function(r){Ek(r)}))})}function m1e(n){var e=In();n.eachSeries(function(t){var i=t.get("stack");if(i){var r=e.get(i)||e.set(i,[]),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;r.length&&a.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}}),e.each(g1e)}function g1e(n){ne(n,function(e,t){var i=[],r=[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,d){var h=o.get(e.stackedDimension,d);if(isNaN(h))return r;var f,p;s?p=o.getRawIndex(d):f=o.get(e.stackedByDimension,d);for(var m=NaN,v=t-1;v>=0;v--){var g=n[v];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&h>=0&&_>0||l==="samesign"&&h<=0&&_<0){h=the(h,_),m=_;break}}}return i[0]=h,i[1]=m,i})})}var B_=function(){function n(e){this.data=e.data||(e.sourceFormat===tc?{}:[]),this.sourceFormat=e.sourceFormat||_X,this.seriesLayoutBy=e.seriesLayoutBy||Wu,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var i=0;i<t.length;i++){var r=t[i];r.type==null&&xX(this,i)===Go.Must&&(r.type="ordinal")}}return n}();function LE(n){return n instanceof B_}function DA(n,e,t){t=t||RX(n);var i=e.seriesLayoutBy,r=_1e(n,t,i,e.sourceHeader,e.dimensions),a=new B_({data:n,sourceFormat:t,seriesLayoutBy:i,dimensionsDefine:r.dimensionsDefine,startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount,metaRawOption:Zn(e)});return a}function IE(n){return new B_({data:n,sourceFormat:sl(n)?mh:R0})}function y1e(n){return new B_({data:n.data,sourceFormat:n.sourceFormat,seriesLayoutBy:n.seriesLayoutBy,dimensionsDefine:Zn(n.dimensionsDefine),startIndex:n.startIndex,dimensionsDetectedCount:n.dimensionsDetectedCount})}function RX(n){var e=_X;if(sl(n))e=mh;else if($t(n)){n.length===0&&(e=hs);for(var t=0,i=n.length;t<i;t++){var r=n[t];if(r!=null){if($t(r)||sl(r)){e=hs;break}else if(Kn(r)){e=L0;break}}}}else if(Kn(n)){for(var a in n)if(Mn(n,a)&&ds(n[a])){e=tc;break}}return e}function _1e(n,e,t,i,r){var a,o;if(!n)return{dimensionsDefine:Lk(r),startIndex:o,dimensionsDetectedCount:a};if(e===hs){var s=n;i==="auto"||i==null?Ik(function(u){u!=null&&u!=="-"&&(xn(u)?o==null&&(o=1):o=0)},t,s,10):o=Yi(i)?i:i?1:0,!r&&o===1&&(r=[],Ik(function(u,c){r[c]=u!=null?u+"":""},t,s,1/0)),a=r?r.length:t===qv?s.length:s[0]?s[0].length:null}else if(e===L0)r||(r=S1e(n));else if(e===tc)r||(r=[],ne(n,function(u,c){r.push(c)}));else if(e===R0){var l=zv(n[0]);a=$t(l)&&l.length||1}return{startIndex:o,dimensionsDefine:Lk(r),dimensionsDetectedCount:a}}function S1e(n){for(var e=0,t;e<n.length&&!(t=n[e++]););if(t)return Li(t)}function Lk(n){if(n){var e=In();return Xt(n,function(t,i){t=Kn(t)?t:{name:t};var r={name:t.name,displayName:t.displayName,type:t.type};if(r.name==null)return r;r.name+="",r.displayName==null&&(r.displayName=r.name);var a=e.get(r.name);return a?r.name+="-"+a.count++:e.set(r.name,{count:1}),r})}}function Ik(n,e,t,i){if(e===qv)for(var r=0;r<t.length&&r<i;r++)n(t[r]?t[r][0]:null,r);else for(var a=t[0]||[],r=0;r<a.length&&r<i;r++)n(a[r],r)}function LX(n){var e=n.sourceFormat;return e===L0||e===tc}var Af,Cf,Mf,Dk,Nk,IX=function(){function n(e,t){var i=LE(e)?e:IE(e);this._source=i;var r=this._data=i.data;i.sourceFormat===mh&&(this._offset=0,this._dimSize=t,this._data=r),Nk(this,r,i)}return n.prototype.getSource=function(){return this._source},n.prototype.count=function(){return 0},n.prototype.getItem=function(e,t){},n.prototype.appendData=function(e){},n.prototype.clean=function(){},n.protoInitialize=function(){var e=n.prototype;e.pure=!1,e.persistent=!0}(),n.internalField=function(){var e;Nk=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,d=l.startIndex,h=l.dimensionsDefine,f=Dk[DE(u,c)];if(It(o,f),u===mh)o.getItem=t,o.count=r,o.fillStorage=i;else{var p=DX(u,c);o.getItem=An(p,null,s,d,h);var m=NX(u,c);o.count=An(m,null,s,d,h)}};var t=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,d=0;d<u;d++)s[d]=l[c+d];return s},i=function(o,s,l,u){for(var c=this._data,d=this._dimSize,h=0;h<d;h++){for(var f=u[h],p=f[0]==null?1/0:f[0],m=f[1]==null?-1/0:f[1],v=s-o,g=l[h],_=0;_<v;_++){var S=c[_*d+h];g[o+_]=S,S<p&&(p=S),S>m&&(m=S)}f[0]=p,f[1]=m}},r=function(){return this._data?this._data.length/this._dimSize:0};Dk=(e={},e[hs+"_"+Wu]={pure:!0,appendData:a},e[hs+"_"+qv]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[L0]={pure:!0,appendData:a},e[tc]={pure:!0,appendData:function(o){var s=this._data;ne(o,function(l,u){for(var c=s[u]||(s[u]=[]),d=0;d<(l||[]).length;d++)c.push(l[d])})}},e[R0]={appendData:a},e[mh]={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])}}(),n}(),kk=function(n,e,t,i){return n[i]},b1e=(Af={},Af[hs+"_"+Wu]=function(n,e,t,i){return n[i+e]},Af[hs+"_"+qv]=function(n,e,t,i,r){i+=e;for(var a=r||[],o=n,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[i]:null}return a},Af[L0]=kk,Af[tc]=function(n,e,t,i,r){for(var a=r||[],o=0;o<t.length;o++){var s=t[o].name,l=n[s];a[o]=l?l[i]:null}return a},Af[R0]=kk,Af);function DX(n,e){var t=b1e[DE(n,e)];return t}var Fk=function(n,e,t){return n.length},x1e=(Cf={},Cf[hs+"_"+Wu]=function(n,e,t){return Math.max(0,n.length-e)},Cf[hs+"_"+qv]=function(n,e,t){var i=n[0];return i?Math.max(0,i.length-e):0},Cf[L0]=Fk,Cf[tc]=function(n,e,t){var i=t[0].name,r=n[i];return r?r.length:0},Cf[R0]=Fk,Cf);function NX(n,e){var t=x1e[DE(n,e)];return t}var Vb=function(n,e,t){return n[e]},w1e=(Mf={},Mf[hs]=Vb,Mf[L0]=function(n,e,t){return n[t]},Mf[tc]=Vb,Mf[R0]=function(n,e,t){var i=zv(n);return i instanceof Array?i[e]:i},Mf[mh]=Vb,Mf);function kX(n){var e=w1e[n];return e}function DE(n,e){return n===hs?n+"_"+e:n}function pv(n,e,t){if(n){var i=n.getRawDataItem(e);if(i!=null){var r=n.getStore(),a=r.getSource().sourceFormat;if(t!=null){var o=n.getDimensionIndex(t),s=r.getDimensionProperty(o);return kX(a)(i,o,s)}else{var l=i;return a===R0&&(l=zv(i)),l}}}}var T1e=/\{@(.+?)\}/g,z_=function(){function n(){}return n.prototype.getDataParams=function(e,t){var i=this.getData(t),r=this.getRawValue(e,t),a=i.getRawIndex(e),o=i.getName(e),s=i.getRawDataItem(e),l=i.getItemVisual(e,"style"),u=l&&l[i.getItemVisual(e,"drawType")||"fill"],c=l&&l.stroke,d=this.mainType,h=d==="series",f=i.userOutput&&i.userOutput.get();return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:a,data:s,dataType:t,value:r,color:u,borderColor:c,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:["seriesName","name","value"]}},n.prototype.getFormattedLabel=function(e,t,i,r,a,o){t=t||"normal";var s=this.getData(i),l=this.getDataParams(e,i);if(o&&(l.value=o.interpolatedValue),r!=null&&$t(l.value)&&(l.value=l.value[r]),!a){var u=s.getItemModel(e);a=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if($n(a))return l.status=t,l.dimensionIndex=r,a(l);if(xn(a)){var c=pX(a,l);return c.replace(T1e,function(d,h){var f=h.length,p=h;p.charAt(0)==="["&&p.charAt(f-1)==="]"&&(p=+p.slice(1,f-1));var m=pv(s,e,p);if(o&&$t(o.interpolatedValue)){var v=s.getDimensionIndex(p);v>=0&&(m=o.interpolatedValue[v])}return m!=null?m+"":""})}},n.prototype.getRawValue=function(e,t){return pv(this.getData(t),e)},n.prototype.formatTooltip=function(e,t,i){},n}();function Ok(n){var e,t;return Kn(n)?n.type&&(t=n):e=n,{text:e,frag:t}}function Xg(n){return new A1e(n)}var A1e=function(){function n(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return n.prototype.perform=function(e){var t=this._upstream,i=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(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(_){return!(_>=1)&&(_=1),_}var d;(this._dirty||a==="reset")&&(this._dirty=!1,d=this._doReset(i)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(d||f<p)){var m=this._progress;if($t(m))for(var v=0;v<m.length;v++)this._doProgress(m[v],f,p,l,u);else this._doProgress(m,f,p,l,u)}this._dueIndex=p;var g=this._settedOutputEnd!=null?this._settedOutputEnd:p;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},n.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},n.prototype._doProgress=function(e,t,i,r,a){Bk.reset(t,i,r,a),this._callingProgress=e,this._callingProgress({start:t,end:i,count:i-t,next:Bk.next},this.context)},n.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,i;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(i=t.forceFirstProgress,t=t.progress),$t(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),i},n.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},n.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},n.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},n.prototype.getUpstream=function(){return this._upstream},n.prototype.getDownstream=function(){return this._downstream},n.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},n}(),Bk=function(){var n,e,t,i,r,a={reset:function(l,u,c,d){e=l,n=u,t=c,i=d,r=Math.ceil(i/t),a.next=t>1&&i>0?s:o}};return a;function o(){return e<n?e++:null}function s(){var l=e%r*t+Math.ceil(e/r),u=e>=n?null:l<i?l:e;return e++,u}}();function gh(n,e){var t=e&&e.type;return t==="ordinal"?n:(t==="time"&&!Yi(n)&&n!=null&&n!=="-"&&(n=+Ju(n)),n==null||n===""?NaN:Number(n))}var C1e=In({number:function(n){return parseFloat(n)},time:function(n){return+Ju(n)},trim:function(n){return xn(n)?K0(n):n}});function FX(n){return C1e.get(n)}var OX={lt:function(n,e){return n<e},lte:function(n,e){return n<=e},gt:function(n,e){return n>e},gte:function(n,e){return n>=e}},M1e=function(){function n(e,t){if(!Yi(t)){var i="";ur(i)}this._opFn=OX[e],this._rvalFloat=jc(t)}return n.prototype.evaluate=function(e){return Yi(e)?this._opFn(e,this._rvalFloat):this._opFn(jc(e),this._rvalFloat)},n}(),BX=function(){function n(e,t){var i=e==="desc";this._resultLT=i?1:-1,t==null&&(t=i?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return n.prototype.evaluate=function(e,t){var i=Yi(e)?e:jc(e),r=Yi(t)?t:jc(t),a=isNaN(i),o=isNaN(r);if(a&&(i=this._incomparable),o&&(r=this._incomparable),a&&o){var s=xn(e),l=xn(t);s&&(i=l?e:0),l&&(r=s?t:0)}return i<r?this._resultLT:i>r?-this._resultLT:0},n}(),E1e=function(){function n(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=jc(t)}return n.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var i=typeof e;i!==this._rvalTypeof&&(i==="number"||this._rvalTypeof==="number")&&(t=jc(e)===this._rvalFloat)}return this._isEQ?t:!t},n}();function P1e(n,e){return n==="eq"||n==="ne"?new E1e(n==="eq",e):Mn(OX,n)?new M1e(n,e):null}var R1e=function(){function n(){}return n.prototype.getRawData=function(){throw new Error("not supported")},n.prototype.getRawDataItem=function(e){throw new Error("not supported")},n.prototype.cloneRawData=function(){},n.prototype.getDimensionInfo=function(e){},n.prototype.cloneAllDimensionInfo=function(){},n.prototype.count=function(){},n.prototype.retrieveValue=function(e,t){},n.prototype.retrieveValueFromItem=function(e,t){},n.prototype.convertValue=function(e,t){return gh(e,t)},n}();function L1e(n,e){var t=new R1e,i=n.data,r=t.sourceFormat=n.sourceFormat,a=n.startIndex,o="";n.seriesLayoutBy!==Wu&&ur(o);var s=[],l={},u=n.dimensionsDefine;if(u)ne(u,function(m,v){var g=m.name,_={index:v,name:g,displayName:m.displayName};if(s.push(_),g!=null){var S="";Mn(l,g)&&ur(S),l[g]=_}});else for(var c=0;c<n.dimensionsDetectedCount;c++)s.push({index:c});var d=DX(r,Wu);e.__isBuiltIn&&(t.getRawDataItem=function(m){return d(i,a,s,m)},t.getRawData=An(I1e,null,n)),t.cloneRawData=An(D1e,null,n);var h=NX(r,Wu);t.count=An(h,null,i,a,s);var f=kX(r);t.retrieveValue=function(m,v){var g=d(i,a,s,m);return p(g,v)};var p=t.retrieveValueFromItem=function(m,v){if(m!=null){var g=s[v];if(g)return f(m,v,g.name)}};return t.getDimensionInfo=An(N1e,null,s,l),t.cloneAllDimensionInfo=An(k1e,null,s),t}function I1e(n){var e=n.sourceFormat;if(!NE(e)){var t="";ur(t)}return n.data}function D1e(n){var e=n.sourceFormat,t=n.data;if(!NE(e)){var i="";ur(i)}if(e===hs){for(var r=[],a=0,o=t.length;a<o;a++)r.push(t[a].slice());return r}else if(e===L0){for(var r=[],a=0,o=t.length;a<o;a++)r.push(It({},t[a]));return r}}function N1e(n,e,t){if(t!=null){if(Yi(t)||!isNaN(t)&&!Mn(e,t))return n[t];if(Mn(e,t))return e[t]}}function k1e(n){return Zn(n)}var zX=In();function F1e(n){n=Zn(n);var e=n.type,t="";e||ur(t);var i=e.split(":");i.length!==2&&ur(t);var r=!1;i[0]==="echarts"&&(e=i[1],r=!0),n.__isBuiltIn=r,zX.set(e,n)}function O1e(n,e,t){var i=Ar(n),r=i.length,a="";r||ur(a);for(var o=0,s=r;o<s;o++){var l=i[o];e=B1e(l,e),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function B1e(n,e,t,i){var r="";e.length||ur(r),Kn(n)||ur(r);var a=n.type,o=zX.get(a);o||ur(r);var s=Xt(e,function(u){return L1e(u,o)}),l=Ar(o.transform({upstream:s[0],upstreamList:s,config:Zn(n.config)}));return Xt(l,function(u,c){var d="";Kn(u)||ur(d),u.data||ur(d);var h=RX(u.data);NE(h)||ur(d);var f,p=e[0];if(p&&c===0&&!u.dimensions){var m=p.startIndex;m&&(u.data=p.data.slice(0,m).concat(u.data)),f={seriesLayoutBy:Wu,sourceHeader:m,dimensions:p.metaRawOption.dimensions}}else f={seriesLayoutBy:Wu,sourceHeader:0,dimensions:u.dimensions};return DA(u.data,f,null)})}function NE(n){return n===hs||n===L0}var G_="undefined",z1e=typeof Uint32Array===G_?Array:Uint32Array,G1e=typeof Uint16Array===G_?Array:Uint16Array,GX=typeof Int32Array===G_?Array:Int32Array,zk=typeof Float64Array===G_?Array:Float64Array,UX={float:zk,int:GX,ordinal:Array,number:Array,time:zk},Hb;function N1(n){return n>65535?z1e:G1e}function k1(){return[1/0,-1/0]}function U1e(n){var e=n.constructor;return e===Array?n.slice():new e(n)}function Gk(n,e,t,i,r){var a=UX[t||"float"];if(r){var o=n[e],s=o&&o.length;if(s!==i){for(var l=new a(i),u=0;u<s;u++)l[u]=o[u];n[e]=l}}else n[e]=new a(i)}var NA=function(){function n(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=In()}return n.prototype.initData=function(e,t,i){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),a=this.defaultDimValueGetter=Hb[r.sourceFormat];this._dimValueGetter=i||a,this._rawExtent=[],LX(r),this._dimensions=Xt(t,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,e.count())},n.prototype.getProvider=function(){return this._provider},n.prototype.getSource=function(){return this._provider.getSource()},n.prototype.ensureCalculationDimension=function(e,t){var i=this._calcDimNameToIdx,r=this._dimensions,a=i.get(e);if(a!=null){if(r[a].type===t)return a}else a=r.length;return r[a]={type:t},i.set(e,a),this._chunks[a]=new UX[t||"float"](this._rawCount),this._rawExtent[a]=k1(),a},n.prototype.collectOrdinalMeta=function(e,t){var i=this._chunks[e],r=this._dimensions[e],a=this._rawExtent,o=r.ordinalOffset||0,s=i.length;o===0&&(a[e]=k1());for(var l=a[e],u=o;u<s;u++){var c=i[u]=t.parseAndCollect(i[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}r.ordinalMeta=t,r.ordinalOffset=s,r.type="ordinal"},n.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],i=t.ordinalMeta;return i},n.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},n.prototype.appendData=function(e){var t=this._provider,i=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=i),i<r&&this._initDataFromProvider(i,r,!0),[i,r]},n.prototype.appendValues=function(e,t){for(var i=this._chunks,r=this._dimensions,a=r.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t||0),u=0;u<a;u++){var c=r[u];Gk(i,u,c.type,l,!0)}for(var d=[],h=s;h<l;h++)for(var f=h-s,p=0;p<a;p++){var c=r[p],m=Hb.arrayRows.call(this,e[f]||d,c.property,f,p);i[p][h]=m;var v=o[p];m<v[0]&&(v[0]=m),m>v[1]&&(v[1]=m)}return this._rawCount=this._count=l,{start:s,end:l}},n.prototype._initDataFromProvider=function(e,t,i){for(var r=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Xt(o,function(_){return _.property}),c=0;c<s;c++){var d=o[c];l[c]||(l[c]=k1()),Gk(a,c,d.type,t,i)}if(r.fillStorage)r.fillStorage(e,t,a,l);else for(var h=[],f=e;f<t;f++){h=r.getItem(f,h);for(var p=0;p<s;p++){var m=a[p],v=this._dimValueGetter(h,u[p],f,p);m[f]=v;var g=l[p];v<g[0]&&(g[0]=v),v>g[1]&&(g[1]=v)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},n.prototype.count=function(){return this._count},n.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var i=this._chunks[e];return i?i[this.getRawIndex(t)]:NaN},n.prototype.getValues=function(e,t){var i=[],r=[];if(t==null){t=e,e=[];for(var a=0;a<this._dimensions.length;a++)r.push(a)}else r=e;for(var a=0,o=r.length;a<o;a++)i.push(this.get(r[a],t));return i},n.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var i=this._chunks[e];return i?i[t]:NaN},n.prototype.getSum=function(e){var t=this._chunks[e],i=0;if(t)for(var r=0,a=this.count();r<a;r++){var o=this.get(e,r);isNaN(o)||(i+=o)}return i},n.prototype.getMedian=function(e){var t=[];this.each([e],function(a){isNaN(a)||t.push(a)});var i=t.sort(function(a,o){return a-o}),r=this.count();return r===0?0:r%2===1?i[(r-1)/2]:(i[r/2]+i[r/2-1])/2},n.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,i=t[e];if(i!=null&&i<this._count&&i===e)return e;for(var r=0,a=this._count-1;r<=a;){var o=(r+a)/2|0;if(t[o]<e)r=o+1;else if(t[o]>e)a=o-1;else return o}return-1},n.prototype.indicesOfNearest=function(e,t,i){var r=this._chunks,a=r[e],o=[];if(!a)return o;i==null&&(i=1/0);for(var s=1/0,l=-1,u=0,c=0,d=this.count();c<d;c++){var h=this.getRawIndex(c),f=t-a[h],p=Math.abs(f);p<=i&&((p<s||p===s&&f>=0&&l<0)&&(s=p,l=f,u=0),f===l&&(o[u++]=c))}return o.length=u,o},n.prototype.getIndices=function(){var e,t=this._indices;if(t){var i=t.constructor,r=this._count;if(i===Array){e=new i(r);for(var a=0;a<r;a++)e[a]=t[a]}else e=new i(t.buffer,0,r)}else{var i=N1(this._rawCount);e=new i(this.count());for(var a=0;a<e.length;a++)e[a]=a}return e},n.prototype.filter=function(e,t){if(!this._count)return this;for(var i=this.clone(),r=i.count(),a=N1(i._rawCount),o=new a(r),s=[],l=e.length,u=0,c=e[0],d=i._chunks,h=0;h<r;h++){var f=void 0,p=i.getRawIndex(h);if(l===0)f=t(h);else if(l===1){var m=d[c][p];f=t(m,h)}else{for(var v=0;v<l;v++)s[v]=d[e[v]][p];s[v]=h,f=t.apply(null,s)}f&&(o[u++]=p)}return u<r&&(i._indices=o),i._count=u,i._extent=[],i._updateGetRawIdx(),i},n.prototype.selectRange=function(e){var t=this.clone(),i=t._count;if(!i)return this;var r=Li(e),a=r.length;if(!a)return this;var o=t.count(),s=N1(t._rawCount),l=new s(o),u=0,c=r[0],d=e[c][0],h=e[c][1],f=t._chunks,p=!1;if(!t._indices){var m=0;if(a===1){for(var v=f[r[0]],g=0;g<i;g++){var _=v[g];(_>=d&&_<=h||isNaN(_))&&(l[u++]=m),m++}p=!0}else if(a===2){for(var v=f[r[0]],S=f[r[1]],x=e[r[1]][0],A=e[r[1]][1],g=0;g<i;g++){var _=v[g],C=S[g];(_>=d&&_<=h||isNaN(_))&&(C>=x&&C<=A||isNaN(C))&&(l[u++]=m),m++}p=!0}}if(!p)if(a===1)for(var g=0;g<o;g++){var M=t.getRawIndex(g),_=f[r[0]][M];(_>=d&&_<=h||isNaN(_))&&(l[u++]=M)}else for(var g=0;g<o;g++){for(var I=!0,M=t.getRawIndex(g),D=0;D<a;D++){var E=r[D],_=f[E][M];(_<e[E][0]||_>e[E][1])&&(I=!1)}I&&(l[u++]=t.getRawIndex(g))}return u<o&&(t._indices=l),t._count=u,t._extent=[],t._updateGetRawIdx(),t},n.prototype.map=function(e,t){var i=this.clone(e);return this._updateDims(i,e,t),i},n.prototype.modify=function(e,t){this._updateDims(this,e,t)},n.prototype._updateDims=function(e,t,i){for(var r=e._chunks,a=[],o=t.length,s=e.count(),l=[],u=e._rawExtent,c=0;c<t.length;c++)u[t[c]]=k1();for(var d=0;d<s;d++){for(var h=e.getRawIndex(d),f=0;f<o;f++)l[f]=r[t[f]][h];l[o]=d;var p=i&&i.apply(null,l);if(p!=null){typeof p!="object"&&(a[0]=p,p=a);for(var c=0;c<p.length;c++){var m=t[c],v=p[c],g=u[m],_=r[m];_&&(_[h]=v),v<g[0]&&(g[0]=v),v>g[1]&&(g[1]=v)}}}},n.prototype.lttbDownSample=function(e,t){var i=this.clone([e],!0),r=i._chunks,a=r[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,d,h,f=new(N1(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));f[s++]=u;for(var p=1;p<o-1;p+=l){for(var m=Math.min(p+l,o-1),v=Math.min(p+l*2,o),g=(v+m)/2,_=0,S=m;S<v;S++){var x=this.getRawIndex(S),A=a[x];isNaN(A)||(_+=A)}_/=v-m;var C=p,M=Math.min(p+l,o),I=p-1,D=a[u];c=-1,h=C;for(var E=-1,P=0,S=C;S<M;S++){var x=this.getRawIndex(S),A=a[x];if(isNaN(A)){P++,E<0&&(E=x);continue}d=Math.abs((I-g)*(A-D)-(I-S)*(_-D)),d>c&&(c=d,h=x)}P>0&&P<M-C&&(f[s++]=Math.min(E,h),h=Math.max(E,h)),f[s++]=h,u=h}return f[s++]=this.getRawIndex(o-1),i._count=s,i._indices=f,i.getRawIndex=this._getRawIdx,i},n.prototype.minmaxDownSample=function(e,t){for(var i=this.clone([e],!0),r=i._chunks,a=Math.floor(1/t),o=r[e],s=this.count(),l=new(N1(this._rawCount))(Math.ceil(s/a)*2),u=0,c=0;c<s;c+=a){var d=c,h=o[this.getRawIndex(d)],f=c,p=o[this.getRawIndex(f)],m=a;c+a>s&&(m=s-c);for(var v=0;v<m;v++){var g=this.getRawIndex(c+v),_=o[g];_<h&&(h=_,d=c+v),_>p&&(p=_,f=c+v)}var S=this.getRawIndex(d),x=this.getRawIndex(f);d<f?(l[u++]=S,l[u++]=x):(l[u++]=x,l[u++]=S)}return i._count=u,i._indices=l,i._updateGetRawIdx(),i},n.prototype.downSample=function(e,t,i,r){for(var a=this.clone([e],!0),o=a._chunks,s=[],l=Math.floor(1/t),u=o[e],c=this.count(),d=a._rawExtent[e]=k1(),h=new(N1(this._rawCount))(Math.ceil(c/l)),f=0,p=0;p<c;p+=l){l>c-p&&(l=c-p,s.length=l);for(var m=0;m<l;m++){var v=this.getRawIndex(p+m);s[m]=u[v]}var g=i(s),_=this.getRawIndex(Math.min(p+r(s,g)||0,c-1));u[_]=g,g<d[0]&&(d[0]=g),g>d[1]&&(d[1]=g),h[f++]=_}return a._count=f,a._indices=h,a._updateGetRawIdx(),a},n.prototype.each=function(e,t){if(this._count)for(var i=e.length,r=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(i){case 0:t(a);break;case 1:t(r[e[0]][s],a);break;case 2:t(r[e[0]][s],r[e[1]][s],a);break;default:for(var l=0,u=[];l<i;l++)u[l]=r[e[l]][s];u[l]=a,t.apply(null,u)}}},n.prototype.getDataExtent=function(e){var t=this._chunks[e],i=k1();if(!t)return i;var r=this.count(),a=!this._indices,o;if(a)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=i;for(var s=o[0],l=o[1],u=0;u<r;u++){var c=this.getRawIndex(u),d=t[c];d<s&&(s=d),d>l&&(l=d)}return o=[s,l],this._extent[e]=o,o},n.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var i=[],r=this._chunks,a=0;a<r.length;a++)i.push(r[a][t]);return i},n.prototype.clone=function(e,t){var i=new n,r=this._chunks,a=e&&Yu(e,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<r.length;o++)i._chunks[o]=a[o]?U1e(r[o]):r[o];else i._chunks=r;return this._copyCommonProps(i),t||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},n.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=Zn(this._extent),e._rawExtent=Zn(this._rawExtent)},n.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var i=this._indices.length;t=new e(i);for(var r=0;r<i;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},n.prototype._getRawIdxIdentity=function(e){return e},n.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},n.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},n.internalField=function(){function e(t,i,r,a){return gh(t[a],this._dimensions[a])}Hb={arrayRows:e,objectRows:function(t,i,r,a){return gh(t[i],this._dimensions[a])},keyedColumns:e,original:function(t,i,r,a){var o=t&&(t.value==null?t:t.value);return gh(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(t,i,r,a){return t[a]}}}(),n}(),VX=function(){function n(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return n.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},n.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},n.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},n.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},n.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),i=!!t.length,r,a;if(t6(e)){var o=e,s=void 0,l=void 0,u=void 0;if(i){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=sl(s)?mh:R0,a=[];var d=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},f=ai(d.seriesLayoutBy,h.seriesLayoutBy)||null,p=ai(d.sourceHeader,h.sourceHeader),m=ai(d.dimensions,h.dimensions),v=f!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||m;r=v?[DA(s,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},l)]:[]}else{var g=e;if(i){var _=this._applyTransform(t);r=_.sourceList,a=_.upstreamSignList}else{var S=g.get("source",!0);r=[DA(S,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(r,a)},n.prototype._applyTransform=function(e){var t=this._sourceHost,i=t.get("transform",!0),r=t.get("fromTransformResult",!0);if(r!=null){var a="";e.length!==1&&Vk(a)}var o,s=[],l=[];return ne(e,function(u){u.prepareSource();var c=u.getSource(r||0),d="";r!=null&&!c&&Vk(d),s.push(c),l.push(u._getVersionSign())}),i?o=O1e(i,s,{datasetIndex:t.componentIndex}):r!=null&&(o=[y1e(s[0])]),{sourceList:o,upstreamSignList:l}},n.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var i=e[t];if(i._isDirty()||this._upstreamSignList[t]!==i._getVersionSign())return!0}},n.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(e)}return t},n.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},n.prototype._innerGetDataStore=function(e,t,i){var r=0,a=this._storeList,o=a[r];o||(o=a[r]={});var s=o[i];if(!s){var l=this._getUpstreamSourceManagers()[0];t6(this._sourceHost)&&l?s=l._innerGetDataStore(e,t,i):(s=new NA,s.initData(new IX(t,e.length),e)),o[i]=s}return s},n.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(t6(e)){var t=PE(e);return t?[t.getSourceManager()]:[]}else return Xt(Wpe(e),function(i){return i.getSourceManager()})},n.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,i,r;if(t6(e))t=e.get("seriesLayoutBy",!0),i=e.get("sourceHeader",!0),r=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=e;t=a.get("seriesLayoutBy",!0),i=a.get("sourceHeader",!0),r=a.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:i,dimensions:r}},n}();function Uk(n){var e=n.option.transform;e&&O5(n.option.transform)}function t6(n){return n.mainType==="series"}function Vk(n){throw new Error(n)}var V1e="line-height:1";function HX(n){var e=n.lineHeight;return e==null?V1e:"line-height:"+os(e+"")+"px"}function WX(n,e){var t=n.color||"#6e7079",i=n.fontSize||12,r=n.fontWeight||"400",a=n.color||"#464646",o=n.fontSize||14,s=n.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+os(i+"")+"px;color:"+os(t)+";font-weight:"+os(r+""),valueStyle:"font-size:"+os(o+"")+"px;color:"+os(a)+";font-weight:"+os(s+"")}:{nameStyle:{fontSize:i,fill:t,fontWeight:r},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var H1e=[0,10,20,30],W1e=["",`
`,`
`,`
`];function So(n,e){return e.type=n,e}function kA(n){return n.type==="section"}function jX(n){return kA(n)?j1e:$1e}function $X(n){if(kA(n)){var e=0,t=n.blocks.length,i=t>1||t>0&&!n.noHeader;return ne(n.blocks,function(r){var a=$X(r);a>=e&&(e=a+ +(i&&(!a||kA(r)&&!r.noHeader)))}),e}return 0}function j1e(n,e,t,i){var r=e.noHeader,a=q1e($X(e)),o=[],s=e.blocks||[];Ls(!s||$t(s)),s=s||[];var l=n.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Mn(u,l)){var c=new BX(u[l],null);s.sort(function(m,v){return c.evaluate(m.sortParam,v.sortParam)})}else l==="seriesDesc"&&s.reverse()}ne(s,function(m,v){var g=e.valueFormatter,_=jX(m)(g?It(It({},n),{valueFormatter:g}):n,m,v>0?a.html:0,i);_!=null&&o.push(_)});var d=n.renderMode==="richText"?o.join(a.richText):FA(i,o.join(""),r?t:a.html);if(r)return d;var h=RA(e.header,"ordinal",n.useUTC),f=WX(i,n.renderMode).nameStyle,p=HX(i);return n.renderMode==="richText"?qX(n,h,f)+a.richText+d:FA(i,'<div style="'+f+";"+p+';">'+os(h)+"</div>"+d,t)}function $1e(n,e,t,i){var r=n.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=n.useUTC,c=e.valueFormatter||n.valueFormatter||function(x){return x=$t(x)?x:[x],Xt(x,function(A,C){return RA(A,$t(f)?f[C]:f,u)})};if(!(a&&o)){var d=s?"":n.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),h=a?"":RA(l,"ordinal",u),f=e.valueType,p=o?[]:c(e.value,e.dataIndex),m=!s||!a,v=!s&&a,g=WX(i,r),_=g.nameStyle,S=g.valueStyle;return r==="richText"?(s?"":d)+(a?"":qX(n,h,_))+(o?"":K1e(n,p,m,v,S)):FA(i,(s?"":d)+(a?"":X1e(h,!s,_))+(o?"":Y1e(p,m,v,S)),t)}}function Hk(n,e,t,i,r,a){if(n){var o=jX(n),s={useUTC:r,renderMode:t,orderMode:i,markupStyleCreator:e,valueFormatter:n.valueFormatter};return o(s,n,0,a)}}function q1e(n){return{html:H1e[n],richText:W1e[n]}}function FA(n,e,t){var i='<div style="clear:both"></div>',r="margin: "+t+"px 0 0",a=HX(n);return'<div style="'+r+";"+a+';">'+e+i+"</div>"}function X1e(n,e,t){var i=e?"margin-left:2px":"";return'<span style="'+t+";"+i+'">'+os(n)+"</span>"}function Y1e(n,e,t,i){var r=t?"10px":"20px",a=e?"float:right;margin-left:"+r:"";return n=$t(n)?n:[n],'<span style="'+a+";"+i+'">'+Xt(n,function(o){return os(o)}).join("&nbsp;&nbsp;")+"</span>"}function qX(n,e,t){return n.markupStyleCreator.wrapRichTextStyle(e,t)}function K1e(n,e,t,i,r){var a=[r],o=i?10:20;return t&&a.push({padding:[0,0,0,o],align:"right"}),n.markupStyleCreator.wrapRichTextStyle($t(e)?e.join(" "):e,a)}function XX(n,e){var t=n.getData().getItemVisual(e,"style"),i=t[n.visualDrawType];return Gp(i)}function YX(n,e){var t=n.get("padding");return t!=null?t:e==="richText"?[8,10]:10}var Wb=function(){function n(){this.richTextStyles={},this._nextStyleNameId=Y$()}return n.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},n.prototype.makeTooltipMarker=function(e,t,i){var r=i==="richText"?this._generateStyleName():null,a=Ope({color:t,type:e,renderMode:i,markerId:r});return xn(a)?a:(this.richTextStyles[r]=a.style,a.content)},n.prototype.wrapRichTextStyle=function(e,t){var i={};$t(t)?ne(t,function(a){return It(i,a)}):It(i,t);var r=this._generateStyleName();return this.richTextStyles[r]=i,"{"+r+"|"+e+"}"},n}();function KX(n){var e=n.series,t=n.dataIndex,i=n.multipleSeries,r=e.getData(),a=r.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(t),l=$t(s),u=XX(e,t),c,d,h,f;if(o>1||l&&!o){var p=Z1e(s,e,t,a,u);c=p.inlineValues,d=p.inlineValueTypes,h=p.blocks,f=p.inlineValues[0]}else if(o){var m=r.getDimensionInfo(a[0]);f=c=pv(r,t,a[0]),d=m.type}else f=c=l?s[0]:s;var v=aE(e),g=v&&e.name||"",_=r.getName(t),S=i?g:_;return So("section",{header:g,noHeader:i||!v,sortParam:f,blocks:[So("nameValue",{markerType:"item",markerColor:u,name:S,noName:!K0(S),value:c,valueType:d,dataIndex:t})].concat(h||[])})}function Z1e(n,e,t,i,r){var a=e.getData(),o=Yu(n,function(d,h,f){var p=a.getDimensionInfo(f);return d=d||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];i.length?ne(i,function(d){c(pv(a,t,d),d)}):ne(n,c);function c(d,h){var f=a.getDimensionInfo(h);!f||f.otherDims.tooltip===!1||(o?u.push(So("nameValue",{markerType:"subItem",markerColor:r,name:f.displayName,value:d,valueType:f.type})):(s.push(d),l.push(f.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Md=Gi();function n6(n,e){return n.getName(e)||n.getId(e)}var s5="__universalTransitionEnabled",U_=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,i,r){this.seriesIndex=this.componentIndex,this.dataTask=Xg({count:Q1e,reset:e2e}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,r);var a=Md(this).sourceManager=new VX(this);a.prepareSource();var o=this.getInitialData(t,r);jk(o,this),this.dataTask.context.data=o,Md(this).dataBeforeProcessed=o,Wk(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,i){var r=D9(this),a=r?jv(t):{},o=this.subType;$i.hasClass(o)&&(o+="Series"),ui(t,i.getTheme().get(this.subType)),ui(t,this.getDefaultOption()),Fp(t,"label",["show"]),this.fillDataTextStyle(t.data),r&&Rh(t,a,r)},e.prototype.mergeOption=function(t,i){t=ui(this.option,t,!0),this.fillDataTextStyle(t.data);var r=D9(this);r&&Rh(this.option,t,r);var a=Md(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(t,i);jk(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Md(this).dataBeforeProcessed=o,Wk(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!sl(t))for(var i=["show"],r=0;r<t.length;r++)t[r]&&t[r].label&&Fp(t[r],"label",i)},e.prototype.getInitialData=function(t,i){},e.prototype.appendData=function(t){var i=this.getRawData();i.appendData(t.data)},e.prototype.getData=function(t){var i=OA(this);if(i){var r=i.context.data;return t==null||!r.getLinkedData?r:r.getLinkedData(t)}else return Md(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var i=OA(this);if(i){var r=i.context;r.outputData=t,i!==this.dataTask&&(r.data=t)}Md(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return In(t)},e.prototype.getSourceManager=function(){return Md(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Md(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,i,r){return KX({series:this,dataIndex:t,multipleSeries:i})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(qi.node&&!(t&&t.ssr))return!1;var i=this.getShallow("animation");return i&&this.getData().count()>this.getShallow("animationThreshold")&&(i=!1),!!i},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,i,r){var a=this.ecModel,o=RE.prototype.getColorFromPalette.call(this,t,i,r);return o||(o=a.getColorFromPalette(t,i,r)),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,i){this._innerSelect(this.getData(i),t)},e.prototype.unselect=function(t,i){var r=this.option.selectedMap;if(r){var a=this.option.selectedMode,o=this.getData(i);if(a==="series"||r==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<t.length;s++){var l=t[s],u=n6(o,l);r[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,i){for(var r=[],a=0;a<t.length;a++)r[0]=t[a],this.isSelected(t[a],i)?this.unselect(r,i):this.select(r,i)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,i=Li(t),r=[],a=0;a<i.length;a++){var o=t[i[a]];o>=0&&r.push(o)}return r},e.prototype.isSelected=function(t,i){var r=this.option.selectedMap;if(!r)return!1;var a=this.getData(i);return(r==="all"||r[n6(a,t)])&&!a.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[s5])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,i){var r,a,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Kn(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var d=i[c],h=n6(t,d);u[h]=!0,this._selectedDataIndicesMap[h]=t.getRawIndex(d)}}else if(s==="single"||s===!0){var f=i[l-1],h=n6(t,f);o.selectedMap=(r={},r[h]=!0,r),this._selectedDataIndicesMap=(a={},a[h]=t.getRawIndex(f),a)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var i=[];t.hasItemOption&&t.each(function(r){var a=t.getRawDataItem(r);a&&a.selected&&i.push(r)}),i.length>0&&this._innerSelect(t,i)}},e.registerClass=function(t){return $i.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}($i);Za(U_,z_);Za(U_,RE);rq(U_,$i);function Wk(n){var e=n.name;aE(n)||(n.name=J1e(n)||e)}function J1e(n){var e=n.getRawData(),t=e.mapDimensionsAll("seriesName"),i=[];return ne(t,function(r){var a=e.getDimensionInfo(r);a.displayName&&i.push(a.displayName)}),i.join(" ")}function Q1e(n){return n.model.getRawData().count()}function e2e(n){var e=n.model;return e.setData(e.getRawData().cloneShallow()),t2e}function t2e(n,e){e.outputData&&n.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function jk(n,e){ne(x9(n.CHANGABLE_METHODS,n.DOWNSAMPLE_METHODS),function(t){n.wrapMethod(t,si(n2e,e))})}function n2e(n,e){var t=OA(n);return t&&t.setOutputEnd((e||this).count()),e}function OA(n){var e=(n.ecModel||{}).scheduler,t=e&&e.getPipeline(n.uid);if(t){var i=t.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(n.uid))}return i}}const pa=U_;var kE=function(){function n(){this.group=new ei,this.uid=Hv("viewComponent")}return n.prototype.init=function(e,t){},n.prototype.render=function(e,t,i,r){},n.prototype.dispose=function(e,t){},n.prototype.updateView=function(e,t,i,r){},n.prototype.updateLayout=function(e,t,i,r){},n.prototype.updateVisual=function(e,t,i,r){},n.prototype.toggleBlurSeries=function(e,t,i){},n.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},n}();sE(kE);b_(kE);const xa=kE;function Xv(){var n=Gi();return function(e){var t=n(e),i=e.pipelineContext,r=!!t.large,a=!!t.progressiveRender,o=t.large=!!(i&&i.large),s=t.progressiveRender=!!(i&&i.progressiveRender);return(r!==o||a!==s)&&"reset"}}var ZX=Gi(),i2e=Xv(),FE=function(){function n(){this.group=new ei,this.uid=Hv("viewChart"),this.renderTask=Xg({plan:r2e,reset:a2e}),this.renderTask.context={view:this}}return n.prototype.init=function(e,t){},n.prototype.render=function(e,t,i,r){},n.prototype.highlight=function(e,t,i,r){var a=e.getData(r&&r.dataType);a&&qk(a,r,"emphasis")},n.prototype.downplay=function(e,t,i,r){var a=e.getData(r&&r.dataType);a&&qk(a,r,"normal")},n.prototype.remove=function(e,t){this.group.removeAll()},n.prototype.dispose=function(e,t){},n.prototype.updateView=function(e,t,i,r){this.render(e,t,i,r)},n.prototype.updateLayout=function(e,t,i,r){this.render(e,t,i,r)},n.prototype.updateVisual=function(e,t,i,r){this.render(e,t,i,r)},n.prototype.eachRendered=function(e){Gh(this.group,e)},n.markUpdateMethod=function(e,t){ZX(e).updateMethod=t},n.protoInitialize=function(){var e=n.prototype;e.type="chart"}(),n}();function $k(n,e,t){n&&R9(n)&&(e==="emphasis"?$c:qc)(n,t)}function qk(n,e,t){var i=Op(n,e),r=e&&e.highlightKey!=null?Rfe(e.highlightKey):null;i!=null?ne(Ar(i),function(a){$k(n.getItemGraphicEl(a),t,r)}):n.eachItemGraphicEl(function(a){$k(a,t,r)})}sE(FE);b_(FE);function r2e(n){return i2e(n.model)}function a2e(n){var e=n.model,t=n.ecModel,i=n.api,r=n.payload,a=e.pipelineContext.progressiveRender,o=n.view,s=r&&ZX(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,i,r),o2e[l]}var o2e={incrementalPrepareRender:{progress:function(n,e){e.view.incrementalRender(n,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(n,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const Yr=FE;var Q5="\0__throttleOriginMethod",Xk="\0__throttleRate",Yk="\0__throttleType";function V_(n,e,t){var i,r=0,a=0,o=null,s,l,u,c;e=e||0;function d(){a=new Date().getTime(),o=null,n.apply(l,u||[])}var h=function(){for(var f=[],p=0;p<arguments.length;p++)f[p]=arguments[p];i=new Date().getTime(),l=this,u=f;var m=c||e,v=c||t;c=null,s=i-(v?r:a)-m,clearTimeout(o),v?o=setTimeout(d,m):s>=0?d():o=setTimeout(d,-s),r=i};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(f){c=f},h}function Yv(n,e,t,i){var r=n[e];if(r){var a=r[Q5]||r,o=r[Yk],s=r[Xk];if(s!==t||o!==i){if(t==null||!i)return n[e]=a;r=n[e]=V_(a,t,i==="debounce"),r[Q5]=a,r[Yk]=i,r[Xk]=t}return r}}function k9(n,e){var t=n[e];t&&t[Q5]&&(t.clear&&t.clear(),n[e]=t[Q5])}var Kk=Gi(),Zk={itemStyle:Bp(tX,!0),lineStyle:Bp(eX,!0)},s2e={lineStyle:"stroke",itemStyle:"fill"};function JX(n,e){var t=n.visualStyleMapper||Zk[e];return t||(console.warn("Unknown style type '"+e+"'."),Zk.itemStyle)}function QX(n,e){var t=n.visualDrawType||s2e[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var l2e={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,e){var t=n.getData(),i=n.visualStyleAccessPath||"itemStyle",r=n.getModel(i),a=JX(n,i),o=a(r),s=r.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=QX(n,i),u=o[l],c=$n(u)?u:null,d=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||d){var h=n.getColorFromPalette(n.name,null,e.getSeriesCount());o[l]||(o[l]=h,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||$n(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||$n(o.stroke)?h:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(n)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(f,p){var m=n.getDataParams(p),v=It({},o);v[l]=c(m),f.setItemVisual(p,"style",v)}}}},km=new Xr,u2e={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,e){if(!(n.ignoreStyleOnData||e.isSeriesFiltered(n))){var t=n.getData(),i=n.visualStyleAccessPath||"itemStyle",r=JX(n,i),a=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){km.option=l[i];var u=r(km),c=o.ensureUniqueItemVisual(s,"style");It(c,u),km.option.decal&&(o.setItemVisual(s,"decal",km.option.decal),km.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},c2e={performRawSeries:!0,overallReset:function(n){var e=In();n.eachSeries(function(t){var i=t.getColorBy();if(!t.isColorBySeries()){var r=t.type+"-"+i,a=e.get(r);a||(a={},e.set(r,a)),Kk(t).scope=a}}),n.eachSeries(function(t){if(!(t.isColorBySeries()||n.isSeriesFiltered(t))){var i=t.getRawData(),r={},a=t.getData(),o=Kk(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=QX(t,s);a.each(function(u){var c=a.getRawIndex(u);r[c]=u}),i.each(function(u){var c=r[u],d=a.getItemVisual(c,"colorFromPalette");if(d){var h=a.ensureUniqueItemVisual(c,"style"),f=i.getName(u)||u+"",p=i.count();h[l]=t.getColorFromPalette(f,o,p)}})}})}},i6=Math.PI;function d2e(n,e){e=e||{},qn(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 ei,i=new Hi({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(i);var r=new Xi({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 Hi({style:{fill:"none"},textContent:r,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(a);var o;return e.showSpinner&&(o=new gE({shape:{startAngle:-i6/2,endAngle:-i6/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:i6*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:i6*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=r.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(n.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=n.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:n.getWidth(),height:n.getHeight()})},t.resize(),t}var h2e=function(){function n(e,t,i,r){this._stageTaskMap=In(),this.ecInstance=e,this.api=t,i=this._dataProcessorHandlers=i.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=i.concat(r)}return n.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(i){var r=i.overallTask;r&&r.dirty()})},n.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var i=this._pipelineMap.get(e.__pipeline.id),r=i.context,a=!t&&i.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>i.blockIndex,o=a?i.step:null,s=r&&r.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},n.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},n.prototype.updateStreamModes=function(e,t){var i=this._pipelineMap.get(e.uid),r=e.getData(),a=r.count(),o=i.progressiveEnabled&&t.incrementalPrepareRender&&a>=i.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=i.context={progressiveRender:o,modDataCount:l,large:s}},n.prototype.restorePipelines=function(e){var t=this,i=t._pipelineMap=In();e.eachSeries(function(r){var a=r.getProgressive(),o=r.uid;i.set(o,{id:o,head:null,tail:null,threshold:r.getProgressiveThreshold(),progressiveEnabled:a&&!(r.preventIncremental&&r.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),t._pipe(r,r.dataTask)})},n.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),i=this.api;ne(this._allHandlers,function(r){var a=e.get(r.uid)||e.set(r.uid,{}),o="";Ls(!(r.reset&&r.overallReset),o),r.reset&&this._createSeriesStageTask(r,a,t,i),r.overallReset&&this._createOverallStageTask(r,a,t,i)},this)},n.prototype.prepareView=function(e,t,i,r){var a=e.renderTask,o=a.context;o.model=t,o.ecModel=i,o.api=r,a.__block=!e.incrementalPrepareRender,this._pipe(t,a)},n.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},n.prototype.performVisualTasks=function(e,t,i){this._performStageTasks(this._visualHandlers,e,t,i)},n.prototype._performStageTasks=function(e,t,i,r){r=r||{};var a=!1,o=this;ne(e,function(l,u){if(!(r.visualType&&r.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),d=c.seriesTaskMap,h=c.overallTask;if(h){var f,p=h.agentStubMap;p.each(function(v){s(r,v)&&(v.dirty(),f=!0)}),f&&h.dirty(),o.updatePayload(h,i);var m=o.getPerformArgs(h,r.block);p.each(function(v){v.perform(m)}),h.perform(m)&&(a=!0)}else d&&d.each(function(v,g){s(r,v)&&v.dirty();var _=o.getPerformArgs(v,r.block);_.skip=!l.performRawSeries&&t.isSeriesFiltered(v.context.model),o.updatePayload(v,i),v.perform(_)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},n.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(i){t=i.dataTask.perform()||t}),this.unfinished=t||this.unfinished},n.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)})},n.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},n.prototype._createSeriesStageTask=function(e,t,i,r){var a=this,o=t.seriesTaskMap,s=t.seriesTaskMap=In(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(c):l?i.eachRawSeriesByType(l,c):u&&u(i,r).each(c);function c(d){var h=d.uid,f=s.set(h,o&&o.get(h)||Xg({plan:g2e,reset:y2e,count:S2e}));f.context={model:d,ecModel:i,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(d,f)}},n.prototype._createOverallStageTask=function(e,t,i,r){var a=this,o=t.overallTask=t.overallTask||Xg({reset:f2e});o.context={ecModel:i,api:r,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=In(),u=e.seriesType,c=e.getTargetSeries,d=!0,h=!1,f="";Ls(!e.createOnAllSeries,f),u?i.eachRawSeriesByType(u,p):c?c(i,r).each(p):(d=!1,ne(i.getSeries(),p));function p(m){var v=m.uid,g=l.set(v,s&&s.get(v)||(h=!0,Xg({reset:p2e,onDirty:m2e})));g.context={model:m,overallProgress:d},g.agent=o,g.__block=d,a._pipe(m,g)}h&&o.dirty()},n.prototype._pipe=function(e,t){var i=e.uid,r=this._pipelineMap.get(i);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},n.wrapStageHandler=function(e,t){return $n(e)&&(e={overallReset:e,seriesType:b2e(e)}),e.uid=Hv("stageHandler"),t&&(e.visualType=t),e},n}();function f2e(n){n.overallReset(n.ecModel,n.api,n.payload)}function p2e(n){return n.overallProgress&&v2e}function v2e(){this.agent.dirty(),this.getDownstream().dirty()}function m2e(){this.agent&&this.agent.dirty()}function g2e(n){return n.plan?n.plan(n.model,n.ecModel,n.api,n.payload):null}function y2e(n){n.useClearVisual&&n.data.clearAllVisual();var e=n.resetDefines=Ar(n.reset(n.model,n.ecModel,n.api,n.payload));return e.length>1?Xt(e,function(t,i){return eY(i)}):_2e}var _2e=eY(0);function eY(n){return function(e,t){var i=t.data,r=t.resetDefines[n];if(r&&r.dataEach)for(var a=e.start;a<e.end;a++)r.dataEach(i,a);else r&&r.progress&&r.progress(e,i)}}function S2e(n){return n.data.count()}function b2e(n){e8=null;try{n(F9,tY)}catch(e){}return e8}var F9={},tY={},e8;nY(F9,CX);nY(tY,MX);F9.eachSeriesByType=F9.eachRawSeriesByType=function(n){e8=n};F9.eachComponent=function(n){n.mainType==="series"&&n.subType&&(e8=n.subType)};function nY(n,e){for(var t in e.prototype)n[t]=Ba}const iY=h2e;var Jk=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const x2e={color:Jk,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Jk]};var ns="#B9B8CE",Qk="#100C2A",r6=function(){return{axisLine:{lineStyle:{color:ns}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},eF=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],rY={darkMode:!0,color:eF,backgroundColor:Qk,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:ns},pageTextStyle:{color:ns}},textStyle:{color:ns},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:ns}},dataZoom:{borderColor:"#71708A",textStyle:{color:ns},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:ns}},timeline:{lineStyle:{color:ns},label:{color:ns},controlStyle:{color:ns,borderColor:ns}},calendar:{itemStyle:{color:Qk},dayLabel:{color:ns},monthLabel:{color:ns},yearLabel:{color:ns}},timeAxis:r6(),logAxis:r6(),valueAxis:r6(),categoryAxis:r6(),line:{symbol:"circle"},graph:{color:eF},gauge:{title:{color:ns},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:ns},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};rY.categoryAxis.splitLine.show=!1;const w2e=rY;var T2e=function(){function n(){}return n.prototype.normalizeQuery=function(e){var t={},i={},r={};if(xn(e)){var a=zu(e);t.mainType=a.main||null,t.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};ne(e,function(l,u){for(var c=!1,d=0;d<o.length;d++){var h=o[d],f=u.lastIndexOf(h);if(f>0&&f===u.length-h.length){var p=u.slice(0,f);p!=="data"&&(t.mainType=p,t[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(i[u]=l,c=!0),c||(r[u]=l)})}return{cptQuery:t,dataQuery:i,otherQuery:r}},n.prototype.filter=function(e,t){var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,a=i.packedEvent,o=i.model,s=i.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,r,a));function c(d,h,f,p){return d[f]==null||h[p||f]===d[f]}},n.prototype.afterTrigger=function(){this.eventInfo=null},n}(),BA=["symbol","symbolSize","symbolRotate","symbolOffset"],tF=BA.concat(["symbolKeepAspect"]),A2e={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,e){var t=n.getData();if(n.legendIcon&&t.setVisual("legendIcon",n.legendIcon),!n.hasSymbolVisual)return;for(var i={},r={},a=!1,o=0;o<BA.length;o++){var s=BA[o],l=n.get(s);$n(l)?(a=!0,r[s]=l):i[s]=l}if(i.symbol=i.symbol||n.defaultSymbol,t.setVisual(It({legendIcon:n.legendIcon||i.symbol,symbolKeepAspect:n.get("symbolKeepAspect")},i)),e.isSeriesFiltered(n))return;var u=Li(r);function c(d,h){for(var f=n.getRawValue(h),p=n.getDataParams(h),m=0;m<u.length;m++){var v=u[m];d.setItemVisual(h,v,r[v](f,p))}}return{dataEach:a?c:null}}},C2e={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,e){if(!n.hasSymbolVisual||e.isSeriesFiltered(n))return;var t=n.getData();function i(r,a){for(var o=r.getItemModel(a),s=0;s<tF.length;s++){var l=tF[s],u=o.getShallow(l,!0);u!=null&&r.setItemVisual(a,l,u)}}return{dataEach:t.hasItemOption?i:null}}};function OE(n,e,t){switch(t){case"color":var i=n.getItemVisual(e,"style");return i[n.getVisual("drawType")];case"opacity":return n.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return n.getItemVisual(e,t)}}function w3(n,e){switch(e){case"color":var t=n.getVisual("style");return t[n.getVisual("drawType")];case"opacity":return n.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return n.getVisual(e)}}function aY(n,e,t,i){switch(t){case"color":var r=n.ensureUniqueItemVisual(e,"style");r[n.getVisual("drawType")]=i,n.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":n.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":n.setItemVisual(e,t,i);break}}function oY(n,e){function t(i,r){var a=[];return i.eachComponent({mainType:"series",subType:n,query:r},function(o){a.push(o.seriesIndex)}),a}ne([[n+"ToggleSelect","toggleSelect"],[n+"Select","select"],[n+"UnSelect","unselect"]],function(i){e(i[0],function(r,a,o){r=It({},r),o.dispatchAction(It(r,{type:i[1],seriesIndex:t(a,r)}))})})}function F1(n,e,t,i,r){var a=n+e;t.isSilent(a)||i.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=r.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var d=o.getData(),h=Op(d,r.fromActionPayload);t.trigger(a,{type:a,seriesId:o.id,name:$t(h)?d.getName(h[0]):d.getName(h),selected:xn(l)?l:It({},l)})}})}function M2e(n,e,t){n.on("selectchanged",function(i){var r=t.getModel();i.isFromClick?(F1("map","selectchanged",e,r,i),F1("pie","selectchanged",e,r,i)):i.fromAction==="select"?(F1("map","selected",e,r,i),F1("pie","selected",e,r,i)):i.fromAction==="unselect"&&(F1("map","unselected",e,r,i),F1("pie","unselected",e,r,i))})}function sp(n,e,t){for(var i;n&&!(e(n)&&(i=n,t));)n=n.__hostTarget||n.parent;return i}var E2e=Math.round(Math.random()*9),P2e=typeof Object.defineProperty=="function",R2e=function(){function n(){this._id="__ec_inner_"+E2e++}return n.prototype.get=function(e){return this._guard(e)[this._id]},n.prototype.set=function(e,t){var i=this._guard(e);return P2e?Object.defineProperty(i,this._id,{value:t,enumerable:!1,configurable:!0}):i[this._id]=t,this},n.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},n.prototype.has=function(e){return!!this._guard(e)[this._id]},n.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},n}();const L2e=R2e;var I2e=Ei.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(n,e){var t=e.cx,i=e.cy,r=e.width/2,a=e.height/2;n.moveTo(t,i-a),n.lineTo(t+r,i+a),n.lineTo(t-r,i+a),n.closePath()}}),D2e=Ei.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(n,e){var t=e.cx,i=e.cy,r=e.width/2,a=e.height/2;n.moveTo(t,i-a),n.lineTo(t+r,i),n.lineTo(t,i+a),n.lineTo(t-r,i),n.closePath()}}),N2e=Ei.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(n,e){var t=e.x,i=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=i-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,d=Math.sin(u),h=Math.cos(u),f=o*.6,p=o*.7;n.moveTo(t-c,l+s),n.arc(t,l,o,Math.PI-u,Math.PI*2+u),n.bezierCurveTo(t+c-d*f,l+s+h*f,t,i-p,t,i),n.bezierCurveTo(t,i-p,t-c+d*f,l+s+h*f,t-c,l+s),n.closePath()}}),k2e=Ei.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(n,e){var t=e.height,i=e.width,r=e.x,a=e.y,o=i/3*2;n.moveTo(r,a),n.lineTo(r+o,a+t),n.lineTo(r,a+t/4*3),n.lineTo(r-o,a+t),n.lineTo(r,a),n.closePath()}}),F2e={line:Lo,rect:Hi,roundRect:Hi,square:Hi,circle:zh,diamond:D2e,pin:N2e,arrow:k2e,triangle:I2e},O2e={line:function(n,e,t,i,r){r.x1=n,r.y1=e+i/2,r.x2=n+t,r.y2=e+i/2},rect:function(n,e,t,i,r){r.x=n,r.y=e,r.width=t,r.height=i},roundRect:function(n,e,t,i,r){r.x=n,r.y=e,r.width=t,r.height=i,r.r=Math.min(t,i)/4},square:function(n,e,t,i,r){var a=Math.min(t,i);r.x=n,r.y=e,r.width=a,r.height=a},circle:function(n,e,t,i,r){r.cx=n+t/2,r.cy=e+i/2,r.r=Math.min(t,i)/2},diamond:function(n,e,t,i,r){r.cx=n+t/2,r.cy=e+i/2,r.width=t,r.height=i},pin:function(n,e,t,i,r){r.x=n+t/2,r.y=e+i/2,r.width=t,r.height=i},arrow:function(n,e,t,i,r){r.x=n+t/2,r.y=e+i/2,r.width=t,r.height=i},triangle:function(n,e,t,i,r){r.cx=n+t/2,r.cy=e+i/2,r.width=t,r.height=i}},t8={};ne(F2e,function(n,e){t8[e]=new n});var B2e=Ei.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(n,e,t){var i=W5(n,e,t),r=this.shape;return r&&r.symbolType==="pin"&&e.position==="inside"&&(i.y=t.y+t.height*.4),i},buildPath:function(n,e,t){var i=e.symbolType;if(i!=="none"){var r=t8[i];r||(i="rect",r=t8[i]),O2e[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(n,r.shape,t)}}});function z2e(n,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=n,t.fill=e||"#fff",t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=n:t.fill=n,this.markRedraw()}}function Ya(n,e,t,i,r,a,o){var s=n.indexOf("empty")===0;s&&(n=n.substr(5,1).toLowerCase()+n.substr(6));var l;return n.indexOf("image://")===0?l=$q(n.slice(8),new gi(e,t,i,r),o?"center":"cover"):n.indexOf("path://")===0?l=P_(n.slice(7),{},new gi(e,t,i,r),o?"center":"cover"):l=new B2e({shape:{symbolType:n,x:e,y:t,width:i,height:r}}),l.__isEmptyBrush=s,l.setColor=z2e,a&&l.setColor(a),l}function Kv(n){return $t(n)||(n=[+n,+n]),[n[0]||0,n[1]||0]}function n1(n,e){if(n!=null)return $t(n)||(n=[n,n]),[_n(n[0],e[0])||0,_n(ai(n[1],n[0]),e[1])||0]}function lp(n){return isFinite(n)}function G2e(n,e,t){var i=e.x==null?0:e.x,r=e.x2==null?1:e.x2,a=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(i=i*t.width+t.x,r=r*t.width+t.x,a=a*t.height+t.y,o=o*t.height+t.y),i=lp(i)?i:0,r=lp(r)?r:1,a=lp(a)?a:0,o=lp(o)?o:0;var s=n.createLinearGradient(i,a,r,o);return s}function U2e(n,e,t){var i=t.width,r=t.height,a=Math.min(i,r),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*i+t.x,s=s*r+t.y,l=l*a),o=lp(o)?o:.5,s=lp(s)?s:.5,l=l>=0&&lp(l)?l:.5;var u=n.createRadialGradient(o,s,0,o,s,l);return u}function zA(n,e,t){for(var i=e.type==="radial"?U2e(n,e,t):G2e(n,e,t),r=e.colorStops,a=0;a<r.length;a++)i.addColorStop(r[a].offset,r[a].color);return i}function V2e(n,e){if(n===e||!n&&!e)return!1;if(!n||!e||n.length!==e.length)return!0;for(var t=0;t<n.length;t++)if(n[t]!==e[t])return!0;return!1}function a6(n){return parseInt(n,10)}function I2(n,e,t){var i=["width","height"][e],r=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(t[i]!=null&&t[i]!=="auto")return parseFloat(t[i]);var s=document.defaultView.getComputedStyle(n);return(n[r]||a6(s[i])||a6(n.style[i]))-(a6(s[a])||0)-(a6(s[o])||0)|0}function H2e(n,e){return!n||n==="solid"||!(e>0)?null:n==="dashed"?[4*e,2*e]:n==="dotted"?[e]:Yi(n)?[n]:$t(n)?n:null}function BE(n){var e=n.style,t=e.lineDash&&e.lineWidth>0&&H2e(e.lineDash,e.lineWidth),i=e.lineDashOffset;if(t){var r=e.strokeNoScale&&n.getLineScale?n.getLineScale():1;r&&r!==1&&(t=Xt(t,function(a){return a/r}),i/=r)}return[t,i]}var W2e=new Qu(!0);function n8(n){var e=n.stroke;return!(e==null||e==="none"||!(n.lineWidth>0))}function nF(n){return typeof n=="string"&&n!=="none"}function i8(n){var e=n.fill;return e!=null&&e!=="none"}function iF(n,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=n.globalAlpha;n.globalAlpha=e.fillOpacity*e.opacity,n.fill(),n.globalAlpha=t}else n.fill()}function rF(n,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=n.globalAlpha;n.globalAlpha=e.strokeOpacity*e.opacity,n.stroke(),n.globalAlpha=t}else n.stroke()}function GA(n,e,t){var i=lE(e.image,e.__image,t);if(x_(i)){var r=n.createPattern(i,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&r&&r.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*q4),a.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(a)}return r}}function j2e(n,e,t,i){var r,a=n8(t),o=i8(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||W2e,d=e.__dirty;if(!i){var h=t.fill,f=t.stroke,p=o&&!!h.colorStops,m=a&&!!f.colorStops,v=o&&!!h.image,g=a&&!!f.image,_=void 0,S=void 0,x=void 0,A=void 0,C=void 0;(p||m)&&(C=e.getBoundingRect()),p&&(_=d?zA(n,h,C):e.__canvasFillGradient,e.__canvasFillGradient=_),m&&(S=d?zA(n,f,C):e.__canvasStrokeGradient,e.__canvasStrokeGradient=S),v&&(x=d||!e.__canvasFillPattern?GA(n,h,e):e.__canvasFillPattern,e.__canvasFillPattern=x),g&&(A=d||!e.__canvasStrokePattern?GA(n,f,e):e.__canvasStrokePattern,e.__canvasStrokePattern=x),p?n.fillStyle=_:v&&(x?n.fillStyle=x:o=!1),m?n.strokeStyle=S:g&&(A?n.strokeStyle=A:a=!1)}var M=e.getGlobalScale();c.setScale(M[0],M[1],e.segmentIgnoreThreshold);var I,D;n.setLineDash&&t.lineDash&&(r=BE(e),I=r[0],D=r[1]);var E=!0;(u||d&y2)&&(c.setDPR(n.dpr),l?c.setContext(null):(c.setContext(n),E=!1),c.reset(),e.buildPath(c,e.shape,i),c.toStatic(),e.pathUpdated()),E&&c.rebuildPath(n,l?s:1),I&&(n.setLineDash(I),n.lineDashOffset=D),i||(t.strokeFirst?(a&&rF(n,t),o&&iF(n,t)):(o&&iF(n,t),a&&rF(n,t))),I&&n.setLineDash([])}function $2e(n,e,t){var i=e.__image=lE(t.image,e.__image,e,e.onload);if(!(!i||!x_(i))){var r=t.x||0,a=t.y||0,o=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;n.drawImage(i,u,c,t.sWidth,t.sHeight,r,a,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,d=o-u,h=s-c;n.drawImage(i,u,c,d,h,r,a,o,s)}else n.drawImage(i,r,a,o,s)}}function q2e(n,e,t){var i,r=t.text;if(r!=null&&(r+=""),r){n.font=t.font||Ch,n.textAlign=t.textAlign,n.textBaseline=t.textBaseline;var a=void 0,o=void 0;n.setLineDash&&t.lineDash&&(i=BE(e),a=i[0],o=i[1]),a&&(n.setLineDash(a),n.lineDashOffset=o),t.strokeFirst?(n8(t)&&n.strokeText(r,t.x,t.y),i8(t)&&n.fillText(r,t.x,t.y)):(i8(t)&&n.fillText(r,t.x,t.y),n8(t)&&n.strokeText(r,t.x,t.y)),a&&n.setLineDash([])}}var aF=["shadowBlur","shadowOffsetX","shadowOffsetY"],oF=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function sY(n,e,t,i,r){var a=!1;if(!i&&(t=t||{},e===t))return!1;if(i||e.opacity!==t.opacity){Xs(n,r),a=!0;var o=Math.max(Math.min(e.opacity,1),0);n.globalAlpha=isNaN(o)?bp.opacity:o}(i||e.blend!==t.blend)&&(a||(Xs(n,r),a=!0),n.globalCompositeOperation=e.blend||bp.blend);for(var s=0;s<aF.length;s++){var l=aF[s];(i||e[l]!==t[l])&&(a||(Xs(n,r),a=!0),n[l]=n.dpr*(e[l]||0))}return(i||e.shadowColor!==t.shadowColor)&&(a||(Xs(n,r),a=!0),n.shadowColor=e.shadowColor||bp.shadowColor),a}function sF(n,e,t,i,r){var a=O9(e,r.inHover),o=i?null:t&&O9(t,r.inHover)||{};if(a===o)return!1;var s=sY(n,a,o,i,r);if((i||a.fill!==o.fill)&&(s||(Xs(n,r),s=!0),nF(a.fill)&&(n.fillStyle=a.fill)),(i||a.stroke!==o.stroke)&&(s||(Xs(n,r),s=!0),nF(a.stroke)&&(n.strokeStyle=a.stroke)),(i||a.opacity!==o.opacity)&&(s||(Xs(n,r),s=!0),n.globalAlpha=a.opacity==null?1:a.opacity),e.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);n.lineWidth!==u&&(s||(Xs(n,r),s=!0),n.lineWidth=u)}for(var c=0;c<oF.length;c++){var d=oF[c],h=d[0];(i||a[h]!==o[h])&&(s||(Xs(n,r),s=!0),n[h]=a[h]||d[1])}return s}function X2e(n,e,t,i,r){return sY(n,O9(e,r.inHover),t&&O9(t,r.inHover),i,r)}function lY(n,e){var t=e.transform,i=n.dpr||1;t?n.setTransform(i*t[0],i*t[1],i*t[2],i*t[3],i*t[4],i*t[5]):n.setTransform(i,0,0,i,0,0)}function Y2e(n,e,t){for(var i=!1,r=0;r<n.length;r++){var a=n[r];i=i||a.isZeroArea(),lY(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}t.allClipped=i}function K2e(n,e){return n&&e?n[0]!==e[0]||n[1]!==e[1]||n[2]!==e[2]||n[3]!==e[3]||n[4]!==e[4]||n[5]!==e[5]:!(!n&&!e)}var lF=1,uF=2,cF=3,dF=4;function Z2e(n){var e=i8(n),t=n8(n);return!(n.lineDash||!(+e^+t)||e&&typeof n.fill!="string"||t&&typeof n.stroke!="string"||n.strokePercent<1||n.strokeOpacity<1||n.fillOpacity<1)}function Xs(n,e){e.batchFill&&n.fill(),e.batchStroke&&n.stroke(),e.batchFill="",e.batchStroke=""}function O9(n,e){return e&&n.__hoverStyle||n.style}function uY(n,e){up(n,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function up(n,e,t,i){var r=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~El,e.__isRendered=!1;return}var a=e.__clipPaths,o=t.prevElClipPaths,s=!1,l=!1;if((!o||V2e(a,o))&&(o&&o.length&&(Xs(n,t),n.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),a&&a.length&&(Xs(n,t),n.save(),Y2e(a,n,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 Ei&&e.autoBatch&&Z2e(e.style);s||K2e(r,u.transform)?(Xs(n,t),lY(n,e)):c||Xs(n,t);var d=O9(e,t.inHover);e instanceof Ei?(t.lastDrawType!==lF&&(l=!0,t.lastDrawType=lF),sF(n,e,u,l,t),(!c||!t.batchFill&&!t.batchStroke)&&n.beginPath(),j2e(n,e,d,c),c&&(t.batchFill=d.fill||"",t.batchStroke=d.stroke||"")):e instanceof E9?(t.lastDrawType!==cF&&(l=!0,t.lastDrawType=cF),sF(n,e,u,l,t),q2e(n,e,d)):e instanceof qo?(t.lastDrawType!==uF&&(l=!0,t.lastDrawType=uF),X2e(n,e,u,l,t),$2e(n,e,d)):e.getTemporalDisplayables&&(t.lastDrawType!==dF&&(l=!0,t.lastDrawType=dF),J2e(n,e,t)),c&&i&&Xs(n,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function J2e(n,e,t){var i=e.getDisplayables(),r=e.getTemporalDisplayables();n.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=i.length;o<s;o++){var l=i[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),up(n,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=r.length;u<c;u++){var l=r[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),up(n,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,n.restore()}var jb=new L2e,hF=new m3(100),fF=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function vv(n,e){if(n==="none")return null;var t=e.getDevicePixelRatio(),i=e.getZr(),r=i.painter.type==="svg";n.dirty&&jb.delete(n);var a=jb.get(n);if(a)return a;var o=qn(n,{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=r?1:1/t,jb.set(n,s),n.dirty=!1,s;function l(u){for(var c=[t],d=!0,h=0;h<fF.length;++h){var f=o[fF[h]];if(f!=null&&!$t(f)&&!xn(f)&&!Yi(f)&&typeof f!="boolean"){d=!1;break}c.push(f)}var p;if(d){p=c.join(",")+(r?"-svg":"");var m=hF.get(p);m&&(r?u.svgElement=m:u.image=m)}var v=dY(o.dashArrayX),g=Q2e(o.dashArrayY),_=cY(o.symbol),S=eve(v),x=hY(g),A=!r&&Mh.createCanvas(),C=r&&{tag:"g",attrs:{},key:"dcl",children:[]},M=D(),I;A&&(A.width=M.width*t,A.height=M.height*t,I=A.getContext("2d")),E(),d&&hF.put(p,A||C),u.image=A,u.svgElement=C,u.svgWidth=M.width,u.svgHeight=M.height;function D(){for(var P=1,F=0,V=S.length;F<V;++F)P=RN(P,S[F]);for(var G=1,F=0,V=_.length;F<V;++F)G=RN(G,_[F].length);P*=G;var W=x*S.length*_.length;return{width:Math.max(1,Math.min(P,o.maxTileWidth)),height:Math.max(1,Math.min(W,o.maxTileHeight))}}function E(){I&&(I.clearRect(0,0,A.width,A.height),o.backgroundColor&&(I.fillStyle=o.backgroundColor,I.fillRect(0,0,A.width,A.height)));for(var P=0,F=0;F<g.length;++F)P+=g[F];if(P<=0)return;for(var V=-x,G=0,W=0,Y=0;V<M.height;){if(G%2===0){for(var Q=W/2%_.length,K=0,ae=0,ie=0;K<M.width*2;){for(var he=0,F=0;F<v[Y].length;++F)he+=v[Y][F];if(he<=0)break;if(ae%2===0){var Ee=(1-o.symbolSize)*.5,He=K+v[Y][ae]*Ee,xe=V+g[G]*Ee,Fe=v[Y][ae]*o.symbolSize,pt=g[G]*o.symbolSize,Ot=ie/2%_[Q].length;bt(He,xe,Fe,pt,_[Q][Ot])}K+=v[Y][ae],++ie,++ae,ae===v[Y].length&&(ae=0)}++Y,Y===v.length&&(Y=0)}V+=g[G],++W,++G,G===g.length&&(G=0)}function bt(ht,Kt,Tt,Ae,Lt){var vt=r?1:t,Ft=Ya(Lt,ht*vt,Kt*vt,Tt*vt,Ae*vt,o.color,o.symbolKeepAspect);if(r){var k=i.painter.renderOneToVNode(Ft);k&&C.children.push(k)}else uY(I,Ft)}}}}function cY(n){if(!n||n.length===0)return[["rect"]];if(xn(n))return[[n]];for(var e=!0,t=0;t<n.length;++t)if(!xn(n[t])){e=!1;break}if(e)return cY([n]);for(var i=[],t=0;t<n.length;++t)xn(n[t])?i.push([n[t]]):i.push(n[t]);return i}function dY(n){if(!n||n.length===0)return[[0,0]];if(Yi(n)){var e=Math.ceil(n);return[[e,e]]}for(var t=!0,i=0;i<n.length;++i)if(!Yi(n[i])){t=!1;break}if(t)return dY([n]);for(var r=[],i=0;i<n.length;++i)if(Yi(n[i])){var e=Math.ceil(n[i]);r.push([e,e])}else{var e=Xt(n[i],function(s){return Math.ceil(s)});e.length%2===1?r.push(e.concat(e)):r.push(e)}return r}function Q2e(n){if(!n||typeof n=="object"&&n.length===0)return[0,0];if(Yi(n)){var e=Math.ceil(n);return[e,e]}var t=Xt(n,function(i){return Math.ceil(i)});return n.length%2?t.concat(t):t}function eve(n){return Xt(n,function(e){return hY(e)})}function hY(n){for(var e=0,t=0;t<n.length;++t)e+=n[t];return n.length%2===1?e*2:e}function tve(n,e){n.eachRawSeries(function(t){if(!n.isSeriesFiltered(t)){var i=t.getData();i.hasItemVisual()&&i.each(function(o){var s=i.getItemVisual(o,"decal");if(s){var l=i.ensureUniqueItemVisual(o,"style");l.decal=vv(s,e)}});var r=i.getVisual("decal");if(r){var a=i.getVisual("style");a.decal=vv(r,e)}}})}var nve=new P0;const j0=nve;var fY={};function ive(n,e){fY[n]=e}function rve(n){return fY[n]}var ave=1,ove=800,sve=900,lve=1e3,uve=2e3,cve=5e3,pY=1e3,dve=1100,zE=2e3,vY=3e3,hve=4e3,H_=4500,fve=4600,pve=5e3,vve=6e3,mY=7e3,mve={PROCESSOR:{FILTER:lve,SERIES_FILTER:ove,STATISTIC:cve},VISUAL:{LAYOUT:pY,PROGRESSIVE_LAYOUT:dve,GLOBAL:zE,CHART:vY,POST_CHART_LAYOUT:fve,COMPONENT:hve,BRUSH:pve,CHART_ITEM:H_,ARIA:vve,DECAL:mY}},Qo="__flagInMainProcess",zs="__pendingUpdate",$b="__needsUpdateStatus",pF=/^[a-zA-Z0-9_]+$/,qb="__connectUpdateStatus",vF=0,gve=1,yve=2;function gY(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return _Y(this,n,e)}}function yY(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _Y(this,n,e)}}function _Y(n,e,t){return t[0]=t[0]&&t[0].toLowerCase(),P0.prototype[e].apply(n,t)}var SY=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e}(P0),bY=SY.prototype;bY.on=yY("on");bY.off=yY("off");var O1,Xb,o6,Ed,Yb,Kb,Zb,Fm,Om,mF,gF,Jb,yF,s6,_F,xY,Yl,SF,wY=function(n){ot(e,n);function e(t,i,r){var a=n.call(this,new T2e)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],r=r||{},xn(i)&&(i=TY[i]),a._dom=t;var o="canvas",s="auto",l=!1;r.ssr&&Zde(function(h){var f=ni(h),p=f.dataIndex;if(p!=null){var m=In();return m.set("series_index",f.seriesIndex),m.set("data_index",p),f.ssrType&&m.set("ssr_type",f.ssrType),m}});var u=a._zr=CN(t,{renderer:r.renderer||o,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:ai(r.useDirtyRect,l),useCoarsePointer:ai(r.useCoarsePointer,s),pointerSize:r.pointerSize});a._ssr=r.ssr,a._throttledZrFlush=V_(An(u.flush,u),17),i=Zn(i),i&&PX(i,!0),a._theme=i,a._locale=Rpe(r.locale||nX),a._coordSysMgr=new x3;var c=a._api=_F(a);function d(h,f){return h.__prio-f.__prio}return K4(a8,d),K4(UA,d),a._scheduler=new iY(a,c,UA,a8),a._messageCenter=new SY,a._initEvents(),a.resize=An(a.resize,a),u.animation.on("frame",a._onframe,a),mF(u,a),gF(u,a),O5(a),a}return e.prototype._onframe=function(){if(!this._disposed){SF(this);var t=this._scheduler;if(this[zs]){var i=this[zs].silent;this[Qo]=!0;try{O1(this),Ed.update.call(this,null,this[zs].updateParams)}catch(l){throw this[Qo]=!1,this[zs]=null,l}this._zr.flush(),this[Qo]=!1,this[zs]=null,Fm.call(this,i),Om.call(this,i)}else if(t.unfinished){var r=ave,a=this._model,o=this._api;t.unfinished=!1;do{var s=+new Date;t.performSeriesTasks(a),t.performDataProcessorTasks(a),Kb(this,a),t.performVisualTasks(a),s6(this,this._model,o,"remain",{}),r-=+new Date-s}while(r>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,i,r){if(!this[Qo]){if(this._disposed){this.id;return}var a,o,s;if(Kn(i)&&(r=i.lazyUpdate,a=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[Qo]=!0,!this._model||i){var l=new l1e(this._api),u=this._theme,c=this._model=new CX;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},VA);var d={seriesTransition:s,optionChanged:!0};if(r)this[zs]={silent:a,updateParams:d},this[Qo]=!1,this.getZr().wakeUp();else{try{O1(this),Ed.update.call(this,null,d)}catch(h){throw this[zs]=null,this[Qo]=!1,h}this._ssr||this._zr.flush(),this[zs]=null,this[Qo]=!1,Fm.call(this,a),Om.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||qi.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var i=this._zr.painter;return i.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(qi.svgSupported){var t=this._zr,i=t.storage.getDisplayList();return ne(i,function(r){r.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var i=t.excludeComponents,r=this._model,a=[],o=this;ne(i,function(l){r.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 ne(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var i=t.type==="svg",r=this.group,a=Math.min,o=Math.max,s=1/0;if(bF[r]){var l=s,u=s,c=-s,d=-s,h=[],f=t&&t.pixelRatio||this.getDevicePixelRatio();ne(Kg,function(S,x){if(S.group===r){var A=i?S.getZr().painter.getSvgDom().innerHTML:S.renderToCanvas(Zn(t)),C=S.getDom().getBoundingClientRect();l=a(C.left,l),u=a(C.top,u),c=o(C.right,c),d=o(C.bottom,d),h.push({dom:A,left:C.left,top:C.top})}}),l*=f,u*=f,c*=f,d*=f;var p=c-l,m=d-u,v=Mh.createCanvas(),g=CN(v,{renderer:i?"svg":"canvas"});if(g.resize({width:p,height:m}),i){var _="";return ne(h,function(S){var x=S.left-l,A=S.top-u;_+='<g transform="translate('+x+","+A+')">'+S.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=_,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return t.connectedBackgroundColor&&g.add(new Hi({shape:{x:0,y:0,width:p,height:m},style:{fill:t.connectedBackgroundColor}})),ne(h,function(S){var x=new qo({style:{x:S.left*f-l,y:S.top*f-u,image:S.dom}});g.add(x)}),g.refreshImmediately(),v.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,i){return Yb(this,"convertToPixel",t,i)},e.prototype.convertFromPixel=function(t,i){return Yb(this,"convertFromPixel",t,i)},e.prototype.containPixel=function(t,i){if(this._disposed){this.id;return}var r=this._model,a,o=Hg(r,t);return ne(o,function(s,l){l.indexOf("Models")>=0&&ne(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(i);else if(l==="seriesModels"){var d=this._chartsMap[u.__viewId];d&&d.containPoint&&(a=a||d.containPoint(i,u))}},this)},this),!!a},e.prototype.getVisual=function(t,i){var r=this._model,a=Hg(r,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?OE(s,l,i):w3(s,i)},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;ne(_ve,function(i){var r=function(a){var o=t.getModel(),s=a.target,l,u=i==="globalout";if(u?l={}:s&&sp(s,function(p){var m=ni(p);if(m&&m.dataIndex!=null){var v=m.dataModel||o.getSeriesByIndex(m.seriesIndex);return l=v&&v.getDataParams(m.dataIndex,m.dataType,s)||{},!0}else if(m.eventData)return l=It({},m.eventData),!0},!0),l){var c=l.componentType,d=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",d=l.seriesIndex);var h=c&&d!=null&&o.getComponent(c,d),f=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];l.event=a,l.type=i,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:f},t.trigger(i,l)}};r.zrEventfulCallAtLast=!0,t._zr.on(i,r,t)}),ne(Yg,function(i,r){t._messageCenter.on(r,function(a){this.trigger(r,a)},t)}),ne(["selectchanged"],function(i){t._messageCenter.on(i,function(r){this.trigger(i,r)},t)}),M2e(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&&tq(this.getDom(),UE,"");var i=this,r=i._api,a=i._model;ne(i._componentsViews,function(o){o.dispose(a,r)}),ne(i._chartsViews,function(o){o.dispose(a,r)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete Kg[i.id]},e.prototype.resize=function(t){if(!this[Qo]){if(this._disposed){this.id;return}this._zr.resize(t);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var r=i.resetOption("media"),a=t&&t.silent;this[zs]&&(a==null&&(a=this[zs].silent),r=!0,this[zs]=null),this[Qo]=!0;try{r&&O1(this),Ed.update.call(this,{type:"resize",animation:It({duration:0},t&&t.animation)})}catch(o){throw this[Qo]=!1,o}this[Qo]=!1,Fm.call(this,a),Om.call(this,a)}}},e.prototype.showLoading=function(t,i){if(this._disposed){this.id;return}if(Kn(t)&&(i=t,t=""),t=t||"default",this.hideLoading(),!!HA[t]){var r=HA[t](this._api,i),a=this._zr;this._loadingFX=r,a.add(r)}},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 i=It({},t);return i.type=Yg[t.type],i},e.prototype.dispatchAction=function(t,i){if(this._disposed){this.id;return}if(Kn(i)||(i={silent:!!i}),!!r8[t.type]&&this._model){if(this[Qo]){this._pendingActions.push(t);return}var r=i.silent;Zb.call(this,t,r);var a=i.flush;a?this._zr.flush():a!==!1&&qi.browser.weChat&&this._throttledZrFlush(),Fm.call(this,r),Om.call(this,r)}},e.prototype.updateLabelLayout=function(){j0.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var i=t.seriesIndex,r=this.getModel(),a=r.getSeriesByIndex(i);a.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){O1=function(d){var h=d._scheduler;h.restorePipelines(d._model),h.prepareStageTasks(),Xb(d,!0),Xb(d,!1),h.plan()},Xb=function(d,h){for(var f=d._model,p=d._scheduler,m=h?d._componentsViews:d._chartsViews,v=h?d._componentsMap:d._chartsMap,g=d._zr,_=d._api,S=0;S<m.length;S++)m[S].__alive=!1;h?f.eachComponent(function(C,M){C!=="series"&&x(M)}):f.eachSeries(x);function x(C){var M=C.__requireNewView;C.__requireNewView=!1;var I="_ec_"+C.id+"_"+C.type,D=!M&&v[I];if(!D){var E=zu(C.type),P=h?xa.getClass(E.main,E.sub):Yr.getClass(E.sub);D=new P,D.init(f,_),v[I]=D,m.push(D),g.add(D.group)}C.__viewId=D.__id=I,D.__alive=!0,D.__model=C,D.group.__ecComponentInfo={mainType:C.mainType,index:C.componentIndex},!h&&p.prepareView(D,C,f,_)}for(var S=0;S<m.length;){var A=m[S];A.__alive?S++:(!h&&A.renderTask.dispose(),g.remove(A.group),A.dispose(f,_),m.splice(S,1),v[A.__id]===A&&delete v[A.__id],A.__id=A.group.__ecComponentInfo=null)}},o6=function(d,h,f,p,m){var v=d._model;if(v.setUpdatePayload(f),!p){ne([].concat(d._componentsViews).concat(d._chartsViews),A);return}var g={};g[p+"Id"]=f[p+"Id"],g[p+"Index"]=f[p+"Index"],g[p+"Name"]=f[p+"Name"];var _={mainType:p,query:g};m&&(_.subType=m);var S=f.excludeSeriesId,x;S!=null&&(x=In(),ne(Ar(S),function(C){var M=lo(C,null);M!=null&&x.set(M,!0)})),v&&v.eachComponent(_,function(C){var M=x&&x.get(C.id)!=null;if(!M)if(nk(f))if(C instanceof pa)f.type===xp&&!f.notBlur&&!C.get(["emphasis","disabled"])&&xfe(C,f,d._api);else{var I=pE(C.mainType,C.componentIndex,f.name,d._api),D=I.focusSelf,E=I.dispatchers;f.type===xp&&D&&!f.notBlur&&wA(C.mainType,C.componentIndex,d._api),E&&ne(E,function(P){f.type===xp?$c(P):qc(P)})}else AA(f)&&C instanceof pa&&(Afe(C,f,d._api),ek(C),Yl(d))},d),v&&v.eachComponent(_,function(C){var M=x&&x.get(C.id)!=null;M||A(d[p==="series"?"_chartsMap":"_componentsMap"][C.__viewId])},d);function A(C){C&&C.__alive&&C[h]&&C[h](C.__model,v,d._api,f)}},Ed={prepareAndUpdate:function(d){O1(this),Ed.update.call(this,d,{optionChanged:d.newOption!=null})},update:function(d,h){var f=this._model,p=this._api,m=this._zr,v=this._coordSysMgr,g=this._scheduler;if(f){f.setUpdatePayload(d),g.restoreData(f,d),g.performSeriesTasks(f),v.create(f,p),g.performDataProcessorTasks(f,d),Kb(this,f),v.update(f,p),t(f),g.performVisualTasks(f,d),Jb(this,f,p,d,h);var _=f.get("backgroundColor")||"transparent",S=f.get("darkMode");m.setBackgroundColor(_),S!=null&&S!=="auto"&&m.setDarkMode(S),j0.trigger("afterupdate",f,p)}},updateTransform:function(d){var h=this,f=this._model,p=this._api;if(f){f.setUpdatePayload(d);var m=[];f.eachComponent(function(g,_){if(g!=="series"){var S=h.getViewOfComponentModel(_);if(S&&S.__alive)if(S.updateTransform){var x=S.updateTransform(_,f,p,d);x&&x.update&&m.push(S)}else m.push(S)}});var v=In();f.eachSeries(function(g){var _=h._chartsMap[g.__viewId];if(_.updateTransform){var S=_.updateTransform(g,f,p,d);S&&S.update&&v.set(g.uid,1)}else v.set(g.uid,1)}),t(f),this._scheduler.performVisualTasks(f,d,{setDirty:!0,dirtyMap:v}),s6(this,f,p,d,{},v),j0.trigger("afterupdate",f,p)}},updateView:function(d){var h=this._model;h&&(h.setUpdatePayload(d),Yr.markUpdateMethod(d,"updateView"),t(h),this._scheduler.performVisualTasks(h,d,{setDirty:!0}),Jb(this,h,this._api,d,{}),j0.trigger("afterupdate",h,this._api))},updateVisual:function(d){var h=this,f=this._model;f&&(f.setUpdatePayload(d),f.eachSeries(function(p){p.getData().clearAllVisual()}),Yr.markUpdateMethod(d,"updateVisual"),t(f),this._scheduler.performVisualTasks(f,d,{visualType:"visual",setDirty:!0}),f.eachComponent(function(p,m){if(p!=="series"){var v=h.getViewOfComponentModel(m);v&&v.__alive&&v.updateVisual(m,f,h._api,d)}}),f.eachSeries(function(p){var m=h._chartsMap[p.__viewId];m.updateVisual(p,f,h._api,d)}),j0.trigger("afterupdate",f,this._api))},updateLayout:function(d){Ed.update.call(this,d)}},Yb=function(d,h,f,p){if(d._disposed){d.id;return}for(var m=d._model,v=d._coordSysMgr.getCoordinateSystems(),g,_=Hg(m,f),S=0;S<v.length;S++){var x=v[S];if(x[h]&&(g=x[h](m,_,p))!=null)return g}},Kb=function(d,h){var f=d._chartsMap,p=d._scheduler;h.eachSeries(function(m){p.updateStreamModes(m,f[m.__viewId])})},Zb=function(d,h){var f=this,p=this.getModel(),m=d.type,v=d.escapeConnect,g=r8[m],_=g.actionInfo,S=(_.update||"update").split(":"),x=S.pop(),A=S[0]!=null&&zu(S[0]);this[Qo]=!0;var C=[d],M=!1;d.batch&&(M=!0,C=Xt(d.batch,function(G){return G=qn(It({},G),d),G.batch=null,G}));var I=[],D,E=AA(d),P=nk(d);if(P&&Cq(this._api),ne(C,function(G){if(D=g.action(G,f._model,f._api),D=D||It({},G),D.type=_.event||D.type,I.push(D),P){var W=oE(d),Y=W.queryOptionMap,Q=W.mainTypeSpecified,K=Q?Y.keys()[0]:"series";o6(f,x,G,K),Yl(f)}else E?(o6(f,x,G,"series"),Yl(f)):A&&o6(f,x,G,A.main,A.sub)}),x!=="none"&&!P&&!E&&!A)try{this[zs]?(O1(this),Ed.update.call(this,d),this[zs]=null):Ed[x].call(this,d)}catch(G){throw this[Qo]=!1,G}if(M?D={type:_.event||m,escapeConnect:v,batch:I}:D=I[0],this[Qo]=!1,!h){var F=this._messageCenter;if(F.trigger(D.type,D),E){var V={type:"selectchanged",escapeConnect:v,selected:Cfe(p),isFromClick:d.isFromClick||!1,fromAction:d.type,fromActionPayload:d};F.trigger(V.type,V)}}},Fm=function(d){for(var h=this._pendingActions;h.length;){var f=h.shift();Zb.call(this,f,d)}},Om=function(d){!d&&this.trigger("updated")},mF=function(d,h){d.on("rendered",function(f){h.trigger("rendered",f),d.animation.isFinished()&&!h[zs]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},gF=function(d,h){d.on("mouseover",function(f){var p=f.target,m=sp(p,R9);m&&(wfe(m,f,h._api),Yl(h))}).on("mouseout",function(f){var p=f.target,m=sp(p,R9);m&&(Tfe(m,f,h._api),Yl(h))}).on("click",function(f){var p=f.target,m=sp(p,function(_){return ni(_).dataIndex!=null},!0);if(m){var v=m.selected?"unselect":"select",g=ni(m);h._api.dispatchAction({type:v,dataType:g.dataType,dataIndexInside:g.dataIndex,seriesIndex:g.seriesIndex,isFromClick:!0})}})};function t(d){d.clearColorPalette(),d.eachSeries(function(h){h.clearColorPalette()})}function i(d){var h=[],f=[],p=!1;if(d.eachComponent(function(_,S){var x=S.get("zlevel")||0,A=S.get("z")||0,C=S.getZLevelKey();p=p||!!C,(_==="series"?f:h).push({zlevel:x,z:A,idx:S.componentIndex,type:_,key:C})}),p){var m=h.concat(f),v,g;K4(m,function(_,S){return _.zlevel===S.zlevel?_.z-S.z:_.zlevel-S.zlevel}),ne(m,function(_){var S=d.getComponent(_.type,_.idx),x=_.zlevel,A=_.key;v!=null&&(x=Math.max(v,x)),A?(x===v&&A!==g&&x++,g=A):g&&(x===v&&x++,g=""),v=x,S.setZLevel(x)})}}Jb=function(d,h,f,p,m){i(h),yF(d,h,f,p,m),ne(d._chartsViews,function(v){v.__alive=!1}),s6(d,h,f,p,m),ne(d._chartsViews,function(v){v.__alive||v.remove(h,f)})},yF=function(d,h,f,p,m,v){ne(v||d._componentsViews,function(g){var _=g.__model;u(_,g),g.render(_,h,f,p),s(_,g),c(_,g)})},s6=function(d,h,f,p,m,v){var g=d._scheduler;m=It(m||{},{updatedSeries:h.getSeries()}),j0.trigger("series:beforeupdate",h,f,m);var _=!1;h.eachSeries(function(S){var x=d._chartsMap[S.__viewId];x.__alive=!0;var A=x.renderTask;g.updatePayload(A,p),u(S,x),v&&v.get(S.uid)&&A.dirty(),A.perform(g.getPerformArgs(A))&&(_=!0),x.group.silent=!!S.get("silent"),o(S,x),ek(S)}),g.unfinished=_||g.unfinished,j0.trigger("series:layoutlabels",h,f,m),j0.trigger("series:transition",h,f,m),h.eachSeries(function(S){var x=d._chartsMap[S.__viewId];s(S,x),c(S,x)}),a(d,h),j0.trigger("series:afterupdate",h,f,m)},Yl=function(d){d[$b]=!0,d.getZr().wakeUp()},SF=function(d){d[$b]&&(d.getZr().storage.traverse(function(h){X2(h)||r(h)}),d[$b]=!1)};function r(d){for(var h=[],f=d.currentStates,p=0;p<f.length;p++){var m=f[p];m==="emphasis"||m==="blur"||m==="select"||h.push(m)}d.selected&&d.states.select&&h.push("select"),d.hoverState===A_&&d.states.emphasis?h.push("emphasis"):d.hoverState===_3&&d.states.blur&&h.push("blur"),d.useStates(h)}function a(d,h){var f=d._zr,p=f.storage,m=0;p.traverse(function(v){v.isGroup||m++}),m>h.get("hoverLayerThreshold")&&!qi.node&&!qi.worker&&h.eachSeries(function(v){if(!v.preventUsingHoverLayer){var g=d._chartsMap[v.__viewId];g.__alive&&g.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function o(d,h){var f=d.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=f)})}function s(d,h){if(!d.preventAutoZ){var f=d.get("z")||0,p=d.get("zlevel")||0;h.eachRendered(function(m){return l(m,f,p,-1/0),!0})}}function l(d,h,f,p){var m=d.getTextContent(),v=d.getTextGuideLine(),g=d.isGroup;if(g)for(var _=d.childrenRef(),S=0;S<_.length;S++)p=Math.max(l(_[S],h,f,p),p);else d.z=h,d.zlevel=f,p=Math.max(d.z2,p);if(m&&(m.z=h,m.zlevel=f,isFinite(p)&&(m.z2=p+2)),v){var x=d.textGuideLineConfig;v.z=h,v.zlevel=f,isFinite(p)&&(v.z2=p+(x&&x.showAbove?1:-1))}return p}function u(d,h){h.eachRendered(function(f){if(!X2(f)){var p=f.getTextContent(),m=f.getTextGuideLine();f.stateTransition&&(f.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),m&&m.stateTransition&&(m.stateTransition=null),f.hasState()?(f.prevStates=f.currentStates,f.clearStates()):f.prevStates&&(f.prevStates=null)}})}function c(d,h){var f=d.getModel("stateAnimation"),p=d.isAnimationEnabled(),m=f.get("duration"),v=m>0?{duration:m,delay:f.get("delay"),easing:f.get("easing")}:null;h.eachRendered(function(g){if(g.states&&g.states.emphasis){if(X2(g))return;if(g instanceof Ei&&Lfe(g),g.__dirty){var _=g.prevStates;_&&g.useStates(_)}if(p){g.stateTransition=v;var S=g.getTextContent(),x=g.getTextGuideLine();S&&(S.stateTransition=v),x&&(x.stateTransition=v)}g.__dirty&&r(g)}})}_F=function(d){return new(function(h){ot(f,h);function f(){return h!==null&&h.apply(this,arguments)||this}return f.prototype.getCoordinateSystems=function(){return d._coordSysMgr.getCoordinateSystems()},f.prototype.getComponentByElement=function(p){for(;p;){var m=p.__ecComponentInfo;if(m!=null)return d._model.getComponent(m.mainType,m.index);p=p.parent}},f.prototype.enterEmphasis=function(p,m){$c(p,m),Yl(d)},f.prototype.leaveEmphasis=function(p,m){qc(p,m),Yl(d)},f.prototype.enterBlur=function(p){xq(p),Yl(d)},f.prototype.leaveBlur=function(p){fE(p),Yl(d)},f.prototype.enterSelect=function(p){wq(p),Yl(d)},f.prototype.leaveSelect=function(p){Tq(p),Yl(d)},f.prototype.getModel=function(){return d.getModel()},f.prototype.getViewOfComponentModel=function(p){return d.getViewOfComponentModel(p)},f.prototype.getViewOfSeriesModel=function(p){return d.getViewOfSeriesModel(p)},f}(MX))(d)},xY=function(d){function h(f,p){for(var m=0;m<f.length;m++){var v=f[m];v[qb]=p}}ne(Yg,function(f,p){d._messageCenter.on(p,function(m){if(bF[d.group]&&d[qb]!==vF){if(m&&m.escapeConnect)return;var v=d.makeActionFromEvent(m),g=[];ne(Kg,function(_){_!==d&&_.group===d.group&&g.push(_)}),h(g,vF),ne(g,function(_){_[qb]!==gve&&_.dispatchAction(v)}),h(g,yve)}})})}}(),e}(P0),GE=wY.prototype;GE.on=gY("on");GE.off=gY("off");GE.one=function(n,e,t){var i=this;function r(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];e&&e.apply&&e.apply(this,a),i.off(n,r)}this.on.call(this,n,r,t)};var _ve=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var r8={},Yg={},UA=[],VA=[],a8=[],TY={},HA={},Kg={},bF={},Sve=+new Date-0,UE="_echarts_instance_";function bve(n,e,t){var i=!(t&&t.ssr);if(i){var r=xve(n);if(r)return r}var a=new wY(n,e,t);return a.id="ec_"+Sve++,Kg[a.id]=a,i&&tq(n,UE,a.id),xY(a),j0.trigger("afterinit",a),a}function xve(n){return Kg[ghe(n,UE)]}function AY(n,e){TY[n]=e}function CY(n){xi(VA,n)<0&&VA.push(n)}function MY(n,e){HE(UA,n,e,uve)}function wve(n){VE("afterinit",n)}function Tve(n){VE("afterupdate",n)}function VE(n,e){j0.on(n,e)}function nc(n,e,t){$n(e)&&(t=e,e="");var i=Kn(n)?n.type:[n,n={event:e}][0];n.event=(n.event||i).toLowerCase(),e=n.event,!Yg[e]&&(Ls(pF.test(i)&&pF.test(e)),r8[i]||(r8[i]={action:t,actionInfo:n}),Yg[e]=i)}function Ave(n,e){x3.register(n,e)}function Cve(n,e){HE(a8,n,e,pY,"layout")}function i1(n,e){HE(a8,n,e,vY,"visual")}var xF=[];function HE(n,e,t,i,r){if(($n(e)||Kn(e))&&(t=e,e=i),!(xi(xF,t)>=0)){xF.push(t);var a=iY.wrapStageHandler(t,r);a.__prio=e,a.__raw=t,n.push(a)}}function EY(n,e){HA[n]=e}function Mve(n,e,t){var i=rve("registerMap");i&&i(n,e,t)}var Eve=F1e;i1(zE,l2e);i1(H_,u2e);i1(H_,c2e);i1(zE,A2e);i1(H_,C2e);i1(mY,tve);CY(PX);MY(sve,m1e);EY("default",d2e);nc({type:xp,event:xp,update:xp},Ba);nc({type:n5,event:n5,update:n5},Ba);nc({type:Wg,event:Wg,update:Wg},Ba);nc({type:i5,event:i5,update:i5},Ba);nc({type:jg,event:jg,update:jg},Ba);AY("light",x2e);AY("dark",w2e);var wF=[],Pve={registerPreprocessor:CY,registerProcessor:MY,registerPostInit:wve,registerPostUpdate:Tve,registerUpdateLifecycle:VE,registerAction:nc,registerCoordinateSystem:Ave,registerLayout:Cve,registerVisual:i1,registerTransform:Eve,registerLoading:EY,registerMap:Mve,registerImpl:ive,PRIORITY:mve,ComponentModel:$i,ComponentView:xa,SeriesModel:pa,ChartView:Yr,registerComponentModel:function(n){$i.registerClass(n)},registerComponentView:function(n){xa.registerClass(n)},registerSeriesModel:function(n){pa.registerClass(n)},registerChartView:function(n){Yr.registerClass(n)},registerSubTypeDefaulter:function(n,e){$i.registerSubTypeDefaulter(n,e)},registerPainter:function(n,e){Yde(n,e)}};function Ci(n){if($t(n)){ne(n,function(e){Ci(e)});return}xi(wF,n)>=0||(wF.push(n),$n(n)&&(n={install:n}),n.install(Pve))}function Bm(n){return n==null?0:n.length||1}function TF(n){return n}var Rve=function(){function n(e,t,i,r,a,o){this._old=e,this._new=t,this._oldKeyGetter=i||TF,this._newKeyGetter=r||TF,this.context=a,this._diffModeMultiple=o==="multiple"}return n.prototype.add=function(e){return this._add=e,this},n.prototype.update=function(e){return this._update=e,this},n.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},n.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},n.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},n.prototype.remove=function(e){return this._remove=e,this},n.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},n.prototype._executeOneToOne=function(){var e=this._old,t=this._new,i={},r=new Array(e.length),a=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,i,a,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=r[o],l=i[s],u=Bm(l);if(u>1){var c=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(c,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,i)},n.prototype._executeMultiple=function(){var e=this._old,t=this._new,i={},r={},a=[],o=[];this._initIndexMap(e,i,a,"_oldKeyGetter"),this._initIndexMap(t,r,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=i[l],c=r[l],d=Bm(u),h=Bm(c);if(d>1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),r[l]=null;else if(d===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),r[l]=null;else if(d===1&&h===1)this._update&&this._update(c,u),r[l]=null;else if(d>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),r[l]=null;else if(d>1)for(var f=0;f<d;f++)this._remove&&this._remove(u[f]);else this._remove&&this._remove(u)}this._performRestAdd(o,r)},n.prototype._performRestAdd=function(e,t){for(var i=0;i<e.length;i++){var r=e[i],a=t[r],o=Bm(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[r]=null}},n.prototype._initIndexMap=function(e,t,i,r){for(var a=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[r](e[o],o);if(a||(i[o]=s),!!t){var l=t[s],u=Bm(l);u===0?(t[s]=o,a&&i.push(s)):u===1?t[s]=[l,o]:l.push(o)}}},n}();const Xc=Rve;var Lve=function(){function n(e,t){this._encode=e,this._schema=t}return n.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},n.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},n}();function Ive(n,e){var t={},i=t.encode={},r=In(),a=[],o=[],s={};ne(n.dimensions,function(h){var f=n.getDimensionInfo(h),p=f.coordDim;if(p){var m=f.coordDimIndex;Qb(i,p)[m]=h,f.isExtraCoord||(r.set(p,1),Dve(f.type)&&(a[0]=h),Qb(s,p)[m]=n.getDimensionIndex(f.name)),f.defaultTooltip&&o.push(h)}yX.each(function(v,g){var _=Qb(i,g),S=f.otherDims[g];S!=null&&S!==!1&&(_[S]=f.name)})});var l=[],u={};r.each(function(h,f){var p=i[f];u[f]=p[0],l=l.concat(p)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=Xt(l,function(h){return n.getDimensionInfo(h).storeDimIndex}),t.encodeFirstDimNotExtra=u;var c=i.label;c&&c.length&&(a=c.slice());var d=i.tooltip;return d&&d.length?o=d.slice():o.length||(o=a.slice()),i.defaultedLabel=a,i.defaultedTooltip=o,t.userOutput=new Lve(s,e),t}function Qb(n,e){return n.hasOwnProperty(e)||(n[e]=[]),n[e]}function o8(n){return n==="category"?"ordinal":n==="time"?"time":"float"}function Dve(n){return!(n==="ordinal"||n==="time")}var Nve=function(){function n(e){this.otherDims={},e!=null&&It(this,e)}return n}();const l5=Nve;var kve=Gi(),Fve={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},PY=function(){function n(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return n.prototype.isDimensionOmitted=function(){return this._dimOmitted},n.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=IY(this.source)))},n.prototype.getSourceDimensionIndex=function(e){return ai(this._dimNameMap.get(e),-1)},n.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},n.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=LX(this.source),i=!DY(e),r="",a=[],o=0,s=0;o<e;o++){var l=void 0,u=void 0,c=void 0,d=this.dimensions[s];if(d&&d.storeDimIndex===o)l=t?d.name:null,u=d.type,c=d.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(l=t?h.name:null,u=h.type)}a.push({property:l,type:u,ordinalMeta:c}),t&&l!=null&&(!d||!d.isCalculationCoord)&&(r+=i?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),r+="$",r+=Fve[u]||"f",c&&(r+=c.uid),r+="$"}var f=this.source,p=[f.seriesLayoutBy,f.startIndex,r].join("$$");return{dimensions:a,hash:p}},n.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,i=0;t<this._fullDimCount;t++){var r=void 0,a=this.dimensions[i];if(a&&a.storeDimIndex===t)a.isCalculationCoord||(r=a.name),i++;else{var o=this.getSourceDimension(t);o&&(r=o.name)}e.push(r)}return e},n.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},n}();function RY(n){return n instanceof PY}function LY(n){for(var e=In(),t=0;t<(n||[]).length;t++){var i=n[t],r=Kn(i)?i.name:i;r!=null&&e.get(r)==null&&e.set(r,t)}return e}function IY(n){var e=kve(n);return e.dimNameMap||(e.dimNameMap=LY(n.dimensionsDefine))}function DY(n){return n>30}var zm=Kn,Pd=Xt,Ove=typeof Int32Array=="undefined"?Array:Int32Array,Bve="e\0\0",AF=-1,zve=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Gve=["_approximateExtent"],CF,l6,Gm,Um,ex,Vm,tx,Uve=function(){function n(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 i,r=!1;RY(e)?(i=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,i=e),i=i||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<i.length;c++){var d=i[c],h=xn(d)?new l5({name:d}):d instanceof l5?d:new l5(d),f=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=f,h.coordDimIndex=0);var p=h.otherDims=h.otherDims||{};o.push(f),a[f]=h,u[f]!=null&&(l=!0),h.createInvertedIndices&&(s[f]=[]),p.itemName===0&&(this._nameDimIdx=c),p.itemId===0&&(this._idDimIdx=c),r&&(h.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var m=this._dimIdxToName=In();ne(o,function(v){m.set(a[v].storeDimIndex,v)})}}return n.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var i=this._dimIdxToName.get(t);if(i!=null)return i;var r=this._schema.getSourceDimension(t);if(r)return r.name},n.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var i=this._getDimInfo(e);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},n.prototype._recognizeDimIndex=function(e){if(Yi(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},n.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);return t},n.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},n.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(i){return t.hasOwnProperty(i)?t[i]:void 0}:function(i){return t[i]}},n.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},n.prototype.mapDimension=function(e,t){var i=this._dimSummary;if(t==null)return i.encodeFirstDimNotExtra[e];var r=i.encode[e];return r?r[t]:null},n.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,i=t.encode[e];return(i||[]).slice()},n.prototype.getStore=function(){return this._store},n.prototype.initData=function(e,t,i){var r=this,a;if(e instanceof NA&&(a=e),!a){var o=this.dimensions,s=LE(e)||ds(e)?new IX(e,o.length):e;a=new NA;var l=Pd(o,function(u){return{type:r._dimInfos[u].type,property:u}});a.initData(s,l,i)}this._store=a,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=Ive(this,this._schema),this.userOutput=this._dimSummary.userOutput},n.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},n.prototype.appendValues=function(e,t){var i=this._store.appendValues(e,t&&t.length),r=i.start,a=i.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var s=r;s<a;s++){var l=s-r;this._nameList[s]=t[l],o&&tx(this,s)}},n.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,i=0;i<t.length;i++){var r=this._dimInfos[t[i]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},n.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==mh&&!e.fillStorage},n.prototype._doInit=function(e,t){if(!(e>=t)){var i=this._store,r=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=r.getSource().sourceFormat,l=s===R0;if(l&&!r.pure)for(var u=[],c=e;c<t;c++){var d=r.getItem(c,u);if(!this.hasItemOption&&rhe(d)&&(this.hasItemOption=!0),d){var h=d.name;a[c]==null&&h!=null&&(a[c]=lo(h,null));var f=d.id;o[c]==null&&f!=null&&(o[c]=lo(f,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<t;c++)tx(this,c);CF(this)}},n.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},n.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},n.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},n.prototype.setCalculationInfo=function(e,t){zm(e)?It(this._calculationInfo,e):this._calculationInfo[e]=t},n.prototype.getName=function(e){var t=this.getRawIndex(e),i=this._nameList[t];return i==null&&this._nameDimIdx!=null&&(i=Gm(this,this._nameDimIdx,t)),i==null&&(i=""),i},n.prototype._getCategory=function(e,t){var i=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[i]:i},n.prototype.getId=function(e){return l6(this,this.getRawIndex(e))},n.prototype.count=function(){return this._store.count()},n.prototype.get=function(e,t){var i=this._store,r=this._dimInfos[e];if(r)return i.get(r.storeDimIndex,t)},n.prototype.getByRawIndex=function(e,t){var i=this._store,r=this._dimInfos[e];if(r)return i.getByRawIndex(r.storeDimIndex,t)},n.prototype.getIndices=function(){return this._store.getIndices()},n.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},n.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},n.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},n.prototype.getValues=function(e,t){var i=this,r=this._store;return $t(e)?r.getValues(Pd(e,function(a){return i._getStoreDimIndex(a)}),t):r.getValues(e)},n.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,i=0,r=t.length;i<r;i++)if(isNaN(this._store.get(t[i],e)))return!1;return!0},n.prototype.indexOfName=function(e){for(var t=0,i=this._store.count();t<i;t++)if(this.getName(t)===e)return t;return-1},n.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},n.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},n.prototype.rawIndexOf=function(e,t){var i=e&&this._invertedIndicesMap[e],r=i&&i[t];return r==null||isNaN(r)?AF:r},n.prototype.indicesOfNearest=function(e,t,i){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,i)},n.prototype.each=function(e,t,i){$n(e)&&(i=t,t=e,e=[]);var r=i||this,a=Pd(Um(e),this._getStoreDimIndex,this);this._store.each(a,r?An(t,r):t)},n.prototype.filterSelf=function(e,t,i){$n(e)&&(i=t,t=e,e=[]);var r=i||this,a=Pd(Um(e),this._getStoreDimIndex,this);return this._store=this._store.filter(a,r?An(t,r):t),this},n.prototype.selectRange=function(e){var t=this,i={},r=Li(e);return ne(r,function(a){var o=t._getStoreDimIndex(a);i[o]=e[a]}),this._store=this._store.selectRange(i),this},n.prototype.mapArray=function(e,t,i){$n(e)&&(i=t,t=e,e=[]),i=i||this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},i),r},n.prototype.map=function(e,t,i,r){var a=i||r||this,o=Pd(Um(e),this._getStoreDimIndex,this),s=Vm(this);return s._store=this._store.map(o,a?An(t,a):t),s},n.prototype.modify=function(e,t,i,r){var a=i||r||this,o=Pd(Um(e),this._getStoreDimIndex,this);this._store.modify(o,a?An(t,a):t)},n.prototype.downSample=function(e,t,i,r){var a=Vm(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),t,i,r),a},n.prototype.minmaxDownSample=function(e,t){var i=Vm(this);return i._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),i},n.prototype.lttbDownSample=function(e,t){var i=Vm(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),i},n.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},n.prototype.getItemModel=function(e){var t=this.hostModel,i=this.getRawDataItem(e);return new Xr(i,t,t&&t.ecModel)},n.prototype.diff=function(e){var t=this;return new Xc(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(i){return l6(e,i)},function(i){return l6(t,i)})},n.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},n.prototype.setVisual=function(e,t){this._visual=this._visual||{},zm(e)?It(this._visual,e):this._visual[e]=t},n.prototype.getItemVisual=function(e,t){var i=this._itemVisuals[e],r=i&&i[t];return r==null?this.getVisual(t):r},n.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},n.prototype.ensureUniqueItemVisual=function(e,t){var i=this._itemVisuals,r=i[e];r||(r=i[e]={});var a=r[t];return a==null&&(a=this.getVisual(t),$t(a)?a=a.slice():zm(a)&&(a=It({},a)),r[t]=a),a},n.prototype.setItemVisual=function(e,t,i){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,zm(t)?It(r,t):r[t]=i},n.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},n.prototype.setLayout=function(e,t){zm(e)?It(this._layout,e):this._layout[e]=t},n.prototype.getLayout=function(e){return this._layout[e]},n.prototype.getItemLayout=function(e){return this._itemLayouts[e]},n.prototype.setItemLayout=function(e,t,i){this._itemLayouts[e]=i?It(this._itemLayouts[e]||{},t):t},n.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},n.prototype.setItemGraphicEl=function(e,t){var i=this.hostModel&&this.hostModel.seriesIndex;bA(i,this.dataType,e,t),this._graphicEls[e]=t},n.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},n.prototype.eachItemGraphicEl=function(e,t){ne(this._graphicEls,function(i,r){i&&e&&e.call(t,i,r)})},n.prototype.cloneShallow=function(e){return e||(e=new n(this._schema?this._schema:Pd(this.dimensions,this._getDimInfo,this),this.hostModel)),ex(e,this),e._store=this._store,e},n.prototype.wrapMethod=function(e,t){var i=this[e];$n(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var r=i.apply(this,arguments);return t.apply(this,[r].concat(YM(arguments)))})},n.internalField=function(){CF=function(e){var t=e._invertedIndicesMap;ne(t,function(i,r){var a=e._dimInfos[r],o=a.ordinalMeta,s=e._store;if(o){i=t[r]=new Ove(o.categories.length);for(var l=0;l<i.length;l++)i[l]=AF;for(var l=0;l<s.count();l++)i[s.get(a.storeDimIndex,l)]=l}})},Gm=function(e,t,i){return lo(e._getCategory(t,i),null)},l6=function(e,t){var i=e._idList[t];return i==null&&e._idDimIdx!=null&&(i=Gm(e,e._idDimIdx,t)),i==null&&(i=Bve+t),i},Um=function(e){return $t(e)||(e=e!=null?[e]:[]),e},Vm=function(e){var t=new n(e._schema?e._schema:Pd(e.dimensions,e._getDimInfo,e),e.hostModel);return ex(t,e),t},ex=function(e,t){ne(zve.concat(t.__wrappedMethods||[]),function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e.__wrappedMethods=t.__wrappedMethods,ne(Gve,function(i){e[i]=Zn(t[i])}),e._calculationInfo=It({},t._calculationInfo)},tx=function(e,t){var i=e._nameList,r=e._idList,a=e._nameDimIdx,o=e._idDimIdx,s=i[t],l=r[t];if(s==null&&a!=null&&(i[t]=s=Gm(e,a,t)),l==null&&o!=null&&(r[t]=l=Gm(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),r[t]=l}}}(),n}();const Rs=Uve;function T3(n,e){LE(n)||(n=IE(n)),e=e||{};var t=e.coordDimensions||[],i=e.dimensionsDefine||n.dimensionsDefine||[],r=In(),a=[],o=Hve(n,t,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&DY(o),l=i===n.dimensionsDefine,u=l?IY(n):LY(i),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(n,o));for(var d=In(c),h=new GX(o),f=0;f<h.length;f++)h[f]=-1;function p(D){var E=h[D];if(E<0){var P=i[D],F=Kn(P)?P:{name:P},V=new l5,G=F.name;G!=null&&u.get(G)!=null&&(V.name=V.displayName=G),F.type!=null&&(V.type=F.type),F.displayName!=null&&(V.displayName=F.displayName);var W=a.length;return h[D]=W,V.storeDimIndex=D,a.push(V),V}return a[E]}if(!s)for(var f=0;f<o;f++)p(f);d.each(function(D,E){var P=Ar(D).slice();if(P.length===1&&!xn(P[0])&&P[0]<0){d.set(E,!1);return}var F=d.set(E,[]);ne(P,function(V,G){var W=xn(V)?u.get(V):V;W!=null&&W<o&&(F[G]=W,v(p(W),E,G))})});var m=0;ne(t,function(D){var E,P,F,V;if(xn(D))E=D,V={};else{V=D,E=V.name;var G=V.ordinalMeta;V.ordinalMeta=null,V=It({},V),V.ordinalMeta=G,P=V.dimsDef,F=V.otherDims,V.name=V.coordDim=V.coordDimIndex=V.dimsDef=V.otherDims=null}var W=d.get(E);if(W!==!1){if(W=Ar(W),!W.length)for(var Y=0;Y<(P&&P.length||1);Y++){for(;m<o&&p(m).coordDim!=null;)m++;m<o&&W.push(m++)}ne(W,function(Q,K){var ae=p(Q);if(l&&V.type!=null&&(ae.type=V.type),v(qn(ae,V),E,K),ae.name==null&&P){var ie=P[K];!Kn(ie)&&(ie={name:ie}),ae.name=ae.displayName=ie.name,ae.defaultTooltip=ie.defaultTooltip}F&&qn(ae.otherDims,F)})}});function v(D,E,P){yX.get(E)!=null?D.otherDims[E]=P:(D.coordDim=E,D.coordDimIndex=P,r.set(E,!0))}var g=e.generateCoord,_=e.generateCoordCount,S=_!=null;_=g?_||1:0;var x=g||"value";function A(D){D.name==null&&(D.name=D.coordDim)}if(s)ne(a,function(D){A(D)}),a.sort(function(D,E){return D.storeDimIndex-E.storeDimIndex});else for(var C=0;C<o;C++){var M=p(C),I=M.coordDim;I==null&&(M.coordDim=Wve(x,r,S),M.coordDimIndex=0,(!g||_<=0)&&(M.isExtraCoord=!0),_--),A(M),M.type==null&&(xX(n,C)===Go.Must||M.isExtraCoord&&(M.otherDims.itemName!=null||M.otherDims.seriesName!=null))&&(M.type="ordinal")}return Vve(a),new PY({source:n,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Vve(n){for(var e=In(),t=0;t<n.length;t++){var i=n[t],r=i.name,a=e.get(r)||0;a>0&&(i.name=r+(a-1)),a++,e.set(r,a)}}function Hve(n,e,t,i){var r=Math.max(n.dimensionsDetectedCount||1,e.length,t.length,i||0);return ne(e,function(a){var o;Kn(a)&&(o=a.dimsDef)&&(r=Math.max(r,o.length))}),r}function Wve(n,e,t){if(t||e.hasKey(n)){for(var i=0;e.hasKey(n+i);)i++;n+=i}return e.set(n,!0),n}var jve=function(){function n(e){this.coordSysDims=[],this.axisMap=In(),this.categoryAxisMap=In(),this.coordSysName=e}return n}();function $ve(n){var e=n.get("coordinateSystem"),t=new jve(e),i=qve[e];if(i)return i(n,t,t.axisMap,t.categoryAxisMap),t}var qve={cartesian2d:function(n,e,t,i){var r=n.getReferringComponents("xAxis",Xa).models[0],a=n.getReferringComponents("yAxis",Xa).models[0];e.coordSysDims=["x","y"],t.set("x",r),t.set("y",a),B1(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),B1(a)&&(i.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(n,e,t,i){var r=n.getReferringComponents("singleAxis",Xa).models[0];e.coordSysDims=["single"],t.set("single",r),B1(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(n,e,t,i){var r=n.getReferringComponents("polar",Xa).models[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",a),t.set("angle",o),B1(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),B1(o)&&(i.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(n,e,t,i){e.coordSysDims=["lng","lat"]},parallel:function(n,e,t,i){var r=n.ecModel,a=r.getComponent("parallel",n.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();ne(a.parallelAxisIndex,function(s,l){var u=r.getComponent("parallelAxis",s),c=o[l];t.set(c,u),B1(u)&&(i.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function B1(n){return n.get("type")==="category"}function Xve(n,e,t){t=t||{};var i=t.byIndex,r=t.stackedCoordDimension,a,o,s;Yve(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(n&&n.get("stack")),u,c,d,h;if(ne(a,function(_,S){xn(_)&&(a[S]=_={name:_}),l&&!_.isExtraCoord&&(!i&&!u&&_.ordinalMeta&&(u=_),!c&&_.type!=="ordinal"&&_.type!=="time"&&(!r||r===_.coordDim)&&(c=_))}),c&&!i&&!u&&(i=!0),c){d="__\0ecstackresult_"+n.id,h="__\0ecstackedover_"+n.id,u&&(u.createInvertedIndices=!0);var f=c.coordDim,p=c.type,m=0;ne(a,function(_){_.coordDim===f&&m++});var v={name:d,coordDim:f,coordDimIndex:m,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},g={name:h,coordDim:h,coordDimIndex:m+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(h,p),g.storeDimIndex=s.ensureCalculationDimension(d,p)),o.appendCalculationDimension(v),o.appendCalculationDimension(g)):(a.push(v),a.push(g))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:h,stackResultDimension:d}}function Yve(n){return!RY(n.schema)}function Lh(n,e){return!!e&&e===n.getCalculationInfo("stackedDimension")}function NY(n,e){return Lh(n,e)?n.getCalculationInfo("stackResultDimension"):e}function Kve(n,e){var t=n.get("coordinateSystem"),i=x3.get(t),r;return e&&e.coordSysDims&&(r=Xt(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=o8(l)}return o})),r||(r=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),r}function Zve(n,e,t){var i,r;return t&&ne(n,function(a,o){var s=a.coordDim,l=t.categoryAxisMap.get(s);l&&(i==null&&(i=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(r=!0)}),!r&&i!=null&&(n[i].otherDims.itemName=0),i}function nd(n,e,t){t=t||{};var i=e.getSourceManager(),r,a=!1;n?(a=!0,r=IE(n)):(r=i.getSource(),a=r.sourceFormat===R0);var o=$ve(e),s=Kve(e,o),l=t.useEncodeDefaulter,u=$n(l)?l:l?si(bX,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},d=T3(r,c),h=Zve(d.dimensions,t.createInvertedIndices,o),f=a?null:i.getSharedDataStore(d),p=Xve(e,{schema:d,store:f}),m=new Rs(d,e);m.setCalculationInfo(p);var v=h!=null&&Jve(r)?function(g,_,S,x){return x===h?S:this.defaultDimValueGetter(g,_,S,x)}:null;return m.hasItemOption=!1,m.initData(a?r:f,null,v),m}function Jve(n){if(n.sourceFormat===R0){var e=Qve(n.data||[]);return!$t(zv(e))}}function Qve(n){for(var e=0;e<n.length&&n[e]==null;)e++;return n[e]}var kY=function(){function n(e){this._setting=e||{},this._extent=[1/0,-1/0]}return n.prototype.getSetting=function(e){return this._setting[e]},n.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},n.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},n.prototype.getExtent=function(){return this._extent.slice()},n.prototype.setExtent=function(e,t){var i=this._extent;isNaN(e)||(i[0]=e),isNaN(t)||(i[1]=t)},n.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},n.prototype.isBlank=function(){return this._isBlank},n.prototype.setBlank=function(e){this._isBlank=e},n}();b_(kY);const id=kY;var eme=0,tme=function(){function n(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++eme}return n.createByAxisModel=function(e){var t=e.option,i=t.data,r=i&&Xt(i,nme);return new n({categories:r,needCollect:!r,deduplication:t.dedplication!==!1})},n.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},n.prototype.parseAndCollect=function(e){var t,i=this._needCollect;if(!xn(e)&&!i)return e;if(i&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return t=r.get(e),t==null&&(i?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},n.prototype._getOrCreateMap=function(){return this._map||(this._map=In(this.categories))},n}();function nme(n){return Kn(n)&&n.value!=null?n.value:n+""}const WA=tme;function jA(n){return n.type==="interval"||n.type==="log"}function ime(n,e,t,i){var r={},a=n[1]-n[0],o=r.interval=q$(a/e,!0);t!=null&&o<t&&(o=r.interval=t),i!=null&&o>i&&(o=r.interval=i);var s=r.intervalPrecision=FY(o),l=r.niceTickExtent=[Ra(Math.ceil(n[0]/o)*o,s),Ra(Math.floor(n[1]/o)*o,s)];return rme(l,n),r}function nx(n){var e=Math.pow(10,rE(n)),t=n/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Ra(t*e)}function FY(n){return Bu(n)+2}function MF(n,e,t){n[e]=Math.max(Math.min(n[e],t[1]),t[0])}function rme(n,e){!isFinite(n[0])&&(n[0]=e[0]),!isFinite(n[1])&&(n[1]=e[1]),MF(n,0,e),MF(n,1,e),n[0]>n[1]&&(n[0]=n[1])}function W_(n,e){return n>=e[0]&&n<=e[1]}function j_(n,e){return e[1]===e[0]?.5:(n-e[0])/(e[1]-e[0])}function $_(n,e){return n*(e[1]-e[0])+e[0]}var OY=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;i.type="ordinal";var r=i.getSetting("ordinalMeta");return r||(r=new WA({})),$t(r)&&(r=new WA({categories:Xt(r,function(a){return Kn(a)?a.value:a})})),i._ordinalMeta=r,i._extent=i.getSetting("extent")||[0,r.categories.length-1],i}return e.prototype.parse=function(t){return t==null?NaN:xn(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),W_(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),j_(t,this._extent)},e.prototype.scale=function(t){return t=Math.round($_(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],i=this._extent,r=i[0];r<=i[1];)t.push({value:r}),r++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=t.ordinalNumbers,r=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,i.length);o<l;++o){var u=i[o];r[o]=u,a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;r.push(c),a[c]=o}},e.prototype._getTickNumber=function(t){var i=this._ticksByOrdinalNumber;return i&&t>=0&&t<i.length?i[t]:t},e.prototype.getRawOrdinalNumber=function(t){var i=this._ordinalNumbersByTick;return i&&t>=0&&t<i.length?i[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var i=this.getRawOrdinalNumber(t.value),r=this._ordinalMeta.categories[i];return r==null?"":r+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(t,i){this.unionExtent(t.getApproximateExtent(i))},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}(id);id.registerClass(OY);const WE=OY;var Ef=Ra,BY=function(n){ot(e,n);function e(){var t=n!==null&&n.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 W_(t,this._extent)},e.prototype.normalize=function(t){return j_(t,this._extent)},e.prototype.scale=function(t){return $_(t,this._extent)},e.prototype.setExtent=function(t,i){var r=this._extent;isNaN(t)||(r[0]=parseFloat(t)),isNaN(i)||(r[1]=parseFloat(i))},e.prototype.unionExtent=function(t){var i=this._extent;t[0]<i[0]&&(i[0]=t[0]),t[1]>i[1]&&(i[1]=t[1]),this.setExtent(i[0],i[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=FY(t)},e.prototype.getTicks=function(t){var i=this._interval,r=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!i)return s;var l=1e4;r[0]<a[0]&&(t?s.push({value:Ef(a[0]-i,o)}):s.push({value:r[0]}));for(var u=a[0];u<=a[1]&&(s.push({value:u}),u=Ef(u+i,o),u!==s[s.length-1].value);)if(s.length>l)return[];var c=s.length?s[s.length-1].value:a[1];return r[1]>c&&(t?s.push({value:Ef(c+i,o)}):s.push({value:r[1]})),s},e.prototype.getMinorTicks=function(t){for(var i=this.getTicks(!0),r=[],a=this.getExtent(),o=1;o<i.length;o++){for(var s=i[o],l=i[o-1],u=0,c=[],d=s.value-l.value,h=d/t;u<t-1;){var f=Ef(l.value+(u+1)*h);f>a[0]&&f<a[1]&&c.push(f),u++}r.push(c)}return r},e.prototype.getLabel=function(t,i){if(t==null)return"";var r=i&&i.precision;r==null?r=Bu(t.value)||0:r==="auto"&&(r=this._intervalPrecision);var a=Ef(t.value,r,!0);return hX(a)},e.prototype.calcNiceTicks=function(t,i,r){t=t||5;var a=this._extent,o=a[1]-a[0];if(isFinite(o)){o<0&&(o=-o,a.reverse());var s=ime(a,t,i,r);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var i=this._extent;if(i[0]===i[1])if(i[0]!==0){var r=Math.abs(i[0]);t.fixMax||(i[1]+=r/2),i[0]-=r/2}else i[1]=1;var a=i[1]-i[0];isFinite(a)||(i[0]=0,i[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(i[0]=Ef(Math.floor(i[0]/o)*o)),t.fixMax||(i[1]=Ef(Math.ceil(i[1]/o)*o))},e.prototype.setNiceExtent=function(t,i){this._niceExtent=[t,i]},e.type="interval",e}(id);id.registerClass(BY);const Ih=BY;var zY=typeof Float32Array!="undefined",ame=zY?Float32Array:Array;function Gu(n){return $t(n)?zY?new Float32Array(n):n:new ame(n)}var $A="__ec_stack_";function jE(n){return n.get("stack")||$A+n.seriesIndex}function $E(n){return n.dim+n.index}function ome(n){var e=[],t=n.axis,i="axis0";if(t.type==="category"){for(var r=t.getBandWidth(),a=0;a<n.count;a++)e.push(qn({bandWidth:r,axisKey:i,stackId:$A+a},n));for(var o=VY(e),s=[],a=0;a<n.count;a++){var l=o[i][$A+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function GY(n,e){var t=[];return e.eachSeriesByType(n,function(i){jY(i)&&t.push(i)}),t}function sme(n){var e={};ne(n,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var d=l.getData(),h=c.dim+"_"+c.index,f=d.getDimensionIndex(d.mapDimension(c.dim)),p=d.getStore(),m=0,v=p.count();m<v;++m){var g=p.get(f,m);e[h]?e[h].push(g):e[h]=[g]}});var t={};for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];if(r){r.sort(function(l,u){return l-u});for(var a=null,o=1;o<r.length;++o){var s=r[o]-r[o-1];s>0&&(a=a===null?s:Math.min(a,s))}t[i]=a}}return t}function UY(n){var e=sme(n),t=[];return ne(n,function(i){var r=i.coordinateSystem,a=r.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]),d=a.scale.getExtent(),h=Math.abs(d[1]-d[0]);s=u?c/h*u:c}else{var f=i.getData();s=Math.abs(o[1]-o[0])/f.count()}var p=_n(i.get("barWidth"),s),m=_n(i.get("barMaxWidth"),s),v=_n(i.get("barMinWidth")||($Y(i)?.5:1),s),g=i.get("barGap"),_=i.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:m,barMinWidth:v,barGap:g,barCategoryGap:_,axisKey:$E(a),stackId:jE(i)})}),VY(t)}function VY(n){var e={};ne(n,function(i,r){var a=i.axisKey,o=i.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[a]=s;var u=i.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=i.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var d=i.barMaxWidth;d&&(l[u].maxWidth=d);var h=i.barMinWidth;h&&(l[u].minWidth=h);var f=i.barGap;f!=null&&(s.gap=f);var p=i.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return ne(e,function(i,r){t[r]={};var a=i.stacks,o=i.bandWidth,s=i.categoryGap;if(s==null){var l=Li(a).length;s=Math.max(35-l*4,15)+"%"}var u=_n(s,o),c=_n(i.gap,1),d=i.remainedWidth,h=i.autoWidthCount,f=(d-u)/(h+(h-1)*c);f=Math.max(f,0),ne(a,function(g){var _=g.maxWidth,S=g.minWidth;if(g.width){var x=g.width;_&&(x=Math.min(x,_)),S&&(x=Math.max(x,S)),g.width=x,d-=x+c*x,h--}else{var x=f;_&&_<x&&(x=Math.min(_,d)),S&&S>x&&(x=S),x!==f&&(g.width=x,d-=x+c*x,h--)}}),f=(d-u)/(h+(h-1)*c),f=Math.max(f,0);var p=0,m;ne(a,function(g,_){g.width||(g.width=f),m=g,p+=g.width*(1+c)}),m&&(p-=m.width*c);var v=-p/2;ne(a,function(g,_){t[r][_]=t[r][_]||{bandWidth:o,offset:v,width:g.width},v+=g.width*(1+c)})}),t}function lme(n,e,t){if(n&&e){var i=n[$E(e)];return i!=null&&t!=null?i[jE(t)]:i}}function HY(n,e){var t=GY(n,e),i=UY(t);ne(t,function(r){var a=r.getData(),o=r.coordinateSystem,s=o.getBaseAxis(),l=jE(r),u=i[$E(s)][l],c=u.offset,d=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:d})})}function WY(n){return{seriesType:n,plan:Xv(),reset:function(e){if(jY(e)){var t=e.getData(),i=e.coordinateSystem,r=i.getBaseAxis(),a=i.getOtherAxis(r),o=t.getDimensionIndex(t.mapDimension(a.dim)),s=t.getDimensionIndex(t.mapDimension(r.dim)),l=e.get("showBackground",!0),u=t.mapDimension(a.dim),c=t.getCalculationInfo("stackResultDimension"),d=Lh(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),f=ume(r,a),p=$Y(e),m=e.get("barMinHeight")||0,v=c&&t.getDimensionIndex(c),g=t.getLayout("size"),_=t.getLayout("offset");return{progress:function(S,x){for(var A=S.count,C=p&&Gu(A*3),M=p&&l&&Gu(A*3),I=p&&Gu(A),D=i.master.getRect(),E=h?D.width:D.height,P,F=x.getStore(),V=0;(P=S.next())!=null;){var G=F.get(d?v:o,P),W=F.get(s,P),Y=f,Q=void 0;d&&(Q=+G-F.get(o,P));var K=void 0,ae=void 0,ie=void 0,he=void 0;if(h){var Ee=i.dataToPoint([G,W]);if(d){var He=i.dataToPoint([Q,W]);Y=He[0]}K=Y,ae=Ee[1]+_,ie=Ee[0]-Y,he=g,Math.abs(ie)<m&&(ie=(ie<0?-1:1)*m)}else{var Ee=i.dataToPoint([W,G]);if(d){var He=i.dataToPoint([W,Q]);Y=He[1]}K=Ee[0]+_,ae=Y,ie=g,he=Ee[1]-Y,Math.abs(he)<m&&(he=(he<=0?-1:1)*m)}p?(C[V]=K,C[V+1]=ae,C[V+2]=h?ie:he,M&&(M[V]=h?D.x:K,M[V+1]=h?ae:D.y,M[V+2]=E),I[P]=P):x.setItemLayout(P,{x:K,y:ae,width:ie,height:he}),V+=3}p&&x.setLayout({largePoints:C,largeDataIndices:I,largeBackgroundPoints:M,valueAxisHorizontal:h})}}}}}}function jY(n){return n.coordinateSystem&&n.coordinateSystem.type==="cartesian2d"}function $Y(n){return n.pipelineContext&&n.pipelineContext.large}function ume(n,e){var t=e.model.get("startValue");return t||(t=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?t>0?t:1:t))}var cme=function(n,e,t,i){for(;t<i;){var r=t+i>>>1;n[r][1]<e?t=r+1:i=r}return t},qY=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="time",i}return e.prototype.getLabel=function(t){var i=this.getSetting("useUTC");return I_(t.value,gk[Dpe(K2(this._minLevelUnit))]||gk.second,i,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,i,r){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return Npe(t,i,r,o,a)},e.prototype.getTicks=function(){var t=this._interval,i=this._extent,r=[];if(!t)return r;r.push({value:i[0],level:0});var a=this.getSetting("useUTC"),o=gme(this._minLevelUnit,this._approxInterval,a,i);return r=r.concat(o),r.push({value:i[1],level:0}),r},e.prototype.calcNiceExtent=function(t){var i=this._extent;if(i[0]===i[1]&&(i[0]-=g0,i[1]+=g0),i[1]===-1/0&&i[0]===1/0){var r=new Date;i[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),i[0]=i[1]-g0}this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,i,r){t=t||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/t,i!=null&&this._approxInterval<i&&(this._approxInterval=i),r!=null&&this._approxInterval>r&&(this._approxInterval=r);var s=u6.length,l=Math.min(cme(u6,this._approxInterval,0,s),s-1);this._interval=u6[l][1],this._minLevelUnit=u6[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return Yi(t)?t:+Ju(t)},e.prototype.contain=function(t){return W_(this.parse(t),this._extent)},e.prototype.normalize=function(t){return j_(this.parse(t),this._extent)},e.prototype.scale=function(t){return $_(t,this._extent)},e.type="time",e}(Ih),u6=[["second",TE],["minute",AE],["hour",qg],["quarter-day",qg*6],["half-day",qg*12],["day",g0*1.2],["half-week",g0*3.5],["week",g0*7],["month",g0*31],["quarter",g0*95],["half-year",mk/2],["year",mk]];function dme(n,e,t,i){var r=Ju(e),a=Ju(t),o=function(p){return yk(r,p,i)===yk(a,p,i)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},d=function(){return c()&&o("minute")},h=function(){return d()&&o("second")},f=function(){return h()&&o("millisecond")};switch(n){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return d();case"second":return h();case"millisecond":return f()}}function hme(n,e){return n/=g0,n>16?16:n>7.5?7:n>3.5?4:n>1.5?2:1}function fme(n){var e=30*g0;return n/=e,n>6?6:n>3?3:n>2?2:1}function pme(n){return n/=qg,n>12?12:n>6?6:n>3.5?4:n>2?2:1}function EF(n,e){return n/=e?AE:TE,n>30?30:n>20?20:n>15?15:n>10?10:n>5?5:n>2?2:1}function vme(n){return q$(n,!0)}function mme(n,e,t){var i=new Date(n);switch(K2(e)){case"year":case"month":i[oX(t)](0);case"day":i[sX(t)](1);case"hour":i[lX(t)](0);case"minute":i[uX(t)](0);case"second":i[cX(t)](0),i[dX(t)](0)}return i.getTime()}function gme(n,e,t,i){var r=1e4,a=rX,o=0;function s(E,P,F,V,G,W,Y){for(var Q=new Date(P),K=P,ae=Q[V]();K<F&&K<=i[1];)Y.push({value:K}),ae+=E,Q[G](ae),K=Q.getTime();Y.push({value:K,notAdd:!0})}function l(E,P,F){var V=[],G=!P.length;if(!dme(K2(E),i[0],i[1],t)){G&&(P=[{value:mme(new Date(i[0]),E,t)},{value:i[1]}]);for(var W=0;W<P.length-1;W++){var Y=P[W].value,Q=P[W+1].value;if(Y!==Q){var K=void 0,ae=void 0,ie=void 0,he=!1;switch(E){case"year":K=Math.max(1,Math.round(e/g0/365)),ae=CE(t),ie=kpe(t);break;case"half-year":case"quarter":case"month":K=fme(e),ae=Z2(t),ie=oX(t);break;case"week":case"half-week":case"day":K=hme(e),ae=D_(t),ie=sX(t),he=!0;break;case"half-day":case"quarter-day":case"hour":K=pme(e),ae=I9(t),ie=lX(t);break;case"minute":K=EF(e,!0),ae=N_(t),ie=uX(t);break;case"second":K=EF(e,!1),ae=k_(t),ie=cX(t);break;case"millisecond":K=vme(e),ae=F_(t),ie=dX(t);break}s(K,Y,Q,ae,ie,he,V),E==="year"&&F.length>1&&W===0&&F.unshift({value:F[0].value-K})}}for(var W=0;W<V.length;W++)F.push(V[W]);return V}}for(var u=[],c=[],d=0,h=0,f=0;f<a.length&&o++<r;++f){var p=K2(a[f]);if(Ipe(a[f])){l(a[f],u[u.length-1]||[],c);var m=a[f+1]?K2(a[f+1]):null;if(p!==m){if(c.length){h=d,c.sort(function(E,P){return E.value-P.value});for(var v=[],g=0;g<c.length;++g){var _=c[g].value;(g===0||c[g-1].value!==_)&&(v.push(c[g]),_>=i[0]&&_<=i[1]&&d++)}var S=(i[1]-i[0])/e;if(d>S*1.5&&h>S/1.5||(u.push(v),d>S||n===a[f]))break}c=[]}}}for(var x=dr(Xt(u,function(E){return dr(E,function(P){return P.value>=i[0]&&P.value<=i[1]&&!P.notAdd})}),function(E){return E.length>0}),A=[],C=x.length-1,f=0;f<x.length;++f)for(var M=x[f],I=0;I<M.length;++I)A.push({value:M[I].value,level:C-f});A.sort(function(E,P){return E.value-P.value});for(var D=[],f=0;f<A.length;++f)(f===0||A[f].value!==A[f-1].value)&&D.push(A[f]);return D}id.registerClass(qY);const XY=qY;var PF=id.prototype,Zg=Ih.prototype,yme=Ra,_me=Math.floor,Sme=Math.ceil,c6=Math.pow,z0=Math.log,qE=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Ih,t._interval=0,t}return e.prototype.getTicks=function(t){var i=this._originalScale,r=this._extent,a=i.getExtent(),o=Zg.getTicks.call(this,t);return Xt(o,function(s){var l=s.value,u=Ra(c6(this.base,l));return u=l===r[0]&&this._fixMin?d6(u,a[0]):u,u=l===r[1]&&this._fixMax?d6(u,a[1]):u,{value:u}},this)},e.prototype.setExtent=function(t,i){var r=z0(this.base);t=z0(Math.max(0,t))/r,i=z0(Math.max(0,i))/r,Zg.setExtent.call(this,t,i)},e.prototype.getExtent=function(){var t=this.base,i=PF.getExtent.call(this);i[0]=c6(t,i[0]),i[1]=c6(t,i[1]);var r=this._originalScale,a=r.getExtent();return this._fixMin&&(i[0]=d6(i[0],a[0])),this._fixMax&&(i[1]=d6(i[1],a[1])),i},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var i=this.base;t[0]=z0(t[0])/z0(i),t[1]=z0(t[1])/z0(i),PF.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,i){this.unionExtent(t.getApproximateExtent(i))},e.prototype.calcNiceTicks=function(t){t=t||10;var i=this._extent,r=i[1]-i[0];if(!(r===1/0||r<=0)){var a=ihe(r),o=t/r*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Ra(Sme(i[0]/a)*a),Ra(_me(i[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){Zg.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=z0(t)/z0(this.base),W_(t,this._extent)},e.prototype.normalize=function(t){return t=z0(t)/z0(this.base),j_(t,this._extent)},e.prototype.scale=function(t){return t=$_(t,this._extent),c6(this.base,t)},e.type="log",e}(id),YY=qE.prototype;YY.getMinorTicks=Zg.getMinorTicks;YY.getLabel=Zg.getLabel;function d6(n,e){return yme(n,Bu(e))}id.registerClass(qE);const bme=qE;var xme=function(){function n(e,t,i){this._prepareParams(e,t,i)}return n.prototype._prepareParams=function(e,t,i){i[1]<i[0]&&(i=[NaN,NaN]),this._dataMin=i[0],this._dataMax=i[1];var r=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;$n(o)?this._modelMinNum=h6(e,o({min:i[0],max:i[1]})):o!=="dataMin"&&(this._modelMinNum=h6(e,o));var s=this._modelMaxRaw=t.get("max",!0);if($n(s)?this._modelMaxNum=h6(e,s({min:i[0],max:i[1]})):s!=="dataMax"&&(this._modelMaxNum=h6(e,s)),r)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),u=$t(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[nu(u[0],1),nu(u[1],1)]}},n.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,i=this._dataMax,r=this._axisDataLen,a=this._boundaryGapInner,o=e?null:i-t||Math.abs(t),s=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?i:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=e?r?0:NaN:t-a[0]*o),l==null&&(l=e?r?r-1:NaN:i+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var d=b9(s)||b9(l)||e&&!r;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,f=this._determinedMax;return h!=null&&(s=h,u=!0),f!=null&&(l=f,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:d}},n.prototype.modifyDataMinMax=function(e,t){this[Tme[e]]=t},n.prototype.setDeterminedMinMax=function(e,t){var i=wme[e];this[i]=t},n.prototype.freeze=function(){this.frozen=!0},n}(),wme={min:"_determinedMin",max:"_determinedMax"},Tme={min:"_dataMin",max:"_dataMax"};function KY(n,e,t){var i=n.rawExtentInfo;return i||(i=new xme(n,e,t),n.rawExtentInfo=i,i)}function h6(n,e){return e==null?null:b9(e)?NaN:n.parse(e)}function ZY(n,e){var t=n.type,i=KY(n,e,n.getExtent()).calculate();n.setBlank(i.isBlank);var r=i.min,a=i.max,o=e.ecModel;if(o&&t==="time"){var s=GY("bar",o),l=!1;if(ne(s,function(d){l=l||d.getBaseAxis()===e.axis}),l){var u=UY(s),c=Ame(r,a,e,u);r=c.min,a=c.max}}return{extent:[r,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function Ame(n,e,t,i){var r=t.axis.getExtent(),a=Math.abs(r[1]-r[0]),o=lme(i,t.axis);if(o===void 0)return{min:n,max:e};var s=1/0;ne(o,function(f){s=Math.min(f.offset,s)});var l=-1/0;ne(o,function(f){l=Math.max(f.offset+f.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-n,d=1-(s+l)/a,h=c/d-c;return e+=h*(l/u),n-=h*(s/u),{min:n,max:e}}function mv(n,e){var t=e,i=ZY(n,t),r=i.extent,a=t.get("splitNumber");n instanceof bme&&(n.base=t.get("logBase"));var o=n.type,s=t.get("interval"),l=o==="interval"||o==="time";n.setExtent(r[0],r[1]),n.calcNiceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&n.setInterval&&n.setInterval(s)}function q_(n,e){if(e=e||n.get("type"),e)switch(e){case"category":return new WE({ordinalMeta:n.getOrdinalMeta?n.getOrdinalMeta():n.getCategories(),extent:[1/0,-1/0]});case"time":return new XY({locale:n.ecModel.getLocaleModel(),useUTC:n.ecModel.get("useUTC")});default:return new(id.getClass(e)||Ih)}}function Cme(n){var e=n.scale.getExtent(),t=e[0],i=e[1];return!(t>0&&i>0||t<0&&i<0)}function Zv(n){var e=n.getLabelModel().get("formatter"),t=n.type==="category"?n.scale.getExtent()[0]:null;return n.scale.type==="time"?function(i){return function(r,a){return n.scale.getFormattedLabel(r,a,i)}}(e):xn(e)?function(i){return function(r){var a=n.scale.getLabel(r),o=i.replace("{value}",a!=null?a:"");return o}}(e):$n(e)?function(i){return function(r,a){return t!=null&&(a=r.value-t),i(XE(n,r),a,r.level!=null?{level:r.level}:null)}}(e):function(i){return n.scale.getLabel(i)}}function XE(n,e){return n.type==="category"?n.scale.getLabel(e):e.value}function Mme(n){var e=n.model,t=n.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var i,r,a=t.getExtent();t instanceof WE?r=t.count():(i=t.getTicks(),r=i.length);var o=n.getLabelModel(),s=Zv(n),l,u=1;r>40&&(u=Math.ceil(r/40));for(var c=0;c<r;c+=u){var d=i?i[c]:{value:a[0]+c},h=s(d,c),f=o.getTextRect(h),p=Eme(f,o.get("rotate")||0);l?l.union(p):l=p}return l}}function Eme(n,e){var t=e*Math.PI/180,i=n.width,r=n.height,a=i*Math.abs(Math.cos(t))+Math.abs(r*Math.sin(t)),o=i*Math.abs(Math.sin(t))+Math.abs(r*Math.cos(t)),s=new gi(n.x,n.y,a,o);return s}function YE(n){var e=n.get("interval");return e==null?"auto":e}function JY(n){return n.type==="category"&&YE(n.getLabelModel())===0}function s8(n,e){var t={};return ne(n.mapDimensionsAll(e),function(i){t[NY(n,i)]=!0}),Li(t)}function Pme(n,e,t){e&&ne(s8(e,t),function(i){var r=e.getApproximateExtent(i);r[0]<n[0]&&(n[0]=r[0]),r[1]>n[1]&&(n[1]=r[1])})}var A3=function(){function n(){}return n.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},n.prototype.getCoordSysModel=function(){},n}(),Rme=1e-8;function RF(n,e){return Math.abs(n-e)<Rme}function Zf(n,e,t){var i=0,r=n[0];if(!r)return!1;for(var a=1;a<n.length;a++){var o=n[a];i+=Pc(r[0],r[1],o[0],o[1],e,t),r=o}var s=n[0];return(!RF(r[0],s[0])||!RF(r[1],s[1]))&&(i+=Pc(r[0],r[1],s[0],s[1],e,t)),i!==0}var Lme=[];function ix(n,e){for(var t=0;t<n.length;t++)Ho(n[t],n[t],e)}function LF(n,e,t,i){for(var r=0;r<n.length;r++){var a=n[r];i&&(a=i.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(th(e,e,a),nh(t,t,a))}}function Ime(n){for(var e=0,t=0,i=0,r=n.length,a=n[r-1][0],o=n[r-1][1],s=0;s<r;s++){var l=n[s][0],u=n[s][1],c=a*u-l*o;e+=c,t+=(a+l)*c,i+=(o+u)*c,a=l,o=u}return e?[t/e/3,i/e/3,e]:[n[0][0]||0,n[0][1]||0]}var QY=function(){function n(e){this.name=e}return n.prototype.setCenter=function(e){this._center=e},n.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},n}(),IF=function(){function n(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return n}(),DF=function(){function n(e){this.type="linestring",this.points=e}return n}(),eK=function(n){ot(e,n);function e(t,i,r){var a=n.call(this,t)||this;return a.type="geoJSON",a.geometries=i,a._center=r&&[r[0],r[1]],a}return e.prototype.calcCenter=function(){for(var t=this.geometries,i,r=0,a=0;a<t.length;a++){var o=t[a],s=o.exterior,l=s&&s.length;l>r&&(i=o,r=l)}if(i)return Ime(i.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var i=this._rect;if(i&&!t)return i;var r=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return ne(o,function(s){s.type==="polygon"?LF(s.exterior,r,a,t):ne(s.points,function(l){LF(l,r,a,t)})}),isFinite(r[0])&&isFinite(r[1])&&isFinite(a[0])&&isFinite(a[1])||(r[0]=r[1]=a[0]=a[1]=0),i=new gi(r[0],r[1],a[0]-r[0],a[1]-r[1]),t||(this._rect=i),i},e.prototype.contain=function(t){var i=this.getBoundingRect(),r=this.geometries;if(!i.contain(t[0],t[1]))return!1;e:for(var a=0,o=r.length;a<o;a++){var s=r[a];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(Zf(l,t[0],t[1])){for(var c=0;c<(u?u.length:0);c++)if(Zf(u[c],t[0],t[1]))continue e;return!0}}}return!1},e.prototype.transformTo=function(t,i,r,a){var o=this.getBoundingRect(),s=o.width/o.height;r?a||(a=r/s):r=s*a;for(var l=new gi(t,i,r,a),u=o.calculateTransform(l),c=this.geometries,d=0;d<c.length;d++){var h=c[d];h.type==="polygon"?(ix(h.exterior,u),ne(h.interiors,function(f){ix(f,u)})):ne(h.points,function(f){ix(f,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 i=new e(t,this.geometries,this._center);return i._rect=this._rect,i.transformTo=null,i},e}(QY),Dme=function(n){ot(e,n);function e(t,i){var r=n.call(this,t)||this;return r.type="geoSVG",r._elOnlyForCalculate=i,r}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,i=t.getBoundingRect(),r=[i.x+i.width/2,i.y+i.height/2],a=y_(Lme),o=t;o&&!o.isGeoSVGGraphicRoot;)Bc(a,o.getLocalTransform(),a),o=o.parent;return Bv(a,a),Ho(r,r,a),r},e}(QY);function Nme(n){if(!n.UTF8Encoding)return n;var e=n,t=e.UTF8Scale;t==null&&(t=1024);var i=e.features;return ne(i,function(r){var a=r.geometry,o=a.encodeOffsets,s=a.coordinates;if(o)switch(a.type){case"LineString":a.coordinates=tK(s,o,t);break;case"Polygon":rx(s,o,t);break;case"MultiLineString":rx(s,o,t);break;case"MultiPolygon":ne(s,function(l,u){return rx(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function rx(n,e,t){for(var i=0;i<n.length;i++)n[i]=tK(n[i],e[i],t)}function tK(n,e,t){for(var i=[],r=e[0],a=e[1],o=0;o<n.length;o+=2){var s=n.charCodeAt(o)-64,l=n.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=r,l+=a,r=s,a=l,i.push([s/t,l/t])}return i}function kme(n,e){return n=Nme(n),Xt(dr(n.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var i=t.properties,r=t.geometry,a=[];switch(r.type){case"Polygon":var o=r.coordinates;a.push(new IF(o[0],o.slice(1)));break;case"MultiPolygon":ne(r.coordinates,function(l){l[0]&&a.push(new IF(l[0],l.slice(1)))});break;case"LineString":a.push(new DF([r.coordinates]));break;case"MultiLineString":a.push(new DF(r.coordinates))}var s=new eK(i[e||"name"],a,i.cp);return s.properties=i,s})}var B9=Gi();function nK(n,e){var t=Xt(e,function(i){return n.scale.parse(i)});return n.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function Fme(n){var e=n.getLabelModel().get("customValues");if(e){var t=Zv(n),i=n.scale.getExtent(),r=nK(n,e),a=dr(r,function(o){return o>=i[0]&&o<=i[1]});return{labels:Xt(a,function(o){var s={value:o};return{formattedLabel:t(s),rawLabel:n.scale.getLabel(s),tickValue:o}})}}return n.type==="category"?Bme(n):Gme(n)}function Ome(n,e){var t=n.getTickModel().get("customValues");if(t){var i=n.scale.getExtent(),r=nK(n,t);return{ticks:dr(r,function(a){return a>=i[0]&&a<=i[1]})}}return n.type==="category"?zme(n,e):{ticks:Xt(n.scale.getTicks(),function(a){return a.value})}}function Bme(n){var e=n.getLabelModel(),t=iK(n,e);return!e.get("show")||n.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function iK(n,e){var t=rK(n,"labels"),i=YE(e),r=aK(t,i);if(r)return r;var a,o;return $n(i)?a=lK(n,i):(o=i==="auto"?Ume(n):i,a=sK(n,o)),oK(t,i,{labels:a,labelCategoryInterval:o})}function zme(n,e){var t=rK(n,"ticks"),i=YE(e),r=aK(t,i);if(r)return r;var a,o;if((!e.get("show")||n.scale.isBlank())&&(a=[]),$n(i))a=lK(n,i,!0);else if(i==="auto"){var s=iK(n,n.getLabelModel());o=s.labelCategoryInterval,a=Xt(s.labels,function(l){return l.tickValue})}else o=i,a=sK(n,o,!0);return oK(t,i,{ticks:a,tickCategoryInterval:o})}function Gme(n){var e=n.scale.getTicks(),t=Zv(n);return{labels:Xt(e,function(i,r){return{level:i.level,formattedLabel:t(i,r),rawLabel:n.scale.getLabel(i),tickValue:i.value}})}}function rK(n,e){return B9(n)[e]||(B9(n)[e]=[])}function aK(n,e){for(var t=0;t<n.length;t++)if(n[t].key===e)return n[t].value}function oK(n,e,t){return n.push({key:e,value:t}),t}function Ume(n){var e=B9(n).autoInterval;return e!=null?e:B9(n).autoInterval=n.calculateCategoryInterval()}function Vme(n){var e=Hme(n),t=Zv(n),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=n.scale,a=r.getExtent(),o=r.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=n.dataToCoord(l+1)-n.dataToCoord(l),c=Math.abs(u*Math.cos(i)),d=Math.abs(u*Math.sin(i)),h=0,f=0;l<=a[1];l+=s){var p=0,m=0,v=g3(t({value:l}),e.font,"center","top");p=v.width*1.3,m=v.height*1.3,h=Math.max(h,p,7),f=Math.max(f,m,7)}var g=h/c,_=f/d;isNaN(g)&&(g=1/0),isNaN(_)&&(_=1/0);var S=Math.max(0,Math.floor(Math.min(g,_))),x=B9(n.model),A=n.getExtent(),C=x.lastAutoInterval,M=x.lastTickCount;return C!=null&&M!=null&&Math.abs(C-S)<=1&&Math.abs(M-o)<=1&&C>S&&x.axisExtent0===A[0]&&x.axisExtent1===A[1]?S=C:(x.lastTickCount=o,x.lastAutoInterval=S,x.axisExtent0=A[0],x.axisExtent1=A[1]),S}function Hme(n){var e=n.getLabelModel();return{axisRotate:n.getRotate?n.getRotate():n.isHorizontal&&!n.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function sK(n,e,t){var i=Zv(n),r=n.scale,a=r.getExtent(),o=n.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=r.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=JY(n),h=o.get("showMinLabel")||d,f=o.get("showMaxLabel")||d;h&&u!==a[0]&&m(a[0]);for(var p=u;p<=a[1];p+=l)m(p);f&&p-l!==a[1]&&m(a[1]);function m(v){var g={value:v};s.push(t?v:{formattedLabel:i(g),rawLabel:r.getLabel(g),tickValue:v})}return s}function lK(n,e,t){var i=n.scale,r=Zv(n),a=[];return ne(i.getTicks(),function(o){var s=i.getLabel(o),l=o.value;e(o.value,s)&&a.push(t?l:{formattedLabel:r(o),rawLabel:s,tickValue:l})}),a}var NF=[0,1],Wme=function(){function n(e,t,i){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=i||[0,0]}return n.prototype.contain=function(e){var t=this._extent,i=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=i&&e<=r},n.prototype.containData=function(e){return this.scale.contain(e)},n.prototype.getExtent=function(){return this._extent.slice()},n.prototype.getPixelPrecision=function(e){return j$(e||this.scale.getExtent(),this._extent)},n.prototype.setExtent=function(e,t){var i=this._extent;i[0]=e,i[1]=t},n.prototype.dataToCoord=function(e,t){var i=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&r.type==="ordinal"&&(i=i.slice(),kF(i,r.count())),pr(e,NF,i,t)},n.prototype.coordToData=function(e,t){var i=this._extent,r=this.scale;this.onBand&&r.type==="ordinal"&&(i=i.slice(),kF(i,r.count()));var a=pr(e,i,NF,t);return this.scale.scale(a)},n.prototype.pointToData=function(e,t){},n.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),i=Ome(this,t),r=i.ticks,a=Xt(r,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return jme(this,a,o,e.clamp),a},n.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 i=this.scale.getMinorTicks(t),r=Xt(i,function(a){return Xt(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return r},n.prototype.getViewLabels=function(){return Fme(this).labels},n.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},n.prototype.getTickModel=function(){return this.model.getModel("axisTick")},n.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),i=t[1]-t[0]+(this.onBand?1:0);i===0&&(i=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/i},n.prototype.calculateCategoryInterval=function(){return Vme(this)},n}();function kF(n,e){var t=n[1]-n[0],i=e,r=t/i/2;n[0]+=r,n[1]-=r}function jme(n,e,t,i){var r=e.length;if(!n.onBand||t||!r)return;var a=n.getExtent(),o,s;if(r===1)e[0].coord=a[0],o=e[1]={coord:a[1],tickValue:e[0].tickValue};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;ne(e,function(f){f.coord-=u/2});var c=n.scale.getExtent();s=1+c[1]-e[r-1].tickValue,o={coord:e[r-1].coord+u*s,tickValue:c[1]+1},e.push(o)}var d=a[0]>a[1];h(e[0].coord,a[0])&&(i?e[0].coord=a[0]:e.shift()),i&&h(a[0],e[0].coord)&&e.unshift({coord:a[0]}),h(a[1],o.coord)&&(i?o.coord=a[1]:e.pop()),i&&h(o.coord,a[1])&&e.push({coord:a[1]});function h(f,p){return f=Ra(f),p=Ra(p),d?f>p:f<p}}const ou=Wme;var Hm=Math.PI*2,Pf=Qu.CMD,$me=["top","right","bottom","left"];function qme(n,e,t,i,r){var a=t.width,o=t.height;switch(n){case"top":i.set(t.x+a/2,t.y-e),r.set(0,-1);break;case"bottom":i.set(t.x+a/2,t.y+o+e),r.set(0,1);break;case"left":i.set(t.x-e,t.y+o/2),r.set(-1,0);break;case"right":i.set(t.x+a+e,t.y+o/2),r.set(1,0);break}}function Xme(n,e,t,i,r,a,o,s,l){o-=n,s-=e;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*t+n,d=s*t+e;if(Math.abs(i-r)%Hm<1e-4)return l[0]=c,l[1]=d,u-t;if(a){var h=i;i=Ll(r),r=Ll(h)}else i=Ll(i),r=Ll(r);i>r&&(r+=Hm);var f=Math.atan2(s,o);if(f<0&&(f+=Hm),f>=i&&f<=r||f+Hm>=i&&f+Hm<=r)return l[0]=c,l[1]=d,u-t;var p=t*Math.cos(i)+n,m=t*Math.sin(i)+e,v=t*Math.cos(r)+n,g=t*Math.sin(r)+e,_=(p-o)*(p-o)+(m-s)*(m-s),S=(v-o)*(v-o)+(g-s)*(g-s);return _<S?(l[0]=p,l[1]=m,Math.sqrt(_)):(l[0]=v,l[1]=g,Math.sqrt(S))}function l8(n,e,t,i,r,a,o,s){var l=r-n,u=a-e,c=t-n,d=i-e,h=Math.sqrt(c*c+d*d);c/=h,d/=h;var f=l*c+u*d,p=f/h;s&&(p=Math.min(Math.max(p,0),1)),p*=h;var m=o[0]=n+p*c,v=o[1]=e+p*d;return Math.sqrt((m-r)*(m-r)+(v-a)*(v-a))}function uK(n,e,t,i,r,a,o){t<0&&(n=n+t,t=-t),i<0&&(e=e+i,i=-i);var s=n+t,l=e+i,u=o[0]=Math.min(Math.max(r,n),s),c=o[1]=Math.min(Math.max(a,e),l);return Math.sqrt((u-r)*(u-r)+(c-a)*(c-a))}var $0=[];function Yme(n,e,t){var i=uK(e.x,e.y,e.width,e.height,n.x,n.y,$0);return t.set($0[0],$0[1]),i}function Kme(n,e,t){for(var i=0,r=0,a=0,o=0,s,l,u=1/0,c=e.data,d=n.x,h=n.y,f=0;f<c.length;){var p=c[f++];f===1&&(i=c[f],r=c[f+1],a=i,o=r);var m=u;switch(p){case Pf.M:a=c[f++],o=c[f++],i=a,r=o;break;case Pf.L:m=l8(i,r,c[f],c[f+1],d,h,$0,!0),i=c[f++],r=c[f++];break;case Pf.C:m=A$(i,r,c[f++],c[f++],c[f++],c[f++],c[f],c[f+1],d,h,$0),i=c[f++],r=c[f++];break;case Pf.Q:m=M$(i,r,c[f++],c[f++],c[f],c[f+1],d,h,$0),i=c[f++],r=c[f++];break;case Pf.A:var v=c[f++],g=c[f++],_=c[f++],S=c[f++],x=c[f++],A=c[f++];f+=1;var C=!!(1-c[f++]);s=Math.cos(x)*_+v,l=Math.sin(x)*S+g,f<=1&&(a=s,o=l);var M=(d-v)*S/_+v;m=Xme(v,g,S,x,x+A,C,M,h,$0),i=Math.cos(x+A)*_+v,r=Math.sin(x+A)*S+g;break;case Pf.R:a=i=c[f++],o=r=c[f++];var I=c[f++],D=c[f++];m=uK(a,o,I,D,d,h,$0);break;case Pf.Z:m=l8(i,r,a,o,d,h,$0,!0),i=a,r=o;break}m<u&&(u=m,t.set($0[0],$0[1]))}return u}var Z0=new fi,Wr=new fi,Na=new fi,Uu=new fi,Du=new fi;function FF(n,e){if(n){var t=n.getTextGuideLine(),i=n.getTextContent();if(i&&t){var r=n.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=r.candidates||$me,s=i.getBoundingRect().clone();s.applyTransform(i.getComputedTransform());var l=1/0,u=r.anchor,c=n.getComputedTransform(),d=c&&Bv([],c),h=e.get("length2")||0;u&&Na.copy(u);for(var f=0;f<o.length;f++){var p=o[f];qme(p,0,s,Z0,Uu),fi.scaleAndAdd(Wr,Z0,Uu,h),Wr.transform(d);var m=n.getBoundingRect(),v=u?u.distance(Wr):n instanceof Ei?Kme(Wr,n.path,Na):Yme(Wr,m,Na);v<l&&(l=v,Wr.transform(c),Na.transform(c),Na.toArray(a[0]),Wr.toArray(a[1]),Z0.toArray(a[2]))}cK(a,e.get("minTurnAngle")),t.setShape({points:a})}}}var u8=[],Ms=new fi;function cK(n,e){if(e<=180&&e>0){e=e/180*Math.PI,Z0.fromArray(n[0]),Wr.fromArray(n[1]),Na.fromArray(n[2]),fi.sub(Uu,Z0,Wr),fi.sub(Du,Na,Wr);var t=Uu.len(),i=Du.len();if(!(t<.001||i<.001)){Uu.scale(1/t),Du.scale(1/i);var r=Uu.dot(Du),a=Math.cos(e);if(a<r){var o=l8(Wr.x,Wr.y,Na.x,Na.y,Z0.x,Z0.y,u8,!1);Ms.fromArray(u8),Ms.scaleAndAdd(Du,o/Math.tan(Math.PI-e));var s=Na.x!==Wr.x?(Ms.x-Wr.x)/(Na.x-Wr.x):(Ms.y-Wr.y)/(Na.y-Wr.y);if(isNaN(s))return;s<0?fi.copy(Ms,Wr):s>1&&fi.copy(Ms,Na),Ms.toArray(n[1])}}}}function Zme(n,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Z0.fromArray(n[0]),Wr.fromArray(n[1]),Na.fromArray(n[2]),fi.sub(Uu,Wr,Z0),fi.sub(Du,Na,Wr);var i=Uu.len(),r=Du.len();if(!(i<.001||r<.001)){Uu.scale(1/i),Du.scale(1/r);var a=Uu.dot(e),o=Math.cos(t);if(a<o){var s=l8(Wr.x,Wr.y,Na.x,Na.y,Z0.x,Z0.y,u8,!1);Ms.fromArray(u8);var l=Math.PI/2,u=Math.acos(Du.dot(e)),c=l+u-t;if(c>=l)fi.copy(Ms,Na);else{Ms.scaleAndAdd(Du,s/Math.tan(Math.PI/2-c));var d=Na.x!==Wr.x?(Ms.x-Wr.x)/(Na.x-Wr.x):(Ms.y-Wr.y)/(Na.y-Wr.y);if(isNaN(d))return;d<0?fi.copy(Ms,Wr):d>1&&fi.copy(Ms,Na)}Ms.toArray(n[1])}}}}function ax(n,e,t,i){var r=t==="normal",a=r?n:n.ensureState(t);a.ignore=e;var o=i.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=i.getModel("lineStyle").getLineStyle();r?n.useStyle(s):a.style=s}function Jme(n,e){var t=e.smooth,i=e.points;if(i)if(n.moveTo(i[0][0],i[0][1]),t>0&&i.length>=3){var r=eh(i[0],i[1]),a=eh(i[1],i[2]);if(!r||!a){n.lineTo(i[1][0],i[1][1]),n.lineTo(i[2][0],i[2][1]);return}var o=Math.min(r,a)*t,s=Y4([],i[1],i[0],o/r),l=Y4([],i[1],i[2],o/a),u=Y4([],s,l,.5);n.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),n.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c<i.length;c++)n.lineTo(i[c][0],i[c][1])}function KE(n,e,t){var i=n.getTextGuideLine(),r=n.getTextContent();if(!r){i&&n.removeTextGuideLine();return}for(var a=e.normal,o=a.get("show"),s=r.ignore,l=0;l<P9.length;l++){var u=P9[l],c=e[u],d=u==="normal";if(c){var h=c.get("show"),f=d?s:ai(r.states[u]&&r.states[u].ignore,s);if(f||!ai(h,o)){var p=d?i:i&&i.states[u];p&&(p.ignore=!0),i&&ax(i,!0,u,c);continue}i||(i=new hl,n.setTextGuideLine(i),!d&&(s||!o)&&ax(i,!0,"normal",e.normal),n.stateProxy&&(i.stateProxy=n.stateProxy)),ax(i,!1,u,c)}}if(i){qn(i.style,t),i.style.fill=null;var m=a.get("showAbove"),v=n.textGuideLineConfig=n.textGuideLineConfig||{};v.showAbove=m||!1,i.buildPath=Jme}}function ZE(n,e){e=e||"labelLine";for(var t={normal:n.getModel(e)},i=0;i<Is.length;i++){var r=Is[i];t[r]=n.getModel([r,e])}return t}function dK(n){for(var e=[],t=0;t<n.length;t++){var i=n[t];if(!i.defaultAttr.ignore){var r=i.label,a=r.getComputedTransform(),o=r.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,l=r.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 q5(o,a):null;e.push({label:r,labelLine:i.labelLine,rect:u,localRect:o,obb:c,priority:i.priority,defaultAttr:i.defaultAttr,layoutOption:i.computedLayoutOption,axisAligned:s,transform:a})}}return e}function hK(n,e,t,i,r,a){var o=n.length;if(o<2)return;n.sort(function(I,D){return I.rect[e]-D.rect[e]});for(var s=0,l,u=!1,c=0,d=0;d<o;d++){var h=n[d],f=h.rect;l=f[e]-s,l<0&&(f[e]-=l,h.label[e]-=l,u=!0);var p=Math.max(-l,0);c+=p,s=f[e]+f[t]}c>0&&a&&A(-c/o,0,o);var m=n[0],v=n[o-1],g,_;S(),g<0&&C(-g,.8),_<0&&C(_,.8),S(),x(g,_,1),x(_,g,-1),S(),g<0&&M(-g),_<0&&M(_);function S(){g=m.rect[e]-i,_=r-v.rect[e]-v.rect[t]}function x(I,D,E){if(I<0){var P=Math.min(D,-I);if(P>0){A(P*E,0,o);var F=P+I;F<0&&C(-F*E,1)}else C(-I*E,1)}}function A(I,D,E){I!==0&&(u=!0);for(var P=D;P<E;P++){var F=n[P],V=F.rect;V[e]+=I,F.label[e]+=I}}function C(I,D){for(var E=[],P=0,F=1;F<o;F++){var V=n[F-1].rect,G=Math.max(n[F].rect[e]-V[e]-V[t],0);E.push(G),P+=G}if(P){var W=Math.min(Math.abs(I)/P,D);if(I>0)for(var F=0;F<o-1;F++){var Y=E[F]*W;A(Y,0,F+1)}else for(var F=o-1;F>0;F--){var Y=E[F-1]*W;A(-Y,F,o)}}}function M(I){var D=I<0?-1:1;I=Math.abs(I);for(var E=Math.ceil(I/(o-1)),P=0;P<o-1;P++)if(D>0?A(E,0,P+1):A(-E,o-P-1,o),I-=E,I<=0)return}return u}function Qme(n,e,t,i){return hK(n,"x","width",e,t,i)}function fK(n,e,t,i){return hK(n,"y","height",e,t,i)}function pK(n){var e=[];n.sort(function(m,v){return v.priority-m.priority});var t=new gi(0,0,0,0);function i(m){if(!m.ignore){var v=m.ensureState("emphasis");v.ignore==null&&(v.ignore=!1)}m.ignore=!0}for(var r=0;r<n.length;r++){var a=n[r],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 d=a.obb,h=!1,f=0;f<e.length;f++){var p=e[f];if(t.intersect(p.rect)){if(o&&p.axisAligned){h=!0;break}if(p.obb||(p.obb=new q5(p.localRect,p.transform)),d||(d=new q5(s,l)),d.intersect(p.obb)){h=!0;break}}}h?(i(u),c&&i(c)):(u.attr("ignore",a.defaultAttr.ignore),c&&c.attr("ignore",a.defaultAttr.labelGuideIgnore),e.push(a))}}function ege(n){if(n){for(var e=[],t=0;t<n.length;t++)e.push(n[t].slice());return e}}function tge(n,e){var t=n.label,i=e&&e.getTextGuideLine();return{dataIndex:n.dataIndex,dataType:n.dataType,seriesIndex:n.seriesModel.seriesIndex,text:n.label.style.text,rect:n.hostRect,labelRect:n.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:ege(i&&i.shape.points)}}var OF=["align","verticalAlign","width","height","fontSize"],bs=new Dc,ox=Gi(),nge=Gi();function f6(n,e,t){for(var i=0;i<t.length;i++){var r=t[i];e[r]!=null&&(n[r]=e[r])}}var p6=["x","y","rotation"],ige=function(){function n(){this._labelList=[],this._chartViewList=[]}return n.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},n.prototype._addLabel=function(e,t,i,r,a){var o=r.style,s=r.__hostTarget,l=s.textConfig||{},u=r.getComputedTransform(),c=r.getBoundingRect().plain();gi.applyTransform(c,c,u),u?bs.setLocalTransform(u):(bs.x=bs.y=bs.rotation=bs.originX=bs.originY=0,bs.scaleX=bs.scaleY=1),bs.rotation=Ll(bs.rotation);var d=r.__hostTarget,h;if(d){h=d.getBoundingRect().plain();var f=d.getComputedTransform();gi.applyTransform(h,h,f)}var p=h&&d.getTextGuideLine();this._labelList.push({label:r,labelLine:p,seriesModel:i,dataIndex:e,dataType:t,layoutOption:a,computedLayoutOption:null,rect:c,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:r.ignore,labelGuideIgnore:p&&p.ignore,x:bs.x,y:bs.y,scaleX:bs.scaleX,scaleY:bs.scaleY,rotation:bs.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:r.cursor,attachedPos:l.position,attachedRot:l.rotation}})},n.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var i=e.__model,r=i.get("labelLayout");($n(r)||Li(r).length)&&e.group.traverse(function(a){if(a.ignore)return!0;var o=a.getTextContent(),s=ni(a);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,i,o,r)})},n.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),i=e.getHeight();function r(S,x){return function(){FF(S,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;$n(o.layoutOption)?c=o.layoutOption(tge(o,l)):c=o.layoutOption,c=c||{},o.computedLayoutOption=c;var d=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*d:u.attachedRot,offset:[c.dx||0,c.dy||0]});var h=!1;if(c.x!=null?(s.x=_n(c.x,t),s.setStyle("x",0),h=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=_n(c.y,i),s.setStyle("y",0),h=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var f=l.getTextGuideLine();f&&(f.setShape({points:c.labelLinePoints}),h=!1)}var p=ox(s);p.needsUpdateLabelLine=h,s.rotation=c.rotate!=null?c.rotate*d:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var m=0;m<OF.length;m++){var v=OF[m];s.setStyle(v,c[v]!=null?c[v]:u.style[v])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var g=o.seriesModel;if(o.dataIndex!=null){var _=o.seriesModel.getData(o.dataType);g=_.getItemModel(o.dataIndex)}s.on("drag",r(l,g.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},n.prototype.layout=function(e){var t=e.getWidth(),i=e.getHeight(),r=dK(this._labelList),a=dr(r,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=dr(r,function(l){return l.layoutOption.moveOverlap==="shiftY"});Qme(a,0,t),fK(o,0,i);var s=dr(r,function(l){return l.layoutOption.hideOverlap});pK(s)},n.prototype.processLabelsOverall=function(){var e=this;ne(this._chartViewList,function(t){var i=t.__model,r=t.ignoreLabelLineUpdate,a=i.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!r,l=o.getTextContent();!s&&l&&(s=ox(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,i),a&&e._animateLabels(o,i)})})},n.prototype._updateLabelLine=function(e,t){var i=e.getTextContent(),r=ni(e),a=r.dataIndex;if(i&&a!=null){var o=t.getData(r.dataType),s=o.getItemModel(a),l={},u=o.getItemVisual(a,"style");if(u){var c=o.getVisual("drawType");l.stroke=u[c]}var d=s.getModel("labelLine");KE(e,ZE(s),l),FF(e,d)}},n.prototype._animateLabels=function(e,t){var i=e.getTextContent(),r=e.getTextGuideLine();if(i&&(e.forceLabelAnimation||!i.ignore&&!i.invisible&&!e.disableLabelAnimation&&!X2(e))){var a=ox(i),o=a.oldLayout,s=ni(e),l=s.dataIndex,u={x:i.x,y:i.y,rotation:i.rotation},c=t.getData(s.dataType);if(o){i.attr(o);var h=e.prevStates;h&&(xi(h,"select")>=0&&i.attr(a.oldLayoutSelect),xi(h,"emphasis")>=0&&i.attr(a.oldLayoutEmphasis)),Qi(i,u,t,l)}else if(i.attr(u),!Vv(i).valueAnimation){var d=ai(i.style.opacity,1);i.style.opacity=0,sa(i,{style:{opacity:d}},t,l)}if(a.oldLayout=u,i.states.select){var f=a.oldLayoutSelect={};f6(f,u,p6),f6(f,i.states.select,p6)}if(i.states.emphasis){var p=a.oldLayoutEmphasis={};f6(p,u,p6),f6(p,i.states.emphasis,p6)}Qq(i,l,c,t,t)}if(r&&!r.ignore&&!r.invisible){var a=nge(r),o=a.oldLayout,m={points:r.shape.points};o?(r.attr({shape:o}),Qi(r,{shape:m},t)):(r.setShape(m),r.style.strokePercent=0,sa(r,{style:{strokePercent:1}},t)),a.oldLayout=m}},n}();const rge=ige;var sx=Gi();function age(n){n.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){var r=sx(t).labelManager;r||(r=sx(t).labelManager=new rge),r.clearLabels()}),n.registerUpdateLifecycle("series:layoutlabels",function(e,t,i){var r=sx(t).labelManager;i.updatedSeries.forEach(function(a){r.addLabelsOfSeries(t.getViewOfSeriesModel(a))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}var lx=Math.sin,ux=Math.cos,vK=Math.PI,Rf=Math.PI*2,oge=180/vK,sge=function(){function n(){}return n.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},n.prototype.moveTo=function(e,t){this._add("M",e,t)},n.prototype.lineTo=function(e,t){this._add("L",e,t)},n.prototype.bezierCurveTo=function(e,t,i,r,a,o){this._add("C",e,t,i,r,a,o)},n.prototype.quadraticCurveTo=function(e,t,i,r){this._add("Q",e,t,i,r)},n.prototype.arc=function(e,t,i,r,a,o){this.ellipse(e,t,i,i,0,r,a,o)},n.prototype.ellipse=function(e,t,i,r,a,o,s,l){var u=s-o,c=!l,d=Math.abs(u),h=ah(d-Rf)||(c?u>=Rf:-u>=Rf),f=u>0?u%Rf:u%Rf+Rf,p=!1;h?p=!0:ah(d)?p=!1:p=f>=vK==!!c;var m=e+i*ux(o),v=t+r*lx(o);this._start&&this._add("M",m,v);var g=Math.round(a*oge);if(h){var _=1/this._p,S=(c?1:-1)*(Rf-_);this._add("A",i,r,g,1,+c,e+i*ux(o+S),t+r*lx(o+S)),_>.01&&this._add("A",i,r,g,0,+c,m,v)}else{var x=e+i*ux(s),A=t+r*lx(s);this._add("A",i,r,g,+p,+c,x,A)}},n.prototype.rect=function(e,t,i,r){this._add("M",e,t),this._add("l",i,0),this._add("l",0,r),this._add("l",-i,0),this._add("Z")},n.prototype.closePath=function(){this._d.length>0&&this._add("Z")},n.prototype._add=function(e,t,i,r,a,o,s,l,u){for(var c=[],d=this._p,h=1;h<arguments.length;h++){var f=arguments[h];if(isNaN(f)){this._invalid=!0;return}c.push(Math.round(f*d)/d)}this._d.push(e+c.join(" ")),this._start=e==="Z"},n.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},n.prototype.getStr=function(){return this._str},n}();const mK=sge;var Jg="none",lge=Math.round;function uge(n){var e=n.fill;return e!=null&&e!==Jg}function cge(n){var e=n.stroke;return e!=null&&e!==Jg}var qA=["lineCap","miterLimit","lineJoin"],dge=Xt(qA,function(n){return"stroke-"+n.toLowerCase()});function hge(n,e,t,i){var r=e.opacity==null?1:e.opacity;if(t instanceof qo){n("opacity",r);return}if(uge(e)){var a=A9(e.fill);n("fill",a.color);var o=e.fillOpacity!=null?e.fillOpacity*a.opacity*r:a.opacity*r;(i||o<1)&&n("fill-opacity",o)}else n("fill",Jg);if(cge(e)){var s=A9(e.stroke);n("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*r:s.opacity*r,d=e.strokeFirst;if((i||u!==1)&&n("stroke-width",u),(i||d)&&n("paint-order",d?"stroke":"fill"),(i||c<1)&&n("stroke-opacity",c),e.lineDash){var h=BE(t),f=h[0],p=h[1];f&&(p=lge(p||0),n("stroke-dasharray",f.join(",")),(p||i)&&n("stroke-dashoffset",p))}else i&&n("stroke-dasharray",Jg);for(var m=0;m<qA.length;m++){var v=qA[m];if(i||e[v]!==j5[v]){var g=e[v]||j5[v];g&&n(dge[m],g)}}}else i&&n("stroke",Jg)}var gK="http://www.w3.org/2000/svg",yK="http://www.w3.org/1999/xlink",fge="http://www.w3.org/2000/xmlns/",pge="http://www.w3.org/XML/1998/namespace",BF="ecmeta_";function _K(n){return document.createElementNS(gK,n)}function go(n,e,t,i,r){return{tag:n,attrs:t||{},children:i,text:r,key:e}}function vge(n,e){var t=[];if(e)for(var i in e){var r=e[i],a=i;r!==!1&&(r!==!0&&r!=null&&(a+='="'+r+'"'),t.push(a))}return"<"+n+" "+t.join(" ")+">"}function mge(n){return"</"+n+">"}function JE(n,e){e=e||{};var t=e.newline?`
`:"";function i(r){var a=r.children,o=r.tag,s=r.attrs,l=r.text;return vge(o,s)+(o!=="style"?os(l):l||"")+(a?""+t+Xt(a,function(u){return i(u)}).join(t)+t:"")+mge(o)}return i(n)}function gge(n,e,t){t=t||{};var i=t.newline?`
`:"",r=" {"+i,a=i+"}",o=Xt(Li(n),function(l){return l+r+Xt(Li(n[l]),function(u){return u+":"+n[l][u]+";"}).join(i)+a}).join(i),s=Xt(Li(e),function(l){return"@keyframes "+l+r+Xt(Li(e[l]),function(u){return u+r+Xt(Li(e[l][u]),function(c){var d=e[l][u][c];return c==="d"&&(d='path("'+d+'")'),c+":"+d+";"}).join(i)+a}).join(i)+a}).join(i);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(i)}function XA(n){return{zrId:n,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function zF(n,e,t,i){return go("svg","root",{width:n,height:e,xmlns:gK,"xmlns:xlink":yK,version:"1.1",baseProfile:"full",viewBox:i?"0 0 "+n+" "+e:!1},t)}var yge=0;function SK(){return yge++}var GF={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"},Uf="transform-origin";function _ge(n,e,t){var i=It({},n.shape);It(i,e),n.buildPath(t,i);var r=new mK;return r.reset(N$(n)),t.rebuildPath(r,1),r.generateStr(),r.getStr()}function Sge(n,e){var t=e.originX,i=e.originY;(t||i)&&(n[Uf]=t+"px "+i+"px")}var bge={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function bK(n,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=n,t}function xge(n,e,t){var i=n.shape.paths,r={},a,o;if(ne(i,function(l){var u=XA(t.zrId);u.animation=!0,X_(l,{},u,!0);var c=u.cssAnims,d=u.cssNodes,h=Li(c),f=h.length;if(f){o=h[f-1];var p=c[o];for(var m in p){var v=p[m];r[m]=r[m]||{d:""},r[m].d+=v.d||""}for(var g in d){var _=d[g].animation;_.indexOf(o)>=0&&(a=_)}}}),!!a){e.d=!1;var s=bK(r,t);return a.replace(o,s)}}function UF(n){return xn(n)?GF[n]?"cubic-bezier("+GF[n]+")":eE(n)?n:"":""}function X_(n,e,t,i){var r=n.animators,a=r.length,o=[];if(n instanceof yE){var s=xge(n,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=r[u],d=[c.getMaxTime()/1e3+"s"],h=UF(c.getClip().easing),f=c.getDelay();h?d.push(h):d.push("linear"),f&&d.push(f/1e3+"s"),c.getLoop()&&d.push("infinite");var p=d.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(c)}function m(_){var S=_[1],x=S.length,A={},C={},M={},I="animation-timing-function";function D(bt,ht,Kt){for(var Tt=bt.getTracks(),Ae=bt.getMaxTime(),Lt=0;Lt<Tt.length;Lt++){var vt=Tt[Lt];if(vt.needsAnimate()){var Ft=vt.keyframes,k=vt.propName;if(Kt&&(k=Kt(k)),k)for(var _t=0;_t<Ft.length;_t++){var Ct=Ft[_t],J=Math.round(Ct.time/Ae*100)+"%",ee=UF(Ct.easing),Ue=Ct.rawValue;(xn(Ue)||Yi(Ue))&&(ht[J]=ht[J]||{},ht[J][k]=Ct.rawValue,ee&&(ht[J][I]=ee))}}}}for(var E=0;E<x;E++){var P=S[E],F=P.targetName;F?F==="shape"&&D(P,C):!i&&D(P,A)}for(var V in A){var G={};z$(G,n),It(G,A[V]);var W=k$(G),Y=A[V][I];M[V]=W?{transform:W}:{},Sge(M[V],G),Y&&(M[V][I]=Y)}var Q,K=!0;for(var V in C){M[V]=M[V]||{};var ae=!Q,Y=C[V][I];ae&&(Q=new Qu);var ie=Q.len();Q.reset(),M[V].d=_ge(n,C[V],Q);var he=Q.len();if(!ae&&ie!==he){K=!1;break}Y&&(M[V][I]=Y)}if(!K)for(var V in M)delete M[V].d;if(!i)for(var E=0;E<x;E++){var P=S[E],F=P.targetName;F==="style"&&D(P,M,function(Tt){return bge[Tt]})}for(var Ee=Li(M),He=!0,xe,E=1;E<Ee.length;E++){var Fe=Ee[E-1],pt=Ee[E];if(M[Fe][Uf]!==M[pt][Uf]){He=!1;break}xe=M[Fe][Uf]}if(He&&xe){for(var V in M)M[V][Uf]&&delete M[V][Uf];e[Uf]=xe}if(dr(Ee,function(bt){return Li(M[bt]).length>0}).length){var Ot=bK(M,t);return Ot+" "+_[0]+" both"}}for(var v in l){var s=m(l[v]);s&&o.push(s)}if(o.length){var g=t.zrId+"-cls-"+SK();t.cssNodes["."+g]={animation:o.join(",")},e.class=g}}function wge(n,e,t){if(!n.ignore)if(n.isSilent()){var i={"pointer-events":"none"};VF(i,e,t,!0)}else{var r=n.states.emphasis&&n.states.emphasis.style?n.states.emphasis.style:{},a=r.fill;if(!a){var o=n.style&&n.style.fill,s=n.states.select&&n.states.select.style&&n.states.select.style.fill,l=n.currentStates.indexOf("select")>=0&&s||o;l&&(a=oA(l))}var u=r.lineWidth;if(u){var c=!r.strokeNoScale&&n.transform?n.transform[0]:1;u=u/c}var i={cursor:"pointer"};a&&(i.fill=a),r.stroke&&(i.stroke=r.stroke),u&&(i["stroke-width"]=u),VF(i,e,t,!0)}}function VF(n,e,t,i){var r=JSON.stringify(n),a=t.cssStyleCache[r];a||(a=t.zrId+"-cls-"+SK(),t.cssStyleCache[r]=a,t.cssNodes["."+a+(i?":hover":"")]=n),e.class=e.class?e.class+" "+a:a}var z9=Math.round;function xK(n){return n&&xn(n.src)}function wK(n){return n&&$n(n.toDataURL)}function QE(n,e,t,i){hge(function(r,a){var o=r==="fill"||r==="stroke";o&&D$(a)?AK(e,n,r,i):o&&tE(a)?CK(t,n,r,i):n[r]=a,o&&i.ssr&&a==="none"&&(n["pointer-events"]="visible")},e,t,!1),Rge(t,n,i)}function eP(n,e){var t=Kde(e);t&&(t.each(function(i,r){i!=null&&(n[(BF+r).toLowerCase()]=i+"")}),e.isSilent()&&(n[BF+"silent"]="true"))}function HF(n){return ah(n[0]-1)&&ah(n[1])&&ah(n[2])&&ah(n[3]-1)}function Tge(n){return ah(n[4])&&ah(n[5])}function tP(n,e,t){if(e&&!(Tge(e)&&HF(e))){var i=t?10:1e4;n.transform=HF(e)?"translate("+z9(e[4]*i)/i+" "+z9(e[5]*i)/i+")":mde(e)}}function WF(n,e,t){for(var i=n.points,r=[],a=0;a<i.length;a++)r.push(z9(i[a][0]*t)/t),r.push(z9(i[a][1]*t)/t);e.points=r.join(" ")}function jF(n){return!n.smooth}function Age(n){var e=Xt(n,function(t){return typeof t=="string"?[t,t]:t});return function(t,i,r){for(var a=0;a<e.length;a++){var o=e[a],s=t[o[0]];s!=null&&(i[o[1]]=z9(s*r)/r)}}}var Cge={circle:[Age(["cx","cy","r"])],polyline:[WF,jF],polygon:[WF,jF]};function Mge(n){for(var e=n.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function TK(n,e){var t=n.style,i=n.shape,r=Cge[n.type],a={},o=e.animation,s="path",l=n.style.strokePercent,u=e.compress&&N$(n)||4;if(r&&!e.willUpdate&&!(r[1]&&!r[1](i))&&!(o&&Mge(n))&&!(l<1)){s=n.type;var c=Math.pow(10,u);r[0](i,a,c)}else{var d=!n.path||n.shapeChanged();n.path||n.createPathProxy();var h=n.path;d&&(h.beginPath(),n.buildPath(h,n.shape),n.pathUpdated());var f=h.getVersion(),p=n,m=p.__svgPathBuilder;(p.__svgPathVersion!==f||!m||l!==p.__svgPathStrokePercent)&&(m||(m=p.__svgPathBuilder=new mK),m.reset(u),h.rebuildPath(m,l),m.generateStr(),p.__svgPathVersion=f,p.__svgPathStrokePercent=l),a.d=m.getStr()}return tP(a,n.transform),QE(a,t,n,e),eP(a,n),e.animation&&X_(n,a,e),e.emphasis&&wge(n,a,e),go(s,n.id+"",a)}function Ege(n,e){var t=n.style,i=t.image;if(i&&!xn(i)&&(xK(i)?i=i.src:wK(i)&&(i=i.toDataURL())),!!i){var r=t.x||0,a=t.y||0,o=t.width,s=t.height,l={href:i,width:o,height:s};return r&&(l.x=r),a&&(l.y=a),tP(l,n.transform),QE(l,t,n,e),eP(l,n),e.animation&&X_(n,l,e),go("image",n.id+"",l)}}function Pge(n,e){var t=n.style,i=t.text;if(i!=null&&(i+=""),!(!i||isNaN(t.x)||isNaN(t.y))){var r=t.font||Ch,a=t.x||0,o=yde(t.y||0,S_(r),t.textBaseline),s=gde[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(gq(t)){var u="",c=t.fontStyle,d=mq(t.fontSize);if(!parseFloat(d))return;var h=t.fontFamily||l$,f=t.fontWeight;u+="font-size:"+d+";font-family:"+h+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),f&&f!=="normal"&&(u+="font-weight:"+f+";"),l.style=u}else l.style="font: "+r;return i.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),o&&(l.y=o),tP(l,n.transform),QE(l,t,n,e),eP(l,n),e.animation&&X_(n,l,e),go("text",n.id+"",l,void 0,i)}}function $F(n,e){if(n instanceof Ei)return TK(n,e);if(n instanceof qo)return Ege(n,e);if(n instanceof E9)return Pge(n,e)}function Rge(n,e,t){var i=n.style;if(_de(i)){var r=Sde(n),a=t.shadowCache,o=a[r];if(!o){var s=n.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=i.shadowOffsetX||0,d=i.shadowOffsetY||0,h=i.shadowBlur,f=A9(i.shadowColor),p=f.opacity,m=f.color,v=h/2/l,g=h/2/u,_=v+" "+g;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=go("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[go("feDropShadow","",{dx:c/l,dy:d/u,stdDeviation:_,"flood-color":m,"flood-opacity":p})]),a[r]=o}e.filter=__(o)}}function AK(n,e,t,i){var r=n[t],a,o={gradientUnits:r.global?"userSpaceOnUse":"objectBoundingBox"};if(L$(r))a="linearGradient",o.x1=r.x,o.y1=r.y,o.x2=r.x2,o.y2=r.y2;else if(I$(r))a="radialGradient",o.cx=ai(r.x,.5),o.cy=ai(r.y,.5),o.r=ai(r.r,.5);else return;for(var s=r.colorStops,l=[],u=0,c=s.length;u<c;++u){var d=sA(s[u].offset)*100+"%",h=s[u].color,f=A9(h),p=f.color,m=f.opacity,v={offset:d};v["stop-color"]=p,m<1&&(v["stop-opacity"]=m),l.push(go("stop",u+"",v))}var g=go(a,"",o,l),_=JE(g),S=i.gradientCache,x=S[_];x||(x=i.zrId+"-g"+i.gradientIdx++,S[_]=x,o.id=x,i.defs[x]=go(a,x,o,l)),e[t]=__(x)}function CK(n,e,t,i){var r=n.style[t],a=n.getBoundingRect(),o={},s=r.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",d;if(R$(r)){var h=r.imageWidth,f=r.imageHeight,p=void 0,m=r.image;if(xn(m)?p=m:xK(m)?p=m.src:wK(m)&&(p=m.toDataURL()),typeof Image=="undefined"){var v="Image width/height must been given explictly in svg-ssr renderer.";Ls(h,v),Ls(f,v)}else if(h==null||f==null){var g=function(E,P){if(E){var F=E.elm,V=h||P.width,G=f||P.height;E.tag==="pattern"&&(u?(G=1,V/=a.width):c&&(V=1,G/=a.height)),E.attrs.width=V,E.attrs.height=G,F&&(F.setAttribute("width",V),F.setAttribute("height",G))}},_=lE(p,null,n,function(E){l||g(C,E),g(d,E)});_&&_.width&&_.height&&(h=h||_.width,f=f||_.height)}d=go("image","img",{href:p,width:h,height:f}),o.width=h,o.height=f}else r.svgElement&&(d=Zn(r.svgElement),o.width=r.svgWidth,o.height=r.svgHeight);if(d){var S,x;l?S=x=1:u?(x=1,S=o.width/a.width):c?(S=1,x=o.height/a.height):o.patternUnits="userSpaceOnUse",S!=null&&!isNaN(S)&&(o.width=S),x!=null&&!isNaN(x)&&(o.height=x);var A=k$(r);A&&(o.patternTransform=A);var C=go("pattern","",o,[d]),M=JE(C),I=i.patternCache,D=I[M];D||(D=i.zrId+"-p"+i.patternIdx++,I[M]=D,o.id=D,C=i.defs[D]=go("pattern",D,o,[d])),e[t]=__(D)}}function Lge(n,e,t){var i=t.clipPathCache,r=t.defs,a=i[n.id];if(!a){a=t.zrId+"-c"+t.clipPathIdx++;var o={id:a};i[n.id]=a,r[a]=go("clipPath",a,o,[TK(n,t)])}e["clip-path"]=__(a)}function qF(n){return document.createTextNode(n)}function Jf(n,e,t){n.insertBefore(e,t)}function XF(n,e){n.removeChild(e)}function YF(n,e){n.appendChild(e)}function MK(n){return n.parentNode}function EK(n){return n.nextSibling}function cx(n,e){n.textContent=e}var KF=58,Ige=120,Dge=go("","");function YA(n){return n===void 0}function Pu(n){return n!==void 0}function Nge(n,e,t){for(var i={},r=e;r<=t;++r){var a=n[r].key;a!==void 0&&(i[a]=r)}return i}function Ag(n,e){var t=n.key===e.key,i=n.tag===e.tag;return i&&t}function G9(n){var e,t=n.children,i=n.tag;if(Pu(i)){var r=n.elm=_K(i);if(nP(Dge,n),$t(t))for(e=0;e<t.length;++e){var a=t[e];a!=null&&YF(r,G9(a))}else Pu(n.text)&&!Kn(n.text)&&YF(r,qF(n.text))}else n.elm=qF(n.text);return n.elm}function PK(n,e,t,i,r){for(;i<=r;++i){var a=t[i];a!=null&&Jf(n,G9(a),e)}}function c8(n,e,t,i){for(;t<=i;++t){var r=e[t];if(r!=null)if(Pu(r.tag)){var a=MK(r.elm);XF(a,r.elm)}else XF(n,r.elm)}}function nP(n,e){var t,i=e.elm,r=n&&n.attrs||{},a=e.attrs||{};if(r!==a){for(t in a){var o=a[t],s=r[t];s!==o&&(o===!0?i.setAttribute(t,""):o===!1?i.removeAttribute(t):t==="style"?i.style.cssText=o:t.charCodeAt(0)!==Ige?i.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?i.setAttributeNS(fge,t,o):t.charCodeAt(3)===KF?i.setAttributeNS(pge,t,o):t.charCodeAt(5)===KF?i.setAttributeNS(yK,t,o):i.setAttribute(t,o))}for(t in r)t in a||i.removeAttribute(t)}}function kge(n,e,t){for(var i=0,r=0,a=e.length-1,o=e[0],s=e[a],l=t.length-1,u=t[0],c=t[l],d,h,f,p;i<=a&&r<=l;)o==null?o=e[++i]:s==null?s=e[--a]:u==null?u=t[++r]:c==null?c=t[--l]:Ag(o,u)?(S2(o,u),o=e[++i],u=t[++r]):Ag(s,c)?(S2(s,c),s=e[--a],c=t[--l]):Ag(o,c)?(S2(o,c),Jf(n,o.elm,EK(s.elm)),o=e[++i],c=t[--l]):Ag(s,u)?(S2(s,u),Jf(n,s.elm,o.elm),s=e[--a],u=t[++r]):(YA(d)&&(d=Nge(e,i,a)),h=d[u.key],YA(h)?Jf(n,G9(u),o.elm):(f=e[h],f.tag!==u.tag?Jf(n,G9(u),o.elm):(S2(f,u),e[h]=void 0,Jf(n,f.elm,o.elm))),u=t[++r]);(i<=a||r<=l)&&(i>a?(p=t[l+1]==null?null:t[l+1].elm,PK(n,p,t,r,l)):c8(n,e,i,a))}function S2(n,e){var t=e.elm=n.elm,i=n.children,r=e.children;n!==e&&(nP(n,e),YA(e.text)?Pu(i)&&Pu(r)?i!==r&&kge(t,i,r):Pu(r)?(Pu(n.text)&&cx(t,""),PK(t,null,r,0,r.length-1)):Pu(i)?c8(t,i,0,i.length-1):Pu(n.text)&&cx(t,""):n.text!==e.text&&(Pu(i)&&c8(t,i,0,i.length-1),cx(t,e.text)))}function Fge(n,e){if(Ag(n,e))S2(n,e);else{var t=n.elm,i=MK(t);G9(e),i!==null&&(Jf(i,e.elm,EK(t)),c8(i,[n],0,0))}return e}var Oge=0,Bge=function(){function n(e,t,i){if(this.type="svg",this.refreshHover=ZF(),this.configLayer=ZF(),this.storage=t,this._opts=i=It({},i),this.root=e,this._id="zr"+Oge++,this._oldVNode=zF(i.width,i.height),e&&!i.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=_K("svg");nP(null,this._oldVNode),r.appendChild(a),e.appendChild(r)}this.resize(i.width,i.height)}return n.prototype.getType=function(){return this.type},n.prototype.getViewportRoot=function(){return this._viewport},n.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},n.prototype.getSvgDom=function(){return this._svgDom},n.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",Fge(this._oldVNode,e),this._oldVNode=e}},n.prototype.renderOneToVNode=function(e){return $F(e,XA(this._id))},n.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),i=this._width,r=this._height,a=XA(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=zge(i,r,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=go("g","main",{},[]);this._paintList(t,a,l?l.children:o),l&&o.push(l);var u=Xt(Li(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(go("defs","defs",{},u)),e.animation){var c=gge(a.cssNodes,a.cssAnims,{newline:!0});if(c){var d=go("style","stl",{},[],c);o.push(d)}}return zF(i,r,o,e.useViewBox)},n.prototype.renderToString=function(e){return e=e||{},JE(this.renderToVNode({animation:ai(e.cssAnimation,!0),emphasis:ai(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:ai(e.useViewBox,!0)}),{newline:!0})},n.prototype.setBackgroundColor=function(e){this._backgroundColor=e},n.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},n.prototype._paintList=function(e,t,i){for(var r=e.length,a=[],o=0,s,l,u=0,c=0;c<r;c++){var d=e[c];if(!d.invisible){var h=d.__clipPaths,f=h&&h.length||0,p=l&&l.length||0,m=void 0;for(m=Math.max(f-1,p-1);m>=0&&!(h&&l&&h[m]===l[m]);m--);for(var v=p-1;v>m;v--)o--,s=a[o-1];for(var g=m+1;g<f;g++){var _={};Lge(h[g],_,t);var S=go("g","clip-g-"+u++,_,[]);(s?s.children:i).push(S),a[o++]=S,s=S}l=h;var x=$F(d,t);x&&(s?s.children:i).push(x)}}},n.prototype.resize=function(e,t){var i=this._opts,r=this.root,a=this._viewport;if(e!=null&&(i.width=e),t!=null&&(i.height=t),r&&a&&(a.style.display="none",e=I2(r,0,i),t=I2(r,1,i),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(tE(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))}}},n.prototype.getWidth=function(){return this._width},n.prototype.getHeight=function(){return this._height},n.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},n.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},n.prototype.toDataURL=function(e){var t=this.renderToString(),i="data:image/svg+xml;";return e?(t=xde(t),t&&i+"base64,"+t):i+"charset=UTF-8,"+encodeURIComponent(t)},n}();function ZF(n){return function(){}}function zge(n,e,t,i){var r;if(t&&t!=="none")if(r=go("rect","bg",{width:n,height:e,x:"0",y:"0"}),D$(t))AK({fill:t},r.attrs,"fill",i);else if(tE(t))CK({style:{fill:t},dirty:Ba,getBoundingRect:function(){return{width:n,height:e}}},r.attrs,"fill",i);else{var a=A9(t),o=a.color,s=a.opacity;r.attrs.fill=o,s<1&&(r.attrs["fill-opacity"]=s)}return r}const Gge=Bge;function Uge(n){n.registerPainter("svg",Gge)}function JF(n,e,t){var i=Mh.createCanvas(),r=e.getWidth(),a=e.getHeight(),o=i.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=r+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",n)),i.width=r*t,i.height=a*t,i}var Vge=function(n){ot(e,n);function e(t,i,r){var a=n.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;r=r||H5,typeof t=="string"?o=JF(t,i,r):Kn(t)&&(o=t,t=o.id),a.id=t,a.dom=o;var s=o.style;return s&&(p$(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=i,a.dpr=r,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=JF("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,i,r,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new gi(0,0,0,0);function c(_){if(!(!_.isFinite()||_.isZero()))if(o.length===0){var S=new gi(0,0,0,0);S.copy(_),o.push(S)}else{for(var x=!1,A=1/0,C=0,M=0;M<o.length;++M){var I=o[M];if(I.intersect(_)){var D=new gi(0,0,0,0);D.copy(I),D.union(_),o[M]=D,x=!0;break}else if(l){u.copy(_),u.union(I);var E=_.width*_.height,P=I.width*I.height,F=u.width*u.height,V=F-E-P;V<A&&(A=V,C=M)}}if(l&&(o[C].union(_),x=!0),!x){var S=new gi(0,0,0,0);S.copy(_),o.push(S)}l||(l=o.length>=s)}}for(var d=this.__startIndex;d<this.__endIndex;++d){var h=t[d];if(h){var f=h.shouldBePainted(r,a,!0,!0),p=h.__isRendered&&(h.__dirty&El||!f)?h.getPrevPaintRect():null;p&&c(p);var m=f&&(h.__dirty&El||!h.__isRendered)?h.getPaintRect():null;m&&c(m)}}for(var d=this.__prevStartIndex;d<this.__prevEndIndex;++d){var h=i[d],f=h&&h.shouldBePainted(r,a,!0,!0);if(h&&(!f||!h.__zr)&&h.__isRendered){var p=h.getPrevPaintRect();p&&c(p)}}var v;do{v=!1;for(var d=0;d<o.length;){if(o[d].isZero()){o.splice(d,1);continue}for(var g=d+1;g<o.length;)o[d].intersect(o[g])?(v=!0,o[d].union(o[g]),o.splice(g,1)):g++;d++}}while(v);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,i){var r=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=t+"px",o.height=i+"px"),a.width=t*r,a.height=i*r,s&&(s.width=t*r,s.height=i*r,r!==1&&this.ctxBack.scale(r,r))},e.prototype.clear=function(t,i,r){var a=this.dom,o=this.ctx,s=a.width,l=a.height;i=i||this.clearColor;var u=this.motionBlur&&!t,c=this.lastFrameAlpha,d=this.dpr,h=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/d,l/d));var f=this.domBack;function p(m,v,g,_){if(o.clearRect(m,v,g,_),i&&i!=="transparent"){var S=void 0;if(m_(i)){var x=i.global||i.__width===g&&i.__height===_;S=x&&i.__canvasGradient||zA(o,i,{x:0,y:0,width:g,height:_}),i.__canvasGradient=S,i.__width=g,i.__height=_}else xce(i)&&(i.scaleX=i.scaleX||d,i.scaleY=i.scaleY||d,S=GA(o,i,{dirty:function(){h.setUnpainted(),h.painter.refresh()}}));o.save(),o.fillStyle=S||i,o.fillRect(m,v,g,_),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(f,m,v,g,_),o.restore())}!r||u?p(0,0,s,l):r.length&&ne(r,function(m){p(m.x*d,m.y*d,m.width*d,m.height*d)})},e}(P0);const dx=Vge;var QF=1e5,Lf=314159,v6=.01,Hge=.001;function Wge(n){return n?n.__builtin__?!0:!(typeof n.resize!="function"||typeof n.refresh!="function"):!1}function jge(n,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+n+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var $ge=function(){function n(e,t,i,r){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=i=It({},i||{}),this.dpr=i.devicePixelRatio||H5,this._singleCanvas=a,this.root=e;var o=e.style;o&&(p$(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var c=e,d=c.width,h=c.height;i.width!=null&&(d=i.width),i.height!=null&&(h=i.height),this.dpr=i.devicePixelRatio||1,c.width=d*this.dpr,c.height=h*this.dpr,this._width=d,this._height=h;var f=new dx(c,this,this.dpr);f.__builtin__=!0,f.initContext(),l[Lf]=f,f.zlevel=Lf,s.push(Lf),this._domRoot=e}else{this._width=I2(e,0,i),this._height=I2(e,1,i);var u=this._domRoot=jge(this._width,this._height);e.appendChild(u)}}return n.prototype.getType=function(){return"canvas"},n.prototype.isSingleCanvas=function(){return this._singleCanvas},n.prototype.getViewportRoot=function(){return this._domRoot},n.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},n.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),i=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,i,e,this._redrawId);for(var a=0;a<r.length;a++){var o=r[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},n.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},n.prototype._paintHoverList=function(e){var t=e.length,i=this._hoverlayer;if(i&&i.clear(),!!t){for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<t;o++){var s=e[o];s.__inHover&&(i||(i=this._hoverlayer=this.getLayer(QF)),a||(a=i.ctx,a.save()),up(a,s,r,o===t-1))}a&&a.restore()}},n.prototype.getHoverLayer=function(){return this.getLayer(QF)},n.prototype.paintOne=function(e,t){uY(e,t)},n.prototype._paintList=function(e,t,i,r){if(this._redrawId===r){i=i||!1,this._updateLayerStatus(e);var a=this._doPaintList(e,t,i),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;tA(function(){l._paintList(e,t,i,r)})}}},n.prototype._compositeManually=function(){var e=this.getLayer(Lf).ctx,t=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,t,i),this.eachBuiltinLayer(function(r){r.virtual&&e.drawImage(r.dom,0,0,t,i)})},n.prototype._doPaintList=function(e,t,i){for(var r=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||i)&&a.push(u)}for(var c=!0,d=!1,h=function(m){var v=a[m],g=v.ctx,_=o&&v.createRepaintRects(e,t,f._width,f._height),S=i?v.__startIndex:v.__drawIndex,x=!i&&v.incremental&&Date.now,A=x&&Date.now(),C=v.zlevel===f._zlevelList[0]?f._backgroundColor:null;if(v.__startIndex===v.__endIndex)v.clear(!1,C,_);else if(S===v.__startIndex){var M=e[S];(!M.incremental||!M.notClear||i)&&v.clear(!1,C,_)}S===-1&&(console.error("For some unknown reason. drawIndex is -1"),S=v.__startIndex);var I,D=function(V){var G={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(I=S;I<v.__endIndex;I++){var W=e[I];if(W.__inHover&&(d=!0),r._doPaintEl(W,v,o,V,G,I===v.__endIndex-1),x){var Y=Date.now()-A;if(Y>15)break}}G.prevElClipPaths&&g.restore()};if(_)if(_.length===0)I=v.__endIndex;else for(var E=f.dpr,P=0;P<_.length;++P){var F=_[P];g.save(),g.beginPath(),g.rect(F.x*E,F.y*E,F.width*E,F.height*E),g.clip(),D(F),g.restore()}else g.save(),D(),g.restore();v.__drawIndex=I,v.__drawIndex<v.__endIndex&&(c=!1)},f=this,p=0;p<a.length;p++)h(p);return qi.wxa&&ne(this._layers,function(m){m&&m.ctx&&m.ctx.draw&&m.ctx.draw()}),{finished:c,needsRefreshHover:d}},n.prototype._doPaintEl=function(e,t,i,r,a,o){var s=t.ctx;if(i){var l=e.getPaintRect();(!r||l&&l.intersect(r))&&(up(s,e,a,o),e.setPrevPaintRect(l))}else up(s,e,a,o)},n.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Lf);var i=this._layers[e];return i||(i=new dx("zr_"+e,this,this.dpr),i.zlevel=e,i.__builtin__=!0,this._layerConfig[e]?ui(i,this._layerConfig[e],!0):this._layerConfig[e-v6]&&ui(i,this._layerConfig[e-v6],!0),t&&(i.virtual=t),this.insertLayer(e,i),i.initContext()),i},n.prototype.insertLayer=function(e,t){var i=this._layers,r=this._zlevelList,a=r.length,o=this._domRoot,s=null,l=-1;if(!i[e]&&Wge(t)){if(a>0&&e>r[0]){for(l=0;l<a-1&&!(r[l]<e&&r[l+1]>e);l++);s=i[r[l]]}if(r.splice(l+1,0,e),i[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)}},n.prototype.eachLayer=function(e,t){for(var i=this._zlevelList,r=0;r<i.length;r++){var a=i[r];e.call(t,this._layers[a],a)}},n.prototype.eachBuiltinLayer=function(e,t){for(var i=this._zlevelList,r=0;r<i.length;r++){var a=i[r],o=this._layers[a];o.__builtin__&&e.call(t,o,a)}},n.prototype.eachOtherLayer=function(e,t){for(var i=this._zlevelList,r=0;r<i.length;r++){var a=i[r],o=this._layers[a];o.__builtin__||e.call(t,o,a)}},n.prototype.getLayers=function(){return this._layers},n.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(d,h){d.__dirty=d.__used=!1});function t(d){a&&(a.__endIndex!==d&&(a.__dirty=!0),a.__endIndex=d)}if(this._singleCanvas)for(var i=1;i<e.length;i++){var r=e[i];if(r.zlevel!==e[i-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<e.length;l++){var r=e[l],u=r.zlevel,c=void 0;s!==u&&(s=u,o=0),r.incremental?(c=this.getLayer(u+Hge,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?v6:0),this._needsManuallyCompositing),c.__builtin__||qM("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),r.__dirty&El&&!r.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(d,h){!d.__used&&d.getElementCount()>0&&(d.__dirty=!0,d.__startIndex=d.__endIndex=d.__drawIndex=0),d.__dirty&&d.__drawIndex<0&&(d.__drawIndex=d.__startIndex)})},n.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},n.prototype._clearLayer=function(e){e.clear()},n.prototype.setBackgroundColor=function(e){this._backgroundColor=e,ne(this._layers,function(t){t.setUnpainted()})},n.prototype.configLayer=function(e,t){if(t){var i=this._layerConfig;i[e]?ui(i[e],t,!0):i[e]=t;for(var r=0;r<this._zlevelList.length;r++){var a=this._zlevelList[r];if(a===e||a===e+v6){var o=this._layers[a];ui(o,i[e],!0)}}}},n.prototype.delLayer=function(e){var t=this._layers,i=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],i.splice(xi(i,e),1))},n.prototype.resize=function(e,t){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var r=this._opts,a=this.root;if(e!=null&&(r.width=e),t!=null&&(r.height=t),e=I2(a,0,r),t=I2(a,1,r),i.style.display="",this._width!==e||t!==this._height){i.style.width=e+"px",i.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(Lf).resize(e,t)}return this},n.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},n.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},n.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[Lf].dom;var t=new dx("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var i=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,a=t.dom.height;this.eachLayer(function(d){d.__builtin__?i.drawImage(d.dom,0,0,r,a):d.renderToCanvas&&(i.save(),d.renderToCanvas(i),i.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];up(i,c,o,l===u-1)}return t.dom},n.prototype.getWidth=function(){return this._width},n.prototype.getHeight=function(){return this._height},n}();const qge=$ge;function Xge(n){n.registerPainter("canvas",qge)}var Yge=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){return nd(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var i=new ei,r=Ya("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);i.add(r),r.setStyle(t.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=t.itemHeight*.8,u=Ya(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);i.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),i},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}(pa);const Kge=Yge;function gv(n,e){var t=n.mapDimensionsAll("defaultedLabel"),i=t.length;if(i===1){var r=pv(n,e,t[0]);return r!=null?r+"":null}else if(i){for(var a=[],o=0;o<t.length;o++)a.push(pv(n,e,t[o]));return a.join(" ")}}function RK(n,e){var t=n.mapDimensionsAll("defaultedLabel");if(!$t(e))return e+"";for(var i=[],r=0;r<t.length;r++){var a=n.getDimensionIndex(t[r]);a>=0&&i.push(e[a])}return i.join(" ")}var Zge=function(n){ot(e,n);function e(t,i,r,a){var o=n.call(this)||this;return o.updateData(t,i,r,a),o}return e.prototype._createSymbol=function(t,i,r,a,o){this.removeAll();var s=Ya(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=Jge,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(){$c(this.childAt(0))},e.prototype.downplay=function(){qc(this.childAt(0))},e.prototype.setZ=function(t,i){var r=this.childAt(0);r.zlevel=t,r.z=i},e.prototype.setDraggable=function(t,i){var r=this.childAt(0);r.draggable=t,r.cursor=!i&&t?"move":r.cursor},e.prototype.updateData=function(t,i,r,a){this.silent=!1;var o=t.getItemVisual(i,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,i),u=o!==this._symbolType,c=a&&a.disableAnimation;if(u){var d=t.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,t,i,l,d)}else{var h=this.childAt(0);h.silent=!1;var f={scaleX:l[0]/2,scaleY:l[1]/2};c?h.attr(f):Qi(h,f,s,i),iu(h)}if(this._updateCommon(t,i,l,r,a),u){var h=this.childAt(0);if(!c){var f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,sa(h,f,s,i)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,i,r,a,o){var s=this.childAt(0),l=t.hostModel,u,c,d,h,f,p,m,v,g;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,d=a.selectItemStyle,h=a.focus,f=a.blurScope,m=a.labelStatesModels,v=a.hoverScale,g=a.cursorStyle,p=a.emphasisDisabled),!a||t.hasItemOption){var _=a&&a.itemModel?a.itemModel:t.getItemModel(i),S=_.getModel("emphasis");u=S.getModel("itemStyle").getItemStyle(),d=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),h=S.get("focus"),f=S.get("blurScope"),p=S.get("disabled"),m=_o(_),v=S.getShallow("scale"),g=_.getShallow("cursor")}var x=t.getItemVisual(i,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var A=n1(t.getItemVisual(i,"symbolOffset"),r);A&&(s.x=A[0],s.y=A[1]),g&&s.attr("cursor",g);var C=t.getItemVisual(i,"style"),M=C.fill;if(s instanceof qo){var I=s.style;s.useStyle(It({image:I.image,x:I.x,y:I.y,width:I.width,height:I.height},C))}else s.__isEmptyBrush?s.useStyle(It({},C)):s.useStyle(C),s.style.decal=null,s.setColor(M,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var D=t.getItemVisual(i,"liftZ"),E=this._z2;D!=null?E==null&&(this._z2=s.z2,s.z2+=D):E!=null&&(s.z2=E,this._z2=null);var P=o&&o.useNameLabel;$o(s,m,{labelFetcher:l,labelDataIndex:i,defaultText:F,inheritColor:M,defaultOpacity:C.opacity});function F(W){return P?t.getName(W):gv(t,W)}this._sizeX=r[0]/2,this._sizeY=r[1]/2;var V=s.ensureState("emphasis");V.style=u,s.ensureState("select").style=d,s.ensureState("blur").style=c;var G=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;V.scaleX=this._sizeX*G,V.scaleY=this._sizeY*G,this.setSymbolScale(1),ya(this,h,f,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,i,r){var a=this.childAt(0),o=ni(this).dataIndex,s=r&&r.animation;if(this.silent=a.silent=!0,r&&r.fadeLabel){var l=a.getTextContent();l&&Ph(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Ph(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,i){return Kv(t.getItemVisual(i,"symbolSize"))},e}(ei);function Jge(n,e){this.parent.drift(n,e)}const C3=Zge;function hx(n,e,t,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(t))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&n.getItemVisual(t,"symbol")!=="none"}function eO(n){return n!=null&&!Kn(n)&&(n={isIgnore:n}),n||{}}function tO(n){var e=n.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:_o(e),cursorStyle:e.get("cursor")}}var Qge=function(){function n(e){this.group=new ei,this._SymbolCtor=e||C3}return n.prototype.updateData=function(e,t){this._progressiveEls=null,t=eO(t);var i=this.group,r=e.hostModel,a=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=tO(e),u={disableAnimation:s},c=t.getSymbolPoint||function(d){return e.getItemLayout(d)};a||i.removeAll(),e.diff(a).add(function(d){var h=c(d);if(hx(e,h,d,t)){var f=new o(e,d,l,u);f.setPosition(h),e.setItemGraphicEl(d,f),i.add(f)}}).update(function(d,h){var f=a.getItemGraphicEl(h),p=c(d);if(!hx(e,p,d,t)){i.remove(f);return}var m=e.getItemVisual(d,"symbol")||"circle",v=f&&f.getSymbolType&&f.getSymbolType();if(!f||v&&v!==m)i.remove(f),f=new o(e,d,l,u),f.setPosition(p);else{f.updateData(e,d,l,u);var g={x:p[0],y:p[1]};s?f.attr(g):Qi(f,g,r)}i.add(f),e.setItemGraphicEl(d,f)}).remove(function(d){var h=a.getItemGraphicEl(d);h&&h.fadeOut(function(){i.remove(h)},r)}).execute(),this._getSymbolPoint=c,this._data=e},n.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(i,r){var a=e._getSymbolPoint(r);i.setPosition(a),i.markRedraw()})},n.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=tO(e),this._data=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(e,t,i){this._progressiveEls=[],i=eO(i);function r(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(hx(t,o,a,i)){var s=new this._SymbolCtor(t,a,this._seriesScope);s.traverse(r),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},n.prototype.eachRendered=function(e){Gh(this._progressiveEls||this.group,e)},n.prototype.remove=function(e){var t=this.group,i=this._data;i&&e?i.eachItemGraphicEl(function(r){r.fadeOut(function(){t.remove(r)},i.hostModel)}):t.removeAll()},n}();const M3=Qge;function LK(n,e,t){var i=n.getBaseAxis(),r=n.getOtherAxis(i),a=e9e(r,t),o=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,d=Xt(n.dimensions,function(p){return e.mapDimension(p)}),h=!1,f=e.getCalculationInfo("stackResultDimension");return Lh(e,d[0])&&(h=!0,d[0]=f),Lh(e,d[1])&&(h=!0,d[1]=f),{dataDimsForPoint:d,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function e9e(n,e){var t=0,i=n.scale.getExtent();return e==="start"?t=i[0]:e==="end"?t=i[1]:Yi(e)&&!isNaN(e)?t=e:i[0]>0?t=i[0]:i[1]<0&&(t=i[1]),t}function IK(n,e,t,i){var r=NaN;n.stacked&&(r=t.get(t.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=n.valueStart);var a=n.baseDataOffset,o=[];return o[a]=t.get(n.baseDim,i),o[1-a]=r,e.dataToPoint(o)}function t9e(n,e){var t=[];return e.diff(n).add(function(i){t.push({cmd:"+",idx:i})}).update(function(i,r){t.push({cmd:"=",idx:r,idx1:i})}).remove(function(i){t.push({cmd:"-",idx:i})}).execute(),t}function n9e(n,e,t,i,r,a,o,s){for(var l=t9e(n,e),u=[],c=[],d=[],h=[],f=[],p=[],m=[],v=LK(r,e,o),g=n.getLayout("points")||[],_=e.getLayout("points")||[],S=0;S<l.length;S++){var x=l[S],A=!0,C=void 0,M=void 0;switch(x.cmd){case"=":C=x.idx*2,M=x.idx1*2;var I=g[C],D=g[C+1],E=_[M],P=_[M+1];(isNaN(I)||isNaN(D))&&(I=E,D=P),u.push(I,D),c.push(E,P),d.push(t[C],t[C+1]),h.push(i[M],i[M+1]),m.push(e.getRawIndex(x.idx1));break;case"+":var F=x.idx,V=v.dataDimsForPoint,G=r.dataToPoint([e.get(V[0],F),e.get(V[1],F)]);M=F*2,u.push(G[0],G[1]),c.push(_[M],_[M+1]);var W=IK(v,r,e,F);d.push(W[0],W[1]),h.push(i[M],i[M+1]),m.push(e.getRawIndex(F));break;case"-":A=!1}A&&(f.push(x),p.push(p.length))}p.sort(function(Fe,pt){return m[Fe]-m[pt]});for(var Y=u.length,Q=Gu(Y),K=Gu(Y),ae=Gu(Y),ie=Gu(Y),he=[],S=0;S<p.length;S++){var Ee=p[S],He=S*2,xe=Ee*2;Q[He]=u[xe],Q[He+1]=u[xe+1],K[He]=c[xe],K[He+1]=c[xe+1],ae[He]=d[xe],ae[He+1]=d[xe+1],ie[He]=h[xe],ie[He+1]=h[xe+1],he[S]=f[Ee]}return{current:Q,next:K,stackedOnCurrent:ae,stackedOnNext:ie,status:he}}var Rd=Math.min,Ld=Math.max;function Cp(n,e){return isNaN(n)||isNaN(e)}function KA(n,e,t,i,r,a,o,s,l){for(var u,c,d,h,f,p,m=t,v=0;v<i;v++){var g=e[m*2],_=e[m*2+1];if(m>=r||m<0)break;if(Cp(g,_)){if(l){m+=a;continue}break}if(m===t)n[a>0?"moveTo":"lineTo"](g,_),d=g,h=_;else{var S=g-u,x=_-c;if(S*S+x*x<.5){m+=a;continue}if(o>0){for(var A=m+a,C=e[A*2],M=e[A*2+1];C===g&&M===_&&v<i;)v++,A+=a,m+=a,C=e[A*2],M=e[A*2+1],g=e[m*2],_=e[m*2+1],S=g-u,x=_-c;var I=v+1;if(l)for(;Cp(C,M)&&I<i;)I++,A+=a,C=e[A*2],M=e[A*2+1];var D=.5,E=0,P=0,F=void 0,V=void 0;if(I>=i||Cp(C,M))f=g,p=_;else{E=C-u,P=M-c;var G=g-u,W=C-g,Y=_-c,Q=M-_,K=void 0,ae=void 0;if(s==="x"){K=Math.abs(G),ae=Math.abs(W);var ie=E>0?1:-1;f=g-ie*K*o,p=_,F=g+ie*ae*o,V=_}else if(s==="y"){K=Math.abs(Y),ae=Math.abs(Q);var he=P>0?1:-1;f=g,p=_-he*K*o,F=g,V=_+he*ae*o}else K=Math.sqrt(G*G+Y*Y),ae=Math.sqrt(W*W+Q*Q),D=ae/(ae+K),f=g-E*o*(1-D),p=_-P*o*(1-D),F=g+E*o*D,V=_+P*o*D,F=Rd(F,Ld(C,g)),V=Rd(V,Ld(M,_)),F=Ld(F,Rd(C,g)),V=Ld(V,Rd(M,_)),E=F-g,P=V-_,f=g-E*K/ae,p=_-P*K/ae,f=Rd(f,Ld(u,g)),p=Rd(p,Ld(c,_)),f=Ld(f,Rd(u,g)),p=Ld(p,Rd(c,_)),E=g-f,P=_-p,F=g+E*ae/K,V=_+P*ae/K}n.bezierCurveTo(d,h,f,p,g,_),d=F,h=V}else n.lineTo(g,_)}u=g,c=_,m+=a}return v}var DK=function(){function n(){this.smooth=0,this.smoothConstraint=!0}return n}(),i9e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="ec-polyline",i}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new DK},e.prototype.buildPath=function(t,i){var r=i.points,a=0,o=r.length/2;if(i.connectNulls){for(;o>0&&Cp(r[o*2-2],r[o*2-1]);o--);for(;a<o&&Cp(r[a*2],r[a*2+1]);a++);}for(;a<o;)a+=KA(t,r,a,o,o,1,i.smooth,i.smoothMonotone,i.connectNulls)+1},e.prototype.getPointOn=function(t,i){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var r=this.path,a=r.data,o=Qu.CMD,s,l,u=i==="x",c=[],d=0;d<a.length;){var h=a[d++],f=void 0,p=void 0,m=void 0,v=void 0,g=void 0,_=void 0,S=void 0;switch(h){case o.M:s=a[d++],l=a[d++];break;case o.L:if(f=a[d++],p=a[d++],S=u?(t-s)/(f-s):(t-l)/(p-l),S<=1&&S>=0){var x=u?(p-l)*S+l:(f-s)*S+s;return u?[t,x]:[x,t]}s=f,l=p;break;case o.C:f=a[d++],p=a[d++],m=a[d++],v=a[d++],g=a[d++],_=a[d++];var A=u?z5(s,f,m,g,t,c):z5(l,p,v,_,t,c);if(A>0)for(var C=0;C<A;C++){var M=c[C];if(M<=1&&M>=0){var x=u?vo(l,p,v,_,M):vo(s,f,m,g,M);return u?[t,x]:[x,t]}}s=g,l=_;break}}},e}(Ei),r9e=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e}(DK),NK=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="ec-polygon",i}return e.prototype.getDefaultShape=function(){return new r9e},e.prototype.buildPath=function(t,i){var r=i.points,a=i.stackedOnPoints,o=0,s=r.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&Cp(r[s*2-2],r[s*2-1]);s--);for(;o<s&&Cp(r[o*2],r[o*2+1]);o++);}for(;o<s;){var u=KA(t,r,o,s,s,1,i.smooth,l,i.connectNulls);KA(t,a,o+u-1,u,s,-1,i.stackedOnSmooth,l,i.connectNulls),o+=u+1,t.closePath()}},e}(Ei);function kK(n,e,t,i,r){var a=n.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 d=new Hi({shape:{x:o,y:s,width:l,height:u}});if(e){var h=n.getBaseAxis(),f=h.isHorizontal(),p=h.inverse;f?(p&&(d.shape.x+=l),d.shape.width=0):(p||(d.shape.y+=u),d.shape.height=0);var m=$n(r)?function(v){r(v,d)}:null;sa(d,{shape:{width:l,height:u,x:o,y:s}},t,null,i,m)}return d}function FK(n,e,t){var i=n.getArea(),r=Ra(i.r0,1),a=Ra(i.r,1),o=new ll({shape:{cx:Ra(n.cx,1),cy:Ra(n.cy,1),r0:r,r:a,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});if(e){var s=n.getBaseAxis().dim==="angle";s?o.shape.endAngle=i.startAngle:o.shape.r=r,sa(o,{shape:{endAngle:i.endAngle,r:a}},t)}return o}function E3(n,e,t,i,r){if(n){if(n.type==="polar")return FK(n,e,t);if(n.type==="cartesian2d")return kK(n,e,t,i,r)}else return null;return null}function r1(n,e){return n.type===e}function nO(n,e){if(n.length===e.length){for(var t=0;t<n.length;t++)if(n[t]!==e[t])return;return!0}}function iO(n){for(var e=1/0,t=1/0,i=-1/0,r=-1/0,a=0;a<n.length;){var o=n[a++],s=n[a++];isNaN(o)||(e=Math.min(o,e),i=Math.max(o,i)),isNaN(s)||(t=Math.min(s,t),r=Math.max(s,r))}return[[e,t],[i,r]]}function rO(n,e){var t=iO(n),i=t[0],r=t[1],a=iO(e),o=a[0],s=a[1];return Math.max(Math.abs(i[0]-o[0]),Math.abs(i[1]-o[1]),Math.abs(r[0]-s[0]),Math.abs(r[1]-s[1]))}function aO(n){return Yi(n)?n:n?.5:0}function a9e(n,e,t){if(!t.valueDim)return[];for(var i=e.count(),r=Gu(i*2),a=0;a<i;a++){var o=IK(t,n,e,a);r[a*2]=o[0],r[a*2+1]=o[1]}return r}function Id(n,e,t,i,r){var a=t.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],d=[],h=[];if(r){for(l=0;l<n.length;l+=2){var f=e||n;!isNaN(f[l])&&!isNaN(f[l+1])&&h.push(n[l],n[l+1])}n=h}for(l=0;l<n.length-2;l+=2)switch(d[0]=n[l+2],d[1]=n[l+3],c[0]=n[l],c[1]=n[l+1],s.push(c[0],c[1]),i){case"end":u[o]=d[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var p=(c[o]+d[o])/2,m=[];u[o]=m[o]=p,u[1-o]=c[1-o],m[1-o]=d[1-o],s.push(u[0],u[1]),s.push(m[0],m[1]);break;default:u[o]=c[o],u[1-o]=d[1-o],s.push(u[0],u[1])}return s.push(n[l++],n[l++]),s}function o9e(n,e){var t=[],i=n.length,r,a;function o(c,d,h){var f=c.coord,p=(h-f)/(d.coord-f),m=vde(p,[c.color,d.color]);return{coord:h,color:m}}for(var s=0;s<i;s++){var l=n[s],u=l.coord;if(u<0)r=l;else if(u>e){a?t.push(o(a,l,e)):r&&t.push(o(r,l,0),o(r,l,e));break}else r&&(t.push(o(r,l,0)),r=null),t.push(l),a=l}return t}function s9e(n,e,t){var i=n.getVisual("visualMeta");if(!(!i||!i.length||!n.count())&&e.type==="cartesian2d"){for(var r,a,o=i.length-1;o>=0;o--){var s=n.getDimensionInfo(i[o].dimension);if(r=s&&s.coordDim,r==="x"||r==="y"){a=i[o];break}}if(a){var l=e.getAxis(r),u=Xt(a.stops,function(S){return{coord:l.toGlobalCoord(l.dataToCoord(S.value)),color:S.color}}),c=u.length,d=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var h=o9e(u,r==="x"?t.getWidth():t.getHeight()),f=h.length;if(!f&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var p=10,m=h[0].coord-p,v=h[f-1].coord+p,g=v-m;if(g<.001)return"transparent";ne(h,function(S){S.offset=(S.coord-m)/g}),h.push({offset:f?h[f-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:f?h[0].offset:.5,color:d[0]||"transparent"});var _=new po(0,0,0,0,h,!0);return _[r]=m,_[r+"2"]=v,_}}}function l9e(n,e,t){var i=n.get("showAllSymbol"),r=i==="auto";if(!(i&&!r)){var a=t.getAxesByScale("ordinal")[0];if(a&&!(r&&u9e(a,e))){var o=e.mapDimension(a.dim),s={};return ne(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function u9e(n,e){var t=n.getExtent(),i=Math.abs(t[1]-t[0])/n.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),a=Math.max(1,Math.round(r/5)),o=0;o<r;o+=a)if(C3.getSymbolSize(e,o)[n.isHorizontal()?1:0]*1.5>i)return!1;return!0}function c9e(n,e){return isNaN(n)||isNaN(e)}function d9e(n){for(var e=n.length/2;e>0&&c9e(n[e*2-2],n[e*2-1]);e--);return e-1}function oO(n,e){return[n[e*2],n[e*2+1]]}function h9e(n,e,t){for(var i=n.length/2,r=t==="x"?0:1,a,o,s=0,l=-1,u=0;u<i;u++)if(o=n[u*2+r],!(isNaN(o)||isNaN(n[u*2+1-r]))){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 OK(n){if(n.get(["endLabel","show"]))return!0;for(var e=0;e<Is.length;e++)if(n.get([Is[e],"endLabel","show"]))return!0;return!1}function fx(n,e,t,i){if(r1(e,"cartesian2d")){var r=i.getModel("endLabel"),a=r.get("valueAnimation"),o=i.getData(),s={lastFrameIndex:0},l=OK(i)?function(f,p){n._endLabelOnDuring(f,p,o,s,a,r,e)}:null,u=e.getBaseAxis().isHorizontal(),c=kK(e,t,i,function(){var f=n._endLabel;f&&t&&s.originalX!=null&&f.attr({x:s.originalX,y:s.originalY})},l);if(!i.get("clip",!0)){var d=c.shape,h=Math.max(d.width,d.height);u?(d.y-=h,d.height+=h*2):(d.x-=h,d.width+=h*2)}return l&&l(1,c),c}else return FK(e,t,i)}function f9e(n,e){var t=e.getBaseAxis(),i=t.isHorizontal(),r=t.inverse,a=i?r?"right":"left":"center",o=i?"middle":r?"top":"bottom";return{normal:{align:n.get("align")||a,verticalAlign:n.get("verticalAlign")||o}}}var p9e=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.init=function(){var t=new ei,i=new M3;this.group.add(i.group),this._symbolDraw=i,this._lineGroup=t,this._changePolyState=An(this._changePolyState,this)},e.prototype.render=function(t,i,r){var a=t.coordinateSystem,o=this.group,s=t.getData(),l=t.getModel("lineStyle"),u=t.getModel("areaStyle"),c=s.getLayout("points")||[],d=a.type==="polar",h=this._coordSys,f=this._symbolDraw,p=this._polyline,m=this._polygon,v=this._lineGroup,g=!i.ssr&&t.get("animation"),_=!u.isEmpty(),S=u.get("origin"),x=LK(a,s,S),A=_&&a9e(a,s,x),C=t.get("showSymbol"),M=t.get("connectNulls"),I=C&&!d&&l9e(t,s,a),D=this._data;D&&D.eachItemGraphicEl(function(Fe,pt){Fe.__temp&&(o.remove(Fe),D.setItemGraphicEl(pt,null))}),C||f.remove(),o.add(v);var E=d?!1:t.get("step"),P;a&&a.getArea&&t.get("clip",!0)&&(P=a.getArea(),P.width!=null?(P.x-=.1,P.y-=.1,P.width+=.2,P.height+=.2):P.r0&&(P.r0-=.5,P.r+=.5)),this._clipShapeForSymbol=P;var F=s9e(s,a,r)||s.getVisual("style")[s.getVisual("drawType")];if(!(p&&h.type===a.type&&E===this._step))C&&f.updateData(s,{isIgnore:I,clipShape:P,disableAnimation:!0,getSymbolPoint:function(Fe){return[c[Fe*2],c[Fe*2+1]]}}),g&&this._initSymbolLabelAnimation(s,a,P),E&&(A&&(A=Id(A,c,a,E,M)),c=Id(c,null,a,E,M)),p=this._newPolyline(c),_?m=this._newPolygon(c,A):m&&(v.remove(m),m=this._polygon=null),d||this._initOrUpdateEndLabel(t,a,Gp(F)),v.setClipPath(fx(this,a,!0,t));else{_&&!m?m=this._newPolygon(c,A):m&&!_&&(v.remove(m),m=this._polygon=null),d||this._initOrUpdateEndLabel(t,a,Gp(F));var V=v.getClipPath();if(V){var G=fx(this,a,!1,t);sa(V,{shape:G.shape},t)}else v.setClipPath(fx(this,a,!0,t));C&&f.updateData(s,{isIgnore:I,clipShape:P,disableAnimation:!0,getSymbolPoint:function(Fe){return[c[Fe*2],c[Fe*2+1]]}}),(!nO(this._stackedOnPoints,A)||!nO(this._points,c))&&(g?this._doUpdateAnimation(s,A,a,r,E,S,M):(E&&(A&&(A=Id(A,c,a,E,M)),c=Id(c,null,a,E,M)),p.setShape({points:c}),m&&m.setShape({points:c,stackedOnPoints:A})))}var W=t.getModel("emphasis"),Y=W.get("focus"),Q=W.get("blurScope"),K=W.get("disabled");if(p.useStyle(qn(l.getLineStyle(),{fill:"none",stroke:F,lineJoin:"bevel"})),jo(p,t,"lineStyle"),p.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var ae=p.getState("emphasis").style;ae.lineWidth=+p.style.lineWidth+1}ni(p).seriesIndex=t.seriesIndex,ya(p,Y,Q,K);var ie=aO(t.get("smooth")),he=t.get("smoothMonotone");if(p.setShape({smooth:ie,smoothMonotone:he,connectNulls:M}),m){var Ee=s.getCalculationInfo("stackedOnSeries"),He=0;m.useStyle(qn(u.getAreaStyle(),{fill:F,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),Ee&&(He=aO(Ee.get("smooth"))),m.setShape({smooth:ie,stackedOnSmooth:He,smoothMonotone:he,connectNulls:M}),jo(m,t,"areaStyle"),ni(m).seriesIndex=t.seriesIndex,ya(m,Y,Q,K)}var xe=this._changePolyState;s.eachItemGraphicEl(function(Fe){Fe&&(Fe.onHoverStateChange=xe)}),this._polyline.onHoverStateChange=xe,this._data=s,this._coordSys=a,this._stackedOnPoints=A,this._points=c,this._step=E,this._valueOrigin=S,t.get("triggerLineEvent")&&(this.packEventData(t,p),m&&this.packEventData(t,m))},e.prototype.packEventData=function(t,i){ni(i).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,i,r,a){var o=t.getData(),s=Op(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],d=l[s*2+1];if(isNaN(c)||isNaN(d)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,d))return;var h=t.get("zlevel")||0,f=t.get("z")||0;u=new C3(o,s),u.x=c,u.y=d,u.setZ(h,f);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=f,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Yr.prototype.highlight.call(this,t,i,r,a)},e.prototype.downplay=function(t,i,r,a){var o=t.getData(),s=Op(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 Yr.prototype.downplay.call(this,t,i,r,a)},e.prototype._changePolyState=function(t){var i=this._polygon;$5(this._polyline,t),i&&$5(i,t)},e.prototype._newPolyline=function(t){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new i9e({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},e.prototype._newPolygon=function(t,i){var r=this._polygon;return r&&this._lineGroup.remove(r),r=new NK({shape:{points:t,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(r),this._polygon=r,r},e.prototype._initSymbolLabelAnimation=function(t,i,r){var a,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):i.type==="polar"&&(a=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");$n(c)&&(c=c(null));var d=u.get("animationDelay")||0,h=$n(d)?d(null):d;t.eachItemGraphicEl(function(f,p){var m=f;if(m){var v=[f.x,f.y],g=void 0,_=void 0,S=void 0;if(r)if(o){var x=r,A=i.pointToCoord(v);a?(g=x.startAngle,_=x.endAngle,S=-A[1]/180*Math.PI):(g=x.r0,_=x.r,S=A[0])}else{var C=r;a?(g=C.x,_=C.x+C.width,S=f.x):(g=C.y+C.height,_=C.y,S=f.y)}var M=_===g?0:(S-g)/(_-g);l&&(M=1-M);var I=$n(d)?d(p):c*M+h,D=m.getSymbolPath(),E=D.getTextContent();m.attr({scaleX:0,scaleY:0}),m.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:I}),E&&E.animateFrom({style:{opacity:0}},{duration:300,delay:I}),D.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,i,r){var a=t.getModel("endLabel");if(OK(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 Xi({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=d9e(l);c>=0&&($o(s,_o(t,"endLabel"),{inheritColor:r,labelFetcher:t,labelDataIndex:c,defaultText:function(d,h,f){return f!=null?RK(o,f):gv(o,d)},enableTextSetter:!0},f9e(a,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,i,r,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 d=r.getLayout("points"),h=r.hostModel,f=h.get("connectNulls"),p=s.get("precision"),m=s.get("distance")||0,v=l.getBaseAxis(),g=v.isHorizontal(),_=v.inverse,S=i.shape,x=_?g?S.x:S.y+S.height:g?S.x+S.width:S.y,A=(g?m:0)*(_?-1:1),C=(g?0:-m)*(_?-1:1),M=g?"x":"y",I=h9e(d,x,M),D=I.range,E=D[1]-D[0],P=void 0;if(E>=1){if(E>1&&!f){var F=oO(d,D[0]);u.attr({x:F[0]+A,y:F[1]+C}),o&&(P=h.getRawValue(D[0]))}else{var F=c.getPointOn(x,M);F&&u.attr({x:F[0]+A,y:F[1]+C});var V=h.getRawValue(D[0]),G=h.getRawValue(D[1]);o&&(P=nq(r,p,V,G,I.t))}a.lastFrameIndex=D[0]}else{var W=t===1||a.lastFrameIndex>0?D[0]:0,F=oO(d,W);o&&(P=h.getRawValue(W)),u.attr({x:F[0]+A,y:F[1]+C})}if(o){var Y=Vv(u);typeof Y.setLabelText=="function"&&Y.setLabelText(P)}}},e.prototype._doUpdateAnimation=function(t,i,r,a,o,s,l){var u=this._polyline,c=this._polygon,d=t.hostModel,h=n9e(this._data,t,this._stackedOnPoints,i,this._coordSys,r,this._valueOrigin),f=h.current,p=h.stackedOnCurrent,m=h.next,v=h.stackedOnNext;if(o&&(p=Id(h.stackedOnCurrent,h.current,r,o,l),f=Id(h.current,null,r,o,l),v=Id(h.stackedOnNext,h.next,r,o,l),m=Id(h.next,null,r,o,l)),rO(f,m)>3e3||c&&rO(p,v)>3e3){u.stopAnimation(),u.setShape({points:m}),c&&(c.stopAnimation(),c.setShape({points:m,stackedOnPoints:v}));return}u.shape.__points=h.current,u.shape.points=f;var g={shape:{points:m}};h.current!==f&&(g.shape.__points=h.next),u.stopAnimation(),Qi(u,g,d),c&&(c.setShape({points:f,stackedOnPoints:p}),c.stopAnimation(),Qi(c,{shape:{stackedOnPoints:v}},d),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],S=h.status,x=0;x<S.length;x++){var A=S[x].cmd;if(A==="="){var C=t.getItemGraphicEl(S[x].idx1);C&&_.push({el:C,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var M=u.shape.__points,I=0;I<_.length;I++){var D=_[I].el,E=_[I].ptIdx*2;D.x=M[E],D.y=M[E+1],D.markRedraw()}})},e.prototype.remove=function(t){var i=this.group,r=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),r&&r.eachItemGraphicEl(function(a,o){a.__temp&&(i.remove(a),r.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(Yr);const v9e=p9e;function P3(n,e){return{seriesType:n,plan:Xv(),reset:function(t){var i=t.getData(),r=t.coordinateSystem,a=t.pipelineContext,o=e||a.large;if(r){var s=Xt(r.dimensions,function(f){return i.mapDimension(f)}).slice(0,2),l=s.length,u=i.getCalculationInfo("stackResultDimension");Lh(i,s[0])&&(s[0]=u),Lh(i,s[1])&&(s[1]=u);var c=i.getStore(),d=i.getDimensionIndex(s[0]),h=i.getDimensionIndex(s[1]);return l&&{progress:function(f,p){for(var m=f.end-f.start,v=o&&Gu(m*l),g=[],_=[],S=f.start,x=0;S<f.end;S++){var A=void 0;if(l===1){var C=c.get(d,S);A=r.dataToPoint(C,null,_)}else g[0]=c.get(d,S),g[1]=c.get(h,S),A=r.dataToPoint(g,null,_);o?(v[x++]=A[0],v[x++]=A[1]):p.setItemLayout(S,A.slice())}o&&p.setLayout("points",v)}}}}}}var m9e={average:function(n){for(var e=0,t=0,i=0;i<n.length;i++)isNaN(n[i])||(e+=n[i],t++);return t===0?NaN:e/t},sum:function(n){for(var e=0,t=0;t<n.length;t++)e+=n[t]||0;return e},max:function(n){for(var e=-1/0,t=0;t<n.length;t++)n[t]>e&&(e=n[t]);return isFinite(e)?e:NaN},min:function(n){for(var e=1/0,t=0;t<n.length;t++)n[t]<e&&(e=n[t]);return isFinite(e)?e:NaN},nearest:function(n){return n[0]}},g9e=function(n){return Math.round(n.length/2)};function BK(n){return{seriesType:n,reset:function(e,t,i){var r=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=r.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),d=i.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(d||1),f=Math.round(s/h);if(isFinite(f)&&f>1){a==="lttb"?e.setData(r.lttbDownSample(r.mapDimension(u.dim),1/f)):a==="minmax"&&e.setData(r.minmaxDownSample(r.mapDimension(u.dim),1/f));var p=void 0;xn(a)?p=m9e[a]:$n(a)&&(p=a),p&&e.setData(r.downSample(r.mapDimension(u.dim),1/f,p,g9e))}}}}}function y9e(n){n.registerChartView(v9e),n.registerSeriesModel(Kge),n.registerLayout(P3("line",!0)),n.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),i=e.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",i)}}),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,BK("line"))}var zK=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){return nd(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,i,r){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(t),s=a.dataToPoint(o);if(r)ne(a.getAxes(),function(h,f){if(h.type==="category"&&i!=null){var p=h.getTicksCoords(),m=h.getTickModel().get("alignWithLabel"),v=o[f],g=i[f]==="x1"||i[f]==="y1";if(g&&!m&&(v+=1),p.length<2)return;if(p.length===2){s[f]=h.toGlobalCoord(h.getExtent()[g?1:0]);return}for(var _=void 0,S=void 0,x=1,A=0;A<p.length;A++){var C=p[A].coord,M=A===p.length-1?p[A-1].tickValue+x:p[A].tickValue;if(M===v){S=C;break}else if(M<v)_=C;else if(_!=null&&M>v){S=(C+_)/2;break}A===1&&(x=M-p[0].tickValue)}S==null&&(_?_&&(S=p[p.length-1].coord):S=p[0].coord),s[f]=h.toGlobalCoord(S)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),d=a.getBaseAxis().isHorizontal()?0:1;s[d]+=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}(pa);pa.registerClass(zK);const d8=zK;var _9e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return nd(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"),i=this.get("largeThreshold");return i>t&&(t=i),t},e.prototype.brushSelector=function(t,i,r){return r.rect(i.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Uh(d8.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}(d8);const S9e=_9e;var b9e=function(){function n(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return n}(),x9e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="sausage",i}return e.prototype.getDefaultShape=function(){return new b9e},e.prototype.buildPath=function(t,i){var r=i.cx,a=i.cy,o=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=(s-o)*.5,u=o+l,c=i.startAngle,d=i.endAngle,h=i.clockwise,f=Math.PI*2,p=h?d-c<f:c-d<f;p||(c=d-(h?f:-f));var m=Math.cos(c),v=Math.sin(c),g=Math.cos(d),_=Math.sin(d);p?(t.moveTo(m*o+r,v*o+a),t.arc(m*u+r,v*u+a,l,-Math.PI+c,c,!h)):t.moveTo(m*s+r,v*s+a),t.arc(r,a,s,c,d,!h),t.arc(g*u+r,_*u+a,l,d-Math.PI*2,d-Math.PI,!h),o!==0&&t.arc(r,a,o,d,c,h)},e}(Ei);const h8=x9e;function w9e(n,e){e=e||{};var t=e.isRoundCap;return function(i,r,a){var o=r.position;if(!o||o instanceof Array)return W5(i,r,a);var s=n(o),l=r.distance!=null?r.distance:5,u=this.shape,c=u.cx,d=u.cy,h=u.r,f=u.r0,p=(h+f)/2,m=u.startAngle,v=u.endAngle,g=(m+v)/2,_=t?Math.abs(h-f)/2:0,S=Math.cos,x=Math.sin,A=c+h*S(m),C=d+h*x(m),M="left",I="top";switch(s){case"startArc":A=c+(f-l)*S(g),C=d+(f-l)*x(g),M="center",I="top";break;case"insideStartArc":A=c+(f+l)*S(g),C=d+(f+l)*x(g),M="center",I="bottom";break;case"startAngle":A=c+p*S(m)+m6(m,l+_,!1),C=d+p*x(m)+g6(m,l+_,!1),M="right",I="middle";break;case"insideStartAngle":A=c+p*S(m)+m6(m,-l+_,!1),C=d+p*x(m)+g6(m,-l+_,!1),M="left",I="middle";break;case"middle":A=c+p*S(g),C=d+p*x(g),M="center",I="middle";break;case"endArc":A=c+(h+l)*S(g),C=d+(h+l)*x(g),M="center",I="bottom";break;case"insideEndArc":A=c+(h-l)*S(g),C=d+(h-l)*x(g),M="center",I="top";break;case"endAngle":A=c+p*S(v)+m6(v,l+_,!0),C=d+p*x(v)+g6(v,l+_,!0),M="left",I="middle";break;case"insideEndAngle":A=c+p*S(v)+m6(v,-l+_,!0),C=d+p*x(v)+g6(v,-l+_,!0),M="right",I="middle";break;default:return W5(i,r,a)}return i=i||{},i.x=A,i.y=C,i.align=M,i.verticalAlign=I,i}}function T9e(n,e,t,i){if(Yi(i)){n.setTextConfig({rotation:i});return}else if($t(e)){n.setTextConfig({rotation:0});return}var r=n.shape,a=r.clockwise?r.startAngle:r.endAngle,o=r.clockwise?r.endAngle:r.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:n.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),n.setTextConfig({rotation:c})}function m6(n,e,t){return e*Math.sin(n)*(t?-1:1)}function g6(n,e,t){return e*Math.cos(n)*(t?1:-1)}function cp(n,e,t){var i=n.get("borderRadius");if(i==null)return t?{cornerRadius:0}:null;$t(i)||(i=[i,i,i,i]);var r=Math.abs(e.r||0-e.r0||0);return{cornerRadius:Xt(i,function(a){return nu(a,r)})}}var px=Math.max,vx=Math.min;function A9e(n,e){var t=n.getArea&&n.getArea();if(r1(n,"cartesian2d")){var i=n.getBaseAxis();if(i.type!=="category"||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(t.x-=r,t.width+=r*2):(t.y-=r,t.height+=r*2)}}return t}var C9e=function(n){ot(e,n);function e(){var t=n.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,i,r,a){this._model=t,this._removeOnRenderedListener(r),this._updateDrawMode(t);var o=t.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,i,r):this._renderNormal(t,i,r,a))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,i){this._progressiveEls=[],this._incrementalRenderLarge(t,i)},e.prototype.eachRendered=function(t){Gh(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var i=t.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},e.prototype._renderNormal=function(t,i,r,a){var o=this.group,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),d;u.type==="cartesian2d"?d=c.isHorizontal():u.type==="polar"&&(d=c.dim==="angle");var h=t.isAnimationEnabled()?t:null,f=M9e(t,u);f&&this._enableRealtimeSort(f,s,r);var p=t.get("clip",!0)||f,m=A9e(u,s);o.removeClipPath();var v=t.get("roundCap",!0),g=t.get("showBackground",!0),_=t.getModel("backgroundStyle"),S=_.get("borderRadius")||0,x=[],A=this._backgroundEls,C=a&&a.isInitSort,M=a&&a.type==="changeAxisOrder";function I(P){var F=y6[u.type](s,P),V=N9e(u,d,F);return V.useStyle(_.getItemStyle()),u.type==="cartesian2d"?V.setShape("r",S):V.setShape("cornerRadius",S),x[P]=V,V}s.diff(l).add(function(P){var F=s.getItemModel(P),V=y6[u.type](s,P,F);if(g&&I(P),!(!s.hasValue(P)||!dO[u.type](V))){var G=!1;p&&(G=sO[u.type](m,V));var W=lO[u.type](t,s,P,V,d,h,c.model,!1,v);f&&(W.forceLabelAnimation=!0),hO(W,s,P,F,V,t,d,u.type==="polar"),C?W.attr({shape:V}):f?uO(f,h,W,V,P,d,!1,!1):sa(W,{shape:V},t,P),s.setItemGraphicEl(P,W),o.add(W),W.ignore=G}}).update(function(P,F){var V=s.getItemModel(P),G=y6[u.type](s,P,V);if(g){var W=void 0;A.length===0?W=I(F):(W=A[F],W.useStyle(_.getItemStyle()),u.type==="cartesian2d"?W.setShape("r",S):W.setShape("cornerRadius",S),x[P]=W);var Y=y6[u.type](s,P),Q=UK(d,Y,u);Qi(W,{shape:Q},h,P)}var K=l.getItemGraphicEl(F);if(!s.hasValue(P)||!dO[u.type](G)){o.remove(K);return}var ae=!1;if(p&&(ae=sO[u.type](m,G),ae&&o.remove(K)),K?iu(K):K=lO[u.type](t,s,P,G,d,h,c.model,!!K,v),f&&(K.forceLabelAnimation=!0),M){var ie=K.getTextContent();if(ie){var he=Vv(ie);he.prevValue!=null&&(he.prevValue=he.value)}}else hO(K,s,P,V,G,t,d,u.type==="polar");C?K.attr({shape:G}):f?uO(f,h,K,G,P,d,!0,M):Qi(K,{shape:G},t,P,null),s.setItemGraphicEl(P,K),K.ignore=ae,o.add(K)}).remove(function(P){var F=l.getItemGraphicEl(P);F&&L9(F,t,P)}).execute();var D=this._backgroundGroup||(this._backgroundGroup=new ei);D.removeAll();for(var E=0;E<x.length;++E)D.add(x[E]);o.add(D),this._backgroundEls=x,this._data=s},e.prototype._renderLarge=function(t,i,r){this._clear(),pO(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,i){this._removeBackground(),pO(i,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var i=t.get("clip",!0)&&E3(t.coordinateSystem,!1,t),r=this.group;i?r.setClipPath(i):r.removeClipPath()},e.prototype._enableRealtimeSort=function(t,i,r){var a=this;if(i.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(i,t,r),this._isFirstFrame=!1;else{var s=function(l){var u=i.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(i,s,o,r)},r.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,i,r){var a=[];return t.each(t.mapDimension(i.dim),function(o,s){var l=r(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:Xt(a,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,i,r){for(var a=r.scale,o=t.mapDimension(r.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=t.rawIndexOf(o,a.getRawOrdinalNumber(l)),d=c<0?Number.MIN_VALUE:i(t.indexOfRawIndex(c));if(d>s)return!0;s=d}return!1},e.prototype._isOrderDifferentInView=function(t,i){for(var r=i.scale,a=r.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],r.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==r.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,i,r,a){if(this._isOrderChangedWithinSameData(t,i,r)){var o=this._dataSort(t,r,i);this._isOrderDifferentInView(o,r)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",axisId:r.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,i,r){var a=i.baseAxis,o=this._dataSort(t,a,function(s){return t.get(t.mapDimension(i.otherAxis.dim),s)});r.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(t,i){this._clear(this._model),this._removeOnRenderedListener(i)},e.prototype.dispose=function(t,i){this._removeOnRenderedListener(i)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var i=this.group,r=this._data;t&&t.isAnimationEnabled()&&r&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],r.eachItemGraphicEl(function(a){L9(a,t,ni(a).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Yr),sO={cartesian2d:function(n,e){var t=e.width<0?-1:1,i=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=n.x+n.width,a=n.y+n.height,o=px(e.x,n.x),s=vx(e.x+e.width,r),l=px(e.y,n.y),u=vx(e.y+e.height,a),c=s<o,d=u<l;return e.x=c&&o>r?s:o,e.y=d&&l>a?u:l,e.width=c?0:s-o,e.height=d?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),c||d},polar:function(n,e){var t=e.r0<=e.r?1:-1;if(t<0){var i=e.r;e.r=e.r0,e.r0=i}var r=vx(e.r,n.r),a=px(e.r0,n.r0);e.r=r,e.r0=a;var o=r-a<0;if(t<0){var i=e.r;e.r=e.r0,e.r0=i}return o}},lO={cartesian2d:function(n,e,t,i,r,a,o,s,l){var u=new Hi({shape:It({},i),z2:1});if(u.__dataIndex=t,u.name="item",a){var c=u.shape,d=r?"height":"width";c[d]=0}return u},polar:function(n,e,t,i,r,a,o,s,l){var u=!r&&l?h8:ll,c=new u({shape:i,z2:1});c.name="item";var d=GK(r);if(c.calculateTextPosition=w9e(d,{isRoundCap:u===h8}),a){var h=c.shape,f=r?"r":"endAngle",p={};h[f]=r?i.r0:i.startAngle,p[f]=i[f],(s?Qi:sa)(c,{shape:p},a)}return c}};function M9e(n,e){var t=n.get("realtimeSort",!0),i=e.getBaseAxis();if(t&&i.type==="category"&&e.type==="cartesian2d")return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}function uO(n,e,t,i,r,a,o,s){var l,u;a?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(o?Qi:sa)(t,{shape:l},e,r,null);var c=e?n.baseAxis.model:null;(o?Qi:sa)(t,{shape:u},c,r)}function cO(n,e){for(var t=0;t<e.length;t++)if(!isFinite(n[e[t]]))return!0;return!1}var E9e=["x","y","width","height"],P9e=["cx","cy","r","startAngle","endAngle"],dO={cartesian2d:function(n){return!cO(n,E9e)},polar:function(n){return!cO(n,P9e)}},y6={cartesian2d:function(n,e,t){var i=n.getItemLayout(e),r=t?L9e(t,i):0,a=i.width>0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*r/2,y:i.y+o*r/2,width:i.width-a*r,height:i.height-o*r}},polar:function(n,e,t){var i=n.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function R9e(n){return n.startAngle!=null&&n.endAngle!=null&&n.startAngle===n.endAngle}function GK(n){return function(e){var t=e?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+t;default:return i}}}(n)}function hO(n,e,t,i,r,a,o,s){var l=e.getItemVisual(t,"style");if(s){if(!a.get("roundCap")){var c=n.shape,d=cp(i.getModel("itemStyle"),c,!0);It(c,d),n.setShape(c)}}else{var u=i.get(["itemStyle","borderRadius"])||0;n.setShape("r",u)}n.useStyle(l);var h=i.getShallow("cursor");h&&n.attr("cursor",h);var f=s?o?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":o?r.height>=0?"bottom":"top":r.width>=0?"right":"left",p=_o(i);$o(n,p,{labelFetcher:a,labelDataIndex:t,defaultText:gv(a.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:f});var m=n.getTextContent();if(s&&m){var v=i.get(["label","position"]);n.textConfig.inside=v==="middle"?!0:null,T9e(n,v==="outside"?f:v,GK(o),i.get(["label","rotate"]))}Jq(m,p,a.getRawValue(t),function(_){return RK(e,_)});var g=i.getModel(["emphasis"]);ya(n,g.get("focus"),g.get("blurScope"),g.get("disabled")),jo(n,i),R9e(r)&&(n.style.fill="none",n.style.stroke="none",ne(n.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function L9e(n,e){var t=n.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var i=n.get(["itemStyle","borderWidth"])||0,r=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,r,a)}var I9e=function(){function n(){}return n}(),fO=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="largeBar",i}return e.prototype.getDefaultShape=function(){return new I9e},e.prototype.buildPath=function(t,i){for(var r=i.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<r.length;c+=3)l[a]=u,l[o]=r[c+2],s[a]=r[c+a],s[o]=r[c+o],t.rect(s[0],s[1],l[0],l[1])},e}(Ei);function pO(n,e,t,i){var r=n.getData(),a=r.getLayout("valueAxisHorizontal")?1:0,o=r.getLayout("largeDataIndices"),s=r.getLayout("size"),l=n.getModel("backgroundStyle"),u=r.getLayout("largeBackgroundPoints");if(u){var c=new fO({shape:{points:u},incremental:!!i,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 d=new fO({shape:{points:r.getLayout("largePoints")},incremental:!!i,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,e.add(d),d.useStyle(r.getVisual("style")),d.style.stroke=null,ni(d).seriesIndex=n.seriesIndex,n.get("silent")||(d.on("mousedown",vO),d.on("mousemove",vO)),t&&t.push(d)}var vO=V_(function(n){var e=this,t=D9e(e,n.offsetX,n.offsetY);ni(e).dataIndex=t>=0?t:null},30,!1);function D9e(n,e,t){for(var i=n.baseDimIdx,r=1-i,a=n.shape.points,o=n.largeDataIndices,s=[],l=[],u=n.barWidth,c=0,d=a.length/3;c<d;c++){var h=c*3;if(l[i]=u,l[r]=a[h+2],s[i]=a[h+i],s[r]=a[h+r],l[r]<0&&(s[r]+=l[r],l[r]=-l[r]),e>=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function UK(n,e,t){if(r1(t,"cartesian2d")){var i=e,r=t.getArea();return{x:n?i.x:r.x,y:n?r.y:i.y,width:n?i.width:r.width,height:n?r.height:i.height}}else{var r=t.getArea(),a=e;return{cx:r.cx,cy:r.cy,r0:n?r.r0:a.r0,r:n?r.r:a.r,startAngle:n?a.startAngle:0,endAngle:n?a.endAngle:Math.PI*2}}}function N9e(n,e,t){var i=n.type==="polar"?ll:Hi;return new i({shape:UK(e,t,n),silent:!0,z2:0})}const k9e=C9e;function F9e(n){n.registerChartView(k9e),n.registerSeriesModel(S9e),n.registerLayout(n.PRIORITY.VISUAL.LAYOUT,si(HY,"bar")),n.registerLayout(n.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,WY("bar")),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,BK("bar")),n.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var i=e.componentType||"series";t.eachComponent({mainType:i,query:e},function(r){e.sortInfo&&r.axis.setCategorySortInfo(e.sortInfo)})})}var mO=Math.PI*2,_6=Math.PI/180;function VK(n,e){return uo(n.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function HK(n,e){var t=VK(n,e),i=n.get("center"),r=n.get("radius");$t(r)||(r=[0,r]);var a=_n(t.width,e.getWidth()),o=_n(t.height,e.getHeight()),s=Math.min(a,o),l=_n(r[0],s/2),u=_n(r[1],s/2),c,d,h=n.coordinateSystem;if(h){var f=h.dataToPoint(i);c=f[0]||0,d=f[1]||0}else $t(i)||(i=[i,i]),c=_n(i[0],a)+t.x,d=_n(i[1],o)+t.y;return{cx:c,cy:d,r0:l,r:u}}function O9e(n,e,t){e.eachSeriesByType(n,function(i){var r=i.getData(),a=r.mapDimension("value"),o=VK(i,t),s=HK(i,t),l=s.cx,u=s.cy,c=s.r,d=s.r0,h=-i.get("startAngle")*_6,f=i.get("endAngle"),p=i.get("padAngle")*_6;f=f==="auto"?h-mO:-f*_6;var m=i.get("minAngle")*_6,v=m+p,g=0;r.each(a,function(Q){!isNaN(Q)&&g++});var _=r.getSum(a),S=Math.PI/(_||g)*2,x=i.get("clockwise"),A=i.get("roseType"),C=i.get("stillShowZeroSum"),M=r.getDataExtent(a);M[0]=0;var I=x?1:-1,D=[h,f],E=I*p/2;uE(D,!x),h=D[0],f=D[1];var P=WK(i);P.startAngle=h,P.endAngle=f,P.clockwise=x;var F=Math.abs(f-h),V=F,G=0,W=h;if(r.setLayout({viewRect:o,r:c}),r.each(a,function(Q,K){var ae;if(isNaN(Q)){r.setItemLayout(K,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:l,cy:u,r0:d,r:A?NaN:c});return}A!=="area"?ae=_===0&&C?S:Q*S:ae=F/g,ae<v?(ae=v,V-=v):G+=Q;var ie=W+I*ae,he=0,Ee=0;p>ae?(he=W+I*ae/2,Ee=he):(he=W+E,Ee=ie-E),r.setItemLayout(K,{angle:ae,startAngle:he,endAngle:Ee,clockwise:x,cx:l,cy:u,r0:d,r:A?pr(Q,M,[d,c]):c}),W=ie}),V<mO&&g)if(V<=.001){var Y=F/g;r.each(a,function(Q,K){if(!isNaN(Q)){var ae=r.getItemLayout(K);ae.angle=Y;var ie=0,he=0;Y<p?(ie=h+I*(K+1/2)*Y,he=ie):(ie=h+I*K*Y+E,he=h+I*(K+1)*Y-E),ae.startAngle=ie,ae.endAngle=he}})}else S=V/G,W=h,r.each(a,function(Q,K){if(!isNaN(Q)){var ae=r.getItemLayout(K),ie=ae.angle===v?v:Q*S,he=0,Ee=0;ie<p?(he=W+I*ie/2,Ee=he):(he=W+E,Ee=W+I*ie-E),ae.startAngle=he,ae.endAngle=Ee,W+=I*ie}})})}var WK=Gi();function R3(n){return{seriesType:n,reset:function(e,t){var i=t.findComponents({mainType:"legend"});if(!(!i||!i.length)){var r=e.getData();r.filterSelf(function(a){for(var o=r.getName(a),s=0;s<i.length;s++)if(!i[s].isSelected(o))return!1;return!0})}}}}var B9e=Math.PI/180;function gO(n,e,t,i,r,a,o,s,l,u){if(n.length<2)return;function c(m){for(var v=m.rB,g=v*v,_=0;_<m.list.length;_++){var S=m.list[_],x=Math.abs(S.label.y-t),A=i+S.len,C=A*A,M=Math.sqrt(Math.abs((1-x*x/g)*C)),I=e+(M+S.len2)*r,D=I-S.label.x,E=S.targetTextWidth-D*r;jK(S,E,!0),S.label.x=I}}function d(m){for(var v={list:[],maxY:0},g={list:[],maxY:0},_=0;_<m.length;_++)if(m[_].labelAlignTo==="none"){var S=m[_],x=S.label.y>t?g:v,A=Math.abs(S.label.y-t);if(A>=x.maxY){var C=S.label.x-e-S.len2*r,M=i+S.len,I=Math.abs(C)<M?Math.sqrt(A*A/(1-C*C/M/M)):M;x.rB=I,x.maxY=A}x.list.push(S)}c(v),c(g)}for(var h=n.length,f=0;f<h;f++)if(n[f].position==="outer"&&n[f].labelAlignTo==="labelLine"){var p=n[f].label.x-u;n[f].linePoints[1][0]+=p,n[f].label.x=u}fK(n,l,l+o)&&d(n)}function z9e(n,e,t,i,r,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h<n.length;h++){var f=n[h].label;mx(n[h])||(f.x<e?(c=Math.min(c,f.x),l.push(n[h])):(d=Math.max(d,f.x),u.push(n[h])))}for(var h=0;h<n.length;h++){var p=n[h];if(!mx(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var f=p.label,m=p.linePoints,v=void 0;p.labelAlignTo==="edge"?f.x<e?v=m[2][0]-p.labelDistance-o-p.edgeDistance:v=o+r-p.edgeDistance-m[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?f.x<e?v=c-o-p.bleedMargin:v=o+r-d-p.bleedMargin:f.x<e?v=f.x-o-p.bleedMargin:v=o+r-f.x-p.bleedMargin,p.targetTextWidth=v,jK(p,v)}}gO(u,e,t,i,1,r,a,o,s,d),gO(l,e,t,i,-1,r,a,o,s,c);for(var h=0;h<n.length;h++){var p=n[h];if(!mx(p)&&p.linePoints){var f=p.label,m=p.linePoints,g=p.labelAlignTo==="edge",_=f.style.padding,S=_?_[1]+_[3]:0,x=f.style.backgroundColor?0:S,A=p.rect.width+x,C=m[1][0]-m[2][0];g?f.x<e?m[2][0]=o+p.edgeDistance+A+p.labelDistance:m[2][0]=o+r-p.edgeDistance-A-p.labelDistance:(f.x<e?m[2][0]=f.x+p.labelDistance:m[2][0]=f.x-p.labelDistance,m[1][0]=m[2][0]+C),m[1][1]=m[2][1]=f.y}}}function jK(n,e,t){if(t===void 0&&(t=!1),n.labelStyleWidth==null){var i=n.label,r=i.style,a=n.rect,o=r.backgroundColor,s=r.padding,l=s?s[1]+s[3]:0,u=r.overflow,c=a.width+(o?0:l);if(e<c||t){var d=a.height;if(u&&u.match("break")){i.setStyle("backgroundColor",null),i.setStyle("width",e-l);var h=i.getBoundingRect();i.setStyle("width",Math.ceil(h.width)),i.setStyle("backgroundColor",o)}else{var f=e-l,p=e<c?f:t?f>n.unconstrainedWidth?null:f:null;i.setStyle("width",p)}var m=i.getBoundingRect();a.width=m.width;var v=(i.style.margin||0)+2.1;a.height=m.height+v,a.y-=(a.height-d)/2}}}function mx(n){return n.position==="center"}function G9e(n){var e=n.getData(),t=[],i,r,a=!1,o=(n.get("minShowLabelAngle")||0)*B9e,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,d=s.y,h=s.height;function f(C){C.ignore=!0}function p(C){if(!C.ignore)return!0;for(var M in C.states)if(C.states[M].ignore===!1)return!0;return!1}e.each(function(C){var M=e.getItemGraphicEl(C),I=M.shape,D=M.getTextContent(),E=M.getTextGuideLine(),P=e.getItemModel(C),F=P.getModel("label"),V=F.get("position")||P.get(["emphasis","label","position"]),G=F.get("distanceToLabelLine"),W=F.get("alignTo"),Y=_n(F.get("edgeDistance"),u),Q=F.get("bleedMargin"),K=P.getModel("labelLine"),ae=K.get("length");ae=_n(ae,u);var ie=K.get("length2");if(ie=_n(ie,u),Math.abs(I.endAngle-I.startAngle)<o){ne(D.states,f),D.ignore=!0,E&&(ne(E.states,f),E.ignore=!0);return}if(p(D)){var he=(I.startAngle+I.endAngle)/2,Ee=Math.cos(he),He=Math.sin(he),xe,Fe,pt,Ot;i=I.cx,r=I.cy;var bt=V==="inside"||V==="inner";if(V==="center")xe=I.cx,Fe=I.cy,Ot="center";else{var ht=(bt?(I.r+I.r0)/2*Ee:I.r*Ee)+i,Kt=(bt?(I.r+I.r0)/2*He:I.r*He)+r;if(xe=ht+Ee*3,Fe=Kt+He*3,!bt){var Tt=ht+Ee*(ae+l-I.r),Ae=Kt+He*(ae+l-I.r),Lt=Tt+(Ee<0?-1:1)*ie,vt=Ae;W==="edge"?xe=Ee<0?c+Y:c+u-Y:xe=Lt+(Ee<0?-G:G),Fe=vt,pt=[[ht,Kt],[Tt,Ae],[Lt,vt]]}Ot=bt?"center":W==="edge"?Ee>0?"right":"left":Ee>0?"left":"right"}var Ft=Math.PI,k=0,_t=F.get("rotate");if(Yi(_t))k=_t*(Ft/180);else if(V==="center")k=0;else if(_t==="radial"||_t===!0){var Ct=Ee<0?-he+Ft:-he;k=Ct}else if(_t==="tangential"&&V!=="outside"&&V!=="outer"){var J=Math.atan2(Ee,He);J<0&&(J=Ft*2+J);var ee=He>0;ee&&(J=Ft+J),k=J-Ft}if(a=!!k,D.x=xe,D.y=Fe,D.rotation=k,D.setStyle({verticalAlign:"middle"}),bt){D.setStyle({align:Ot});var Bt=D.states.select;Bt&&(Bt.x+=D.x,Bt.y+=D.y)}else{var Ue=D.getBoundingRect().clone();Ue.applyTransform(D.getComputedTransform());var xt=(D.style.margin||0)+2.1;Ue.y-=xt/2,Ue.height+=xt,t.push({label:D,labelLine:E,position:V,len:ae,len2:ie,minTurnAngle:K.get("minTurnAngle"),maxSurfaceAngle:K.get("maxSurfaceAngle"),surfaceNormal:new fi(Ee,He),linePoints:pt,textAlign:Ot,labelDistance:G,labelAlignTo:W,edgeDistance:Y,bleedMargin:Q,rect:Ue,unconstrainedWidth:Ue.width,labelStyleWidth:D.style.width})}M.setTextConfig({inside:bt})}}),!a&&n.get("avoidLabelOverlap")&&z9e(t,i,r,l,u,h,c,d);for(var m=0;m<t.length;m++){var v=t[m],g=v.label,_=v.labelLine,S=isNaN(g.x)||isNaN(g.y);if(g){g.setStyle({align:v.textAlign}),S&&(ne(g.states,f),g.ignore=!0);var x=g.states.select;x&&(x.x+=g.x,x.y+=g.y)}if(_){var A=v.linePoints;S||!A?(ne(_.states,f),_.ignore=!0):(cK(A,v.minTurnAngle),Zme(A,v.surfaceNormal,v.maxSurfaceAngle),_.setShape({points:A}),g.__hostTarget.textGuideLineConfig={anchor:new fi(A[0][0],A[0][1])})}}}var U9e=function(n){ot(e,n);function e(t,i,r){var a=n.call(this)||this;a.z2=2;var o=new Xi;return a.setTextContent(o),a.updateData(t,i,r,!0),a}return e.prototype.updateData=function(t,i,r,a){var o=this,s=t.hostModel,l=t.getItemModel(i),u=l.getModel("emphasis"),c=t.getItemLayout(i),d=It(cp(l.getModel("itemStyle"),c,!0),c);if(isNaN(d.startAngle)){o.setShape(d);return}if(a){o.setShape(d);var h=s.getShallow("animationType");s.ecModel.ssr?(sa(o,{scaleX:0,scaleY:0},s,{dataIndex:i,isFrom:!0}),o.originX=d.cx,o.originY=d.cy):h==="scale"?(o.shape.r=c.r0,sa(o,{shape:{r:c.r}},s,i)):r!=null?(o.setShape({startAngle:r,endAngle:r}),sa(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,i)):(o.shape.endAngle=c.startAngle,Qi(o,{shape:{endAngle:c.endAngle}},s,i))}else iu(o),Qi(o,{shape:d},s,i);o.useStyle(t.getItemVisual(i,"style")),jo(o,l);var f=(c.startAngle+c.endAngle)/2,p=s.get("selectedOffset"),m=Math.cos(f)*p,v=Math.sin(f)*p,g=l.getShallow("cursor");g&&o.attr("cursor",g),this._updateLabel(s,t,i),o.ensureState("emphasis").shape=It({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},cp(u.getModel("itemStyle"),c)),It(o.ensureState("select"),{x:m,y:v,shape:cp(l.getModel(["select","itemStyle"]),c)}),It(o.ensureState("blur"),{shape:cp(l.getModel(["blur","itemStyle"]),c)});var _=o.getTextGuideLine(),S=o.getTextContent();_&&It(_.ensureState("select"),{x:m,y:v}),It(S.ensureState("select"),{x:m,y:v}),ya(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,i,r){var a=this,o=i.getItemModel(r),s=o.getModel("labelLine"),l=i.getItemVisual(r,"style"),u=l&&l.fill,c=l&&l.opacity;$o(a,_o(o),{labelFetcher:i.hostModel,labelDataIndex:r,inheritColor:u,defaultOpacity:c,defaultText:t.getFormattedLabel(r,"normal")||i.getName(r)});var d=a.getTextContent();a.setTextConfig({position:null,rotation:null}),d.attr({z2:10});var h=t.get(["label","position"]);if(h!=="outside"&&h!=="outer")a.removeTextGuideLine();else{var f=this.getTextGuideLine();f||(f=new hl,this.setTextGuideLine(f)),KE(this,ZE(o),{stroke:u,opacity:Hu(s.get(["lineStyle","opacity"]),c,1)})}},e}(ll),V9e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,i,r,a){var o=t.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),d=1;isNaN(c&&c.startAngle)&&d<o.count();++d)c=o.getItemLayout(d);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&t.get("showEmptyCircle")){var h=WK(t),f=new ll({shape:It(HK(t,r),h)});f.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=f,l.add(f)}o.diff(s).add(function(p){var m=new U9e(o,p,u);o.setItemGraphicEl(p,m),l.add(m)}).update(function(p,m){var v=s.getItemGraphicEl(m);v.updateData(o,p,u),v.off("click"),l.add(v),o.setItemGraphicEl(p,v)}).remove(function(p){var m=s.getItemGraphicEl(p);L9(m,t,p)}).execute(),G9e(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,i){var r=i.getData(),a=r.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}(Yr);const H9e=V9e;function Jv(n,e,t){e=$t(e)&&{coordDimensions:e}||It({encodeDefine:n.getEncode()},e);var i=n.getSource(),r=T3(i,e).dimensions,a=new Rs(r,n);return a.initData(i,t),a}var W9e=function(){function n(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return n.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},n.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},n.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},n.prototype.getItemVisual=function(e,t){var i=this._getDataWithEncodedVisual();return i.getItemVisual(e,t)},n}();const L3=W9e;var j9e=Gi(),$9e=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.init=function(t){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new L3(An(this.getData,this),An(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){n.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Jv(this,{coordDimensions:["value"],encodeDefaulter:si(EE,this)})},e.prototype.getDataParams=function(t){var i=this.getData(),r=j9e(i),a=r.seats;if(!a){var o=[];i.each(i.mapDimension("value"),function(l){o.push(l)}),a=r.seats=ehe(o,i.hostModel.get("percentPrecision"))}var s=n.prototype.getDataParams.call(this,t);return s.percent=a[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){Fp(t,"labelLine",["show"]);var i=t.labelLine,r=t.emphasis.labelLine;i.show=i.show&&t.label.show,r.show=r.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}(pa);const q9e=$9e;function X9e(n){return{seriesType:n,reset:function(e,t){var i=e.getData();i.filterSelf(function(r){var a=i.mapDimension("value"),o=i.get(a,r);return!(Yi(o)&&!isNaN(o)&&o<0)})}}}function Y9e(n){n.registerChartView(H9e),n.registerSeriesModel(q9e),oY("pie",n.registerAction),n.registerLayout(si(O9e,"pie")),n.registerProcessor(R3("pie")),n.registerProcessor(X9e("pie"))}var K9e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,i){return nd(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,i,r){return r.point(i.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}(pa);const Z9e=K9e;var $K=4,J9e=function(){function n(){}return n}(),Q9e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i._off=0,i.hoverDataIdx=-1,i}return e.prototype.getDefaultShape=function(){return new J9e},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,i){var r=i.points,a=i.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&a[0]<$K,c=this.softClipShape,d;if(u){this._ctx=l;return}for(this._ctx=null,d=this._off;d<r.length;){var h=r[d++],f=r[d++];isNaN(h)||isNaN(f)||c&&!c.contain(h,f)||(s.x=h-a[0]/2,s.y=f-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(t,s,!0))}this.incremental&&(this._off=d,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,i=t.points,r=t.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<i.length;){var l=i[s++],u=i[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-r[0]/2,u-r[1]/2,r[0],r[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(t,i){for(var r=this.shape,a=r.points,o=r.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,d=a[c]-s/2,h=a[c+1]-l/2;if(t>=d&&i>=h&&t<=d+s&&i<=h+l)return u}return-1},e.prototype.contain=function(t,i){var r=this.transformCoordToLocal(t,i),a=this.getBoundingRect();if(t=r[0],i=r[1],a.contain(t,i)){var o=this.hoverDataIdx=this.findDataIndex(t,i);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var i=this.shape,r=i.points,a=i.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,d=-1/0,h=0;h<r.length;){var f=r[h++],p=r[h++];l=Math.min(f,l),c=Math.max(f,c),u=Math.min(p,u),d=Math.max(p,d)}t=this._rect=new gi(l-o/2,u-s/2,c-l+o,d-u+s)}return t},e}(Ei),e3e=function(){function n(){this.group=new ei}return n.prototype.updateData=function(e,t){this._clear();var i=this._create();i.setShape({points:e.getLayout("points")}),this._setCommon(i,e,t)},n.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(i){if(i.startIndex!=null){var r=(i.endIndex-i.startIndex)*2,a=i.startIndex*4*2;t=new Float32Array(t.buffer,a,r)}i.setShape("points",t),i.reset()})},n.prototype.incrementalPrepareUpdate=function(e){this._clear()},n.prototype.incrementalUpdate=function(e,t,i){var r=this._newAdded[0],a=t.getLayout("points"),o=r&&r.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),r.endIndex=e.end,r.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,i)}},n.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},n.prototype._create=function(){var e=new Q9e({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},n.prototype._setCommon=function(e,t,i){var r=t.hostModel;i=i||{};var a=t.getVisual("symbolSize");e.setShape("size",a instanceof Array?a:[a,a]),e.softClipShape=i.clipShape||null,e.symbolProxy=Ya(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<$K;e.useStyle(r.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=ni(e);u.seriesIndex=r.seriesIndex,e.on("mousemove",function(c){u.dataIndex=null;var d=e.hoverDataIdx;d>=0&&(u.dataIndex=d+(e.startIndex||0))})},n.prototype.remove=function(){this._clear()},n.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},n}();const t3e=e3e;var n3e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.updateData(a,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,i,r){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(t,i,r){this._symbolDraw.incrementalUpdate(t,i.getData(),{clipShape:this._getClipShape(i)}),this._finished=t.end===i.getData().count()},e.prototype.updateTransform=function(t,i,r){var a=t.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=P3("").reset(t,i,r);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 i=t.coordinateSystem;return i&&i.getArea&&i.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,i){var r=this._symbolDraw,a=i.pipelineContext,o=a.large;return(!r||o!==this._isLargeDraw)&&(r&&r.remove(),r=this._symbolDraw=o?new t3e:new M3,this._isLargeDraw=o,this.group.removeAll()),this.group.add(r.group),r},e.prototype.remove=function(t,i){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Yr);const i3e=n3e;var r3e=function(n){ot(e,n);function e(){return n!==null&&n.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}($i);const a3e=r3e;var ZA=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Xa).models[0]},e.type="cartesian2dAxis",e}($i);Za(ZA,A3);var qK={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)"]}}},o3e=ui({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},qK),iP=ui({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}}},qK),s3e=ui({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},iP),l3e=qn({logBase:10},iP);const XK={category:o3e,value:iP,time:s3e,log:l3e};var u3e={value:1,category:1,time:1,log:1};function yv(n,e,t,i){ne(u3e,function(r,a){var o=ui(ui({},XK[a],!0),i,!0),s=function(l){ot(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,d){var h=D9(this),f=h?jv(c):{},p=d.getTheme();ui(c,p.get(a+"Axis")),ui(c,this.getDefaultOption()),c.type=yO(c),h&&Rh(c,f,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=WA.createByAxisModel(this))},u.prototype.getCategories=function(c){var d=this.option;if(d.type==="category")return c?d.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+a,u.defaultOption=o,u}(t);n.registerComponentModel(s)}),n.registerSubTypeDefaulter(e+"Axis",yO)}function yO(n){return n.type||(n.data?"category":"value")}var c3e=function(){function n(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return n.prototype.getAxis=function(e){return this._axes[e]},n.prototype.getAxes=function(){return Xt(this._dimList,function(e){return this._axes[e]},this)},n.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),dr(this.getAxes(),function(t){return t.scale.type===e})},n.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},n}();const d3e=c3e;var JA=["x","y"];function _O(n){return n.type==="interval"||n.type==="time"}var h3e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=JA,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!_O(t)||!_O(i))){var r=t.getExtent(),a=i.getExtent(),o=this.dataToPoint([r[0],a[0]]),s=this.dataToPoint([r[1],a[1]]),l=r[1]-r[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,d=(s[1]-o[1])/u,h=o[0]-r[0]*c,f=o[1]-a[0]*d,p=this._transform=[c,0,0,d,h,f];this._invTransform=Bv([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var i=this.getAxis("x"),r=this.getAxis("y");return i.contain(i.toLocalCoord(t[0]))&&r.contain(r.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,i){var r=this.dataToPoint(t),a=this.dataToPoint(i),o=this.getArea(),s=new gi(r[0],r[1],a[0]-r[0],a[1]-r[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,i,r){r=r||[];var a=t[0],o=t[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Ho(r,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return r[0]=s.toGlobalCoord(s.dataToCoord(a,i)),r[1]=l.toGlobalCoord(l.dataToCoord(o,i)),r},e.prototype.clampData=function(t,i){var r=this.getAxis("x").scale,a=this.getAxis("y").scale,o=r.getExtent(),s=a.getExtent(),l=r.parse(t[0]),u=a.parse(t[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},e.prototype.pointToData=function(t,i){var r=[];if(this._invTransform)return Ho(r,t,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return r[0]=a.coordToData(a.toLocalCoord(t[0]),i),r[1]=o.coordToData(o.toLocalCoord(t[1]),i),r},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var i=this.getAxis("x").getGlobalExtent(),r=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-t,o=Math.min(r[0],r[1])-t,s=Math.max(i[0],i[1])-a+t,l=Math.max(r[0],r[1])-o+t;return new gi(a,o,s,l)},e}(d3e),f3e=function(n){ot(e,n);function e(t,i,r,a,o){var s=n.call(this,t,i,r)||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 i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),t&&i[0]>i[1]&&i.reverse(),i},e.prototype.pointToData=function(t,i){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),i)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(ou);const p3e=f3e;function QA(n,e,t){t=t||{};var i=n.coordinateSystem,r=e.axis,a={},o=r.getAxesOnZeroOf()[0],s=r.position,l=o?"onZero":s,u=r.dim,c=i.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p=u==="x"?[d[2]-f,d[3]+f]:[d[0]-f,d[1]+f];if(o){var m=o.toGlobalCoord(o.dataToCoord(0));p[h.onZero]=Math.max(Math.min(m,p[1]),p[0])}a.position=[u==="y"?p[h[l]]:d[0],u==="x"?p[h[l]]:d[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[h[s]]-p[h.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Ro(t.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var g=e.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-g:g,a.z2=1,a}function SO(n){return n.get("coordinateSystem")==="cartesian2d"}function bO(n){var e={xAxisModel:null,yAxisModel:null};return ne(e,function(t,i){var r=i.replace(/Model$/,""),a=n.getReferringComponents(r,Xa).models[0];e[i]=a}),e}var gx=Math.log;function YK(n,e,t){var i=Ih.prototype,r=i.getTicks.call(t),a=i.getTicks.call(t,!0),o=r.length-1,s=i.getInterval.call(t),l=ZY(n,e),u=l.extent,c=l.fixMin,d=l.fixMax;if(n.type==="log"){var h=gx(n.base);u=[gx(u[0])/h,gx(u[1])/h]}n.setExtent(u[0],u[1]),n.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:d});var f=i.getExtent.call(n);c&&(u[0]=f[0]),d&&(u[1]=f[1]);var p=i.getInterval.call(n),m=u[0],v=u[1];if(c&&d)p=(v-m)/o;else if(c)for(v=u[0]+p*o;v<u[1]&&isFinite(v)&&isFinite(u[1]);)p=nx(p),v=u[0]+p*o;else if(d)for(m=u[1]-p*o;m>u[0]&&isFinite(m)&&isFinite(u[0]);)p=nx(p),m=u[1]-p*o;else{var g=n.getTicks().length-1;g>o&&(p=nx(p));var _=p*o;v=Math.ceil(u[1]/p)*p,m=Ra(v-_),m<0&&u[0]>=0?(m=0,v=Ra(_)):v>0&&u[1]<=0&&(v=0,m=-Ra(_))}var S=(r[0].value-a[0].value)/s,x=(r[o].value-a[o].value)/s;i.setExtent.call(n,m+p*S,v+p*x),i.setInterval.call(n,p),(S||x)&&i.setNiceExtent.call(n,m+p,v-p)}var v3e=function(){function n(e,t,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=JA,this._initCartesian(e,t,i),this.model=e}return n.prototype.getRect=function(){return this._rect},n.prototype.update=function(e,t){var i=this._axesMap;this._updateScale(e,this.model);function r(o){var s,l=Li(o),u=l.length;if(u){for(var c=[],d=u-1;d>=0;d--){var h=+l[d],f=o[h],p=f.model,m=f.scale;jA(m)&&p.get("alignTicks")&&p.get("interval")==null?c.push(f):(mv(m,p),jA(m)&&(s=f))}c.length&&(s||(s=c.pop(),mv(s.scale,s.model)),ne(c,function(v){YK(v.scale,v.model,s.scale)}))}}r(i.x),r(i.y);var a={};ne(i.x,function(o){xO(i,"y",o,a)}),ne(i.y,function(o){xO(i,"x",o,a)}),this.resize(this.model,t)},n.prototype.resize=function(e,t,i){var r=e.getBoxLayoutParams(),a=!i&&e.get("containLabel"),o=uo(r,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(ne(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=Mme(u);if(c){var d=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[d]-=c[d]+h,u.position==="top"?o.y+=c.height+h:u.position==="left"&&(o.x+=c.width+h)}}}),l()),ne(this._coordsList,function(u){u.calcAffineTransform()});function l(){ne(s,function(u){var c=u.isHorizontal(),d=c?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(d[h],d[1-h]),m3e(u,c?o.x:o.y)})}},n.prototype.getAxis=function(e,t){var i=this._axesMap[e];if(i!=null)return i[t||0]},n.prototype.getAxes=function(){return this._axesList.slice()},n.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var i="x"+e+"y"+t;return this._coordsMap[i]}Kn(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,a=this._coordsList;r<a.length;r++)if(a[r].getAxis("x").index===e||a[r].getAxis("y").index===t)return a[r]},n.prototype.getCartesians=function(){return this._coordsList.slice()},n.prototype.convertToPixel=function(e,t,i){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(i):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(i)):null},n.prototype.convertFromPixel=function(e,t,i){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(i):r.axis?r.axis.coordToData(r.axis.toLocalCoord(i)):null},n.prototype._findConvertTarget=function(e){var t=e.seriesModel,i=e.xAxisModel||t&&t.getReferringComponents("xAxis",Xa).models[0],r=e.yAxisModel||t&&t.getReferringComponents("yAxis",Xa).models[0],a=e.gridModel,o=this._coordsList,s,l;if(t)s=t.coordinateSystem,xi(o,s)<0&&(s=null);else if(i&&r)s=this.getCartesian(i.componentIndex,r.componentIndex);else if(i)l=this.getAxis("x",i.componentIndex);else if(r)l=this.getAxis("y",r.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},n.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},n.prototype._initCartesian=function(e,t,i){var r=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,ne(s.x,function(c,d){ne(s.y,function(h,f){var p="x"+d+"y"+f,m=new h3e(p);m.master=r,m.model=e,r._coordsMap[p]=m,r._coordsList.push(m),m.addAxis(c),m.addAxis(h)})});function u(c){return function(d,h){if(yx(d,e)){var f=d.get("position");c==="x"?f!=="top"&&f!=="bottom"&&(f=o.bottom?"top":"bottom"):f!=="left"&&f!=="right"&&(f=o.left?"right":"left"),o[f]=!0;var p=new p3e(c,q_(d),[0,0],d.get("type"),f),m=p.type==="category";p.onBand=m&&d.get("boundaryGap"),p.inverse=d.get("inverse"),d.axis=p,p.model=d,p.grid=a,p.index=h,a._axesList.push(p),s[c][h]=p,l[c]++}}}},n.prototype._updateScale=function(e,t){ne(this._axesList,function(r){if(r.scale.setExtent(1/0,-1/0),r.type==="category"){var a=r.model.get("categorySortInfo");r.scale.setSortInfo(a)}}),e.eachSeries(function(r){if(SO(r)){var a=bO(r),o=a.xAxisModel,s=a.yAxisModel;if(!yx(o,t)||!yx(s,t))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=r.getData(),c=l.getAxis("x"),d=l.getAxis("y");i(u,c),i(u,d)}},this);function i(r,a){ne(s8(r,a.dim),function(o){a.scale.unionExtentFromData(r,o)})}},n.prototype.getTooltipAxes=function(e){var t=[],i=[];return ne(this.getCartesians(),function(r){var a=e!=null&&e!=="auto"?r.getAxis(e):r.getBaseAxis(),o=r.getOtherAxis(a);xi(t,a)<0&&t.push(a),xi(i,o)<0&&i.push(o)}),{baseAxes:t,otherAxes:i}},n.create=function(e,t){var i=[];return e.eachComponent("grid",function(r,a){var o=new n(r,e,t);o.name="grid_"+a,o.resize(r,t,!0),r.coordinateSystem=o,i.push(o)}),e.eachSeries(function(r){if(SO(r)){var a=bO(r),o=a.xAxisModel,s=a.yAxisModel,l=o.getCoordSysModel(),u=l.coordinateSystem;r.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),i},n.dimensions=JA,n}();function yx(n,e){return n.getCoordSysModel()===e}function xO(n,e,t,i){t.getAxesOnZeroOf=function(){return a?[a]:[]};var r=n[e],a,o=t.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)wO(r[l])&&(a=r[l]);else for(var u in r)if(r.hasOwnProperty(u)&&wO(r[u])&&!i[c(r[u])]){a=r[u];break}a&&(i[c(a)]=!0);function c(d){return d.dim+"_"+d.index}}function wO(n){return n&&n.type!=="category"&&n.type!=="time"&&Cme(n)}function m3e(n,e){var t=n.getExtent(),i=t[0]+t[1];n.toGlobalCoord=n.dim==="x"?function(r){return r+e}:function(r){return i-r+e},n.toLocalCoord=n.dim==="x"?function(r){return r-e}:function(r){return i-r+e}}const g3e=v3e;var oh=Math.PI,Mp=function(){function n(e,t){this.group=new ei,this.opt=t,this.axisModel=e,qn(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var i=new ei({x:t.position[0],y:t.position[1],rotation:t.rotation});i.updateTransform(),this._transformGroup=i}return n.prototype.hasBuilder=function(e){return!!TO[e]},n.prototype.add=function(e){TO[e](this.opt,this.axisModel,this.group,this._transformGroup)},n.prototype.getGroup=function(){return this.group},n.innerTextLayout=function(e,t,i){var r=$$(t-e),a,o;return C9(r)?(o=i>0?"top":"bottom",a="center"):C9(r-oh)?(o=i>0?"bottom":"top",a="center"):(o="middle",r>0&&r<oh?a=i>0?"right":"left":a=i>0?"left":"right"),{rotation:r,textAlign:a,textVerticalAlign:o}},n.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},n.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},n}(),TO={axisLine:function(n,e,t,i){var r=e.get(["axisLine","show"]);if(r==="auto"&&n.handleAutoShown&&(r=n.handleAutoShown("axisLine")),!!r){var a=e.axis.getExtent(),o=i.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(Ho(s,s,o),Ho(l,l,o));var c=It({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new Lo({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:n.strokeContainThreshold||5,silent:!0,z2:1});fv(d.shape,d.style.lineWidth),d.anid="line",t.add(d);var h=e.get(["axisLine","symbol"]);if(h!=null){var f=e.get(["axisLine","symbolSize"]);xn(h)&&(h=[h,h]),(xn(f)||Yi(f))&&(f=[f,f]);var p=n1(e.get(["axisLine","symbolOffset"])||0,f),m=f[0],v=f[1];ne([{rotate:n.rotation+Math.PI/2,offset:p[0],r:0},{rotate:n.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(g,_){if(h[_]!=="none"&&h[_]!=null){var S=Ya(h[_],-m/2,-v/2,m,v,c.stroke,!0),x=g.r+g.offset,A=u?l:s;S.attr({rotation:g.rotate,x:A[0]+x*Math.cos(n.rotation),y:A[1]-x*Math.sin(n.rotation),silent:!0,z2:11}),t.add(S)}})}}},axisTickLabel:function(n,e,t,i){var r=S3e(t,i,e,n),a=x3e(t,i,e,n);if(_3e(e,a,r),b3e(t,i,e,n.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=dK(Xt(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));pK(o)}},axisName:function(n,e,t,i){var r=Ro(n.axisName,e.get("name"));if(r){var a=e.get("nameLocation"),o=n.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),c=u[0]>u[1]?-1:1,d=[a==="start"?u[0]-c*l:a==="end"?u[1]+c*l:(u[0]+u[1])/2,CO(a)?n.labelOffset+o*l:0],h,f=e.get("nameRotate");f!=null&&(f=f*oh/180);var p;CO(a)?h=Mp.innerTextLayout(n.rotation,f!=null?f:n.rotation,o):(h=y3e(n.rotation,a,f||0,u),p=n.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(h.rotation)),!isFinite(p)&&(p=null)));var m=s.getFont(),v=e.get("nameTruncate",!0)||{},g=v.ellipsis,_=Ro(n.nameTruncateMaxWidth,v.maxWidth,p),S=new Xi({x:d[0],y:d[1],rotation:h.rotation,silent:Mp.isLabelSilent(e),style:qr(s,{text:r,font:m,overflow:"truncate",width:_,ellipsis:g,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Qp({el:S,componentModel:e,itemName:r}),S.__fullText=r,S.anid="name",e.get("triggerEvent")){var x=Mp.makeAxisEventDataBase(e);x.targetType="axisName",x.name=r,ni(S).eventData=x}i.add(S),S.updateTransform(),t.add(S),S.decomposeTransform()}}};function y3e(n,e,t,i){var r=$$(t-n),a,o,s=i[0]>i[1],l=e==="start"&&!s||e!=="start"&&s;return C9(r-oh/2)?(o=l?"bottom":"top",a="center"):C9(r-oh*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",r<oh*1.5&&r>oh/2?a=l?"left":"right":a=l?"right":"left"),{rotation:r,textAlign:a,textVerticalAlign:o}}function _3e(n,e,t){if(!JY(n.axis)){var i=n.get(["axisLabel","showMinLabel"]),r=n.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],d=t[t.length-1],h=t[t.length-2];i===!1?(Kl(a),Kl(u)):AO(a,o)&&(i?(Kl(o),Kl(c)):(Kl(a),Kl(u))),r===!1?(Kl(s),Kl(d)):AO(l,s)&&(r?(Kl(l),Kl(h)):(Kl(s),Kl(d)))}}function Kl(n){n&&(n.ignore=!0)}function AO(n,e){var t=n&&n.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!t||!i)){var r=y_([]);return Jp(r,r,-n.rotation),t.applyTransform(Bc([],r,n.getLocalTransform())),i.applyTransform(Bc([],r,e.getLocalTransform())),t.intersect(i)}}function CO(n){return n==="middle"||n==="center"}function KK(n,e,t,i,r){for(var a=[],o=[],s=[],l=0;l<n.length;l++){var u=n[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=t,e&&(Ho(o,o,e),Ho(s,s,e));var c=new Lo({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});fv(c.shape,c.style.lineWidth),c.anid=r+"_"+n[l].tickValue,a.push(c)}return a}function S3e(n,e,t,i){var r=t.axis,a=t.getModel("axisTick"),o=a.get("show");if(o==="auto"&&i.handleAutoShown&&(o=i.handleAutoShown("axisTick")),!(!o||r.scale.isBlank())){for(var s=a.getModel("lineStyle"),l=i.tickDirection*a.get("length"),u=r.getTicksCoords(),c=KK(u,e.transform,l,qn(s.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}),"ticks"),d=0;d<c.length;d++)n.add(c[d]);return c}}function b3e(n,e,t,i){var r=t.axis,a=t.getModel("minorTick");if(!(!a.get("show")||r.scale.isBlank())){var o=r.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),l=i*a.get("length"),u=qn(s.getLineStyle(),qn(t.getModel("axisTick").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})),c=0;c<o.length;c++)for(var d=KK(o[c],e.transform,l,u,"minorticks_"+c),h=0;h<d.length;h++)n.add(d[h])}}function x3e(n,e,t,i){var r=t.axis,a=Ro(i.axisLabelShow,t.get(["axisLabel","show"]));if(!(!a||r.scale.isBlank())){var o=t.getModel("axisLabel"),s=o.get("margin"),l=r.getViewLabels(),u=(Ro(i.labelRotate,o.get("rotate"))||0)*oh/180,c=Mp.innerTextLayout(i.rotation,u,i.labelDirection),d=t.getCategories&&t.getCategories(!0),h=[],f=Mp.isLabelSilent(t),p=t.get("triggerEvent");return ne(l,function(m,v){var g=r.scale.type==="ordinal"?r.scale.getRawOrdinalNumber(m.tickValue):m.tickValue,_=m.formattedLabel,S=m.rawLabel,x=o;if(d&&d[g]){var A=d[g];Kn(A)&&A.textStyle&&(x=new Xr(A.textStyle,o,t.ecModel))}var C=x.getTextColor()||t.get(["axisLine","lineStyle","color"]),M=r.dataToCoord(g),I=x.getShallow("align",!0)||c.textAlign,D=ai(x.getShallow("alignMinLabel",!0),I),E=ai(x.getShallow("alignMaxLabel",!0),I),P=x.getShallow("verticalAlign",!0)||x.getShallow("baseline",!0)||c.textVerticalAlign,F=ai(x.getShallow("verticalAlignMinLabel",!0),P),V=ai(x.getShallow("verticalAlignMaxLabel",!0),P),G=new Xi({x:M,y:i.labelOffset+i.labelDirection*s,rotation:c.rotation,silent:f,z2:10+(m.level||0),style:qr(x,{text:_,align:v===0?D:v===l.length-1?E:I,verticalAlign:v===0?F:v===l.length-1?V:P,fill:$n(C)?C(r.type==="category"?S:r.type==="value"?g+"":g,v):C})});if(G.anid="label_"+g,Qp({el:G,componentModel:t,itemName:_,formatterParamsExtra:{isTruncated:function(){return G.isTruncated},value:S,tickIndex:v}}),p){var W=Mp.makeAxisEventDataBase(t);W.targetType="axisLabel",W.value=S,W.tickIndex=v,r.type==="category"&&(W.dataIndex=g),ni(G).eventData=W}e.add(G),G.updateTransform(),h.push(G),n.add(G),G.decomposeTransform()}),h}}const Yc=Mp;function w3e(n,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return T3e(t,n,e),t.seriesInvolved&&C3e(t,n),t}function T3e(n,e,t){var i=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),a=r.get("link",!0)||[],o=[];ne(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=U9(s.model),u=n.coordSysAxesInfo[l]={};n.coordSysMap[l]=s;var c=s.model,d=c.getModel("tooltip",i);if(ne(s.getAxes(),si(m,!1,null)),s.getTooltipAxes&&i&&d.get("show")){var h=d.get("trigger")==="axis",f=d.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(d.get(["axisPointer","axis"]));(h||f)&&ne(p.baseAxes,si(m,f?"cross":!0,h)),f&&ne(p.otherAxes,si(m,"cross",!1))}function m(v,g,_){var S=_.model.getModel("axisPointer",r),x=S.get("show");if(!(!x||x==="auto"&&!v&&!eC(S))){g==null&&(g=S.get("triggerTooltip")),S=v?A3e(_,d,r,e,v,g):S;var A=S.get("snap"),C=S.get("triggerEmphasis"),M=U9(_.model),I=g||A||_.type==="category",D=n.axesInfo[M]={key:M,axis:_,coordSys:s,axisPointerModel:S,triggerTooltip:g,triggerEmphasis:C,involveSeries:I,snap:A,useHandle:eC(S),seriesModels:[],linkGroup:null};u[M]=D,n.seriesInvolved=n.seriesInvolved||I;var E=M3e(a,_);if(E!=null){var P=o[E]||(o[E]={axesInfo:{}});P.axesInfo[M]=D,P.mapper=a[E].mapper,D.linkGroup=P}}}})}function A3e(n,e,t,i,r,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};ne(s,function(h){l[h]=Zn(o.get(h))}),l.snap=n.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),r==="cross"){var c=o.get(["label","show"]);if(u.show=c!=null?c:!0,!a){var d=l.lineStyle=o.get("crossStyle");d&&qn(u,d.textStyle)}}return n.model.getModel("axisPointer",new Xr(l,t,i))}function C3e(n,e){e.eachSeries(function(t){var i=t.coordinateSystem,r=t.get(["tooltip","trigger"],!0),a=t.get(["tooltip","show"],!0);!i||r==="none"||r===!1||r==="item"||a===!1||t.get(["axisPointer","show"],!0)===!1||ne(n.coordSysAxesInfo[U9(i.model)],function(o){var s=o.axis;i.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function M3e(n,e){for(var t=e.model,i=e.dim,r=0;r<n.length;r++){var a=n[r]||{};if(_x(a[i+"AxisId"],t.id)||_x(a[i+"AxisIndex"],t.componentIndex)||_x(a[i+"AxisName"],t.name))return r}}function _x(n,e){return n==="all"||$t(n)&&xi(n,e)>=0||n===e}function E3e(n){var e=rP(n);if(e){var t=e.axisPointerModel,i=e.axis.scale,r=t.option,a=t.get("status"),o=t.get("value");o!=null&&(o=i.parse(o));var s=eC(t);a==null&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),r.value=o,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}}function rP(n){var e=(n.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[U9(n)]}function P3e(n){var e=rP(n);return e&&e.axisPointerModel}function eC(n){return!!n.get(["handle","show"])}function U9(n){return n.type+"||"+n.id}var MO={},R3e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r,a){this.axisPointerClass&&E3e(t),n.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},e.prototype.updateAxisPointer=function(t,i,r,a){this._doUpdateAxisPointerClass(t,r,!1)},e.prototype.remove=function(t,i){var r=this._axisPointer;r&&r.remove(i)},e.prototype.dispose=function(t,i){this._disposeAxisPointer(i),n.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,i,r){var a=e.getAxisPointerClass(this.axisPointerClass);if(a){var o=P3e(t);o?(this._axisPointer||(this._axisPointer=new a)).render(t,o,i,r):this._disposeAxisPointer(i)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,i){MO[t]=i},e.getAxisPointerClass=function(t){return t&&MO[t]},e.type="axis",e}(xa);const a1=R3e;var tC=Gi();function ZK(n,e,t,i){var r=t.axis;if(!r.scale.isBlank()){var a=t.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=i.coordinateSystem.getRect(),u=r.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var c=s.length,d=tC(n).splitAreaColors,h=In(),f=0;if(d)for(var p=0;p<u.length;p++){var m=d.get(u[p].tickValue);if(m!=null){f=(m+(c-1)*p)%c;break}}var v=r.toGlobalCoord(u[0].coord),g=o.getAreaStyle();s=$t(s)?s:[s];for(var p=1;p<u.length;p++){var _=r.toGlobalCoord(u[p].coord),S=void 0,x=void 0,A=void 0,C=void 0;r.isHorizontal()?(S=v,x=l.y,A=_-S,C=l.height,v=S+A):(S=l.x,x=v,A=l.width,C=_-x,v=x+C);var M=u[p-1].tickValue;M!=null&&h.set(M,f),e.add(new Hi({anid:M!=null?"area_"+M:null,shape:{x:S,y:x,width:A,height:C},style:qn({fill:s[f]},g),autoBatch:!0,silent:!0})),f=(f+1)%c}tC(n).splitAreaColors=h}}}function JK(n){tC(n).splitAreaColors=null}var L3e=["axisLine","axisTickLabel","axisName"],I3e=["splitArea","splitLine","minorSplitLine"],QK=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,i,r,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ei,this.group.add(this._axisGroup),!!t.get("show")){var s=t.getCoordSysModel(),l=QA(s,t),u=new Yc(t,It({handleAutoShown:function(d){for(var h=s.coordinateSystem.getCartesians(),f=0;f<h.length;f++)if(jA(h[f].getOtherAxis(t.axis).scale))return!0;return!1}},l));ne(L3e,u.add,u),this._axisGroup.add(u.getGroup()),ne(I3e,function(d){t.get([d,"show"])&&D3e[d](this,this._axisGroup,t,s)},this);var c=a&&a.type==="changeAxisOrder"&&a.isInitSort;c||S3(o,this._axisGroup,t),n.prototype.render.call(this,t,i,r,a)}},e.prototype.remove=function(){JK(this)},e.type="cartesianAxis",e}(a1),D3e={splitLine:function(n,e,t,i){var r=t.axis;if(!r.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=$t(s)?s:[s];for(var c=i.coordinateSystem.getRect(),d=r.isHorizontal(),h=0,f=r.getTicksCoords({tickModel:a}),p=[],m=[],v=o.getLineStyle(),g=0;g<f.length;g++){var _=r.toGlobalCoord(f[g].coord);if(!(g===0&&!l||g===f.length-1&&!u)){var S=f[g].tickValue;d?(p[0]=_,p[1]=c.y,m[0]=_,m[1]=c.y+c.height):(p[0]=c.x,p[1]=_,m[0]=c.x+c.width,m[1]=_);var x=h++%s.length,A=new Lo({anid:S!=null?"line_"+S:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:m[0],y2:m[1]},style:qn({stroke:s[x]},v),silent:!0});fv(A.shape,v.lineWidth),e.add(A)}}}},minorSplitLine:function(n,e,t,i){var r=t.axis,a=t.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=i.coordinateSystem.getRect(),l=r.isHorizontal(),u=r.getMinorTicksCoords();if(u.length)for(var c=[],d=[],h=o.getLineStyle(),f=0;f<u.length;f++)for(var p=0;p<u[f].length;p++){var m=r.toGlobalCoord(u[f][p].coord);l?(c[0]=m,c[1]=s.y,d[0]=m,d[1]=s.y+s.height):(c[0]=s.x,c[1]=m,d[0]=s.x+s.width,d[1]=m);var v=new Lo({anid:"minor_line_"+u[f][p].tickValue,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:h,silent:!0});fv(v.shape,h.lineWidth),e.add(v)}},splitArea:function(n,e,t,i){ZK(n,e,t,i)}},eZ=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e}(QK),N3e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=eZ.type,t}return e.type="yAxis",e}(QK),k3e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,i){this.group.removeAll(),t.get("show")&&this.group.add(new Hi({shape:t.coordinateSystem.getRect(),style:qn({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(xa),EO={offset:0};function tZ(n){n.registerComponentView(k3e),n.registerComponentModel(a3e),n.registerCoordinateSystem("cartesian2d",g3e),yv(n,"x",ZA,EO),yv(n,"y",ZA,EO),n.registerComponentView(eZ),n.registerComponentView(N3e),n.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function F3e(n){Ci(tZ),n.registerSeriesModel(Z9e),n.registerChartView(i3e),n.registerLayout(P3("scatter"))}function O3e(n){n.eachSeriesByType("radar",function(e){var t=e.getData(),i=[],r=e.coordinateSystem;if(r){var a=r.getIndicatorAxes();ne(a,function(o,s){t.each(t.mapDimension(a[s].dim),function(l,u){i[u]=i[u]||[];var c=r.dataToPoint(l,s);i[u][s]=PO(c)?c:RO(r)})}),t.each(function(o){var s=Sce(i[o],function(l){return PO(l)})||RO(r);i[o].push(s.slice()),t.setItemLayout(o,i[o])})}})}function PO(n){return!isNaN(n[0])&&!isNaN(n[1])}function RO(n){return[n.cx,n.cy]}function B3e(n){var e=n.polar;if(e){$t(e)||(e=[e]);var t=[];ne(e,function(i,r){i.indicator?(i.type&&!i.shape&&(i.shape=i.type),n.radar=n.radar||[],$t(n.radar)||(n.radar=[n.radar]),n.radar.push(i)):t.push(i)}),n.polar=t}ne(n.series,function(i){i&&i.type==="radar"&&i.polarIndex&&(i.radarIndex=i.polarIndex)})}var z3e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a=t.coordinateSystem,o=this.group,s=t.getData(),l=this._data;function u(h,f){var p=h.getItemVisual(f,"symbol")||"circle";if(p!=="none"){var m=Kv(h.getItemVisual(f,"symbolSize")),v=Ya(p,-1,-1,2,2),g=h.getItemVisual(f,"symbolRotate")||0;return v.attr({style:{strokeNoScale:!0},z2:100,scaleX:m[0]/2,scaleY:m[1]/2,rotation:g*Math.PI/180||0}),v}}function c(h,f,p,m,v,g){p.removeAll();for(var _=0;_<f.length-1;_++){var S=u(m,v);S&&(S.__dimIdx=_,h[_]?(S.setPosition(h[_]),e1[g?"initProps":"updateProps"](S,{x:f[_][0],y:f[_][1]},t,v)):S.setPosition(f[_]),p.add(S))}}function d(h){return Xt(h,function(f){return[a.cx,a.cy]})}s.diff(l).add(function(h){var f=s.getItemLayout(h);if(f){var p=new ul,m=new hl,v={shape:{points:f}};p.shape.points=d(f),m.shape.points=d(f),sa(p,v,t,h),sa(m,v,t,h);var g=new ei,_=new ei;g.add(m),g.add(p),g.add(_),c(m.shape.points,f,_,s,h,!0),s.setItemGraphicEl(h,g)}}).update(function(h,f){var p=l.getItemGraphicEl(f),m=p.childAt(0),v=p.childAt(1),g=p.childAt(2),_={shape:{points:s.getItemLayout(h)}};_.shape.points&&(c(m.shape.points,_.shape.points,g,s,h,!1),iu(v),iu(m),Qi(m,_,t),Qi(v,_,t),s.setItemGraphicEl(h,p))}).remove(function(h){o.remove(l.getItemGraphicEl(h))}).execute(),s.eachItemGraphicEl(function(h,f){var p=s.getItemModel(f),m=h.childAt(0),v=h.childAt(1),g=h.childAt(2),_=s.getItemVisual(f,"style"),S=_.fill;o.add(h),m.useStyle(qn(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:S})),jo(m,p,"lineStyle"),jo(v,p,"areaStyle");var x=p.getModel("areaStyle"),A=x.isEmpty()&&x.parentModel.isEmpty();v.ignore=A,ne(["emphasis","select","blur"],function(I){var D=p.getModel([I,"areaStyle"]),E=D.isEmpty()&&D.parentModel.isEmpty();v.ensureState(I).ignore=E&&A}),v.useStyle(qn(x.getAreaStyle(),{fill:S,opacity:.7,decal:_.decal}));var C=p.getModel("emphasis"),M=C.getModel("itemStyle").getItemStyle();g.eachChild(function(I){if(I instanceof qo){var D=I.style;I.useStyle(It({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},_))}else I.useStyle(_),I.setColor(S),I.style.strokeNoScale=!0;var E=I.ensureState("emphasis");E.style=Zn(M);var P=s.getStore().get(s.getDimensionIndex(I.__dimIdx),f);(P==null||isNaN(P))&&(P=""),$o(I,_o(p),{labelFetcher:s.hostModel,labelDataIndex:f,labelDimIndex:I.__dimIdx,defaultText:P,inheritColor:S,defaultOpacity:_.opacity})}),ya(h,C.get("focus"),C.get("blurScope"),C.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(Yr);const G3e=z3e;var U3e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new L3(An(this.getData,this),An(this.getRawData,this))},e.prototype.getInitialData=function(t,i){return Jv(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,i,r){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,c=XX(this,t);return So("section",{header:u,sortBlocks:!0,blocks:Xt(s,function(d){var h=a.get(a.mapDimension(d.dim),t);return So("nameValue",{markerType:"subItem",markerColor:c,name:d.name,value:h,sortParam:h})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var i=this.getData(),r=this.coordinateSystem,a=i.getValues(Xt(r.dimensions,function(u){return i.mapDimension(u)}),t),o=0,s=a.length;o<s;o++)if(!isNaN(a[o])){var l=r.getIndicatorAxes();return r.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}(pa);const V3e=U3e;var Wm=XK.value;function S6(n,e){return qn({show:e},n)}var H3e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),i=this.get("splitNumber"),r=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"]),d=this.get("axisNameGap"),h=this.get("triggerEvent"),f=Xt(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 m=l;p.color!=null&&(m=qn({color:p.color},l));var v=ui(Zn(p),{boundaryGap:t,splitNumber:i,scale:r,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:d,nameTextStyle:m,triggerEvent:h},!1);if(xn(c)){var g=v.name;v.name=c.replace("{value}",g!=null?g:"")}else $n(c)&&(v.name=c(v.name,v));var _=new Xr(v,null,this.ecModel);return Za(_,A3.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_},this);this._indicatorModels=f},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:ui({lineStyle:{color:"#bbb"}},Wm.axisLine),axisLabel:S6(Wm.axisLabel,!1),axisTick:S6(Wm.axisTick,!1),splitLine:S6(Wm.splitLine,!0),splitArea:S6(Wm.splitArea,!0),indicator:[]},e}($i);const W3e=H3e;var j3e=["axisLine","axisTickLabel","axisName"],$3e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a=this.group;a.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var i=t.coordinateSystem,r=i.getIndicatorAxes(),a=Xt(r,function(o){var s=o.model.get("showName")?o.name:"",l=new Yc(o.model,{axisName:s,position:[i.cx,i.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});ne(a,function(o){ne(j3e,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var i=t.coordinateSystem,r=i.getIndicatorAxes();if(!r.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"),d=s.get("show"),h=l.get("color"),f=u.get("color"),p=$t(h)?h:[h],m=$t(f)?f:[f],v=[],g=[];function _(W,Y,Q){var K=Q%Y.length;return W[K]=W[K]||[],K}if(a==="circle")for(var S=r[0].getTicksCoords(),x=i.cx,A=i.cy,C=0;C<S.length;C++){if(c){var M=_(v,p,C);v[M].push(new zh({shape:{cx:x,cy:A,r:S[C].coord}}))}if(d&&C<S.length-1){var M=_(g,m,C);g[M].push(new M_({shape:{cx:x,cy:A,r0:S[C].coord,r:S[C+1].coord}}))}}else for(var I,D=Xt(r,function(W,Y){var Q=W.getTicksCoords();return I=I==null?Q.length-1:Math.min(Q.length-1,I),Xt(Q,function(K){return i.coordToPoint(K.coord,Y)})}),E=[],C=0;C<=I;C++){for(var P=[],F=0;F<r.length;F++)P.push(D[F][C]);if(P[0]&&P.push(P[0].slice()),c){var M=_(v,p,C);v[M].push(new hl({shape:{points:P}}))}if(d&&E){var M=_(g,m,C-1);g[M].push(new ul({shape:{points:P.concat(E)}}))}E=P.slice().reverse()}var V=l.getLineStyle(),G=u.getAreaStyle();ne(g,function(W,Y){this.group.add(m0(W,{style:qn({stroke:"none",fill:m[Y%m.length]},G),silent:!0}))},this),ne(v,function(W,Y){this.group.add(m0(W,{style:qn({fill:"none",stroke:p[Y%p.length]},V),silent:!0}))},this)},e.type="radar",e}(xa);const q3e=$3e;var X3e=function(n){ot(e,n);function e(t,i,r){var a=n.call(this,t,i,r)||this;return a.type="value",a.angle=0,a.name="",a}return e}(ou);const Y3e=X3e;var K3e=function(){function n(e,t,i){this.dimensions=[],this._model=e,this._indicatorAxes=Xt(e.getIndicatorModels(),function(r,a){var o="indicator_"+a,s=new Y3e(o,new Ih);return s.name=r.get("name"),s.model=r,r.axis=s,this.dimensions.push(o),s},this),this.resize(e,i)}return n.prototype.getIndicatorAxes=function(){return this._indicatorAxes},n.prototype.dataToPoint=function(e,t){var i=this._indicatorAxes[t];return this.coordToPoint(i.dataToCoord(e),t)},n.prototype.coordToPoint=function(e,t){var i=this._indicatorAxes[t],r=i.angle,a=this.cx+e*Math.cos(r),o=this.cy-e*Math.sin(r);return[a,o]},n.prototype.pointToData=function(e){var t=e[0]-this.cx,i=e[1]-this.cy,r=Math.sqrt(t*t+i*i);t/=r,i/=r;for(var a=Math.atan2(-i,t),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],d=Math.abs(a-c.angle);d<o&&(s=c,l=u,o=d)}return[l,+(s&&s.coordToData(r))]},n.prototype.resize=function(e,t){var i=e.get("center"),r=t.getWidth(),a=t.getHeight(),o=Math.min(r,a)/2;this.cx=_n(i[0],r),this.cy=_n(i[1],a),this.startAngle=e.get("startAngle")*Math.PI/180;var s=e.get("radius");(xn(s)||Yi(s))&&(s=[0,s]),this.r0=_n(s[0],o),this.r=_n(s[1],o),ne(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)},n.prototype.update=function(e,t){var i=this._indicatorAxes,r=this._model;ne(i,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"))!==r)){var u=s.getData();ne(i,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=r.get("splitNumber"),o=new Ih;o.setExtent(0,a),o.setInterval(1),ne(i,function(s,l){YK(s.scale,s.model,o)})},n.prototype.convertToPixel=function(e,t,i){return console.warn("Not implemented."),null},n.prototype.convertFromPixel=function(e,t,i){return console.warn("Not implemented."),null},n.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},n.create=function(e,t){var i=[];return e.eachComponent("radar",function(r){var a=new n(r,e,t);i.push(a),r.coordinateSystem=a}),e.eachSeriesByType("radar",function(r){r.get("coordinateSystem")==="radar"&&(r.coordinateSystem=i[r.get("radarIndex")||0])}),i},n.dimensions=[],n}();const Z3e=K3e;function J3e(n){n.registerCoordinateSystem("radar",Z3e),n.registerComponentModel(W3e),n.registerComponentView(q3e),n.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(i){t.setItemVisual(i,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function Q3e(n){Ci(J3e),n.registerChartView(G3e),n.registerSeriesModel(V3e),n.registerLayout(O3e),n.registerProcessor(R3("radar")),n.registerPreprocessor(B3e)}var LO="\0_ec_interaction_mutex";function eye(n,e,t){var i=aP(n);i[e]=t}function tye(n,e,t){var i=aP(n),r=i[e];r===t&&(i[e]=null)}function IO(n,e){return!!aP(n)[e]}function aP(n){return n[LO]||(n[LO]={})}nc({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Ba);var nye=function(n){ot(e,n);function e(t){var i=n.call(this)||this;i._zr=t;var r=An(i._mousedownHandler,i),a=An(i._mousemoveHandler,i),o=An(i._mouseupHandler,i),s=An(i._mousewheelHandler,i),l=An(i._pinchHandler,i);return i.enable=function(u,c){this.disable(),this._opt=qn(Zn(c)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(t.on("mousedown",r),t.on("mousemove",a),t.on("mouseup",o)),(u===!0||u==="scale"||u==="zoom")&&(t.on("mousewheel",s),t.on("pinch",l))},i.disable=function(){t.off("mousedown",r),t.off("mousemove",a),t.off("mouseup",o),t.off("mousewheel",s),t.off("pinch",l)},i}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(!rN(t)){for(var i=t.target;i;){if(i.draggable)return;i=i.__hostTarget||i.parent}var r=t.offsetX,a=t.offsetY;this.pointerChecker&&this.pointerChecker(t,r,a)&&(this._x=r,this._y=a,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(!(!this._dragging||!u5("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||IO(this._zr,"globalPan"))){var i=t.offsetX,r=t.offsetY,a=this._x,o=this._y,s=i-a,l=r-o;this._x=i,this._y=r,this._opt.preventDefaultMouseMove&&Wc(t.event),nZ(this,"pan","moveOnMouseMove",t,{dx:s,dy:l,oldX:a,oldY:o,newX:i,newY:r,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){rN(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var i=u5("zoomOnMouseWheel",t,this._opt),r=u5("moveOnMouseWheel",t,this._opt),a=t.wheelDelta,o=Math.abs(a),s=t.offsetX,l=t.offsetY;if(!(a===0||!i&&!r)){if(i){var u=o>3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;Sx(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(r){var d=Math.abs(a),h=(a>0?1:-1)*(d>3?.4:d>1?.15:.05);Sx(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!IO(this._zr,"globalPan")){var i=t.pinchScale>1?1.1:1/1.1;Sx(this,"zoom",null,t,{scale:i,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(P0);function Sx(n,e,t,i,r){n.pointerChecker&&n.pointerChecker(i,r.originX,r.originY)&&(Wc(i.event),nZ(n,e,t,i,r))}function nZ(n,e,t,i,r){r.isAvailableBehavior=An(u5,null,t,i),n.trigger(e,r)}function u5(n,e,t){var i=t[n];return!n||i&&(!xn(i)||e.event[i+"Key"])}const I3=nye;function oP(n,e,t){var i=n.target;i.x+=e,i.y+=t,i.dirty()}function sP(n,e,t,i){var r=n.target,a=n.zoomLimit,o=n.zoom=n.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/n.zoom;n.zoom=o,r.x-=(t-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}var iye={axisPointer:1,tooltip:1,brush:1};function Y_(n,e,t){var i=e.getComponentByElement(n.topTarget),r=i&&i.coordinateSystem;return i&&i!==t&&!iye.hasOwnProperty(i.mainType)&&r&&r.model!==t}function iZ(n){if(xn(n)){var e=new DOMParser;n=e.parseFromString(n,"text/xml")}var t=n;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var bx,f8={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"},DO=Li(f8),p8={"alignment-baseline":"textBaseline","stop-color":"stopColor"},NO=Li(p8),rye=function(){function n(){this._defs={},this._root=null}return n.prototype.parse=function(e,t){t=t||{};var i=iZ(e);this._defsUsePending=[];var r=new ei;this._root=r;var a=[],o=i.getAttribute("viewBox")||"",s=parseFloat(i.getAttribute("width")||t.width),l=parseFloat(i.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Sl(i,r,null,!0,!1);for(var u=i.firstChild;u;)this._parseNode(u,r,a,null,!1,!1),u=u.nextSibling;sye(this._defs,this._defsUsePending),this._defsUsePending=[];var c,d;if(o){var h=K_(o);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(d=aZ(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var f=r;r=new ei,r.add(f),f.scaleX=f.scaleY=d.scale,f.x=d.x,f.y=d.y}return!t.ignoreRootClip&&s!=null&&l!=null&&r.setClipPath(new Hi({shape:{x:0,y:0,width:s,height:l}})),{root:r,width:s,height:l,viewBoxRect:c,viewBoxTransform:d,named:a}},n.prototype._parseNode=function(e,t,i,r,a,o){var s=e.nodeName.toLowerCase(),l,u=r;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!a){var c=bx[s];if(c&&Mn(bx,s)){l=c.call(this,e,t);var d=e.getAttribute("name");if(d){var h={name:d,namedFrom:null,svgNodeTagLower:s,el:l};i.push(h),s==="g"&&(u=h)}else r&&i.push({name:r.name,namedFrom:r,svgNodeTagLower:s,el:l});t.add(l)}}var f=kO[s];if(f&&Mn(kO,s)){var p=f.call(this,e),m=e.getAttribute("id");m&&(this._defs[m]=p)}}if(l&&l.isGroup)for(var v=e.firstChild;v;)v.nodeType===1?this._parseNode(v,l,i,u,a,o):v.nodeType===3&&o&&this._parseText(v,l),v=v.nextSibling},n.prototype._parseText=function(e,t){var i=new E9({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Zl(t,i),Sl(e,i,this._defsUsePending,!1,!1),aye(i,t);var r=i.style,a=r.fontSize;a&&a<9&&(r.fontSize=9,i.scaleX*=a/9,i.scaleY*=a/9);var o=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+"px",r.fontFamily||"sans-serif"].join(" ");r.font=o;var s=i.getBoundingRect();return this._textX+=s.width,t.add(i),i},n.internalField=function(){bx={g:function(e,t){var i=new ei;return Zl(t,i),Sl(e,i,this._defsUsePending,!1,!1),i},rect:function(e,t){var i=new Hi;return Zl(t,i),Sl(e,i,this._defsUsePending,!1,!1),i.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")}),i.silent=!0,i},circle:function(e,t){var i=new zh;return Zl(t,i),Sl(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),i.silent=!0,i},line:function(e,t){var i=new Lo;return Zl(t,i),Sl(e,i,this._defsUsePending,!1,!1),i.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")}),i.silent=!0,i},ellipse:function(e,t){var i=new mE;return Zl(t,i),Sl(e,i,this._defsUsePending,!1,!1),i.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")}),i.silent=!0,i},polygon:function(e,t){var i=e.getAttribute("points"),r;i&&(r=BO(i));var a=new ul({shape:{points:r||[]},silent:!0});return Zl(t,a),Sl(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,t){var i=e.getAttribute("points"),r;i&&(r=BO(i));var a=new hl({shape:{points:r||[]},silent:!0});return Zl(t,a),Sl(e,a,this._defsUsePending,!1,!1),a},image:function(e,t){var i=new qo;return Zl(t,i),Sl(e,i,this._defsUsePending,!1,!1),i.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")}),i.silent=!0,i},text:function(e,t){var i=e.getAttribute("x")||"0",r=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(r)+parseFloat(o);var s=new ei;return Zl(t,s),Sl(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var i=e.getAttribute("x"),r=e.getAttribute("y");i!=null&&(this._textX=parseFloat(i)),r!=null&&(this._textY=parseFloat(r));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new ei;return Zl(t,s),Sl(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,t){var i=e.getAttribute("d")||"",r=Lq(i);return Zl(t,r),Sl(e,r,this._defsUsePending,!1,!1),r.silent=!0,r}}}(),n}(),kO={lineargradient:function(n){var e=parseInt(n.getAttribute("x1")||"0",10),t=parseInt(n.getAttribute("y1")||"0",10),i=parseInt(n.getAttribute("x2")||"10",10),r=parseInt(n.getAttribute("y2")||"0",10),a=new po(e,t,i,r);return FO(n,a),OO(n,a),a},radialgradient:function(n){var e=parseInt(n.getAttribute("cx")||"0",10),t=parseInt(n.getAttribute("cy")||"0",10),i=parseInt(n.getAttribute("r")||"0",10),r=new Wq(e,t,i);return FO(n,r),OO(n,r),r}};function FO(n,e){var t=n.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function OO(n,e){for(var t=n.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var i=t.getAttribute("offset"),r=void 0;i&&i.indexOf("%")>0?r=parseInt(i,10)/100:i?r=parseFloat(i):r=0;var a={};rZ(t,a,a);var o=a.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:o})}t=t.nextSibling}}function Zl(n,e){n&&n.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),qn(e.__inheritedStyle,n.__inheritedStyle))}function BO(n){for(var e=K_(n),t=[],i=0;i<e.length;i+=2){var r=parseFloat(e[i]),a=parseFloat(e[i+1]);t.push([r,a])}return t}function Sl(n,e,t,i,r){var a=e,o=a.__inheritedStyle=a.__inheritedStyle||{},s={};n.nodeType===1&&(cye(n,e),rZ(n,o,s),i||dye(n,o,s)),a.style=a.style||{},o.fill!=null&&(a.style.fill=zO(a,"fill",o.fill,t)),o.stroke!=null&&(a.style.stroke=zO(a,"stroke",o.stroke,t)),ne(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(a.style[l]=parseFloat(o[l]))}),ne(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(a.style[l]=o[l])}),r&&(a.__selfStyle=s),o.lineDash&&(a.style.lineDash=Xt(K_(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(a.invisible=!0),o.display==="none"&&(a.ignore=!0)}function aye(n,e){var t=e.__selfStyle;if(t){var i=t.textBaseline,r=i;!i||i==="auto"||i==="baseline"?r="alphabetic":i==="before-edge"||i==="text-before-edge"?r="top":i==="after-edge"||i==="text-after-edge"?r="bottom":(i==="central"||i==="mathematical")&&(r="middle"),n.style.textBaseline=r}var a=e.__inheritedStyle;if(a){var o=a.textAlign,s=o;o&&(o==="middle"&&(s="center"),n.style.textAlign=s)}}var oye=/^url\(\s*#(.*?)\)/;function zO(n,e,t,i){var r=t&&t.match(oye);if(r){var a=K0(r[1]);i.push([n,e,a]);return}return t==="none"&&(t=null),t}function sye(n,e){for(var t=0;t<e.length;t++){var i=e[t];i[0].style[i[1]]=n[i[2]]}}var lye=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function K_(n){return n.match(lye)||[]}var uye=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,xx=Math.PI/180;function cye(n,e){var t=n.getAttribute("transform");if(t){t=t.replace(/,/g," ");var i=[],r=null;t.replace(uye,function(d,h,f){return i.push(h,f),""});for(var a=i.length-1;a>0;a-=2){var o=i[a],s=i[a-1],l=K_(o);switch(r=r||Dl(),s){case"translate":Ku(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":QM(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Jp(r,r,-parseFloat(l[0])*xx,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*xx);Bc(r,[1,0,u,1,0,0],r);break;case"skewY":var c=Math.tan(parseFloat(l[0])*xx);Bc(r,[1,c,0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5]);break}}e.setLocalTransform(r)}}var GO=/([^\s:;]+)\s*:\s*([^:;]+)/g;function rZ(n,e,t){var i=n.getAttribute("style");if(i){GO.lastIndex=0;for(var r;(r=GO.exec(i))!=null;){var a=r[1],o=Mn(f8,a)?f8[a]:null;o&&(e[o]=r[2]);var s=Mn(p8,a)?p8[a]:null;s&&(t[s]=r[2])}}}function dye(n,e,t){for(var i=0;i<DO.length;i++){var r=DO[i],a=n.getAttribute(r);a!=null&&(e[f8[r]]=a)}for(var i=0;i<NO.length;i++){var r=NO[i],a=n.getAttribute(r);a!=null&&(t[p8[r]]=a)}}function aZ(n,e){var t=e.width/n.width,i=e.height/n.height,r=Math.min(t,i);return{scale:r,x:-(n.x+n.width/2)*r+(e.x+e.width/2),y:-(n.y+n.height/2)*r+(e.y+e.height/2)}}function hye(n,e){var t=new rye;return t.parse(n,e)}var fye=In(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),pye=function(){function n(e,t){this.type="geoSVG",this._usedGraphicMap=In(),this._freedGraphics=[],this._mapName=e,this._parsedXML=iZ(t)}return n.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=mye(e.named),i=t.regions,r=t.regionsMap;this._regions=i,this._regionsMap=r}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},n.prototype._buildGraphic=function(e){var t,i;try{t=e&&hye(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},i=t.root,Ls(i!=null)}catch(v){throw new Error(`Invalid svg format
`+v.message)}var r=new ei;r.add(i),r.isGeoSVGGraphicRoot=!0;var a=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,d=void 0,h=void 0;if(a!=null?(u=0,d=a):s&&(u=s.x,d=s.width),o!=null?(c=0,h=o):s&&(c=s.y,h=s.height),u==null||c==null){var f=i.getBoundingRect();u==null&&(u=f.x,d=f.width),c==null&&(c=f.y,h=f.height)}l=this._boundingRect=new gi(u,c,d,h)}if(s){var p=aZ(s,l);i.scaleX=i.scaleY=p.scale,i.x=p.x,i.y=p.y}r.setClipPath(new Hi({shape:l.plain()}));var m=[];return ne(t.named,function(v){fye.get(v.svgNodeTagLower)!=null&&(m.push(v),vye(v.el))}),{root:r,boundingRect:l,named:m}},n.prototype.useGraphic=function(e){var t=this._usedGraphicMap,i=t.get(e);return i||(i=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,i),i)},n.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,i=t.get(e);i&&(t.removeKey(e),this._freedGraphics.push(i))},n}();function vye(n){n.silent=!1,n.isGroup&&n.traverse(function(e){e.silent=!1})}function mye(n){var e=[],t=In();return ne(n,function(i){if(i.namedFrom==null){var r=new Dme(i.name,i.el);e.push(r),t.set(i.name,r)}}),{regions:e,regionsMap:t}}var nC=[126,25],UO="南海诸岛",Vf=[[[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 If=0;If<Vf.length;If++)for(var z1=0;z1<Vf[If].length;z1++)Vf[If][z1][0]/=10.5,Vf[If][z1][1]/=-10.5/.75,Vf[If][z1][0]+=nC[0],Vf[If][z1][1]+=nC[1];function gye(n,e){if(n==="china"){for(var t=0;t<e.length;t++)if(e[t].name===UO)return;e.push(new eK(UO,Xt(Vf,function(i){return{type:"polygon",exterior:i}}),nC))}}var yye={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function _ye(n,e){if(n==="china"){var t=yye[e.name];if(t){var i=e.getCenter();i[0]+=t[0]/10.5,i[1]+=-t[1]/(10.5/.75),e.setCenter(i)}}}var Sye=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function bye(n,e){n==="china"&&e.name==="台湾"&&e.geometries.push({type:"polygon",exterior:Sye[0]})}var xye="name",wye=function(){function n(e,t,i){this.type="geoJSON",this._parsedMap=In(),this._mapName=e,this._specialAreas=i,this._geoJSON=Aye(t)}return n.prototype.load=function(e,t){t=t||xye;var i=this._parsedMap.get(t);if(!i){var r=this._parseToRegions(t);i=this._parsedMap.set(t,{regions:r,boundingRect:Tye(r)})}var a=In(),o=[];return ne(i.regions,function(s){var l=s.name;e&&Mn(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),a.set(l,s)}),{regions:o,boundingRect:i.boundingRect||new gi(0,0,0,0),regionsMap:a}},n.prototype._parseToRegions=function(e){var t=this._mapName,i=this._geoJSON,r;try{r=i?kme(i,e):[]}catch(a){throw new Error(`Invalid geoJson format
`+a.message)}return gye(t,r),ne(r,function(a){var o=a.name;_ye(t,a),bye(t,a);var s=this._specialAreas&&this._specialAreas[o];s&&a.transformTo(s.left,s.top,s.width,s.height)},this),r},n.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},n}();function Tye(n){for(var e,t=0;t<n.length;t++){var i=n[t].getBoundingRect();e=e||i.clone(),e.union(i)}return e}function Aye(n){return xn(n)?typeof JSON!="undefined"&&JSON.parse?JSON.parse(n):new Function("return ("+n+");")():n}var jm=In();const Kc={registerMap:function(n,e,t){if(e.svg){var i=new pye(n,e.svg);jm.set(n,i)}else{var r=e.geoJson||e.geoJSON;r&&!e.features?t=e.specialAreas:r=e;var i=new wye(n,r,t);jm.set(n,i)}},getGeoResource:function(n){return jm.get(n)},getMapForUser:function(n){var e=jm.get(n);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(n,e,t){var i=jm.get(n);if(i)return i.load(e,t)}};var lP=["rect","circle","line","ellipse","polygon","polyline","path"],Cye=In(lP),Mye=In(lP.concat(["g"])),Eye=In(lP.concat(["g"])),oZ=Gi();function b6(n){var e=n.getItemStyle(),t=n.get("areaColor");return t!=null&&(e.fill=t),e}function VO(n){var e=n.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var Pye=function(){function n(e){var t=new ei;this.uid=Hv("ec_map_draw"),this._controller=new I3(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new ei),t.add(this._svgGroup=new ei)}return n.prototype.draw=function(e,t,i,r,a){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(g){!s&&g.getHostGeoModel()===e&&(s=g.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this.group,d=l.getTransformInfo(),h=d.raw,f=d.roam,p=!u.childAt(0)||a;p?(c.x=f.x,c.y=f.y,c.scaleX=f.scaleX,c.scaleY=f.scaleY,c.dirty()):Qi(c,f,e);var m=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,v={api:i,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:m,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(v):l.resourceType==="geoSVG"&&this._buildSVG(v),this._updateController(e,t,i),this._updateMapSelectHandler(e,u,i,r)},n.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=In(),i=In(),r=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(f,p){return p&&(f=p(f)),f&&[f[0]*a.scaleX+a.x,f[1]*a.scaleY+a.y]}function d(f){for(var p=[],m=!u&&l&&l.project,v=0;v<f.length;++v){var g=c(f[v],m);g&&p.push(g)}return p}function h(f){return{shape:{points:d(f)}}}r.removeAll(),ne(e.geo.regions,function(f){var p=f.name,m=t.get(p),v=i.get(p)||{},g=v.dataIdx,_=v.regionModel;if(!m){m=t.set(p,new ei),r.add(m),g=s?s.indexOfName(p):null,_=e.isGeo?o.getRegionModel(p):s?s.getItemModel(g):null;var S=_.get("silent",!0);S!=null&&(m.silent=S),i.set(p,{dataIdx:g,regionModel:_})}var x=[],A=[];ne(f.geometries,function(I){if(I.type==="polygon"){var D=[I.exterior].concat(I.interiors||[]);u&&(D=XO(D,u)),ne(D,function(P){x.push(new ul(h(P)))})}else{var E=I.points;u&&(E=XO(E,u,!0)),ne(E,function(P){A.push(new hl(h(P)))})}});var C=c(f.getCenter(),l&&l.project);function M(I,D){if(I.length){var E=new yE({culling:!0,segmentIgnoreThreshold:1,shape:{paths:I}});m.add(E),HO(e,E,g,_),WO(e,E,p,_,o,g,C),D&&(VO(E),ne(E.states,VO))}}M(x),M(A,!0)}),t.each(function(f,p){var m=i.get(p),v=m.dataIdx,g=m.regionModel;jO(e,f,p,g,o,v),$O(e,f,p,g,o),qO(e,f,p,g,o)},this)},n.prototype._buildSVG=function(e){var t=e.geo.map,i=e.transformInfoRaw;this._svgGroup.x=i.x,this._svgGroup.y=i.y,this._svgGroup.scaleX=i.scaleX,this._svgGroup.scaleY=i.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var r=this._svgDispatcherMap=In(),a=!1;ne(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,c=o.svgNodeTagLower,d=o.el,h=u?u.indexOfName(s):null,f=l.getRegionModel(s);Cye.get(c)!=null&&d instanceof M0&&HO(e,d,h,f),d instanceof M0&&(d.culling=!0);var p=f.get("silent",!0);if(p!=null&&(d.silent=p),d.z2EmphasisLift=0,!o.namedFrom&&(Eye.get(c)!=null&&WO(e,d,s,f,l,h,null),jO(e,d,s,f,l,h),$O(e,d,s,f,l),Mye.get(c)!=null)){var m=qO(e,d,s,f,l);m==="self"&&(a=!0);var v=r.get(s)||r.set(s,[]);v.push(d)}},this),this._enableBlurEntireSVG(a,e)},n.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var i=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),r=i.opacity;this._svgGraphicRecord.root.traverse(function(a){if(!a.isGroup){zp(a);var o=a.ensureState("blur").style||{};o.opacity==null&&r!=null&&(o.opacity=r),a.ensureState("emphasis")}})}},n.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},n.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var i=t.coordinateSystem;if(i.resourceType==="geoJSON"){var r=this._regionsGroupByName;if(r){var a=r.get(e);return a?[a]:[]}}else if(i.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},n.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},n.prototype._useSVG=function(e){var t=Kc.getGeoResource(e);if(t&&t.type==="geoSVG"){var i=t.useGraphic(this.uid);this._svgGroup.add(i.root),this._svgGraphicRecord=i,this._svgMapName=e}},n.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=Kc.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},n.prototype._updateController=function(e,t,i){var r=e.coordinateSystem,a=this._controller,o=this._controllerHost;o.zoomLimit=e.get("scaleLimit"),o.zoom=r.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,oP(o,u.dx,u.dy),i.dispatchAction(It(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),a.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,sP(o,u.scale,u.originX,u.originY),i.dispatchAction(It(l(),{totalZoom:o.zoom,zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),a.setPointerChecker(function(u,c,d){return r.containPoint([c,d])&&!Y_(u,i,e)})},n.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=oZ(t).ignore)})},n.prototype._updateMapSelectHandler=function(e,t,i,r){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)}))},n}();function HO(n,e,t,i){var r=i.getModel("itemStyle"),a=i.getModel(["emphasis","itemStyle"]),o=i.getModel(["blur","itemStyle"]),s=i.getModel(["select","itemStyle"]),l=b6(r),u=b6(a),c=b6(s),d=b6(o),h=n.data;if(h){var f=h.getItemVisual(t,"style"),p=h.getItemVisual(t,"decal");n.isVisualEncodedByVisualMap&&f.fill&&(l.fill=f.fill),p&&(l.decal=vv(p,n.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=d,zp(e)}function WO(n,e,t,i,r,a,o){var s=n.data,l=n.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),a)),c=s&&s.getItemLayout(a);if(l||u||c&&c.showLabel){var d=l?t:a,h=void 0;(!s||a>=0)&&(h=r);var f=o?{normal:{align:"center",verticalAlign:"middle"}}:null;$o(e,_o(i),{labelFetcher:h,labelDataIndex:d,defaultText:t},f);var p=e.getTextContent();if(p&&(oZ(p).ignore=p.ignore,e.textConfig&&o)){var m=e.getBoundingRect().clone();e.textConfig.layoutRect=m,e.textConfig.position=[(o[0]-m.x)/m.width*100+"%",(o[1]-m.y)/m.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function jO(n,e,t,i,r,a){n.data?n.data.setItemGraphicEl(a,e):ni(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:t,region:i&&i.option||{}}}function $O(n,e,t,i,r){n.data||Qp({el:e,componentModel:r,itemName:t,itemTooltipOption:i.get("tooltip")})}function qO(n,e,t,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var a=i.getModel("emphasis"),o=a.get("focus");return ya(e,o,a.get("blurScope"),a.get("disabled")),n.isGeo&&Pfe(e,r,t),o}function XO(n,e,t){var i=[],r;function a(){r=[]}function o(){r.length&&(i.push(r),r=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&r.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),ne(n,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(),i}const sZ=Pye;var Rye=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r,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 sZ(r);o.add(s.group),s.draw(t,i,r,this,a),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&i.getComponent("legend")&&this._renderSymbols(t,i,r)}}},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,i,r){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,d=u.offset,h=new zh({style:{fill:t.getData().getVisual("style").fill},shape:{cx:c[0]+d*9,cy:c[1],r:3},silent:!0,z2:8+(d?0:Gv+1)});if(!d){var f=t.mainSeries.getData(),p=a.getName(l),m=f.indexOfName(p),v=a.getItemModel(l),g=v.getModel("label"),_=f.getItemGraphicEl(m);$o(h,_o(v),{labelFetcher:{getFormattedLabel:function(S,x){return t.getFormattedLabel(m,x)}},defaultText:p}),h.disableLabelAnimation=!0,g.get("position")||h.setTextConfig({position:"bottom"}),_.onHoverStateChange=function(S){$5(h,S)}}o.add(h)}}})},e.type="map",e}(Yr);const Lye=Rye;var Iye=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(i){if(i!=null){var r=this.getData().getName(i),a=this.coordinateSystem,o=a.getRegion(r);return o&&a.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var i=Jv(this,{coordDimensions:["value"],encodeDefaulter:si(EE,this)}),r=In(),a=[],o=0,s=i.count();o<s;o++){var l=i.getName(o);r.set(l,o)}var u=Kc.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return ne(u.regions,function(c){var d=c.name,h=r.get(d),f=c.properties&&c.properties.echartsStyle,p;h==null?(p={name:d},a.push(p)):p=i.getRawDataItem(h),f&&ui(p,f)}),i.appendData(a),i},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 i=this.getData();return i.get(i.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var i=this.getData();return i.getItemModel(i.indexOfName(t))},e.prototype.formatTooltip=function(t,i,r){for(var a=this.getData(),o=this.getRawValue(t),s=a.getName(t),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var d=l[c].originalData.indexOfName(s),h=a.mapDimension("value");isNaN(l[c].originalData.get(h,d))||u.push(l[c].name)}return So("section",{header:u.join(", "),noHeader:!u.length,blocks:[So("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 i=t.icon||"roundRect",r=Ya(i,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return r.setStyle(t.itemStyle),r.style.stroke="none",i.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r},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}(pa);const Dye=Iye;function Nye(n,e){var t={};return ne(n,function(i){i.each(i.mapDimension("value"),function(r,a){var o="ec-"+i.getName(a);t[o]=t[o]||[],isNaN(r)||t[o].push(r)})}),n[0].map(n[0].mapDimension("value"),function(i,r){for(var a="ec-"+n[0].getName(r),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 d;return e==="min"?d=s:e==="max"?d=l:e==="average"?d=o/u:d=o,u===0?NaN:d})}function kye(n){var e={};n.eachSeriesByType("map",function(t){var i=t.getHostGeoModel(),r=i?"o"+i.id:"i"+t.getMapType();(e[r]=e[r]||[]).push(t)}),ne(e,function(t,i){for(var r=Nye(Xt(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(r.cloneShallow()),t[a].mainSeries=t[0]})}function Fye(n){var e={};n.eachSeriesByType("map",function(t){var i=t.getMapType();if(!(t.getHostGeoModel()||e[i])){var r={};ne(t.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&n.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var d=l.getName(c),h=s.getRegion(d);if(!(!h||isNaN(u))){var f=r[d]||0,p=s.dataToPoint(h.getCenter());r[d]=f+1,l.setItemLayout(c,{point:p,offset:f})}})});var a=t.getData();a.each(function(o){var s=a.getName(o),l=a.getItemLayout(o)||{};l.showLabel=!r[s],a.setItemLayout(o,l)}),e[i]=!0}})}var YO=Ho,Oye=function(n){ot(e,n);function e(t){var i=n.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new Dc,i._rawTransformable=new Dc,i.name=t,i}return e.prototype.setBoundingRect=function(t,i,r,a){return this._rect=new gi(t,i,r,a),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,i,r,a){this._transformTo(t,i,r,a),this._viewRect=new gi(t,i,r,a)},e.prototype._transformTo=function(t,i,r,a){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new gi(t,i,r,a));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t,i){t&&(this._center=[_n(t[0],i.getWidth()),_n(t[1],i.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var i=this.zoomLimit;i&&(i.max!=null&&(t=Math.min(i.max,t)),i.min!=null&&(t=Math.max(i.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),i=t.x+t.width/2,r=t.y+t.height/2;return[i,r]},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(),i=this._roamTransformable,r=this.getDefaultCenter(),a=this.getCenter(),o=this.getZoom();a=Ho([],a,t),r=Ho([],r,t),i.originX=a[0],i.originY=a[1],i.x=r[0]-a[0],i.y=r[1]-a[1],i.scaleX=i.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,i=this._rawTransformable;i.parent=t,t.updateTransform(),i.updateTransform(),JM(this.transform||(this.transform=[]),i.transform||Dl()),this._rawTransform=i.getLocalTransform(),this.invTransform=this.invTransform||[],Bv(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,i=this._roamTransformable,r=new Dc;return r.transform=i.transform,r.decomposeTransform(),{roam:{x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.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,i,r){var a=i?this._rawTransform:this.transform;return r=r||[],a?YO(r,t,a):Ts(r,t)},e.prototype.pointToData=function(t){var i=this.invTransform;return i?YO([],t,i):[t[0],t[1]]},e.prototype.convertToPixel=function(t,i,r){var a=KO(i);return a===this?a.dataToPoint(r):null},e.prototype.convertFromPixel=function(t,i,r){var a=KO(i);return a===this?a.pointToData(r):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(Dc);function KO(n){var e=n.seriesModel;return e?e.coordinateSystem:null}const D3=Oye;var Bye={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},lZ=["lng","lat"],uZ=function(n){ot(e,n);function e(t,i,r){var a=n.call(this,t)||this;a.dimensions=lZ,a.type="geo",a._nameCoordMap=In(),a.map=i;var o=r.projection,s=Kc.load(i,r.nameMap,r.nameProperty),l=Kc.getGeoResource(i);a.resourceType=l?l.type:null;var u=a.regions=s.regions,c=Bye[l.type];a._regionsMap=s.regionsMap,a.regions=s.regions,a.projection=o;var d;if(o)for(var h=0;h<u.length;h++){var f=u[h].getBoundingRect(o);d=d||f.clone(),d.union(f)}else d=s.boundingRect;return a.setBoundingRect(d.x,d.y,d.width,d.height),a.aspectScale=o?1:ai(r.aspectScale,c.aspectScale),a._invertLongitute=o?!1:c.invertLongitute,a}return e.prototype._transformTo=function(t,i,r,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 gi(t,i,r,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 i=this.regions,r=0;r<i.length;r++){var a=i[r];if(a.type==="geoJSON"&&a.contain(t))return i[r]}},e.prototype.addGeoCoord=function(t,i){this._nameCoordMap.set(t,i)},e.prototype.getGeoCoord=function(t){var i=this._regionsMap.get(t);return this._nameCoordMap.get(t)||i&&i.getCenter()},e.prototype.dataToPoint=function(t,i,r){if(xn(t)&&(t=this.getGeoCoord(t)),t){var a=this.projection;return a&&(t=a.project(t)),t&&this.projectedToPoint(t,i,r)}},e.prototype.pointToData=function(t){var i=this.projection;return i&&(t=i.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(t){return n.prototype.pointToData.call(this,t)},e.prototype.projectedToPoint=function(t,i,r){return n.prototype.dataToPoint.call(this,t,i,r)},e.prototype.convertToPixel=function(t,i,r){var a=ZO(i);return a===this?a.dataToPoint(r):null},e.prototype.convertFromPixel=function(t,i,r){var a=ZO(i);return a===this?a.pointToData(r):null},e}(D3);Za(uZ,D3);function ZO(n){var e=n.geoModel,t=n.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",Xa).models[0]||{}).coordinateSystem:null}const JO=uZ;function QO(n,e){var t=n.get("boundingCoords");if(t!=null){var i=t[0],r=t[1];if(isFinite(i[0])&&isFinite(i[1])&&isFinite(r[0])&&isFinite(r[1])){var a=this.projection;if(a){var o=i[0],s=i[1],l=r[0],u=r[1];i=[1/0,1/0],r=[-1/0,-1/0];var c=function(C,M,I,D){for(var E=I-C,P=D-M,F=0;F<=100;F++){var V=F/100,G=a.project([C+E*V,M+P*V]);th(i,i,G),nh(r,r,G)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(i[0],i[1],r[0]-i[0],r[1]-i[1])}}var d=this.getBoundingRect(),h=n.get("layoutCenter"),f=n.get("layoutSize"),p=e.getWidth(),m=e.getHeight(),v=d.width/d.height*this.aspectScale,g=!1,_,S;h&&f&&(_=[_n(h[0],p),_n(h[1],m)],S=_n(f,Math.min(p,m)),!isNaN(_[0])&&!isNaN(_[1])&&!isNaN(S)&&(g=!0));var x;if(g)x={},v>1?(x.width=S,x.height=S/v):(x.height=S,x.width=S*v),x.y=_[1]-x.height/2,x.x=_[0]-x.width/2;else{var A=n.getBoxLayoutParams();A.aspect=v,x=uo(A,{width:p,height:m})}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(n.get("center"),e),this.setZoom(n.get("zoom"))}function zye(n,e){ne(e.get("geoCoord"),function(t,i){n.addGeoCoord(i,t)})}var Gye=function(){function n(){this.dimensions=lZ}return n.prototype.create=function(e,t){var i=[];function r(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 JO(l+s,l,It({nameMap:o.get("nameMap")},r(o)));u.zoomLimit=o.get("scaleLimit"),i.push(u),o.coordinateSystem=u,u.model=o,u.resize=QO,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=i[l]}});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),ne(a,function(o,s){var l=Xt(o,function(c){return c.get("nameMap")}),u=new JO(s,s,It({nameMap:XM(l)},r(o[0])));u.zoomLimit=Ro.apply(null,Xt(o,function(c){return c.get("scaleLimit")})),i.push(u),u.resize=QO,u.resize(o[0],t),ne(o,function(c){c.coordinateSystem=u,zye(u,c)})}),i},n.prototype.getFilledRegions=function(e,t,i,r){for(var a=(e||[]).slice(),o=In(),s=0;s<a.length;s++)o.set(a[s].name,a[s]);var l=Kc.load(t,i,r);return ne(l.regions,function(u){var c=u.name,d=o.get(c),h=u.properties&&u.properties.echartsStyle;d||(d={name:c},a.push(d)),h&&ui(d,h)}),a},n}(),Uye=new Gye;const cZ=Uye;var Vye=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i,r){var a=Kc.getGeoResource(t.map);if(a&&a.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,r),Fp(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,i=this.option;i.regions=cZ.getFilledRegions(i.regions,i.map,i.nameMap,i.nameProperty);var r={};this._optionModelMap=Yu(i.regions||[],function(a,o){var s=o.name;return s&&(a.set(s,new Xr(o,t,t.ecModel)),o.selected&&(r[s]=!0)),a},In()),i.selectedMap||(i.selectedMap=r)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new Xr(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,i){var r=this.getRegionModel(t),a=i==="normal"?r.get(["label","formatter"]):r.get(["emphasis","label","formatter"]),o={name:t};if($n(a))return o.status=i,a(o);if(xn(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 i=this.option,r=i.selectedMode;if(r){r!=="multiple"&&(i.selectedMap=null);var a=i.selectedMap||(i.selectedMap={});a[t]=!0}},e.prototype.unSelect=function(t){var i=this.option.selectedMap;i&&(i[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var i=this.option.selectedMap;return!!(i&&i[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}($i);const Hye=Vye;function eB(n,e){return n.pointToProjected?n.pointToProjected(e):n.pointToData(e)}function uP(n,e,t,i){var r=n.getZoom(),a=n.getCenter(),o=e.zoom,s=n.projectedToPoint?n.projectedToPoint(a):n.dataToPoint(a);if(e.dx!=null&&e.dy!=null&&(s[0]-=e.dx,s[1]-=e.dy,n.setCenter(eB(n,s),i)),o!=null){if(t){var l=t.min||0,u=t.max||1/0;o=Math.max(Math.min(r*o,u),l)/r}n.scaleX*=o,n.scaleY*=o;var c=(e.originX-n.x)*(o-1),d=(e.originY-n.y)*(o-1);n.x-=c,n.y-=d,n.updateTransform(),n.setCenter(eB(n,s),i),n.setZoom(o*r)}return{center:n.getCenter(),zoom:n.getZoom()}}var Wye=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,i){this._api=i},e.prototype.render=function(t,i,r,a){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new sZ(r));var o=this._mapDraw;o.draw(t,i,r,this,a),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,i,r)},e.prototype._handleRegionClick=function(t){var i;sp(t.target,function(r){return(i=ni(r).eventData)!=null},!0),i&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:i.name})},e.prototype.updateSelectStatus=function(t,i,r){var a=this;this._mapDraw.group.traverse(function(o){var s=ni(o).eventData;if(s)return a._model.isSelected(s.name)?r.enterSelect(o):r.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}(xa);const jye=Wye;function $ye(n,e,t){Kc.registerMap(n,e,t)}function dZ(n){n.registerCoordinateSystem("geo",cZ),n.registerComponentModel(Hye),n.registerComponentView(jye),n.registerImpl("registerMap",$ye),n.registerImpl("getMap",function(t){return Kc.getMapForUser(t)});function e(t,i){i.update="geo:updateSelectStatus",n.registerAction(i,function(r,a){var o={},s=[];return a.eachComponent({mainType:"geo",query:r},function(l){l[t](r.name);var u=l.coordinateSystem;ne(u.regions,function(d){o[d.name]=l.isSelected(d.name)||!1});var c=[];ne(o,function(d,h){o[h]&&c.push(h)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:r.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),n.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,i,r){var a=t.componentType||"series";i.eachComponent({mainType:a,query:t},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=uP(s,t,o.get("scaleLimit"),r);o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),a==="series"&&ne(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function qye(n){Ci(dZ),n.registerChartView(Lye),n.registerSeriesModel(Dye),n.registerLayout(Fye),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,kye),oY("map",n.registerAction)}function Xye(n){var e=n;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],i,r;i=t.pop();)if(r=i.children,i.isExpand&&r.length)for(var a=r.length,o=a-1;o>=0;o--){var s=r[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function Yye(n,e){var t=n.isExpand?n.children:[],i=n.parentNode.children,r=n.hierNode.i?i[n.hierNode.i-1]:null;if(t.length){Jye(n);var a=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;r?(n.hierNode.prelim=r.hierNode.prelim+e(n,r),n.hierNode.modifier=n.hierNode.prelim-a):n.hierNode.prelim=a}else r&&(n.hierNode.prelim=r.hierNode.prelim+e(n,r));n.parentNode.hierNode.defaultAncestor=Qye(n,r,n.parentNode.hierNode.defaultAncestor||i[0],e)}function Kye(n){var e=n.hierNode.prelim+n.parentNode.hierNode.modifier;n.setLayout({x:e},!0),n.hierNode.modifier+=n.parentNode.hierNode.modifier}function tB(n){return arguments.length?n:n6e}function Cg(n,e){return n-=Math.PI/2,{x:e*Math.cos(n),y:e*Math.sin(n)}}function Zye(n,e){return uo(n.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Jye(n){for(var e=n.children,t=e.length,i=0,r=0;--t>=0;){var a=e[t];a.hierNode.prelim+=i,a.hierNode.modifier+=i,r+=a.hierNode.change,i+=a.hierNode.shift+r}}function Qye(n,e,t,i){if(e){for(var r=n,a=n,o=a.parentNode.children[0],s=e,l=r.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,d=s.hierNode.modifier;s=Tx(s),a=Ax(a),s&&a;){r=Tx(r),o=Ax(o),r.hierNode.ancestor=n;var h=s.hierNode.prelim+d-a.hierNode.prelim-u+i(s,a);h>0&&(t6e(e6e(s,n,t),n,h),u+=h,l+=h),d+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=r.hierNode.modifier,c+=o.hierNode.modifier}s&&!Tx(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=d-l),a&&!Ax(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,t=n)}return t}function Tx(n){var e=n.children;return e.length&&n.isExpand?e[e.length-1]:n.hierNode.thread}function Ax(n){var e=n.children;return e.length&&n.isExpand?e[0]:n.hierNode.thread}function e6e(n,e,t){return n.hierNode.ancestor.parentNode===e.parentNode?n.hierNode.ancestor:t}function t6e(n,e,t){var i=t/(e.hierNode.i-n.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,n.hierNode.change+=i}function n6e(n,e){return n.parentNode===e.parentNode?1:2}var i6e=function(){function n(){this.parentPoint=[],this.childPoints=[]}return n}(),r6e=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new i6e},e.prototype.buildPath=function(t,i){var r=i.childPoints,a=r.length,o=i.parentPoint,s=r[0],l=r[a-1];if(a===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=i.orient,c=u==="TB"||u==="BT"?0:1,d=1-c,h=_n(i.forkPosition,1),f=[];f[c]=o[c],f[d]=o[d]+(l[d]-o[d])*h,t.moveTo(o[0],o[1]),t.lineTo(f[0],f[1]),t.moveTo(s[0],s[1]),f[c]=s[c],t.lineTo(f[0],f[1]),f[c]=l[c],t.lineTo(f[0],f[1]),t.lineTo(l[0],l[1]);for(var p=1;p<a-1;p++){var m=r[p];t.moveTo(m[0],m[1]),f[c]=m[c],t.lineTo(f[0],f[1])}},e}(Ei),a6e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new ei,t}return e.prototype.init=function(t,i){this._controller=new I3(i.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,i,r){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,r),this._updateController(t,i,r);var u=this._data;a.diff(u).add(function(c){nB(a,c)&&iB(a,c,null,s,t)}).update(function(c,d){var h=u.getItemGraphicEl(d);if(!nB(a,c)){h&&aB(u,d,h,s,t);return}iB(a,c,h,s,t)}).remove(function(c){var d=u.getItemGraphicEl(c);d&&aB(u,c,d,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&a.eachItemGraphicEl(function(c,d){c.off("click").on("click",function(){r.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:d})})}),this._data=a},e.prototype._updateViewCoordSys=function(t,i){var r=t.getData(),a=[];r.each(function(d){var h=r.getItemLayout(d);h&&!isNaN(h.x)&&!isNaN(h.y)&&a.push([+h.x,+h.y])});var o=[],s=[];T_(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 D3;c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(t.get("center"),i),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,i,r){var a=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,c,d){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,d)&&!Y_(u,r,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){oP(s,u.dx,u.dy),r.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){sP(s,u.scale,u.originX,u.originY),r.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(t),r.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var i=t.getData(),r=this._getNodeGlobalScale(t);i.eachItemGraphicEl(function(a,o){a.setSymbolScale(r)})},e.prototype._getNodeGlobalScale=function(t){var i=t.coordinateSystem;if(i.type!=="view")return 1;var r=this._nodeScaleRatio,a=i.scaleX||1,o=i.getZoom(),s=(o-1)*r+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}(Yr);function nB(n,e){var t=n.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function iB(n,e,t,i,r){var a=!t,o=n.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",c=n.tree.root,d=o.parentNode===c?o:o.parentNode||o,h=n.getItemGraphicEl(d.dataIndex),f=d.getLayout(),p=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:f,m=o.getLayout();a?(t=new C3(n,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=p.x,t.y=p.y):t.updateData(n,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=m.rawX,t.__radialRawY=m.rawY,i.add(t),n.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,Qi(t,{x:m.x,y:m.y},r);var v=t.getSymbolPath();if(r.get("layout")==="radial"){var g=c.children[0],_=g.getLayout(),S=g.children.length,x=void 0,A=void 0;if(m.x===_.x&&o.isExpand===!0&&g.children.length){var C={x:(g.children[0].getLayout().x+g.children[S-1].getLayout().x)/2,y:(g.children[0].getLayout().y+g.children[S-1].getLayout().y)/2};x=Math.atan2(C.y-_.y,C.x-_.x),x<0&&(x=Math.PI*2+x),A=C.x<_.x,A&&(x=x-Math.PI)}else x=Math.atan2(m.y-_.y,m.x-_.x),x<0&&(x=Math.PI*2+x),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(A=m.x<_.x,A&&(x=x-Math.PI)):(A=m.x>_.x,A||(x=x-Math.PI));var M=A?"left":"right",I=s.getModel("label"),D=I.get("rotate"),E=D*(Math.PI/180),P=v.getTextContent();P&&(v.setTextConfig({position:I.get("position")||M,rotation:D==null?-x:E,origin:"center"}),P.setStyle("verticalAlign","middle"))}var F=s.get(["emphasis","focus"]),V=F==="relative"?x9(o.getAncestorsIndices(),o.getDescendantIndices()):F==="ancestor"?o.getAncestorsIndices():F==="descendant"?o.getDescendantIndices():null;V&&(ni(t).focus=V),o6e(r,o,c,t,p,f,m,i),t.__edge&&(t.onHoverStateChange=function(G){if(G!=="blur"){var W=o.parentNode&&n.getItemGraphicEl(o.parentNode.dataIndex);W&&W.hoverState===_3||$5(t.__edge,G)}})}function o6e(n,e,t,i,r,a,o,s){var l=e.getModel(),u=n.get("edgeShape"),c=n.get("layout"),d=n.getOrient(),h=n.get(["lineStyle","curveness"]),f=n.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),m=i.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(m||(m=i.__edge=new E_({shape:iC(c,d,h,r,r)})),Qi(m,{shape:iC(c,d,h,a,o)},n));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var v=e.children,g=[],_=0;_<v.length;_++){var S=v[_].getLayout();g.push([S.x,S.y])}m||(m=i.__edge=new r6e({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:d,forkPosition:f}})),Qi(m,{shape:{parentPoint:[o.x,o.y],childPoints:g}},n)}m&&!(u==="polyline"&&!e.isExpand)&&(m.useStyle(qn({strokeNoScale:!0,fill:null},p)),jo(m,l,"lineStyle"),zp(m),s.add(m))}function rB(n,e,t,i,r){var a=e.tree.root,o=hZ(a,n),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(n.dataIndex);if(u){var c=e.getItemGraphicEl(s.dataIndex),d=c.__edge,h=u.__edge||(s.isExpand===!1||s.children.length===1?d:void 0),f=i.get("edgeShape"),p=i.get("layout"),m=i.get("orient"),v=i.get(["lineStyle","curveness"]);h&&(f==="curve"?Ph(h,{shape:iC(p,m,v,l,l),style:{opacity:0}},i,{cb:function(){t.remove(h)},removeOpt:r}):f==="polyline"&&i.get("layout")==="orthogonal"&&Ph(h,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},i,{cb:function(){t.remove(h)},removeOpt:r}))}}function hZ(n,e){for(var t=e.parentNode===n?e:e.parentNode||e,i;i=t.getLayout(),i==null;)t=t.parentNode===n?t:t.parentNode||t;return{source:t,sourceLayout:i}}function aB(n,e,t,i,r){var a=n.tree.getNodeByDataIndex(e),o=n.tree.root,s=hZ(o,a).sourceLayout,l={duration:r.get("animationDurationUpdate"),easing:r.get("animationEasingUpdate")};Ph(t,{x:s.x+1,y:s.y+1},r,{cb:function(){i.remove(t),n.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,n.hostModel,{fadeLabel:!0,animation:l}),a.children.forEach(function(u){rB(u,n,i,r,l)}),rB(a,n,i,r,l)}function iC(n,e,t,i,r){var a,o,s,l,u,c,d,h;if(n==="radial"){u=i.rawX,d=i.rawY,c=r.rawX,h=r.rawY;var f=Cg(u,d),p=Cg(u,d+(h-d)*t),m=Cg(c,h+(d-h)*t),v=Cg(c,h);return{x1:f.x||0,y1:f.y||0,x2:v.x||0,y2:v.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:m.x||0,cpy2:m.y||0}}else u=i.x,d=i.y,c=r.x,h=r.y,(e==="LR"||e==="RL")&&(a=u+(c-u)*t,o=d,s=c+(u-c)*t,l=h),(e==="TB"||e==="BT")&&(a=u,o=d+(h-d)*t,s=c,l=h+(d-h)*t);return{x1:u,y1:d,x2:c,y2:h,cpx1:a,cpy1:o,cpx2:s,cpy2:l}}const s6e=a6e;var w0=Gi();function fZ(n){var e=n.mainData,t=n.datas;t||(t={main:e},n.datasAttr={main:"data"}),n.datas=n.mainData=null,pZ(e,t,n),ne(t,function(i){ne(e.TRANSFERABLE_METHODS,function(r){i.wrapMethod(r,si(l6e,n))})}),e.wrapMethod("cloneShallow",si(c6e,n)),ne(e.CHANGABLE_METHODS,function(i){e.wrapMethod(i,si(u6e,n))}),Ls(t[e.dataType]===e)}function l6e(n,e){if(f6e(this)){var t=It({},w0(this).datas);t[this.dataType]=e,pZ(e,t,n)}else cP(e,this.dataType,w0(this).mainData,n);return e}function u6e(n,e){return n.struct&&n.struct.update(),e}function c6e(n,e){return ne(w0(e).datas,function(t,i){t!==e&&cP(t.cloneShallow(),i,e,n)}),e}function d6e(n){var e=w0(this).mainData;return n==null||e==null?e:w0(e).datas[n]}function h6e(){var n=w0(this).mainData;return n==null?[{data:n}]:Xt(Li(w0(n).datas),function(e){return{type:e,data:w0(n).datas[e]}})}function f6e(n){return w0(n).mainData===n}function pZ(n,e,t){w0(n).datas={},ne(e,function(i,r){cP(i,r,n,t)})}function cP(n,e,t,i){w0(t).datas[e]=n,w0(n).mainData=t,n.dataType=e,i.struct&&(n[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=n),n.getLinkedData=d6e,n.getLinkedDataAll=h6e}var p6e=function(){function n(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 n.prototype.isRemoved=function(){return this.dataIndex<0},n.prototype.eachNode=function(e,t,i){$n(e)&&(i=t,t=e,e=null),e=e||{},xn(e)&&(e={order:e});var r=e.order||"preorder",a=this[e.attr||"children"],o;r==="preorder"&&(o=t.call(i,this));for(var s=0;!o&&s<a.length;s++)a[s].eachNode(e,t,i);r==="postorder"&&t.call(i,this)},n.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var i=0;i<this.children.length;i++){var r=this.children[i];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},n.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,i=this.children,r=i.length;t<r;t++){var a=i[t].getNodeById(e);if(a)return a}},n.prototype.contains=function(e){if(e===this)return!0;for(var t=0,i=this.children,r=i.length;t<r;t++){var a=i[t].contains(e);if(a)return a}},n.prototype.getAncestors=function(e){for(var t=[],i=e?this:this.parentNode;i;)t.push(i),i=i.parentNode;return t.reverse(),t},n.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},n.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},n.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},n.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},n.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},n.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,i=t.data.getItemModel(this.dataIndex);return i.getModel(e)}},n.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},n.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},n.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},n.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},n.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},n.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},n.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},n.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},n}(),v6e=function(){function n(e){this.type="tree",this._nodes=[],this.hostModel=e}return n.prototype.eachNode=function(e,t,i){this.root.eachNode(e,t,i)},n.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},n.prototype.getNodeById=function(e){return this.root.getNodeById(e)},n.prototype.update=function(){for(var e=this.data,t=this._nodes,i=0,r=t.length;i<r;i++)t[i].dataIndex=-1;for(var i=0,r=e.count();i<r;i++)t[e.getRawIndex(i)].dataIndex=i},n.prototype.clearLayouts=function(){this.data.clearItemLayouts()},n.createTree=function(e,t,i){var r=new n(t),a=[],o=1;s(e);function s(c,d){var h=c.value;o=Math.max(o,$t(h)?h.length:1),a.push(c);var f=new p6e(lo(c.name,""),r);d?m6e(f,d):r.root=f,r._nodes.push(f);var p=c.children;if(p)for(var m=0;m<p.length;m++)s(p[m],f)}r.root.updateDepthAndHeight(0);var l=T3(a,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Rs(l,t);return u.initData(a),i&&i(u),fZ({mainData:u,struct:r,structAttr:"tree"}),r.update(),r},n}();function m6e(n,e){var t=e.children;n.parentNode!==e&&(t.push(n),n.parentNode=e)}const dP=v6e;function V9(n,e,t){if(n&&xi(e,n.type)>=0){var i=t.getData().tree.root,r=n.targetNode;if(xn(r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var a=n.targetNodeId;if(a!=null&&(r=i.getNodeById(a)))return{node:r}}}function vZ(n){for(var e=[];n;)n=n.parentNode,n&&e.push(n);return e.reverse()}function hP(n,e){var t=vZ(n);return xi(t,e)>=0}function Z_(n,e){for(var t=[];n;){var i=n.dataIndex;t.push({name:n.name,dataIndex:i,value:e.getRawValue(i)}),n=n.parentNode}return t.reverse(),t}var g6e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var i={name:t.name,children:t.data},r=t.leaves||{},a=new Xr(r,this,this.ecModel),o=dP.createTree(i,this,s);function s(d){d.wrapMethod("getItemModel",function(h,f){var p=o.getNodeByDataIndex(f);return p&&p.children.length&&p.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(d){d.depth>l&&(l=d.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(d){var h=d.hostTree.data.getRawDataItem(d.dataIndex);d.isExpand=h&&h.collapsed!=null?!h.collapsed:d.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,i,r){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 So("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var i=n.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return i.treeAncestors=Z_(r,this),i.collapsed=!r.isExpand,i},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}(pa);const y6e=g6e;function _6e(n,e,t){for(var i=[n],r=[],a;a=i.pop();)if(r.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s<o.length;s++)i.push(o[s])}for(;a=r.pop();)e(a,t)}function $m(n,e){for(var t=[n],i;i=t.pop();)if(e(i),i.isExpand){var r=i.children;if(r.length)for(var a=r.length-1;a>=0;a--)t.push(r[a])}}function S6e(n,e){n.eachSeriesByType("tree",function(t){b6e(t,e)})}function b6e(n,e){var t=Zye(n,e);n.layoutInfo=t;var i=n.get("layout"),r=0,a=0,o=null;i==="radial"?(r=2*Math.PI,a=Math.min(t.height,t.width)/2,o=tB(function(S,x){return(S.parentNode===x.parentNode?1:2)/S.depth})):(r=t.width,a=t.height,o=tB());var s=n.getData().tree.root,l=s.children[0];if(l){Xye(s),_6e(l,Yye,o),s.hierNode.modifier=-l.hierNode.prelim,$m(l,Kye);var u=l,c=l,d=l;$m(l,function(S){var x=S.getLayout().x;x<u.getLayout().x&&(u=S),x>c.getLayout().x&&(c=S),S.depth>d.depth&&(d=S)});var h=u===c?1:o(u,c)/2,f=h-u.getLayout().x,p=0,m=0,v=0,g=0;if(i==="radial")p=r/(c.getLayout().x+h+f),m=a/(d.depth-1||1),$m(l,function(S){v=(S.getLayout().x+f)*p,g=(S.depth-1)*m;var x=Cg(v,g);S.setLayout({x:x.x,y:x.y,rawX:v,rawY:g},!0)});else{var _=n.getOrient();_==="RL"||_==="LR"?(m=a/(c.getLayout().x+h+f),p=r/(d.depth-1||1),$m(l,function(S){g=(S.getLayout().x+f)*m,v=_==="LR"?(S.depth-1)*p:r-(S.depth-1)*p,S.setLayout({x:v,y:g},!0)})):(_==="TB"||_==="BT")&&(p=r/(c.getLayout().x+h+f),m=a/(d.depth-1||1),$m(l,function(S){v=(S.getLayout().x+f)*p,g=_==="TB"?(S.depth-1)*m:a-(S.depth-1)*m,S.setLayout({x:v,y:g},!0)}))}}}function x6e(n){n.eachSeriesByType("tree",function(e){var t=e.getData(),i=t.tree;i.eachNode(function(r){var a=r.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(r.dataIndex,"style");It(s,o)})})}function w6e(n){n.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var r=e.dataIndex,a=i.getData().tree,o=a.getNodeByDataIndex(r);o.isExpand=!o.isExpand})}),n.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,i){t.eachComponent({mainType:"series",subType:"tree",query:e},function(r){var a=r.coordinateSystem,o=uP(a,e,void 0,i);r.setCenter&&r.setCenter(o.center),r.setZoom&&r.setZoom(o.zoom)})})}function T6e(n){n.registerChartView(s6e),n.registerSeriesModel(y6e),n.registerLayout(S6e),n.registerVisual(x6e),w6e(n)}var oB=["treemapZoomToNode","treemapRender","treemapMove"];function A6e(n){for(var e=0;e<oB.length;e++)n.registerAction({type:oB[e],update:"updateView"},Ba);n.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,i){i.eachComponent({mainType:"series",subType:"treemap",query:t},r);function r(a,o){var s=["treemapZoomToNode","treemapRootToNode"],l=V9(t,s,a);if(l){var u=a.getViewRoot();u&&(t.direction=hP(u,l.node)?"rollUp":"drillDown"),a.resetViewRoot(l.node)}}})}function mZ(n){var e=n.getData(),t=e.tree,i={};t.eachNode(function(r){for(var a=r;a&&a.depth>1;)a=a.parentNode;var o=IA(n.ecModel,a.name||a.dataIndex+"",i);r.setVisual("decal",o)})}var C6e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,i){var r={name:t.name,children:t.data};gZ(r);var a=t.levels||[],o=this.designatedVisualItemStyle={},s=new Xr({itemStyle:o},this,i);a=t.levels=M6e(a,i);var l=Xt(a||[],function(d){return new Xr(d,s,i)},this),u=dP.createTree(r,this,c);function c(d){d.wrapMethod("getItemModel",function(h,f){var p=u.getNodeByDataIndex(f),m=p?l[p.depth]:null;return h.parentModel=m||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,i,r){var a=this.getData(),o=this.getRawValue(t),s=a.getName(t);return So("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var i=n.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return i.treeAncestors=Z_(r,this),i.treePathInfo=i.treeAncestors,i},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},It(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var i=this._idIndexMap;i||(i=this._idIndexMap=In(),this._idIndexMapCount=0);var r=i.get(t);return r==null&&i.set(t,r=this._idIndexMapCount++),r},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var i=this.getRawData().tree.root;(!t||t!==i&&!i.contains(t))&&(this._viewRoot=i)},e.prototype.enableAriaDecal=function(){mZ(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}(pa);function gZ(n){var e=0;ne(n.children,function(i){gZ(i);var r=i.value;$t(r)&&(r=r[0]),e+=r});var t=n.value;$t(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),$t(n.value)?n.value[0]=t:n.value=t}function M6e(n,e){var t=Ar(e.get("color")),i=Ar(e.get(["aria","decal","decals"]));if(t){n=n||[];var r,a;ne(n,function(s){var l=new Xr(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(r=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=n[0]||(n[0]={});return r||(o.color=t.slice()),!a&&i&&(o.decal=i.slice()),n}}const E6e=C6e;var P6e=8,sB=8,Cx=5,R6e=function(){function n(e){this.group=new ei,e.add(this.group)}return n.prototype.render=function(e,t,i,r){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!i)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),d={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(i,d,u),this._renderContent(e,d,s,l,u,c,r),O_(o,d.pos,d.box)}},n.prototype._prepare=function(e,t,i){for(var r=e;r;r=r.parentNode){var a=lo(r.getModel().get("name"),""),o=i.getTextRect(a),s=Math.max(o.width+P6e*2,t.emptyItemWidth);t.totalWidth+=s+sB,t.renderList.push({node:r,text:a,width:s})}},n.prototype._renderContent=function(e,t,i,r,a,o,s){for(var l=0,u=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),d=Bpe(t.pos,t.box),h=t.totalWidth,f=t.renderList,p=r.getModel("itemStyle").getItemStyle(),m=f.length-1;m>=0;m--){var v=f[m],g=v.node,_=v.width,S=v.text;h>d.width&&(h-=_-u,_=u,S=null);var x=new ul({shape:{points:L6e(l,0,_,c,m===f.length-1,m===0)},style:qn(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Xi({style:qr(a,{text:S})}),textConfig:{position:"inside"},z2:Gv*1e4,onclick:si(s,g)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=qr(o,{text:S}),x.ensureState("emphasis").style=p,ya(x,r.get("focus"),r.get("blurScope"),r.get("disabled")),this.group.add(x),I6e(x,e,g),l+=_+sB}},n.prototype.remove=function(){this.group.removeAll()},n}();function L6e(n,e,t,i,r,a){var o=[[r?n:n-Cx,e],[n+t,e],[n+t,e+i],[r?n:n-Cx,e+i]];return!a&&o.splice(2,0,[n+t+Cx,e+i/2]),!r&&o.push([n,e+i/2]),o}function I6e(n,e,t){ni(n).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&&Z_(t,e)}}const D6e=R6e;var N6e=function(){function n(){this._storage=[],this._elExistsMap={}}return n.prototype.add=function(e,t,i,r,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:i,delay:r,easing:a}),!0)},n.prototype.finished=function(e){return this._finishedCallback=e,this},n.prototype.start=function(){for(var e=this,t=this._storage.length,i=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,a=this._storage.length;r<a;r++){var o=this._storage[r];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:i,aborted:i})}return this},n}();function k6e(){return new N6e}var rC=ei,lB=Hi,uB=3,cB="label",dB="upperLabel",F6e=Gv*10,O6e=Gv*2,B6e=Gv*3,Hf=Bp([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),hB=function(n){var e=Hf(n);return e.stroke=e.fill=e.lineWidth=null,e},v8=Gi(),z6e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=qm(),t}return e.prototype.render=function(t,i,r,a){var o=i.findComponents({mainType:"series",subType:"treemap",query:a});if(!(xi(o,t)<0)){this.seriesModel=t,this.api=r,this.ecModel=i;var s=["treemapZoomToNode","treemapRootToNode"],l=V9(a,s,t),u=a&&a.type,c=t.layoutInfo,d=!this._oldTree,h=this._storage,f=u==="treemapRootToNode"&&l&&h?{rootNodeGroup:h.nodeGroup[l.node.getRawIndex()],direction:a.direction}:null,p=this._giveContainerGroup(c),m=t.get("animation"),v=this._doRender(p,t,f);m&&!d&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,v,t,f):v.renderFinally(),this._resetController(r),this._renderBreadcrumb(t,r,l)}},e.prototype._giveContainerGroup=function(t){var i=this._containerGroup;return i||(i=this._containerGroup=new rC,this._initEvents(i),this.group.add(i)),i.x=t.x,i.y=t.y,i},e.prototype._doRender=function(t,i,r){var a=i.getData().tree,o=this._oldTree,s=qm(),l=qm(),u=this._storage,c=[];function d(_,S,x,A){return G6e(i,l,u,r,s,c,_,S,x,A)}m(a.root?[a.root]:[],o&&o.root?[o.root]:[],t,a===o||!o,0);var h=v(u);if(this._oldTree=a,this._storage=l,this._controllerHost){var f=this.seriesModel.layoutInfo,p=a.root.getLayout();p.width===f.width&&p.height===f.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:h,renderFinally:g};function m(_,S,x,A,C){A?(S=_,ne(_,function(D,E){!D.isRemoved()&&I(E,E)})):new Xc(S,_,M,M).add(I).update(I).remove(si(I,null)).execute();function M(D){return D.getId()}function I(D,E){var P=D!=null?_[D]:null,F=E!=null?S[E]:null,V=d(P,F,x,C);V&&m(P&&P.viewChildren||[],F&&F.viewChildren||[],V,A,C+1)}}function v(_){var S=qm();return _&&ne(_,function(x,A){var C=S[A];ne(x,function(M){M&&(C.push(M),v8(M).willDelete=!0)})}),S}function g(){ne(h,function(_){ne(_,function(S){S.parent&&S.parent.remove(S)})}),ne(c,function(_){_.invisible=!0,_.dirty()})}},e.prototype._doAnimation=function(t,i,r,a){var o=r.get("animationDurationUpdate"),s=r.get("animationEasing"),l=($n(o)?0:o)||0,u=($n(s)?null:s)||"cubicOut",c=k6e();ne(i.willDeleteEls,function(d,h){ne(d,function(f,p){if(!f.invisible){var m=f.parent,v,g=v8(m);if(a&&a.direction==="drillDown")v=m===a.rootNodeGroup?{shape:{x:0,y:0,width:g.nodeWidth,height:g.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var _=0,S=0;g.willDelete||(_=g.nodeWidth/2,S=g.nodeHeight/2),v=h==="nodeGroup"?{x:_,y:S,style:{opacity:0}}:{shape:{x:_,y:S,width:0,height:0},style:{opacity:0}}}v&&c.add(f,v,l,0,u)}})}),ne(this._storage,function(d,h){ne(d,function(f,p){var m=i.lastsForAnimation[h][p],v={};m&&(f instanceof ei?m.oldX!=null&&(v.x=f.x,v.y=f.y,f.x=m.oldX,f.y=m.oldY):(m.oldShape&&(v.shape=It({},f.shape),f.setShape(m.oldShape)),m.fadein?(f.setStyle("opacity",0),v.style={opacity:1}):f.style.opacity!==1&&(v.style={opacity:1})),c.add(f,v,l,0,u))})},this),this._state="animating",c.finished(An(function(){this._state="ready",i.renderFinally()},this)).start()},e.prototype._resetController=function(t){var i=this._controller,r=this._controllerHost;r||(this._controllerHost={target:this.group},r=this._controllerHost),i||(i=this._controller=new I3(t.getZr()),i.enable(this.seriesModel.get("roam")),r.zoomLimit=this.seriesModel.get("scaleLimit"),r.zoom=this.seriesModel.get("zoom"),i.on("pan",An(this._onPan,this)),i.on("zoom",An(this._onZoom,this)));var a=new gi(0,0,t.getWidth(),t.getHeight());i.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)>uB||Math.abs(t.dy)>uB)){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x+t.dx,y:r.y+t.dy,width:r.width,height:r.height}})}},e.prototype._onZoom=function(t){var i=t.originX,r=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 gi(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var d=c.zoom=c.zoom||1;if(d*=a,u){var h=u.min||0,f=u.max||1/0;d=Math.max(Math.min(f,d),h)}var p=d/c.zoom;c.zoom=d;var m=this.seriesModel.layoutInfo;i-=m.x,r-=m.y;var v=Dl();Ku(v,v,[-i,-r]),QM(v,v,[p,p]),Ku(v,v,[i,r]),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 i=this;t.on("click",function(r){if(i._state==="ready"){var a=i.seriesModel.get("nodeClick",!0);if(a){var o=i.findTarget(r.offsetX,r.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)i._rootToNode(o);else if(a==="zoomToNode")i._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&&J5(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,i,r){var a=this;r||(r=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(i.getWidth()/2,i.getHeight()/2),r||(r={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new D6e(this.group))).render(t,i,r.node,function(o){a._state!=="animating"&&(hP(t.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=qm(),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,i){var r,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,i),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)r={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),r},e.type="treemap",e}(Yr);function qm(){return{nodeGroup:[],background:[],content:[]}}function G6e(n,e,t,i,r,a,o,s,l,u){if(!o)return;var c=o.getLayout(),d=n.getData(),h=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var f=c.width,p=c.height,m=c.borderWidth,v=c.invisible,g=o.getRawIndex(),_=s&&s.getRawIndex(),S=o.viewChildren,x=c.upperHeight,A=S&&S.length,C=h.getModel("itemStyle"),M=h.getModel(["emphasis","itemStyle"]),I=h.getModel(["blur","itemStyle"]),D=h.getModel(["select","itemStyle"]),E=C.get("borderRadius")||0,P=Fe("nodeGroup",rC);if(!P)return;if(l.add(P),P.x=c.x||0,P.y=c.y||0,P.markRedraw(),v8(P).nodeWidth=f,v8(P).nodeHeight=p,c.isAboveViewRoot)return P;var F=Fe("background",lB,u,O6e);F&&ie(P,F,A&&c.upperLabelHeight);var V=h.getModel("emphasis"),G=V.get("focus"),W=V.get("blurScope"),Y=V.get("disabled"),Q=G==="ancestor"?o.getAncestorsIndices():G==="descendant"?o.getDescendantIndices():G;if(A)R9(P)&&ap(P,!1),F&&(ap(F,!Y),d.setItemGraphicEl(o.dataIndex,F),TA(F,Q,W));else{var K=Fe("content",lB,u,B6e);K&&he(P,K),F.disableMorphing=!0,F&&R9(F)&&ap(F,!1),ap(P,!Y),d.setItemGraphicEl(o.dataIndex,P);var ae=h.getShallow("cursor");ae&&K.attr("cursor",ae),TA(P,Q,W)}return P;function ie(bt,ht,Kt){var Tt=ni(ht);if(Tt.dataIndex=o.dataIndex,Tt.seriesIndex=n.seriesIndex,ht.setShape({x:0,y:0,width:f,height:p,r:E}),v)Ee(ht);else{ht.invisible=!1;var Ae=o.getVisual("style"),Lt=Ae.stroke,vt=hB(C);vt.fill=Lt;var Ft=Hf(M);Ft.fill=M.get("borderColor");var k=Hf(I);k.fill=I.get("borderColor");var _t=Hf(D);if(_t.fill=D.get("borderColor"),Kt){var Ct=f-2*m;He(ht,Lt,Ae.opacity,{x:m,y:0,width:Ct,height:x})}else ht.removeTextContent();ht.setStyle(vt),ht.ensureState("emphasis").style=Ft,ht.ensureState("blur").style=k,ht.ensureState("select").style=_t,zp(ht)}bt.add(ht)}function he(bt,ht){var Kt=ni(ht);Kt.dataIndex=o.dataIndex,Kt.seriesIndex=n.seriesIndex;var Tt=Math.max(f-2*m,0),Ae=Math.max(p-2*m,0);if(ht.culling=!0,ht.setShape({x:m,y:m,width:Tt,height:Ae,r:E}),v)Ee(ht);else{ht.invisible=!1;var Lt=o.getVisual("style"),vt=Lt.fill,Ft=hB(C);Ft.fill=vt,Ft.decal=Lt.decal;var k=Hf(M),_t=Hf(I),Ct=Hf(D);He(ht,vt,Lt.opacity,null),ht.setStyle(Ft),ht.ensureState("emphasis").style=k,ht.ensureState("blur").style=_t,ht.ensureState("select").style=Ct,zp(ht)}bt.add(ht)}function Ee(bt){!bt.invisible&&a.push(bt)}function He(bt,ht,Kt,Tt){var Ae=h.getModel(Tt?dB:cB),Lt=lo(h.get("name"),null),vt=Ae.getShallow("show");$o(bt,_o(h,Tt?dB:cB),{defaultText:vt?Lt:null,inheritColor:ht,defaultOpacity:Kt,labelFetcher:n,labelDataIndex:o.dataIndex});var Ft=bt.getTextContent();if(Ft){var k=Ft.style,_t=KM(k.padding||0);Tt&&(bt.setTextConfig({layoutRect:Tt}),Ft.disableLabelLayout=!0),Ft.beforeUpdate=function(){var J=Math.max((Tt?Tt.width:bt.shape.width)-_t[1]-_t[3],0),ee=Math.max((Tt?Tt.height:bt.shape.height)-_t[0]-_t[2],0);(k.width!==J||k.height!==ee)&&Ft.setStyle({width:J,height:ee})},k.truncateMinChar=2,k.lineOverflow="truncate",xe(k,Tt,c);var Ct=Ft.getState("emphasis");xe(Ct?Ct.style:null,Tt,c)}}function xe(bt,ht,Kt){var Tt=bt?bt.text:null;if(!ht&&Kt.isLeafRoot&&Tt!=null){var Ae=n.get("drillDownIcon",!0);bt.text=Ae?Ae+" "+Tt:Tt}}function Fe(bt,ht,Kt,Tt){var Ae=_!=null&&t[bt][_],Lt=r[bt];return Ae?(t[bt][_]=null,pt(Lt,Ae)):v||(Ae=new ht,Ae instanceof M0&&(Ae.z2=U6e(Kt,Tt)),Ot(Lt,Ae)),e[bt][g]=Ae}function pt(bt,ht){var Kt=bt[g]={};ht instanceof rC?(Kt.oldX=ht.x,Kt.oldY=ht.y):Kt.oldShape=It({},ht.shape)}function Ot(bt,ht){var Kt=bt[g]={},Tt=o.parentNode,Ae=ht instanceof ei;if(Tt&&(!i||i.direction==="drillDown")){var Lt=0,vt=0,Ft=r.background[Tt.getRawIndex()];!i&&Ft&&Ft.oldShape&&(Lt=Ft.oldShape.width,vt=Ft.oldShape.height),Ae?(Kt.oldX=0,Kt.oldY=vt):Kt.oldShape={x:Lt,y:vt,width:0,height:0}}Kt.fadein=!Ae}}function U6e(n,e){return n*F6e+e}const V6e=z6e;var H9=ne,H6e=Kn,m8=-1,fP=function(){function n(e){var t=e.mappingMethod,i=e.type,r=this.option=Zn(e);this.type=i,this.mappingMethod=t,this._normalizeData=$6e[t];var a=n.visualHandlers[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[t],t==="piecewise"?(Mx(r),W6e(r)):t==="category"?r.categories?j6e(r):Mx(r,!0):(Ls(t!=="linear"||r.dataExtent),Mx(r))}return n.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},n.prototype.getNormalizer=function(){return An(this._normalizeData,this)},n.listVisualTypes=function(){return Li(n.visualHandlers)},n.isValidType=function(e){return n.visualHandlers.hasOwnProperty(e)},n.eachVisual=function(e,t,i){Kn(e)?ne(e,t,i):t.call(i,e)},n.mapVisual=function(e,t,i){var r,a=$t(e)?[]:Kn(e)?{}:(r=!0,null);return n.eachVisual(e,function(o,s){var l=t.call(i,o,s);r?a=l:a[s]=l}),a},n.retrieveVisuals=function(e){var t={},i;return e&&H9(n.visualHandlers,function(r,a){e.hasOwnProperty(a)&&(t[a]=e[a],i=!0)}),i?t:null},n.prepareVisualTypes=function(e){if($t(e))e=e.slice();else if(H6e(e)){var t=[];H9(e,function(i,r){t.push(r)}),e=t}else return[];return e.sort(function(i,r){return r==="color"&&i!=="color"&&i.indexOf("color")===0?1:-1}),e},n.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},n.findPieceIndex=function(e,t,i){for(var r,a=1/0,o=0,s=t.length;o<s;o++){var l=t[o].value;if(l!=null){if(l===e||xn(l)&&l===e+"")return o;i&&h(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],c=u.interval,d=u.close;if(c){if(c[0]===-1/0){if(w6(d[1],e,c[1]))return o}else if(c[1]===1/0){if(w6(d[0],c[0],e))return o}else if(w6(d[0],c[0],e)&&w6(d[1],e,c[1]))return o;i&&h(c[0],o),i&&h(c[1],o)}}if(i)return e===1/0?t.length-1:e===-1/0?0:r;function h(f,p){var m=Math.abs(f-e);m<a&&(a=m,r=p)}},n.visualHandlers={color:{applyVisual:Xm("color"),getColorMapper:function(){var e=this.option;return An(e.mappingMethod==="category"?function(t,i){return!i&&(t=this._normalizeData(t)),Mg.call(this,t)}:function(t,i,r){var a=!!r;return!i&&(t=this._normalizeData(t)),r=ob(t,e.parsedVisual,r),a?r:zc(r,"rgba")},this)},_normalizedToVisual:{linear:function(e){return zc(ob(e,this.option.parsedVisual),"rgba")},category:Mg,piecewise:function(e,t){var i=oC.call(this,t);return i==null&&(i=zc(ob(e,this.option.parsedVisual),"rgba")),i},fixed:Wf}},colorHue:x6(function(e,t){return Gg(e,t)}),colorSaturation:x6(function(e,t){return Gg(e,null,t)}),colorLightness:x6(function(e,t){return Gg(e,null,null,t)}),colorAlpha:x6(function(e,t){return G5(e,t)}),decal:{applyVisual:Xm("decal"),_normalizedToVisual:{linear:null,category:Mg,piecewise:null,fixed:null}},opacity:{applyVisual:Xm("opacity"),_normalizedToVisual:aC([0,1])},liftZ:{applyVisual:Xm("liftZ"),_normalizedToVisual:{linear:Wf,category:Wf,piecewise:Wf,fixed:Wf}},symbol:{applyVisual:function(e,t,i){var r=this.mapValueToVisual(e);i("symbol",r)},_normalizedToVisual:{linear:fB,category:Mg,piecewise:function(e,t){var i=oC.call(this,t);return i==null&&(i=fB.call(this,e)),i},fixed:Wf}},symbolSize:{applyVisual:Xm("symbolSize"),_normalizedToVisual:aC([0,1])}},n}();function W6e(n){var e=n.pieceList;n.hasSpecialVisual=!1,ne(e,function(t,i){t.originIndex=i,t.visual!=null&&(n.hasSpecialVisual=!0)})}function j6e(n){var e=n.categories,t=n.categoryMap={},i=n.visual;if(H9(e,function(o,s){t[o]=s}),!$t(i)){var r=[];Kn(i)?H9(i,function(o,s){var l=t[s];r[l!=null?l:m8]=o}):r[m8]=i,i=yZ(n,r)}for(var a=e.length-1;a>=0;a--)i[a]==null&&(delete t[e[a]],e.pop())}function Mx(n,e){var t=n.visual,i=[];Kn(t)?H9(t,function(a){i.push(a)}):t!=null&&i.push(t);var r={color:1,symbol:1};!e&&i.length===1&&!r.hasOwnProperty(n.type)&&(i[1]=i[0]),yZ(n,i)}function x6(n){return{applyVisual:function(e,t,i){var r=this.mapValueToVisual(e);i("color",n(t("color"),r))},_normalizedToVisual:aC([0,1])}}function fB(n){var e=this.option.visual;return e[Math.round(pr(n,[0,1],[0,e.length-1],!0))]||{}}function Xm(n){return function(e,t,i){i(n,this.mapValueToVisual(e))}}function Mg(n){var e=this.option.visual;return e[this.option.loop&&n!==m8?n%e.length:n]}function Wf(){return this.option.visual[0]}function aC(n){return{linear:function(e){return pr(e,n,this.option.visual,!0)},category:Mg,piecewise:function(e,t){var i=oC.call(this,t);return i==null&&(i=pr(e,n,this.option.visual,!0)),i},fixed:Wf}}function oC(n){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var i=fP.findPieceIndex(n,t),r=t[i];if(r&&r.visual)return r.visual[this.type]}}function yZ(n,e){return n.visual=e,n.type==="color"&&(n.parsedVisual=Xt(e,function(t){var i=Nl(t);return i||[0,0,0,1]})),e}var $6e={linear:function(n){return pr(n,this.option.dataExtent,[0,1],!0)},piecewise:function(n){var e=this.option.pieceList,t=fP.findPieceIndex(n,e,!0);if(t!=null)return pr(t,[0,e.length-1],[0,1],!0)},category:function(n){var e=this.option.categories?this.option.categoryMap[n]:n;return e==null?m8:e},fixed:Ba};function w6(n,e,t){return n?e<=t:e<t}const Wo=fP;var q6e="itemStyle",_Z=Gi();const X6e={seriesType:"treemap",reset:function(n){var e=n.getData().tree,t=e.root;t.isRemoved()||SZ(t,{},n.getViewRoot().getAncestors(),n)}};function SZ(n,e,t,i){var r=n.getModel(),a=n.getLayout(),o=n.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=r.getModel(q6e),l=Y6e(s,e,i),u=o.ensureUniqueItemVisual(n.dataIndex,"style"),c=s.get("borderColor"),d=s.get("borderColorSaturation"),h;d!=null&&(h=pB(l),c=K6e(d,h)),u.stroke=c;var f=n.viewChildren;if(!f||!f.length)h=pB(l),u.fill=h;else{var p=Z6e(n,r,a,s,l,f);ne(f,function(m,v){if(m.depth>=t.length||m===t[m.depth]){var g=J6e(r,l,m,v,p,i);SZ(m,g,t,i)}})}}}function Y6e(n,e,t){var i=It({},e),r=t.designatedVisualItemStyle;return ne(["color","colorAlpha","colorSaturation"],function(a){r[a]=e[a];var o=n.get(a);r[a]=null,o!=null&&(i[a]=o)}),i}function pB(n){var e=Ex(n,"color");if(e){var t=Ex(n,"colorAlpha"),i=Ex(n,"colorSaturation");return i&&(e=Gg(e,null,null,i)),t&&(e=G5(e,t)),e}}function K6e(n,e){return e!=null?Gg(e,null,null,n):null}function Ex(n,e){var t=n[e];if(t!=null&&t!=="none")return t}function Z6e(n,e,t,i,r,a){if(!(!a||!a.length)){var o=Px(e,"color")||r.color!=null&&r.color!=="none"&&(Px(e,"colorAlpha")||Px(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"),d={type:o.name,dataExtent:u,visual:o.range};d.type==="color"&&(c==="index"||c==="id")?(d.mappingMethod="category",d.loop=!0):d.mappingMethod="linear";var h=new Wo(d);return _Z(h).drColorMappingBy=c,h}}}function Px(n,e){var t=n.get(e);return $t(t)&&t.length?{name:e,range:t}:null}function J6e(n,e,t,i,r,a){var o=It({},e);if(r){var s=r.type,l=s==="color"&&_Z(r).drColorMappingBy,u=l==="index"?i:l==="id"?a.mapIdToIndex(t.getId()):t.getValue(n.get("visualDimension"));o[s]=r.mapValueToVisual(u)}return o}var W9=Math.max,g8=Math.min,vB=Ro,pP=ne,bZ=["itemStyle","borderWidth"],Q6e=["itemStyle","gapWidth"],e4e=["upperLabel","show"],t4e=["upperLabel","height"];const n4e={seriesType:"treemap",reset:function(n,e,t,i){var r=t.getWidth(),a=t.getHeight(),o=n.option,s=uo(n.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=_n(vB(s.width,l[0]),r),c=_n(vB(s.height,l[1]),a),d=i&&i.type,h=["treemapZoomToNode","treemapRootToNode"],f=V9(i,h,n),p=d==="treemapRender"||d==="treemapMove"?i.rootRect:null,m=n.getViewRoot(),v=vZ(m);if(d!=="treemapMove"){var g=d==="treemapZoomToNode"?l4e(n,f,m,u,c):p?[p.width,p.height]:[u,c],_=o.sort;_&&_!=="asc"&&_!=="desc"&&(_="desc");var S={squareRatio:o.squareRatio,sort:_,leafDepth:o.leafDepth};m.hostTree.clearLayouts();var x={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};m.setLayout(x),xZ(m,S,!1,0),x=m.getLayout(),pP(v,function(C,M){var I=(v[M+1]||m).getValue();C.setLayout(It({dataExtent:[I,I],borderWidth:0,upperHeight:0},x))})}var A=n.getData().tree.root;A.setLayout(u4e(s,p,f),!0),n.setLayoutInfo(s),wZ(A,new gi(-s.x,-s.y,r,a),v,m,0)}};function xZ(n,e,t,i){var r,a;if(!n.isRemoved()){var o=n.getLayout();r=o.width,a=o.height;var s=n.getModel(),l=s.get(bZ),u=s.get(Q6e)/2,c=TZ(s),d=Math.max(l,c),h=l-u,f=d-u;n.setLayout({borderWidth:l,upperHeight:d,upperLabelHeight:c},!0),r=W9(r-2*h,0),a=W9(a-h-f,0);var p=r*a,m=i4e(n,s,p,e,t,i);if(m.length){var v={x:h,y:f,width:r,height:a},g=g8(r,a),_=1/0,S=[];S.area=0;for(var x=0,A=m.length;x<A;){var C=m[x];S.push(C),S.area+=C.getLayout().area;var M=s4e(S,g,e.squareRatio);M<=_?(x++,_=M):(S.area-=S.pop().getLayout().area,mB(S,g,v,u,!1),g=g8(v.width,v.height),S.length=S.area=0,_=1/0)}if(S.length&&mB(S,g,v,u,!0),!t){var I=s.get("childrenVisibleMin");I!=null&&p<I&&(t=!0)}for(var x=0,A=m.length;x<A;x++)xZ(m[x],e,t,i+1)}}}function i4e(n,e,t,i,r,a){var o=n.children||[],s=i.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=i.leafDepth!=null&&i.leafDepth<=a;if(r&&!l)return n.viewChildren=[];o=dr(o,function(f){return!f.isRemoved()}),a4e(o,s);var u=o4e(e,o,s);if(u.sum===0)return n.viewChildren=[];if(u.sum=r4e(e,t,u.sum,s,o),u.sum===0)return n.viewChildren=[];for(var c=0,d=o.length;c<d;c++){var h=o[c].getValue()/u.sum*t;o[c].setLayout({area:h})}return l&&(o.length&&n.setLayout({isLeafRoot:!0},!0),o.length=0),n.viewChildren=o,n.setLayout({dataExtent:u.dataExtent},!0),o}function r4e(n,e,t,i,r){if(!i)return t;for(var a=n.get("visibleMin"),o=r.length,s=o,l=o-1;l>=0;l--){var u=r[i==="asc"?o-l-1:l].getValue();u/t*e<a&&(s=l,t-=u)}return i==="asc"?r.splice(0,o-s):r.splice(s,o-s),t}function a4e(n,e){return e&&n.sort(function(t,i){var r=e==="asc"?t.getValue()-i.getValue():i.getValue()-t.getValue();return r===0?e==="asc"?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:r}),n}function o4e(n,e,t){for(var i=0,r=0,a=e.length;r<a;r++)i+=e[r].getValue();var o=n.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],pP(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:i,dataExtent:s}}function s4e(n,e,t){for(var i=0,r=1/0,a=0,o=void 0,s=n.length;a<s;a++)o=n[a].getLayout().area,o&&(o<r&&(r=o),o>i&&(i=o));var l=n.area*n.area,u=e*e*t;return l?W9(u*i/l,l/(u*r)):1/0}function mB(n,e,t,i,r){var a=e===t.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=t[s[a]],c=e?n.area/e:0;(r||c>t[l[o]])&&(c=t[l[o]]);for(var d=0,h=n.length;d<h;d++){var f=n[d],p={},m=c?f.getLayout().area/c:0,v=p[l[o]]=W9(c-2*i,0),g=t[s[a]]+t[l[a]]-u,_=d===h-1||g<m?g:m,S=p[l[a]]=W9(_-2*i,0);p[s[o]]=t[s[o]]+g8(i,v/2),p[s[a]]=u+g8(i,S/2),u+=_,f.setLayout(p,!0)}t[s[o]]+=c,t[l[o]]-=c}function l4e(n,e,t,i,r){var a=(e||{}).node,o=[i,r];if(!a||a===t)return o;for(var s,l=i*r,u=l*n.option.zoomToNodeRatio;s=a.parentNode;){for(var c=0,d=s.children,h=0,f=d.length;h<f;h++)c+=d[h].getValue();var p=a.getValue();if(p===0)return o;u*=c/p;var m=s.getModel(),v=m.get(bZ),g=Math.max(v,TZ(m));u+=4*v*v+(3*v+g)*Math.pow(u,.5),u>EN&&(u=EN),a=s}u<l&&(u=l);var _=Math.pow(u/l,.5);return[i*_,r*_]}function u4e(n,e,t){if(e)return{x:e.x,y:e.y};var i={x:0,y:0};if(!t)return i;var r=t.node,a=r.getLayout();if(!a)return i;for(var o=[a.width/2,a.height/2],s=r;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:n.width/2-o[0],y:n.height/2-o[1]}}function wZ(n,e,t,i,r){var a=n.getLayout(),o=t[r],s=o&&o===n;if(!(o&&!s||r===t.length&&n!==i)){n.setLayout({isInView:!0,invisible:!s&&!e.intersect(a),isAboveViewRoot:s},!0);var l=new gi(e.x-a.x,e.y-a.y,e.width,e.height);pP(n.viewChildren||[],function(u){wZ(u,l,t,i,r+1)})}}function TZ(n){return n.get(e4e)?n.get(t4e):0}function c4e(n){n.registerSeriesModel(E6e),n.registerChartView(V6e),n.registerVisual(X6e),n.registerLayout(n4e),A6e(n)}function d4e(n){var e=n.findComponents({mainType:"legend"});!e||!e.length||n.eachSeriesByType("graph",function(t){var i=t.getCategoriesData(),r=t.getGraph(),a=r.data,o=i.mapArray(i.getName);a.filterSelf(function(s){var l=a.getItemModel(s),u=l.getShallow("category");if(u!=null){Yi(u)&&(u=o[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function h4e(n){var e={};n.eachSeriesByType("graph",function(t){var i=t.getCategoriesData(),r=t.getData(),a={};i.each(function(o){var s=i.getName(o);a["ec-"+s]=o;var l=i.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),i.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],d=0;d<c.length;d++){var h=l.getShallow(c[d],!0);h!=null&&i.setItemVisual(o,c[d],h)}}),i.count()&&r.each(function(o){var s=r.getItemModel(o),l=s.getShallow("category");if(l!=null){xn(l)&&(l=a["ec-"+l]);var u=i.getItemVisual(l,"style"),c=r.ensureUniqueItemVisual(o,"style");It(c,u);for(var d=["symbol","symbolSize","symbolKeepAspect"],h=0;h<d.length;h++)r.setItemVisual(o,d[h],i.getItemVisual(l,d[h]))}})})}function T6(n){return n instanceof Array||(n=[n,n]),n}function f4e(n){n.eachSeriesByType("graph",function(e){var t=e.getGraph(),i=e.getEdgeData(),r=T6(e.get("edgeSymbol")),a=T6(e.get("edgeSymbolSize"));i.setVisual("fromSymbol",r&&r[0]),i.setVisual("toSymbol",r&&r[1]),i.setVisual("fromSymbolSize",a&&a[0]),i.setVisual("toSymbolSize",a&&a[1]),i.setVisual("style",e.getModel("lineStyle").getLineStyle()),i.each(function(o){var s=i.getItemModel(o),l=t.getEdgeByIndex(o),u=T6(s.getShallow("symbol",!0)),c=T6(s.getShallow("symbolSize",!0)),d=s.getModel("lineStyle").getLineStyle(),h=i.ensureUniqueItemVisual(o,"style");switch(It(h,d),h.stroke){case"source":{var f=l.node1.getVisual("style");h.stroke=f&&f.fill;break}case"target":{var f=l.node2.getVisual("style");h.stroke=f&&f.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 sC="-->",J_=function(n){return n.get("autoCurveness")||null},AZ=function(n,e){var t=J_(n),i=20,r=[];if(Yi(t))i=t;else if($t(t)){n.__curvenessList=t;return}e>i&&(i=e);var a=i%2?i+2:i+3;r=[];for(var o=0;o<a;o++)r.push((o%2?o+1:o)/10*(o%2?-1:1));n.__curvenessList=r},j9=function(n,e,t){var i=[n.id,n.dataIndex].join("."),r=[e.id,e.dataIndex].join(".");return[t.uid,i,r].join(sC)},CZ=function(n){var e=n.split(sC);return[e[0],e[2],e[1]].join(sC)},p4e=function(n,e){var t=j9(n.node1,n.node2,e);return e.__edgeMap[t]},v4e=function(n,e){var t=lC(j9(n.node1,n.node2,e),e),i=lC(j9(n.node2,n.node1,e),e);return t+i},lC=function(n,e){var t=e.__edgeMap;return t[n]?t[n].length:0};function m4e(n){J_(n)&&(n.__curvenessList=[],n.__edgeMap={},AZ(n))}function g4e(n,e,t,i){if(J_(t)){var r=j9(n,e,t),a=t.__edgeMap,o=a[CZ(r)];a[r]&&!o?a[r].isForward=!0:o&&a[r]&&(o.isForward=!0,a[r].isForward=!1),a[r]=a[r]||[],a[r].push(i)}}function vP(n,e,t,i){var r=J_(e),a=$t(r);if(!r)return null;var o=p4e(n,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=v4e(n,e);AZ(e,u),n.lineStyle=n.lineStyle||{};var c=j9(n.node1,n.node2,e),d=e.__curvenessList,h=a||u%2?0:1;if(o.isForward)return d[h+s];var f=CZ(c),p=lC(f,e),m=d[s+p+h];return i?a?r&&r[0]===0?(p+h)%2?m:-m:((p%2?0:1)+h)%2?m:-m:(p+h)%2?m:-m:d[s+p+h]}function MZ(n){var e=n.coordinateSystem;if(!(e&&e.type!=="view")){var t=n.getGraph();t.eachNode(function(i){var r=i.getModel();i.setLayout([+r.get("x"),+r.get("y")])}),mP(t,n)}}function mP(n,e){n.eachEdge(function(t,i){var r=Hu(t.getModel().get(["lineStyle","curveness"]),-vP(t,e,i,!0),0),a=Oc(t.node1.getLayout()),o=Oc(t.node2.getLayout()),s=[a,o];+r&&s.push([(a[0]+o[0])/2-(a[1]-o[1])*r,(a[1]+o[1])/2-(o[0]-a[0])*r]),t.setLayout(s)})}function y4e(n,e){n.eachSeriesByType("graph",function(t){var i=t.get("layout"),r=t.coordinateSystem;if(r&&r.type!=="view"){var a=t.getData(),o=[];ne(r.dimensions,function(h){o=o.concat(a.mapDimensionsAll(h))});for(var s=0;s<a.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var d=a.get(o[c],s);isNaN(d)||(u=!0),l.push(d)}u?a.setItemLayout(s,r.dataToPoint(l)):a.setItemLayout(s,[NaN,NaN])}mP(a.graph,t)}else(!i||i==="none")&&MZ(t)})}function Eg(n){var e=n.coordinateSystem;if(e.type!=="view")return 1;var t=n.option.nodeScaleRatio,i=e.scaleX,r=e.getZoom(),a=(r-1)*t+1;return a/i}function Pg(n){var e=n.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var gB=Math.PI,Rx=[];function gP(n,e,t,i){var r=n.coordinateSystem;if(!(r&&r.type!=="view")){var a=r.getBoundingRect(),o=n.getData(),s=o.graph,l=a.width/2+a.x,u=a.height/2+a.y,c=Math.min(a.width,a.height)/2,d=o.count();if(o.setLayout({cx:l,cy:u}),!!d){if(t){var h=r.pointToData(i),f=h[0],p=h[1],m=[f-l,p-u];Ov(m,m),X4(m,m,c),t.setLayout([l+m[0],u+m[1]],!0);var v=n.get(["circular","rotateLabel"]);EZ(t,v,l,u)}_4e[e](n,s,o,c,l,u,d),s.eachEdge(function(g,_){var S=Hu(g.getModel().get(["lineStyle","curveness"]),vP(g,n,_),0),x=Oc(g.node1.getLayout()),A=Oc(g.node2.getLayout()),C,M=(x[0]+A[0])/2,I=(x[1]+A[1])/2;+S&&(S*=3,C=[l*S+M*(1-S),u*S+I*(1-S)]),g.setLayout([x,A,C])})}}}var _4e={value:function(n,e,t,i,r,a,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(c){var d=c.getValue("value"),h=u*(l?d:1)/2;s+=h,c.setLayout([i*Math.cos(s)+r,i*Math.sin(s)+a]),s+=h})},symbolSize:function(n,e,t,i,r,a,o){var s=0;Rx.length=o;var l=Eg(n);e.eachNode(function(d){var h=Pg(d);isNaN(h)&&(h=2),h<0&&(h=0),h*=l;var f=Math.asin(h/2/i);isNaN(f)&&(f=gB/2),Rx[d.dataIndex]=f,s+=f*2});var u=(2*gB-s)/o/2,c=0;e.eachNode(function(d){var h=u+Rx[d.dataIndex];c+=h,(!d.getLayout()||!d.getLayout().fixed)&&d.setLayout([i*Math.cos(c)+r,i*Math.sin(c)+a]),c+=h})}};function EZ(n,e,t,i){var r=n.getGraphicEl();if(r){var a=n.getModel(),o=a.get(["label","rotate"])||0,s=r.getSymbolPath();if(e){var l=n.getLayout(),u=Math.atan2(l[1]-i,l[0]-t);u<0&&(u=Math.PI*2+u);var c=l[0]<t;c&&(u=u-Math.PI);var d=c?"left":"right";s.setTextConfig({rotation:-u,position:d,origin:"center"});var h=s.ensureState("emphasis");It(h.textConfig||(h.textConfig={}),{position:d})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function S4e(n){n.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&gP(e,"symbolSize")})}var G1=XT;function b4e(n,e,t){for(var i=n,r=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<i.length;c++){var d=i[c];d.p||(d.p=Zp(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),d.pp=Oc(d.p),d.edges=null}var h=t.friction==null?.6:t.friction,f=h,p,m;return{warmUp:function(){f=h*.8},setFixed:function(v){i[v].fixed=!0},setUnfixed:function(v){i[v].fixed=!1},beforeStep:function(v){p=v},afterStep:function(v){m=v},step:function(v){p&&p(i,r);for(var g=[],_=i.length,S=0;S<r.length;S++){var x=r[S];if(!x.ignoreForceLayout){var A=x.n1,C=x.n2;ip(g,C.p,A.p);var M=YT(g)-x.d,I=C.w/(A.w+C.w);isNaN(I)&&(I=0),Ov(g,g),!A.fixed&&G1(A.p,A.p,g,I*M*f),!C.fixed&&G1(C.p,C.p,g,-(1-I)*M*f)}}for(var S=0;S<_;S++){var D=i[S];D.fixed||(ip(g,l,D.p),G1(D.p,D.p,g,u*f))}for(var S=0;S<_;S++)for(var A=i[S],E=S+1;E<_;E++){var C=i[E];ip(g,C.p,A.p);var M=YT(g);M===0&&(Mce(g,Math.random()-.5,Math.random()-.5),M=1);var P=(A.rep+C.rep)/M/M;!A.fixed&&G1(A.pp,A.pp,g,P),!C.fixed&&G1(C.pp,C.pp,g,-P)}for(var F=[],S=0;S<_;S++){var D=i[S];D.fixed||(ip(F,D.p,D.pp),G1(D.p,D.p,F,f),Ts(D.pp,D.p))}f=f*.992;var V=f<.01;m&&m(i,r,V),v&&v(V)}}}function x4e(n){n.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var i=e.preservedPoints||{},r=e.getGraph(),a=r.data,o=r.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?a.each(function(S){var x=a.getId(S);a.setItemLayout(S,i[x]||[NaN,NaN])}):!l||l==="none"?MZ(e):l==="circular"&&gP(e,"value");var u=a.getDataExtent("value"),c=o.getDataExtent("value"),d=s.get("repulsion"),h=s.get("edgeLength"),f=$t(d)?d:[d,d],p=$t(h)?h:[h,h];p=[p[1],p[0]];var m=a.mapArray("value",function(S,x){var A=a.getItemLayout(x),C=pr(S,u,f);return isNaN(C)&&(C=(f[0]+f[1])/2),{w:C,rep:C,fixed:a.getItemModel(x).get("fixed"),p:!A||isNaN(A[0])||isNaN(A[1])?null:A}}),v=o.mapArray("value",function(S,x){var A=r.getEdgeByIndex(x),C=pr(S,c,p);isNaN(C)&&(C=(p[0]+p[1])/2);var M=A.getModel(),I=Hu(A.getModel().get(["lineStyle","curveness"]),-vP(A,e,x,!0),0);return{n1:m[A.node1.dataIndex],n2:m[A.node2.dataIndex],d:C,curveness:I,ignoreForceLayout:M.get("ignoreForceLayout")}}),g=t.getBoundingRect(),_=b4e(m,v,{rect:g,gravity:s.get("gravity"),friction:s.get("friction")});_.beforeStep(function(S,x){for(var A=0,C=S.length;A<C;A++)S[A].fixed&&Ts(S[A].p,r.getNodeByIndex(A).getLayout())}),_.afterStep(function(S,x,A){for(var C=0,M=S.length;C<M;C++)S[C].fixed||r.getNodeByIndex(C).setLayout(S[C].p),i[a.getId(C)]=S[C].p;for(var C=0,M=x.length;C<M;C++){var I=x[C],D=r.getEdgeByIndex(C),E=I.n1.p,P=I.n2.p,F=D.getLayout();F=F?F.slice():[],F[0]=F[0]||[],F[1]=F[1]||[],Ts(F[0],E),Ts(F[1],P),+I.curveness&&(F[2]=[(E[0]+P[0])/2-(E[1]-P[1])*I.curveness,(E[1]+P[1])/2-(P[0]-E[0])*I.curveness]),D.setLayout(F)}}),e.forceLayout=_,e.preservedPoints=i,_.step()}else e.forceLayout=null})}function w4e(n,e,t){var i=It(n.getBoxLayoutParams(),{aspect:t});return uo(i,{width:e.getWidth(),height:e.getHeight()})}function T4e(n,e){var t=[];return n.eachSeriesByType("graph",function(i){var r=i.get("coordinateSystem");if(!r||r==="view"){var a=i.getData(),o=a.mapArray(function(v){var g=a.getItemModel(v);return[+g.get("x"),+g.get("y")]}),s=[],l=[];T_(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=w4e(i,e,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var d=l[0]-s[0],h=l[1]-s[1],f=c.width,p=c.height,m=i.coordinateSystem=new D3;m.zoomLimit=i.get("scaleLimit"),m.setBoundingRect(s[0],s[1],d,h),m.setViewRect(c.x,c.y,f,p),m.setCenter(i.get("center"),e),m.setZoom(i.get("zoom")),t.push(m)}}),t}var yB=Lo.prototype,Lx=E_.prototype,PZ=function(){function n(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return n}();(function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e})(PZ);function Ix(n){return isNaN(+n.cpx1)||isNaN(+n.cpy1)}var A4e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="ec-line",i}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new PZ},e.prototype.buildPath=function(t,i){Ix(i)?yB.buildPath.call(this,t,i):Lx.buildPath.call(this,t,i)},e.prototype.pointAt=function(t){return Ix(this.shape)?yB.pointAt.call(this,t):Lx.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var i=this.shape,r=Ix(i)?[i.x2-i.x1,i.y2-i.y1]:Lx.tangentAt.call(this,t);return Ov(r,r)},e}(Ei);const C4e=A4e;var Dx=["fromSymbol","toSymbol"];function _B(n){return"_"+n+"Type"}function SB(n,e,t){var i=e.getItemVisual(t,n);if(!i||i==="none")return i;var r=e.getItemVisual(t,n+"Size"),a=e.getItemVisual(t,n+"Rotate"),o=e.getItemVisual(t,n+"Offset"),s=e.getItemVisual(t,n+"KeepAspect"),l=Kv(r),u=n1(o||0,l);return i+l+u+(a||"")+(s||"")}function bB(n,e,t){var i=e.getItemVisual(t,n);if(!(!i||i==="none")){var r=e.getItemVisual(t,n+"Size"),a=e.getItemVisual(t,n+"Rotate"),o=e.getItemVisual(t,n+"Offset"),s=e.getItemVisual(t,n+"KeepAspect"),l=Kv(r),u=n1(o||0,l),c=Ya(i,-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=n,c}}function M4e(n){var e=new C4e({name:"line",subPixelOptimize:!0});return uC(e.shape,n),e}function uC(n,e){n.x1=e[0][0],n.y1=e[0][1],n.x2=e[1][0],n.y2=e[1][1],n.percent=1;var t=e[2];t?(n.cpx1=t[0],n.cpy1=t[1]):(n.cpx1=NaN,n.cpy1=NaN)}var E4e=function(n){ot(e,n);function e(t,i,r){var a=n.call(this)||this;return a._createLine(t,i,r),a}return e.prototype._createLine=function(t,i,r){var a=t.hostModel,o=t.getItemLayout(i),s=M4e(o);s.shape.percent=0,sa(s,{shape:{percent:1}},a,i),this.add(s),ne(Dx,function(l){var u=bB(l,t,i);this.add(u),this[_B(l)]=SB(l,t,i)},this),this._updateCommonStl(t,i,r)},e.prototype.updateData=function(t,i,r){var a=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(i),l={shape:{}};uC(l.shape,s),Qi(o,l,a,i),ne(Dx,function(u){var c=SB(u,t,i),d=_B(u);if(this[d]!==c){this.remove(this.childOfName(u));var h=bB(u,t,i);this.add(h)}this[d]=c},this),this._updateCommonStl(t,i,r)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,i,r){var a=t.hostModel,o=this.childOfName("line"),s=r&&r.emphasisLineStyle,l=r&&r.blurLineStyle,u=r&&r.selectLineStyle,c=r&&r.labelStatesModels,d=r&&r.emphasisDisabled,h=r&&r.focus,f=r&&r.blurScope;if(!r||t.hasItemOption){var p=t.getItemModel(i),m=p.getModel("emphasis");s=m.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),d=m.get("disabled"),h=m.get("focus"),f=m.get("blurScope"),c=_o(p)}var v=t.getItemVisual(i,"style"),g=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,ne(Dx,function(C){var M=this.childOfName(C);if(M){M.setColor(g),M.style.opacity=v.opacity;for(var I=0;I<Is.length;I++){var D=Is[I],E=o.getState(D);if(E){var P=E.style||{},F=M.ensureState(D),V=F.style||(F.style={});P.stroke!=null&&(V[M.__isEmptyBrush?"stroke":"fill"]=P.stroke),P.opacity!=null&&(V.opacity=P.opacity)}}M.markRedraw()}},this);var _=a.getRawValue(i);$o(this,c,{labelDataIndex:i,labelFetcher:{getFormattedLabel:function(C,M){return a.getFormattedLabel(C,M,t.dataType)}},inheritColor:g||"#000",defaultOpacity:v.opacity,defaultText:(_==null?t.getName(i):isFinite(_)?Ra(_):_)+""});var S=this.getTextContent();if(S){var x=c.normal;S.__align=S.style.align,S.__verticalAlign=S.style.verticalAlign,S.__position=x.get("position")||"middle";var A=x.get("distance");$t(A)||(A=[A,A]),S.__labelDistance=A}this.setTextConfig({position:null,local:!0,inside:!1}),ya(this,h,f,d)},e.prototype.highlight=function(){$c(this)},e.prototype.downplay=function(){qc(this)},e.prototype.updateLayout=function(t,i){this.setLinePoints(t.getItemLayout(i))},e.prototype.setLinePoints=function(t){var i=this.childOfName("line");uC(i.shape,t),i.dirty()},e.prototype.beforeUpdate=function(){var t=this,i=t.childOfName("fromSymbol"),r=t.childOfName("toSymbol"),a=t.getTextContent();if(!i&&!r&&(!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),d=l.pointAt(u),h=ip([],d,c);Ov(h,h);function f(E,P){var F=E.__specifiedRotation;if(F==null){var V=l.tangentAt(P);E.attr("rotation",(P===1?-1:1)*Math.PI/2-Math.atan2(V[1],V[0]))}else E.attr("rotation",F)}if(i&&(i.setPosition(c),f(i,0),i.scaleX=i.scaleY=o*u,i.markRedraw()),r&&(r.setPosition(d),f(r,1),r.scaleX=r.scaleY=o*u,r.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var p=void 0,m=void 0,v=a.__labelDistance,g=v[0]*o,_=v[1]*o,S=u/2,x=l.tangentAt(S),A=[x[1],-x[0]],C=l.pointAt(S);A[1]>0&&(A[0]=-A[0],A[1]=-A[1]);var M=x[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var I=-Math.atan2(x[1],x[0]);d[0]<c[0]&&(I=Math.PI+I),a.rotation=I}var D=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":D=-_,m="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":D=_,m="top";break;default:D=0,m="middle"}switch(a.__position){case"end":a.x=h[0]*g+d[0],a.y=h[1]*_+d[1],p=h[0]>.8?"left":h[0]<-.8?"right":"center",m=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*g+c[0],a.y=-h[1]*_+c[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",m=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=g*M+c[0],a.y=c[1]+D,p=x[0]<0?"right":"left",a.originX=-g*M,a.originY=-D;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=C[0],a.y=C[1]+D,p="center",a.originY=-D;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-g*M+d[0],a.y=d[1]+D,p=x[0]>=0?"right":"left",a.originX=g*M,a.originY=-D;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||m,align:a.__align||p})}},e}(ei);const yP=E4e;var P4e=function(){function n(e){this.group=new ei,this._LineCtor=e||yP}return n.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var i=this,r=i.group,a=i._lineData;i._lineData=e,a||r.removeAll();var o=xB(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){r.remove(a.getItemGraphicEl(s))}).execute()},n.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,i){t.updateLayout(e,i)},this)},n.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=xB(e),this._lineData=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function i(s){!s.isGroup&&!R4e(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var r=e.start;r<e.end;r++){var a=t.getItemLayout(r);if(Nx(a)){var o=new this._LineCtor(t,r,this._seriesScope);o.traverse(i),this.group.add(o),t.setItemGraphicEl(r,o),this._progressiveEls.push(o)}}},n.prototype.remove=function(){this.group.removeAll()},n.prototype.eachRendered=function(e){Gh(this._progressiveEls||this.group,e)},n.prototype._doAdd=function(e,t,i){var r=e.getItemLayout(t);if(Nx(r)){var a=new this._LineCtor(e,t,i);e.setItemGraphicEl(t,a),this.group.add(a)}},n.prototype._doUpdate=function(e,t,i,r,a){var o=e.getItemGraphicEl(i);if(!Nx(t.getItemLayout(r))){this.group.remove(o);return}o?o.updateData(t,r,a):o=new this._LineCtor(t,r,a),t.setItemGraphicEl(r,o),this.group.add(o)},n}();function R4e(n){return n.animators&&n.animators.length>0}function xB(n){var e=n.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:_o(e)}}function wB(n){return isNaN(n[0])||isNaN(n[1])}function Nx(n){return n&&!wB(n[0])&&!wB(n[1])}const _P=P4e;var kx=[],Fx=[],Ox=[],U1=Po,Bx=_p,TB=Math.abs;function AB(n,e,t){for(var i=n[0],r=n[1],a=n[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){kx[0]=U1(i[0],r[0],a[0],c),kx[1]=U1(i[1],r[1],a[1],c);var d=TB(Bx(kx,e)-l);d<o&&(o=d,s=c)}for(var h=0;h<32;h++){var f=s+u;Fx[0]=U1(i[0],r[0],a[0],s),Fx[1]=U1(i[1],r[1],a[1],s),Ox[0]=U1(i[0],r[0],a[0],f),Ox[1]=U1(i[1],r[1],a[1],f);var d=Bx(Fx,e)-l;if(TB(d)<.01)break;var p=Bx(Ox,e)-l;u/=2,d<0?p>=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function zx(n,e){var t=[],i=w9,r=[[],[],[]],a=[[],[]],o=[];e/=2,n.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),d=s.getVisual("toSymbol");u.__original||(u.__original=[Oc(u[0]),Oc(u[1])],u[2]&&u.__original.push(Oc(u[2])));var h=u.__original;if(u[2]!=null){if(Ts(r[0],h[0]),Ts(r[1],h[2]),Ts(r[2],h[1]),c&&c!=="none"){var f=Pg(s.node1),p=AB(r,h[0],f*e);i(r[0][0],r[1][0],r[2][0],p,t),r[0][0]=t[3],r[1][0]=t[4],i(r[0][1],r[1][1],r[2][1],p,t),r[0][1]=t[3],r[1][1]=t[4]}if(d&&d!=="none"){var f=Pg(s.node2),p=AB(r,h[1],f*e);i(r[0][0],r[1][0],r[2][0],p,t),r[1][0]=t[1],r[2][0]=t[2],i(r[0][1],r[1][1],r[2][1],p,t),r[1][1]=t[1],r[2][1]=t[2]}Ts(u[0],r[0]),Ts(u[1],r[2]),Ts(u[2],r[1])}else{if(Ts(a[0],h[0]),Ts(a[1],h[1]),ip(o,a[1],a[0]),Ov(o,o),c&&c!=="none"){var f=Pg(s.node1);XT(a[0],a[0],o,f*e)}if(d&&d!=="none"){var f=Pg(s.node2);XT(a[1],a[1],o,-f*e)}Ts(u[0],a[0]),Ts(u[1],a[1])}})}function CB(n){return n.type==="view"}var L4e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){var r=new M3,a=new _P,o=this.group;this._controller=new I3(i.getZr()),this._controllerHost={target:o},o.add(r.group),o.add(a.group),this._symbolDraw=r,this._lineDraw=a,this._firstRender=!0},e.prototype.render=function(t,i,r){var a=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(CB(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):Qi(u,c,t)}zx(t.getGraph(),Eg(t));var d=t.getData();s.updateData(d);var h=t.getEdgeData();l.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,i,r),clearTimeout(this._layoutTimeout);var f=t.forceLayout,p=t.get(["force","layoutAnimation"]);f&&this._startForceLayoutIteration(f,p);var m=t.get("layout");d.graph.eachNode(function(S){var x=S.dataIndex,A=S.getGraphicEl(),C=S.getModel();if(A){A.off("drag").off("dragend");var M=C.get("draggable");M&&A.on("drag",function(D){switch(m){case"force":f.warmUp(),!a._layouting&&a._startForceLayoutIteration(f,p),f.setFixed(x),d.setItemLayout(x,[A.x,A.y]);break;case"circular":d.setItemLayout(x,[A.x,A.y]),S.setLayout({fixed:!0},!0),gP(t,"symbolSize",S,[D.offsetX,D.offsetY]),a.updateLayout(t);break;case"none":default:d.setItemLayout(x,[A.x,A.y]),mP(t.getGraph(),t),a.updateLayout(t);break}}).on("dragend",function(){f&&f.setUnfixed(x)}),A.setDraggable(M,!!C.get("cursor"));var I=C.get(["emphasis","focus"]);I==="adjacency"&&(ni(A).focus=S.getAdjacentDataIndices())}}),d.graph.eachEdge(function(S){var x=S.getGraphicEl(),A=S.getModel().get(["emphasis","focus"]);x&&A==="adjacency"&&(ni(x).focus={edge:[S.dataIndex],node:[S.node1.dataIndex,S.node2.dataIndex]})});var v=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),g=d.getLayout("cx"),_=d.getLayout("cy");d.graph.eachNode(function(S){EZ(S,v,g,_)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,i){var r=this;(function a(){t.step(function(o){r.updateLayout(r._model),(r._layouting=!o)&&(i?r._layoutTimeout=setTimeout(a,16):a())})})()},e.prototype._updateController=function(t,i,r){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,c,d){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,d)&&!Y_(u,r,t)}),!CB(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){oP(s,u.dx,u.dy),r.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){sP(s,u.scale,u.originX,u.originY),r.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),zx(t.getGraph(),Eg(t)),a._lineDraw.updateLayout(),r.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,i=t.getData(),r=Eg(t);i.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(r)})},e.prototype.updateLayout=function(t){zx(t.getGraph(),Eg(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}(Yr);const I4e=L4e;function V1(n){return"_EC_"+n}var D4e=function(){function n(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return n.prototype.isDirected=function(){return this._directed},n.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var i=this._nodesMap;if(!i[V1(e)]){var r=new jf(e,t);return r.hostGraph=this,this.nodes.push(r),i[V1(e)]=r,r}},n.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},n.prototype.getNodeById=function(e){return this._nodesMap[V1(e)]},n.prototype.addEdge=function(e,t,i){var r=this._nodesMap,a=this._edgesMap;if(Yi(e)&&(e=this.nodes[e]),Yi(t)&&(t=this.nodes[t]),e instanceof jf||(e=r[V1(e)]),t instanceof jf||(t=r[V1(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new RZ(e,t,i);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}},n.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},n.prototype.getEdge=function(e,t){e instanceof jf&&(e=e.id),t instanceof jf&&(t=t.id);var i=this._edgesMap;return this._directed?i[e+"-"+t]:i[e+"-"+t]||i[t+"-"+e]},n.prototype.eachNode=function(e,t){for(var i=this.nodes,r=i.length,a=0;a<r;a++)i[a].dataIndex>=0&&e.call(t,i[a],a)},n.prototype.eachEdge=function(e,t){for(var i=this.edges,r=i.length,a=0;a<r;a++)i[a].dataIndex>=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&e.call(t,i[a],a)},n.prototype.breadthFirstTraverse=function(e,t,i,r){if(t instanceof jf||(t=this._nodesMap[V1(t)]),!!t){for(var a=i==="out"?"outEdges":i==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(r,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],d=c.node1===l?c.node2:c.node1;if(!d.__visited){if(e.call(r,d,l))return;s.push(d),d.__visited=!0}}}},n.prototype.update=function(){for(var e=this.data,t=this.edgeData,i=this.nodes,r=this.edges,a=0,o=i.length;a<o;a++)i[a].dataIndex=-1;for(var a=0,o=e.count();a<o;a++)i[e.getRawIndex(a)].dataIndex=a;t.filterSelf(function(s){var l=r[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var a=0,o=r.length;a<o;a++)r[a].dataIndex=-1;for(var a=0,o=t.count();a<o;a++)r[t.getRawIndex(a)].dataIndex=a},n.prototype.clone=function(){for(var e=new n(this._directed),t=this.nodes,i=this.edges,r=0;r<t.length;r++)e.addNode(t[r].id,t[r].dataIndex);for(var r=0;r<i.length;r++){var a=i[r];e.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return e},n}(),jf=function(){function n(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e==null?"":e,this.dataIndex=t==null?-1:t}return n.prototype.degree=function(){return this.edges.length},n.prototype.inDegree=function(){return this.inEdges.length},n.prototype.outDegree=function(){return this.outEdges.length},n.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,i=t.data.getItemModel(this.dataIndex);return i.getModel(e)}},n.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var i=this.edges[t];i.dataIndex<0||(e.edge.push(i.dataIndex),e.node.push(i.node1.dataIndex,i.node2.dataIndex))}return e},n.prototype.getTrajectoryDataIndices=function(){for(var e=In(),t=In(),i=0;i<this.edges.length;i++){var r=this.edges[i];if(!(r.dataIndex<0)){e.set(r.dataIndex,!0);for(var a=[r.node1],o=[r.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()}},n}(),RZ=function(){function n(e,t,i){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=i==null?-1:i}return n.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,i=t.edgeData.getItemModel(this.dataIndex);return i.getModel(e)}},n.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},n.prototype.getTrajectoryDataIndices=function(){var e=In(),t=In();e.set(this.dataIndex,!0);for(var i=[this.node1],r=[this.node2],a=0;a<i.length;){var o=i[a];a++,t.set(o.dataIndex,!0);for(var s=0;s<o.inEdges.length;s++)e.set(o.inEdges[s].dataIndex,!0),i.push(o.inEdges[s].node1)}for(a=0;a<r.length;){var l=r[a];a++,t.set(l.dataIndex,!0);for(var s=0;s<l.outEdges.length;s++)e.set(l.outEdges[s].dataIndex,!0),r.push(l.outEdges[s].node2)}return{edge:e.keys(),node:t.keys()}},n}();function LZ(n,e){return{getValue:function(t){var i=this[n][e];return i.getStore().get(i.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,i){this.dataIndex>=0&&this[n][e].setItemVisual(this.dataIndex,t,i)},getVisual:function(t){return this[n][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,i){this.dataIndex>=0&&this[n][e].setItemLayout(this.dataIndex,t,i)},getLayout:function(){return this[n][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[n][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[n][e].getRawIndex(this.dataIndex)}}}Za(jf,LZ("hostGraph","data"));Za(RZ,LZ("hostGraph","edgeData"));const N4e=D4e;function IZ(n,e,t,i,r){for(var a=new N4e(i),o=0;o<n.length;o++)a.addNode(Ro(n[o].id,n[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var c=e[o],d=c.source,h=c.target;a.addEdge(d,h,u)&&(l.push(c),s.push(Ro(lo(c.id,null),d+" > "+h)),u++)}var f=t.get("coordinateSystem"),p;if(f==="cartesian2d"||f==="polar")p=nd(n,t);else{var m=x3.get(f),v=m?m.dimensions||[]:[];xi(v,"value")<0&&v.concat(["value"]);var g=T3(n,{coordDimensions:v,encodeDefine:t.getEncode()}).dimensions;p=new Rs(g,t),p.initData(n)}var _=new Rs(["value"],t);return _.initData(l,s),r&&r(p,_),fZ({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var k4e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){n.prototype.init.apply(this,arguments);var i=this;function r(){return i._categoriesData}this.legendVisualProvider=new L3(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){n.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){n.prototype.mergeDefaultAndTheme.apply(this,arguments),Fp(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,i){var r=t.edges||t.links||[],a=t.data||t.nodes||[],o=this;if(a&&r){m4e(this);var s=IZ(a,r,this,!0,l);return ne(s.edges,function(u){g4e(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var m=o._categoriesModels,v=p.getShallow("category"),g=m[v];return g&&(g.parentModel=p.parentModel,p.parentModel=g),p});var d=Xr.prototype.getModel;function h(p,m){var v=d.call(this,p,m);return v.resolveParentPath=f,v}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=f,p.getModel=h,p});function f(p){if(p&&(p[0]==="label"||p[1]==="label")){var m=p.slice();return p[0]==="label"?m[0]="edgeLabel":p[1]==="label"&&(m[1]="edgeLabel"),m}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,i,r){if(r==="edge"){var a=this.getData(),o=this.getDataParams(t,r),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),So("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var d=KX({series:this,dataIndex:t,multipleSeries:i});return d},e.prototype._updateCategoriesData=function(){var t=Xt(this.option.categories||[],function(r){return r.value!=null?r:It({value:0},r)}),i=new Rs(["value"],this);i.initData(t),this._categoriesData=i,this._categoriesModels=i.mapArray(function(r){return i.getItemModel(r)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return n.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}(pa);const F4e=k4e;var O4e={type:"graphRoam",event:"graphRoam",update:"none"};function B4e(n){n.registerChartView(I4e),n.registerSeriesModel(F4e),n.registerProcessor(d4e),n.registerVisual(h4e),n.registerVisual(f4e),n.registerLayout(y4e),n.registerLayout(n.PRIORITY.VISUAL.POST_CHART_LAYOUT,S4e),n.registerLayout(x4e),n.registerCoordinateSystem("graphView",{dimensions:D3.dimensions,create:T4e}),n.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Ba),n.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Ba),n.registerAction(O4e,function(e,t,i){t.eachComponent({mainType:"series",query:e},function(r){var a=r.coordinateSystem,o=uP(a,e,void 0,i);r.setCenter&&r.setCenter(o.center),r.setZoom&&r.setZoom(o.zoom)})})}var z4e=function(){function n(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return n}(),G4e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="pointer",i}return e.prototype.getDefaultShape=function(){return new z4e},e.prototype.buildPath=function(t,i){var r=Math.cos,a=Math.sin,o=i.r,s=i.width,l=i.angle,u=i.x-r(l)*s*(s>=o/3?1:2),c=i.y-a(l)*s*(s>=o/3?1:2);l=i.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(i.x+r(l)*s,i.y+a(l)*s),t.lineTo(i.x+r(i.angle)*o,i.y+a(i.angle)*o),t.lineTo(i.x-r(l)*s,i.y-a(l)*s),t.lineTo(u,c)},e}(Ei);const U4e=G4e;function V4e(n,e){var t=n.get("center"),i=e.getWidth(),r=e.getHeight(),a=Math.min(i,r),o=_n(t[0],e.getWidth()),s=_n(t[1],e.getHeight()),l=_n(n.get("radius"),a/2);return{cx:o,cy:s,r:l}}function A6(n,e){var t=n==null?"":n+"";return e&&(xn(e)?t=e.replace("{value}",t):$n(e)&&(t=e(n))),t}var H4e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){this.group.removeAll();var a=t.get(["axisLine","lineStyle","color"]),o=V4e(t,r);this._renderMain(t,i,r,a,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,i,r,a,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,d=t.getModel("axisLine"),h=d.get("roundCap"),f=h?h8:ll,p=d.get("show"),m=d.getModel("lineStyle"),v=m.get("width"),g=[u,c];uE(g,!l),u=g[0],c=g[1];for(var _=c-u,S=u,x=[],A=0;p&&A<a.length;A++){var C=Math.min(Math.max(a[A][0],0),1);c=u+_*C;var M=new f({shape:{startAngle:S,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-v,r:o.r},silent:!0});M.setStyle({fill:a[A][1]}),M.setStyle(m.getLineStyle(["color","width"])),x.push(M),S=c}x.reverse(),ne(x,function(D){return s.add(D)});var I=function(D){if(D<=0)return a[0][1];var E;for(E=0;E<a.length;E++)if(a[E][0]>=D&&(E===0?0:a[E-1][0])<D)return a[E][1];return a[E-1][1]};this._renderTicks(t,i,r,I,o,u,c,l,v),this._renderTitleAndDetail(t,i,r,I,o),this._renderAnchor(t,o),this._renderPointer(t,i,r,I,o,u,c,l,v)},e.prototype._renderTicks=function(t,i,r,a,o,s,l,u,c){for(var d=this.group,h=o.cx,f=o.cy,p=o.r,m=+t.get("min"),v=+t.get("max"),g=t.getModel("splitLine"),_=t.getModel("axisTick"),S=t.getModel("axisLabel"),x=t.get("splitNumber"),A=_.get("splitNumber"),C=_n(g.get("length"),p),M=_n(_.get("length"),p),I=s,D=(l-s)/x,E=D/A,P=g.getModel("lineStyle").getLineStyle(),F=_.getModel("lineStyle").getLineStyle(),V=g.get("distance"),G,W,Y=0;Y<=x;Y++){if(G=Math.cos(I),W=Math.sin(I),g.get("show")){var Q=V?V+c:c,K=new Lo({shape:{x1:G*(p-Q)+h,y1:W*(p-Q)+f,x2:G*(p-C-Q)+h,y2:W*(p-C-Q)+f},style:P,silent:!0});P.stroke==="auto"&&K.setStyle({stroke:a(Y/x)}),d.add(K)}if(S.get("show")){var Q=S.get("distance")+V,ae=A6(Ra(Y/x*(v-m)+m),S.get("formatter")),ie=a(Y/x),he=G*(p-C-Q)+h,Ee=W*(p-C-Q)+f,He=S.get("rotate"),xe=0;He==="radial"?(xe=-I+2*Math.PI,xe>Math.PI/2&&(xe+=Math.PI)):He==="tangential"?xe=-I-Math.PI/2:Yi(He)&&(xe=He*Math.PI/180),xe===0?d.add(new Xi({style:qr(S,{text:ae,x:he,y:Ee,verticalAlign:W<-.8?"top":W>.8?"bottom":"middle",align:G<-.4?"left":G>.4?"right":"center"},{inheritColor:ie}),silent:!0})):d.add(new Xi({style:qr(S,{text:ae,x:he,y:Ee,verticalAlign:"middle",align:"center"},{inheritColor:ie}),silent:!0,originX:he,originY:Ee,rotation:xe}))}if(_.get("show")&&Y!==x){var Q=_.get("distance");Q=Q?Q+c:c;for(var Fe=0;Fe<=A;Fe++){G=Math.cos(I),W=Math.sin(I);var pt=new Lo({shape:{x1:G*(p-Q)+h,y1:W*(p-Q)+f,x2:G*(p-M-Q)+h,y2:W*(p-M-Q)+f},silent:!0,style:F});F.stroke==="auto"&&pt.setStyle({stroke:a((Y+Fe/A)/x)}),d.add(pt),I+=E}I-=E}else I+=D}},e.prototype._renderPointer=function(t,i,r,a,o,s,l,u,c){var d=this.group,h=this._data,f=this._progressEls,p=[],m=t.get(["pointer","show"]),v=t.getModel("progress"),g=v.get("show"),_=t.getData(),S=_.mapDimension("value"),x=+t.get("min"),A=+t.get("max"),C=[x,A],M=[s,l];function I(E,P){var F=_.getItemModel(E),V=F.getModel("pointer"),G=_n(V.get("width"),o.r),W=_n(V.get("length"),o.r),Y=t.get(["pointer","icon"]),Q=V.get("offsetCenter"),K=_n(Q[0],o.r),ae=_n(Q[1],o.r),ie=V.get("keepAspect"),he;return Y?he=Ya(Y,K-G/2,ae-W,G,W,null,ie):he=new U4e({shape:{angle:-Math.PI/2,width:G,r:W,x:K,y:ae}}),he.rotation=-(P+Math.PI/2),he.x=o.cx,he.y=o.cy,he}function D(E,P){var F=v.get("roundCap"),V=F?h8:ll,G=v.get("overlap"),W=G?v.get("width"):c/_.count(),Y=G?o.r-W:o.r-(E+1)*W,Q=G?o.r:o.r-E*W,K=new V({shape:{startAngle:s,endAngle:P,cx:o.cx,cy:o.cy,clockwise:u,r0:Y,r:Q}});return G&&(K.z2=pr(_.get(S,E),[x,A],[100,0],!0)),K}(g||m)&&(_.diff(h).add(function(E){var P=_.get(S,E);if(m){var F=I(E,s);sa(F,{rotation:-((isNaN(+P)?M[0]:pr(P,C,M,!0))+Math.PI/2)},t),d.add(F),_.setItemGraphicEl(E,F)}if(g){var V=D(E,s),G=v.get("clip");sa(V,{shape:{endAngle:pr(P,C,M,G)}},t),d.add(V),bA(t.seriesIndex,_.dataType,E,V),p[E]=V}}).update(function(E,P){var F=_.get(S,E);if(m){var V=h.getItemGraphicEl(P),G=V?V.rotation:s,W=I(E,G);W.rotation=G,Qi(W,{rotation:-((isNaN(+F)?M[0]:pr(F,C,M,!0))+Math.PI/2)},t),d.add(W),_.setItemGraphicEl(E,W)}if(g){var Y=f[P],Q=Y?Y.shape.endAngle:s,K=D(E,Q),ae=v.get("clip");Qi(K,{shape:{endAngle:pr(F,C,M,ae)}},t),d.add(K),bA(t.seriesIndex,_.dataType,E,K),p[E]=K}}).execute(),_.each(function(E){var P=_.getItemModel(E),F=P.getModel("emphasis"),V=F.get("focus"),G=F.get("blurScope"),W=F.get("disabled");if(m){var Y=_.getItemGraphicEl(E),Q=_.getItemVisual(E,"style"),K=Q.fill;if(Y instanceof qo){var ae=Y.style;Y.useStyle(It({image:ae.image,x:ae.x,y:ae.y,width:ae.width,height:ae.height},Q))}else Y.useStyle(Q),Y.type!=="pointer"&&Y.setColor(K);Y.setStyle(P.getModel(["pointer","itemStyle"]).getItemStyle()),Y.style.fill==="auto"&&Y.setStyle("fill",a(pr(_.get(S,E),C,[0,1],!0))),Y.z2EmphasisLift=0,jo(Y,P),ya(Y,V,G,W)}if(g){var ie=p[E];ie.useStyle(_.getItemVisual(E,"style")),ie.setStyle(P.getModel(["progress","itemStyle"]).getItemStyle()),ie.z2EmphasisLift=0,jo(ie,P),ya(ie,V,G,W)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,i){var r=t.getModel("anchor"),a=r.get("show");if(a){var o=r.get("size"),s=r.get("icon"),l=r.get("offsetCenter"),u=r.get("keepAspect"),c=Ya(s,i.cx-o/2+_n(l[0],i.r),i.cy-o/2+_n(l[1],i.r),o,o,null,u);c.z2=r.get("showAbove")?1:0,c.setStyle(r.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,i,r,a,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),d=+t.get("max"),h=new ei,f=[],p=[],m=t.isAnimationEnabled(),v=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(g){f[g]=new Xi({silent:!0}),p[g]=new Xi({silent:!0})}).update(function(g,_){f[g]=s._titleEls[_],p[g]=s._detailEls[_]}).execute(),l.each(function(g){var _=l.getItemModel(g),S=l.get(u,g),x=new ei,A=a(pr(S,[c,d],[0,1],!0)),C=_.getModel("title");if(C.get("show")){var M=C.get("offsetCenter"),I=o.cx+_n(M[0],o.r),D=o.cy+_n(M[1],o.r),E=f[g];E.attr({z2:v?0:2,style:qr(C,{x:I,y:D,text:l.getName(g),align:"center",verticalAlign:"middle"},{inheritColor:A})}),x.add(E)}var P=_.getModel("detail");if(P.get("show")){var F=P.get("offsetCenter"),V=o.cx+_n(F[0],o.r),G=o.cy+_n(F[1],o.r),W=_n(P.get("width"),o.r),Y=_n(P.get("height"),o.r),Q=t.get(["progress","show"])?l.getItemVisual(g,"style").fill:A,E=p[g],K=P.get("formatter");E.attr({z2:v?0:2,style:qr(P,{x:V,y:G,text:A6(S,K),width:isNaN(W)?null:W,height:isNaN(Y)?null:Y,align:"center",verticalAlign:"middle"},{inheritColor:Q})}),Jq(E,{normal:P},S,function(ie){return A6(ie,K)}),m&&Qq(E,g,l,t,{getFormattedLabel:function(ie,he,Ee,He,xe,Fe){return A6(Fe?Fe.interpolatedValue:S,K)}}),x.add(E)}h.add(x)}),this.group.add(h),this._titleEls=f,this._detailEls=p},e.type="gauge",e}(Yr);const W4e=H4e;var j4e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,i){return Jv(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}(pa);const $4e=j4e;function q4e(n){n.registerChartView(W4e),n.registerSeriesModel($4e)}var X4e=["itemStyle","opacity"],Y4e=function(n){ot(e,n);function e(t,i){var r=n.call(this)||this,a=r,o=new hl,s=new Xi;return a.setTextContent(s),r.setTextGuideLine(o),r.updateData(t,i,!0),r}return e.prototype.updateData=function(t,i,r){var a=this,o=t.hostModel,s=t.getItemModel(i),l=t.getItemLayout(i),u=s.getModel("emphasis"),c=s.get(X4e);c=c==null?1:c,r||iu(a),a.useStyle(t.getItemVisual(i,"style")),a.style.lineJoin="round",r?(a.setShape({points:l.points}),a.style.opacity=0,sa(a,{style:{opacity:c}},o,i)):Qi(a,{style:{opacity:c},shape:{points:l.points}},o,i),jo(a,s),this._updateLabel(t,i),ya(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,i){var r=this,a=this.getTextGuideLine(),o=r.getTextContent(),s=t.hostModel,l=t.getItemModel(i),u=t.getItemLayout(i),c=u.label,d=t.getItemVisual(i,"style"),h=d.fill;$o(o,_o(l),{labelFetcher:t.hostModel,labelDataIndex:i,defaultOpacity:d.opacity,defaultText:t.getName(i)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),r.setTextConfig({local:!0,inside:!!c.inside,insideStroke:h,outsideFill:h});var f=c.linePoints;a.setShape({points:f}),r.textGuideLineConfig={anchor:f?new fi(f[0][0],f[0][1]):null},Qi(o,{style:{x:c.x,y:c.y}},s,i),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),KE(r,ZE(l),{stroke:h})},e}(ul),K4e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,i,r){var a=t.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new Y4e(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);L9(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}(Yr);const Z4e=K4e;var J4e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new L3(An(this.getData,this),An(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,i){return Jv(this,{coordDimensions:["value"],encodeDefaulter:si(EE,this)})},e.prototype._defaultLabelLine=function(t){Fp(t,"labelLine",["show"]);var i=t.labelLine,r=t.emphasis.labelLine;i.show=i.show&&t.label.show,r.show=r.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var i=this.getData(),r=n.prototype.getDataParams.call(this,t),a=i.mapDimension("value"),o=i.getSum(a);return r.percent=o?+(i.get(a,t)/o*100).toFixed(2):0,r.$vars.push("percent"),r},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}(pa);const Q4e=J4e;function e5e(n,e){return uo(n.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function t5e(n,e){for(var t=n.mapDimension("value"),i=n.mapArray(t,function(l){return l}),r=[],a=e==="ascending",o=0,s=n.count();o<s;o++)r[o]=o;return $n(e)?r.sort(e):e!=="none"&&r.sort(function(l,u){return a?i[l]-i[u]:i[u]-i[l]}),r}function n5e(n){var e=n.hostModel,t=e.get("orient");n.each(function(i){var r=n.getItemModel(i),a=r.getModel("label"),o=a.get("position"),s=r.getModel("labelLine"),l=n.getItemLayout(i),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",d,h,f,p;if(c)o==="insideLeft"?(h=(u[0][0]+u[3][0])/2+5,f=(u[0][1]+u[3][1])/2,d="left"):o==="insideRight"?(h=(u[1][0]+u[2][0])/2-5,f=(u[1][1]+u[2][1])/2,d="right"):(h=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,f=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,d="center"),p=[[h,f],[h,f]];else{var m=void 0,v=void 0,g=void 0,_=void 0,S=s.get("length");o==="left"?(m=(u[3][0]+u[0][0])/2,v=(u[3][1]+u[0][1])/2,g=m-S,h=g-5,d="right"):o==="right"?(m=(u[1][0]+u[2][0])/2,v=(u[1][1]+u[2][1])/2,g=m+S,h=g+5,d="left"):o==="top"?(m=(u[3][0]+u[0][0])/2,v=(u[3][1]+u[0][1])/2,_=v-S,f=_-5,d="center"):o==="bottom"?(m=(u[1][0]+u[2][0])/2,v=(u[1][1]+u[2][1])/2,_=v+S,f=_+5,d="center"):o==="rightTop"?(m=t==="horizontal"?u[3][0]:u[1][0],v=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(_=v-S,f=_-5,d="center"):(g=m+S,h=g+5,d="top")):o==="rightBottom"?(m=u[2][0],v=u[2][1],t==="horizontal"?(_=v+S,f=_+5,d="center"):(g=m+S,h=g+5,d="bottom")):o==="leftTop"?(m=u[0][0],v=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(_=v-S,f=_-5,d="center"):(g=m-S,h=g-5,d="right")):o==="leftBottom"?(m=t==="horizontal"?u[1][0]:u[3][0],v=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(_=v+S,f=_+5,d="center"):(g=m-S,h=g-5,d="right")):(m=(u[1][0]+u[2][0])/2,v=(u[1][1]+u[2][1])/2,t==="horizontal"?(_=v+S,f=_+5,d="center"):(g=m+S,h=g+5,d="left")),t==="horizontal"?(g=m,h=g):(_=v,f=_),p=[[m,v],[g,_]]}l.label={linePoints:p,x:h,y:f,verticalAlign:"middle",textAlign:d,inside:c}})}function i5e(n,e){n.eachSeriesByType("funnel",function(t){var i=t.getData(),r=i.mapDimension("value"),a=t.get("sort"),o=e5e(t,e),s=t.get("orient"),l=o.width,u=o.height,c=t5e(i,a),d=o.x,h=o.y,f=s==="horizontal"?[_n(t.get("minSize"),u),_n(t.get("maxSize"),u)]:[_n(t.get("minSize"),l),_n(t.get("maxSize"),l)],p=i.getDataExtent(r),m=t.get("min"),v=t.get("max");m==null&&(m=Math.min(p[0],0)),v==null&&(v=p[1]);var g=t.get("funnelAlign"),_=t.get("gap"),S=s==="horizontal"?l:u,x=(S-_*(i.count()-1))/i.count(),A=function(G,W){if(s==="horizontal"){var Y=i.get(r,G)||0,Q=pr(Y,[m,v],f,!0),K=void 0;switch(g){case"top":K=h;break;case"center":K=h+(u-Q)/2;break;case"bottom":K=h+(u-Q);break}return[[W,K],[W,K+Q]]}var ae=i.get(r,G)||0,ie=pr(ae,[m,v],f,!0),he;switch(g){case"left":he=d;break;case"center":he=d+(l-ie)/2;break;case"right":he=d+l-ie;break}return[[he,W],[he+ie,W]]};a==="ascending"&&(x=-x,_=-_,s==="horizontal"?d+=l:h+=u,c=c.reverse());for(var C=0;C<c.length;C++){var M=c[C],I=c[C+1],D=i.getItemModel(M);if(s==="horizontal"){var E=D.get(["itemStyle","width"]);E==null?E=x:(E=_n(E,l),a==="ascending"&&(E=-E));var P=A(M,d),F=A(I,d+E);d+=E+_,i.setItemLayout(M,{points:P.concat(F.slice().reverse())})}else{var V=D.get(["itemStyle","height"]);V==null?V=x:(V=_n(V,u),a==="ascending"&&(V=-V));var P=A(M,h),F=A(I,h+V);h+=V+_,i.setItemLayout(M,{points:P.concat(F.slice().reverse())})}}n5e(i)})}function r5e(n){n.registerChartView(Z4e),n.registerSeriesModel(Q4e),n.registerLayout(i5e),n.registerProcessor(R3("funnel"))}var a5e=.3,o5e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new ei,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,i,r,a){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.dimensions,d=EB(t);s.diff(l).add(h).update(f).remove(p).execute();function h(v){var g=MB(s,o,v,c,u);Gx(g,s,v,d)}function f(v,g){var _=l.getItemGraphicEl(g),S=DZ(s,v,c,u);s.setItemGraphicEl(v,_),Qi(_,{shape:{points:S}},t,v),iu(_),Gx(_,s,v,d)}function p(v){var g=l.getItemGraphicEl(v);o.remove(g)}if(!this._initialized){this._initialized=!0;var m=s5e(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(m)}this._data=s},e.prototype.incrementalPrepareRender=function(t,i,r){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,i,r){for(var a=i.getData(),o=i.coordinateSystem,s=o.dimensions,l=EB(i),u=this._progressiveEls=[],c=t.start;c<t.end;c++){var d=MB(a,this._dataGroup,c,s,o);d.incremental=!0,Gx(d,a,c,l),u.push(d)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(Yr);function s5e(n,e,t){var i=n.model,r=n.getRect(),a=new Hi({shape:{x:r.x,y:r.y,width:r.width,height:r.height}}),o=i.get("layout")==="horizontal"?"width":"height";return a.setShape(o,0),sa(a,{shape:{width:r.width,height:r.height}},e,t),a}function DZ(n,e,t,i){for(var r=[],a=0;a<t.length;a++){var o=t[a],s=n.get(n.mapDimension(o),e);l5e(s,i.getAxis(o).type)||r.push(i.dataToPoint(s,o))}return r}function MB(n,e,t,i,r){var a=DZ(n,t,i,r),o=new hl({shape:{points:a},z2:10});return e.add(o),n.setItemGraphicEl(t,o),o}function EB(n){var e=n.get("smooth",!0);return e===!0&&(e=a5e),e=jc(e),b9(e)&&(e=0),{smooth:e}}function Gx(n,e,t,i){n.useStyle(e.getItemVisual(t,"style")),n.style.fill=null,n.setShape("smooth",i.smooth);var r=e.getItemModel(t),a=r.getModel("emphasis");jo(n,r,"lineStyle"),ya(n,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function l5e(n,e){return e==="category"?n==null:n==null||isNaN(n)}const u5e=o5e;var c5e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,i){return nd(null,this,{useEncodeDefaulter:An(d5e,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var i=this.coordinateSystem,r=this.getData(),a=[];return i.eachActiveState(r,function(o,s){t===o&&a.push(r.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}(pa);function d5e(n){var e=n.ecModel.getComponent("parallel",n.get("parallelIndex"));if(e){var t={};return ne(e.dimensions,function(i){var r=h5e(i);t[i]=r}),t}}function h5e(n){return+n.replace("dim","")}const f5e=c5e;var p5e=["lineStyle","opacity"],v5e={seriesType:"parallel",reset:function(n,e){var t=n.coordinateSystem,i={normal:n.get(["lineStyle","opacity"]),active:n.get("activeOpacity"),inactive:n.get("inactiveOpacity")};return{progress:function(r,a){t.eachActiveState(a,function(o,s){var l=i[o];if(o==="normal"&&a.hasItemOption){var u=a.getItemModel(s).get(p5e,!0);u!=null&&(l=u)}var c=a.ensureUniqueItemVisual(s,"style");c.opacity=l},r.start,r.end)}}}};const m5e=v5e;function g5e(n){y5e(n),_5e(n)}function y5e(n){if(!n.parallel){var e=!1;ne(n.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(n.parallel=[{}])}}function _5e(n){var e=Ar(n.parallelAxis);ne(e,function(t){if(Kn(t)){var i=t.parallelIndex||0,r=Ar(n.parallel)[i];r&&r.parallelAxisDefault&&ui(t,r.parallelAxisDefault,!1)}})}var S5e=5,b5e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){this._model=t,this._api=r,this._handlers||(this._handlers={},ne(x5e,function(a,o){r.getZr().on(o,this._handlers[o]=An(a,this))},this)),Yv(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,i){k9(this,"_throttledDispatchExpand"),ne(this._handlers,function(r,a){i.getZr().off(a,r)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(It({type:"parallelAxisExpand"},t))},e.type="parallel",e}(xa),x5e={mousedown:function(n){Ux(this,"click")&&(this._mouseDownPoint=[n.offsetX,n.offsetY])},mouseup:function(n){var e=this._mouseDownPoint;if(Ux(this,"click")&&e){var t=[n.offsetX,n.offsetY],i=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(i>S5e)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([n.offsetX,n.offsetY]);r.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(n){if(!(this._mouseDownPoint||!Ux(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([n.offsetX,n.offsetY]),i=t.behavior;i==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(i==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:i==="jump"?null:{duration:0}})}}};function Ux(n,e){var t=n._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}const w5e=b5e;var T5e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){n.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var i=this.option;t&&ui(i,t,!0),this._initDimensions()},e.prototype.contains=function(t,i){var r=t.get("parallelIndex");return r!=null&&i.getComponent("parallel",r)===this},e.prototype.setAxisExpand=function(t){ne(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(i){t.hasOwnProperty(i)&&(this.option[i]=t[i])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],i=this.parallelAxisIndex=[],r=dr(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);ne(r,function(a){t.push("dim"+a.get("dim")),i.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}($i);const A5e=T5e;var C5e=function(n){ot(e,n);function e(t,i,r,a,o){var s=n.call(this,t,i,r)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(ou);const M5e=C5e;function o1(n,e,t,i,r,a){n=n||0;var o=t[1]-t[0];if(r!=null&&(r=H1(r,[0,o])),a!=null&&(a=Math.max(a,r!=null?r:0)),i==="all"){var s=Math.abs(e[1]-e[0]);s=H1(s,[0,o]),r=a=H1(s,[r,a]),i=0}e[0]=H1(e[0],t),e[1]=H1(e[1],t);var l=Vx(e,i);e[i]+=n;var u=r||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[i]=H1(e[i],c);var d;return d=Vx(e,i),r!=null&&(d.sign!==l.sign||d.span<r)&&(e[1-i]=e[i]+l.sign*r),d=Vx(e,i),a!=null&&d.span>a&&(e[1-i]=e[i]+d.sign*a),e}function Vx(n,e){var t=n[e]-n[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function H1(n,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,n))}var Hx=ne,NZ=Math.min,kZ=Math.max,PB=Math.floor,E5e=Math.ceil,RB=Ra,P5e=Math.PI,R5e=function(){function n(e,t,i){this.type="parallel",this._axesMap=In(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,i)}return n.prototype._init=function(e,t,i){var r=e.dimensions,a=e.parallelAxisIndex;Hx(r,function(o,s){var l=a[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new M5e(o,q_(u),[0,0],u.get("type"),l)),d=c.type==="category";c.onBand=d&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},n.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},n.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),i=t.axisBase,r=t.layoutBase,a=t.pixelDimIndex,o=e[1-a],s=e[a];return o>=i&&o<=i+t.axisLength&&s>=r&&s<=r+t.layoutLength},n.prototype.getModel=function(){return this._model},n.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(i){if(e.contains(i,t)){var r=i.getData();Hx(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(r,r.mapDimension(a)),mv(o.scale,o.model)},this)}},this)},n.prototype.resize=function(e,t){this._rect=uo(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},n.prototype.getRect=function(){return this._rect},n.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,i=["x","y"],r=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=t[r[o]],l=[0,s],u=this.dimensions.length,c=C6(e.get("axisExpandWidth"),l),d=C6(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>d&&d>1&&c>0&&s>0,f=e.get("axisExpandWindow"),p;if(f)p=C6(f[1]-f[0],l),f[1]=f[0]+p;else{p=C6(c*(d-1),l);var m=e.get("axisExpandCenter")||PB(u/2);f=[c*m-p/2],f[1]=f[0]+p}var v=(s-p)/(u-d);v<3&&(v=0);var g=[PB(RB(f[0]/c,1))+1,E5e(RB(f[1]/c,1))-1],_=v/c*f[0];return{layout:a,pixelDimIndex:o,layoutBase:t[i[o]],layoutLength:s,axisBase:t[i[1-o]],axisLength:t[r[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:v,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:_}},n.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,i=this.dimensions,r=this._makeLayoutInfo(),a=r.layout;t.each(function(o){var s=[0,r.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Hx(i,function(o,s){var l=(r.axisExpandable?I5e:L5e)(s,r),u={horizontal:{x:l.position,y:r.axisLength},vertical:{x:0,y:l.position}},c={horizontal:P5e/2,vertical:0},d=[u[a].x+e.x,u[a].y+e.y],h=c[a],f=Dl();Jp(f,f,h),Ku(f,f,d),this._axesLayout[o]={position:d,rotation:h,transform:f,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},n.prototype.getAxis=function(e){return this._axesMap.get(e)},n.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},n.prototype.eachActiveState=function(e,t,i,r){i==null&&(i=0),r==null&&(r=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];ne(o,function(v){s.push(e.mapDimension(v)),l.push(a.get(v).model)});for(var u=this.hasAxisBrushed(),c=i;c<r;c++){var d=void 0;if(!u)d="normal";else{d="active";for(var h=e.getValues(s,c),f=0,p=o.length;f<p;f++){var m=l[f].getActiveState(h[f]);if(m==="inactive"){d="inactive";break}}}t(d,c)}},n.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,i=!1,r=0,a=e.length;r<a;r++)t.get(e[r]).model.getActiveState()!=="normal"&&(i=!0);return i},n.prototype.axisCoordToPoint=function(e,t){var i=this._axesLayout[t];return eu([e,0],i.transform)},n.prototype.getAxisLayout=function(e){return Zn(this._axesLayout[e])},n.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),i=t.pixelDimIndex,r=t.axisExpandWindow.slice(),a=r[1]-r[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:r};var s=e[i]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",c=t.axisCollapseWidth,d=this._model.get("axisExpandSlideTriggerArea"),h=d[0]!=null;if(c)h&&c&&s<a*d[0]?(u="jump",l=s-a*d[2]):h&&c&&s>a*(1-d[0])?(u="jump",l=s-a*(1-d[2])):(l=s-a*d[1])>=0&&(l=s-a*(1-d[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?o1(l,r,o,"all"):u="none";else{var f=r[1]-r[0],p=o[1]*s/f;r=[kZ(0,p-f/2)],r[1]=NZ(o[1],r[0]+f),r[0]=r[1]-f}return{axisExpandWindow:r,behavior:u}},n}();function C6(n,e){return NZ(kZ(n,e[0]),e[1])}function L5e(n,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*n,axisNameAvailableWidth:t,axisLabelShow:!0}}function I5e(n,e){var t=e.layoutLength,i=e.axisExpandWidth,r=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,c;return n<o[0]?(s=n*a,c=a):n<=o[1]?(s=e.axisExpandWindow0Pos+n*i-e.axisExpandWindow[0],l=i,u=!0):(s=t-(r-1-n)*a,c=a),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}const D5e=R5e;function N5e(n,e){var t=[];return n.eachComponent("parallel",function(i,r){var a=new D5e(i,n,e);a.name="parallel_"+r,a.resize(i,e),i.coordinateSystem=a,a.model=i,t.push(a)}),n.eachSeries(function(i){if(i.get("coordinateSystem")==="parallel"){var r=i.getReferringComponents("parallel",Xa).models[0];i.coordinateSystem=r.coordinateSystem}}),t}var k5e={create:N5e};const F5e=k5e;var FZ=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return Bp([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var i=this.activeIntervals=Zn(t);if(i)for(var r=i.length-1;r>=0;r--)x0(i[r])},e.prototype.getActiveState=function(t){var i=this.activeIntervals;if(!i.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(i.length===1){var r=i[0];if(r[0]<=t&&t<=r[1])return"active"}else for(var a=0,o=i.length;a<o;a++)if(i[a][0]<=t&&t<=i[a][1])return"active";return"inactive"},e}($i);Za(FZ,A3);const LB=FZ;var Up=!0,$9=Math.min,_v=Math.max,O5e=Math.pow,B5e=1e4,z5e=6,G5e=6,IB="globalPan",U5e={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},V5e={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},DB={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},H5e=0,W5e=function(n){ot(e,n);function e(t){var i=n.call(this)||this;return i._track=[],i._covers=[],i._handlers={},i._zr=t,i.group=new ei,i._uid="brushController_"+H5e++,ne(Z5e,function(r,a){this._handlers[a]=An(r,this)},i),i}return e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var i=this._zr;this._enableGlobalPan||eye(i,IB,this._uid),ne(this._handlers,function(r,a){i.on(a,r)}),this._brushType=t.brushType,this._brushOption=ui(Zn(DB),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;tye(t,IB,this._uid),ne(this._handlers,function(i,r){t.off(r,i)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var i=this._panels={};ne(t,function(r){i[r.panelId]=Zn(r)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var i=this.group;return this._zr.add(i),i.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=i.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=Xt(t,function(h){return ui(Zn(DB),h,!0)});var i="\0-brush-index-",r=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new Xc(r,t,u,l).add(c).update(c).remove(d).execute(),this;function l(h,f){return(h.id!=null?h.id:i+f)+"-"+h.brushType}function u(h,f){return l(h.__brushOption,f)}function c(h,f){var p=t[h];if(f!=null&&r[f]===s)a[h]=r[f];else{var m=a[h]=f!=null?(r[f].__brushOption=p,r[f]):BZ(o,OZ(o,p));SP(o,m)}}function d(h){r[h]!==s&&o.group.remove(r[h])}},e.prototype.unmount=function(){return this.enableBrush(!1),cC(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(P0);function OZ(n,e){var t=Q_[e.brushType].createCover(n,e);return t.__brushOption=e,GZ(t,e),n.group.add(t),t}function BZ(n,e){var t=bP(e);return t.endCreating&&(t.endCreating(n,e),GZ(e,e.__brushOption)),e}function zZ(n,e){var t=e.__brushOption;bP(e).updateCoverShape(n,e,t.range,t)}function GZ(n,e){var t=e.z;t==null&&(t=B5e),n.traverse(function(i){i.z=t,i.z2=t})}function SP(n,e){bP(e).updateCommon(n,e),zZ(n,e)}function bP(n){return Q_[n.__brushOption.brushType]}function xP(n,e,t){var i=n._panels;if(!i)return Up;var r,a=n._transform;return ne(i,function(o){o.isTargetByCursor(e,t,a)&&(r=o)}),r}function UZ(n,e){var t=n._panels;if(!t)return Up;var i=e.__brushOption.panelId;return i!=null?t[i]:Up}function cC(n){var e=n._covers,t=e.length;return ne(e,function(i){n.group.remove(i)},n),e.length=0,!!t}function Vp(n,e){var t=Xt(n._covers,function(i){var r=i.__brushOption,a=Zn(r.range);return{brushType:r.brushType,panelId:r.panelId,range:a}});n.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function j5e(n){var e=n._track;if(!e.length)return!1;var t=e[e.length-1],i=e[0],r=t[0]-i[0],a=t[1]-i[1],o=O5e(r*r+a*a,.5);return o>z5e}function VZ(n){var e=n.length-1;return e<0&&(e=0),[n[0],n[e]]}function HZ(n,e,t,i){var r=new ei;return r.add(new Hi({name:"main",style:wP(t),silent:!0,draggable:!0,cursor:"move",drift:si(NB,n,e,r,["n","s","w","e"]),ondragend:si(Vp,e,{isEnd:!0})})),ne(i,function(a){r.add(new Hi({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:si(NB,n,e,r,a),ondragend:si(Vp,e,{isEnd:!0})}))}),r}function WZ(n,e,t,i){var r=i.brushStyle.lineWidth||0,a=_v(r,G5e),o=t[0][0],s=t[1][0],l=o-r/2,u=s-r/2,c=t[0][1],d=t[1][1],h=c-a+r/2,f=d-a+r/2,p=c-o,m=d-s,v=p+r,g=m+r;_c(n,e,"main",o,s,p,m),i.transformable&&(_c(n,e,"w",l,u,a,g),_c(n,e,"e",h,u,a,g),_c(n,e,"n",l,u,v,a),_c(n,e,"s",l,f,v,a),_c(n,e,"nw",l,u,a,a),_c(n,e,"ne",h,u,a,a),_c(n,e,"sw",l,f,a,a),_c(n,e,"se",h,f,a,a))}function dC(n,e){var t=e.__brushOption,i=t.transformable,r=e.childAt(0);r.useStyle(wP(t)),r.attr({silent:!i,cursor:i?"move":"default"}),ne([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?hC(n,a[0]):q5e(n,a);o&&o.attr({silent:!i,invisible:!i,cursor:i?V5e[s]+"-resize":null})})}function _c(n,e,t,i,r,a,o){var s=e.childOfName(t);s&&s.setShape(Y5e(TP(n,e,[[i,r],[i+a,r+o]])))}function wP(n){return qn({strokeNoScale:!0},n.brushStyle)}function jZ(n,e,t,i){var r=[$9(n,t),$9(e,i)],a=[_v(n,t),_v(e,i)];return[[r[0],a[0]],[r[1],a[1]]]}function $5e(n){return Tp(n.group)}function hC(n,e){var t={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},r=R_(t[e],$5e(n));return i[r]}function q5e(n,e){var t=[hC(n,e[0]),hC(n,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function NB(n,e,t,i,r,a){var o=t.__brushOption,s=n.toRectRange(o.range),l=$Z(e,r,a);ne(i,function(u){var c=U5e[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=n.fromRectRange(jZ(s[0][0],s[1][0],s[0][1],s[1][1])),SP(e,t),Vp(e,{isEnd:!1})}function X5e(n,e,t,i){var r=e.__brushOption.range,a=$Z(n,t,i);ne(r,function(o){o[0]+=a[0],o[1]+=a[1]}),SP(n,e),Vp(n,{isEnd:!1})}function $Z(n,e,t){var i=n.group,r=i.transformCoordToLocal(e,t),a=i.transformCoordToLocal(0,0);return[r[0]-a[0],r[1]-a[1]]}function TP(n,e,t){var i=UZ(n,e);return i&&i!==Up?i.clipPath(t,n._transform):Zn(t)}function Y5e(n){var e=$9(n[0][0],n[1][0]),t=$9(n[0][1],n[1][1]),i=_v(n[0][0],n[1][0]),r=_v(n[0][1],n[1][1]);return{x:e,y:t,width:i-e,height:r-t}}function K5e(n,e,t){if(!(!n._brushType||J5e(n,e.offsetX,e.offsetY))){var i=n._zr,r=n._covers,a=xP(n,e,t);if(!n._dragging)for(var o=0;o<r.length;o++){var s=r[o].__brushOption;if(a&&(a===Up||s.panelId===a.panelId)&&Q_[s.brushType].contain(r[o],t[0],t[1]))return}a&&i.setCursorStyle("crosshair")}}function fC(n){var e=n.event;e.preventDefault&&e.preventDefault()}function pC(n,e,t){return n.childOfName("main").contain(e,t)}function qZ(n,e,t,i){var r=n._creatingCover,a=n._creatingPanel,o=n._brushOption,s;if(n._track.push(t.slice()),j5e(n)||r){if(a&&!r){o.brushMode==="single"&&cC(n);var l=Zn(o);l.brushType=kB(l.brushType,a),l.panelId=a===Up?null:a.panelId,r=n._creatingCover=OZ(n,l),n._covers.push(r)}if(r){var u=Q_[kB(n._brushType,a)],c=r.__brushOption;c.range=u.getCreatingRange(TP(n,r,n._track)),i&&(BZ(n,r),u.updateCommon(n,r)),zZ(n,r),s={isEnd:i}}}else i&&o.brushMode==="single"&&o.removeOnClick&&xP(n,e,t)&&cC(n)&&(s={isEnd:i,removeOnClick:!0});return s}function kB(n,e){return n==="auto"?e.defaultBrushType:n}var Z5e={mousedown:function(n){if(this._dragging)FB(this,n);else if(!n.target||!n.target.draggable){fC(n);var e=this.group.transformCoordToLocal(n.offsetX,n.offsetY);this._creatingCover=null;var t=this._creatingPanel=xP(this,n,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(n){var e=n.offsetX,t=n.offsetY,i=this.group.transformCoordToLocal(e,t);if(K5e(this,n,i),this._dragging){fC(n);var r=qZ(this,n,i,!1);r&&Vp(this,r)}},mouseup:function(n){FB(this,n)}};function FB(n,e){if(n._dragging){fC(e);var t=e.offsetX,i=e.offsetY,r=n.group.transformCoordToLocal(t,i),a=qZ(n,e,r,!0);n._dragging=!1,n._track=[],n._creatingCover=null,a&&Vp(n,a)}}function J5e(n,e,t){var i=n._zr;return e<0||e>i.getWidth()||t<0||t>i.getHeight()}var Q_={lineX:OB(0),lineY:OB(1),rect:{createCover:function(n,e){function t(i){return i}return HZ({toRectRange:t,fromRectRange:t},n,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(n){var e=VZ(n);return jZ(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(n,e,t,i){WZ(n,e,t,i)},updateCommon:dC,contain:pC},polygon:{createCover:function(n,e){var t=new ei;return t.add(new hl({name:"main",style:wP(e),silent:!0})),t},getCreatingRange:function(n){return n},endCreating:function(n,e){e.remove(e.childAt(0)),e.add(new ul({name:"main",draggable:!0,drift:si(X5e,n,e),ondragend:si(Vp,n,{isEnd:!0})}))},updateCoverShape:function(n,e,t,i){e.childAt(0).setShape({points:TP(n,e,t)})},updateCommon:dC,contain:pC}};function OB(n){return{createCover:function(e,t){return HZ({toRectRange:function(i){var r=[i,[0,100]];return n&&r.reverse(),r},fromRectRange:function(i){return i[n]}},e,t,[[["w"],["e"]],[["n"],["s"]]][n])},getCreatingRange:function(e){var t=VZ(e),i=$9(t[0][n],t[1][n]),r=_v(t[0][n],t[1][n]);return[i,r]},updateCoverShape:function(e,t,i,r){var a,o=UZ(e,t);if(o!==Up&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(n);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-n]]}var l=[i,a];n&&l.reverse(),WZ(e,t,l,r)},updateCommon:dC,contain:pC}}const AP=W5e;function XZ(n){return n=CP(n),function(e){return Yq(e,n)}}function YZ(n,e){return n=CP(n),function(t){var i=e!=null?e:t,r=i?n.width:n.height,a=i?n.x:n.y;return[a,a+(r||0)]}}function KZ(n,e,t){var i=CP(n);return function(r,a){return i.contain(a[0],a[1])&&!Y_(r,e,t)}}function CP(n){return gi.create(n)}var Q5e=["axisLine","axisTickLabel","axisName"],e8e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){n.prototype.init.apply(this,arguments),(this._brushController=new AP(i.getZr())).on("brush",An(this._onBrush,this))},e.prototype.render=function(t,i,r,a){if(!t8e(t,i,a)){this.axisModel=t,this.api=r,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ei,this.group.add(this._axisGroup),!!t.get("show")){var s=i8e(t,i),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,d=t.axis.dim,h=l.getAxisLayout(d),f=It({strokeContainThreshold:c},h),p=new Yc(t,f);ne(Q5e,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(f,u,t,s,c,r),S3(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,i,r,a,o,s){var l=r.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),d=gi.create({x:l[0],y:-o/2,width:u,height:o});d.x-=c,d.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:XZ(d),isTargetByCursor:KZ(d,s,a),getLinearBrushOtherExtent:YZ(d,0)}]).enableBrush({brushType:"lineX",brushStyle:i,removeOnClick:!0}).updateCovers(n8e(r))},e.prototype._onBrush=function(t){var i=t.areas,r=this.axisModel,a=r.axis,o=Xt(i,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!r.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:r.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(xa);function t8e(n,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===n}function n8e(n){var e=n.axis;return Xt(n.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function i8e(n,e){return e.getComponent("parallel",n.get("parallelIndex"))}const r8e=e8e;var a8e={type:"axisAreaSelect",event:"axisAreaSelected"};function o8e(n){n.registerAction(a8e,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(i){i.axis.model.setActiveIntervals(e.intervals)})}),n.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(i){i.setAxisExpand(e)})})}var s8e={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function ZZ(n){n.registerComponentView(w5e),n.registerComponentModel(A5e),n.registerCoordinateSystem("parallel",F5e),n.registerPreprocessor(g5e),n.registerComponentModel(LB),n.registerComponentView(r8e),yv(n,"parallel",LB,s8e),o8e(n)}function l8e(n){Ci(ZZ),n.registerChartView(u5e),n.registerSeriesModel(f5e),n.registerVisual(n.PRIORITY.VISUAL.BRUSH,m5e)}var u8e=function(){function n(){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 n}(),c8e=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new u8e},e.prototype.buildPath=function(t,i){var r=i.extent;t.moveTo(i.x1,i.y1),t.bezierCurveTo(i.cpx1,i.cpy1,i.cpx2,i.cpy2,i.x2,i.y2),i.orient==="vertical"?(t.lineTo(i.x2+r,i.y2),t.bezierCurveTo(i.cpx2+r,i.cpy2,i.cpx1+r,i.cpy1,i.x1+r,i.y1)):(t.lineTo(i.x2,i.y2+r),t.bezierCurveTo(i.cpx2,i.cpy2+r,i.cpx1,i.cpy1+r,i.x1,i.y1+r)),t.closePath()},e.prototype.highlight=function(){$c(this)},e.prototype.downplay=function(){qc(this)},e}(Ei),d8e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,i,r){var a=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,c=l.height,d=t.getData(),h=t.getData("edge"),f=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var m=new c8e,v=ni(m);v.dataIndex=p.dataIndex,v.seriesIndex=t.seriesIndex,v.dataType="edge";var g=p.getModel(),_=g.getModel("lineStyle"),S=_.get("curveness"),x=p.node1.getLayout(),A=p.node1.getModel(),C=A.get("localX"),M=A.get("localY"),I=p.node2.getLayout(),D=p.node2.getModel(),E=D.get("localX"),P=D.get("localY"),F=p.getLayout(),V,G,W,Y,Q,K,ae,ie;m.shape.extent=Math.max(1,F.dy),m.shape.orient=f,f==="vertical"?(V=(C!=null?C*u:x.x)+F.sy,G=(M!=null?M*c:x.y)+x.dy,W=(E!=null?E*u:I.x)+F.ty,Y=P!=null?P*c:I.y,Q=V,K=G*(1-S)+Y*S,ae=W,ie=G*S+Y*(1-S)):(V=(C!=null?C*u:x.x)+x.dx,G=(M!=null?M*c:x.y)+F.sy,W=E!=null?E*u:I.x,Y=(P!=null?P*c:I.y)+F.ty,Q=V*(1-S)+W*S,K=G,ae=V*S+W*(1-S),ie=Y),m.setShape({x1:V,y1:G,x2:W,y2:Y,cpx1:Q,cpy1:K,cpx2:ae,cpy2:ie}),m.useStyle(_.getItemStyle()),BB(m.style,f,p);var he=""+g.get("value"),Ee=_o(g,"edgeLabel");$o(m,Ee,{labelFetcher:{getFormattedLabel:function(Fe,pt,Ot,bt,ht,Kt){return t.getFormattedLabel(Fe,pt,"edge",bt,Hu(ht,Ee.normal&&Ee.normal.get("formatter"),he),Kt)}},labelDataIndex:p.dataIndex,defaultText:he}),m.setTextConfig({position:"inside"});var He=g.getModel("emphasis");jo(m,g,"lineStyle",function(Fe){var pt=Fe.getItemStyle();return BB(pt,f,p),pt}),s.add(m),h.setItemGraphicEl(p.dataIndex,m);var xe=He.get("focus");ya(m,xe==="adjacency"?p.getAdjacentDataIndices():xe==="trajectory"?p.getTrajectoryDataIndices():xe,He.get("blurScope"),He.get("disabled"))}),o.eachNode(function(p){var m=p.getLayout(),v=p.getModel(),g=v.get("localX"),_=v.get("localY"),S=v.getModel("emphasis"),x=v.get(["itemStyle","borderRadius"])||0,A=new Hi({shape:{x:g!=null?g*u:m.x,y:_!=null?_*c:m.y,width:m.dx,height:m.dy,r:x},style:v.getModel("itemStyle").getItemStyle(),z2:10});$o(A,_o(v),{labelFetcher:{getFormattedLabel:function(M,I){return t.getFormattedLabel(M,I,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),A.disableLabelAnimation=!0,A.setStyle("fill",p.getVisual("color")),A.setStyle("decal",p.getVisual("style").decal),jo(A,v),s.add(A),d.setItemGraphicEl(p.dataIndex,A),ni(A).dataType="node";var C=S.get("focus");ya(A,C==="adjacency"?p.getAdjacentDataIndices():C==="trajectory"?p.getTrajectoryDataIndices():C,S.get("blurScope"),S.get("disabled"))}),d.eachItemGraphicEl(function(p,m){var v=d.getItemModel(m);v.get("draggable")&&(p.drift=function(g,_){a._focusAdjacencyDisabled=!0,this.shape.x+=g,this.shape.y+=_,this.dirty(),r.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:d.getRawIndex(m),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(h8e(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Yr);function BB(n,e,t){switch(n.fill){case"source":n.fill=t.node1.getVisual("color"),n.decal=t.node1.getVisual("style").decal;break;case"target":n.fill=t.node2.getVisual("color"),n.decal=t.node2.getVisual("style").decal;break;case"gradient":var i=t.node1.getVisual("color"),r=t.node2.getVisual("color");xn(i)&&xn(r)&&(n.fill=new po(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:i,offset:0},{color:r,offset:1}]))}}function h8e(n,e,t){var i=new Hi({shape:{x:n.x-10,y:n.y-10,width:0,height:n.height+20}});return sa(i,{shape:{width:n.width+20}},e,t),i}const f8e=d8e;var p8e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){var r=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 Xr(o[l],this,i));var u=IZ(a,r,this,!0,c);return u.data;function c(d,h){d.wrapMethod("getItemModel",function(f,p){var m=f.parentModel,v=m.getData().getItemLayout(p);if(v){var g=v.depth,_=m.levelModels[g];_&&(f.parentModel=_)}return f}),h.wrapMethod("getItemModel",function(f,p){var m=f.parentModel,v=m.getGraph().getEdgeByIndex(p),g=v.node1.getLayout();if(g){var _=g.depth,S=m.levelModels[_];S&&(f.parentModel=S)}return f})}},e.prototype.setNodePosition=function(t,i){var r=this.option.data||this.option.nodes,a=r[t];a.localX=i[0],a.localY=i[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,i,r){function a(f){return isNaN(f)||f==null}if(r==="edge"){var o=this.getDataParams(t,r),s=o.data,l=o.value,u=s.source+" -- "+s.target;return So("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(t),d=c.getLayout().value,h=this.getDataParams(t,r).data.name;return So("nameValue",{name:h!=null?h+"":null,value:d,noValue:a(d)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,i){var r=n.prototype.getDataParams.call(this,t,i);if(r.value==null&&i==="node"){var a=this.getGraph().getNodeByIndex(t),o=a.getLayout().value;r.value=o}return r},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}(pa);const v8e=p8e;function m8e(n,e){n.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),r=t.get("nodeGap"),a=g8e(t,e);t.layoutInfo=a;var o=a.width,s=a.height,l=t.getGraph(),u=l.nodes,c=l.edges;_8e(u);var d=dr(u,function(m){return m.getLayout().value===0}),h=d.length!==0?0:t.get("layoutIterations"),f=t.get("orient"),p=t.get("nodeAlign");y8e(u,c,i,r,o,s,h,f,p)})}function g8e(n,e){return uo(n.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function y8e(n,e,t,i,r,a,o,s,l){S8e(n,e,t,r,a,s,l),T8e(n,e,a,r,i,o,s),D8e(n,s)}function _8e(n){ne(n,function(e){var t=yh(e.outEdges,y8),i=yh(e.inEdges,y8),r=e.getValue()||0,a=Math.max(t,i,r);e.setLayout({value:a},!0)})}function S8e(n,e,t,i,r,a,o){for(var s=[],l=[],u=[],c=[],d=0,h=0;h<e.length;h++)s[h]=1;for(var h=0;h<n.length;h++)l[h]=n[h].inEdges.length,l[h]===0&&u.push(n[h]);for(var f=-1;u.length;){for(var p=0;p<u.length;p++){var m=u[p],v=m.hostGraph.data.getRawDataItem(m.dataIndex),g=v.depth!=null&&v.depth>=0;g&&v.depth>f&&(f=v.depth),m.setLayout({depth:g?v.depth:d},!0),a==="vertical"?m.setLayout({dy:t},!0):m.setLayout({dx:t},!0);for(var _=0;_<m.outEdges.length;_++){var S=m.outEdges[_],x=e.indexOf(S);s[x]=0;var A=S.node2,C=n.indexOf(A);--l[C]===0&&c.indexOf(A)<0&&c.push(A)}}++d,u=c,c=[]}for(var h=0;h<s.length;h++)if(s[h]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var M=f>d-1?f:d-1;o&&o!=="left"&&b8e(n,o,a,M);var I=a==="vertical"?(r-t)/M:(i-t)/M;w8e(n,I,a)}function JZ(n){var e=n.hostGraph.data.getRawDataItem(n.dataIndex);return e.depth!=null&&e.depth>=0}function b8e(n,e,t,i){if(e==="right"){for(var r=[],a=n,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];r.indexOf(c.node1)<0&&r.push(c.node1)}}a=r,r=[],++o}ne(n,function(d){JZ(d)||d.setLayout({depth:Math.max(0,i-d.getLayout().skNodeHeight)},!0)})}else e==="justify"&&x8e(n,i)}function x8e(n,e){ne(n,function(t){!JZ(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function w8e(n,e,t){ne(n,function(i){var r=i.getLayout().depth*e;t==="vertical"?i.setLayout({y:r},!0):i.setLayout({x:r},!0)})}function T8e(n,e,t,i,r,a,o){var s=A8e(n,o);C8e(s,e,t,i,r,o),Wx(s,r,t,i,o);for(var l=1;a>0;a--)l*=.99,M8e(s,l,o),Wx(s,r,t,i,o),I8e(s,l,o),Wx(s,r,t,i,o)}function A8e(n,e){var t=[],i=e==="vertical"?"y":"x",r=gA(n,function(a){return a.getLayout()[i]});return r.keys.sort(function(a,o){return a-o}),ne(r.keys,function(a){t.push(r.buckets.get(a))}),t}function C8e(n,e,t,i,r,a){var o=1/0;ne(n,function(s){var l=s.length,u=0;ne(s,function(d){u+=d.getLayout().value});var c=a==="vertical"?(i-(l-1)*r)/u:(t-(l-1)*r)/u;c<o&&(o=c)}),ne(n,function(s){ne(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))})}),ne(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Wx(n,e,t,i,r){var a=r==="vertical"?"x":"y";ne(n,function(o){o.sort(function(m,v){return m.getLayout()[a]-v.getLayout()[a]});for(var s,l,u,c=0,d=o.length,h=r==="vertical"?"dx":"dy",f=0;f<d;f++)l=o[f],u=c-l.getLayout()[a],u>0&&(s=l.getLayout()[a]+u,r==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[h]+e;var p=r==="vertical"?i:t;if(u=c-e-p,u>0){s=l.getLayout()[a]-u,r==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var f=d-2;f>=0;--f)l=o[f],u=l.getLayout()[a]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[a]-u,r==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function M8e(n,e,t){ne(n.slice().reverse(),function(i){ne(i,function(r){if(r.outEdges.length){var a=yh(r.outEdges,E8e,t)/yh(r.outEdges,y8);if(isNaN(a)){var o=r.outEdges.length;a=o?yh(r.outEdges,P8e,t)/o:0}if(t==="vertical"){var s=r.getLayout().x+(a-Dh(r,t))*e;r.setLayout({x:s},!0)}else{var l=r.getLayout().y+(a-Dh(r,t))*e;r.setLayout({y:l},!0)}}})})}function E8e(n,e){return Dh(n.node2,e)*n.getValue()}function P8e(n,e){return Dh(n.node2,e)}function R8e(n,e){return Dh(n.node1,e)*n.getValue()}function L8e(n,e){return Dh(n.node1,e)}function Dh(n,e){return e==="vertical"?n.getLayout().x+n.getLayout().dx/2:n.getLayout().y+n.getLayout().dy/2}function y8(n){return n.getValue()}function yh(n,e,t){for(var i=0,r=n.length,a=-1;++a<r;){var o=+e(n[a],t);isNaN(o)||(i+=o)}return i}function I8e(n,e,t){ne(n,function(i){ne(i,function(r){if(r.inEdges.length){var a=yh(r.inEdges,R8e,t)/yh(r.inEdges,y8);if(isNaN(a)){var o=r.inEdges.length;a=o?yh(r.inEdges,L8e,t)/o:0}if(t==="vertical"){var s=r.getLayout().x+(a-Dh(r,t))*e;r.setLayout({x:s},!0)}else{var l=r.getLayout().y+(a-Dh(r,t))*e;r.setLayout({y:l},!0)}}})})}function D8e(n,e){var t=e==="vertical"?"x":"y";ne(n,function(i){i.outEdges.sort(function(r,a){return r.node2.getLayout()[t]-a.node2.getLayout()[t]}),i.inEdges.sort(function(r,a){return r.node1.getLayout()[t]-a.node1.getLayout()[t]})}),ne(n,function(i){var r=0,a=0;ne(i.outEdges,function(o){o.setLayout({sy:r},!0),r+=o.getLayout().dy}),ne(i.inEdges,function(o){o.setLayout({ty:a},!0),a+=o.getLayout().dy})})}function N8e(n){n.eachSeriesByType("sankey",function(e){var t=e.getGraph(),i=t.nodes,r=t.edges;if(i.length){var a=1/0,o=-1/0;ne(i,function(s){var l=s.getLayout().value;l<a&&(a=l),l>o&&(o=l)}),ne(i,function(s){var l=new Wo({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}))})}r.length&&ne(r,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function k8e(n){n.registerChartView(f8e),n.registerSeriesModel(v8e),n.registerLayout(m8e),n.registerVisual(N8e),n.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){i.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var QZ=function(){function n(){}return n.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},n.prototype.getInitialData=function(e,t){var i,r=t.getComponent("xAxis",this.get("xAxisIndex")),a=t.getComponent("yAxis",this.get("yAxisIndex")),o=r.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",i=r.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",i=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,d=this._baseAxisDim=u[c],h=u[1-c],f=[r,a],p=f[c].get("type"),m=f[1-c].get("type"),v=e.data;if(v&&l){var g=[];ne(v,function(x,A){var C;$t(x)?(C=x.slice(),x.unshift(A)):$t(x.value)?(C=It({},x),C.value=C.value.slice(),x.value.unshift(A)):C=x,g.push(C)}),e.data=g}var _=this.defaultValueDimensions,S=[{name:d,type:o8(p),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:o8(m),dimsDef:_.slice()}];return Jv(this,{coordDimensions:S,dimensionsCount:_.length+1,encodeDefaulter:si(bX,S,this)})},n.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},n}(),eJ=function(n){ot(e,n);function e(){var t=n!==null&&n.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}(pa);Za(eJ,QZ,!0);const F8e=eJ;var O8e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){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),d=zB(c,a,u,l,!0);a.setItemGraphicEl(u,d),o.add(d)}}).update(function(u,c){var d=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(d);return}var h=a.getItemLayout(u);d?(iu(d),tJ(h,d,a,u)):d=zB(h,a,u,l),o.add(d),a.setItemGraphicEl(u,d)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},e.prototype.remove=function(t){var i=this.group,r=this._data;this._data=null,r&&r.eachItemGraphicEl(function(a){a&&i.remove(a)})},e.type="boxplot",e}(Yr),B8e=function(){function n(){}return n}(),z8e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="boxplotBoxPath",i}return e.prototype.getDefaultShape=function(){return new B8e},e.prototype.buildPath=function(t,i){var r=i.points,a=0;for(t.moveTo(r[a][0],r[a][1]),a++;a<4;a++)t.lineTo(r[a][0],r[a][1]);for(t.closePath();a<r.length;a++)t.moveTo(r[a][0],r[a][1]),a++,t.lineTo(r[a][0],r[a][1])},e}(Ei);function zB(n,e,t,i,r){var a=n.ends,o=new z8e({shape:{points:r?G8e(a,i,n):a}});return tJ(n,o,e,t,r),o}function tJ(n,e,t,i,r){var a=t.hostModel,o=e1[r?"initProps":"updateProps"];o(e,{shape:{points:n.ends}},a,i),e.useStyle(t.getItemVisual(i,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(i),l=s.getModel("emphasis");jo(e,s),ya(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function G8e(n,e,t){return Xt(n,function(i){return i=i.slice(),i[e]=t.initBaseline,i})}const U8e=O8e;var Qg=ne;function V8e(n){var e=H8e(n);Qg(e,function(t){var i=t.seriesModels;i.length&&(W8e(t),Qg(i,function(r,a){j8e(r,t.boxOffsetList[a],t.boxWidthList[a])}))})}function H8e(n){var e=[],t=[];return n.eachSeriesByType("boxplot",function(i){var r=i.getBaseAxis(),a=xi(t,r);a<0&&(a=t.length,t[a]=r,e[a]={axis:r,seriesModels:[]}),e[a].seriesModels.push(i)}),e}function W8e(n){var e=n.axis,t=n.seriesModels,i=t.length,r=n.boxWidthList=[],a=n.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;Qg(t,function(p){l=Math.max(l,p.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}Qg(t,function(p){var m=p.get("boxWidth");$t(m)||(m=[m,m]),o.push([_n(m[0],s)||0,_n(m[1],s)||0])});var c=s*.8-2,d=c/i*.3,h=(c-d*(i-1))/i,f=h/2-c/2;Qg(t,function(p,m){a.push(f),f+=d+h,r.push(Math.min(Math.max(h,o[m][0]),o[m][1]))})}function j8e(n,e,t){var i=n.coordinateSystem,r=n.getData(),a=t/2,o=n.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=r.mapDimension(l[o]),c=r.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var d=0;d<r.count();d++){var h=r.get(u,d),f=S(h,c[2],d),p=S(h,c[0],d),m=S(h,c[1],d),v=S(h,c[3],d),g=S(h,c[4],d),_=[];x(_,m,!1),x(_,v,!0),_.push(p,m,g,v),A(_,p),A(_,g),A(_,f),r.setItemLayout(d,{initBaseline:f[s],ends:_})}function S(C,M,I){var D=r.get(M,I),E=[];E[o]=C,E[s]=D;var P;return isNaN(C)||isNaN(D)?P=[NaN,NaN]:(P=i.dataToPoint(E),P[o]+=e),P}function x(C,M,I){var D=M.slice(),E=M.slice();D[o]+=a,E[o]-=a,I?C.push(D,E):C.push(E,D)}function A(C,M){var I=M.slice(),D=M.slice();I[o]-=a,D[o]+=a,C.push(I,D)}}function $8e(n,e){e=e||{};for(var t=[],i=[],r=e.boundIQR,a=r==="none"||r===0,o=0;o<n.length;o++){var s=x0(n[o].slice()),l=yb(s,.25),u=yb(s,.5),c=yb(s,.75),d=s[0],h=s[s.length-1],f=(r==null?1.5:r)*(c-l),p=a?d:Math.max(d,l-f),m=a?h:Math.min(h,c+f),v=e.itemNameFormatter,g=$n(v)?v({value:o}):xn(v)?v.replace("{value}",o+""):o+"";t.push([g,p,l,u,c,m]);for(var _=0;_<s.length;_++){var S=s[_];if(S<p||S>m){var x=[g,S];i.push(x)}}}return{boxData:t,outliers:i}}var q8e={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==hs){var i="";ur(i)}var r=$8e(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:r.boxData},{data:r.outliers}]}};function X8e(n){n.registerSeriesModel(F8e),n.registerChartView(U8e),n.registerLayout(V8e),n.registerTransform(q8e)}var Y8e=["itemStyle","borderColor"],K8e=["itemStyle","borderColor0"],Z8e=["itemStyle","borderColorDoji"],J8e=["itemStyle","color"],Q8e=["itemStyle","color0"];function MP(n,e){return e.get(n>0?J8e:Q8e)}function EP(n,e){return e.get(n===0?Z8e:n>0?Y8e:K8e)}var e_e={seriesType:"candlestick",plan:Xv(),performRawSeries:!0,reset:function(n,e){if(!e.isSeriesFiltered(n)){var t=n.pipelineContext.large;return!t&&{progress:function(i,r){for(var a;(a=i.next())!=null;){var o=r.getItemModel(a),s=r.getItemLayout(a).sign,l=o.getItemStyle();l.fill=MP(s,o),l.stroke=EP(s,o)||l.fill;var u=r.ensureUniqueItemVisual(a,"style");It(u,l)}}}}}};const t_e=e_e;var n_e=["color","borderColor"],i_e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,i,r){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,i,r,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,i):this._incrementalRenderNormal(t,i)},e.prototype.eachRendered=function(t){Gh(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var i=t.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},e.prototype._renderNormal=function(t){var i=t.getData(),r=this._data,a=this.group,o=i.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),i.diff(r).add(function(c){if(i.hasValue(c)){var d=i.getItemLayout(c);if(s&&GB(u,d))return;var h=jx(d,c,!0);sa(h,{shape:{points:d.ends}},t,c),$x(h,i,c,o),a.add(h),i.setItemGraphicEl(c,h)}}).update(function(c,d){var h=r.getItemGraphicEl(d);if(!i.hasValue(c)){a.remove(h);return}var f=i.getItemLayout(c);if(s&&GB(u,f)){a.remove(h);return}h?(Qi(h,{shape:{points:f.ends}},t,c),iu(h)):h=jx(f),$x(h,i,c,o),a.add(h),i.setItemGraphicEl(c,h)}).remove(function(c){var d=r.getItemGraphicEl(c);d&&a.remove(d)}).execute(),this._data=i},e.prototype._renderLarge=function(t){this._clear(),UB(t,this.group);var i=t.get("clip",!0)?E3(t.coordinateSystem,!1,t):null;i?this.group.setClipPath(i):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,i){for(var r=i.getData(),a=r.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=r.getItemLayout(o),l=jx(s);$x(l,r,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,i){UB(i,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}(Yr),r_e=function(){function n(){}return n}(),a_e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="normalCandlestickBox",i}return e.prototype.getDefaultShape=function(){return new r_e},e.prototype.buildPath=function(t,i){var r=i.points;this.__simpleBox?(t.moveTo(r[4][0],r[4][1]),t.lineTo(r[6][0],r[6][1])):(t.moveTo(r[0][0],r[0][1]),t.lineTo(r[1][0],r[1][1]),t.lineTo(r[2][0],r[2][1]),t.lineTo(r[3][0],r[3][1]),t.closePath(),t.moveTo(r[4][0],r[4][1]),t.lineTo(r[5][0],r[5][1]),t.moveTo(r[6][0],r[6][1]),t.lineTo(r[7][0],r[7][1]))},e}(Ei);function jx(n,e,t){var i=n.ends;return new a_e({shape:{points:t?o_e(i,n):i},z2:100})}function GB(n,e){for(var t=!0,i=0;i<e.ends.length;i++)if(n.contain(e.ends[i][0],e.ends[i][1])){t=!1;break}return t}function $x(n,e,t,i){var r=e.getItemModel(t);n.useStyle(e.getItemVisual(t,"style")),n.style.strokeNoScale=!0,n.__simpleBox=i,jo(n,r);var a=e.getItemLayout(t).sign;ne(n.states,function(s,l){var u=r.getModel(l),c=MP(a,u),d=EP(a,u)||c,h=s.style||(s.style={});c&&(h.fill=c),d&&(h.stroke=d)});var o=r.getModel("emphasis");ya(n,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function o_e(n,e){return Xt(n,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var s_e=function(){function n(){}return n}(),qx=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="largeCandlestickBox",i}return e.prototype.getDefaultShape=function(){return new s_e},e.prototype.buildPath=function(t,i){for(var r=i.points,a=0;a<r.length;)if(this.__sign===r[a++]){var o=r[a++];t.moveTo(o,r[a++]),t.lineTo(o,r[a++])}else a+=3},e}(Ei);function UB(n,e,t,i){var r=n.getData(),a=r.getLayout("largePoints"),o=new qx({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new qx({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new qx({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});e.add(l),Xx(1,o,n),Xx(-1,s,n),Xx(0,l,n),i&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function Xx(n,e,t,i){var r=EP(n,t)||MP(n,t),a=t.getModel("itemStyle").getItemStyle(n_e);e.useStyle(a),e.style.fill=null,e.style.stroke=r}const l_e=i_e;var nJ=function(n){ot(e,n);function e(){var t=n!==null&&n.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,i,r){var a=i.getItemLayout(t);return a&&r.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}(pa);Za(nJ,QZ,!0);const u_e=nJ;function c_e(n){!n||!$t(n.series)||ne(n.series,function(e){Kn(e)&&e.type==="k"&&(e.type="candlestick")})}var d_e={seriesType:"candlestick",plan:Xv(),reset:function(n){var e=n.coordinateSystem,t=n.getData(),i=h_e(n,t),r=0,a=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[r])),l=Xt(t.mapDimensionsAll(o[a]),t.getDimensionIndex,t),u=l[0],c=l[1],d=l[2],h=l[3];if(t.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),s<0||l.length<4)return;return{progress:n.pipelineContext.large?p:f};function f(m,v){for(var g,_=v.getStore();(g=m.next())!=null;){var S=_.get(s,g),x=_.get(u,g),A=_.get(c,g),C=_.get(d,g),M=_.get(h,g),I=Math.min(x,A),D=Math.max(x,A),E=Q(I,S),P=Q(D,S),F=Q(C,S),V=Q(M,S),G=[];K(G,P,0),K(G,E,1),G.push(ie(V),ie(P),ie(F),ie(E));var W=v.getItemModel(g),Y=!!W.get(["itemStyle","borderColorDoji"]);v.setItemLayout(g,{sign:VB(_,g,x,A,c,Y),initBaseline:x>A?P[a]:E[a],ends:G,brushRect:ae(C,M,S)})}function Q(he,Ee){var He=[];return He[r]=Ee,He[a]=he,isNaN(Ee)||isNaN(he)?[NaN,NaN]:e.dataToPoint(He)}function K(he,Ee,He){var xe=Ee.slice(),Fe=Ee.slice();xe[r]=r5(xe[r]+i/2,1,!1),Fe[r]=r5(Fe[r]-i/2,1,!0),He?he.push(xe,Fe):he.push(Fe,xe)}function ae(he,Ee,He){var xe=Q(he,He),Fe=Q(Ee,He);return xe[r]-=i/2,Fe[r]-=i/2,{x:xe[0],y:xe[1],width:i,height:Fe[1]-xe[1]}}function ie(he){return he[r]=r5(he[r],1),he}}function p(m,v){for(var g=Gu(m.count*4),_=0,S,x=[],A=[],C,M=v.getStore(),I=!!n.get(["itemStyle","borderColorDoji"]);(C=m.next())!=null;){var D=M.get(s,C),E=M.get(u,C),P=M.get(c,C),F=M.get(d,C),V=M.get(h,C);if(isNaN(D)||isNaN(F)||isNaN(V)){g[_++]=NaN,_+=3;continue}g[_++]=VB(M,C,E,P,c,I),x[r]=D,x[a]=F,S=e.dataToPoint(x,null,A),g[_++]=S?S[0]:NaN,g[_++]=S?S[1]:NaN,x[a]=V,S=e.dataToPoint(x,null,A),g[_++]=S?S[1]:NaN}v.setLayout("largePoints",g)}}};function VB(n,e,t,i,r,a){var o;return t>i?o=-1:t<i?o=1:o=a?0:e>0?n.get(r,e-1)<=i?1:-1:1,o}function h_e(n,e){var t=n.getBaseAxis(),i,r=t.type==="category"?t.getBandWidth():(i=t.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=_n(ai(n.get("barMaxWidth"),r),r),o=_n(ai(n.get("barMinWidth"),1),r),s=n.get("barWidth");return s!=null?_n(s,r):Math.max(Math.min(r/2,a),o)}const f_e=d_e;function p_e(n){n.registerChartView(l_e),n.registerSeriesModel(u_e),n.registerPreprocessor(c_e),n.registerVisual(t_e),n.registerLayout(f_e)}function HB(n,e){var t=e.rippleEffectColor||e.color;n.eachChild(function(i){i.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var v_e=function(n){ot(e,n);function e(t,i){var r=n.call(this)||this,a=new C3(t,i),o=new ei;return r.add(a),r.add(o),r.updateData(t,i),r}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var i=t.symbolType,r=t.color,a=t.rippleNumber,o=this.childAt(1),s=0;s<a;s++){var l=Ya(i,-1,-1,2,2,r);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)}HB(o,t)},e.prototype.updateEffectAnimation=function(t){for(var i=this._effectCfg,r=this.childAt(1),a=["symbolType","period","rippleScale","rippleNumber"],o=0;o<a.length;o++){var s=a[o];if(i[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}HB(r,t)},e.prototype.highlight=function(){$c(this)},e.prototype.downplay=function(){qc(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,i){var r=this,a=t.hostModel;this.childAt(0).updateData(t,i);var o=this.childAt(1),s=t.getItemModel(i),l=t.getItemVisual(i,"symbol"),u=Kv(t.getItemVisual(i,"symbolSize")),c=t.getItemVisual(i,"style"),d=c&&c.fill,h=s.getModel("emphasis");o.setScale(u),o.traverse(function(v){v.setStyle("fill",d)});var f=n1(t.getItemVisual(i,"symbolOffset"),u);f&&(o.x=f[0],o.y=f[1]);var p=t.getItemVisual(i,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var m={};m.showEffectOn=a.get("showEffectOn"),m.rippleScale=s.get(["rippleEffect","scale"]),m.brushType=s.get(["rippleEffect","brushType"]),m.period=s.get(["rippleEffect","period"])*1e3,m.effectOffset=i/t.count(),m.z=a.getShallow("z")||0,m.zlevel=a.getShallow("zlevel")||0,m.symbolType=l,m.color=d,m.rippleEffectColor=s.get(["rippleEffect","color"]),m.rippleNumber=s.get(["rippleEffect","number"]),m.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(m):this.startEffectAnimation(m),this._effectCfg=m):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(v){v==="emphasis"?m.showEffectOn!=="render"&&r.startEffectAnimation(m):v==="normal"&&m.showEffectOn!=="render"&&r.stopEffectAnimation()}),this._effectCfg=m,ya(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(ei);const m_e=v_e;var g_e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new M3(m_e)},e.prototype.render=function(t,i,r){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 i=t.coordinateSystem,r=i&&i.getArea&&i.getArea();return t.get("clip",!0)?r:null},e.prototype.updateTransform=function(t,i,r){var a=t.getData();this.group.dirty();var o=P3("").reset(t,i,r);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var i=t.coordinateSystem;i&&i.getRoamTransform&&(this.group.transform=jce(i.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,i){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(Yr);const y_e=g_e;var __e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,i){return nd(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,i,r){return r.point(i.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}(pa);const S_e=__e;function b_e(n){n.registerChartView(y_e),n.registerSeriesModel(S_e),n.registerLayout(P3("effectScatter"))}var x_e=function(n){ot(e,n);function e(t,i,r){var a=n.call(this)||this;return a.add(a.createLine(t,i,r)),a._updateEffectSymbol(t,i),a}return e.prototype.createLine=function(t,i,r){return new yP(t,i,r)},e.prototype._updateEffectSymbol=function(t,i){var r=t.getItemModel(i),a=r.getModel("effect"),o=a.get("symbolSize"),s=a.get("symbol");$t(o)||(o=[o,o]);var l=t.getItemVisual(i,"style"),u=a.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=Ya(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,i))},e.prototype._updateEffectAnimation=function(t,i,r){var a=this.childAt(1);if(a){var o=t.getItemLayout(r),s=i.get("period")*1e3,l=i.get("loop"),u=i.get("roundTrip"),c=i.get("constantSpeed"),d=Ro(i.get("delay"),function(f){return f/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 h=void 0;$n(d)?h=d(r):h=d,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,i,r,a,o){if(i>0){t.__t=0;var s=this,l=t.animate("",a).when(o?i*2:i,{__t:o?2:1}).delay(r).during(function(){s._updateSymbolPosition(t)});a||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return eh(t.__p1,t.__cp1)+eh(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,i){t.__p1=i[0],t.__p2=i[1],t.__cp1=i[2]||[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2]},e.prototype.updateData=function(t,i,r){this.childAt(0).updateData(t,i,r),this._updateEffectSymbol(t,i)},e.prototype._updateSymbolPosition=function(t){var i=t.__p1,r=t.__p2,a=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=Po,c=nA;s[0]=u(i[0],a[0],r[0],o),s[1]=u(i[1],a[1],r[1],o);var d=t.__t<1?c(i[0],a[0],r[0],o):c(r[0],a[0],i[0],1-o),h=t.__t<1?c(i[1],a[1],r[1],o):c(r[1],a[1],i[1],1-o);t.rotation=-Math.atan2(h,d)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=eh(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*eh(i,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,i){this.childAt(0).updateLayout(t,i);var r=t.getItemModel(i).getModel("effect");this._updateEffectAnimation(t,r,i)},e}(ei);const iJ=x_e;var w_e=function(n){ot(e,n);function e(t,i,r){var a=n.call(this)||this;return a._createPolyline(t,i,r),a}return e.prototype._createPolyline=function(t,i,r){var a=t.getItemLayout(i),o=new hl({shape:{points:a}});this.add(o),this._updateCommonStl(t,i,r)},e.prototype.updateData=function(t,i,r){var a=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(i)}};Qi(o,s,a,i),this._updateCommonStl(t,i,r)},e.prototype._updateCommonStl=function(t,i,r){var a=this.childAt(0),o=t.getItemModel(i),s=r&&r.emphasisLineStyle,l=r&&r.focus,u=r&&r.blurScope,c=r&&r.emphasisDisabled;if(!r||t.hasItemOption){var d=o.getModel("emphasis");s=d.getModel("lineStyle").getLineStyle(),c=d.get("disabled"),l=d.get("focus"),u=d.get("blurScope")}a.useStyle(t.getItemVisual(i,"style")),a.style.fill=null,a.style.strokeNoScale=!0;var h=a.ensureState("emphasis");h.style=s,ya(this,l,u,c)},e.prototype.updateLayout=function(t,i){var r=this.childAt(0);r.setShape("points",t.getItemLayout(i))},e}(ei);const rJ=w_e;var T_e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,i,r){return new rJ(t,i,r)},e.prototype._updateAnimationPoints=function(t,i){this._points=i;for(var r=[0],a=0,o=1;o<i.length;o++){var s=i[o-1],l=i[o];a+=eh(s,l),r.push(a)}if(a===0){this._length=0;return}for(var o=0;o<r.length;o++)r[o]/=a;this._offsets=r,this._length=a},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var i=t.__t<1?t.__t:2-t.__t,r=this._points,a=this._offsets,o=r.length;if(a){var s=this._lastFrame,l;if(i<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(a[l]<=i);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(a[l]>i);l++);l=Math.min(l-1,o-2)}var c=(i-a[l])/(a[l+1]-a[l]),d=r[l],h=r[l+1];t.x=d[0]*(1-c)+c*h[0],t.y=d[1]*(1-c)+c*h[1];var f=t.__t<1?h[0]-d[0]:d[0]-h[0],p=t.__t<1?h[1]-d[1]:d[1]-h[1];t.rotation=-Math.atan2(p,f)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=i,t.ignore=!1}},e}(iJ);const A_e=T_e;var C_e=function(){function n(){this.polyline=!1,this.curveness=0,this.segs=[]}return n}(),M_e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i._off=0,i.hoverDataIdx=-1,i}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 C_e},e.prototype.buildPath=function(t,i){var r=i.segs,a=i.curveness,o;if(i.polyline)for(o=this._off;o<r.length;){var s=r[o++];if(s>0){t.moveTo(r[o++],r[o++]);for(var l=1;l<s;l++)t.lineTo(r[o++],r[o++])}}else for(o=this._off;o<r.length;){var u=r[o++],c=r[o++],d=r[o++],h=r[o++];if(t.moveTo(u,c),a>0){var f=(u+d)/2-(c-h)*a,p=(c+h)/2-(d-u)*a;t.quadraticCurveTo(f,p,d,h)}else t.lineTo(d,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,i){var r=this.shape,a=r.segs,o=r.curveness,s=this.style.lineWidth;if(r.polyline)for(var l=0,u=0;u<a.length;){var c=a[u++];if(c>0)for(var d=a[u++],h=a[u++],f=1;f<c;f++){var p=a[u++],m=a[u++];if(Hd(d,h,p,m,s,t,i))return l}l++}else for(var l=0,u=0;u<a.length;){var d=a[u++],h=a[u++],p=a[u++],m=a[u++];if(o>0){var v=(d+p)/2-(h-m)*o,g=(h+m)/2-(p-d)*o;if(lq(d,h,v,g,p,m,s,t,i))return l}else if(Hd(d,h,p,m,s,t,i))return l;l++}return-1},e.prototype.contain=function(t,i){var r=this.transformCoordToLocal(t,i),a=this.getBoundingRect();if(t=r[0],i=r[1],a.contain(t,i)){var o=this.hoverDataIdx=this.findDataIndex(t,i);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var i=this.shape,r=i.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<r.length;){var c=r[u++],d=r[u++];a=Math.min(c,a),s=Math.max(c,s),o=Math.min(d,o),l=Math.max(d,l)}t=this._rect=new gi(a,o,s,l)}return t},e}(Ei),E_e=function(){function n(){this.group=new ei}return n.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},n.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},n.prototype.incrementalUpdate=function(e,t){var i=this._newAdded[0],r=t.getLayout("linesPoints"),a=i&&i.shape.segs;if(a&&a.length<2e4){var o=a.length,s=new Float32Array(o+r.length);s.set(a),s.set(r,o),i.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:r}),this._setCommon(l,t),l.__startIndex=e.start}},n.prototype.remove=function(){this._clear()},n.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},n.prototype._create=function(){var e=new M_e({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},n.prototype._setCommon=function(e,t,i){var r=t.hostModel;e.setShape({polyline:r.get("polyline"),curveness:r.get(["lineStyle","curveness"])}),e.useStyle(r.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=ni(e);o.seriesIndex=r.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},n.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},n}();const P_e=E_e;var R_e={seriesType:"lines",plan:Xv(),reset:function(n){var e=n.coordinateSystem;if(e){var t=n.get("polyline"),i=n.pipelineContext.large;return{progress:function(r,a){var o=[];if(i){var s=void 0,l=r.end-r.start;if(t){for(var u=0,c=r.start;c<r.end;c++)u+=n.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var d=0,h=[],c=r.start;c<r.end;c++){var f=n.getLineCoords(c,o);t&&(s[d++]=f);for(var p=0;p<f;p++)h=e.dataToPoint(o[p],!1,h),s[d++]=h[0],s[d++]=h[1]}a.setLayout("linesPoints",s)}else for(var c=r.start;c<r.end;c++){var m=a.getItemModel(c),f=n.getLineCoords(c,o),v=[];if(t)for(var g=0;g<f;g++)v.push(e.dataToPoint(o[g]));else{v[0]=e.dataToPoint(o[0]),v[1]=e.dataToPoint(o[1]);var _=m.get(["lineStyle","curveness"]);+_&&(v[2]=[(v[0][0]+v[1][0])/2-(v[0][1]-v[1][1])*_,(v[0][1]+v[1][1])/2-(v[1][0]-v[0][0])*_])}a.setItemLayout(c,v)}}}}}};const aJ=R_e;var L_e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a=t.getData(),o=this._updateLineDraw(a,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=r.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 d=t.get("clip",!0)&&E3(t.coordinateSystem,!1,t);d?this.group.setClipPath(d):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,i,r){var a=t.getData(),o=this._updateLineDraw(a,t);o.incrementalPrepareUpdate(a),this._clearLayer(r),this._finished=!1},e.prototype.incrementalRender=function(t,i,r){this._lineDraw.incrementalUpdate(t,i.getData()),this._finished=t.end===i.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,i,r){var a=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=aJ.reset(t,i,r);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(r)},e.prototype._updateLineDraw=function(t,i){var r=this._lineDraw,a=this._showEffect(i),o=!!i.get("polyline"),s=i.pipelineContext,l=s.large;return(!r||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(r&&r.remove(),r=this._lineDraw=l?new P_e:new _P(o?a?A_e:rJ:a?iJ:yP),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(r.group),r},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var i=t.getZr(),r=i.painter.getType()==="svg";!r&&this._lastZlevel!=null&&i.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,i){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(i)},e.prototype.dispose=function(t,i){this.remove(t,i)},e.type="lines",e}(Yr);const I_e=L_e;var D_e=typeof Uint32Array=="undefined"?Array:Uint32Array,N_e=typeof Float64Array=="undefined"?Array:Float64Array;function WB(n){var e=n.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(n.data=Xt(e,function(t){var i=[t[0].coord,t[1].coord],r={coords:i};return t[0].name&&(r.fromName=t[0].name),t[1].name&&(r.toName=t[1].name),XM([r,t[0],t[1]])}))}var k_e=function(n){ot(e,n);function e(){var t=n!==null&&n.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||[],WB(t);var i=this._processFlatCoordsArray(t.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(t.data=new Float32Array(i.count)),n.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(WB(t),t.data){var i=this._processFlatCoordsArray(t.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(t.data=new Float32Array(i.count))}n.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var i=this._processFlatCoordsArray(t.data);i.flatCoords&&(this._flatCoords?(this._flatCoords=x9(this._flatCoords,i.flatCoords),this._flatCoordsOffset=x9(this._flatCoordsOffset,i.flatCoordsOffset)):(this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset),t.data=new Float32Array(i.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var i=this.getData().getItemModel(t),r=i.option instanceof Array?i.option:i.getShallow("coords");return r},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,i){if(this._flatCoordsOffset){for(var r=this._flatCoordsOffset[t*2],a=this._flatCoordsOffset[t*2+1],o=0;o<a;o++)i[o]=i[o]||[],i[o][0]=this._flatCoords[r+o*2],i[o][1]=this._flatCoords[r+o*2+1];return a}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)i[o]=i[o]||[],i[o][0]=s[o][0],i[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var i=0;if(this._flatCoords&&(i=this._flatCoords.length),Yi(t[0])){for(var r=t.length,a=new D_e(r),o=new N_e(r),s=0,l=0,u=0,c=0;c<r;){u++;var d=t[c++];a[l++]=s+i,a[l++]=d;for(var h=0;h<d;h++){var f=t[c++],p=t[c++];o[s++]=f,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,i){var r=new Rs(["value"],this);return r.hasItemOption=!1,r.initData(t.data,[],function(a,o,s,l){if(a instanceof Array)return NaN;r.hasItemOption=!0;var u=a.value;if(u!=null)return u instanceof Array?u[l]:u}),r},e.prototype.formatTooltip=function(t,i,r){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),So("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"),i=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&i>0?i+"":""},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}(pa);const F_e=k_e;function M6(n){return n instanceof Array||(n=[n,n]),n}var O_e={seriesType:"lines",reset:function(n){var e=M6(n.get("symbol")),t=M6(n.get("symbolSize")),i=n.getData();i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",t&&t[0]),i.setVisual("toSymbolSize",t&&t[1]);function r(a,o){var s=a.getItemModel(o),l=M6(s.getShallow("symbol",!0)),u=M6(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:i.hasItemOption?r:null}}};const B_e=O_e;function z_e(n){n.registerChartView(I_e),n.registerSeriesModel(F_e),n.registerLayout(aJ),n.registerVisual(B_e)}var G_e=256,U_e=function(){function n(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Mh.createCanvas();this.canvas=e}return n.prototype.update=function(e,t,i,r,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,d=this.canvas,h=d.getContext("2d"),f=e.length;d.width=t,d.height=i;for(var p=0;p<f;++p){var m=e[p],v=m[0],g=m[1],_=m[2],S=r(_);h.globalAlpha=S,h.drawImage(s,v-c,g-c)}if(!d.width||!d.height)return d;for(var x=h.getImageData(0,0,d.width,d.height),A=x.data,C=0,M=A.length,I=this.minOpacity,D=this.maxOpacity,E=D-I;C<M;){var S=A[C+3]/256,P=Math.floor(S*(G_e-1))*4;if(S>0){var F=o(S)?l:u;S>0&&(S=S*E+I),A[C++]=F[P],A[C++]=F[P+1],A[C++]=F[P+2],A[C++]=F[P+3]*S*256}else C+=4}return h.putImageData(x,0,0),d},n.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Mh.createCanvas()),t=this.pointSize+this.blurSize,i=t*2;e.width=i,e.height=i;var r=e.getContext("2d");return r.clearRect(0,0,i,i),r.shadowOffsetX=i,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},n.prototype._getGradient=function(e,t){for(var i=this._gradientPixels,r=i[t]||(i[t]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,a),r[o++]=a[0],r[o++]=a[1],r[o++]=a[2],r[o++]=a[3];return r},n}();const V_e=U_e;function H_e(n,e,t){var i=n[1]-n[0];e=Xt(e,function(o){return{interval:[(o.interval[0]-n[0])/i,(o.interval[1]-n[0])/i]}});var r=e.length,a=0;return function(o){var s;for(s=a;s<r;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}if(s===r)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<r&&t[s]}}function W_e(n,e){var t=n[1]-n[0];return e=[(e[0]-n[0])/t,(e[1]-n[0])/t],function(i){return i>=e[0]&&i<=e[1]}}function jB(n){var e=n.dimensions;return e[0]==="lng"&&e[1]==="lat"}var j_e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a;i.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,r,0,t.getData().count()):jB(o)&&this._renderOnGeo(o,t,a,r)},e.prototype.incrementalPrepareRender=function(t,i,r){this.group.removeAll()},e.prototype.incrementalRender=function(t,i,r,a){var o=i.coordinateSystem;o&&(jB(o)?this.render(i,r,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(i,a,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Gh(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,i,r,a,o){var s=t.coordinateSystem,l=r1(s,"cartesian2d"),u,c,d,h;if(l){var f=s.getAxis("x"),p=s.getAxis("y");u=f.getBandWidth()+.5,c=p.getBandWidth()+.5,d=f.scale.getExtent(),h=p.scale.getExtent()}for(var m=this.group,v=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),_=t.getModel(["blur","itemStyle"]).getItemStyle(),S=t.getModel(["select","itemStyle"]).getItemStyle(),x=t.get(["itemStyle","borderRadius"]),A=_o(t),C=t.getModel("emphasis"),M=C.get("focus"),I=C.get("blurScope"),D=C.get("disabled"),E=l?[v.mapDimension("x"),v.mapDimension("y"),v.mapDimension("value")]:[v.mapDimension("time"),v.mapDimension("value")],P=r;P<a;P++){var F=void 0,V=v.getItemVisual(P,"style");if(l){var G=v.get(E[0],P),W=v.get(E[1],P);if(isNaN(v.get(E[2],P))||isNaN(G)||isNaN(W)||G<d[0]||G>d[1]||W<h[0]||W>h[1])continue;var Y=s.dataToPoint([G,W]);F=new Hi({shape:{x:Y[0]-u/2,y:Y[1]-c/2,width:u,height:c},style:V})}else{if(isNaN(v.get(E[1],P)))continue;F=new Hi({z2:1,shape:s.dataToRect([v.get(E[0],P)]).contentShape,style:V})}if(v.hasItemOption){var Q=v.getItemModel(P),K=Q.getModel("emphasis");g=K.getModel("itemStyle").getItemStyle(),_=Q.getModel(["blur","itemStyle"]).getItemStyle(),S=Q.getModel(["select","itemStyle"]).getItemStyle(),x=Q.get(["itemStyle","borderRadius"]),M=K.get("focus"),I=K.get("blurScope"),D=K.get("disabled"),A=_o(Q)}F.shape.r=x;var ae=t.getRawValue(P),ie="-";ae&&ae[2]!=null&&(ie=ae[2]+""),$o(F,A,{labelFetcher:t,labelDataIndex:P,defaultOpacity:V.opacity,defaultText:ie}),F.ensureState("emphasis").style=g,F.ensureState("blur").style=_,F.ensureState("select").style=S,ya(F,M,I,D),F.incremental=o,o&&(F.states.emphasis.hoverLayer=!0),m.add(F),v.setItemGraphicEl(P,F),this._progressiveEls&&this._progressiveEls.push(F)}},e.prototype._renderOnGeo=function(t,i,r,a){var o=r.targetVisuals.inRange,s=r.targetVisuals.outOfRange,l=i.getData(),u=this._hmLayer||this._hmLayer||new V_e;u.blurSize=i.get("blurSize"),u.pointSize=i.get("pointSize"),u.minOpacity=i.get("minOpacity"),u.maxOpacity=i.get("maxOpacity");var c=t.getViewRect().clone(),d=t.getRoamTransform();c.applyTransform(d);var h=Math.max(c.x,0),f=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),m=Math.min(c.height+c.y,a.getHeight()),v=p-h,g=m-f,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],S=l.mapArray(_,function(M,I,D){var E=t.dataToPoint([M,I]);return E[0]-=h,E[1]-=f,E.push(D),E}),x=r.getExtent(),A=r.type==="visualMap.continuous"?W_e(x,r.option.range):H_e(x,r.getPieceList(),r.option.selected);u.update(S,v,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},A);var C=new qo({style:{width:v,height:g,x:h,y:f,image:u.canvas},silent:!0});this.group.add(C)},e.type="heatmap",e}(Yr);const $_e=j_e;var q_e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){return nd(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=x3.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}(pa);const X_e=q_e;function Y_e(n){n.registerChartView($_e),n.registerSeriesModel(X_e)}var K_e=["itemStyle","borderWidth"],$B=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Yx=new zh,Z_e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),d=l.master.getRect(),h={ecSize:{width:r.getWidth(),height:r.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[d.x,d.x+d.width],[d.y,d.y+d.height]],isHorizontal:c,valueDim:$B[+c],categoryDim:$B[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var m=XB(o,p),v=qB(o,p,m,h),g=YB(o,h,v);o.setItemGraphicEl(p,g),a.add(g),ZB(g,h,v)}}).update(function(p,m){var v=s.getItemGraphicEl(m);if(!o.hasValue(p)){a.remove(v);return}var g=XB(o,p),_=qB(o,p,g,h),S=dJ(o,_);v&&S!==v.__pictorialShapeStr&&(a.remove(v),o.setItemGraphicEl(p,null),v=null),v?r7e(v,h,_):v=YB(o,h,_,!0),o.setItemGraphicEl(p,v),v.__pictorialSymbolMeta=_,a.add(v),ZB(v,h,_)}).remove(function(p){var m=s.getItemGraphicEl(p);m&&KB(s,p,m.__pictorialSymbolMeta.animationModel,m)}).execute();var f=t.get("clip",!0)?E3(t.coordinateSystem,!1,t):null;return f?a.setClipPath(f):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,i){var r=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(o){KB(a,ni(o).dataIndex,t,o)}):r.removeAll()},e.type="pictorialBar",e}(Yr);function qB(n,e,t,i){var r=n.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,d=t.isAnimationEnabled(),h={dataIndex:e,layout:r,itemModel:t,symbolType:n.getItemVisual(e,"symbol")||"circle",style:n.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:d?t:null,hoverScale:d&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};J_e(t,a,r,i,h),Q_e(n,e,r,a,o,h.boundingLength,h.pxSign,c,i,h),e7e(t,h.symbolScale,u,i,h);var f=h.symbolSize,p=n1(t.get("symbolOffset"),f);return t7e(t,f,r,a,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function J_e(n,e,t,i,r){var a=i.valueDim,o=n.get("symbolBoundingData"),s=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[a.wh]<=0),c;if($t(o)){var d=[Kx(s,o[0])-l,Kx(s,o[1])-l];d[1]<d[0]&&d.reverse(),c=d[u]}else o!=null?c=Kx(s,o)-l:e?c=i.coordSysExtent[a.index][u]-l:c=t[a.wh];r.boundingLength=c,e&&(r.repeatCutLength=t[a.wh]);var h=a.xy==="x",f=s.inverse;r.pxSign=h&&!f||!h&&f?c>=0?1:-1:c>0?1:-1}function Kx(n,e){return n.toGlobalCoord(n.dataToCoord(n.scale.parse(e)))}function Q_e(n,e,t,i,r,a,o,s,l,u){var c=l.valueDim,d=l.categoryDim,h=Math.abs(t[d.wh]),f=n.getItemVisual(e,"symbolSize"),p;$t(f)?p=f.slice():f==null?p=["100%","100%"]:p=[f,f],p[d.index]=_n(p[d.index],h),p[c.index]=_n(p[c.index],i?h:Math.abs(a)),u.symbolSize=p;var m=u.symbolScale=[p[0]/s,p[1]/s];m[c.index]*=(l.isHorizontal?-1:1)*o}function e7e(n,e,t,i,r){var a=n.get(K_e)||0;a&&(Yx.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Yx.updateTransform(),a/=Yx.getLineScale(),a*=e[i.valueDim.index]),r.valueLineWidth=a||0}function t7e(n,e,t,i,r,a,o,s,l,u,c,d){var h=c.categoryDim,f=c.valueDim,p=d.pxSign,m=Math.max(e[f.index]+s,0),v=m;if(i){var g=Math.abs(l),_=Ro(n.get("symbolMargin"),"15%")+"",S=!1;_.lastIndexOf("!")===_.length-1&&(S=!0,_=_.slice(0,_.length-1));var x=_n(_,e[f.index]),A=Math.max(m+x*2,0),C=S?0:x*2,M=X$(i),I=M?i:JB((g+C)/A),D=g-I*m;x=D/2/(S?I:Math.max(I-1,1)),A=m+x*2,C=S?0:x*2,!M&&i!=="fixed"&&(I=u?JB((Math.abs(u)+C)/A):0),v=I*A-C,d.repeatTimes=I,d.symbolMargin=x}var E=p*(v/2),P=d.pathPosition=[];P[h.index]=t[h.wh]/2,P[f.index]=o==="start"?E:o==="end"?l-E:l/2,a&&(P[0]+=a[0],P[1]+=a[1]);var F=d.bundlePosition=[];F[h.index]=t[h.xy],F[f.index]=t[f.xy];var V=d.barRectShape=It({},t);V[f.wh]=p*Math.max(Math.abs(t[f.wh]),Math.abs(P[f.index]+E)),V[h.wh]=t[h.wh];var G=d.clipShape={};G[h.xy]=-t[h.xy],G[h.wh]=c.ecSize[h.wh],G[f.xy]=0,G[f.wh]=t[f.wh]}function oJ(n){var e=n.symbolPatternSize,t=Ya(n.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function sJ(n,e,t,i){var r=n.__pictorialBundle,a=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,d=a[e.valueDim.index]+o+t.symbolMargin*2;for(PP(n,function(m){m.__pictorialAnimationIndex=c,m.__pictorialRepeatTimes=u,c<u?J2(m,null,p(c),t,i):J2(m,null,{scaleX:0,scaleY:0},t,i,function(){r.remove(m)}),c++});c<u;c++){var h=oJ(t);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,r.add(h);var f=p(c);J2(h,{x:f.x,y:f.y,scaleX:0,scaleY:0},{scaleX:f.scaleX,scaleY:f.scaleY,rotation:f.rotation},t,i)}function p(m){var v=s.slice(),g=t.pxSign,_=m;return(t.symbolRepeatDirection==="start"?g>0:g<0)&&(_=u-1-m),v[l.index]=d*(_-u/2+.5)+s[l.index],{x:v[0],y:v[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function lJ(n,e,t,i){var r=n.__pictorialBundle,a=n.__pictorialMainPath;a?J2(a,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,i):(a=n.__pictorialMainPath=oJ(t),r.add(a),J2(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,i))}function uJ(n,e,t){var i=It({},e.barRectShape),r=n.__pictorialBarRect;r?J2(r,null,{shape:i},e,t):(r=n.__pictorialBarRect=new Hi({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),r.disableMorphing=!0,n.add(r))}function cJ(n,e,t,i){if(t.symbolClip){var r=n.__pictorialClipPath,a=It({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(r)Qi(r,{shape:a},s,l);else{a[o.wh]=0,r=new Hi({shape:a}),n.__pictorialBundle.setClipPath(r),n.__pictorialClipPath=r;var u={};u[o.wh]=t.clipShape[o.wh],e1[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function XB(n,e){var t=n.getItemModel(e);return t.getAnimationDelayParams=n7e,t.isAnimationEnabled=i7e,t}function n7e(n){return{index:n.__pictorialAnimationIndex,count:n.__pictorialRepeatTimes}}function i7e(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function YB(n,e,t,i){var r=new ei,a=new ei;return r.add(a),r.__pictorialBundle=a,a.x=t.bundlePosition[0],a.y=t.bundlePosition[1],t.symbolRepeat?sJ(r,e,t):lJ(r,e,t),uJ(r,t,i),cJ(r,e,t,i),r.__pictorialShapeStr=dJ(n,t),r.__pictorialSymbolMeta=t,r}function r7e(n,e,t){var i=t.animationModel,r=t.dataIndex,a=n.__pictorialBundle;Qi(a,{x:t.bundlePosition[0],y:t.bundlePosition[1]},i,r),t.symbolRepeat?sJ(n,e,t,!0):lJ(n,e,t,!0),uJ(n,t,!0),cJ(n,e,t,!0)}function KB(n,e,t,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var a=[];PP(i,function(o){a.push(o)}),i.__pictorialMainPath&&a.push(i.__pictorialMainPath),i.__pictorialClipPath&&(t=null),ne(a,function(o){Ph(o,{scaleX:0,scaleY:0},t,e,function(){i.parent&&i.parent.remove(i)})}),n.setItemGraphicEl(e,null)}function dJ(n,e){return[n.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function PP(n,e,t){ne(n.__pictorialBundle.children(),function(i){i!==n.__pictorialBarRect&&e.call(t,i)})}function J2(n,e,t,i,r,a){e&&n.attr(e),i.symbolClip&&!r?t&&n.attr(t):t&&e1[r?"updateProps":"initProps"](n,t,i.animationModel,i.dataIndex,a)}function ZB(n,e,t){var i=t.dataIndex,r=t.itemModel,a=r.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),c=a.get("focus"),d=a.get("blurScope"),h=a.get("scale");PP(n,function(m){if(m instanceof qo){var v=m.style;m.useStyle(It({image:v.image,x:v.x,y:v.y,width:v.width,height:v.height},t.style))}else m.useStyle(t.style);var g=m.ensureState("emphasis");g.style=o,h&&(g.scaleX=m.scaleX*1.1,g.scaleY=m.scaleY*1.1),m.ensureState("blur").style=s,m.ensureState("select").style=l,u&&(m.cursor=u),m.z2=t.z2});var f=e.valueDim.posDesc[+(t.boundingLength>0)],p=n.__pictorialBarRect;p.ignoreClip=!0,$o(p,_o(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:gv(e.seriesModel.getData(),i),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:f}),ya(n,c,d,a.get("disabled"))}function JB(n){var e=Math.round(n);return Math.abs(n-e)<1e-4?e:Math.ceil(n)}const a7e=Z_e;var o7e=function(n){ot(e,n);function e(){var t=n!==null&&n.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,n.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Uh(d8.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}(d8);const s7e=o7e;function l7e(n){n.registerChartView(a7e),n.registerSeriesModel(s7e),n.registerLayout(n.PRIORITY.VISUAL.LAYOUT,si(HY,"pictorialBar")),n.registerLayout(n.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,WY("pictorialBar"))}var u7e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,i,r){var a=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,d=u.boundaryGap;s.x=0,s.y=c.y+d[0];function h(v){return v.name}var f=new Xc(this._layersSeries||[],l,h,h),p=[];f.add(An(m,this,"add")).update(An(m,this,"update")).remove(An(m,this,"remove")).execute();function m(v,g,_){var S=o._layers;if(v==="remove"){s.remove(S[g]);return}for(var x=[],A=[],C,M=l[g].indices,I=0;I<M.length;I++){var D=a.getItemLayout(M[I]),E=D.x,P=D.y0,F=D.y;x.push(E,P),A.push(E,P+F),C=a.getItemVisual(M[I],"style")}var V,G=a.getItemLayout(M[0]),W=t.getModel("label"),Y=W.get("margin"),Q=t.getModel("emphasis");if(v==="add"){var K=p[g]=new ei;V=new NK({shape:{points:x,stackedOnPoints:A,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),K.add(V),s.add(K),t.isAnimationEnabled()&&V.setClipPath(c7e(V.getBoundingRect(),t,function(){V.removeClipPath()}))}else{var K=S[_];V=K.childAt(0),s.add(K),p[g]=K,Qi(V,{shape:{points:x,stackedOnPoints:A}},t),iu(V)}$o(V,_o(t),{labelDataIndex:M[I-1],defaultText:a.getName(M[I-1]),inheritColor:C.fill},{normal:{verticalAlign:"middle"}}),V.setTextConfig({position:null,local:!0});var ae=V.getTextContent();ae&&(ae.x=G.x-Y,ae.y=G.y0+G.y/2),V.useStyle(C),a.setItemGraphicEl(g,V),jo(V,t),ya(V,Q.get("focus"),Q.get("blurScope"),Q.get("disabled"))}this._layersSeries=l,this._layers=p},e.type="themeRiver",e}(Yr);function c7e(n,e,t){var i=new Hi({shape:{x:n.x-10,y:n.y-10,width:0,height:n.height+20}});return sa(i,{shape:{x:n.x-50,width:n.width+100,height:n.height+20}},e,t),i}const d7e=u7e;var Zx=2,h7e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new L3(An(this.getData,this),An(this.getRawData,this))},e.prototype.fixData=function(t){var i=t.length,r={},a=gA(t,function(h){return r.hasOwnProperty(h[0]+"")||(r[h[0]+""]=-1),h[2]}),o=[];a.buckets.each(function(h,f){o.push({name:f,dataList:h})});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 d=o[l].dataList[c][0]+"";r[d]=l}for(var d in r)r.hasOwnProperty(d)&&r[d]!==l&&(r[d]=l,t[i]=[d,0,u],i++)}return t},e.prototype.getInitialData=function(t,i){for(var r=this.getReferringComponents("singleAxis",Xa).models[0],a=r.get("type"),o=dr(t.data,function(p){return p[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=In(),c=0,d=0;d<s.length;++d)l.push(s[d][Zx]),u.get(s[d][Zx])||(u.set(s[d][Zx],c),c++);var h=T3(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:o8(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,f=new Rs(h,this);return f.initData(s),f},e.prototype.getLayerSeries=function(){for(var t=this.getData(),i=t.count(),r=[],a=0;a<i;++a)r[a]=a;var o=t.mapDimension("single"),s=gA(r,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(d,h){return t.get(o,d)-t.get(o,h)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,i,r){$t(t)||(t=t?[t]:[]);for(var a=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var d=Number.MAX_VALUE,h=-1,f=o[c].indices.length,p=0;p<f;++p){var m=a.get(t[0],o[c].indices[p]),v=Math.abs(m-i);v<=d&&(u=m,d=v,h=o[c].indices[p])}s.push(h)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,i,r){var a=this.getData(),o=a.getName(t),s=a.get(a.mapDimension("value"),t);return So("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}(pa);const f7e=h7e;function p7e(n,e){n.eachSeriesByType("themeRiver",function(t){var i=t.getData(),r=t.coordinateSystem,a={},o=r.getRect();a.rect=o;var s=t.get("boundaryGap"),l=r.getAxis();if(a.boundaryGap=s,l.orient==="horizontal"){s[0]=_n(s[0],o.height),s[1]=_n(s[1],o.height);var u=o.height-s[0]-s[1];QB(i,t,u)}else{s[0]=_n(s[0],o.width),s[1]=_n(s[1],o.width);var c=o.width-s[0]-s[1];QB(i,t,c)}i.setLayout("layoutInfo",a)})}function QB(n,e,t){if(n.count())for(var i=e.coordinateSystem,r=e.getLayerSeries(),a=n.mapDimension("single"),o=n.mapDimension("value"),s=Xt(r,function(v){return Xt(v.indices,function(g){var _=i.dataToPoint(n.get(a,g));return _[1]=n.get(o,g),_})}),l=v7e(s),u=l.y0,c=t/l.max,d=r.length,h=r[0].indices.length,f,p=0;p<h;++p){f=u[p]*c,n.setItemLayout(r[0].indices[p],{layerIndex:0,x:s[0][p][0],y0:f,y:s[0][p][1]*c});for(var m=1;m<d;++m)f+=s[m-1][p][1]*c,n.setItemLayout(r[m].indices[p],{layerIndex:m,x:s[m][p][0],y0:f,y:s[m][p][1]*c})}}function v7e(n){for(var e=n.length,t=n[0].length,i=[],r=[],a=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=n[l][o][1];s>a&&(a=s),i.push(s)}for(var u=0;u<t;++u)r[u]=(a-i[u])/2;a=0;for(var c=0;c<t;++c){var d=i[c]+r[c];d>a&&(a=d)}return{y0:r,max:a}}function m7e(n){n.registerChartView(d7e),n.registerSeriesModel(f7e),n.registerLayout(p7e),n.registerProcessor(R3("themeRiver"))}var g7e=2,y7e=4,_7e=function(n){ot(e,n);function e(t,i,r,a){var o=n.call(this)||this;o.z2=g7e,o.textConfig={inside:!0},ni(o).seriesIndex=i.seriesIndex;var s=new Xi({z2:y7e,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,i,r,a),o}return e.prototype.updateData=function(t,i,r,a,o){this.node=i,i.piece=this,r=r||this._seriesModel,a=a||this._ecModel;var s=this;ni(s).dataIndex=i.dataIndex;var l=i.getModel(),u=l.getModel("emphasis"),c=i.getLayout(),d=It({},c);d.label=null;var h=i.getVisual("style");h.lineJoin="bevel";var f=i.getVisual("decal");f&&(h.decal=vv(f,o));var p=cp(l.getModel("itemStyle"),d,!0);It(d,p),ne(Is,function(_){var S=s.ensureState(_),x=l.getModel([_,"itemStyle"]);S.style=x.getItemStyle();var A=cp(x,d);A&&(S.shape=A)}),t?(s.setShape(d),s.shape.r=c.r0,sa(s,{shape:{r:c.r}},r,i.dataIndex)):(Qi(s,{shape:d},r),iu(s)),s.useStyle(h),this._updateLabel(r);var m=l.getShallow("cursor");m&&s.attr("cursor",m),this._seriesModel=r||this._seriesModel,this._ecModel=a||this._ecModel;var v=u.get("focus"),g=v==="relative"?x9(i.getAncestorsIndices(),i.getDescendantIndices()):v==="ancestor"?i.getAncestorsIndices():v==="descendant"?i.getDescendantIndices():v;ya(this,g,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var i=this,r=this.node.getModel(),a=r.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),d=this,h=d.getTextContent(),f=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,m=a.get("show")&&!(p!=null&&Math.abs(s)<p);h.ignore=!m,ne(P9,function(g){var _=g==="normal"?r.getModel("label"):r.getModel([g,"label"]),S=g==="normal",x=S?h:h.ensureState(g),A=t.getFormattedLabel(f,g);S&&(A=A||i.node.name),x.style=qr(_,{},null,g!=="normal",!0),A&&(x.style.text=A);var C=_.get("show");C!=null&&!S&&(x.ignore=!C);var M=v(_,"position"),I=S?d:d.states[g],D=I.style.fill;I.textConfig={outsideFill:_.get("color")==="inherit"?D:null,inside:M!=="outside"};var E,P=v(_,"distance")||0,F=v(_,"align"),V=v(_,"rotate"),G=Math.PI*.5,W=Math.PI*1.5,Y=Ll(V==="tangential"?Math.PI/2-l:l),Q=Y>G&&!C9(Y-G)&&Y<W;M==="outside"?(E=o.r+P,F=Q?"right":"left"):!F||F==="center"?(s===2*Math.PI&&o.r0===0?E=0:E=(o.r+o.r0)/2,F="center"):F==="left"?(E=o.r0+P,F=Q?"right":"left"):F==="right"&&(E=o.r-P,F=Q?"left":"right"),x.style.align=F,x.style.verticalAlign=v(_,"verticalAlign")||"middle",x.x=E*u+o.cx,x.y=E*c+o.cy;var K=0;V==="radial"?K=Ll(-l)+(Q?Math.PI:0):V==="tangential"?K=Ll(Math.PI/2-l)+(Q?Math.PI:0):Yi(V)&&(K=V*Math.PI/180),x.rotation=Ll(K)});function v(g,_){var S=g.get(_);return S==null?a.get(_):S}h.dirtyStyle()},e}(ll);const ez=_7e;var vC="sunburstRootToNode",tz="sunburstHighlight",S7e="sunburstUnhighlight";function b7e(n){n.registerAction({type:vC,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(r,a){var o=V9(e,[vC],r);if(o){var s=r.getViewRoot();s&&(e.direction=hP(s,o.node)?"rollUp":"drillDown"),r.resetViewRoot(o.node)}}}),n.registerAction({type:tz,update:"none"},function(e,t,i){e=It({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},r);function r(a){var o=V9(e,[tz],a);o&&(e.dataIndex=o.node.dataIndex)}i.dispatchAction(It(e,{type:"highlight"}))}),n.registerAction({type:S7e,update:"updateView"},function(e,t,i){e=It({},e),i.dispatchAction(It(e,{type:"downplay"}))})}var x7e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r,a){var o=this;this.seriesModel=t,this.api=r,this.ecModel=i;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),c=this.group,d=t.get("renderLabelForZeroData"),h=[];u.eachNode(function(_){h.push(_)});var f=this._oldChildren||[];p(h,f),g(l,u),this._initEvents(),this._oldChildren=h;function p(_,S){if(_.length===0&&S.length===0)return;new Xc(S,_,x,x).add(A).update(A).remove(si(A,null)).execute();function x(C){return C.getId()}function A(C,M){var I=C==null?null:_[C],D=M==null?null:S[M];m(I,D)}}function m(_,S){if(!d&&_&&!_.getValue()&&(_=null),_!==l&&S!==l){if(S&&S.piece)_?(S.piece.updateData(!1,_,t,i,r),s.setItemGraphicEl(_.dataIndex,S.piece)):v(S);else if(_){var x=new ez(_,t,i,r);c.add(x),s.setItemGraphicEl(_.dataIndex,x)}}}function v(_){_&&_.piece&&(c.remove(_.piece),_.piece=null)}function g(_,S){S.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,t,i,r):(o.virtualPiece=new ez(_,t,i,r),c.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(S.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(i){var r=!1,a=t.seriesModel.getViewRoot();a.eachNode(function(o){if(!r&&o.piece&&o.piece===i.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";J5(u,c)}}r=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:vC,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,i){var r=i.getData(),a=r.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}(Yr);const w7e=x7e;var T7e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,i){var r={name:t.name,children:t.data};hJ(r);var a=this._levelModels=Xt(t.levels||[],function(l){return new Xr(l,this,i)},this),o=dP.createTree(r,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var d=o.getNodeByDataIndex(c),h=a[d.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var i=n.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return i.treePathInfo=Z_(r,this),i},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 i=this.getRawData().tree.root;(!t||t!==i&&!i.contains(t))&&(this._viewRoot=i)},e.prototype.enableAriaDecal=function(){mZ(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}(pa);function hJ(n){var e=0;ne(n.children,function(i){hJ(i);var r=i.value;$t(r)&&(r=r[0]),e+=r});var t=n.value;$t(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),$t(n.value)?n.value[0]=t:n.value=t}const A7e=T7e;var nz=Math.PI/180;function C7e(n,e,t){e.eachSeriesByType(n,function(i){var r=i.get("center"),a=i.get("radius");$t(a)||(a=[0,a]),$t(r)||(r=[r,r]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=_n(r[0],o),c=_n(r[1],s),d=_n(a[0],l/2),h=_n(a[1],l/2),f=-i.get("startAngle")*nz,p=i.get("minAngle")*nz,m=i.getData().tree.root,v=i.getViewRoot(),g=v.depth,_=i.get("sort");_!=null&&fJ(v,_);var S=0;ne(v.children,function(Y){!isNaN(Y.getValue())&&S++});var x=v.getValue(),A=Math.PI/(x||S)*2,C=v.depth>0,M=v.height-(C?-1:1),I=(h-d)/(M||1),D=i.get("clockwise"),E=i.get("stillShowZeroSum"),P=D?1:-1,F=function(Y,Q){if(Y){var K=Q;if(Y!==m){var ae=Y.getValue(),ie=x===0&&E?A:ae*A;ie<p&&(ie=p),K=Q+P*ie;var he=Y.depth-g-(C?-1:1),Ee=d+I*he,He=d+I*(he+1),xe=i.getLevelModel(Y);if(xe){var Fe=xe.get("r0",!0),pt=xe.get("r",!0),Ot=xe.get("radius",!0);Ot!=null&&(Fe=Ot[0],pt=Ot[1]),Fe!=null&&(Ee=_n(Fe,l/2)),pt!=null&&(He=_n(pt,l/2))}Y.setLayout({angle:ie,startAngle:Q,endAngle:K,clockwise:D,cx:u,cy:c,r0:Ee,r:He})}if(Y.children&&Y.children.length){var bt=0;ne(Y.children,function(ht){bt+=F(ht,Q+bt)})}return K-Q}};if(C){var V=d,G=d+I,W=Math.PI*2;m.setLayout({angle:W,startAngle:f,endAngle:f+W,clockwise:D,cx:u,cy:c,r0:V,r:G})}F(v,f)})}function fJ(n,e){var t=n.children||[];n.children=M7e(t,e),t.length&&ne(n.children,function(i){fJ(i,e)})}function M7e(n,e){if($n(e)){var t=Xt(n,function(r,a){var o=r.getValue();return{params:{depth:r.depth,height:r.height,dataIndex:r.dataIndex,getValue:function(){return o}},index:a}});return t.sort(function(r,a){return e(r.params,a.params)}),Xt(t,function(r){return n[r.index]})}else{var i=e==="asc";return n.sort(function(r,a){var o=(r.getValue()-a.getValue())*(i?1:-1);return o===0?(r.dataIndex-a.dataIndex)*(i?-1:1):o})}}function E7e(n){var e={};function t(i,r,a){for(var o=i;o&&o.depth>1;)o=o.parentNode;var s=r.getColorFromPalette(o.name||o.dataIndex+"",e);return i.depth>1&&xn(s)&&(s=aA(s,(i.depth-1)/(a-1)*.5)),s}n.eachSeriesByType("sunburst",function(i){var r=i.getData(),a=r.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,i,a.root.height));var u=r.ensureUniqueItemVisual(o.dataIndex,"style");It(u,l)})})}function P7e(n){n.registerChartView(w7e),n.registerSeriesModel(A7e),n.registerLayout(si(C7e,"sunburst")),n.registerProcessor(si(R3,"sunburst")),n.registerVisual(E7e),b7e(n)}var iz={color:"fill",borderColor:"stroke"},R7e={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Gc=Gi(),L7e=function(n){ot(e,n);function e(){var t=n!==null&&n.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,i){return nd(null,this)},e.prototype.getDataParams=function(t,i,r){var a=n.prototype.getDataParams.call(this,t,i);return r&&(a.info=Gc(r).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(pa);const I7e=L7e;function D7e(n,e){return e=e||[0,0],Xt(["x","y"],function(t,i){var r=this.getAxis(t),a=e[i],o=n[i]/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(a-o)-r.dataToCoord(a+o))},this)}function N7e(n){var e=n.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return n.dataToPoint(t)},size:An(D7e,n)}}}function k7e(n,e){return e=e||[0,0],Xt([0,1],function(t){var i=e[t],r=n[t]/2,a=[],o=[];return a[t]=i-r,o[t]=i+r,a[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(a)[t]-this.dataToPoint(o)[t])},this)}function F7e(n){var e=n.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:n.getZoom()},api:{coord:function(t){return n.dataToPoint(t)},size:An(k7e,n)}}}function O7e(n,e){var t=this.getAxis(),i=e instanceof Array?e[0]:e,r=(n instanceof Array?n[0]:n)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(i-r)-t.dataToCoord(i+r))}function B7e(n){var e=n.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return n.dataToPoint(t)},size:An(O7e,n)}}}function z7e(n,e){return e=e||[0,0],Xt(["Radius","Angle"],function(t,i){var r="get"+t+"Axis",a=this[r](),o=e[i],s=n[i]/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 G7e(n){var e=n.getRadiusAxis(),t=n.getAngleAxis(),i=e.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:n.cx,cy:n.cy,r:i[1],r0:i[0]},api:{coord:function(r){var a=e.dataToRadius(r[0]),o=t.dataToAngle(r[1]),s=n.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:An(z7e,n)}}}function U7e(n){var e=n.getRect(),t=n.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(i,r){return n.dataToPoint(i,r)}}}}function pJ(n,e,t,i){return n&&(n.legacy||n.legacy!==!1&&!t&&!i&&e!=="tspan"&&(e==="text"||Mn(n,"text")))}function vJ(n,e,t){var i=n,r,a,o;if(e==="text")o=i;else{o={},Mn(i,"text")&&(o.text=i.text),Mn(i,"rich")&&(o.rich=i.rich),Mn(i,"textFill")&&(o.fill=i.textFill),Mn(i,"textStroke")&&(o.stroke=i.textStroke),Mn(i,"fontFamily")&&(o.fontFamily=i.fontFamily),Mn(i,"fontSize")&&(o.fontSize=i.fontSize),Mn(i,"fontStyle")&&(o.fontStyle=i.fontStyle),Mn(i,"fontWeight")&&(o.fontWeight=i.fontWeight),a={type:"text",style:o,silent:!0},r={};var s=Mn(i,"textPosition");t?r.position=s?i.textPosition:"inside":s&&(r.position=i.textPosition),Mn(i,"textPosition")&&(r.position=i.textPosition),Mn(i,"textOffset")&&(r.offset=i.textOffset),Mn(i,"textRotation")&&(r.rotation=i.textRotation),Mn(i,"textDistance")&&(r.distance=i.textDistance)}return rz(o,n),ne(o.rich,function(l){rz(l,l)}),{textConfig:r,textContent:a}}function rz(n,e){e&&(e.font=e.textFont||e.font,Mn(e,"textStrokeWidth")&&(n.lineWidth=e.textStrokeWidth),Mn(e,"textAlign")&&(n.align=e.textAlign),Mn(e,"textVerticalAlign")&&(n.verticalAlign=e.textVerticalAlign),Mn(e,"textLineHeight")&&(n.lineHeight=e.textLineHeight),Mn(e,"textWidth")&&(n.width=e.textWidth),Mn(e,"textHeight")&&(n.height=e.textHeight),Mn(e,"textBackgroundColor")&&(n.backgroundColor=e.textBackgroundColor),Mn(e,"textPadding")&&(n.padding=e.textPadding),Mn(e,"textBorderColor")&&(n.borderColor=e.textBorderColor),Mn(e,"textBorderWidth")&&(n.borderWidth=e.textBorderWidth),Mn(e,"textBorderRadius")&&(n.borderRadius=e.textBorderRadius),Mn(e,"textBoxShadowColor")&&(n.shadowColor=e.textBoxShadowColor),Mn(e,"textBoxShadowBlur")&&(n.shadowBlur=e.textBoxShadowBlur),Mn(e,"textBoxShadowOffsetX")&&(n.shadowOffsetX=e.textBoxShadowOffsetX),Mn(e,"textBoxShadowOffsetY")&&(n.shadowOffsetY=e.textBoxShadowOffsetY))}function az(n,e,t){var i=n;i.textPosition=i.textPosition||t.position||"inside",t.offset!=null&&(i.textOffset=t.offset),t.rotation!=null&&(i.textRotation=t.rotation),t.distance!=null&&(i.textDistance=t.distance);var r=i.textPosition.indexOf("inside")>=0,a=n.fill||"#000";oz(i,e);var o=i.textFill==null;return r?o&&(i.textFill=t.insideFill||"#fff",!i.textStroke&&t.insideStroke&&(i.textStroke=t.insideStroke),!i.textStroke&&(i.textStroke=a),i.textStrokeWidth==null&&(i.textStrokeWidth=2)):(o&&(i.textFill=n.fill||t.outsideFill||"#000"),!i.textStroke&&t.outsideStroke&&(i.textStroke=t.outsideStroke)),i.text=e.text,i.rich=e.rich,ne(e.rich,function(s){oz(s,s)}),i}function oz(n,e){e&&(Mn(e,"fill")&&(n.textFill=e.fill),Mn(e,"stroke")&&(n.textStroke=e.fill),Mn(e,"lineWidth")&&(n.textStrokeWidth=e.lineWidth),Mn(e,"font")&&(n.font=e.font),Mn(e,"fontStyle")&&(n.fontStyle=e.fontStyle),Mn(e,"fontWeight")&&(n.fontWeight=e.fontWeight),Mn(e,"fontSize")&&(n.fontSize=e.fontSize),Mn(e,"fontFamily")&&(n.fontFamily=e.fontFamily),Mn(e,"align")&&(n.textAlign=e.align),Mn(e,"verticalAlign")&&(n.textVerticalAlign=e.verticalAlign),Mn(e,"lineHeight")&&(n.textLineHeight=e.lineHeight),Mn(e,"width")&&(n.textWidth=e.width),Mn(e,"height")&&(n.textHeight=e.height),Mn(e,"backgroundColor")&&(n.textBackgroundColor=e.backgroundColor),Mn(e,"padding")&&(n.textPadding=e.padding),Mn(e,"borderColor")&&(n.textBorderColor=e.borderColor),Mn(e,"borderWidth")&&(n.textBorderWidth=e.borderWidth),Mn(e,"borderRadius")&&(n.textBorderRadius=e.borderRadius),Mn(e,"shadowColor")&&(n.textBoxShadowColor=e.shadowColor),Mn(e,"shadowBlur")&&(n.textBoxShadowBlur=e.shadowBlur),Mn(e,"shadowOffsetX")&&(n.textBoxShadowOffsetX=e.shadowOffsetX),Mn(e,"shadowOffsetY")&&(n.textBoxShadowOffsetY=e.shadowOffsetY),Mn(e,"textShadowColor")&&(n.textShadowColor=e.textShadowColor),Mn(e,"textShadowBlur")&&(n.textShadowBlur=e.textShadowBlur),Mn(e,"textShadowOffsetX")&&(n.textShadowOffsetX=e.textShadowOffsetX),Mn(e,"textShadowOffsetY")&&(n.textShadowOffsetY=e.textShadowOffsetY))}var mJ={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},sz=Li(mJ);Yu(Zu,function(n,e){return n[e]=1,n},{});Zu.join(", ");var _8=["","style","shape","extra"],Sv=Gi();function RP(n,e,t,i,r){var a=n+"Animation",o=Uv(n,i,r)||{},s=Sv(e).userDuring;return o.duration>0&&(o.during=s?An($7e,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=n),It(o,t[a]),o}function c5(n,e,t,i){i=i||{};var r=i.dataIndex,a=i.isInit,o=i.clearStyle,s=t.isAnimationEnabled(),l=Sv(n),u=e.style;l.userDuring=e.during;var c={},d={};if(X7e(n,e,d),uz("shape",e,d),uz("extra",e,d),!a&&s&&(q7e(n,e,c),lz("shape",n,e,c),lz("extra",n,e,c),Y7e(n,e,u,c)),d.style=u,V7e(n,d,o),W7e(n,e),s)if(a){var h={};ne(_8,function(p){var m=p?e[p]:e;m&&m.enterFrom&&(p&&(h[p]=h[p]||{}),It(p?h[p]:h,m.enterFrom))});var f=RP("enter",n,e,t,r);f.duration>0&&n.animateFrom(h,f)}else H7e(n,e,r||0,t,c);gJ(n,e),u?n.dirty():n.markRedraw()}function gJ(n,e){for(var t=Sv(n).leaveToProps,i=0;i<_8.length;i++){var r=_8[i],a=r?e[r]:e;a&&a.leaveTo&&(t||(t=Sv(n).leaveToProps={}),r&&(t[r]=t[r]||{}),It(r?t[r]:t,a.leaveTo))}}function e7(n,e,t,i){if(n){var r=n.parent,a=Sv(n).leaveToProps;if(a){var o=RP("update",n,e,t,0);o.done=function(){r.remove(n),i&&i()},n.animateTo(a,o)}else r.remove(n),i&&i()}}function Ep(n){return n==="all"}function V7e(n,e,t){var i=e.style;if(!n.isGroup&&i){if(t){n.useStyle({});for(var r=n.animators,a=0;a<r.length;a++){var o=r[a];o.targetName==="style"&&o.changeTarget(n.style)}}n.setStyle(i)}e&&(e.style=null,e&&n.attr(e),e.style=i)}function H7e(n,e,t,i,r){if(r){var a=RP("update",n,e,i,t);a.duration>0&&n.animateFrom(r,a)}}function W7e(n,e){Mn(e,"silent")&&(n.silent=e.silent),Mn(e,"ignore")&&(n.ignore=e.ignore),n instanceof M0&&Mn(e,"invisible")&&(n.invisible=e.invisible),n instanceof Ei&&Mn(e,"autoBatch")&&(n.autoBatch=e.autoBatch)}var wu={},j7e={setTransform:function(n,e){return wu.el[n]=e,this},getTransform:function(n){return wu.el[n]},setShape:function(n,e){var t=wu.el,i=t.shape||(t.shape={});return i[n]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(n){var e=wu.el.shape;if(e)return e[n]},setStyle:function(n,e){var t=wu.el,i=t.style;return i&&(i[n]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(n){var e=wu.el.style;if(e)return e[n]},setExtra:function(n,e){var t=wu.el.extra||(wu.el.extra={});return t[n]=e,this},getExtra:function(n){var e=wu.el.extra;if(e)return e[n]}};function $7e(){var n=this,e=n.el;if(e){var t=Sv(e).userDuring,i=n.userDuring;if(t!==i){n.el=n.userDuring=null;return}wu.el=e,i(j7e)}}function lz(n,e,t,i){var r=t[n];if(r){var a=e[n],o;if(a){var s=t.transition,l=r.transition;if(l)if(!o&&(o=i[n]={}),Ep(l))It(o,a);else for(var u=Ar(l),c=0;c<u.length;c++){var d=u[c],h=a[d];o[d]=h}else if(Ep(s)||xi(s,n)>=0){!o&&(o=i[n]={});for(var f=Li(a),c=0;c<f.length;c++){var d=f[c],h=a[d];K7e(r[d],h)&&(o[d]=h)}}}}}function uz(n,e,t){var i=e[n];if(i)for(var r=t[n]={},a=Li(i),o=0;o<a.length;o++){var s=a[o];r[s]=Ug(i[s])}}function q7e(n,e,t){for(var i=e.transition,r=Ep(i)?Zu:Ar(i||[]),a=0;a<r.length;a++){var o=r[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=n[o];t[o]=s}}}function X7e(n,e,t){for(var i=0;i<sz.length;i++){var r=sz[i],a=mJ[r],o=e[r];o&&(t[a[0]]=o[0],t[a[1]]=o[1])}for(var i=0;i<Zu.length;i++){var s=Zu[i];e[s]!=null&&(t[s]=e[s])}}function Y7e(n,e,t,i){if(t){var r=n.style,a;if(r){var o=t.transition,s=e.transition;if(o&&!Ep(o)){var l=Ar(o);!a&&(a=i.style={});for(var u=0;u<l.length;u++){var c=l[u],d=r[c];a[c]=d}}else if(n.getAnimationStyleProps&&(Ep(s)||Ep(o)||xi(s,"style")>=0)){var h=n.getAnimationStyleProps(),f=h?h.style:null;if(f){!a&&(a=i.style={});for(var p=Li(t),u=0;u<p.length;u++){var c=p[u];if(f[c]){var d=r[c];a[c]=d}}}}}}}function K7e(n,e){return ds(n)?n!==e:n!=null&&isFinite(n)}var yJ=Gi(),Z7e=["percent","easing","shape","style","extra"];function _J(n){n.stopAnimation("keyframe"),n.attr(yJ(n))}function S8(n,e,t){if(!(!t.isAnimationEnabled()||!e)){if($t(e)){ne(e,function(s){S8(n,s,t)});return}var i=e.keyframes,r=e.duration;if(t&&r==null){var a=Uv("enter",t,0);r=a&&a.duration}if(!(!i||!r)){var o=yJ(n);ne(_8,function(s){if(!(s&&!n[s])){var l;i.sort(function(u,c){return u.percent-c.percent}),ne(i,function(u){var c=n.animators,d=s?u[s]:u;if(d){var h=Li(d);if(s||(h=dr(h,function(m){return xi(Z7e,m)<0})),!!h.length){l||(l=n.animate(s,e.loop,!0),l.scope="keyframe");for(var f=0;f<c.length;f++)c[f]!==l&&c[f].targetName===l.targetName&&c[f].stopTracks(h);s&&(o[s]=o[s]||{});var p=s?o[s]:o;ne(h,function(m){p[m]=((s?n[s]:n)||{})[m]}),l.whenWithKeys(r*u.percent,d,h,u.easing)}}}),l&&l.delay(e.delay||0).duration(r).start(e.easing)}})}}}var Uc="emphasis",sh="normal",LP="blur",IP="select",Nh=[sh,Uc,LP,IP],Jx={normal:["itemStyle"],emphasis:[Uc,"itemStyle"],blur:[LP,"itemStyle"],select:[IP,"itemStyle"]},Qx={normal:["label"],emphasis:[Uc,"label"],blur:[LP,"label"],select:[IP,"label"]},J7e=["x","y"],Q7e="e\0\0",Jl={normal:{},emphasis:{},blur:{},select:{}},eSe={cartesian2d:N7e,geo:F7e,single:B7e,polar:G7e,calendar:U7e};function mC(n){return n instanceof Ei}function gC(n){return n instanceof M0}function tSe(n,e){e.copyTransform(n),gC(e)&&gC(n)&&(e.setStyle(n.style),e.z=n.z,e.z2=n.z2,e.zlevel=n.zlevel,e.invisible=n.invisible,e.ignore=n.ignore,mC(e)&&mC(n)&&e.setShape(n.shape))}var nSe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r,a){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=cz(t,s,i,r);o||l.removeAll(),s.diff(o).add(function(d){ew(r,null,d,u(d,a),t,l,s)}).remove(function(d){var h=o.getItemGraphicEl(d);h&&e7(h,Gc(h).option,t)}).update(function(d,h){var f=o.getItemGraphicEl(h);ew(r,f,d,u(d,a),t,l,s)}).execute();var c=t.get("clip",!0)?E3(t.coordinateSystem,!1,t):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,i,r){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,i,r,a,o){var s=i.getData(),l=cz(i,s,r,a),u=this._progressiveEls=[];function c(f){f.isGroup||(f.incremental=!0,f.ensureState("emphasis").hoverLayer=!0)}for(var d=t.start;d<t.end;d++){var h=ew(null,null,d,l(d,o),i,this.group,s);h&&(h.traverse(c),u.push(h))}},e.prototype.eachRendered=function(t){Gh(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,i,r,a){var o=i.element;if(o==null||r.name===o)return!0;for(;(r=r.__hostTarget||r.parent)&&r!==this.group;)if(r.name===o)return!0;return!1},e.type="custom",e}(Yr);const iSe=nSe;function DP(n){var e=n.type,t;if(e==="path"){var i=n.shape,r=i.width!=null&&i.height!=null?{x:i.x||0,y:i.y||0,width:i.width,height:i.height}:null,a=xJ(i);t=P_(a,null,r,i.layout||"center"),Gc(t).customPathData=a}else if(e==="image")t=new qo({}),Gc(t).customImagePath=n.style.image;else if(e==="text")t=new Xi({});else if(e==="group")t=new ei;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=SE(e);if(!o){var s="";ur(s)}t=new o}return Gc(t).customGraphicType=e,t.name=n.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function NP(n,e,t,i,r,a,o){_J(e);var s=r&&r.normal.cfg;s&&e.setTextConfig(s),i&&i.transition==null&&(i.transition=J7e);var l=i&&i.style;if(l){if(e.type==="text"){var u=l;Mn(u,"textFill")&&(u.fill=u.textFill),Mn(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,d=mC(e)?l.decal:null;n&&d&&(d.dirty=!0,c=vv(d,n)),l.__decalPattern=c}if(gC(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}c5(e,i,a,{dataIndex:t,isInit:o,clearStyle:!0}),S8(e,i.keyframeAnimation,a)}function SJ(n,e,t,i,r){var a=e.isGroup?null:e,o=r&&r[n].cfg;if(a){var s=a.ensureState(n);if(i===!1){var l=a.getState(n);l&&(l.style=null)}else s.style=i||null;o&&(s.textConfig=o),zp(a)}}function rSe(n,e,t){if(!n.isGroup){var i=n,r=t.currentZ,a=t.currentZLevel;i.z=r,i.zlevel=a;var o=e.z2;o!=null&&(i.z2=o||0);for(var s=0;s<Nh.length;s++)aSe(i,e,Nh[s])}}function aSe(n,e,t){var i=t===sh,r=i?e:b8(e,t),a=r?r.z2:null,o;a!=null&&(o=i?n:n.ensureState(t),o.z2=a||0)}function cz(n,e,t,i){var r=n.get("renderItem"),a=n.coordinateSystem,o={};a&&(o=a.prepareCustoms?a.prepareCustoms(a):eSe[a.type](a));for(var s=qn({getWidth:i.getWidth,getHeight:i.getHeight,getZr:i.getZr,getDevicePixelRatio:i.getDevicePixelRatio,value:x,style:C,ordinalRawValue:A,styleEmphasis:M,visual:E,barLayout:P,currentSeriesIndices:F,font:V},o.api||{}),l={context:{},seriesId:n.id,seriesName:n.name,seriesIndex:n.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:oSe(n.getData())},u,c,d={},h={},f={},p={},m=0;m<Nh.length;m++){var v=Nh[m];f[v]=n.getModel(Jx[v]),p[v]=n.getModel(Qx[v])}function g(G){return G===u?c||(c=e.getItemModel(G)):e.getItemModel(G)}function _(G,W){return e.hasItemOption?G===u?d[W]||(d[W]=g(G).getModel(Jx[W])):g(G).getModel(Jx[W]):f[W]}function S(G,W){return e.hasItemOption?G===u?h[W]||(h[W]=g(G).getModel(Qx[W])):g(G).getModel(Qx[W]):p[W]}return function(G,W){return u=G,c=null,d={},h={},r&&r(qn({dataIndexInside:G,dataIndex:e.getRawIndex(G),actionType:W?W.type:null},l),s)};function x(G,W){return W==null&&(W=u),e.getStore().get(e.getDimensionIndex(G||0),W)}function A(G,W){W==null&&(W=u),G=G||0;var Y=e.getDimensionInfo(G);if(!Y){var Q=e.getDimensionIndex(G);return Q>=0?e.getStore().get(Q,W):void 0}var K=e.get(Y.name,W),ae=Y&&Y.ordinalMeta;return ae?ae.categories[K]:K}function C(G,W){W==null&&(W=u);var Y=e.getItemVisual(W,"style"),Q=Y&&Y.fill,K=Y&&Y.opacity,ae=_(W,sh).getItemStyle();Q!=null&&(ae.fill=Q),K!=null&&(ae.opacity=K);var ie={inheritColor:xn(Q)?Q:"#000"},he=S(W,sh),Ee=qr(he,null,ie,!1,!0);Ee.text=he.getShallow("show")?ai(n.getFormattedLabel(W,sh),gv(e,W)):null;var He=K5(he,ie,!1);return D(G,ae),ae=az(ae,Ee,He),G&&I(ae,G),ae.legacy=!0,ae}function M(G,W){W==null&&(W=u);var Y=_(W,Uc).getItemStyle(),Q=S(W,Uc),K=qr(Q,null,null,!0,!0);K.text=Q.getShallow("show")?Hu(n.getFormattedLabel(W,Uc),n.getFormattedLabel(W,sh),gv(e,W)):null;var ae=K5(Q,null,!0);return D(G,Y),Y=az(Y,K,ae),G&&I(Y,G),Y.legacy=!0,Y}function I(G,W){for(var Y in W)Mn(W,Y)&&(G[Y]=W[Y])}function D(G,W){G&&(G.textFill&&(W.textFill=G.textFill),G.textPosition&&(W.textPosition=G.textPosition))}function E(G,W){if(W==null&&(W=u),Mn(iz,G)){var Y=e.getItemVisual(W,"style");return Y?Y[iz[G]]:null}if(Mn(R7e,G))return e.getItemVisual(W,G)}function P(G){if(a.type==="cartesian2d"){var W=a.getBaseAxis();return ome(qn({axis:W},G))}}function F(){return t.getCurrentSeriesIndices()}function V(G){return bE(G,t)}}function oSe(n){var e={};return ne(n.dimensions,function(t){var i=n.getDimensionInfo(t);if(!i.isExtraCoord){var r=i.coordDim,a=e[r]=e[r]||[];a[i.coordDimIndex]=n.getDimensionIndex(t)}}),e}function ew(n,e,t,i,r,a,o){if(!i){a.remove(e);return}var s=kP(n,e,t,i,r,a);return s&&o.setItemGraphicEl(t,s),s&&ya(s,i.focus,i.blurScope,i.emphasisDisabled),s}function kP(n,e,t,i,r,a){var o=-1,s=e;e&&bJ(e,i,r)&&(o=xi(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=DP(i),s&&tSe(s,u)),i.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Jl.normal.cfg=Jl.normal.conOpt=Jl.emphasis.cfg=Jl.emphasis.conOpt=Jl.blur.cfg=Jl.blur.conOpt=Jl.select.cfg=Jl.select.conOpt=null,Jl.isLegacy=!1,lSe(u,t,i,r,l,Jl),sSe(u,t,i,r,l),NP(n,u,t,i,Jl,r,l),Mn(i,"info")&&(Gc(u).info=i.info);for(var c=0;c<Nh.length;c++){var d=Nh[c];if(d!==sh){var h=b8(i,d),f=FP(i,h,d);SJ(d,u,h,f,Jl)}}return rSe(u,i,r),i.type==="group"&&uSe(n,u,t,i,r),o>=0?a.replaceAt(u,o):a.add(u),u}function bJ(n,e,t){var i=Gc(n),r=e.type,a=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||r!=null&&r!==i.customGraphicType||r==="path"&&fSe(a)&&xJ(a)!==i.customPathData||r==="image"&&Mn(o,"image")&&o.image!==i.customImagePath}function sSe(n,e,t,i,r){var a=t.clipPath;if(a===!1)n&&n.getClipPath()&&n.removeClipPath();else if(a){var o=n.getClipPath();o&&bJ(o,a,i)&&(o=null),o||(o=DP(a),n.setClipPath(o)),NP(null,o,e,a,null,i,r)}}function lSe(n,e,t,i,r,a){if(!n.isGroup){dz(t,null,a),dz(t,Uc,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=n.getTextContent();if(o===!1)c&&n.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=DP(o),n.setTextContent(c)),NP(null,c,e,o,null,i,r);for(var d=o&&o.style,h=0;h<Nh.length;h++){var f=Nh[h];if(f!==sh){var p=a[f].conOpt;SJ(f,c,p,FP(o,p,f),null)}}d?c.dirty():c.markRedraw()}}}}function dz(n,e,t){var i=e?b8(n,e):n,r=e?FP(n,i,Uc):n.style,a=n.type,o=i?i.textConfig:null,s=n.textContent,l=s?e?b8(s,e):s:null;if(r&&(t.isLegacy||pJ(r,a,!!o,!!l))){t.isLegacy=!0;var u=vJ(r,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 d=e?t[e]:t.normal;d.cfg=o,d.conOpt=l}function b8(n,e){return e?n?n[e]:null:n}function FP(n,e,t){var i=e&&e.style;return i==null&&t===Uc&&n&&(i=n.styleEmphasis),i}function uSe(n,e,t,i,r){var a=i.children,o=a?a.length:0,s=i.$mergeChildren,l=s==="byName"||i.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){dSe({api:n,oldChildren:e.children()||[],newChildren:a||[],dataIndex:t,seriesModel:r,group:e});return}u&&e.removeAll();for(var c=0;c<o;c++){var d=a[c],h=e.childAt(c);d?(d.ignore==null&&(d.ignore=!1),kP(n,h,t,d,r,e)):h.ignore=!0}for(var f=e.childCount()-1;f>=c;f--){var p=e.childAt(f);cSe(e,p,r)}}}function cSe(n,e,t){e&&e7(e,Gc(n).option,t)}function dSe(n){new Xc(n.oldChildren,n.newChildren,hz,hz,n).add(fz).update(fz).remove(hSe).execute()}function hz(n,e){var t=n&&n.name;return t!=null?t:Q7e+e}function fz(n,e){var t=this.context,i=n!=null?t.newChildren[n]:null,r=e!=null?t.oldChildren[e]:null;kP(t.api,r,t.dataIndex,i,t.seriesModel,t.group)}function hSe(n){var e=this.context,t=e.oldChildren[n];t&&e7(t,Gc(t).option,e.seriesModel)}function xJ(n){return n&&(n.pathData||n.d)}function fSe(n){return n&&(Mn(n,"pathData")||Mn(n,"d"))}function pSe(n){n.registerChartView(iSe),n.registerSeriesModel(I7e)}var Qf=Gi(),pz=Zn,tw=An,vSe=function(){function n(){this._dragging=!1,this.animationThreshold=15}return n.prototype.render=function(e,t,i,r){var a=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=i,!(!r&&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,i);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=c;var d=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new ei,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),i.getZr().add(s);else{var h=si(vz,t,d);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,t)}gz(s,t,!0),this._renderHandle(a)}},n.prototype.remove=function(e){this.clear(e)},n.prototype.dispose=function(e){this.clear(e)},n.prototype.determineAnimation=function(e,t){var i=t.get("animation"),r=e.axis,a=r.type==="category",o=t.get("snap");if(!o&&!a)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(a&&r.getBandWidth()>s)return!0;if(o){var l=rP(e).seriesDataCount,u=r.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},n.prototype.makeElOption=function(e,t,i,r,a){},n.prototype.createPointerEl=function(e,t,i,r){var a=t.pointer;if(a){var o=Qf(e).pointerEl=new e1[a.type](pz(t.pointer));e.add(o)}},n.prototype.createLabelEl=function(e,t,i,r){if(t.label){var a=Qf(e).labelEl=new Xi(pz(t.label));e.add(a),mz(a,r)}},n.prototype.updatePointerEl=function(e,t,i){var r=Qf(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),i(r,{shape:t.pointer.shape}))},n.prototype.updateLabelEl=function(e,t,i,r){var a=Qf(e).labelEl;a&&(a.setStyle(t.label.style),i(a,{x:t.label.x,y:t.label.y}),mz(a,r))},n.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,i=this._api.getZr(),r=this._handle,a=t.getModel("handle"),o=t.get("status");if(!a.get("show")||!o||o==="hide"){r&&i.remove(r),this._handle=null;return}var s;this._handle||(s=!0,r=this._handle=b3(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Wc(u.event)},onmousedown:tw(this._onHandleDragMove,this,0,0),drift:tw(this._onHandleDragMove,this),ondragend:tw(this._onHandleDragEnd,this)}),i.add(r)),gz(r,t,!1),r.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");$t(l)||(l=[l,l]),r.scaleX=l[0]/2,r.scaleY=l[1]/2,Yv(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},n.prototype._moveHandleToValue=function(e,t){vz(this._axisPointerModel,!t&&this._moveAnimation,this._handle,nw(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},n.prototype._onHandleDragMove=function(e,t){var i=this._handle;if(i){this._dragging=!0;var r=this.updateHandleTransform(nw(i),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,i.stopAnimation(),i.attr(nw(r)),Qf(i).lastProp=null,this._doDispatchAxisPointer()}},n.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},n.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"})}},n.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),i=this._group,r=this._handle;t&&i&&(this._lastGraphicKey=null,i&&t.remove(i),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),k9(this,"_doDispatchAxisPointer")},n.prototype.doClear=function(){},n.prototype.buildLabel=function(e,t,i){return i=i||0,{x:e[i],y:e[1-i],width:t[i],height:t[1-i]}},n}();function vz(n,e,t,i){wJ(Qf(t).lastProp,i)||(Qf(t).lastProp=i,e?Qi(t,i,n):(t.stopAnimation(),t.attr(i)))}function wJ(n,e){if(Kn(n)&&Kn(e)){var t=!0;return ne(e,function(i,r){t=t&&wJ(n[r],i)}),!!t}else return n===e}function mz(n,e){n[e.get(["label","show"])?"show":"hide"]()}function nw(n){return{x:n.x||0,y:n.y||0,rotation:n.rotation||0}}function gz(n,e,t){var i=e.get("z"),r=e.get("zlevel");n&&n.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),r!=null&&(a.zlevel=r),a.silent=t)})}const OP=vSe;function BP(n){var e=n.get("type"),t=n.getModel(e+"Style"),i;return e==="line"?(i=t.getLineStyle(),i.fill=null):e==="shadow"&&(i=t.getAreaStyle(),i.stroke=null),i}function TJ(n,e,t,i,r){var a=t.get("value"),o=AJ(a,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Wv(s.get("padding")||0),u=s.getFont(),c=g3(o,u),d=r.position,h=c.width+l[1]+l[3],f=c.height+l[0]+l[2],p=r.align;p==="right"&&(d[0]-=h),p==="center"&&(d[0]-=h/2);var m=r.verticalAlign;m==="bottom"&&(d[1]-=f),m==="middle"&&(d[1]-=f/2),mSe(d,h,f,i);var v=s.get("backgroundColor");(!v||v==="auto")&&(v=e.get(["axisLine","lineStyle","color"])),n.label={x:d[0],y:d[1],style:qr(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:v}),z2:10}}function mSe(n,e,t,i){var r=i.getWidth(),a=i.getHeight();n[0]=Math.min(n[0]+e,r)-e,n[1]=Math.min(n[1]+t,a)-t,n[0]=Math.max(n[0],0),n[1]=Math.max(n[1],0)}function AJ(n,e,t,i,r){n=e.scale.parse(n);var a=e.scale.getLabel({value:n},{precision:r.precision}),o=r.formatter;if(o){var s={value:XE(e,{value:n}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};ne(i,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,d=u&&u.getDataParams(c);d&&s.seriesData.push(d)}),xn(o)?a=o.replace("{value}",a):$n(o)&&(a=o(s))}return a}function zP(n,e,t){var i=Dl();return Jp(i,i,t.rotation),Ku(i,i,t.position),eu([n.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],i)}function CJ(n,e,t,i,r,a){var o=Yc.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=r.get(["label","margin"]),TJ(e,i,r,a,{position:zP(i.axis,n,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function GP(n,e,t){return t=t||0,{x1:n[t],y1:n[1-t],x2:e[t],y2:e[1-t]}}function MJ(n,e,t){return t=t||0,{x:n[t],y:n[1-t],width:e[t],height:e[1-t]}}function yz(n,e,t,i,r,a){return{cx:n,cy:e,r0:t,r:i,startAngle:r,endAngle:a,clockwise:!0}}var gSe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,r,a,o){var s=r.axis,l=s.grid,u=a.get("type"),c=_z(l,s).getOtherAxis(s).getGlobalExtent(),d=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var h=BP(a),f=ySe[u](s,d,c);f.style=h,t.graphicKey=f.type,t.pointer=f}var p=QA(l.model,r);CJ(i,t,p,r,a,o)},e.prototype.getHandleTransform=function(t,i,r){var a=QA(i.axis.grid.model,i,{labelInside:!1});a.labelMargin=r.get(["handle","margin"]);var o=zP(i.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,i,r,a){var o=r.axis,s=o.grid,l=o.getGlobalExtent(!0),u=_z(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,d=[t.x,t.y];d[c]+=i[c],d[c]=Math.min(l[1],d[c]),d[c]=Math.max(l[0],d[c]);var h=(u[1]+u[0])/2,f=[h,h];f[c]=d[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:d[0],y:d[1],rotation:t.rotation,cursorPoint:f,tooltipOption:p[c]}},e}(OP);function _z(n,e){var t={};return t[e.dim+"AxisIndex"]=e.index,n.getCartesian(t)}var ySe={line:function(n,e,t){var i=GP([e,t[0]],[e,t[1]],Sz(n));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(n,e,t){var i=Math.max(1,n.getBandWidth()),r=t[1]-t[0];return{type:"Rect",shape:MJ([e-i/2,t[0]],[i,r],Sz(n))}}};function Sz(n){return n.dim==="x"?0:1}const _Se=gSe;var SSe=function(n){ot(e,n);function e(){var t=n!==null&&n.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}($i);const bSe=SSe;var Nc=Gi(),xSe=ne;function EJ(n,e,t){if(!qi.node){var i=e.getZr();Nc(i).records||(Nc(i).records={}),wSe(i,e);var r=Nc(i).records[n]||(Nc(i).records[n]={});r.handler=t}}function wSe(n,e){if(Nc(n).initialized)return;Nc(n).initialized=!0,t("click",si(bz,"click")),t("mousemove",si(bz,"mousemove")),t("globalout",ASe);function t(i,r){n.on(i,function(a){var o=CSe(e);xSe(Nc(n).records,function(s){s&&r(s,a,o.dispatchAction)}),TSe(o.pendings,e)})}}function TSe(n,e){var t=n.showTip.length,i=n.hideTip.length,r;t?r=n.showTip[t-1]:i&&(r=n.hideTip[i-1]),r&&(r.dispatchAction=null,e.dispatchAction(r))}function ASe(n,e,t){n.handler("leave",null,t)}function bz(n,e,t,i){e.handler(n,t,i)}function CSe(n){var e={showTip:[],hideTip:[]},t=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=t,n.dispatchAction(i))};return{dispatchAction:t,pendings:e}}function yC(n,e){if(!qi.node){var t=e.getZr(),i=(Nc(t).records||{})[n];i&&(Nc(t).records[n]=null)}}var MSe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a=i.getComponent("tooltip"),o=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";EJ("axisPointer",r,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,i){yC("axisPointer",i)},e.prototype.dispose=function(t,i){yC("axisPointer",i)},e.type="axisPointer",e}(xa);const ESe=MSe;function PJ(n,e){var t=[],i=n.seriesIndex,r;if(i==null||!(r=e.getSeriesByIndex(i)))return{point:[]};var a=r.getData(),o=Op(a,n);if(o==null||o<0||$t(o))return{point:[]};var s=a.getItemGraphicEl(o),l=r.coordinateSystem;if(r.getTooltipPosition)t=r.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(n.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),d=c.dim,h=u.dim,f=d==="x"||d==="radius"?1:0,p=a.mapDimension(h),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(m)||[]}else t=l.dataToPoint(a.getValues(Xt(l.dimensions,function(g){return a.mapDimension(g)}),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 xz=Gi();function PSe(n,e,t){var i=n.currTrigger,r=[n.x,n.y],a=n,o=n.dispatchAction||An(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){d5(r)&&(r=PJ({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=d5(r),u=a.axesInfo,c=s.axesInfo,d=i==="leave"||d5(r),h={},f={},p={list:[],map:{}},m={showPointer:si(LSe,f),showTooltip:si(ISe,p)};ne(s.coordSysMap,function(g,_){var S=l||g.containPoint(r);ne(s.coordSysAxesInfo[_],function(x,A){var C=x.axis,M=FSe(u,x);if(!d&&S&&(!u||M)){var I=M&&M.value;I==null&&!l&&(I=C.pointToData(r)),I!=null&&wz(x,I,m,!1,h)}})});var v={};return ne(c,function(g,_){var S=g.linkGroup;S&&!f[_]&&ne(S.axesInfo,function(x,A){var C=f[A];if(x!==g&&C){var M=C.value;S.mapper&&(M=g.axis.scale.parse(S.mapper(M,Tz(x),Tz(g)))),v[g.key]=M}})}),ne(v,function(g,_){wz(c[_],g,m,!0,h)}),DSe(f,c,h),NSe(p,r,n,o),kSe(c,o,t),h}}function wz(n,e,t,i,r){var a=n.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!n.involveSeries){t.showPointer(n,e);return}var o=RSe(e,n),s=o.payloadBatch,l=o.snapToValue;s[0]&&r.seriesIndex==null&&It(r,s[0]),!i&&n.snap&&a.containData(l)&&l!=null&&(e=l),t.showPointer(n,e,s),t.showTooltip(n,o,l)}}function RSe(n,e){var t=e.axis,i=t.dim,r=n,a=[],o=Number.MAX_VALUE,s=-1;return ne(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(i),d,h;if(l.getAxisTooltipData){var f=l.getAxisTooltipData(c,n,t);h=f.dataIndices,d=f.nestestValue}else{if(h=l.getData().indicesOfNearest(c[0],n,t.type==="category"?.5:null),!h.length)return;d=l.getData().get(c[0],h[0])}if(!(d==null||!isFinite(d))){var p=n-d,m=Math.abs(p);m<=o&&((m<o||p>=0&&s<0)&&(o=m,s=p,r=d,a.length=0),ne(h,function(v){a.push({seriesIndex:l.seriesIndex,dataIndexInside:v,dataIndex:l.getData().getRawIndex(v)})}))}}),{payloadBatch:a,snapToValue:r}}function LSe(n,e,t,i){n[e.key]={value:t,payloadBatch:i}}function ISe(n,e,t,i){var r=t.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!r.length)){var l=e.coordSys.model,u=U9(l),c=n.map[u];c||(c=n.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},n.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function DSe(n,e,t){var i=t.axesInfo=[];ne(e,function(r,a){var o=r.axisPointerModel.option,s=n[a];s?(!r.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!r.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:r.axis.dim,axisIndex:r.axis.model.componentIndex,value:o.value})})}function NSe(n,e,t,i){if(d5(e)||!n.list.length){i({type:"hideTip"});return}var r=((n.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:n.list})}function kSe(n,e,t){var i=t.getZr(),r="axisPointerLastHighlights",a=xz(i)[r]||{},o=xz(i)[r]={};ne(n,function(u,c){var d=u.axisPointerModel.option;d.status==="show"&&u.triggerEmphasis&&ne(d.seriesDataIndices,function(h){var f=h.seriesIndex+" | "+h.dataIndex;o[f]=h})});var s=[],l=[];ne(a,function(u,c){!o[c]&&l.push(u)}),ne(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 FSe(n,e){for(var t=0;t<(n||[]).length;t++){var i=n[t];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function Tz(n){var e=n.axis.model,t={},i=t.axisDim=n.axis.dim;return t.axisIndex=t[i+"AxisIndex"]=e.componentIndex,t.axisName=t[i+"AxisName"]=e.name,t.axisId=t[i+"AxisId"]=e.id,t}function d5(n){return!n||n[0]==null||isNaN(n[0])||n[1]==null||isNaN(n[1])}function N3(n){a1.registerAxisPointerClass("CartesianAxisPointer",_Se),n.registerComponentModel(bSe),n.registerComponentView(ESe),n.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!$t(t)&&(e.axisPointer.link=[t])}}),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=w3e(e,t)}),n.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},PSe)}function OSe(n){Ci(tZ),Ci(N3)}var BSe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,r,a,o){var s=r.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),d=s.dataToCoord(i),h=a.get("type");if(h&&h!=="none"){var f=BP(a),p=GSe[h](s,l,d,c);p.style=f,t.graphicKey=p.type,t.pointer=p}var m=a.get(["label","margin"]),v=zSe(i,r,a,l,m);TJ(t,r,a,o,v)},e}(OP);function zSe(n,e,t,i,r){var a=e.axis,o=a.dataToCoord(n),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=i.getRadiusAxis().getExtent(),u,c,d;if(a.dim==="radius"){var h=Dl();Jp(h,h,s),Ku(h,h,[i.cx,i.cy]),u=eu([o,-r],h);var f=e.getModel("axisLabel").get("rotate")||0,p=Yc.innerTextLayout(s,f*Math.PI/180,-1);c=p.textAlign,d=p.textVerticalAlign}else{var m=l[1];u=i.coordToPoint([m+r,o]);var v=i.cx,g=i.cy;c=Math.abs(u[0]-v)/m<.3?"center":u[0]>v?"left":"right",d=Math.abs(u[1]-g)/m<.3?"middle":u[1]>g?"top":"bottom"}return{position:u,align:c,verticalAlign:d}}var GSe={line:function(n,e,t,i){return n.dim==="angle"?{type:"Line",shape:GP(e.coordToPoint([i[0],t]),e.coordToPoint([i[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(n,e,t,i){var r=Math.max(1,n.getBandWidth()),a=Math.PI/180;return n.dim==="angle"?{type:"Sector",shape:yz(e.cx,e.cy,i[0],i[1],(-t-r/2)*a,(-t+r/2)*a)}:{type:"Sector",shape:yz(e.cx,e.cy,t-r/2,t+r/2,0,Math.PI*2)}}};const USe=BSe;var VSe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var i,r=this.ecModel;return r.eachComponent(t,function(a){a.getCoordSysModel()===this&&(i=a)},this),i},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}($i);const HSe=VSe;var UP=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Xa).models[0]},e.type="polarAxis",e}($i);Za(UP,A3);var WSe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(UP),jSe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(UP),VP=function(n){ot(e,n);function e(t,i){return n.call(this,"radius",t,i)||this}return e.prototype.pointToData=function(t,i){return this.polar.pointToData(t,i)[this.dim==="radius"?0:1]},e}(ou);VP.prototype.dataToRadius=ou.prototype.dataToCoord;VP.prototype.radiusToData=ou.prototype.coordToData;const $Se=VP;var qSe=Gi(),HP=function(n){ot(e,n);function e(t,i){return n.call(this,"angle",t,i||[0,360])||this}return e.prototype.pointToData=function(t,i){return this.polar.pointToData(t,i)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,i=t.getLabelModel(),r=t.scale,a=r.getExtent(),o=r.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=g3(s==null?"":s+"",i.getFont(),"center","top"),d=Math.max(c.height,7),h=d/u;isNaN(h)&&(h=1/0);var f=Math.max(0,Math.floor(h)),p=qSe(t.model),m=p.lastAutoInterval,v=p.lastTickCount;return m!=null&&v!=null&&Math.abs(m-f)<=1&&Math.abs(v-o)<=1&&m>f?f=m:(p.lastTickCount=o,p.lastAutoInterval=f),f},e}(ou);HP.prototype.dataToAngle=ou.prototype.dataToCoord;HP.prototype.angleToData=ou.prototype.coordToData;const XSe=HP;var RJ=["radius","angle"],YSe=function(){function n(e){this.dimensions=RJ,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new $Se,this._angleAxis=new XSe,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return n.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},n.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},n.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},n.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},n.prototype.getAxesByScale=function(e){var t=[],i=this._angleAxis,r=this._radiusAxis;return i.scale.type===e&&t.push(i),r.scale.type===e&&t.push(r),t},n.prototype.getAngleAxis=function(){return this._angleAxis},n.prototype.getRadiusAxis=function(){return this._radiusAxis},n.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},n.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},n.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},n.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},n.prototype.pointToData=function(e,t){var i=this.pointToCoord(e);return[this._radiusAxis.radiusToData(i[0],t),this._angleAxis.angleToData(i[1],t)]},n.prototype.pointToCoord=function(e){var t=e[0]-this.cx,i=e[1]-this.cy,r=this.getAngleAxis(),a=r.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);r.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+i*i);t/=l,i/=l;for(var u=Math.atan2(-i,t)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},n.prototype.coordToPoint=function(e){var t=e[0],i=e[1]/180*Math.PI,r=Math.cos(i)*t+this.cx,a=-Math.sin(i)*t+this.cy;return[r,a]},n.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),i=t.getExtent().slice();i[0]>i[1]&&i.reverse();var r=e.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-r[0]*a,endAngle:-r[1]*a,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,d=u*u+c*c,h=this.r,f=this.r0;return h!==f&&d-o<=h*h&&d+o>=f*f}}},n.prototype.convertToPixel=function(e,t,i){var r=Az(t);return r===this?this.dataToPoint(i):null},n.prototype.convertFromPixel=function(e,t,i){var r=Az(t);return r===this?this.pointToData(i):null},n}();function Az(n){var e=n.seriesModel,t=n.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}const KSe=YSe;function ZSe(n,e,t){var i=e.get("center"),r=t.getWidth(),a=t.getHeight();n.cx=_n(i[0],r),n.cy=_n(i[1],a);var o=n.getRadiusAxis(),s=Math.min(r,a)/2,l=e.get("radius");l==null?l=[0,"100%"]:$t(l)||(l=[0,l]);var u=[_n(l[0],s),_n(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function JSe(n,e){var t=this,i=t.getAngleAxis(),r=t.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),n.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();ne(s8(l,"radius"),function(u){r.scale.unionExtentFromData(l,u)}),ne(s8(l,"angle"),function(u){i.scale.unionExtentFromData(l,u)})}}),mv(i.scale,i.model),mv(r.scale,r.model),i.type==="category"&&!i.onBand){var a=i.getExtent(),o=360/i.scale.count();i.inverse?a[1]+=o:a[1]-=o,i.setExtent(a[0],a[1])}}function QSe(n){return n.mainType==="angleAxis"}function Cz(n,e){var t;if(n.type=e.get("type"),n.scale=q_(e),n.onBand=e.get("boundaryGap")&&n.type==="category",n.inverse=e.get("inverse"),QSe(e)){n.inverse=n.inverse!==e.get("clockwise");var i=e.get("startAngle"),r=(t=e.get("endAngle"))!==null&&t!==void 0?t:i+(n.inverse?-360:360);n.setExtent(i,r)}e.axis=n,n.model=e}var ebe={dimensions:RJ,create:function(n,e){var t=[];return n.eachComponent("polar",function(i,r){var a=new KSe(r+"");a.update=JSe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=i.findAxisModel("radiusAxis"),u=i.findAxisModel("angleAxis");Cz(o,l),Cz(s,u),ZSe(a,i,e),t.push(a),i.coordinateSystem=a,a.model=i}),n.eachSeries(function(i){if(i.get("coordinateSystem")==="polar"){var r=i.getReferringComponents("polar",Xa).models[0];i.coordinateSystem=r.coordinateSystem}}),t}};const tbe=ebe;var nbe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function E6(n,e,t){e[1]>e[0]&&(e=e.slice().reverse());var i=n.coordToPoint([e[0],t]),r=n.coordToPoint([e[1],t]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function P6(n){var e=n.getRadiusAxis();return e.inverse?0:1}function Mz(n){var e=n[0],t=n[n.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&n.pop()}var ibe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,i){if(this.group.removeAll(),!!t.get("show")){var r=t.axis,a=r.polar,o=a.getRadiusAxis().getExtent(),s=r.getTicksCoords(),l=r.getMinorTicksCoords(),u=Xt(r.getViewLabels(),function(c){c=Zn(c);var d=r.scale,h=d.type==="ordinal"?d.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=r.dataToCoord(h),c});Mz(u),Mz(s),ne(nbe,function(c){t.get([c,"show"])&&(!r.scale.isBlank()||c==="axisLine")&&rbe[c](this.group,t,a,s,l,o,u)},this)}},e.type="angleAxis",e}(a1),rbe={axisLine:function(n,e,t,i,r,a){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=P6(t),d=c?0:1,h,f=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[d]===0?h=new e1[f]({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}):h=new M_({shape:{cx:t.cx,cy:t.cy,r:a[c],r0:a[d]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,n.add(h)},axisTick:function(n,e,t,i,r,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[P6(t)],u=Xt(i,function(c){return new Lo({shape:E6(t,[l,l+s],c.coord)})});n.add(m0(u,{style:qn(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(n,e,t,i,r,a){if(r.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[P6(t)],c=[],d=0;d<r.length;d++)for(var h=0;h<r[d].length;h++)c.push(new Lo({shape:E6(t,[u,u+l],r[d][h].coord)}));n.add(m0(c,{style:qn(s.getModel("lineStyle").getLineStyle(),qn(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(n,e,t,i,r,a,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");ne(o,function(d,h){var f=l,p=d.tickValue,m=a[P6(t)],v=t.coordToPoint([m+u,d.coord]),g=t.cx,_=t.cy,S=Math.abs(v[0]-g)/m<.3?"center":v[0]>g?"left":"right",x=Math.abs(v[1]-_)/m<.3?"middle":v[1]>_?"top":"bottom";if(s&&s[p]){var A=s[p];Kn(A)&&A.textStyle&&(f=new Xr(A.textStyle,l,l.ecModel))}var C=new Xi({silent:Yc.isLabelSilent(e),style:qr(f,{x:v[0],y:v[1],fill:f.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:d.formattedLabel,align:S,verticalAlign:x})});if(n.add(C),c){var M=Yc.makeAxisEventDataBase(e);M.targetType="axisLabel",M.value=d.rawLabel,ni(C).eventData=M}},this)},splitLine:function(n,e,t,i,r,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=[],d=0;d<i.length;d++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new Lo({shape:E6(t,a,i[d].coord)}))}for(var d=0;d<c.length;d++)n.add(m0(c[d],{style:qn({stroke:l[d%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(n,e,t,i,r,a){if(r.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<r.length;u++)for(var c=0;c<r[u].length;c++)l.push(new Lo({shape:E6(t,a,r[u][c].coord)}));n.add(m0(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(n,e,t,i,r,a){if(i.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=[],d=Math.PI/180,h=-i[0].coord*d,f=Math.min(a[0],a[1]),p=Math.max(a[0],a[1]),m=e.get("clockwise"),v=1,g=i.length;v<=g;v++){var _=v===g?i[0].coord:i[v].coord,S=u++%l.length;c[S]=c[S]||[],c[S].push(new ll({shape:{cx:t.cx,cy:t.cy,r0:f,r:p,startAngle:h,endAngle:-_*d,clockwise:m},silent:!0})),h=-_*d}for(var v=0;v<c.length;v++)n.add(m0(c[v],{style:qn({fill:l[v%l.length]},s.getAreaStyle()),silent:!0}))}}};const abe=ibe;var obe=["axisLine","axisTickLabel","axisName"],sbe=["splitLine","splitArea","minorSplitLine"],lbe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,i){if(this.group.removeAll(),!!t.get("show")){var r=this._axisGroup,a=this._axisGroup=new ei;this.group.add(a);var o=t.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),c=o.getMinorTicksCoords(),d=l.getExtent()[0],h=o.getExtent(),f=cbe(s,t,d),p=new Yc(t,f);ne(obe,p.add,p),a.add(p.getGroup()),S3(r,a,t),ne(sbe,function(m){t.get([m,"show"])&&!o.scale.isBlank()&&ube[m](this.group,t,s,d,h,u,c)},this)}},e.type="radiusAxis",e}(a1),ube={splitLine:function(n,e,t,i,r,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=t.getAngleAxis(),d=Math.PI/180,h=c.getExtent(),f=Math.abs(h[1]-h[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var p=[],m=0;m<a.length;m++){var v=u++%l.length;p[v]=p[v]||[],p[v].push(new e1[f]({shape:{cx:t.cx,cy:t.cy,r:Math.max(a[m].coord,0),startAngle:-h[0]*d,endAngle:-h[1]*d,clockwise:c.inverse}}))}for(var m=0;m<p.length;m++)n.add(m0(p[m],{style:qn({stroke:l[m%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(n,e,t,i,r,a,o){if(o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var d=0;d<o[c].length;d++)u.push(new zh({shape:{cx:t.cx,cy:t.cy,r:o[c][d].coord}}));n.add(m0(u,{style:qn({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(n,e,t,i,r,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=[],d=a[0].coord,h=1;h<a.length;h++){var f=u++%l.length;c[f]=c[f]||[],c[f].push(new ll({shape:{cx:t.cx,cy:t.cy,r0:d,r:a[h].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),d=a[h].coord}for(var h=0;h<c.length;h++)n.add(m0(c[h],{style:qn({fill:l[h%l.length]},s.getAreaStyle()),silent:!0}))}}};function cbe(n,e,t){return{position:[n.cx,n.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}const dbe=lbe;function LJ(n){return n.get("stack")||"__ec_stack_"+n.seriesIndex}function IJ(n,e){return e.dim+n.model.componentIndex}function hbe(n,e,t){var i={},r=fbe(dr(e.getSeriesByType(n),function(a){return!e.isSeriesFiltered(a)&&a.coordinateSystem&&a.coordinateSystem.type==="polar"}));e.eachSeriesByType(n,function(a){if(a.coordinateSystem.type==="polar"){var o=a.getData(),s=a.coordinateSystem,l=s.getBaseAxis(),u=IJ(s,l),c=LJ(a),d=r[u][c],h=d.offset,f=d.width,p=s.getOtherAxis(l),m=a.coordinateSystem.cx,v=a.coordinateSystem.cy,g=a.get("barMinHeight")||0,_=a.get("barMinAngle")||0;i[c]=i[c]||[];for(var S=o.mapDimension(p.dim),x=o.mapDimension(l.dim),A=Lh(o,S),C=l.dim!=="radius"||!a.get("roundCap",!0),M=p.model,I=M.get("startValue"),D=p.dataToCoord(I||0),E=0,P=o.count();E<P;E++){var F=o.get(S,E),V=o.get(x,E),G=F>=0?"p":"n",W=D;A&&(i[c][V]||(i[c][V]={p:D,n:D}),W=i[c][V][G]);var Y=void 0,Q=void 0,K=void 0,ae=void 0;if(p.dim==="radius"){var ie=p.dataToCoord(F)-D,he=l.dataToCoord(V);Math.abs(ie)<g&&(ie=(ie<0?-1:1)*g),Y=W,Q=W+ie,K=he-h,ae=K-f,A&&(i[c][V][G]=Q)}else{var Ee=p.dataToCoord(F,C)-D,He=l.dataToCoord(V);Math.abs(Ee)<_&&(Ee=(Ee<0?-1:1)*_),Y=He+h,Q=Y+f,K=W,ae=W+Ee,A&&(i[c][V][G]=ae)}o.setItemLayout(E,{cx:m,cy:v,r0:Y,r:Q,startAngle:-K*Math.PI/180,endAngle:-ae*Math.PI/180,clockwise:K>=ae})}}})}function fbe(n){var e={};ne(n,function(i,r){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=IJ(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),d=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=d.stacks;e[l]=d;var f=LJ(i);h[f]||d.autoWidthCount++,h[f]=h[f]||{width:0,maxWidth:0};var p=_n(i.get("barWidth"),c),m=_n(i.get("barMaxWidth"),c),v=i.get("barGap"),g=i.get("barCategoryGap");p&&!h[f].width&&(p=Math.min(d.remainedWidth,p),h[f].width=p,d.remainedWidth-=p),m&&(h[f].maxWidth=m),v!=null&&(d.gap=v),g!=null&&(d.categoryGap=g)});var t={};return ne(e,function(i,r){t[r]={};var a=i.stacks,o=i.bandWidth,s=_n(i.categoryGap,o),l=_n(i.gap,1),u=i.remainedWidth,c=i.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),ne(a,function(m,v){var g=m.maxWidth;g&&g<d&&(g=Math.min(g,u),m.width&&(g=Math.min(g,m.width)),u-=g,m.width=g,c--)}),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var h=0,f;ne(a,function(m,v){m.width||(m.width=d),f=m,h+=m.width*(1+l)}),f&&(h-=f.width*l);var p=-h/2;ne(a,function(m,v){t[r][v]=t[r][v]||{offset:p,width:m.width},p+=m.width*(1+l)})}),t}var pbe={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},vbe={splitNumber:5},mbe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e}(xa);function gbe(n){Ci(N3),a1.registerAxisPointerClass("PolarAxisPointer",USe),n.registerCoordinateSystem("polar",tbe),n.registerComponentModel(HSe),n.registerComponentView(mbe),yv(n,"angle",WSe,pbe),yv(n,"radius",jSe,vbe),n.registerComponentView(abe),n.registerComponentView(dbe),n.registerLayout(si(hbe,"bar"))}function _C(n,e){e=e||{};var t=n.coordinateSystem,i=n.axis,r={},a=i.position,o=i.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]}};r.position=[o==="vertical"?u.vertical[a]:l[0],o==="horizontal"?u.horizontal[a]:l[3]];var c={horizontal:0,vertical:1};r.rotation=Math.PI/2*c[o];var d={top:-1,bottom:1,right:1,left:-1};r.labelDirection=r.tickDirection=r.nameDirection=d[a],n.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),Ro(e.labelInside,n.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var h=e.rotate;return h==null&&(h=n.get(["axisLabel","rotate"])),r.labelRotation=a==="top"?-h:h,r.z2=1,r}var ybe=["axisLine","axisTickLabel","axisName"],_be=["splitArea","splitLine"],Sbe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,i,r,a){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new ei;var l=_C(t),u=new Yc(t,l);ne(ybe,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),ne(_be,function(c){t.get([c,"show"])&&bbe[c](this,this.group,this._axisGroup,t)},this),S3(s,this._axisGroup,t),n.prototype.render.call(this,t,i,r,a)},e.prototype.remove=function(){JK(this)},e.type="singleAxis",e}(a1),bbe={splitLine:function(n,e,t,i){var r=i.axis;if(!r.scale.isBlank()){var a=i.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=i.coordinateSystem.getRect(),c=r.isHorizontal(),d=[],h=0,f=r.getTicksCoords({tickModel:a}),p=[],m=[],v=0;v<f.length;++v){var g=r.toGlobalCoord(f[v].coord);c?(p[0]=g,p[1]=u.y,m[0]=g,m[1]=u.y+u.height):(p[0]=u.x,p[1]=g,m[0]=u.x+u.width,m[1]=g);var _=new Lo({shape:{x1:p[0],y1:p[1],x2:m[0],y2:m[1]},silent:!0});fv(_.shape,l);var S=h++%s.length;d[S]=d[S]||[],d[S].push(_)}for(var x=o.getLineStyle(["color"]),v=0;v<d.length;++v)e.add(m0(d[v],{style:qn({stroke:s[v%s.length]},x),silent:!0}))}},splitArea:function(n,e,t,i){ZK(n,t,i,i)}};const xbe=Sbe;var DJ=function(n){ot(e,n);function e(){var t=n!==null&&n.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}($i);Za(DJ,A3.prototype);const iw=DJ;var wbe=function(n){ot(e,n);function e(t,i,r,a,o){var s=n.call(this,t,i,r)||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,i){return this.coordinateSystem.pointToData(t)[0]},e}(ou);const Tbe=wbe;var NJ=["single"],Abe=function(){function n(e,t,i){this.type="single",this.dimension="single",this.dimensions=NJ,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,i)}return n.prototype._init=function(e,t,i){var r=this.dimension,a=new Tbe(r,q_(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},n.prototype.update=function(e,t){e.eachSeries(function(i){if(i.coordinateSystem===this){var r=i.getData();ne(r.mapDimensionsAll(this.dimension),function(a){this._axis.scale.unionExtentFromData(r,a)},this),mv(this._axis.scale,this._axis.model)}},this)},n.prototype.resize=function(e,t){this._rect=uo({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()},n.prototype.getRect=function(){return this._rect},n.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,i=t.isHorizontal(),r=i?[0,e.width]:[0,e.height],a=t.inverse?1:0;t.setExtent(r[a],r[1-a]),this._updateAxisTransform(t,i?e.x:e.y)},n.prototype._updateAxisTransform=function(e,t){var i=e.getExtent(),r=i[0]+i[1],a=e.isHorizontal();e.toGlobalCoord=a?function(o){return o+t}:function(o){return r-o+t},e.toLocalCoord=a?function(o){return o-t}:function(o){return r-o+t}},n.prototype.getAxis=function(){return this._axis},n.prototype.getBaseAxis=function(){return this._axis},n.prototype.getAxes=function(){return[this._axis]},n.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},n.prototype.containPoint=function(e){var t=this.getRect(),i=this.getAxis(),r=i.orient;return r==="horizontal"?i.contain(i.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:i.contain(i.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},n.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},n.prototype.dataToPoint=function(e){var t=this.getAxis(),i=this.getRect(),r=[],a=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),r[a]=t.toGlobalCoord(t.dataToCoord(+e)),r[1-a]=a===0?i.y+i.height/2:i.x+i.width/2,r},n.prototype.convertToPixel=function(e,t,i){var r=Ez(t);return r===this?this.dataToPoint(i):null},n.prototype.convertFromPixel=function(e,t,i){var r=Ez(t);return r===this?this.pointToData(i):null},n}();function Ez(n){var e=n.seriesModel,t=n.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Cbe(n,e){var t=[];return n.eachComponent("singleAxis",function(i,r){var a=new Abe(i,n,e);a.name="single_"+r,a.resize(i,e),i.coordinateSystem=a,t.push(a)}),n.eachSeries(function(i){if(i.get("coordinateSystem")==="singleAxis"){var r=i.getReferringComponents("singleAxis",Xa).models[0];i.coordinateSystem=r&&r.coordinateSystem}}),t}var Mbe={create:Cbe,dimensions:NJ};const Ebe=Mbe;var Pz=["x","y"],Pbe=["width","height"],Rbe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,r,a,o){var s=r.axis,l=s.coordinateSystem,u=rw(l,1-x8(s)),c=l.dataToPoint(i)[0],d=a.get("type");if(d&&d!=="none"){var h=BP(a),f=Lbe[d](s,c,u);f.style=h,t.graphicKey=f.type,t.pointer=f}var p=_C(r);CJ(i,t,p,r,a,o)},e.prototype.getHandleTransform=function(t,i,r){var a=_C(i,{labelInside:!1});a.labelMargin=r.get(["handle","margin"]);var o=zP(i.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,i,r,a){var o=r.axis,s=o.coordinateSystem,l=x8(o),u=rw(s,l),c=[t.x,t.y];c[l]+=i[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var d=rw(s,1-l),h=(d[1]+d[0])/2,f=[h,h];return f[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}},e}(OP),Lbe={line:function(n,e,t){var i=GP([e,t[0]],[e,t[1]],x8(n));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(n,e,t){var i=n.getBandWidth(),r=t[1]-t[0];return{type:"Rect",shape:MJ([e-i/2,t[0]],[i,r],x8(n))}}};function x8(n){return n.isHorizontal()?0:1}function rw(n,e){var t=n.getRect();return[t[Pz[e]],t[Pz[e]]+t[Pbe[e]]]}const Ibe=Rbe;var Dbe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(xa);function Nbe(n){Ci(N3),a1.registerAxisPointerClass("SingleAxisPointer",Ibe),n.registerComponentView(Dbe),n.registerComponentView(xbe),n.registerComponentModel(iw),yv(n,"single",iw,iw.defaultOption),n.registerCoordinateSystem("single",Ebe)}var kbe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i,r){var a=jv(t);n.prototype.init.apply(this,arguments),Rz(t,a)},e.prototype.mergeOption=function(t){n.prototype.mergeOption.apply(this,arguments),Rz(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}($i);function Rz(n,e){var t=n.cellSize,i;$t(t)?i=t:i=n.cellSize=[t,t],i.length===1&&(i[1]=i[0]);var r=Xt([0,1],function(a){return zpe(e,a)&&(i[a]="auto"),i[a]!=null&&i[a]!=="auto"});Rh(n,e,{type:"box",ignoreSize:r})}const Fbe=kbe;var Obe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a=this.group;a.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=i.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,i,r){for(var a=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=i.start.time;u<=i.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToRect([u],!1).tl,d=new Hi({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});r.add(d)}},e.prototype._renderLines=function(t,i,r,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 d=i.start,h=0;d.time<=i.end.time;h++){p(d.formatedDate),h===0&&(d=s.getDateInfo(i.start.y+"-"+i.start.m));var f=d.date;f.setMonth(f.getMonth()+1),d=s.getDateInfo(f)}p(s.getNextNDay(i.end.time,1).formatedDate);function p(m){o._firstDayOfMonth.push(s.getDateInfo(m)),o._firstDayPoints.push(s.dataToRect([m],!1).tl);var v=o._getLinePointsOfOneWeek(t,m,r);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,r),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,r),l,a)},e.prototype._getEdgesPoints=function(t,i,r){var a=[t[0].slice(),t[t.length-1].slice()],o=r==="horizontal"?0:1;return a[0][o]=a[0][o]-i/2,a[1][o]=a[1][o]+i/2,a},e.prototype._drawSplitline=function(t,i,r){var a=new hl({z2:20,shape:{points:t},style:i});r.add(a)},e.prototype._getLinePointsOfOneWeek=function(t,i,r){for(var a=t.coordinateSystem,o=a.getDateInfo(i),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[r==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,i){return xn(t)&&t?Fpe(t,i):$n(t)?t(i):i.nameMap},e.prototype._yearTextPositionControl=function(t,i,r,a,o){var s=i[0],l=i[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,i,r,a){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=r!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,d=(u[0][1]+u[1][1])/2,h=r==="horizontal"?0:1,f={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],d],right:[u[h][0],d]},p=i.start.y;+i.end.y>+i.start.y&&(p=p+"-"+i.end.y);var m=o.get("formatter"),v={start:i.start.y,end:i.end.y,nameMap:p},g=this._formatterLabel(m,v),_=new Xi({z2:30,style:qr(o,{text:g}),silent:o.get("silent")});_.attr(this._yearTextPositionControl(_,f[l],r,l,s)),a.add(_)}},e.prototype._monthTextPositionControl=function(t,i,r,a,o){var s="left",l="top",u=t[0],c=t[1];return r==="horizontal"?(c=c+o,i&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,i&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,i,r,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"),d=[this._tlpoints,this._blpoints];(!s||xn(s))&&(s&&(i=PA(s)||i),s=i.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,f=r==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",m=o.get("silent"),v=0;v<d[h].length-1;v++){var g=d[h][v].slice(),_=this._firstDayOfMonth[v];if(p){var S=this._firstDayPoints[v];g[f]=(S[f]+d[0][v+1][f])/2}var x=o.get("formatter"),A=s[+_.m-1],C={yyyy:_.y,yy:(_.y+"").slice(2),MM:_.m,M:+_.m,nameMap:A},M=this._formatterLabel(x,C),I=new Xi({z2:30,style:It(qr(o,{text:M}),this._monthTextPositionControl(g,p,r,u,l)),silent:m});a.add(I)}}},e.prototype._weekTextPositionControl=function(t,i,r,a,o){var s="center",l="middle",u=t[0],c=t[1],d=r==="start";return i==="horizontal"?(u=u+a+(d?1:-1)*o[0]/2,s=d?"right":"left"):(c=c+a+(d?1:-1)*o[1]/2,l=d?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,i,r,a,o){var s=t.getModel("dayLabel");if(s.get("show")){var l=t.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),d=s.get("margin"),h=l.getFirstDayOfWeek();if(!c||xn(c)){c&&(i=PA(c)||i);var f=i.get(["time","dayOfWeekShort"]);c=f||Xt(i.get(["time","dayOfWeekAbbr"]),function(C){return C[0]})}var p=l.getNextNDay(r.end.time,7-r.lweek).time,m=[l.getCellWidth(),l.getCellHeight()];d=_n(d,Math.min(m[1],m[0])),u==="start"&&(p=l.getNextNDay(r.start.time,-(7+r.fweek)).time,d=-d);for(var v=s.get("silent"),g=0;g<7;g++){var _=l.getNextNDay(p,g),S=l.dataToRect([_.time],!1).center,x=g;x=Math.abs((g+h)%7);var A=new Xi({z2:30,style:It(qr(s,{text:c[x]}),this._weekTextPositionControl(S,a,u,d,m)),silent:v});o.add(A)}}},e.type="calendar",e}(xa);const Bbe=Obe;var aw=864e5,zbe=function(){function n(e,t,i){this.type="calendar",this.dimensions=n.dimensions,this.getDimensionsInfo=n.getDimensionsInfo,this._model=e}return n.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},n.prototype.getRangeInfo=function(){return this._rangeInfo},n.prototype.getModel=function(){return this._model},n.prototype.getRect=function(){return this._rect},n.prototype.getCellWidth=function(){return this._sw},n.prototype.getCellHeight=function(){return this._sh},n.prototype.getOrient=function(){return this._orient},n.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},n.prototype.getDateInfo=function(e){e=Ju(e);var t=e.getFullYear(),i=e.getMonth()+1,r=i<10?"0"+i:""+i,a=e.getDate(),o=a<10?"0"+a:""+a,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:r,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+r+"-"+o,date:e}},n.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))},n.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 i=this._rangeInfo.weeks||1,r=["width","height"],a=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[i,7]:[7,i];ne([0,1],function(d){c(a,d)&&(o[r[d]]=a[d]*s[d])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=uo(o,l);ne([0,1],function(d){c(a,d)||(a[d]=u[r[d]]/s[d])});function c(d,h){return d[h]!=null&&d[h]!=="auto"}this._sw=a[0],this._sh=a[1]},n.prototype.dataToPoint=function(e,t){$t(e)&&(e=e[0]),t==null&&(t=!0);var i=this.getDateInfo(e),r=this._rangeInfo,a=i.formatedDate;if(t&&!(i.time>=r.start.time&&i.time<r.end.time+aw))return[NaN,NaN];var o=i.day,s=this._getRangeInfo([r.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]},n.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},n.prototype.dataToRect=function(e,t){var i=this.dataToPoint(e,t);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},n.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,i=Math.floor((e[1]-this._rect.y)/this._sh)+1,r=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(i,t-1,r):this._getDateByWeeksAndDay(t,i-1,r)},n.prototype.convertToPixel=function(e,t,i){var r=Lz(t);return r===this?r.dataToPoint(i):null},n.prototype.convertFromPixel=function(e,t,i){var r=Lz(t);return r===this?r.pointToData(i):null},n.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},n.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if($t(e)&&e.length===1&&(e=e[0]),$t(e))t=e;else{var i=e.toString();if(/^\d{4}$/.test(i)&&(t=[i+"-01-01",i+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(i)){var r=this.getDateInfo(i),a=r.date;a.setMonth(a.getMonth()+1);var o=this.getNextNDay(a,-1);t=[r.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(i)&&(t=[i,i])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},n.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],i;t[0].time>t[1].time&&(i=!0,t.reverse());var r=Math.floor(t[1].time/aw)-Math.floor(t[0].time/aw)+1,a=new Date(t[0].time),o=a.getDate(),s=t[1].date.getDate();a.setDate(o+r-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;)r-=u,a.setDate(l-u);var c=Math.floor((r+t[0].day+6)/7),d=i?-c+1:c-1;return i&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:c,nthWeek:d,fweek:t[0].day,lweek:t[1].day}},n.prototype._getDateByWeeksAndDay=function(e,t,i){var r=this._getRangeInfo(i);if(e>r.weeks||e===0&&t<r.fweek||e===r.weeks&&t>r.lweek)return null;var a=(e-1)*7-r.fweek+t,o=new Date(r.start.time);return o.setDate(+r.start.d+a),this.getDateInfo(o)},n.create=function(e,t){var i=[];return e.eachComponent("calendar",function(r){var a=new n(r);i.push(a),r.coordinateSystem=a}),e.eachSeries(function(r){r.get("coordinateSystem")==="calendar"&&(r.coordinateSystem=i[r.get("calendarIndex")||0])}),i},n.dimensions=["time","value"],n}();function Lz(n){var e=n.calendarModel,t=n.seriesModel,i=e?e.coordinateSystem:t?t.coordinateSystem:null;return i}const Gbe=zbe;function Ube(n){n.registerComponentModel(Fbe),n.registerComponentView(Bbe),n.registerCoordinateSystem("calendar",Gbe)}function Vbe(n,e){var t=n.existing;if(e.id=n.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var i=e.parentOption;i?e.parentId=i.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function Iz(n,e){var t;return ne(e,function(i){n[i]!=null&&n[i]!=="auto"&&(t=!0)}),t}function Hbe(n,e,t){var i=It({},t),r=n[e],a=t.$action||"merge";a==="merge"?r?(ui(r,i,!0),Rh(r,i,{ignoreSize:!0}),mX(t,r),R6(t,r),R6(t,r,"shape"),R6(t,r,"style"),R6(t,r,"extra"),t.clipPath=r.clipPath):n[e]=i:a==="replace"?n[e]=i:a==="remove"&&r&&(n[e]=null)}var kJ=["transition","enterFrom","leaveTo"],Wbe=kJ.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function R6(n,e,t){if(t&&(!n[t]&&e[t]&&(n[t]={}),n=n[t],e=e[t]),!(!n||!e))for(var i=t?kJ:Wbe,r=0;r<i.length;r++){var a=i[r];n[a]==null&&e[a]!=null&&(n[a]=e[a])}}function jbe(n,e){if(n&&(n.hv=e.hv=[Iz(e,["left","right"]),Iz(e,["top","bottom"])],n.type==="group")){var t=n,i=e;t.width==null&&(t.width=i.width=0),t.height==null&&(t.height=i.height=0)}}var $be=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,i){var r=this.option.elements;this.option.elements=null,n.prototype.mergeOption.call(this,t,i),this.option.elements=r},e.prototype.optionUpdated=function(t,i){var r=this.option,a=(i?r:t).elements,o=r.elements=i?[]:r.elements,s=[];this._flatten(a,s,null);var l=Q$(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];ne(l,function(c,d){var h=c.newOption;h&&(u.push(h),Vbe(c,h),Hbe(o,d,h),jbe(o[d],h))},this),r.elements=dr(o,function(c){return c&&delete c.$action,c!=null})},e.prototype._flatten=function(t,i,r){ne(t,function(a){if(a){r&&(a.parentOption=r),i.push(a);var o=a.children;o&&o.length&&this._flatten(o,i,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}($i),Dz={path:null,compoundPath:null,group:ei,image:qo,text:Xi},c0=Gi(),qbe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=In()},e.prototype.render=function(t,i,r){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,r)},e.prototype._updateElements=function(t){var i=t.useElOptionsToUpdate();if(i){var r=this._elMap,a=this.group,o=t.get("z"),s=t.get("zlevel");ne(i,function(l){var u=lo(l.id,null),c=u!=null?r.get(u):null,d=lo(l.parentId,null),h=d!=null?r.get(d):a,f=l.type,p=l.style;f==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var m=l.textContent,v=l.textConfig;if(p&&pJ(p,f,!!v,!!m)){var g=vJ(p,f,!0);!v&&g.textConfig&&(v=l.textConfig=g.textConfig),!m&&g.textContent&&(m=g.textContent)}var _=Xbe(l),S=l.$action||"merge",x=S==="merge",A=S==="replace";if(x){var C=!c,M=c;C?M=Nz(u,h,l.type,r):(M&&(c0(M).isNew=!1),_J(M)),M&&(c5(M,_,t,{isInit:C}),kz(M,l,o,s))}else if(A){h5(c,l,r,t);var I=Nz(u,h,l.type,r);I&&(c5(I,_,t,{isInit:!0}),kz(I,l,o,s))}else S==="remove"&&(gJ(c,l),h5(c,l,r,t));var D=r.get(u);if(D&&m)if(x){var E=D.getTextContent();E?E.attr(m):D.setTextContent(new Xi(m))}else A&&D.setTextContent(new Xi(m));if(D){var P=l.clipPath;if(P){var F=P.type,V=void 0,C=!1;if(x){var G=D.getClipPath();C=!G||c0(G).type!==F,V=C?SC(F):G}else A&&(C=!0,V=SC(F));D.setClipPath(V),c5(V,P,t,{isInit:C}),S8(V,P.keyframeAnimation,t)}var W=c0(D);D.setTextConfig(v),W.option=l,Ybe(D,t,l),Qp({el:D,componentModel:t,itemName:D.name,itemTooltipOption:l.tooltip}),S8(D,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,i){for(var r=t.option.elements,a=this.group,o=this._elMap,s=i.getWidth(),l=i.getHeight(),u=["x","y"],c=0;c<r.length;c++){var d=r[c],h=lo(d.id,null),f=h!=null?o.get(h):null;if(!(!f||!f.isGroup)){var p=f.parent,m=p===a,v=c0(f),g=c0(p);v.width=_n(v.option.width,m?s:g.width)||0,v.height=_n(v.option.height,m?l:g.height)||0}}for(var c=r.length-1;c>=0;c--){var d=r[c],h=lo(d.id,null),f=h!=null?o.get(h):null;if(f){var p=f.parent,g=c0(p),_=p===a?{width:s,height:l}:{width:g.width,height:g.height},S={},x=O_(f,d,_,null,{hv:d.hv,boundingMode:d.bounding},S);if(!c0(f).isNew&&x){for(var A=d.transition,C={},M=0;M<u.length;M++){var I=u[M],D=S[I];A&&(Ep(A)||xi(A,I)>=0)?C[I]=D:f[I]=D}Qi(f,C,t,0)}else f.attr(S)}}},e.prototype._clear=function(){var t=this,i=this._elMap;i.each(function(r){h5(r,c0(r).option,i,t._lastGraphicModel)}),this._elMap=In()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(xa);function SC(n){var e=Mn(Dz,n)?Dz[n]:SE(n),t=new e({});return c0(t).type=n,t}function Nz(n,e,t,i){var r=SC(t);return e.add(r),i.set(n,r),c0(r).id=n,c0(r).isNew=!0,r}function h5(n,e,t,i){var r=n&&n.parent;r&&(n.type==="group"&&n.traverse(function(a){h5(a,e,t,i)}),e7(n,e,i),t.removeKey(c0(n).id))}function kz(n,e,t,i){n.isGroup||ne([["cursor",M0.prototype.cursor],["zlevel",i||0],["z",t||0],["z2",0]],function(r){var a=r[0];Mn(e,a)?n[a]=ai(e[a],r[1]):n[a]==null&&(n[a]=r[1])}),ne(Li(e),function(r){if(r.indexOf("on")===0){var a=e[r];n[r]=$n(a)?a:null}}),Mn(e,"draggable")&&(n.draggable=e.draggable),e.name!=null&&(n.name=e.name),e.id!=null&&(n.id=e.id)}function Xbe(n){return n=It({},n),ne(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(vX),function(e){delete n[e]}),n}function Ybe(n,e,t){var i=ni(n).eventData;!n.silent&&!n.ignore&&!i&&(i=ni(n).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:n.name}),i&&(i.info=t.info)}function Kbe(n){n.registerComponentModel($be),n.registerComponentView(qbe),n.registerPreprocessor(function(e){var t=e.graphic;$t(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Fz=["x","y","radius","angle","single"],Zbe=["cartesian2d","polar","singleAxis"];function Jbe(n){var e=n.get("coordinateSystem");return xi(Zbe,e)>=0}function lh(n){return n+"Axis"}function Qbe(n,e){var t=In(),i=[],r=In();n.eachComponent({mainType:"dataZoom",query:e},function(c){r.get(c.uid)||s(c)});var a;do a=!1,n.eachComponent("dataZoom",o);while(a);function o(c){!r.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){r.set(c.uid,!0),i.push(c),u(c)}function l(c){var d=!1;return c.eachTargetAxis(function(h,f){var p=t.get(h);p&&p[f]&&(d=!0)}),d}function u(c){c.eachTargetAxis(function(d,h){(t.get(d)||t.set(d,[]))[h]=!0})}return i}function FJ(n){var e=n.ecModel,t={infoList:[],infoMap:In()};return n.eachTargetAxis(function(i,r){var a=e.getComponent(lh(i),r);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 ow=function(){function n(){this.indexList=[],this.indexMap=[]}return n.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},n}(),exe=function(n){ot(e,n);function e(){var t=n!==null&&n.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,i,r){var a=Oz(t);this.settledOption=a,this.mergeDefaultAndTheme(t,r),this._doInit(a)},e.prototype.mergeOption=function(t){var i=Oz(t);ui(this.option,t,!0),ui(this.settledOption,i,!0),this._doInit(i)},e.prototype._doInit=function(t){var i=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var r=this.settledOption;ne([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(i[a[0]]=r[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),i=this._targetAxisInfoMap=In(),r=this._fillSpecifiedTargetAxis(i);r?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var i=!1;return ne(Fz,function(r){var a=this.getReferringComponents(lh(r),mhe);if(a.specified){i=!0;var o=new ow;ne(a.models,function(s){o.add(s.componentIndex)}),t.set(r,o)}},this),i},e.prototype._fillAutoTargetAxisByOrient=function(t,i){var r=this.ecModel,a=!0;if(a){var o=i==="vertical"?"y":"x",s=r.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=r.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===i}});l(s,"single")}function l(u,c){var d=u[0];if(d){var h=new ow;if(h.add(d.componentIndex),t.set(c,h),a=!1,c==="x"||c==="y"){var f=d.getReferringComponents("grid",Xa).models[0];f&&ne(u,function(p){d.componentIndex!==p.componentIndex&&f===p.getReferringComponents("grid",Xa).models[0]&&h.add(p.componentIndex)})}}}a&&ne(Fz,function(u){if(a){var c=r.findComponents({mainType:lh(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var d=new ow;d.add(c[0].componentIndex),t.set(u,d),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(i){!t&&(t=i)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var i=this._rangePropMode,r=this.get("rangeMode");ne([["start","startValue"],["end","endValue"]],function(a,o){var s=t[a[0]]!=null,l=t[a[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":r?i[o]=r[o]:s&&(i[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(i,r){t==null&&(t=this.ecModel.getComponent(lh(i),r))},this),t},e.prototype.eachTargetAxis=function(t,i){this._targetAxisInfoMap.each(function(r,a){ne(r.indexList,function(o){t.call(i,a,o)})})},e.prototype.getAxisProxy=function(t,i){var r=this.getAxisModel(t,i);if(r)return r.__dzAxisProxy},e.prototype.getAxisModel=function(t,i){var r=this._targetAxisInfoMap.get(t);if(r&&r.indexMap[i])return this.ecModel.getComponent(lh(t),i)},e.prototype.setRawRange=function(t){var i=this.option,r=this.settledOption;ne([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(i[a[0]]=r[a[0]]=t[a[0]],i[a[1]]=r[a[1]]=t[a[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var i=this.option;ne(["start","startValue","end","endValue"],function(r){i[r]=t[r]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,i){if(t==null&&i==null){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataValueWindow()}else return this.getAxisProxy(t,i).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var i,r=this._targetAxisInfoMap.keys(),a=0;a<r.length;a++)for(var o=r[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;i||(i=u)}return i},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}($i);function Oz(n){var e={};return ne(["start","end","startValue","endValue","throttle"],function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e}const q9=exe;var txe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(q9);const nxe=txe;var ixe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r,a){this.dataZoomModel=t,this.ecModel=i,this.api=r},e.type="dataZoom",e}(xa);const WP=ixe;var rxe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(WP);const axe=rxe;var b2=ne,Bz=x0,oxe=function(){function n(e,t,i,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=i}return n.prototype.hostedBy=function(e){return this._dataZoomModel===e},n.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},n.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},n.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(Jbe(t)){var i=lh(this._dimName),r=t.getReferringComponents(i,Xa).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}},this),e},n.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},n.prototype.getMinMaxSpan=function(){return Zn(this._minMaxSpan)},n.prototype.calculateDataWindow=function(e){var t=this._dataExtent,i=this.getAxisModel(),r=i.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;b2(["start","end"],function(h,f){var p=e[h],m=e[h+"Value"];a[f]==="percent"?(p==null&&(p=o[f]),m=r.parse(pr(p,o,t))):(u=!0,m=m==null?t[f]:r.parse(m),p=pr(m,t,o)),l[f]=m==null||isNaN(m)?t[f]:m,s[f]=p==null||isNaN(p)?o[f]:p}),Bz(l),Bz(s);var c=this._minMaxSpan;u?d(l,s,t,o,!1):d(s,l,o,t,!0);function d(h,f,p,m,v){var g=v?"Span":"ValueSpan";o1(0,h,p,"all",c["min"+g],c["max"+g]);for(var _=0;_<2;_++)f[_]=pr(h[_],p,m,!0),v&&(f[_]=r.parse(f[_]))}return{valueWindow:l,percentWindow:s}},n.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=sxe(this,this._dimName,t),this._updateMinMaxSpan();var i=this.calculateDataWindow(e.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,this._setAxisModel()}},n.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var i=this._dimName,r=this.getTargetSeriesModels(),a=e.get("filterMode"),o=this._valueWindow;if(a==="none")return;b2(r,function(l){var u=l.getData(),c=u.mapDimensionsAll(i);if(c.length){if(a==="weakFilter"){var d=u.getStore(),h=Xt(c,function(f){return u.getDimensionIndex(f)},u);u.filterSelf(function(f){for(var p,m,v,g=0;g<c.length;g++){var _=d.get(h[g],f),S=!isNaN(_),x=_<o[0],A=_>o[1];if(S&&!x&&!A)return!0;S&&(v=!0),x&&(p=!0),A&&(m=!0)}return v&&p&&m})}else b2(c,function(f){if(a==="empty")l.setData(u=u.map(f,function(m){return s(m)?m:NaN}));else{var p={};p[f]=o,u.selectRange(p)}});b2(c,function(f){u.setApproximateExtent(o,f)})}});function s(l){return l>=o[0]&&l<=o[1]}},n.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,i=this._dataExtent;b2(["min","max"],function(r){var a=t.get(r+"Span"),o=t.get(r+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=pr(i[0]+o,i,[0,100],!0):a!=null&&(o=pr(a,[0,100],i,!0)-i[0]),e[r+"Span"]=a,e[r+"ValueSpan"]=o},this)},n.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,i=this._valueWindow;if(t){var r=j$(i,[0,500]);r=Math.min(r,20);var a=e.axis.scale.rawExtentInfo;t[0]!==0&&a.setDeterminedMinMax("min",+i[0].toFixed(r)),t[1]!==100&&a.setDeterminedMinMax("max",+i[1].toFixed(r)),a.freeze()}},n}();function sxe(n,e,t){var i=[1/0,-1/0];b2(t,function(o){Pme(i,o.getData(),e)});var r=n.getAxisModel(),a=KY(r.axis.scale,r,i).calculate();return[a.min,a.max]}const lxe=oxe;var uxe={getTargetSeries:function(n){function e(r){n.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=n.getComponent(lh(o),s);r(o,s,l,a)})})}e(function(r,a,o,s){o.__dzAxisProxy=null});var t=[];e(function(r,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new lxe(r,a,s,n),t.push(o.__dzAxisProxy))});var i=In();return ne(t,function(r){ne(r.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(n,e){n.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(i,r){t.getAxisProxy(i,r).reset(t)}),t.eachTargetAxis(function(i,r){t.getAxisProxy(i,r).filterData(t,e)})}),n.eachComponent("dataZoom",function(t){var i=t.findRepresentativeAxisProxy();if(i){var r=i.getDataPercentWindow(),a=i.getDataValueWindow();t.setCalculatedRange({start:r[0],end:r[1],startValue:a[0],endValue:a[1]})}})}};const cxe=uxe;function dxe(n){n.registerAction("dataZoom",function(e,t){var i=Qbe(t,e);ne(i,function(r){r.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var zz=!1;function jP(n){zz||(zz=!0,n.registerProcessor(n.PRIORITY.PROCESSOR.FILTER,cxe),dxe(n),n.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function hxe(n){n.registerComponentModel(nxe),n.registerComponentView(axe),jP(n)}var f0=function(){function n(){}return n}(),OJ={};function x2(n,e){OJ[n]=e}function BJ(n){return OJ[n]}var fxe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){n.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;ne(this.option.feature,function(i,r){var a=BJ(r);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(t)),ui(i,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}($i);const pxe=fxe;function vxe(n,e,t){var i=e.getBoxLayoutParams(),r=e.get("padding"),a={width:t.getWidth(),height:t.getHeight()},o=uo(i,a,r);Ap(e.get("orient"),n,e.get("itemGap"),o.width,o.height),O_(n,i,a,r)}function zJ(n,e){var t=Wv(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),n=new Hi({shape:{x:n.x-t[3],y:n.y-t[0],width:n.width+t[1]+t[3],height:n.height+t[0]+t[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1}),n}var mxe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.render=function(t,i,r,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={}),d=[];ne(u,function(p,m){d.push(m)}),new Xc(this._featureNames||[],d).add(h).update(h).remove(si(h,null)).execute(),this._featureNames=d;function h(p,m){var v=d[p],g=d[m],_=u[v],S=new Xr(_,t,t.ecModel),x;if(a&&a.newTitle!=null&&a.featureName===v&&(_.title=a.newTitle),v&&!g){if(gxe(v))x={onclick:S.option.onclick,featureName:v};else{var A=BJ(v);if(!A)return;x=new A}c[v]=x}else if(x=c[g],!x)return;x.uid=Hv("toolbox-feature"),x.model=S,x.ecModel=i,x.api=r;var C=x instanceof f0;if(!v&&g){C&&x.dispose&&x.dispose(i,r);return}if(!S.get("show")||C&&x.unusable){C&&x.remove&&x.remove(i,r);return}f(S,x,v),S.setIconStatus=function(M,I){var D=this.option,E=this.iconPaths;D.iconStatus=D.iconStatus||{},D.iconStatus[M]=I,E[M]&&(I==="emphasis"?$c:qc)(E[M])},x instanceof f0&&x.render&&x.render(S,i,r,a)}function f(p,m,v){var g=p.getModel("iconStyle"),_=p.getModel(["emphasis","iconStyle"]),S=m instanceof f0&&m.getIcons?m.getIcons():p.get("icon"),x=p.get("title")||{},A,C;xn(S)?(A={},A[v]=S):A=S,xn(x)?(C={},C[v]=x):C=x;var M=p.iconPaths={};ne(A,function(I,D){var E=b3(I,{},{x:-s/2,y:-s/2,width:s,height:s});E.setStyle(g.getItemStyle());var P=E.ensureState("emphasis");P.style=_.getItemStyle();var F=new Xi({style:{text:C[D],align:_.get("textAlign"),borderRadius:_.get("textBorderRadius"),padding:_.get("textPadding"),fill:null,font:bE({fontStyle:_.get("textFontStyle"),fontFamily:_.get("textFontFamily"),fontSize:_.get("textFontSize"),fontWeight:_.get("textFontWeight")},i)},ignore:!0});E.setTextContent(F),Qp({el:E,componentModel:t,itemName:D,formatterParamsExtra:{title:C[D]}}),E.__title=C[D],E.on("mouseover",function(){var V=_.getItemStyle(),G=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";F.setStyle({fill:_.get("textFill")||V.fill||V.stroke||"#000",backgroundColor:_.get("textBackgroundColor")}),E.setTextConfig({position:_.get("textPosition")||G}),F.ignore=!t.get("showTitle"),r.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",D])!=="emphasis"&&r.leaveEmphasis(this),F.hide()}),(p.get(["iconStatus",D])==="emphasis"?$c:qc)(E),o.add(E),E.on("click",An(m.onclick,m,i,r,D)),M[D]=E})}vxe(o,t,r),o.add(zJ(o.getBoundingRect(),t)),l||o.eachChild(function(p){var m=p.__title,v=p.ensureState("emphasis"),g=v.textConfig||(v.textConfig={}),_=p.getTextContent(),S=_&&_.ensureState("emphasis");if(S&&!$n(S)&&m){var x=S.style||(S.style={}),A=g3(m,Xi.makeFont(x)),C=p.x+o.x,M=p.y+o.y+s,I=!1;M+A.height>r.getHeight()&&(g.position="top",I=!0);var D=I?-5-A.height:s+10;C+A.width/2>r.getWidth()?(g.position=["100%",D],x.align="right"):C-A.width/2<0&&(g.position=[0,D],x.align="left")}})},e.prototype.updateView=function(t,i,r,a){ne(this._features,function(o){o instanceof f0&&o.updateView&&o.updateView(o.model,i,r,a)})},e.prototype.remove=function(t,i){ne(this._features,function(r){r instanceof f0&&r.remove&&r.remove(t,i)}),this.group.removeAll()},e.prototype.dispose=function(t,i){ne(this._features,function(r){r instanceof f0&&r.dispose&&r.dispose(t,i)})},e.type="toolbox",e}(xa);function gxe(n){return n.indexOf("my")===0}const yxe=mxe;var _xe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){var r=this.model,a=r.get("name")||t.get("title.0.text")||"echarts",o=i.getZr().painter.getType()==="svg",s=o?"svg":r.get("type",!0)||"png",l=i.getConnectedDataURL({type:s,backgroundColor:r.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:r.get("connectedBackgroundColor"),excludeComponents:r.get("excludeComponents"),pixelRatio:r.get("pixelRatio")}),u=qi.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 d=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(d)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),f=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[1];f&&(p=window.atob(p));var m=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var v=p.length,g=new Uint8Array(v);v--;)g[v]=p.charCodeAt(v);var _=new Blob([g]);window.navigator.msSaveOrOpenBlob(_,m)}else{var S=document.createElement("iframe");document.body.appendChild(S);var x=S.contentWindow,A=x.document;A.open("image/svg+xml","replace"),A.write(p),A.close(),x.focus(),A.execCommand("SaveAs",!0,m),document.body.removeChild(S)}}else{var C=r.get("lang"),M='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(C&&C[0]||"")+'" /></body>',I=window.open();I.document.write(M),I.document.title=a}},e.getDefaultOption=function(t){var i={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 i},e}(f0);const Sxe=_xe;var Gz="__ec_magicType_stack__",bxe=[["line","bar"],["stack"]],xxe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,i=t.get("icon"),r={};return ne(t.get("type"),function(a){i[a]&&(r[a]=i[a])}),r},e.getDefaultOption=function(t){var i={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 i},e.prototype.onclick=function(t,i,r){var a=this.model,o=a.get(["seriesIndex",r]);if(Uz[r]){var s={series:[]},l=function(d){var h=d.subType,f=d.id,p=Uz[r](h,f,d,a);p&&(qn(p,d.option),s.series.push(p));var m=d.coordinateSystem;if(m&&m.type==="cartesian2d"&&(r==="line"||r==="bar")){var v=m.getAxesByScale("ordinal")[0];if(v){var g=v.dim,_=g+"Axis",S=d.getReferringComponents(_,Xa).models[0],x=S.componentIndex;s[_]=s[_]||[];for(var A=0;A<=x;A++)s[_][x]=s[_][x]||{};s[_][x].boundaryGap=r==="bar"}}};ne(bxe,function(d){xi(d,r)>=0&&ne(d,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(r,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=r;r==="stack"&&(u=ui({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",r])!=="emphasis"&&(c="tiled")),i.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(f0),Uz={line:function(n,e,t,i){if(n==="bar")return ui({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(n,e,t,i){if(n==="line")return ui({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(n,e,t,i){var r=t.get("stack")===Gz;if(n==="line"||n==="bar")return i.setIconStatus("stack",r?"normal":"emphasis"),ui({id:e,stack:r?"":Gz},i.get(["option","stack"])||{},!0)}};nc({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(n,e){e.mergeOption(n.newOption)});const wxe=xxe;var t7=new Array(60).join("-"),bv=" ";function Txe(n){var e={},t=[],i=[];return n.eachRawSeries(function(r){var a=r.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:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(r)}else t.push(r)}else t.push(r)}),{seriesGroupByCategoryAxis:e,other:t,meta:i}}function Axe(n){var e=[];return ne(n,function(t,i){var r=t.categoryAxis,a=t.valueAxis,o=a.dim,s=[" "].concat(Xt(t.series,function(f){return f.name})),l=[r.model.getCategories()];ne(t.series,function(f){var p=f.getRawData();l.push(f.getRawData().mapArray(p.mapDimension(o),function(m){return m}))});for(var u=[s.join(bv)],c=0;c<l[0].length;c++){for(var d=[],h=0;h<l.length;h++)d.push(l[h][c]);u.push(d.join(bv))}e.push(u.join(`
`))}),e.join(`
`+t7+`
`)}function Cxe(n){return Xt(n,function(e){var t=e.getRawData(),i=[e.name],r=[];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++)r[l]=arguments[l];i.push((s?s+bv:"")+r.join(bv))}),i.join(`
`)}).join(`
`+t7+`
`)}function Mxe(n){var e=Txe(n);return{value:dr([Axe(e.seriesGroupByCategoryAxis),Cxe(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
`+t7+`
`),meta:e.meta}}function w8(n){return n.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Exe(n){var e=n.slice(0,n.indexOf(`
`));if(e.indexOf(bv)>=0)return!0}var bC=new RegExp("["+bv+"]+","g");function Pxe(n){for(var e=n.split(/\n+/g),t=w8(e.shift()).split(bC),i=[],r=Xt(t,function(l){return{name:l,data:[]}}),a=0;a<e.length;a++){var o=w8(e[a]).split(bC);i.push(o.shift());for(var s=0;s<o.length;s++)r[s]&&(r[s].data[a]=o[s])}return{series:r,categories:i}}function Rxe(n){for(var e=n.split(/\n+/g),t=w8(e.shift()),i=[],r=0;r<e.length;r++){var a=w8(e[r]);if(a){var o=a.split(bC),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),i[r]={name:s,value:[]},l=i[r].value):l=i[r]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?i[r].value=l[0]:i[r]=l[0])}}return{name:t,data:i}}function Lxe(n,e){var t=n.split(new RegExp(`
*`+t7+`
*`,"g")),i={series:[]};return ne(t,function(r,a){if(Exe(r)){var o=Pxe(r),s=e[a],l=s.axisDim+"Axis";s&&(i[l]=i[l]||[],i[l][s.axisIndex]={data:o.categories},i.series=i.series.concat(o.series))}else{var o=Rxe(r);i.series.push(o)}}),i}var Ixe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){setTimeout(function(){i.dispatchAction({type:"hideTip"})});var r=i.getDom(),a=this.model;this._dom&&r.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 d=a.get("optionToContent"),h=a.get("contentToOption"),f=Mxe(t);if($n(d)){var p=d(i.getOption());xn(p)?u.innerHTML=p:hv(p)&&u.appendChild(p)}else{c.readOnly=a.get("readOnly");var m=c.style;m.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",m.color=a.get("textColor"),m.borderColor=a.get("textareaBorderColor"),m.backgroundColor=a.get("textareaColor"),c.value=f.value,u.appendChild(c)}var v=f.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:5px;left:0;right:0";var _="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",S=document.createElement("div"),x=document.createElement("div");_+=";background-color:"+a.get("buttonColor"),_+=";color:"+a.get("buttonTextColor");var A=this;function C(){r.removeChild(o),A._dom=null}eA(S,"click",C),eA(x,"click",function(){if(h==null&&d!=null||h!=null&&d==null){C();return}var M;try{$n(h)?M=h(u,i.getOption()):M=Lxe(c.value,v)}catch(I){throw C(),new Error("Data view format error "+I)}M&&i.dispatchAction({type:"changeDataView",newOption:M}),C()}),S.innerHTML=l[1],x.innerHTML=l[2],x.style.cssText=S.style.cssText=_,!a.get("readOnly")&&g.appendChild(x),g.appendChild(S),o.appendChild(s),o.appendChild(u),o.appendChild(g),u.style.height=r.clientHeight-80+"px",r.appendChild(o),this._dom=o},e.prototype.remove=function(t,i){this._dom&&i.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,i){this.remove(t,i)},e.getDefaultOption=function(t){var i={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 i},e}(f0);function Dxe(n,e){return Xt(n,function(t,i){var r=e&&e[i];if(Kn(r)&&!$t(r)){var a=Kn(t)&&!$t(t);a||(t={value:t});var o=r.name!=null&&t.name==null;return t=qn(t,r),o&&delete t.name,t}else return t})}nc({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(n,e){var t=[];ne(n.newOption.series,function(i){var r=e.getSeriesByName(i.name)[0];if(!r)t.push(It({type:"scatter"},i));else{var a=r.get("data");t.push({name:i.name,data:Dxe(i.data,a)})}}),e.mergeOption(qn({series:t},n.newOption))});const Nxe=Ixe;var GJ=ne,UJ=Gi();function kxe(n,e){var t=$P(n);GJ(e,function(i,r){for(var a=t.length-1;a>=0;a--){var o=t[a];if(o[r])break}if(a<0){var s=n.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(s){var l=s.getPercentRange();t[0][r]={dataZoomId:r,start:l[0],end:l[1]}}}}),t.push(e)}function Fxe(n){var e=$P(n),t=e[e.length-1];e.length>1&&e.pop();var i={};return GJ(t,function(r,a){for(var o=e.length-1;o>=0;o--)if(r=e[o][a],r){i[a]=r;break}}),i}function Oxe(n){UJ(n).snapshots=null}function Bxe(n){return $P(n).length}function $P(n){var e=UJ(n);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var zxe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){Oxe(t),i.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var i={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 i},e}(f0);nc({type:"restore",event:"restore",update:"prepareAndUpdate"},function(n,e){e.resetOption("recreate")});const Gxe=zxe;var Uxe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Vxe=function(){function n(e,t,i){var r=this;this._targetInfoList=[];var a=Vz(t,e);ne(Hxe,function(o,s){(!i||!i.include||xi(i.include,s)>=0)&&o(a,r._targetInfoList)})}return n.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(i,r,a){if((i.coordRanges||(i.coordRanges=[])).push(r),!i.coordRange){i.coordRange=r;var o=sw[i.brushType](0,a,r);i.__rangeOffset={offset:$z[i.brushType](o.values,i.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},n.prototype.matchOutputRanges=function(e,t,i){ne(e,function(r){var a=this.findTargetInfo(r,t);a&&a!==!0&&ne(a.coordSyses,function(o){var s=sw[r.brushType](1,o,r.range,!0);i(r,s.values,o,t)})},this)},n.prototype.setInputRanges=function(e,t){ne(e,function(i){var r=this.findTargetInfo(i,t);if(i.range=i.range||[],r&&r!==!0){i.panelId=r.panelId;var a=sw[i.brushType](0,r.coordSys,i.coordRange),o=i.__rangeOffset;i.range=o?$z[i.brushType](a.values,o.offset,Wxe(a.xyMinMax,o.xyMinMax)):a.values}},this)},n.prototype.makePanelOpts=function(e,t){return Xt(this._targetInfoList,function(i){var r=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:t?t(i):null,clipPath:XZ(r),isTargetByCursor:KZ(r,e,i.coordSysModel),getLinearBrushOtherExtent:YZ(r)}})},n.prototype.controlSeries=function(e,t,i){var r=this.findTargetInfo(e,i);return r===!0||r&&xi(r.coordSyses,t.coordinateSystem)>=0},n.prototype.findTargetInfo=function(e,t){for(var i=this._targetInfoList,r=Vz(t,e),a=0;a<i.length;a++){var o=i[a],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<Hz.length;l++)if(Hz[l](r,o))return o}return!0},n}();function xC(n){return n[0]>n[1]&&n.reverse(),n}function Vz(n,e){return Hg(n,e,{includeMainTypes:Uxe})}var Hxe={grid:function(n,e){var t=n.xAxisModels,i=n.yAxisModels,r=n.gridModels,a=In(),o={},s={};!t&&!i&&!r||(ne(t,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),ne(i,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),ne(r,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];ne(u.getCartesians(),function(d,h){(xi(t,d.getAxis("x").model)>=0||xi(i,d.getAxis("y").model)>=0)&&c.push(d)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:Wz.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(n,e){ne(n.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:Wz.geo})})}},Hz=[function(n,e){var t=n.xAxisModel,i=n.yAxisModel,r=n.gridModel;return!r&&t&&(r=t.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(n,e){var t=n.geoModel;return t&&t===e.geoModel}],Wz={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var n=this.coordSys,e=n.getBoundingRect().clone();return e.applyTransform(Tp(n)),e}},sw={lineX:si(jz,0),lineY:si(jz,1),rect:function(n,e,t,i){var r=n?e.pointToData([t[0][0],t[1][0]],i):e.dataToPoint([t[0][0],t[1][0]],i),a=n?e.pointToData([t[0][1],t[1][1]],i):e.dataToPoint([t[0][1],t[1][1]],i),o=[xC([r[0],a[0]]),xC([r[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(n,e,t,i){var r=[[1/0,-1/0],[1/0,-1/0]],a=Xt(t,function(o){var s=n?e.pointToData(o,i):e.dataToPoint(o,i);return r[0][0]=Math.min(r[0][0],s[0]),r[1][0]=Math.min(r[1][0],s[1]),r[0][1]=Math.max(r[0][1],s[0]),r[1][1]=Math.max(r[1][1],s[1]),s});return{values:a,xyMinMax:r}}};function jz(n,e,t,i){var r=t.getAxis(["x","y"][n]),a=xC(Xt([0,1],function(s){return e?r.coordToData(r.toLocalCoord(i[s]),!0):r.toGlobalCoord(r.dataToCoord(i[s]))})),o=[];return o[n]=a,o[1-n]=[NaN,NaN],{values:a,xyMinMax:o}}var $z={lineX:si(qz,0),lineY:si(qz,1),rect:function(n,e,t){return[[n[0][0]-t[0]*e[0][0],n[0][1]-t[0]*e[0][1]],[n[1][0]-t[1]*e[1][0],n[1][1]-t[1]*e[1][1]]]},polygon:function(n,e,t){return Xt(n,function(i,r){return[i[0]-t[0]*e[r][0],i[1]-t[1]*e[r][1]]})}};function qz(n,e,t,i){return[e[0]-i[n]*t[0],e[1]-i[n]*t[1]]}function Wxe(n,e){var t=Xz(n),i=Xz(e),r=[t[0]/i[0],t[1]/i[1]];return isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r}function Xz(n){return n?[n[0][1]-n[0][0],n[1][1]-n[1][0]]:[NaN,NaN]}const qP=Vxe;var wC=ne,jxe=dhe("toolbox-dataZoom_"),$xe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.render=function(t,i,r,a){this._brushController||(this._brushController=new AP(r.getZr()),this._brushController.on("brush",An(this._onBrush,this)).mount()),Yxe(t,i,this,a,r),Xxe(t,i)},e.prototype.onclick=function(t,i,r){qxe[r].call(this)},e.prototype.remove=function(t,i){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,i){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var i=t.areas;if(!t.isEnd||!i.length)return;var r={},a=this.ecModel;this._brushController.updateCovers([]);var o=new qP(XP(this.model),a,{include:["grid"]});o.matchOutputRanges(i,a,function(u,c,d){if(d.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",d,c[0]),s("y",d,c[1])):s({lineX:"x",lineY:"y"}[h],d,c)}}),kxe(a,r),this._dispatchZoomAction(r);function s(u,c,d){var h=c.getAxis(u),f=h.model,p=l(u,f,a),m=p.findRepresentativeAxisProxy(f).getMinMaxSpan();(m.minValueSpan!=null||m.maxValueSpan!=null)&&(d=o1(0,d.slice(),h.scale.getExtent(),0,m.minValueSpan,m.maxValueSpan)),p&&(r[p.id]={dataZoomId:p.id,startValue:d[0],endValue:d[1]})}function l(u,c,d){var h;return d.eachComponent({mainType:"dataZoom",subType:"select"},function(f){var p=f.getAxisModel(u,c.componentIndex);p&&(h=f)}),h}},e.prototype._dispatchZoomAction=function(t){var i=[];wC(t,function(r,a){i.push(Zn(r))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},e.getDefaultOption=function(t){var i={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 i},e}(f0),qxe={zoom:function(){var n=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:n})},back:function(){this._dispatchZoomAction(Fxe(this.ecModel))}};function XP(n){var e={xAxisIndex:n.get("xAxisIndex",!0),yAxisIndex:n.get("yAxisIndex",!0),xAxisId:n.get("xAxisId",!0),yAxisId:n.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function Xxe(n,e){n.setIconStatus("back",Bxe(e)>1?"emphasis":"normal")}function Yxe(n,e,t,i,r){var a=t._isZoomActive;i&&i.type==="takeGlobalCursor"&&(a=i.key==="dataZoomSelect"?i.dataZoomSelectActive:!1),t._isZoomActive=a,n.setIconStatus("zoom",a?"emphasis":"normal");var o=new qP(XP(n),e,{include:["grid"]}),s=o.makePanelOpts(r,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:n.getModel("brushStyle").getItemStyle()}:!1)}jpe("dataZoom",function(n){var e=n.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var i=e.getModel(t),r=[],a=XP(i),o=Hg(n,a);wC(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),wC(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var d=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:jxe+u+d};h[c]=d,r.push(h)}return r});const Kxe=$xe;function Zxe(n){n.registerComponentModel(pxe),n.registerComponentView(yxe),x2("saveAsImage",Sxe),x2("magicType",wxe),x2("dataView",Nxe),x2("dataZoom",Kxe),x2("restore",Gxe),Ci(hxe)}var Jxe=function(n){ot(e,n);function e(){var t=n!==null&&n.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}($i);const Qxe=Jxe;function VJ(n){var e=n.get("confine");return e!=null?!!e:n.get("renderMode")==="richText"}function HJ(n){if(qi.domSupported){for(var e=document.documentElement.style,t=0,i=n.length;t<i;t++)if(n[t]in e)return n[t]}}var WJ=HJ(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ewe=HJ(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function jJ(n,e){if(!n)return e;e=fX(e,!0);var t=n.indexOf(e);return n=t===-1?e:"-"+n.slice(0,t)+"-"+e,n.toLowerCase()}function twe(n,e){var t=n.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(n);return t?e?t[e]:t:null}var nwe=jJ(ewe,"transition"),YP=jJ(WJ,"transform"),iwe="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(qi.transform3dSupported?"will-change:transform;":"");function rwe(n){return n=n==="left"?"right":n==="right"?"left":n==="top"?"bottom":"top",n}function awe(n,e,t){if(!xn(t)||t==="inside")return"";var i=n.get("backgroundColor"),r=n.get("borderWidth");e=Gp(e);var a=rwe(t),o=Math.max(Math.round(r)*1.5,6),s="",l=YP+":",u;xi(["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,d=o+r,h=d*Math.abs(Math.cos(c))+d*Math.abs(Math.sin(c)),f=Math.round(((h-Math.SQRT2*r)/2+Math.SQRT2*r-(h-d)/2)*100)/100;s+=";"+a+":-"+f+"px";var p=e+" solid "+r+"px;",m=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+i+";"];return'<div style="'+m.join("")+'"></div>'}function owe(n,e){var t="cubic-bezier(0.23,1,0.32,1)",i=" "+n/2+"s "+t,r="opacity"+i+",visibility"+i;return e||(i=" "+n+"s "+t,r+=qi.transformSupported?","+YP+i:",left"+i+",top"+i),nwe+":"+r}function Yz(n,e,t){var i=n.toFixed(0)+"px",r=e.toFixed(0)+"px";if(!qi.transformSupported)return t?"top:"+r+";left:"+i+";":[["top",r],["left",i]];var a=qi.transform3dSupported,o="translate"+(a?"3d":"")+"("+i+","+r+(a?",0":"")+")";return t?"top:0;left:0;"+YP+":"+o+";":[["top",0],["left",0],[WJ,o]]}function swe(n){var e=[],t=n.get("fontSize"),i=n.getTextColor();i&&e.push("color:"+i),e.push("font:"+n.getFont());var r=ai(n.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+r+"px");var a=n.get("textShadowColor"),o=n.get("textShadowBlur")||0,s=n.get("textShadowOffsetX")||0,l=n.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),ne(["decoration","align"],function(u){var c=n.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function lwe(n,e,t){var i=[],r=n.get("transitionDuration"),a=n.get("backgroundColor"),o=n.get("shadowBlur"),s=n.get("shadowColor"),l=n.get("shadowOffsetX"),u=n.get("shadowOffsetY"),c=n.getModel("textStyle"),d=YX(n,"html"),h=l+"px "+u+"px "+o+"px "+s;return i.push("box-shadow:"+h),e&&r&&i.push(owe(r,t)),a&&i.push("background-color:"+a),ne(["width","color","radius"],function(f){var p="border-"+f,m=fX(p),v=n.get(m);v!=null&&i.push(p+":"+v+(f==="color"?"":"px"))}),i.push(swe(c)),d!=null&&i.push("padding:"+Wv(d).join("px ")+"px"),i.join(";")+";"}function Kz(n,e,t,i,r){var a=e&&e.painter;if(t){var o=a&&a.getViewportRoot();o&&Nce(n,o,t,i,r)}else{n[0]=i,n[1]=r;var s=a&&a.getViewportRootOffset();s&&(n[0]+=s.offsetLeft,n[1]+=s.offsetTop)}n[2]=n[0]/e.getWidth(),n[3]=n[1]/e.getHeight()}var uwe=function(){function n(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,qi.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=e.getZr(),a=t.appendTo,o=a&&(xn(a)?document.querySelector(a):hv(a)?a:$n(a)&&a(e.getDom()));Kz(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(i),this._api=e,this._container=o;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=r.handler,c=r.painter.getViewportRoot();o0(c,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return n.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),i=twe(t,"position"),r=t.style;r.position!=="absolute"&&i!=="absolute"&&(r.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},n.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,r=i.style,a=this._styleCoord;i.innerHTML?r.cssText=iwe+lwe(e,!this._firstShow,this._longHide)+Yz(a[0],a[1],!0)+("border-color:"+Gp(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},n.prototype.setContent=function(e,t,i,r,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(xn(a)&&i.get("trigger")==="item"&&!VJ(i)&&(s=awe(i,r,a)),xn(e))o.innerHTML=e+s;else if(e){o.innerHTML="",$t(e)||(e=[e]);for(var l=0;l<e.length;l++)hv(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)}}},n.prototype.setEnterable=function(e){this._enterable=e},n.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},n.prototype.moveTo=function(e,t){if(this.el){var i=this._styleCoord;if(Kz(i,this._zr,this._container,e,t),i[0]!=null&&i[1]!=null){var r=this.el.style,a=Yz(i[0],i[1]);ne(a,function(o){r[o[0]]=o[1]})}}},n.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},n.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",qi.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},n.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(An(this.hide,this),e)):this.hide())},n.prototype.isShow=function(){return this._show},n.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},n}();const cwe=uwe;var dwe=function(){function n(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),Jz(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return n.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},n.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},n.prototype.setContent=function(e,t,i,r,a){var o=this;Kn(e)&&ur(""),this.el&&this._zr.remove(this.el);var s=i.getModel("textStyle");this.el=new Xi({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:s.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:YX(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),ne(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=i.get(u)}),ne(["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})},n.prototype.setEnterable=function(e){this._enterable=e},n.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),i=Zz(e.style);return[t.width+i.left+i.right,t.height+i.top+i.bottom]},n.prototype.moveTo=function(e,t){var i=this.el;if(i){var r=this._styleCoord;Jz(r,this._zr,e,t),e=r[0],t=r[1];var a=i.style,o=Vd(a.borderWidth||0),s=Zz(a);i.x=e+o+s.left,i.y=t+o+s.top,i.markRedraw()}},n.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},n.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},n.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(An(this.hide,this),e)):this.hide())},n.prototype.isShow=function(){return this._show},n.prototype.dispose=function(){this._zr.remove(this.el)},n}();function Vd(n){return Math.max(0,n)}function Zz(n){var e=Vd(n.shadowBlur||0),t=Vd(n.shadowOffsetX||0),i=Vd(n.shadowOffsetY||0);return{left:Vd(e-t),right:Vd(e+t),top:Vd(e-i),bottom:Vd(e+i)}}function Jz(n,e,t,i){n[0]=t,n[1]=i,n[2]=n[0]/e.getWidth(),n[3]=n[1]/e.getHeight()}const hwe=dwe;var fwe=new Hi({shape:{x:-1,y:-1,width:2,height:2}}),pwe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){if(!(qi.node||!i.getDom())){var r=t.getComponent("tooltip"),a=this._renderMode=yhe(r.get("renderMode"));this._tooltipContent=a==="richText"?new hwe(i):new cwe(i,{appendTo:r.get("appendToBody",!0)?"body":r.get("appendTo",!0)})}},e.prototype.render=function(t,i,r){if(!(qi.node||!r.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=i,this._api=r;var a=this._tooltipContent;a.update(t),a.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?Yv(this,"_updatePosition",50,"fixRate"):k9(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,i=t.get("triggerOn");EJ("itemTooltip",this._api,An(function(r,a,o){i!=="none"&&(i.indexOf(r)>=0?this._tryShow(a,o):r==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,i=this._ecModel,r=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(){!r.isDisposed()&&o.manuallyShowTip(t,i,r,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,i,r,a){if(!(a.from===this.uid||qi.node||!r.getDom())){var o=Qz(a,r);this._ticket="";var s=a.dataByCoordSys,l=ywe(a,i,r);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=fwe;c.x=a.x,c.y=a.y,c.update(),ni(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,i,r,a))return;var d=PJ(a,i),h=d.point[0],f=d.point[1];h!=null&&f!=null&&this._tryShow({offsetX:h,offsetY:f,target:d.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(r.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:r.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(t,i,r,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(Qz(a,r))},e.prototype._manuallyAxisShowTip=function(t,i,r,a){var o=a.seriesIndex,s=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(u){var c=u.getData(),d=Ym([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(d.get("trigger")==="axis")return r.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(t,i){var r=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(r){var s=ni(r);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;sp(r,function(c){if(ni(c).dataIndex!=null)return l=c,!0;if(ni(c).tooltipConfig!=null)return u=c,!0},!0),l?this._showSeriesItemTooltip(t,l,i):u?this._showComponentItemTooltip(t,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},e.prototype._showOrMove=function(t,i){var r=t.get("showDelay");i=An(i,this),clearTimeout(this._showTimout),r>0?this._showTimout=setTimeout(i,r):i()},e.prototype._showAxisTooltip=function(t,i){var r=this._ecModel,a=this._tooltipModel,o=[i.offsetX,i.offsetY],s=Ym([i.tooltipOption],a),l=this._renderMode,u=[],c=So("section",{blocks:[],noHeader:!0}),d=[],h=new Wb;ne(t,function(_){ne(_.dataByAxis,function(S){var x=r.getComponent(S.axisDim+"Axis",S.axisIndex),A=S.value;if(!(!x||A==null)){var C=AJ(A,x.axis,r,S.seriesDataIndices,S.valueLabelOpt),M=So("section",{header:C,noHeader:!K0(C),sortBlocks:!0,blocks:[]});c.blocks.push(M),ne(S.seriesDataIndices,function(I){var D=r.getSeriesByIndex(I.seriesIndex),E=I.dataIndexInside,P=D.getDataParams(E);if(!(P.dataIndex<0)){P.axisDim=S.axisDim,P.axisIndex=S.axisIndex,P.axisType=S.axisType,P.axisId=S.axisId,P.axisValue=XE(x.axis,{value:A}),P.axisValueLabel=C,P.marker=h.makeTooltipMarker("item",Gp(P.color),l);var F=Ok(D.formatTooltip(E,!0,null)),V=F.frag;if(V){var G=Ym([D],a).get("valueFormatter");M.blocks.push(G?It({valueFormatter:G},V):V)}F.text&&d.push(F.text),u.push(P)}})}})}),c.blocks.reverse(),d.reverse();var f=i.position,p=s.get("order"),m=Hk(c,h,l,p,r.get("useUTC"),s.get("textStyle"));m&&d.unshift(m);var v=l==="richText"?`
`:"<br/>",g=d.join(v);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,f,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],f,null,h)})},e.prototype._showSeriesItemTooltip=function(t,i,r){var a=this._ecModel,o=ni(i),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,d=o.dataType,h=u.getData(d),f=this._renderMode,p=t.positionDefault,m=Ym([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),v=m.get("trigger");if(!(v!=null&&v!=="item")){var g=u.getDataParams(c,d),_=new Wb;g.marker=_.makeTooltipMarker("item",Gp(g.color),f);var S=Ok(u.formatTooltip(c,!1,d)),x=m.get("order"),A=m.get("valueFormatter"),C=S.frag,M=C?Hk(A?It({valueFormatter:A},C):C,_,f,x,a.get("useUTC"),m.get("textStyle")):S.text,I="item_"+u.name+"_"+c;this._showOrMove(m,function(){this._showTooltipContent(m,M,g,I,t.offsetX,t.offsetY,t.position,t.target,_)}),r({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,i,r){var a=this._renderMode==="html",o=ni(i),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(xn(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=Zn(l),l.content=os(l.content));var d=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&d.push(h),d.push({formatter:l.content});var f=t.positionDefault,p=Ym(d,this._tooltipModel,f?{position:f}:null),m=p.get("content"),v=Math.random()+"",g=new Wb;this._showOrMove(p,function(){var _=Zn(p.get("formatterParams")||{});this._showTooltipContent(p,m,_,v,t.offsetX,t.offsetY,t.position,i,g)}),r({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,i,r,a,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var d=this._tooltipContent;d.setEnterable(t.get("enterable"));var h=t.get("formatter");l=l||t.get("position");var f=i,p=this._getNearestPoint([o,s],r,t.get("trigger"),t.get("borderColor")),m=p.color;if(h)if(xn(h)){var v=t.ecModel.get("useUTC"),g=$t(r)?r[0]:r,_=g&&g.axisType&&g.axisType.indexOf("time")>=0;f=h,_&&(f=I_(g.axisValue,f,v)),f=pX(f,r,!0)}else if($n(h)){var S=An(function(x,A){x===this._ticket&&(d.setContent(A,c,t,m,l),this._updatePosition(t,l,o,s,d,r,u))},this);this._ticket=a,f=h(r,a,S)}else f=h;d.setContent(f,c,t,m,l),d.show(t,m),this._updatePosition(t,l,o,s,d,r,u)}},e.prototype._getNearestPoint=function(t,i,r,a){if(r==="axis"||$t(i))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!$t(i))return{color:a||i.color||i.borderColor}},e.prototype._updatePosition=function(t,i,r,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();i=i||t.get("position");var d=o.getSize(),h=t.get("align"),f=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),$n(i)&&(i=i([r,a],s,o.el,p,{viewSize:[u,c],contentSize:d.slice()})),$t(i))r=_n(i[0],u),a=_n(i[1],c);else if(Kn(i)){var m=i;m.width=d[0],m.height=d[1];var v=uo(m,{width:u,height:c});r=v.x,a=v.y,h=null,f=null}else if(xn(i)&&l){var g=gwe(i,p,d,t.get("borderWidth"));r=g[0],a=g[1]}else{var g=vwe(r,a,o,u,c,h?null:20,f?null:20);r=g[0],a=g[1]}if(h&&(r-=eG(h)?d[0]/2:h==="right"?d[0]:0),f&&(a-=eG(f)?d[1]/2:f==="bottom"?d[1]:0),VJ(t)){var g=mwe(r,a,o,u,c);r=g[0],a=g[1]}o.moveTo(r,a)},e.prototype._updateContentNotChangedOnAxis=function(t,i){var r=this._lastDataByCoordSys,a=this._cbParamsList,o=!!r&&r.length===t.length;return o&&ne(r,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},d=c.dataByAxis||[];o=o&&u.length===d.length,o&&ne(u,function(h,f){var p=d[f]||{},m=h.seriesDataIndices||[],v=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&m.length===v.length,o&&ne(m,function(g,_){var S=v[_];o=o&&g.seriesIndex===S.seriesIndex&&g.dataIndex===S.dataIndex}),a&&ne(h.seriesDataIndices,function(g){var _=g.seriesIndex,S=i[_],x=a[_];S&&x&&x.data!==S.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=i,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,i){qi.node||!i.getDom()||(k9(this,"_updatePosition"),this._tooltipContent.dispose(),yC("itemTooltip",i))},e.type="tooltip",e}(xa);function Ym(n,e,t){var i=e.ecModel,r;t?(r=new Xr(t,i,i),r=new Xr(e.option,r,i)):r=e;for(var a=n.length-1;a>=0;a--){var o=n[a];o&&(o instanceof Xr&&(o=o.get("tooltip",!0)),xn(o)&&(o={formatter:o}),o&&(r=new Xr(o,r,i)))}return r}function Qz(n,e){return n.dispatchAction||An(e.dispatchAction,e)}function vwe(n,e,t,i,r,a,o){var s=t.getSize(),l=s[0],u=s[1];return a!=null&&(n+l+a+2>i?n-=l+a:n+=a),o!=null&&(e+u+o>r?e-=u+o:e+=o),[n,e]}function mwe(n,e,t,i,r){var a=t.getSize(),o=a[0],s=a[1];return n=Math.min(n+o,i)-o,e=Math.min(e+s,r)-s,n=Math.max(n,0),e=Math.max(e,0),[n,e]}function gwe(n,e,t,i){var r=t[0],a=t[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,c=e.height;switch(n){case"inside":s=e.x+u/2-r/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-r/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-r/2,l=e.y+c+o;break;case"left":s=e.x-r-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 eG(n){return n==="center"||n==="middle"}function ywe(n,e,t){var i=oE(n).queryOptionMap,r=i.keys()[0];if(!(!r||r==="series")){var a=y3(e,r,i.get(r),{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=ni(u).tooltipConfig;if(c&&c.name===n.name)return l=u,!0}),l)return{componentMainType:r,componentIndex:o.componentIndex,el:l}}}}const _we=pwe;function Swe(n){Ci(N3),n.registerComponentModel(Qxe),n.registerComponentView(_we),n.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Ba),n.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Ba)}var bwe=["rect","polygon","keep","clear"];function xwe(n,e){var t=Ar(n?n.brush:[]);if(t.length){var i=[];ne(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(i=i.concat(u))});var r=n&&n.toolbox;$t(r)&&(r=r[0]),r||(r={feature:{}},n.toolbox=[r]);var a=r.feature||(r.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,i),wwe(s),e&&!s.length&&s.push.apply(s,bwe)}}function wwe(n){var e={};ne(n,function(t){e[t]=1}),n.length=0,ne(e,function(t,i){n.push(i)})}var tG=ne;function nG(n){if(n){for(var e in n)if(n.hasOwnProperty(e))return!0}}function TC(n,e,t){var i={};return tG(e,function(a){var o=i[a]=r();tG(n[a],function(s,l){if(Wo.isValidType(l)){var u={type:l,visual:s};t&&t(u,a),o[l]=new Wo(u),l==="opacity"&&(u=Zn(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Wo(u))}})}),i;function r(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function $J(n,e,t){var i;ne(t,function(r){e.hasOwnProperty(r)&&nG(e[r])&&(i=!0)}),i&&ne(t,function(r){e.hasOwnProperty(r)&&nG(e[r])?n[r]=Zn(e[r]):delete n[r]})}function Twe(n,e,t,i,r,a){var o={};ne(n,function(d){var h=Wo.prepareVisualTypes(e[d]);o[d]=h});var s;function l(d){return OE(t,s,d)}function u(d,h){aY(t,s,d,h)}a==null?t.each(c):t.each([a],c);function c(d,h){s=a==null?d:h;var f=t.getRawDataItem(s);if(!(f&&f.visualMap===!1))for(var p=i.call(r,d),m=e[p],v=o[p],g=0,_=v.length;g<_;g++){var S=v[g];m[S]&&m[S].applyVisual(d,l,u)}}}function Awe(n,e,t,i){var r={};return ne(n,function(a){var o=Wo.prepareVisualTypes(e[a]);r[a]=o}),{progress:function(o,s){var l;i!=null&&(l=s.getDimensionIndex(i));function u(A){return OE(s,d,A)}function c(A,C){aY(s,d,A,C)}for(var d,h=s.getStore();(d=o.next())!=null;){var f=s.getRawDataItem(d);if(!(f&&f.visualMap===!1))for(var p=i!=null?h.get(l,d):d,m=t(p),v=e[m],g=r[m],_=0,S=g.length;_<S;_++){var x=g[_];v[x]&&v[x].applyVisual(p,u,c)}}}}}function Cwe(n){var e=n.brushType,t={point:function(i){return iG[e].point(i,t,n)},rect:function(i){return iG[e].rect(i,t,n)}};return t}var iG={lineX:rG(0),lineY:rG(1),rect:{point:function(n,e,t){return n&&t.boundingRect.contain(n[0],n[1])},rect:function(n,e,t){return n&&t.boundingRect.intersect(n)}},polygon:{point:function(n,e,t){return n&&t.boundingRect.contain(n[0],n[1])&&Zf(t.range,n[0],n[1])},rect:function(n,e,t){var i=t.range;if(!n||i.length<=1)return!1;var r=n.x,a=n.y,o=n.width,s=n.height,l=i[0];if(Zf(i,r,a)||Zf(i,r+o,a)||Zf(i,r,a+s)||Zf(i,r+o,a+s)||gi.create(n).contain(l[0],l[1])||xg(r,a,r+o,a,i)||xg(r,a,r,a+s,i)||xg(r+o,a,r+o,a+s,i)||xg(r,a+s,r+o,a+s,i))return!0}}};function rG(n){var e=["x","y"],t=["width","height"];return{point:function(i,r,a){if(i){var o=a.range,s=i[n];return Km(s,o)}},rect:function(i,r,a){if(i){var o=a.range,s=[i[e[n]],i[e[n]]+i[t[n]]];return s[1]<s[0]&&s.reverse(),Km(s[0],o)||Km(s[1],o)||Km(o[0],s)||Km(o[1],s)}}}}function Km(n,e){return e[0]<=n&&n<=e[1]}var aG=["inBrush","outOfBrush"],lw="__ecBrushSelect",AC="__ecInBrushSelectEvent";function qJ(n){n.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new qP(e.option,n);t.setInputRanges(e.areas,n)})}function Mwe(n,e,t){var i=[],r,a;n.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),qJ(n),n.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:Zn(o.areas),selected:[]};i.push(l);var u=o.option,c=u.brushLink,d=[],h=[],f=[],p=!1;s||(r=u.throttleType,a=u.throttleDelay);var m=Xt(o.areas,function(A){var C=Lwe[A.brushType],M=qn({boundingRect:C?C(A):void 0},A);return M.selectors=Cwe(M),M}),v=TC(o.option,aG,function(A){A.mappingMethod="fixed"});$t(c)&&ne(c,function(A){d[A]=1});function g(A){return c==="all"||!!d[A]}function _(A){return!!A.length}n.eachSeries(function(A,C){var M=f[C]=[];A.subType==="parallel"?S(A,C):x(A,C,M)});function S(A,C){var M=A.coordinateSystem;p=p||M.hasAxisBrushed(),g(C)&&M.eachActiveState(A.getData(),function(I,D){I==="active"&&(h[D]=1)})}function x(A,C,M){if(!(!A.brushSelector||Rwe(o,C))&&(ne(m,function(D){o.brushTargetManager.controlSeries(D,A,n)&&M.push(D),p=p||_(M)}),g(C)&&_(M))){var I=A.getData();I.each(function(D){oG(A,M,I,D)&&(h[D]=1)})}}n.eachSeries(function(A,C){var M={seriesId:A.id,seriesIndex:C,seriesName:A.name,dataIndex:[]};l.selected.push(M);var I=f[C],D=A.getData(),E=g(C)?function(P){return h[P]?(M.dataIndex.push(D.getRawIndex(P)),"inBrush"):"outOfBrush"}:function(P){return oG(A,I,D,P)?(M.dataIndex.push(D.getRawIndex(P)),"inBrush"):"outOfBrush"};(g(C)?p:_(I))&&Twe(aG,v,D,E)})}),Ewe(e,r,a,i,t)}function Ewe(n,e,t,i,r){if(r){var a=n.getZr();if(!a[AC]){a[lw]||(a[lw]=Pwe);var o=Yv(a,lw,t,e);o(n,i)}}}function Pwe(n,e){if(!n.isDisposed()){var t=n.getZr();t[AC]=!0,n.dispatchAction({type:"brushSelect",batch:e}),t[AC]=!1}}function oG(n,e,t,i){for(var r=0,a=e.length;r<a;r++){var o=e[r];if(n.brushSelector(i,t,o.selectors,o))return!0}}function Rwe(n,e){var t=n.option.seriesIndex;return t!=null&&t!=="all"&&($t(t)?xi(t,e)<0:e!==t)}var Lwe={rect:function(n){return sG(n.range)},polygon:function(n){for(var e,t=n.range,i=0,r=t.length;i<r;i++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=t[i];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&&sG(e)}};function sG(n){return new gi(n[0][0],n[1][0],n[0][1]-n[0][0],n[1][1]-n[1][0])}var Iwe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){this.ecModel=t,this.api=i,this.model,(this._brushController=new AP(i.getZr())).on("brush",An(this._onBrush,this)).mount()},e.prototype.render=function(t,i,r,a){this.model=t,this._updateController(t,i,r,a)},e.prototype.updateTransform=function(t,i,r,a){qJ(i),this._updateController(t,i,r,a)},e.prototype.updateVisual=function(t,i,r,a){this.updateTransform(t,i,r,a)},e.prototype.updateView=function(t,i,r,a){this._updateController(t,i,r,a)},e.prototype._updateController=function(t,i,r,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(r)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var i=this.model.id,r=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:Zn(r),$from:i}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:Zn(r),$from:i})},e.type="brush",e}(xa);const Dwe=Iwe;var Nwe="#ddd",kwe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,i){var r=this.option;!i&&$J(r,t,["inBrush","outOfBrush"]);var a=r.inBrush=r.inBrush||{};r.outOfBrush=r.outOfBrush||{color:Nwe},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=Xt(t,function(i){return lG(this.option,i)},this))},e.prototype.setBrushOption=function(t){this.brushOption=lG(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}($i);function lG(n,e){return ui({brushType:n.brushType,brushMode:n.brushMode,transformable:n.transformable,brushStyle:new Xr(n.brushStyle).getItemStyle(),removeOnClick:n.removeOnClick,z:n.z},e,!0)}const Fwe=kwe;var Owe=["rect","polygon","lineX","lineY","keep","clear"],Bwe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.render=function(t,i,r){var a,o,s;i.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,ne(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,i,r){this.render(t,i,r)},e.prototype.getIcons=function(){var t=this.model,i=t.get("icon",!0),r={};return ne(t.get("type",!0),function(a){i[a]&&(r[a]=i[a])}),r},e.prototype.onclick=function(t,i,r){var a=this._brushType,o=this._brushMode;r==="clear"?(i.dispatchAction({type:"axisAreaSelect",intervals:[]}),i.dispatchAction({type:"brush",command:"clear",areas:[]})):i.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:r==="keep"?a:a===r?!1:r,brushMode:r==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var i={show:!0,type:Owe.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 i},e}(f0);const zwe=Bwe;function Gwe(n){n.registerComponentView(Dwe),n.registerComponentModel(Fwe),n.registerPreprocessor(xwe),n.registerVisual(n.PRIORITY.VISUAL.BRUSH,Mwe),n.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(i){i.setAreas(e.areas)})}),n.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Ba),n.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Ba),x2("brush",zwe)}var Uwe=function(n){ot(e,n);function e(){var t=n!==null&&n.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}($i),Vwe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){if(this.group.removeAll(),!!t.get("show")){var a=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=ai(t.get("textBaseline"),t.get("textVerticalAlign")),c=new Xi({style:qr(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),d=c.getBoundingRect(),h=t.get("subtext"),f=new Xi({style:qr(s,{text:h,fill:s.getTextColor(),y:d.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),m=t.get("sublink"),v=t.get("triggerEvent",!0);c.silent=!p&&!v,f.silent=!m&&!v,p&&c.on("click",function(){J5(p,"_"+t.get("target"))}),m&&f.on("click",function(){J5(m,"_"+t.get("subtarget"))}),ni(c).eventData=ni(f).eventData=v?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(c),h&&a.add(f);var g=a.getBoundingRect(),_=t.getBoxLayoutParams();_.width=g.width,_.height=g.height;var S=uo(_,{width:r.getWidth(),height:r.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),a.x=S.x,a.y=S.y,a.markRedraw();var x={align:l,verticalAlign:u};c.setStyle(x),f.setStyle(x),g=a.getBoundingRect();var A=S.margin,C=t.getItemStyle(["color","opacity"]);C.fill=t.get("backgroundColor");var M=new Hi({shape:{x:g.x-A[3],y:g.y-A[0],width:g.width+A[1]+A[3],height:g.height+A[0]+A[2],r:t.get("borderRadius")},style:C,subPixelOptimize:!0,silent:!0});a.add(M)}},e.type="title",e}(xa);function Hwe(n){n.registerComponentModel(Uwe),n.registerComponentView(Vwe)}var Wwe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,i,r){this.mergeDefaultAndTheme(t,r),this._initData()},e.prototype.mergeOption=function(t){n.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var i=this._data.count();this.option.loop?t=(t%i+i)%i:(t>=i&&(t=i-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,i=t.data||[],r=t.axisType,a=this._names=[],o;r==="category"?(o=[],ne(i,function(u,c){var d=lo(zv(u),""),h;Kn(u)?(h=Zn(u),h.value=c):h=c,o.push(h),a.push(d)})):o=i;var s={category:"ordinal",time:"time",value:"number"}[r]||"number",l=this._data=new Rs([{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}($i);const uG=Wwe;var XJ=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=Uh(uG.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}(uG);Za(XJ,z_.prototype);const jwe=XJ;var $we=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(xa);const qwe=$we;var Xwe=function(n){ot(e,n);function e(t,i,r,a){var o=n.call(this,t,i,r)||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}(ou);const Ywe=Xwe;var uw=Math.PI,cG=Gi(),Kwe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){this.api=i},e.prototype.render=function(t,i,r){if(this.model=t,this.api=r,this.ecModel=i,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,r),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 So("nameValue",{noName:!0,value:c})},ne(["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,i){var r=t.get(["label","position"]),a=t.get("orient"),o=Jwe(t,i),s;r==null||r==="auto"?s=a==="horizontal"?o.y+o.height/2<i.getHeight()/2?"-":"+":o.x+o.width/2<i.getWidth()/2?"+":"-":xn(r)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][r]:s=r;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:uw/2},d=a==="vertical"?o.height:o.width,h=t.getModel("controlStyle"),f=h.get("show",!0),p=f?h.get("itemSize"):0,m=f?h.get("itemGap"):0,v=p+m,g=t.get(["label","rotate"])||0;g=g*uw/180;var _,S,x,A=h.get("position",!0),C=f&&h.get("showPlayBtn",!0),M=f&&h.get("showPrevBtn",!0),I=f&&h.get("showNextBtn",!0),D=0,E=d;A==="left"||A==="bottom"?(C&&(_=[0,0],D+=v),M&&(S=[D,0],D+=v),I&&(x=[E-p,0],E-=v)):(C&&(_=[E-p,0],E-=v),M&&(S=[0,0],D+=v),I&&(x=[E-p,0],E-=v));var P=[D,E];return t.get("inverse")&&P.reverse(),{viewRect:o,mainLength:d,orient:a,rotation:c[a],labelRotation:g,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[a],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[a],playPosition:_,prevBtnPosition:S,nextBtnPosition:x,axisExtent:P,controlSize:p,controlGap:m}},e.prototype._position=function(t,i){var r=this._mainGroup,a=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=Dl(),l=o.x,u=o.y+o.height;Ku(s,s,[-l,-u]),Jp(s,s,-uw/2),Ku(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),d=_(r.getBoundingRect()),h=_(a.getBoundingRect()),f=[r.x,r.y],p=[a.x,a.y];p[0]=f[0]=c[0][0];var m=t.labelPosOpt;if(m==null||xn(m)){var v=m==="+"?0:1;S(f,d,c,1,v),S(p,h,c,1,1-v)}else{var v=m>=0?0:1;S(f,d,c,1,v),p[1]=f[1]+m}r.setPosition(f),a.setPosition(p),r.rotation=a.rotation=t.rotation,g(r),g(a);function g(x){x.originX=c[0][0]-x.x,x.originY=c[1][0]-x.y}function _(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function S(x,A,C,M,I){x[M]+=C[M][I]-A[M][I]}},e.prototype._createAxis=function(t,i){var r=i.getData(),a=i.get("axisType"),o=Zwe(i,a);o.getTicks=function(){return r.mapArray(["value"],function(u){return{value:u}})};var s=r.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Ywe("value",o,t.axisExtent,a);return l.model=i,l},e.prototype._createGroup=function(t){var i=this[t]=new ei;return this.group.add(i),i},e.prototype._renderAxisLine=function(t,i,r,a){var o=r.getExtent();if(a.get(["lineStyle","show"])){var s=new Lo({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:It({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});i.add(s);var l=this._progressLine=new Lo({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:qn({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});i.add(l)}},e.prototype._renderAxisTick=function(t,i,r,a){var o=this,s=a.getData(),l=r.scale.getTicks();this._tickSymbols=[],ne(l,function(u){var c=r.dataToCoord(u.value),d=s.getItemModel(u.value),h=d.getModel("itemStyle"),f=d.getModel(["emphasis","itemStyle"]),p=d.getModel(["progress","itemStyle"]),m={x:c,y:0,onclick:An(o._changeTimeline,o,u.value)},v=dG(d,h,i,m);v.ensureState("emphasis").style=f.getItemStyle(),v.ensureState("progress").style=p.getItemStyle(),wp(v);var g=ni(v);d.get("tooltip")?(g.dataIndex=u.value,g.dataModel=a):g.dataIndex=g.dataModel=null,o._tickSymbols.push(v)})},e.prototype._renderAxisLabel=function(t,i,r,a){var o=this,s=r.getLabelModel();if(s.get("show")){var l=a.getData(),u=r.getViewLabels();this._tickLabels=[],ne(u,function(c){var d=c.tickValue,h=l.getItemModel(d),f=h.getModel("label"),p=h.getModel(["emphasis","label"]),m=h.getModel(["progress","label"]),v=r.dataToCoord(c.tickValue),g=new Xi({x:v,y:0,rotation:t.labelRotation-t.rotation,onclick:An(o._changeTimeline,o,d),silent:!1,style:qr(f,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});g.ensureState("emphasis").style=qr(p),g.ensureState("progress").style=qr(m),i.add(g),wp(g),cG(g).dataIndex=d,o._tickLabels.push(g)})}},e.prototype._renderControl=function(t,i,r,a){var o=t.controlSize,s=t.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),d=a.get("inverse",!0);h(t.nextBtnPosition,"next",An(this._changeTimeline,this,d?"-":"+")),h(t.prevBtnPosition,"prev",An(this._changeTimeline,this,d?"+":"-")),h(t.playPosition,c?"stop":"play",An(this._handlePlayClick,this,!c),!0);function h(f,p,m,v){if(f){var g=nu(ai(a.get(["controlStyle",p+"BtnSize"]),o),o),_=[0,-g/2,g,g],S=Qwe(a,p+"Icon",_,{x:f[0],y:f[1],originX:o/2,originY:0,rotation:v?-s:0,rectHover:!0,style:l,onclick:m});S.ensureState("emphasis").style=u,i.add(S),wp(S)}}},e.prototype._renderCurrentPointer=function(t,i,r,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(d){d.draggable=!0,d.drift=An(u._handlePointerDrag,u),d.ondragend=An(u._handlePointerDragend,u),hG(d,u._progressLine,s,r,a,!0)},onUpdate:function(d){hG(d,u._progressLine,s,r,a)}};this._currentPointer=dG(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,i,r){this._clearTimer(),this._pointerChangeTimeline([r.offsetX,r.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,i){var r=this._toAxisCoord(t)[0],a=this._axis,o=x0(a.getExtent().slice());r>o[1]&&(r=o[1]),r<o[0]&&(r=o[0]),this._currentPointer.x=r,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=r,s.dirty());var l=this._findNearestTick(r),u=this.model;(i||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 i=t.model;t._changeTimeline(i.getCurrentIndex()+(i.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var i=this._mainGroup.getLocalTransform();return eu(t,i,!0)},e.prototype._findNearestTick=function(t){var i=this.model.getData(),r=1/0,a,o=this._axis;return i.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-t);c<r&&(r=c,a=l)}),a},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var i=this.model.getCurrentIndex();t==="+"?t=i+1:t==="-"&&(t=i-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),i=this._tickSymbols,r=this._tickLabels;if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",a<t);if(r)for(var a=0;a<r.length;a++)r&&r[a]&&r[a].toggleState("progress",cG(r[a]).dataIndex<=t)},e.type="timeline.slider",e}(qwe);function Zwe(n,e){if(e=e||n.get("type"),e)switch(e){case"category":return new WE({ordinalMeta:n.getCategories(),extent:[1/0,-1/0]});case"time":return new XY({locale:n.ecModel.getLocaleModel(),useUTC:n.ecModel.get("useUTC")});default:return new Ih}}function Jwe(n,e){return uo(n.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},n.get("padding"))}function Qwe(n,e,t,i){var r=i.style,a=b3(n.get(["controlStyle",e]),i||{},new gi(t[0],t[1],t[2],t[3]));return r&&a.setStyle(r),a}function dG(n,e,t,i,r,a){var o=e.get("color");if(r)r.setColor(o),t.add(r),a&&a.onUpdate(r);else{var s=n.get("symbol");r=Ya(s,-1,-1,2,2,o),r.setStyle("strokeNoScale",!0),t.add(r),a&&a.onCreate(r)}var l=e.getItemStyle(["color"]);r.setStyle(l),i=ui({rectHover:!0,z2:100},i,!0);var u=Kv(n.get("symbolSize"));i.scaleX=u[0]/2,i.scaleY=u[1]/2;var c=n1(n.get("symbolOffset"),u);c&&(i.x=(i.x||0)+c[0],i.y=(i.y||0)+c[1]);var d=n.get("symbolRotate");return i.rotation=(d||0)*Math.PI/180||0,r.attr(i),r.updateTransform(),r}function hG(n,e,t,i,r,a){if(!n.dragging){var o=r.getModel("checkpointStyle"),s=i.dataToCoord(r.getData().get("value",t));if(a||!o.get("animation",!0))n.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};n.stopAnimation(null,!0),n.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}const eTe=Kwe;function tTe(n){n.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,i){var r=t.getComponent("timeline");return r&&e.currentIndex!=null&&(r.setCurrentIndex(e.currentIndex),!r.get("loop",!0)&&r.isIndexMax()&&r.getPlayState()&&(r.setPlayState(!1),i.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:r.get("replaceMerge",!0)}),qn({currentIndex:r.option.currentIndex},e)}),n.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var i=t.getComponent("timeline");i&&e.playState!=null&&i.setPlayState(e.playState)})}function nTe(n){var e=n&&n.timeline;$t(e)||(e=e?[e]:[]),ne(e,function(t){t&&iTe(t)})}function iTe(n){var e=n.type,t={number:"value",time:"time"};if(t[e]&&(n.axisType=t[e],delete n.type),fG(n),ep(n,"controlPosition")){var i=n.controlStyle||(n.controlStyle={});ep(i,"position")||(i.position=n.controlPosition),i.position==="none"&&!ep(i,"show")&&(i.show=!1,delete i.position),delete n.controlPosition}ne(n.data||[],function(r){Kn(r)&&!$t(r)&&(!ep(r,"value")&&ep(r,"name")&&(r.value=r.name),fG(r))})}function fG(n){var e=n.itemStyle||(n.itemStyle={}),t=e.emphasis||(e.emphasis={}),i=n.label||n.label||{},r=i.normal||(i.normal={}),a={normal:1,emphasis:1};ne(i,function(o,s){!a[s]&&!ep(r,s)&&(r[s]=o)}),t.label&&!ep(i,"emphasis")&&(i.emphasis=t.label,delete t.label)}function ep(n,e){return n.hasOwnProperty(e)}function rTe(n){n.registerComponentModel(jwe),n.registerComponentView(eTe),n.registerSubTypeDefaulter("timeline",function(){return"slider"}),tTe(n),n.registerPreprocessor(nTe)}function KP(n,e){if(!n)return!1;for(var t=$t(n)?n:[n],i=0;i<t.length;i++)if(t[i]&&t[i][e])return!0;return!1}function L6(n){Fp(n,"label",["show"])}var I6=Gi(),YJ=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,i,r){this.mergeDefaultAndTheme(t,r),this._mergeOption(t,r,!1,!0)},e.prototype.isAnimationEnabled=function(){if(qi.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,i){this._mergeOption(t,i,!1,!1)},e.prototype._mergeOption=function(t,i,r,a){var o=this.mainType;r||i.eachSeries(function(s){var l=s.get(this.mainType,!0),u=I6(s)[o];if(!l||!l.data){I6(s)[o]=null;return}u?u._mergeOption(l,i,!0):(a&&L6(l),ne(l.data,function(c){c instanceof Array?(L6(c[0]),L6(c[1])):L6(c)}),u=this.createMarkerModelFromSeries(l,this,i),It(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),I6(s)[o]=u},this)},e.prototype.formatTooltip=function(t,i,r){var a=this.getData(),o=this.getRawValue(t),s=a.getName(t);return So("section",{header:this.name,blocks:[So("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,i){var r=z_.prototype.getDataParams.call(this,t,i),a=this.__hostSeries;return a&&(r.seriesId=a.id,r.seriesName=a.name,r.seriesType=a.subType),r},e.getMarkerModelFromSeries=function(t,i){return I6(t)[i]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}($i);Za(YJ,z_.prototype);const kh=YJ;var aTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,r){return new e(t,i,r)},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}(kh);const oTe=aTe;function CC(n){return!(isNaN(parseFloat(n.x))&&isNaN(parseFloat(n.y)))}function sTe(n){return!isNaN(parseFloat(n.x))&&!isNaN(parseFloat(n.y))}function D6(n,e,t,i,r,a){var o=[],s=Lh(e,i),l=s?e.getCalculationInfo("stackResultDimension"):i,u=ZP(e,l,n),c=e.indicesOfNearest(l,u)[0];o[r]=e.get(t,c),o[a]=e.get(l,c);var d=e.get(i,c),h=Bu(e.get(i,c));return h=Math.min(h,20),h>=0&&(o[a]=+o[a].toFixed(h)),[o,d]}var cw={min:si(D6,"min"),max:si(D6,"max"),average:si(D6,"average"),median:si(D6,"median")};function X9(n,e){if(e){var t=n.getData(),i=n.coordinateSystem,r=i&&i.dimensions;if(!sTe(e)&&!$t(e.coord)&&$t(r)){var a=KJ(e,t,i,n);if(e=Zn(e),e.type&&cw[e.type]&&a.baseAxis&&a.valueAxis){var o=xi(r,a.baseAxis.dim),s=xi(r,a.valueAxis.dim),l=cw[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||!$t(r))e.coord=[];else for(var u=e.coord,c=0;c<2;c++)cw[u[c]]&&(u[c]=ZP(t,t.mapDimension(r[c]),u[c]));return e}}function KJ(n,e,t,i){var r={};return n.valueIndex!=null||n.valueDim!=null?(r.valueDataDim=n.valueIndex!=null?e.getDimension(n.valueIndex):n.valueDim,r.valueAxis=t.getAxis(lTe(i,r.valueDataDim)),r.baseAxis=t.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=t.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function lTe(n,e){var t=n.getData().getDimensionInfo(e);return t&&t.coordDim}function Y9(n,e){return n&&n.containData&&e.coord&&!CC(e)?n.containData(e.coord):!0}function uTe(n,e,t){return n&&n.containZone&&e.coord&&t.coord&&!CC(e)&&!CC(t)?n.containZone(e.coord,t.coord):!0}function ZJ(n,e){return n?function(t,i,r,a){var o=a<2?t.coord&&t.coord[a]:t.value;return gh(o,e[a])}:function(t,i,r,a){return gh(t.value,e[a])}}function ZP(n,e,t){if(t==="average"){var i=0,r=0;return n.each(e,function(a,o){isNaN(a)||(i+=a,r++)}),i/r}else return t==="median"?n.getMedian(e):n.getDataExtent(e)[t==="max"?1:0]}var dw=Gi(),cTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=In()},e.prototype.render=function(t,i,r){var a=this,o=this.markerGroupMap;o.each(function(s){dw(s).keep=!1}),i.eachSeries(function(s){var l=kh.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,i,r)}),o.each(function(s){!dw(s).keep&&a.group.remove(s.group)})},e.prototype.markKeep=function(t){dw(t).keep=!0},e.prototype.toggleBlurSeries=function(t,i){var r=this;ne(t,function(a){var o=kh.getMarkerModelFromSeries(a,r.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(i?xq(l):fE(l))})}})},e.type="marker",e}(xa);const JP=cTe;function pG(n,e,t){var i=e.coordinateSystem;n.each(function(r){var a=n.getItemModel(r),o,s=_n(a.get("x"),t.getWidth()),l=_n(a.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(n.getValues(n.dimensions,r));else if(i){var u=n.get(i.dimensions[0],r),c=n.get(i.dimensions[1],r);o=i.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),n.setItemLayout(r,o)})}var dTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,r){i.eachSeries(function(a){var o=kh.getMarkerModelFromSeries(a,"markPoint");o&&(pG(o.getData(),a,r),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(t,i,r,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new M3),d=hTe(o,t,i);i.setData(d),pG(i.getData(),t,a),d.each(function(h){var f=d.getItemModel(h),p=f.getShallow("symbol"),m=f.getShallow("symbolSize"),v=f.getShallow("symbolRotate"),g=f.getShallow("symbolOffset"),_=f.getShallow("symbolKeepAspect");if($n(p)||$n(m)||$n(v)||$n(g)){var S=i.getRawValue(h),x=i.getDataParams(h);$n(p)&&(p=p(S,x)),$n(m)&&(m=m(S,x)),$n(v)&&(v=v(S,x)),$n(g)&&(g=g(S,x))}var A=f.getModel("itemStyle").getItemStyle(),C=w3(l,"color");A.fill||(A.fill=C),d.setItemVisual(h,{symbol:p,symbolSize:m,symbolRotate:v,symbolOffset:g,symbolKeepAspect:_,style:A})}),c.updateData(d),this.group.add(c.group),d.eachItemGraphicEl(function(h){h.traverse(function(f){ni(f).dataModel=i})}),this.markKeep(c),c.group.silent=i.get("silent")||t.get("silent")},e.type="markPoint",e}(JP);function hTe(n,e,t){var i;n?i=Xt(n&&n.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return It(It({},l),{name:s,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var r=new Rs(i,t),a=Xt(t.get("data"),si(X9,e));n&&(a=dr(a,si(Y9,n)));var o=ZJ(!!n,i);return r.initData(a,null,o),r}const fTe=dTe;function pTe(n){n.registerComponentModel(oTe),n.registerComponentView(fTe),n.registerPreprocessor(function(e){KP(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var vTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,r){return new e(t,i,r)},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}(kh);const mTe=vTe;var N6=Gi(),gTe=function(n,e,t,i){var r=n.getData(),a;if($t(i))a=i;else{var o=i.type;if(o==="min"||o==="max"||o==="average"||o==="median"||i.xAxis!=null||i.yAxis!=null){var s=void 0,l=void 0;if(i.yAxis!=null||i.xAxis!=null)s=e.getAxis(i.yAxis!=null?"y":"x"),l=Ro(i.yAxis,i.xAxis);else{var u=KJ(i,r,e,n);s=u.valueAxis;var c=NY(r,u.valueDataDim);l=ZP(r,c,o)}var d=s.dim==="x"?0:1,h=1-d,f=Zn(i),p={coord:[]};f.type=null,f.coord=[],f.coord[h]=-1/0,p.coord[h]=1/0;var m=t.get("precision");m>=0&&Yi(l)&&(l=+l.toFixed(Math.min(m,20))),f.coord[d]=p.coord[d]=l,a=[f,p,{type:o,valueIndex:i.valueIndex,value:l}]}else a=[]}var v=[X9(n,a[0]),X9(n,a[1]),It({},a[2])];return v[2].type=v[2].type||null,ui(v[2],v[0]),ui(v[2],v[1]),v};function T8(n){return!isNaN(n)&&!isFinite(n)}function vG(n,e,t,i){var r=1-n,a=i.dimensions[n];return T8(e[r])&&T8(t[r])&&e[n]===t[n]&&i.getAxis(a).containData(e[n])}function yTe(n,e){if(n.type==="cartesian2d"){var t=e[0].coord,i=e[1].coord;if(t&&i&&(vG(1,t,i,n)||vG(0,t,i,n)))return!0}return Y9(n,e[0])&&Y9(n,e[1])}function hw(n,e,t,i,r){var a=i.coordinateSystem,o=n.getItemModel(e),s,l=_n(o.get("x"),r.getWidth()),u=_n(o.get("y"),r.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition)s=i.getMarkerPosition(n.getValues(n.dimensions,e));else{var c=a.dimensions,d=n.get(c[0],e),h=n.get(c[1],e);s=a.dataToPoint([d,h])}if(r1(a,"cartesian2d")){var f=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;T8(n.get(c[0],e))?s[0]=f.toGlobalCoord(f.getExtent()[t?0:1]):T8(n.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}n.setItemLayout(e,s)}var _Te=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,r){i.eachSeries(function(a){var o=kh.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=N6(o).from,u=N6(o).to;l.each(function(c){hw(l,c,!0,a,r),hw(u,c,!1,a,r)}),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,i,r,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new _P);this.group.add(c.group);var d=STe(o,t,i),h=d.from,f=d.to,p=d.line;N6(i).from=h,N6(i).to=f,i.setData(p);var m=i.get("symbol"),v=i.get("symbolSize"),g=i.get("symbolRotate"),_=i.get("symbolOffset");$t(m)||(m=[m,m]),$t(v)||(v=[v,v]),$t(g)||(g=[g,g]),$t(_)||(_=[_,_]),d.from.each(function(x){S(h,x,!0),S(f,x,!1)}),p.each(function(x){var A=p.getItemModel(x).getModel("lineStyle").getLineStyle();p.setItemLayout(x,[h.getItemLayout(x),f.getItemLayout(x)]),A.stroke==null&&(A.stroke=h.getItemVisual(x,"style").fill),p.setItemVisual(x,{fromSymbolKeepAspect:h.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(x,"symbolOffset"),fromSymbolRotate:h.getItemVisual(x,"symbolRotate"),fromSymbolSize:h.getItemVisual(x,"symbolSize"),fromSymbol:h.getItemVisual(x,"symbol"),toSymbolKeepAspect:f.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:f.getItemVisual(x,"symbolOffset"),toSymbolRotate:f.getItemVisual(x,"symbolRotate"),toSymbolSize:f.getItemVisual(x,"symbolSize"),toSymbol:f.getItemVisual(x,"symbol"),style:A})}),c.updateData(p),d.line.eachItemGraphicEl(function(x){ni(x).dataModel=i,x.traverse(function(A){ni(A).dataModel=i})});function S(x,A,C){var M=x.getItemModel(A);hw(x,A,C,t,a);var I=M.getModel("itemStyle").getItemStyle();I.fill==null&&(I.fill=w3(l,"color")),x.setItemVisual(A,{symbolKeepAspect:M.get("symbolKeepAspect"),symbolOffset:ai(M.get("symbolOffset",!0),_[C?0:1]),symbolRotate:ai(M.get("symbolRotate",!0),g[C?0:1]),symbolSize:ai(M.get("symbolSize"),v[C?0:1]),symbol:ai(M.get("symbol",!0),m[C?0:1]),style:I})}this.markKeep(c),c.group.silent=i.get("silent")||t.get("silent")},e.type="markLine",e}(JP);function STe(n,e,t){var i;n?i=Xt(n&&n.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return It(It({},c),{name:u,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var r=new Rs(i,t),a=new Rs(i,t),o=new Rs([],t),s=Xt(t.get("data"),si(gTe,e,n,t));n&&(s=dr(s,si(yTe,n)));var l=ZJ(!!n,i);return r.initData(Xt(s,function(u){return u[0]}),null,l),a.initData(Xt(s,function(u){return u[1]}),null,l),o.initData(Xt(s,function(u){return u[2]})),o.hasItemOption=!0,{from:r,to:a,line:o}}const bTe=_Te;function xTe(n){n.registerComponentModel(mTe),n.registerComponentView(bTe),n.registerPreprocessor(function(e){KP(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var wTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,r){return new e(t,i,r)},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}(kh);const TTe=wTe;var k6=Gi(),ATe=function(n,e,t,i){var r=i[0],a=i[1];if(!(!r||!a)){var o=X9(n,r),s=X9(n,a),l=o.coord,u=s.coord;l[0]=Ro(l[0],-1/0),l[1]=Ro(l[1],-1/0),u[0]=Ro(u[0],1/0),u[1]=Ro(u[1],1/0);var c=XM([{},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 A8(n){return!isNaN(n)&&!isFinite(n)}function mG(n,e,t,i){var r=1-n;return A8(e[r])&&A8(t[r])}function CTe(n,e){var t=e.coord[0],i=e.coord[1],r={coord:t,x:e.x0,y:e.y0},a={coord:i,x:e.x1,y:e.y1};return r1(n,"cartesian2d")?t&&i&&(mG(1,t,i)||mG(0,t,i))?!0:uTe(n,r,a):Y9(n,r)||Y9(n,a)}function gG(n,e,t,i,r){var a=i.coordinateSystem,o=n.getItemModel(e),s,l=_n(o.get(t[0]),r.getWidth()),u=_n(o.get(t[1]),r.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition){var c=n.getValues(["x0","y0"],e),d=n.getValues(["x1","y1"],e),h=a.clampData(c),f=a.clampData(d),p=[];t[0]==="x0"?p[0]=h[0]>f[0]?d[0]:c[0]:p[0]=h[0]>f[0]?c[0]:d[0],t[1]==="y0"?p[1]=h[1]>f[1]?d[1]:c[1]:p[1]=h[1]>f[1]?c[1]:d[1],s=i.getMarkerPosition(p,t,!0)}else{var m=n.get(t[0],e),v=n.get(t[1],e),g=[m,v];a.clampData&&a.clampData(g,g),s=a.dataToPoint(g,!0)}if(r1(a,"cartesian2d")){var _=a.getAxis("x"),S=a.getAxis("y"),m=n.get(t[0],e),v=n.get(t[1],e);A8(m)?s[0]=_.toGlobalCoord(_.getExtent()[t[0]==="x0"?0:1]):A8(v)&&(s[1]=S.toGlobalCoord(S.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var yG=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],MTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,r){i.eachSeries(function(a){var o=kh.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=Xt(yG,function(d){return gG(s,l,d,a,r)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,i,r,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new ei});this.group.add(c.group),this.markKeep(c);var d=ETe(o,t,i);i.setData(d),d.each(function(h){var f=Xt(yG,function(I){return gG(d,h,I,t,a)}),p=o.getAxis("x").scale,m=o.getAxis("y").scale,v=p.getExtent(),g=m.getExtent(),_=[p.parse(d.get("x0",h)),p.parse(d.get("x1",h))],S=[m.parse(d.get("y0",h)),m.parse(d.get("y1",h))];x0(_),x0(S);var x=!(v[0]>_[1]||v[1]<_[0]||g[0]>S[1]||g[1]<S[0]),A=!x;d.setItemLayout(h,{points:f,allClipped:A});var C=d.getItemModel(h).getModel("itemStyle").getItemStyle(),M=w3(l,"color");C.fill||(C.fill=M,xn(C.fill)&&(C.fill=G5(C.fill,.4))),C.stroke||(C.stroke=M),d.setItemVisual(h,"style",C)}),d.diff(k6(c).data).add(function(h){var f=d.getItemLayout(h);if(!f.allClipped){var p=new ul({shape:{points:f.points}});d.setItemGraphicEl(h,p),c.group.add(p)}}).update(function(h,f){var p=k6(c).data.getItemGraphicEl(f),m=d.getItemLayout(h);m.allClipped?p&&c.group.remove(p):(p?Qi(p,{shape:{points:m.points}},i,h):p=new ul({shape:{points:m.points}}),d.setItemGraphicEl(h,p),c.group.add(p))}).remove(function(h){var f=k6(c).data.getItemGraphicEl(h);c.group.remove(f)}).execute(),d.eachItemGraphicEl(function(h,f){var p=d.getItemModel(f),m=d.getItemVisual(f,"style");h.useStyle(d.getItemVisual(f,"style")),$o(h,_o(p),{labelFetcher:i,labelDataIndex:f,defaultText:d.getName(f)||"",inheritColor:xn(m.fill)?G5(m.fill,1):"#000"}),jo(h,p),ya(h,null,null,p.get(["emphasis","disabled"])),ni(h).dataModel=i}),k6(c).data=d,c.group.silent=i.get("silent")||t.get("silent")},e.type="markArea",e}(JP);function ETe(n,e,t){var i,r,a=["x0","y0","x1","y1"];if(n){var o=Xt(n&&n.dimensions,function(u){var c=e.getData(),d=c.getDimensionInfo(c.mapDimension(u))||{};return It(It({},d),{name:u,ordinalMeta:null})});r=Xt(a,function(u,c){return{name:u,type:o[c%2].type}}),i=new Rs(r,t)}else r=[{name:"value",type:"float"}],i=new Rs(r,t);var s=Xt(t.get("data"),si(ATe,e,n,t));n&&(s=dr(s,si(CTe,n)));var l=n?function(u,c,d,h){var f=u.coord[Math.floor(h/2)][h%2];return gh(f,r[h])}:function(u,c,d,h){return gh(u.value,r[h])};return i.initData(s,null,l),i.hasItemOption=!0,i}const PTe=MTe;function RTe(n){n.registerComponentModel(TTe),n.registerComponentView(PTe),n.registerPreprocessor(function(e){KP(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var LTe=function(n,e){if(e==="all")return{type:"all",title:n.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:n.getLocaleModel().get(["legend","selector","inverse"])}},ITe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,i,r){this.mergeDefaultAndTheme(t,r),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,i){n.prototype.mergeOption.call(this,t,i),this._updateSelector(t)},e.prototype._updateSelector=function(t){var i=t.selector,r=this.ecModel;i===!0&&(i=t.selector=["all","inverse"]),$t(i)&&ne(i,function(a,o){xn(a)&&(a={type:a}),i[o]=ui(a,LTe(r,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var i=!1,r=0;r<t.length;r++){var a=t[r].get("name");if(this.isSelected(a)){this.select(a),i=!0;break}}!i&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var i=[],r=[];t.eachRawSeries(function(l){var u=l.name;r.push(u);var c;if(l.legendVisualProvider){var d=l.legendVisualProvider,h=d.getAllNames();t.isSeriesFiltered(l)||(r=r.concat(h)),h.length?i=i.concat(h):c=!0}else c=!0;c&&aE(l)&&i.push(l.name)}),this._availableNames=r;var a=this.get("data")||i,o=In(),s=Xt(a,function(l){return(xn(l)||Yi(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Xr(l,this,this.ecModel))},this);this._data=dr(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var i=this.option.selected,r=this.get("selectedMode");if(r==="single"){var a=this._data;ne(a,function(o){i[o.get("name")]=!1})}i[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var i=this.option.selected;i.hasOwnProperty(t)||(i[t]=!0),this[i[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,i=this.option.selected;ne(t,function(r){i[r.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,i=this.option.selected;ne(t,function(r){var a=r.get("name",!0);i.hasOwnProperty(a)||(i[a]=!0),i[a]=!i[a]})},e.prototype.isSelected=function(t){var i=this.option.selected;return!(i.hasOwnProperty(t)&&!i[t])&&xi(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}($i);const MC=ITe;var W1=si,EC=ne,F6=ei,DTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new F6),this.group.add(this._selectorGroup=new F6),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,i,r){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,i,r,l,s,u);var c=t.getBoxLayoutParams(),d={width:r.getWidth(),height:r.getHeight()},h=t.get("padding"),f=uo(c,d,h),p=this.layoutInner(t,o,f,a,l,u),m=uo(qn({width:p.width,height:p.height},c),d,h);this.group.x=m.x-p.x,this.group.y=m.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=zJ(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,i,r,a,o,s,l){var u=this.getContentGroup(),c=In(),d=i.get("selectedMode"),h=[];r.eachRawSeries(function(f){!f.get("legendHoverLink")&&h.push(f.id)}),EC(i.getData(),function(f,p){var m=f.get("name");if(!this.newlineDisabled&&(m===""||m===`
`)){var v=new F6;v.newline=!0,u.add(v);return}var g=r.getSeriesByName(m)[0];if(!c.get(m))if(g){var _=g.getData(),S=_.getVisual("legendLineStyle")||{},x=_.getVisual("legendIcon"),A=_.getVisual("style"),C=this._createItem(g,m,p,f,i,t,S,A,x,d,a);C.on("click",W1(_G,m,null,a,h)).on("mouseover",W1(PC,g.name,null,a,h)).on("mouseout",W1(RC,g.name,null,a,h)),r.ssr&&C.eachChild(function(M){var I=ni(M);I.seriesIndex=g.seriesIndex,I.dataIndex=p,I.ssrType="legend"}),c.set(m,!0)}else r.eachRawSeries(function(M){if(!c.get(m)&&M.legendVisualProvider){var I=M.legendVisualProvider;if(!I.containName(m))return;var D=I.indexOfName(m),E=I.getItemVisual(D,"style"),P=I.getItemVisual(D,"legendIcon"),F=Nl(E.fill);F&&F[3]===0&&(F[3]=.2,E=It(It({},E),{fill:zc(F,"rgba")}));var V=this._createItem(M,m,p,f,i,t,{},E,P,d,a);V.on("click",W1(_G,null,m,a,h)).on("mouseover",W1(PC,null,m,a,h)).on("mouseout",W1(RC,null,m,a,h)),r.ssr&&V.eachChild(function(G){var W=ni(G);W.seriesIndex=M.seriesIndex,W.dataIndex=p,W.ssrType="legend"}),c.set(m,!0)}},this)},this),o&&this._createSelector(o,i,a,s,l)},e.prototype._createSelector=function(t,i,r,a,o){var s=this.getSelectorGroup();EC(t,function(u){var c=u.type,d=new Xi({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){r.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:i.id})}});s.add(d);var h=i.getModel("selectorLabel"),f=i.getModel(["emphasis","selectorLabel"]);$o(d,{normal:h,emphasis:f},{defaultText:u.title}),wp(d)})},e.prototype._createItem=function(t,i,r,a,o,s,l,u,c,d,h){var f=t.visualDrawType,p=o.get("itemWidth"),m=o.get("itemHeight"),v=o.isSelected(i),g=a.get("symbolRotate"),_=a.get("symbolKeepAspect"),S=a.get("icon");c=S||c||"roundRect";var x=NTe(c,a,l,u,f,v,h),A=new F6,C=a.getModel("textStyle");if($n(t.getLegendIcon)&&(!S||S==="inherit"))A.add(t.getLegendIcon({itemWidth:p,itemHeight:m,icon:c,iconRotate:g,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:_}));else{var M=S==="inherit"&&t.getData().getVisual("symbol")?g==="inherit"?t.getData().getVisual("symbolRotate"):g:0;A.add(kTe({itemWidth:p,itemHeight:m,icon:c,iconRotate:M,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:_}))}var I=s==="left"?p+5:-5,D=s,E=o.get("formatter"),P=i;xn(E)&&E?P=E.replace("{name}",i!=null?i:""):$n(E)&&(P=E(i));var F=v?C.getTextColor():a.get("inactiveColor");A.add(new Xi({style:qr(C,{text:P,x:I,y:m/2,fill:F,align:D,verticalAlign:"middle"},{inheritColor:F})}));var V=new Hi({shape:A.getBoundingRect(),style:{fill:"transparent"}}),G=a.getModel("tooltip");return G.get("show")&&Qp({el:V,componentModel:o,itemName:i,itemTooltipOption:G.option}),A.add(V),A.eachChild(function(W){W.silent=!0}),V.silent=!d,this.getContentGroup().add(A),wp(A),A.__legendDataIndex=r,A},e.prototype.layoutInner=function(t,i,r,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ap(t.get("orient"),l,t.get("itemGap"),r.width,r.height);var c=l.getBoundingRect(),d=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Ap("horizontal",u,t.get("selectorItemGap",!0));var h=u.getBoundingRect(),f=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),m=t.getOrient().index,v=m===0?"width":"height",g=m===0?"height":"width",_=m===0?"y":"x";s==="end"?f[m]+=c[v]+p:d[m]+=h[v]+p,f[1-m]+=c[g]/2-h[g]/2,u.x=f[0],u.y=f[1],l.x=d[0],l.y=d[1];var S={x:0,y:0};return S[v]=c[v]+p+h[v],S[g]=Math.max(c[g],h[g]),S[_]=Math.min(0,h[_]+f[1-m]),S}else return l.x=d[0],l.y=d[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(xa);function NTe(n,e,t,i,r,a,o){function s(v,g){v.lineWidth==="auto"&&(v.lineWidth=g.lineWidth>0?2:0),EC(v,function(_,S){v[S]==="inherit"&&(v[S]=g[S])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=n.lastIndexOf("empty",0)===0?"fill":"stroke",d=l.getShallow("decal");u.decal=!d||d==="inherit"?i.decal:vv(d,o),u.fill==="inherit"&&(u.fill=i[r]),u.stroke==="inherit"&&(u.stroke=i[c]),u.opacity==="inherit"&&(u.opacity=(r==="fill"?i:t).opacity),s(u,i);var h=e.getModel("lineStyle"),f=h.getLineStyle();if(s(f,t),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),f.stroke==="auto"&&(f.stroke=i.fill),!a){var p=e.get("inactiveBorderWidth"),m=u[c];u.lineWidth=p==="auto"?i.lineWidth>0&&m?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),f.stroke=h.get("inactiveColor"),f.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:f}}function kTe(n){var e=n.icon||"roundRect",t=Ya(e,0,0,n.itemWidth,n.itemHeight,n.itemStyle.fill,n.symbolKeepAspect);return t.setStyle(n.itemStyle),t.rotation=(n.iconRotate||0)*Math.PI/180,t.setOrigin([n.itemWidth/2,n.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function _G(n,e,t,i){RC(n,e,t,i),t.dispatchAction({type:"legendToggleSelect",name:n!=null?n:e}),PC(n,e,t,i)}function JJ(n){for(var e=n.getZr().storage.getDisplayList(),t,i=0,r=e.length;i<r&&!(t=e[i].states.emphasis);)i++;return t&&t.hoverLayer}function PC(n,e,t,i){JJ(t)||t.dispatchAction({type:"highlight",seriesName:n,name:e,excludeSeriesId:i})}function RC(n,e,t,i){JJ(t)||t.dispatchAction({type:"downplay",seriesName:n,name:e,excludeSeriesId:i})}const QJ=DTe;function FTe(n){var e=n.findComponents({mainType:"legend"});e&&e.length&&n.filterSeries(function(t){for(var i=0;i<e.length;i++)if(!e[i].isSelected(t.name))return!1;return!0})}function Zm(n,e,t){var i=n==="allSelect"||n==="inverseSelect",r={},a=[];t.eachComponent({mainType:"legend",query:e},function(s){i?s[n]():s[n](e.name),SG(s,r),a.push(s.componentIndex)});var o={};return t.eachComponent("legend",function(s){ne(r,function(l,u){s[l?"select":"unSelect"](u)}),SG(s,o)}),i?{selected:o,legendIndex:a}:{name:e.name,selected:o}}function SG(n,e){var t=e||{};return ne(n.getData(),function(i){var r=i.get("name");if(!(r===`
`||r==="")){var a=n.isSelected(r);Mn(t,r)?t[r]=t[r]&&a:t[r]=a}}),t}function OTe(n){n.registerAction("legendToggleSelect","legendselectchanged",si(Zm,"toggleSelected")),n.registerAction("legendAllSelect","legendselectall",si(Zm,"allSelect")),n.registerAction("legendInverseSelect","legendinverseselect",si(Zm,"inverseSelect")),n.registerAction("legendSelect","legendselected",si(Zm,"select")),n.registerAction("legendUnSelect","legendunselected",si(Zm,"unSelect"))}function eQ(n){n.registerComponentModel(MC),n.registerComponentView(QJ),n.registerProcessor(n.PRIORITY.PROCESSOR.SERIES_FILTER,FTe),n.registerSubTypeDefaulter("legend",function(){return"plain"}),OTe(n)}var BTe=function(n){ot(e,n);function e(){var t=n!==null&&n.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,i,r){var a=jv(t);n.prototype.init.call(this,t,i,r),bG(this,t,a)},e.prototype.mergeOption=function(t,i){n.prototype.mergeOption.call(this,t,i),bG(this,this.option,t)},e.type="legend.scroll",e.defaultOption=Uh(MC.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}(MC);function bG(n,e,t){var i=n.getOrient(),r=[1,1];r[i.index]=0,Rh(e,t,{type:"box",ignoreSize:!!r})}const zTe=BTe;var xG=ei,fw=["width","height"],pw=["x","y"],GTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){n.prototype.init.call(this),this.group.add(this._containerGroup=new xG),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new xG)},e.prototype.resetInner=function(){n.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,i,r,a,o,s,l){var u=this;n.prototype.renderInner.call(this,t,i,r,a,o,s,l);var c=this._controllerGroup,d=i.get("pageIconSize",!0),h=$t(d)?d:[d,d];p("pagePrev",0);var f=i.getModel("pageTextStyle");c.add(new Xi({name:"pageText",style:{text:"xx/xx",fill:f.getTextColor(),font:f.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(m,v){var g=m+"DataIndex",_=b3(i.get("pageIcons",!0)[i.getOrient().name][v],{onclick:An(u._pageGo,u,g,i,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});_.name=m,c.add(_)}},e.prototype.layoutInner=function(t,i,r,a,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,c=fw[u],d=pw[u],h=fw[1-u],f=pw[1-u];o&&Ap("horizontal",l,t.get("selectorItemGap",!0));var p=t.get("selectorButtonGap",!0),m=l.getBoundingRect(),v=[-m.x,-m.y],g=Zn(r);o&&(g[c]=r[c]-m[c]-p);var _=this._layoutContentAndController(t,a,g,u,c,h,f,d);if(o){if(s==="end")v[u]+=_[c]+p;else{var S=m[c]+p;v[u]-=S,_[d]-=S}_[c]+=m[c]+p,v[1-u]+=_[f]+_[h]/2-m[h]/2,_[h]=Math.max(_[h],m[h]),_[f]=Math.min(_[f],m[f]+v[1-u]),l.x=v[0],l.y=v[1],l.markRedraw()}return _},e.prototype._layoutContentAndController=function(t,i,r,a,o,s,l,u){var c=this.getContentGroup(),d=this._containerGroup,h=this._controllerGroup;Ap(t.get("orient"),c,t.get("itemGap"),a?r.width:null,a?null:r.height),Ap("horizontal",h,t.get("pageButtonItemGap",!0));var f=c.getBoundingRect(),p=h.getBoundingRect(),m=this._showController=f[o]>r[o],v=[-f.x,-f.y];i||(v[a]=c[u]);var g=[0,0],_=[-p.x,-p.y],S=ai(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(m){var x=t.get("pageButtonPosition",!0);x==="end"?_[a]+=r[o]-p[o]:g[a]+=p[o]+S}_[1-a]+=f[s]/2-p[s]/2,c.setPosition(v),d.setPosition(g),h.setPosition(_);var A={x:0,y:0};if(A[o]=m?r[o]:f[o],A[s]=Math.max(f[s],p[s]),A[l]=Math.min(0,p[l]+_[1-a]),d.__rectSize=r[o],m){var C={x:0,y:0};C[o]=Math.max(r[o]-p[o]-S,0),C[s]=A[s],d.setClipPath(new Hi({shape:C})),d.__rectSize=C[o]}else h.eachChild(function(I){I.attr({invisible:!0,silent:!0})});var M=this._getPageInfo(t);return M.pageIndex!=null&&Qi(c,{x:M.contentPosition[0],y:M.contentPosition[1]},m?t:null),this._updatePageInfoView(t,M),A},e.prototype._pageGo=function(t,i,r){var a=this._getPageInfo(i)[t];a!=null&&r.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:i.id})},e.prototype._updatePageInfoView=function(t,i){var r=this._controllerGroup;ne(["pagePrev","pageNext"],function(c){var d=c+"DataIndex",h=i[d]!=null,f=r.childOfName(c);f&&(f.setStyle("fill",h?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),f.cursor=h?"pointer":"default")});var a=r.childOfName("pageText"),o=t.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;a&&o&&a.setStyle("text",xn(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var i=t.get("scrollDataIndex",!0),r=this.getContentGroup(),a=this._containerGroup.__rectSize,o=t.getOrient().index,s=fw[o],l=pw[o],u=this._findTargetItemIndex(i),c=r.children(),d=c[u],h=c.length,f=h?1:0,p={contentPosition:[r.x,r.y],pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!d)return p;var m=x(d);p.contentPosition[o]=-m.s;for(var v=u+1,g=m,_=m,S=null;v<=h;++v)S=x(c[v]),(!S&&_.e>g.s+a||S&&!A(S,g.s))&&(_.i>g.i?g=_:g=S,g&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=g.i),++p.pageCount)),_=S;for(var v=u-1,g=m,_=m,S=null;v>=-1;--v)S=x(c[v]),(!S||!A(_,S.s))&&g.i<_.i&&(_=g,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=g.i),++p.pageCount,++p.pageIndex),g=S;return p;function x(C){if(C){var M=C.getBoundingRect(),I=M[l]+C[l];return{s:I,e:I+M[s],i:C.__legendDataIndex}}}function A(C,M){return C.e>=M&&C.s<=M+a}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var i,r=this.getContentGroup(),a;return r.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===t&&(i=s)}),i!=null?i:a},e.type="legend.scroll",e}(QJ);const UTe=GTe;function VTe(n){n.registerAction("legendScroll","legendscroll",function(e,t){var i=e.scrollDataIndex;i!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(r){r.setScrollDataIndex(i)})})}function HTe(n){Ci(eQ),n.registerComponentModel(zTe),n.registerComponentView(UTe),VTe(n)}function WTe(n){Ci(eQ),Ci(HTe)}var jTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Uh(q9.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(q9);const $Te=jTe;var QP=Gi();function qTe(n,e,t){QP(n).coordSysRecordMap.each(function(i){var r=i.dataZoomInfoMap.get(e.uid);r&&(r.getRange=t)})}function XTe(n,e){for(var t=QP(n).coordSysRecordMap,i=t.keys(),r=0;r<i.length;r++){var a=i[r],o=t.get(a),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||tQ(t,o))}}}function tQ(n,e){if(e){n.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function YTe(n,e){var t={model:e,containsPoint:si(ZTe,e),dispatchAction:si(KTe,n),dataZoomInfoMap:null,controller:null},i=t.controller=new I3(n.getZr());return ne(["pan","zoom","scrollMove"],function(r){i.on(r,function(a){var o=[];t.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[r],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 KTe(n,e){n.isDisposed()||n.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function ZTe(n,e,t,i){return n.coordinateSystem.containPoint([t,i])}function JTe(n){var e,t="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return n.each(function(a){var o=a.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;i[t+s]>i[t+e]&&(e=s),r=r&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}function QTe(n){n.registerProcessor(n.PRIORITY.PROCESSOR.FILTER,function(e,t){var i=QP(t),r=i.coordSysRecordMap||(i.coordSysRecordMap=In());r.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=FJ(a);ne(o.infoList,function(s){var l=s.model.uid,u=r.get(l)||r.set(l,YTe(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=In());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),r.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){tQ(r,a);return}var c=JTe(l);o.enable(c.controlType,c.opt),o.setPointerChecker(a.containsPoint),Yv(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var eAe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,i,r){if(n.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),qTe(r,t,{pan:An(vw.pan,this),zoom:An(vw.zoom,this),scrollMove:An(vw.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),n.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){XTe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(WP),vw={zoom:function(n,e,t,i){var r=this.range,a=r.slice(),o=n.axisModels[0];if(o){var s=mw[e](null,[i.originX,i.originY],o,t,n),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/i.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(o1(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,r[0]!==a[0]||r[1]!==a[1])return a}},pan:wG(function(n,e,t,i,r,a){var o=mw[i]([a.oldX,a.oldY],[a.newX,a.newY],e,r,t);return o.signal*(n[1]-n[0])*o.pixel/o.pixelLength}),scrollMove:wG(function(n,e,t,i,r,a){var o=mw[i]([0,0],[a.scrollDelta,a.scrollDelta],e,r,t);return o.signal*(n[1]-n[0])*a.scrollDelta})};function wG(n){return function(e,t,i,r){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=n(o,s,e,t,i,r);if(o1(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var mw={grid:function(n,e,t,i,r){var a=t.axis,o={},s=r.model.coordinateSystem.getRect();return n=n||[0,0],a.dim==="x"?(o.pixel=e[0]-n[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-n[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(n,e,t,i,r){var a=t.axis,o={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return n=n?s.pointToCoord(n):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-n[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-n[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(n,e,t,i,r){var a=t.axis,o=r.model.coordinateSystem.getRect(),s={};return n=n||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-n[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-n[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};const tAe=eAe;function nQ(n){jP(n),n.registerComponentModel($Te),n.registerComponentView(tAe),QTe(n)}var nAe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Uh(q9.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}(q9);const iAe=nAe;var Jm=Hi,TG=7,rAe=1,gw=30,aAe=7,Qm="horizontal",AG="vertical",oAe=5,sAe=["line","bar","candlestick","scatter"],lAe={easing:"cubicOut",duration:100,delay:0},uAe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,i){this.api=i,this._onBrush=An(this._onBrush,this),this._onBrushEnd=An(this._onBrushEnd,this)},e.prototype.render=function(t,i,r,a){if(n.prototype.render.apply(this,arguments),Yv(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(),n.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){k9(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 i=this._displayables.sliderGroup=new ei;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(i),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,i=this.api,r=t.get("brushSelect"),a=r?aAe:0,o=this._findCoordRect(),s={width:i.getWidth(),height:i.getHeight()},l=this._orient===Qm?{right:s.width-o.x-o.width,top:s.height-gw-TG-a,width:o.width,height:gw}:{right:TG,top:o.y,width:gw,height:o.height},u=jv(t.option);ne(["right","top","width","height"],function(d){u[d]==="ph"&&(u[d]=l[d])});var c=uo(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===AG&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,i=this._location,r=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(r===Qm&&!o?{scaleY:l?1:-1,scaleX:1}:r===Qm&&o?{scaleY:l?1:-1,scaleX:-1}:r===AG&&!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=i.x-u.x,t.y=i.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,i=this._size,r=this._displayables.sliderGroup,a=t.get("brushSelect");r.add(new Jm({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new Jm({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:An(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)),r.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var i=this._size,r=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||i[0]!==r[0]||i[1]!==r[1]){var d=o.getDataExtent(l),h=(d[1]-d[0])*.3;d=[d[0]-h,d[1]+h];var f=[0,i[1]],p=[0,i[0]],m=[[i[0],0],[0,0]],v=[],g=p[1]/(o.count()-1),_=0,S=Math.round(o.count()/i[0]),x;o.each([l],function(D,E){if(S>0&&E%S){_+=g;return}var P=D==null||isNaN(D)||D==="",F=P?0:pr(D,d,f,!0);P&&!x&&E?(m.push([m[m.length-1][0],0]),v.push([v[v.length-1][0],0])):!P&&x&&(m.push([_,0]),v.push([_,0])),m.push([_,F]),v.push([_,F]),_+=g,x=P}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=v}this._shadowData=o,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var A=this.dataZoomModel;function C(D){var E=A.getModel(D?"selectedDataBackground":"dataBackground"),P=new ei,F=new ul({shape:{points:u},segmentIgnoreThreshold:1,style:E.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),V=new hl({shape:{points:c},segmentIgnoreThreshold:1,style:E.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(F),P.add(V),P}for(var M=0;M<3;M++){var I=C(M===1);this._displayables.sliderGroup.add(I),this._displayables.dataShadowSegs.push(I)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,i=t.get("showDataShadow");if(i!==!1){var r,a=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();ne(l,function(u){if(!r&&!(i!==!0&&xi(sAe,u.get("type"))<0)){var c=a.getComponent(lh(o),s).axis,d=cAe(o),h,f=u.coordinateSystem;d!=null&&f.getOtherAxis&&(h=f.getOtherAxis(c).inverse),d=u.getData().mapDimension(d),r={thisAxis:c,series:u,thisDim:o,otherDim:d,otherAxisInverse:h}}},this)},this),r}},e.prototype._renderHandle=function(){var t=this.group,i=this._displayables,r=i.handles=[null,null],a=i.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,d=l.get("brushSelect"),h=i.filler=new Jm({silent:d,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Jm({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:rAe,fill:"rgba(0,0,0,0)"}})),ne([0,1],function(S){var x=l.get("handleIcon");!t8[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var A=Ya(x,-1,0,2,2,null,!0);A.attr({cursor:CG(this._orient),draggable:!0,drift:An(this._onDragMove,this,S),ondragend:An(this._onDragEnd,this),onmouseover:An(this._showDataInfo,this,!0),onmouseout:An(this._showDataInfo,this,!1),z2:5});var C=A.getBoundingRect(),M=l.get("handleSize");this._handleHeight=_n(M,this._size[1]),this._handleWidth=C.width/C.height*this._handleHeight,A.setStyle(l.getModel("handleStyle").getItemStyle()),A.style.strokeNoScale=!0,A.rectHover=!0,A.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),wp(A);var I=l.get("handleColor");I!=null&&(A.style.fill=I),o.add(r[S]=A);var D=l.getModel("textStyle"),E=l.get("handleLabel")||{},P=E.show||!1;t.add(a[S]=new Xi({silent:!0,invisible:!P,style:qr(D,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:D.getTextColor(),font:D.getFont()}),z2:10}))},this);var f=h;if(d){var p=_n(l.get("moveHandleSize"),s[1]),m=i.moveHandle=new Hi({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),v=p*.8,g=i.moveHandleIcon=Ya(l.get("moveHandleIcon"),-v/2,-v/2,v,v,"#fff",!0);g.silent=!0,g.y=s[1]+p/2-.5,m.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var _=Math.min(s[1]/2,Math.max(p,10));f=i.moveZone=new Hi({invisible:!0,shape:{y:s[1]-_,height:p+_}}),f.on("mouseover",function(){u.enterEmphasis(m)}).on("mouseout",function(){u.leaveEmphasis(m)}),o.add(m),o.add(g),o.add(f)}f.attr({draggable:!0,cursor:CG(this._orient),drift:An(this._onDragMove,this,"all"),ondragstart:An(this._showDataInfo,this,!0),ondragend:An(this._onDragEnd,this),onmouseover:An(this._showDataInfo,this,!0),onmouseout:An(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[pr(t[0],[0,100],i,!0),pr(t[1],[0,100],i,!0)]},e.prototype._updateInterval=function(t,i){var r=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=r.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];o1(i,a,o,r.get("zoomLock")?"all":t,s.minSpan!=null?pr(s.minSpan,l,o,!0):null,s.maxSpan!=null?pr(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=x0([pr(a[0],o,l,!0),pr(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var i=this._displayables,r=this._handleEnds,a=x0(r.slice()),o=this._size;ne([0,1],function(f){var p=i.handles[f],m=this._handleHeight;p.attr({scaleX:m/2,scaleY:m/2,x:r[f]+(f?-1:1),y:o[1]/2-m/2})},this),i.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]};i.moveHandle&&(i.moveHandle.setShape(s),i.moveZone.setShape(s),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=i.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;c<l.length;c++){var d=l[c],h=d.getClipPath();h||(h=new Hi,d.setClipPath(h)),h.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var i=this.dataZoomModel,r=this._displayables,a=r.handleLabels,o=this._orient,s=["",""];if(i.get("showDetail")){var l=i.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,d=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(d[0],u),this._formatLabel(d[1],u)]}}var h=x0(this._handleEnds.slice());f.call(this,0),f.call(this,1);function f(p){var m=Tp(r.handles[p].parent,this.group),v=R_(p===0?"right":"left",m),g=this._handleWidth/2+oAe,_=eu([h[p]+(p===0?-g:g),this._size[1]/2],m);a[p].setStyle({x:_[0],y:_[1],verticalAlign:o===Qm?"middle":v,align:o===Qm?v:"center",text:s[p]})}},e.prototype._formatLabel=function(t,i){var r=this.dataZoomModel,a=r.get("labelFormatter"),o=r.get("labelPrecision");(o==null||o==="auto")&&(o=i.getPixelPrecision());var s=t==null||isNaN(t)?"":i.type==="category"||i.type==="time"?i.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return $n(a)?a(t,s):xn(a)?a.replace("{value}",s):s},e.prototype._showDataInfo=function(t){var i=this.dataZoomModel.get("handleLabel")||{},r=i.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,s=t||this._dragging?o:r,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,i,r,a){this._dragging=!0,Wc(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=eu([i,r],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 i=this._size,r=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(r[0]<0||r[0]>i[0]||r[1]<0||r[1]>i[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",r[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var i=t.offsetX,r=t.offsetY;this._brushStart=new fi(i,r),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var r=i.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(r.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=x0([pr(r.x,o,s,!0),pr(r.x+r.width,o,s,!0)]),this._handleEnds=[r.x,r.x+r.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Wc(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,i){var r=this._displayables,a=this.dataZoomModel,o=r.brushRect;o||(o=r.brushRect=new Jm({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),r.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,i),c=l.transformCoordToLocal(s.x,s.y),d=this._size;u[0]=Math.max(Math.min(d[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:d[1]})},e.prototype._dispatchZoomAction=function(t){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?lAe:null,start:i[0],end:i[1]})},e.prototype._findCoordRect=function(){var t,i=FJ(this.dataZoomModel).infoList;if(!t&&i.length){var r=i[0].model.coordinateSystem;t=r.getRect&&r.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}(WP);function cAe(n){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[n]}function CG(n){return n==="vertical"?"ns-resize":"ew-resize"}const dAe=uAe;function iQ(n){n.registerComponentModel(iAe),n.registerComponentView(dAe),jP(n)}function hAe(n){Ci(nQ),Ci(iQ)}var fAe={get:function(n,e,t){var i=Zn((pAe[n]||{})[e]);return t&&$t(i)?i[i.length-1]:i}},pAe={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 rQ=fAe;var MG=Wo.mapVisual,vAe=Wo.eachVisual,mAe=$t,EG=ne,gAe=x0,yAe=pr,_Ae=function(n){ot(e,n);function e(){var t=n!==null&&n.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,i,r){this.mergeDefaultAndTheme(t,r)},e.prototype.optionUpdated=function(t,i){var r=this.option;!i&&$J(r,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var i=this.stateList;t=An(t,this),this.controllerVisuals=TC(this.option.controller,i,t),this.targetVisuals=TC(this.option.target,i,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,i=[];return t==null||t==="all"?this.ecModel.eachSeries(function(r,a){i.push(a)}):i=Ar(t),i},e.prototype.eachTargetSeries=function(t,i){ne(this.getTargetSeriesIndices(),function(r){var a=this.ecModel.getSeriesByIndex(r);a&&t.call(i,a)},this)},e.prototype.isTargetSeries=function(t){var i=!1;return this.eachTargetSeries(function(r){r===t&&(i=!0)}),i},e.prototype.formatValueText=function(t,i,r){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;r=r||["<",">"],$t(t)&&(t=t.slice(),u=!0);var c=i?t:u?[d(t[0]),d(t[1])]:d(t);if(xn(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if($n(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?r[0]+" "+c[1]:t[1]===s[1]?r[1]+" "+c[0]:c[0]+" - "+c[1];return c;function d(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,i=gAe([t.min,t.max]);this._dataExtent=i},e.prototype.getDataDimensionIndex=function(t){var i=this.option.dimension;if(i!=null)return t.getDimensionIndex(i);for(var r=t.dimensions,a=r.length-1;a>=0;a--){var o=r[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,i=this.option,r={inRange:i.inRange,outOfRange:i.outOfRange},a=i.target||(i.target={}),o=i.controller||(i.controller={});ui(a,r),ui(o,r);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(d){mAe(i.color)&&!d.inRange&&(d.inRange={color:i.color.slice().reverse()}),d.inRange=d.inRange||{color:t.get("gradientColor")}}function u(d,h,f){var p=d[h],m=d[f];p&&!m&&(m=d[f]={},EG(p,function(v,g){if(Wo.isValidType(g)){var _=rQ.get(g,"inactive",s);_!=null&&(m[g]=_,g==="color"&&!m.hasOwnProperty("opacity")&&!m.hasOwnProperty("colorAlpha")&&(m.opacity=[0,0]))}}))}function c(d){var h=(d.inRange||{}).symbol||(d.outOfRange||{}).symbol,f=(d.inRange||{}).symbolSize||(d.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),m=this.getItemSymbol(),v=m||"roundRect";EG(this.stateList,function(g){var _=this.itemSize,S=d[g];S||(S=d[g]={color:s?p:[p]}),S.symbol==null&&(S.symbol=h&&Zn(h)||(s?v:[v])),S.symbolSize==null&&(S.symbolSize=f&&Zn(f)||(s?_[0]:[_[0],_[0]])),S.symbol=MG(S.symbol,function(C){return C==="none"?v:C});var x=S.symbolSize;if(x!=null){var A=-1/0;vAe(x,function(C){C>A&&(A=C)}),S.symbolSize=MG(x,function(C){return yAe(C,[0,A],[0,_[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}($i);const C8=_Ae;var PG=[20,140],SAe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,i){n.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(r){r.mappingMethod="linear",r.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){n.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=PG[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=PG[1])},e.prototype._resetRange=function(){var t=this.getExtent(),i=this.option.range;!i||i.auto?(t.auto=1,this.option.range=t):$t(i)&&(i[0]>i[1]&&i.reverse(),i[0]=Math.max(i[0],t[0]),i[1]=Math.min(i[1],t[1]))},e.prototype.completeVisualOption=function(){n.prototype.completeVisualOption.apply(this,arguments),ne(this.stateList,function(t){var i=this.option.controller[t].symbolSize;i&&i[0]!==i[1]&&(i[0]=i[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),i=x0((this.get("range")||[]).slice());return i[0]>t[1]&&(i[0]=t[1]),i[1]>t[1]&&(i[1]=t[1]),i[0]<t[0]&&(i[0]=t[0]),i[1]<t[0]&&(i[1]=t[0]),i},e.prototype.getValueState=function(t){var i=this.option.range,r=this.getExtent();return(i[0]<=r[0]||i[0]<=t)&&(i[1]>=r[1]||t<=i[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var i=[];return this.eachTargetSeries(function(r){var a=[],o=r.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&a.push(l)},this),i.push({seriesId:r.id,dataIndex:a})},this),i},e.prototype.getVisualMeta=function(t){var i=RG(this,"outOfRange",this.getExtent()),r=RG(this,"inRange",this.option.range.slice()),a=[];function o(f,p){a.push({value:f,color:t(f,p)})}for(var s=0,l=0,u=r.length,c=i.length;l<c&&(!r.length||i[l]<=r[0]);l++)i[l]<r[s]&&o(i[l],"outOfRange");for(var d=1;s<u;s++,d=0)d&&a.length&&o(r[s],"outOfRange"),o(r[s],"inRange");for(var d=1;l<c;l++)(!r.length||r[r.length-1]<i[l])&&(d&&(a.length&&o(a[a.length-1].value,"outOfRange"),d=0),o(i[l],"outOfRange"));var h=a.length;return{stops:a,outerColors:[h?a[0].color:"transparent",h?a[h-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=Uh(C8.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}(C8);function RG(n,e,t){if(t[0]===t[1])return t.slice();for(var i=200,r=(t[1]-t[0])/i,a=t[0],o=[],s=0;s<=i&&a<t[1];s++)o.push(a),a+=r;return o.push(t[1]),o}const bAe=SAe;var xAe=function(n){ot(e,n);function e(){var t=n!==null&&n.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,i){this.ecModel=t,this.api=i},e.prototype.render=function(t,i,r,a){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,i,r,a)},e.prototype.renderBackground=function(t){var i=this.visualMapModel,r=Wv(i.get("padding")||0),a=t.getBoundingRect();t.add(new Hi({z2:-1,silent:!0,shape:{x:a.x-r[3],y:a.y-r[0],width:a.width+r[3]+r[1],height:a.height+r[0]+r[2]},style:{fill:i.get("backgroundColor"),stroke:i.get("borderColor"),lineWidth:i.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,i,r){r=r||{};var a=r.forceState,o=this.visualMapModel,s={};if(i==="color"){var l=o.get("contentColor");s.color=l}function u(f){return s[f]}function c(f,p){s[f]=p}var d=o.controllerVisuals[a||o.getValueState(t)],h=Wo.prepareVisualTypes(d);return ne(h,function(f){var p=d[f];r.convertOpacityToAlpha&&f==="opacity"&&(f="colorAlpha",p=d.__alphaForOpacity),Wo.dependsOn(f,i)&&p&&p.applyVisual(t,u,c)}),s[i]},e.prototype.positionGroup=function(t){var i=this.visualMapModel,r=this.api;O_(t,i.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()})},e.prototype.doRender=function(t,i,r,a){},e.type="visualMap",e}(xa);const aQ=xAe;var LG=[["left","right","width"],["top","bottom","height"]];function oQ(n,e,t){var i=n.option,r=i.align;if(r!=null&&r!=="auto")return r;for(var a={width:e.getWidth(),height:e.getHeight()},o=i.orient==="horizontal"?1:0,s=LG[o],l=[0,null,10],u={},c=0;c<3;c++)u[LG[1-o][c]]=l[c],u[s[c]]=c===2?t[0]:i[s[c]];var d=[["x","width",3],["y","height",0]][o],h=uo(u,a,i.padding);return s[(h.margin[d[2]]||0)+h[d[0]]+h[d[1]]*.5<a[d[1]]*.5?0:1]}function f5(n,e){return ne(n||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),n}var Tu=pr,wAe=ne,IG=Math.min,yw=Math.max,TAe=12,AAe=6,CAe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,i){n.prototype.init.call(this,t,i),this._hoverLinkFromSeriesMouseOver=An(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=An(this._hideIndicator,this)},e.prototype.doRender=function(t,i,r,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,i=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(i);var r=t.get("text");this._renderEndsText(i,r,0),this._renderEndsText(i,r,1),this._updateView(!0),this.renderBackground(i),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(i)},e.prototype._renderEndsText=function(t,i,r){if(i){var a=i[1-r];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,r===0?-s:l[1]+s],u),d=this._applyTransform(r===0?"bottom":"top",u),h=this._orient,f=this.visualMapModel.textStyleModel;this.group.add(new Xi({style:qr(f,{x:c[0],y:c[1],verticalAlign:h==="horizontal"?"middle":d,align:h==="horizontal"?d:"center",text:a})}))}},e.prototype._renderBar=function(t){var i=this.visualMapModel,r=this._shapes,a=i.itemSize,o=this._orient,s=this._useHandle,l=oQ(i,this.api,a),u=r.mainGroup=this._createBarGroup(l),c=new ei;u.add(c),c.add(r.outOfRange=DG()),c.add(r.inRange=DG(null,s?kG(this._orient):null,An(this._dragHandle,this,"all",!1),An(this._dragHandle,this,"all",!0))),c.setClipPath(new Hi({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var d=i.textStyleModel.getTextRect("国"),h=yw(d.width,d.height);s&&(r.handleThumbs=[],r.handleLabels=[],r.handleLabelPoints=[],this._createHandle(i,u,0,a,h,o),this._createHandle(i,u,1,a,h,o)),this._createIndicator(i,u,a,h,o),t.add(u)},e.prototype._createHandle=function(t,i,r,a,o,s){var l=An(this._dragHandle,this,r,!1),u=An(this._dragHandle,this,r,!0),c=nu(t.get("handleSize"),a[0]),d=Ya(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=kG(this._orient);d.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(g){Wc(g.event)}}),d.x=a[0]/2,d.useStyle(t.getModel("handleStyle").getItemStyle()),d.setStyle({strokeNoScale:!0,strokeFirst:!0}),d.style.lineWidth*=2,d.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),ap(d,!0),i.add(d);var f=this.visualMapModel.textStyleModel,p=new Xi({cursor:h,draggable:!0,drift:l,onmousemove:function(g){Wc(g.event)},ondragend:u,style:qr(f,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var m=[c,0],v=this._shapes;v.handleThumbs[r]=d,v.handleLabelPoints[r]=m,v.handleLabels[r]=p},e.prototype._createIndicator=function(t,i,r,a,o){var s=nu(t.get("indicatorSize"),r[0]),l=Ya(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:r[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof qo){var c=l.style;l.useStyle(It({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);i.add(l);var d=this.visualMapModel.textStyleModel,h=new Xi({silent:!0,invisible:!0,style:qr(d,{x:0,y:0,text:""})});this.group.add(h);var f=[(o==="horizontal"?a/2:AAe)+r[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=h,p.indicatorLabelPoint=f,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,i,r,a){if(this._useHandle){if(this._dragging=!i,!i){var o=this._applyTransform([r,a],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}i===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),i?!this._hovering&&this._clearHoverLinkToSeries():NG(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,i=this._dataInterval=t.getSelected(),r=t.getExtent(),a=[0,t.itemSize[1]];this._handleEnds=[Tu(i[0],r,a,!0),Tu(i[1],r,a,!0)]},e.prototype._updateInterval=function(t,i){i=i||0;var r=this.visualMapModel,a=this._handleEnds,o=[0,r.itemSize[1]];o1(i,a,o,t,0);var s=r.getExtent();this._dataInterval=[Tu(a[0],o,s,!0),Tu(a[1],o,s,!0)]},e.prototype._updateView=function(t){var i=this.visualMapModel,r=i.getExtent(),a=this._shapes,o=[0,i.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,r,s,"inRange"),u=this._createBarVisual(r,r,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,i,r,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(r,l);return{barColor:new po(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,i){var r=100,a=[],o=(t[1]-t[0])/r;a.push({color:this.getControllerVisual(t[0],"color",i),offset:0});for(var s=1;s<r;s++){var l=t[0]+o*s;if(l>t[1])break;a.push({color:this.getControllerVisual(l,"color",i),offset:s/r})}return a.push({color:this.getControllerVisual(t[1],"color",i),offset:1}),a},e.prototype._createBarPoints=function(t,i){var r=this.visualMapModel.itemSize;return[[r[0]-i[0],t[0]],[r[0],t[0]],[r[0],t[1]],[r[0]-i[1],t[1]]]},e.prototype._createBarGroup=function(t){var i=this._orient,r=this.visualMapModel.get("inverse");return new ei(i==="horizontal"&&!r?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:i==="horizontal"&&r?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:i==="vertical"&&!r?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,i){if(this._useHandle){var r=this._shapes,a=this.visualMapModel,o=r.handleThumbs,s=r.handleLabels,l=a.itemSize,u=a.getExtent(),c=this._applyTransform("left",r.mainGroup);wAe([0,1],function(d){var h=o[d];h.setStyle("fill",i.handlesColor[d]),h.y=t[d];var f=Tu(t[d],[0,l[1]],u,!0),p=this.getControllerVisual(f,"symbolSize");h.scaleX=h.scaleY=p/l[0],h.x=l[0]-p/2;var m=eu(r.handleLabelPoints[d],Tp(h,this.group));if(this._orient==="horizontal"){var v=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;m[1]+=v}s[d].setStyle({x:m[0],y:m[1],text:a.formatValueText(this._dataInterval[d]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",r.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,i,r,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,d=c.indicator;if(d){d.attr("invisible",!1);var h={convertOpacityToAlpha:!0},f=this.getControllerVisual(t,"color",h),p=this.getControllerVisual(t,"symbolSize"),m=Tu(t,s,u,!0),v=l[0]-p/2,g={x:d.x,y:d.y};d.y=m,d.x=v;var _=eu(c.indicatorLabelPoint,Tp(d,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var x=this._applyTransform("left",c.mainGroup),A=this._orient,C=A==="horizontal";S.setStyle({text:(r||"")+o.formatValueText(i),verticalAlign:C?x:"middle",align:C?"center":x});var M={x:v,y:m,style:{fill:f}},I={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var D={duration:100,easing:"cubicInOut",additive:!0};d.x=g.x,d.y=g.y,d.animateTo(M,D),S.animateTo(I,D)}else d.attr(M),S.attr(I);this._firstShowIndicator=!1;var E=this._shapes.handleLabels;if(E)for(var P=0;P<E.length;P++)this.api.enterBlur(E[P])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(i){if(t._hovering=!0,!t._dragging){var r=t.visualMapModel.itemSize,a=t._applyTransform([i.offsetX,i.offsetY],t._shapes.mainGroup,!0,!0);a[1]=IG(yw(0,a[1]),r[1]),t._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=r[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,i){var r=this.visualMapModel,a=r.itemSize;if(r.option.hoverLink){var o=[0,a[1]],s=r.getExtent();t=IG(yw(o[0],t),o[1]);var l=MAe(r,s,o),u=[t-l,t+l],c=Tu(t,o,s,!0),d=[Tu(u[0],o,s,!0),Tu(u[1],o,s,!0)];u[0]<o[0]&&(d[0]=-1/0),u[1]>o[1]&&(d[1]=1/0),i&&(d[0]===-1/0?this._showIndicator(c,d[1],"< ",l):d[1]===1/0?this._showIndicator(c,d[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,f=[];(i||NG(r))&&(f=this._hoverLinkDataIndices=r.findTargetDataIndices(d));var p=phe(h,f);this._dispatchHighDown("downplay",f5(p[0],r)),this._dispatchHighDown("highlight",f5(p[1],r))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var i;if(sp(t.target,function(l){var u=ni(l);if(u.dataIndex!=null)return i=u,!0},!0),!!i){var r=this.ecModel.getSeriesByIndex(i.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(r)){var o=r.getData(i.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),i.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 i=this._shapes.handleLabels;if(i)for(var r=0;r<i.length;r++)this.api.leaveBlur(i[r])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",f5(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,i,r,a){var o=Tp(i,a?null:this.group);return $t(t)?eu(t,o,r):R_(t,o,r)},e.prototype._dispatchHighDown=function(t,i){i&&i.length&&this.api.dispatchAction({type:t,batch:i})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(aQ);function DG(n,e,t,i){return new ul({shape:{points:n},draggable:!!t,cursor:e,drift:t,onmousemove:function(r){Wc(r.event)},ondragend:i})}function MAe(n,e,t){var i=TAe/2,r=n.get("hoverLinkDataSize");return r&&(i=Tu(r,e,t,!0)/2),i}function NG(n){var e=n.get("hoverLinkOnHandle");return!!(e==null?n.get("realtime"):e)}function kG(n){return n==="vertical"?"ns-resize":"ew-resize"}const EAe=CAe;var PAe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},RAe=function(n,e){e.eachComponent({mainType:"visualMap",query:n},function(t){t.setSelected(n.selected)})},LAe=[{createOnAllSeries:!0,reset:function(n,e){var t=[];return e.eachComponent("visualMap",function(i){var r=n.pipelineContext;!i.isTargetSeries(n)||r&&r.large||t.push(Awe(i.stateList,i.targetVisuals,An(i.getValueState,i),i.getDataDimensionIndex(n.getData())))}),t}},{createOnAllSeries:!0,reset:function(n,e){var t=n.getData(),i=[];e.eachComponent("visualMap",function(r){if(r.isTargetSeries(n)){var a=r.getVisualMeta(An(IAe,null,n,r))||{stops:[],outerColors:[]},o=r.getDataDimensionIndex(t);o>=0&&(a.dimension=o,i.push(a))}}),n.getData().setVisual("visualMeta",i)}}];function IAe(n,e,t,i){for(var r=e.targetVisuals[i],a=Wo.prepareVisualTypes(r),o={color:w3(n.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],c=r[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,d,h)}return o.color;function d(f){return o[f]}function h(f,p){o[f]=p}}var FG=ne;function DAe(n){var e=n&&n.visualMap;$t(e)||(e=e?[e]:[]),FG(e,function(t){if(t){j1(t,"splitList")&&!j1(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var i=t.pieces;i&&$t(i)&&FG(i,function(r){Kn(r)&&(j1(r,"start")&&!j1(r,"min")&&(r.min=r.start),j1(r,"end")&&!j1(r,"max")&&(r.max=r.end))})}})}function j1(n,e){return n&&n.hasOwnProperty&&n.hasOwnProperty(e)}var OG=!1;function sQ(n){OG||(OG=!0,n.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),n.registerAction(PAe,RAe),ne(LAe,function(e){n.registerVisual(n.PRIORITY.VISUAL.COMPONENT,e)}),n.registerPreprocessor(DAe))}function lQ(n){n.registerComponentModel(bAe),n.registerComponentView(EAe),sQ(n)}var NAe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,i){n.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],kAe[this._mode].call(this,this._pieceList),this._resetSelected(t,i);var a=this.option.categories;this.resetVisual(function(o,s){r==="categories"?(o.mappingMethod="category",o.categories=Zn(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=Xt(this._pieceList,function(l){return l=Zn(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,i={},r=Wo.listVisualTypes(),a=this.isCategory();ne(t.pieces,function(s){ne(r,function(l){s.hasOwnProperty(l)&&(i[l]=1)})}),ne(i,function(s,l){var u=!1;ne(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&ne(this.stateList,function(c){(t[c]||(t[c]={}))[l]=rQ.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}n.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,i){var r=this.option,a=this._pieceList,o=(i?r:t).selected||{};if(r.selected=o,ne(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),r.selectedMode==="single"){var s=!1;ne(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=Zn(t)},e.prototype.getValueState=function(t){var i=Wo.findPieceIndex(t,this._pieceList);return i!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[i])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var i=[],r=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=Wo.findPieceIndex(l,r);c===t&&o.push(u)},this),i.push({seriesId:a.id,dataIndex:o})},this),i},e.prototype.getRepresentValue=function(t){var i;if(this.isCategory())i=t.value;else if(t.value!=null)i=t.value;else{var r=t.interval||[];i=r[0]===-1/0&&r[1]===1/0?0:(r[0]+r[1])/2}return i},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var i=[],r=["",""],a=this;function o(c,d){var h=a.getRepresentValue({interval:c});d||(d=a.getValueState(h));var f=t(h,d);c[0]===-1/0?r[0]=f:c[1]===1/0?r[1]=f:i.push({value:c[0],color:f},{value:c[1],color:f})}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 ne(s,function(c){var d=c.interval;d&&(d[0]>u&&o([u,d[0]],"outOfRange"),o(d.slice()),u=d[1])},this),{stops:i,outerColors:r}},e.type="visualMap.piecewise",e.defaultOption=Uh(C8.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}(C8),kAe={splitNumber:function(n){var e=this.option,t=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var a=(i[1]-i[0])/r;+a.toFixed(t)!==a&&t<5;)t++;e.precision=t,a=+a.toFixed(t),e.minOpen&&n.push({interval:[-1/0,i[0]],close:[0,0]});for(var o=0,s=i[0];o<r;s+=a,o++){var l=o===r-1?i[1]:s+a;n.push({interval:[s,l],close:[1,1]})}e.maxOpen&&n.push({interval:[i[1],1/0],close:[0,0]}),PN(n),ne(n,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(n){var e=this.option;ne(e.categories,function(t){n.push({text:this.formatValueText(t,!0),value:t})},this),BG(e,n)},pieces:function(n){var e=this.option;ne(e.pieces,function(t,i){Kn(t)||(t={value:t});var r={text:"",index:i};if(t.label!=null&&(r.text=t.label),t.hasOwnProperty("value")){var a=r.value=t.value;r.interval=[a,a],r.close=[1,1]}else{for(var o=r.interval=[],s=r.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],d=0;d<2;d++){for(var h=[["gte","gt","min"],["lte","lt","max"]][d],f=0;f<3&&o[d]==null;f++)o[d]=t[h[f]],s[d]=l[f],c[d]=f===2;o[d]==null&&(o[d]=u[d])}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]&&(r.value=o[0])}r.visual=Wo.retrieveVisuals(t),n.push(r)},this),BG(e,n),PN(n),ne(n,function(t){var i=t.close,r=[["<","≤"][i[1]],[">","≥"][i[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,r)},this)}};function BG(n,e){var t=n.inverse;(n.orient==="vertical"?!t:t)&&e.reverse()}const FAe=NAe;var OAe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var i=this.visualMapModel,r=i.get("textGap"),a=i.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=i.itemSize,c=this._getViewData(),d=c.endsText,h=Ro(i.get("showLabel",!0),!d),f=!i.get("selectedMode");d&&this._renderEndsText(t,d[0],u,h,l),ne(c.viewPieceList,function(p){var m=p.piece,v=new ei;v.onclick=An(this._onItemClick,this,m),this._enableHoverLink(v,p.indexInModelPieceList);var g=i.getRepresentValue(m);if(this._createItemSymbol(v,g,[0,0,u[0],u[1]],f),h){var _=this.visualMapModel.getValueState(g);v.add(new Xi({style:{x:l==="right"?-r:u[0]+r,y:u[1]/2,text:m.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:_==="outOfRange"?.5:1},silent:f}))}t.add(v)},this),d&&this._renderEndsText(t,d[1],u,h,l),Ap(i.get("orient"),t,i.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,i){var r=this;t.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=r.visualMapModel;s.option.hoverLink&&r.api.dispatchAction({type:o,batch:f5(s.findTargetDataIndices(i),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,i=t.option;if(i.orient==="vertical")return oQ(t,this.api,t.itemSize);var r=i.align;return(!r||r==="auto")&&(r="left"),r},e.prototype._renderEndsText=function(t,i,r,a,o){if(i){var s=new ei,l=this.visualMapModel.textStyleModel;s.add(new Xi({style:qr(l,{x:a?o==="right"?r[0]:0:r[0]/2,y:r[1]/2,verticalAlign:"middle",align:a?o:"center",text:i})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,i=Xt(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),r=t.get("text"),a=t.get("orient"),o=t.get("inverse");return(a==="horizontal"?o:!o)?i.reverse():r&&(r=r.slice().reverse()),{viewPieceList:i,endsText:r}},e.prototype._createItemSymbol=function(t,i,r,a){var o=Ya(this.getControllerVisual(i,"symbol"),r[0],r[1],r[2],r[3],this.getControllerVisual(i,"color"));o.silent=a,t.add(o)},e.prototype._onItemClick=function(t){var i=this.visualMapModel,r=i.option,a=r.selectedMode;if(a){var o=Zn(r.selected),s=i.getSelectedMapKey(t);a==="single"||a===!0?(o[s]=!0,ne(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}(aQ);const BAe=OAe;function uQ(n){n.registerComponentModel(FAe),n.registerComponentView(BAe),sQ(n)}function zAe(n){Ci(lQ),Ci(uQ)}var GAe={label:{enabled:!0},decal:{show:!1}},zG=Gi(),UAe={};function VAe(n,e){var t=n.getModel("aria");if(!t.get("enabled"))return;var i=Zn(GAe);ui(i.label,n.getLocaleModel().get("aria"),!1),ui(t.option,i,!1),r(),a();function r(){var u=t.getModel("decal"),c=u.get("show");if(c){var d=In();n.eachSeries(function(h){if(!h.isColorBySeries()){var f=d.get(h.type);f||(f={},d.set(h.type,f)),zG(h).scope=f}}),n.eachRawSeries(function(h){if(n.isSeriesFiltered(h))return;if($n(h.enableAriaDecal)){h.enableAriaDecal();return}var f=h.getData();if(h.isColorBySeries()){var _=IA(h.ecModel,h.name,UAe,n.getSeriesCount()),S=f.getVisual("decal");f.setVisual("decal",x(S,_))}else{var p=h.getRawData(),m={},v=zG(h).scope;f.each(function(A){var C=f.getRawIndex(A);m[C]=A});var g=p.count();p.each(function(A){var C=m[A],M=p.getName(A)||A+"",I=IA(h.ecModel,M,v,g),D=f.getItemVisual(C,"decal");f.setItemVisual(C,"decal",x(D,I))})}function x(A,C){var M=A?It(It({},C),A):C;return M.dirty=!0,M}})}}function a(){var u=e.getZr().dom;if(u){var c=n.getLocaleModel().get("aria"),d=t.getModel("label");if(d.option=qn(d.option,c),!!d.get("enabled")){if(u.setAttribute("role","img"),d.get("description")){u.setAttribute("aria-label",d.get("description"));return}var h=n.getSeriesCount(),f=d.get(["data","maxCount"])||10,p=d.get(["series","maxCount"])||10,m=Math.min(h,p),v;if(!(h<1)){var g=s();if(g){var _=d.get(["general","withTitle"]);v=o(_,{title:g})}else v=d.get(["general","withoutTitle"]);var S=[],x=h>1?d.get(["series","multiple","prefix"]):d.get(["series","single","prefix"]);v+=o(x,{seriesCount:h}),n.eachSeries(function(I,D){if(D<m){var E=void 0,P=I.get("name"),F=P?"withName":"withoutName";E=h>1?d.get(["series","multiple",F]):d.get(["series","single",F]),E=o(E,{seriesId:I.seriesIndex,seriesName:I.get("name"),seriesType:l(I.subType)});var V=I.getData();if(V.count()>f){var G=d.get(["data","partialData"]);E+=o(G,{displayCnt:f})}else E+=d.get(["data","allData"]);for(var W=d.get(["data","separator","middle"]),Y=d.get(["data","separator","end"]),Q=d.get(["data","excludeDimensionId"]),K=[],ae=0;ae<V.count();ae++)if(ae<f){var ie=V.getName(ae),he=Q?dr(V.getValues(ae),function(He,xe){return xi(Q,xe)===-1}):V.getValues(ae),Ee=d.get(["data",ie?"withName":"withoutName"]);K.push(o(Ee,{name:ie,value:he.join(W)}))}E+=K.join(W)+Y,S.push(E)}});var A=d.getModel(["series","multiple","separator"]),C=A.get("middle"),M=A.get("end");v+=S.join(C)+M,u.setAttribute("aria-label",v)}}}}function o(u,c){if(!xn(u))return u;var d=u;return ne(c,function(h,f){d=d.replace(new RegExp("\\{\\s*"+f+"\\s*\\}","g"),h)}),d}function s(){var u=n.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=n.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function HAe(n){if(!(!n||!n.aria)){var e=n.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},ne(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function WAe(n){n.registerPreprocessor(HAe),n.registerVisual(n.PRIORITY.VISUAL.ARIA,VAe)}var GG={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},jAe=function(){function n(e){var t=this._condVal=xn(e)?new RegExp(e):wce(e)?e:null;if(t==null){var i="";ur(i)}}return n.prototype.evaluate=function(e){var t=typeof e;return xn(t)?this._condVal.test(e):Yi(t)?this._condVal.test(e+""):!1},n}(),$Ae=function(){function n(){}return n.prototype.evaluate=function(){return this.value},n}(),qAe=function(){function n(){}return n.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},n}(),XAe=function(){function n(){}return n.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},n}(),YAe=function(){function n(){}return n.prototype.evaluate=function(){return!this.child.evaluate()},n}(),KAe=function(){function n(){}return n.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,i=t(this.valueGetterParam),r=e?this.valueParser(i):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(e?r:i))return!1;return!0},n}();function eR(n,e){if(n===!0||n===!1){var t=new $Ae;return t.value=n,t}var i="";return cQ(n)||ur(i),n.and?UG("and",n,e):n.or?UG("or",n,e):n.not?ZAe(n,e):JAe(n,e)}function UG(n,e,t){var i=e[n],r="";$t(i)||ur(r),i.length||ur(r);var a=n==="and"?new qAe:new XAe;return a.children=Xt(i,function(o){return eR(o,t)}),a.children.length||ur(r),a}function ZAe(n,e){var t=n.not,i="";cQ(t)||ur(i);var r=new YAe;return r.child=eR(t,e),r.child||ur(i),r}function JAe(n,e){for(var t="",i=e.prepareGetValue(n),r=[],a=Li(n),o=n.parser,s=o?FX(o):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=Mn(GG,u)?GG[u]:u,d=n[u],h=s?s(d):d,f=P1e(c,h)||c==="reg"&&new jAe(h);f||ur(t),r.push(f)}}r.length||ur(t);var p=new KAe;return p.valueGetterParam=i,p.valueParser=s,p.getValue=e.getValue,p.subCondList=r,p}function cQ(n){return Kn(n)&&!ds(n)}var QAe=function(){function n(e,t){this._cond=eR(e,t)}return n.prototype.evaluate=function(){return this._cond.evaluate()},n}();function eCe(n,e){return new QAe(n,e)}var tCe={type:"echarts:filter",transform:function(n){for(var e=n.upstream,t,i=eCe(n.config,{valueGetterAttrMap:In({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;Mn(s,"dimension")||ur(l);var c=e.getDimensionInfo(u);return c||ur(l),{dimIdx:c.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),r=[],a=0,o=e.count();a<o;a++)t=e.getRawDataItem(a),i.evaluate()&&r.push(t);return{data:r}}},nCe={type:"echarts:sort",transform:function(n){var e=n.upstream,t=n.config,i="",r=Ar(t);r.length||ur(i);var a=[];ne(r,function(c){var d=c.dimension,h=c.order,f=c.parser,p=c.incomparable;if(d==null&&ur(i),h!=="asc"&&h!=="desc"&&ur(i),p&&p!=="min"&&p!=="max"){var m="";ur(m)}if(h!=="asc"&&h!=="desc"){var v="";ur(v)}var g=e.getDimensionInfo(d);g||ur(i);var _=f?FX(f):null;f&&!_&&ur(i),a.push({dimIdx:g.index,parser:_,comparator:new BX(h,p)})});var o=e.sourceFormat;o!==hs&&o!==L0&&ur(i);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,d){for(var h=0;h<a.length;h++){var f=a[h],p=e.retrieveValueFromItem(c,f.dimIdx),m=e.retrieveValueFromItem(d,f.dimIdx);f.parser&&(p=f.parser(p),m=f.parser(m));var v=f.comparator.evaluate(p,m);if(v!==0)return v}return 0}),{data:s}}};function iCe(n){n.registerTransform(tCe),n.registerTransform(nCe)}var rCe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,i,r){n.prototype.init.call(this,t,i,r),this._sourceManager=new VX(this),Uk(this)},e.prototype.mergeOption=function(t,i){n.prototype.mergeOption.call(this,t,i),Uk(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Wu},e}($i),aCe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(xa);function oCe(n){n.registerComponentModel(rCe),n.registerComponentView(aCe)}var yu=Qu.CMD;function D2(n,e){return Math.abs(n-e)<1e-5}function LC(n){var e=n.data,t=n.len(),i=[],r,a=0,o=0,s=0,l=0;function u(V,G){r&&r.length>2&&i.push(r),r=[V,G]}function c(V,G,W,Y){D2(V,W)&&D2(G,Y)||r.push(V,G,W,Y,W,Y)}function d(V,G,W,Y,Q,K){var ae=Math.abs(G-V),ie=Math.tan(ae/4)*4/3,he=G<V?-1:1,Ee=Math.cos(V),He=Math.sin(V),xe=Math.cos(G),Fe=Math.sin(G),pt=Ee*Q+W,Ot=He*K+Y,bt=xe*Q+W,ht=Fe*K+Y,Kt=Q*ie*he,Tt=K*ie*he;r.push(pt-Kt*He,Ot+Tt*Ee,bt+Kt*Fe,ht-Tt*xe,bt,ht)}for(var h,f,p,m,v=0;v<t;){var g=e[v++],_=v===1;switch(_&&(a=e[v],o=e[v+1],s=a,l=o,(g===yu.L||g===yu.C||g===yu.Q)&&(r=[s,l])),g){case yu.M:a=s=e[v++],o=l=e[v++],u(s,l);break;case yu.L:h=e[v++],f=e[v++],c(a,o,h,f),a=h,o=f;break;case yu.C:r.push(e[v++],e[v++],e[v++],e[v++],a=e[v++],o=e[v++]);break;case yu.Q:h=e[v++],f=e[v++],p=e[v++],m=e[v++],r.push(a+2/3*(h-a),o+2/3*(f-o),p+2/3*(h-p),m+2/3*(f-m),p,m),a=p,o=m;break;case yu.A:var S=e[v++],x=e[v++],A=e[v++],C=e[v++],M=e[v++],I=e[v++]+M;v+=1;var D=!e[v++];h=Math.cos(M)*A+S,f=Math.sin(M)*C+x,_?(s=h,l=f,u(s,l)):c(a,o,h,f),a=Math.cos(I)*A+S,o=Math.sin(I)*C+x;for(var E=(D?-1:1)*Math.PI/2,P=M;D?P>I:P<I;P+=E){var F=D?Math.max(P+E,I):Math.min(P+E,I);d(P,F,S,x,A,C)}break;case yu.R:s=a=e[v++],l=o=e[v++],h=s+e[v++],f=l+e[v++],u(h,l),c(h,l,h,f),c(h,f,s,f),c(s,f,s,l),c(s,l,h,l);break;case yu.Z:r&&c(a,o,s,l),a=s,o=l;break}}return r&&r.length>2&&i.push(r),i}function IC(n,e,t,i,r,a,o,s,l,u){if(D2(n,t)&&D2(e,i)&&D2(r,o)&&D2(a,s)){l.push(o,s);return}var c=2/u,d=c*c,h=o-n,f=s-e,p=Math.sqrt(h*h+f*f);h/=p,f/=p;var m=t-n,v=i-e,g=r-o,_=a-s,S=m*m+v*v,x=g*g+_*_;if(S<d&&x<d){l.push(o,s);return}var A=h*m+f*v,C=-h*g-f*_,M=S-A*A,I=x-C*C;if(M<d&&A>=0&&I<d&&C>=0){l.push(o,s);return}var D=[],E=[];Eh(n,t,r,o,.5,D),Eh(e,i,a,s,.5,E),IC(D[0],E[0],D[1],E[1],D[2],E[2],D[3],E[3],l,u),IC(D[4],E[4],D[5],E[5],D[6],E[6],D[7],E[7],l,u)}function sCe(n,e){var t=LC(n),i=[];e=e||1;for(var r=0;r<t.length;r++){var a=t[r],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var c=a[u++],d=a[u++],h=a[u++],f=a[u++],p=a[u++],m=a[u++];IC(s,l,c,d,h,f,p,m,o,e),s=p,l=m}i.push(o)}return i}function dQ(n,e,t){var i=n[e],r=n[1-e],a=Math.abs(i/r),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,d=t-c;if(d>0)for(var u=0;u<d;u++)l[u%o]+=1;return l}function VG(n,e,t){for(var i=n.r0,r=n.r,a=n.startAngle,o=n.endAngle,s=Math.abs(o-a),l=s*r,u=r-i,c=l>Math.abs(u),d=dQ([l,u],c?0:1,e),h=(c?s:u)/d.length,f=0;f<d.length;f++)for(var p=(c?u:s)/d[f],m=0;m<d[f];m++){var v={};c?(v.startAngle=a+h*f,v.endAngle=a+h*(f+1),v.r0=i+p*m,v.r=i+p*(m+1)):(v.startAngle=a+p*m,v.endAngle=a+p*(m+1),v.r0=i+h*f,v.r=i+h*(f+1)),v.clockwise=n.clockwise,v.cx=n.cx,v.cy=n.cy,t.push(v)}}function lCe(n,e,t){for(var i=n.width,r=n.height,a=i>r,o=dQ([i,r],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",d=n[s]/o.length,h=0;h<o.length;h++)for(var f=n[l]/o[h],p=0;p<o[h];p++){var m={};m[u]=h*d,m[c]=p*f,m[s]=d,m[l]=f,m.x+=n.x,m.y+=n.y,t.push(m)}}function HG(n,e,t,i){return n*i-t*e}function uCe(n,e,t,i,r,a,o,s){var l=t-n,u=i-e,c=o-r,d=s-a,h=HG(c,d,l,u);if(Math.abs(h)<1e-6)return null;var f=n-r,p=e-a,m=HG(f,p,c,d)/h;return m<0||m>1?null:new fi(m*l+n,m*u+e)}function cCe(n,e,t){var i=new fi;fi.sub(i,t,e),i.normalize();var r=new fi;fi.sub(r,n,e);var a=r.dot(i);return a}function $1(n,e){var t=n[n.length-1];t&&t[0]===e[0]&&t[1]===e[1]||n.push(e)}function dCe(n,e,t){for(var i=n.length,r=[],a=0;a<i;a++){var o=n[a],s=n[(a+1)%i],l=uCe(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&r.push({projPt:cCe(l,e,t),pt:l,idx:a})}if(r.length<2)return[{points:n},{points:n}];r.sort(function(v,g){return v.projPt-g.projPt});var u=r[0],c=r[r.length-1];if(c.idx<u.idx){var d=u;u=c,c=d}for(var h=[u.pt.x,u.pt.y],f=[c.pt.x,c.pt.y],p=[h],m=[f],a=u.idx+1;a<=c.idx;a++)$1(p,n[a].slice());$1(p,f),$1(p,h);for(var a=c.idx+1;a<=u.idx+i;a++)$1(m,n[a%i].slice());return $1(m,h),$1(m,f),[{points:p},{points:m}]}function WG(n){var e=n.points,t=[],i=[];T_(e,t,i);var r=new gi(t[0],t[1],i[0]-t[0],i[1]-t[1]),a=r.width,o=r.height,s=r.x,l=r.y,u=new fi,c=new fi;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),dCe(e,u,c)}function M8(n,e,t,i){if(t===1)i.push(e);else{var r=Math.floor(t/2),a=n(e);M8(n,a[0],r,i),M8(n,a[1],t-r,i)}return i}function hCe(n,e){for(var t=[],i=0;i<e;i++)t.push(vE(n));return t}function fCe(n,e){e.setStyle(n.style),e.z=n.z,e.z2=n.z2,e.zlevel=n.zlevel}function pCe(n){for(var e=[],t=0;t<n.length;)e.push([n[t++],n[t++]]);return e}function vCe(n,e){var t=[],i=n.shape,r;switch(n.type){case"rect":lCe(i,e,t),r=Hi;break;case"sector":VG(i,e,t),r=ll;break;case"circle":VG({r0:0,r:i.r,startAngle:0,endAngle:Math.PI*2,cx:i.cx,cy:i.cy},e,t),r=ll;break;default:var a=n.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=Xt(sCe(n.getUpdatedPathProxy(),o),function(g){return pCe(g)}),l=s.length;if(l===0)M8(WG,{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,d=Xt(s,function(g){var _=[],S=[];T_(g,_,S);var x=(S[1]-_[1])*(S[0]-_[0]);return c+=x,{poly:g,area:x}});d.sort(function(g,_){return _.area-g.area});for(var h=e,u=0;u<l;u++){var f=d[u];if(h<=0)break;var p=u===l-1?h:Math.ceil(f.area/c*e);p<0||(M8(WG,{points:f.poly},p,t),h-=p)}}r=ul;break}if(!r)return hCe(n,e);for(var m=[],u=0;u<t.length;u++){var v=new r;v.setShape(t[u]),fCe(n,v),m.push(v)}return m}function mCe(n,e){var t=n.length,i=e.length;if(t===i)return[n,e];for(var r=[],a=[],o=t<i?n:e,s=Math.min(t,i),l=Math.abs(i-t)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,d=[o[0],o[1]],h=l,f=2;f<s;){var p=o[f-2],m=o[f-1],v=o[f++],g=o[f++],_=o[f++],S=o[f++],x=o[f++],A=o[f++];if(h<=0){d.push(v,g,_,S,x,A);continue}for(var C=Math.min(h,c-1)+1,M=1;M<=C;M++){var I=M/C;Eh(p,v,_,x,I,r),Eh(m,g,S,A,I,a),p=r[3],m=a[3],d.push(r[1],a[1],r[2],a[2],p,m),v=r[5],g=a[5],_=r[6],S=a[6]}h-=C-1}return o===n?[d,e]:[n,d]}function jG(n,e){for(var t=n.length,i=n[t-2],r=n[t-1],a=[],o=0;o<e.length;)a[o++]=i,a[o++]=r;return a}function gCe(n,e){for(var t,i,r,a=[],o=[],s=0;s<Math.max(n.length,e.length);s++){var l=n[s],u=e[s],c=void 0,d=void 0;l?u?(t=mCe(l,u),c=t[0],d=t[1],i=c,r=d):(d=jG(r||l,l),c=l):(c=jG(i||u,u),d=u),a.push(c),o.push(d)}return[a,o]}function $G(n){for(var e=0,t=0,i=0,r=n.length,a=0,o=r-2;a<r;o=a,a+=2){var s=n[o],l=n[o+1],u=n[a],c=n[a+1],d=s*c-u*l;e+=d,t+=(s+u)*d,i+=(l+c)*d}return e===0?[n[0]||0,n[1]||0]:[t/e/3,i/e/3,e]}function yCe(n,e,t,i){for(var r=(n.length-2)/6,a=1/0,o=0,s=n.length,l=s-2,u=0;u<r;u++){for(var c=u*6,d=0,h=0;h<s;h+=2){var f=h===0?c:(c+h-2)%l+2,p=n[f]-t[0],m=n[f+1]-t[1],v=e[h]-i[0],g=e[h+1]-i[1],_=v-p,S=g-m;d+=_*_+S*S}d<a&&(a=d,o=u)}return o}function _Ce(n){for(var e=[],t=n.length,i=0;i<t;i+=2)e[i]=n[t-i-2],e[i+1]=n[t-i-1];return e}function SCe(n,e,t,i){for(var r=[],a,o=0;o<n.length;o++){var s=n[o],l=e[o],u=$G(s),c=$G(l);a==null&&(a=u[2]<0!=c[2]<0);var d=[],h=[],f=0,p=1/0,m=[],v=s.length;a&&(s=_Ce(s));for(var g=yCe(s,l,u,c)*6,_=v-2,S=0;S<_;S+=2){var x=(g+S)%_+2;d[S+2]=s[x]-u[0],d[S+3]=s[x+1]-u[1]}if(d[0]=s[g]-u[0],d[1]=s[g+1]-u[1],t>0)for(var A=i/t,C=-i/2;C<=i/2;C+=A){for(var M=Math.sin(C),I=Math.cos(C),D=0,S=0;S<s.length;S+=2){var E=d[S],P=d[S+1],F=l[S]-c[0],V=l[S+1]-c[1],G=F*I-V*M,W=F*M+V*I;m[S]=G,m[S+1]=W;var Y=G-E,Q=W-P;D+=Y*Y+Q*Q}if(D<p){p=D,f=C;for(var K=0;K<m.length;K++)h[K]=m[K]}}else for(var ae=0;ae<v;ae+=2)h[ae]=l[ae]-c[0],h[ae+1]=l[ae+1]-c[1];r.push({from:d,to:h,fromCp:u,toCp:c,rotation:-f})}return r}function E8(n){return n.__isCombineMorphing}var hQ="__mOriginal_";function P8(n,e,t){var i=hQ+e,r=n[i]||n[e];n[i]||(n[i]=n[e]);var a=t.replace,o=t.after,s=t.before;n[e]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=r.apply(this,l),o&&o.apply(this,l),u}}function e9(n,e){var t=hQ+e;n[t]&&(n[e]=n[t],n[t]=null)}function qG(n,e){for(var t=0;t<n.length;t++)for(var i=n[t],r=0;r<i.length;){var a=i[r],o=i[r+1];i[r++]=e[0]*a+e[2]*o+e[4],i[r++]=e[1]*a+e[3]*o+e[5]}}function fQ(n,e){var t=n.getUpdatedPathProxy(),i=e.getUpdatedPathProxy(),r=gCe(LC(t),LC(i)),a=r[0],o=r[1],s=n.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&qG(a,s),l&&qG(o,l),P8(e,"updateTransform",{replace:u}),e.transform=null;var c=SCe(a,o,10,Math.PI),d=[];P8(e,"buildPath",{replace:function(h){for(var f=e.__morphT,p=1-f,m=[],v=0;v<c.length;v++){var g=c[v],_=g.from,S=g.to,x=g.rotation*f,A=g.fromCp,C=g.toCp,M=Math.sin(x),I=Math.cos(x);Y4(m,A,C,f);for(var D=0;D<_.length;D+=2){var E=_[D],P=_[D+1],F=S[D],V=S[D+1],G=E*p+F*f,W=P*p+V*f;d[D]=G*I-W*M+m[0],d[D+1]=G*M+W*I+m[1]}var Y=d[0],Q=d[1];h.moveTo(Y,Q);for(var D=2;D<_.length;){var F=d[D++],V=d[D++],K=d[D++],ae=d[D++],ie=d[D++],he=d[D++];Y===F&&Q===V&&K===ie&&ae===he?h.lineTo(ie,he):h.bezierCurveTo(F,V,K,ae,ie,he),Y=ie,Q=he}}}})}function tR(n,e,t){if(!n||!e)return e;var i=t.done,r=t.during;fQ(n,e),e.__morphT=0;function a(){e9(e,"buildPath"),e9(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},qn({during:function(o){e.dirtyShape(),r&&r(o)},done:function(){a(),i&&i()}},t)),e}function bCe(n,e,t,i,r,a){var o=16;n=r===t?0:Math.round(32767*(n-t)/(r-t)),e=a===i?0:Math.round(32767*(e-i)/(a-i));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,d=0;(n&u)>0&&(c=1),(e&u)>0&&(d=1),s+=u*u*(3*c^d),d===0&&(c===1&&(n=u-1-n,e=u-1-e),l=n,n=e,e=l)}return s}function R8(n){var e=1/0,t=1/0,i=-1/0,r=-1/0,a=Xt(n,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),d=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(d,t),i=Math.max(c,i),r=Math.max(d,r),[c,d]}),o=Xt(a,function(s,l){return{cp:s,z:bCe(s[0],s[1],e,t,i,r),path:n[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function pQ(n){return vCe(n.path,n.count)}function DC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function xCe(n,e,t){var i=[];function r(A){for(var C=0;C<A.length;C++){var M=A[C];E8(M)?r(M.childrenRef()):M instanceof Ei&&i.push(M)}}r(n);var a=i.length;if(!a)return DC();var o=t.dividePath||pQ,s=o({path:e,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),DC();i=R8(i),s=R8(s);for(var l=t.done,u=t.during,c=t.individualDelay,d=new Dc,h=0;h<a;h++){var f=i[h],p=s[h];p.parent=e,p.copyTransform(d),c||fQ(f,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function m(A){for(var C=0;C<s.length;C++)s[C].addSelfToZr(A)}P8(e,"addSelfToZr",{after:function(A){m(A)}}),P8(e,"removeSelfFromZr",{after:function(A){for(var C=0;C<s.length;C++)s[C].removeSelfFromZr(A)}});function v(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,e9(e,"addSelfToZr"),e9(e,"removeSelfFromZr")}var g=s.length;if(c)for(var _=g,S=function(){_--,_===0&&(v(),l&&l())},h=0;h<g;h++){var x=c?qn({delay:(t.delay||0)+c(h,g,i[h],s[h]),done:S},t):t;tR(i[h],s[h],x)}else e.__morphT=0,e.animateTo({__morphT:1},qn({during:function(A){for(var C=0;C<g;C++){var M=s[C];M.__morphT=e.__morphT,M.dirtyShape()}u&&u(A)},done:function(){v();for(var A=0;A<n.length;A++)e9(n[A],"updateTransform");l&&l()}},t));return e.__zr&&m(e.__zr),{fromIndividuals:i,toIndividuals:s,count:g}}function wCe(n,e,t){var i=e.length,r=[],a=t.dividePath||pQ;function o(f){for(var p=0;p<f.length;p++){var m=f[p];E8(m)?o(m.childrenRef()):m instanceof Ei&&r.push(m)}}if(E8(n)){o(n.childrenRef());var s=r.length;if(s<i)for(var l=0,u=s;u<i;u++)r.push(vE(r[l++%s]));r.length=i}else{r=a({path:n,count:i});for(var c=n.getComputedTransform(),u=0;u<r.length;u++)r[u].setLocalTransform(c);if(r.length!==i)return console.error("Invalid morphing: unmatched splitted path"),DC()}r=R8(r),e=R8(e);for(var d=t.individualDelay,u=0;u<i;u++){var h=d?qn({delay:(t.delay||0)+d(u,i,r[u],e[u])},t):t;tR(r[u],e[u],h)}return{fromIndividuals:r,toIndividuals:e,count:e.length}}function XG(n){return $t(n[0])}function YG(n,e){for(var t=[],i=n.length,r=0;r<i;r++)t.push({one:n[r],many:[]});for(var r=0;r<e.length;r++){var a=e[r].length,o=void 0;for(o=0;o<a;o++)t[o%i].many.push(e[r][o])}for(var s=0,r=i-1;r>=0;r--)if(!t[r].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[r].many=l.slice(u,a),t[s].many=l.slice(0,u),s++}return t}var TCe={clone:function(n){for(var e=[],t=1-Math.pow(1-n.path.style.opacity,1/n.count),i=0;i<n.count;i++){var r=vE(n.path);r.setStyle("opacity",t),e.push(r)}return e},split:null};function _w(n,e,t,i,r,a){if(!n.length||!e.length)return;var o=Uv("update",i,r);if(!(o&&o.duration>0))return;var s=i.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;XG(n)&&(u=n,c=e),XG(e)&&(u=e,c=n);function d(g,_,S,x,A){var C=g.many,M=g.one;if(C.length===1&&!A){var I=_?C[0]:M,D=_?M:C[0];if(E8(I))d({many:[I],one:D},!0,S,x,!0);else{var E=s?qn({delay:s(S,x)},l):l;tR(I,D,E),a(I,D,I,D,E)}}else for(var P=qn({dividePath:TCe[t],individualDelay:s&&function(Q,K,ae,ie){return s(Q+S,x)}},l),F=_?xCe(C,M,P):wCe(M,C,P),V=F.fromIndividuals,G=F.toIndividuals,W=V.length,Y=0;Y<W;Y++){var E=s?qn({delay:s(Y,W)},l):l;a(V[Y],G[Y],_?C[Y]:g.one,_?g.one:C[Y],E)}}for(var h=u?u===n:n.length>e.length,f=u?YG(c,u):YG(h?e:n,[h?n:e]),p=0,m=0;m<f.length;m++)p+=f[m].many.length;for(var v=0,m=0;m<f.length;m++)d(f[m],h,v,p),v+=f[m].many.length}function $f(n){if(!n)return[];if($t(n)){for(var e=[],t=0;t<n.length;t++)e.push($f(n[t]));return e}var i=[];return n.traverse(function(r){r instanceof Ei&&!r.disableMorphing&&!r.invisible&&!r.ignore&&i.push(r)}),i}var vQ=1e4,ACe=0,KG=1,ZG=2,CCe=Gi();function MCe(n,e){for(var t=n.dimensions,i=0;i<t.length;i++){var r=n.getDimensionInfo(t[i]);if(r&&r.otherDims[e]===0)return t[i]}}function ECe(n,e,t){var i=n.getDimensionInfo(t),r=i&&i.ordinalMeta;if(i){var a=n.get(i.name,e);return r&&r.categories[a]||a+""}}function JG(n,e,t,i){var r=i?"itemChildGroupId":"itemGroupId",a=MCe(n,r);if(a){var o=ECe(n,e,a);return o}var s=n.getRawDataItem(e),l=i?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!i)return t||n.getId(e)}function QG(n){var e=[];return ne(n,function(t){var i=t.data,r=t.dataGroupId;if(!(i.count()>vQ))for(var a=i.getIndices(),o=0;o<a.length;o++)e.push({data:i,groupId:JG(i,o,r,!1),childGroupId:JG(i,o,r,!0),divide:t.divide,dataIndex:o})}),e}function Sw(n,e,t){n.traverse(function(i){i instanceof Ei&&sa(i,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function bw(n){if(n.parent){var e=n.getComputedTransform();n.setLocalTransform(e),n.parent.remove(n)}}function q1(n){n.stopAnimation(),n.isGroup&&n.traverse(function(e){e.stopAnimation()})}function PCe(n,e,t){var i=Uv("update",t,e);i&&n.traverse(function(r){if(r instanceof M0){var a=lpe(r);a&&r.animateFrom({style:a},i)}})}function RCe(n,e){var t=n.length;if(t!==e.length)return!1;for(var i=0;i<t;i++){var r=n[i],a=e[i];if(r.data.getId(r.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function mQ(n,e,t){var i=QG(n),r=QG(e);function a(S,x,A,C,M){(A||S)&&x.animateFrom({style:A&&A!==S?It(It({},A.style),S.style):S.style},M)}var o=!1,s=ACe,l=In(),u=In();i.forEach(function(S){S.groupId&&l.set(S.groupId,!0),S.childGroupId&&u.set(S.childGroupId,!0)});for(var c=0;c<r.length;c++){var d=r[c].groupId;if(u.get(d)){s=KG;break}var h=r[c].childGroupId;if(h&&l.get(h)){s=ZG;break}}function f(S,x){return function(A){var C=A.data,M=A.dataIndex;return x?C.getId(M):S?s===KG?A.childGroupId:A.groupId:s===ZG?A.childGroupId:A.groupId}}var p=RCe(i,r),m={};if(!p)for(var c=0;c<r.length;c++){var v=r[c],g=v.data.getItemGraphicEl(v.dataIndex);g&&(m[g.id]=!0)}function _(S,x){var A=i[x],C=r[S],M=C.data.hostModel,I=A.data.getItemGraphicEl(A.dataIndex),D=C.data.getItemGraphicEl(C.dataIndex);if(I===D){D&&PCe(D,C.dataIndex,M);return}I&&m[I.id]||D&&(q1(D),I?(q1(I),bw(I),o=!0,_w($f(I),$f(D),C.divide,M,S,a)):Sw(D,M,S))}new Xc(i,r,f(!0,p),f(!1,p),null,"multiple").update(_).updateManyToOne(function(S,x){var A=r[S],C=A.data,M=C.hostModel,I=C.getItemGraphicEl(A.dataIndex),D=dr(Xt(x,function(E){return i[E].data.getItemGraphicEl(i[E].dataIndex)}),function(E){return E&&E!==I&&!m[E.id]});I&&(q1(I),D.length?(ne(D,function(E){q1(E),bw(E)}),o=!0,_w($f(D),$f(I),A.divide,M,S,a)):Sw(I,M,A.dataIndex))}).updateOneToMany(function(S,x){var A=i[x],C=A.data.getItemGraphicEl(A.dataIndex);if(!(C&&m[C.id])){var M=dr(Xt(S,function(D){return r[D].data.getItemGraphicEl(r[D].dataIndex)}),function(D){return D&&D!==C}),I=r[S[0]].data.hostModel;M.length&&(ne(M,function(D){return q1(D)}),C?(q1(C),bw(C),o=!0,_w($f(C),$f(M),A.divide,I,S[0],a)):ne(M,function(D){return Sw(D,I,S[0])}))}}).updateManyToMany(function(S,x){new Xc(x,S,function(A){return i[A].data.getId(i[A].dataIndex)},function(A){return r[A].data.getId(r[A].dataIndex)}).update(function(A,C){_(S[A],x[C])}).execute()}).execute(),o&&ne(e,function(S){var x=S.data,A=x.hostModel,C=A&&t.getViewOfSeriesModel(A),M=Uv("update",A,0);C&&A.isAnimationEnabled()&&M&&M.duration>0&&C.group.traverse(function(I){I instanceof Ei&&!I.animators.length&&I.animateFrom({style:{opacity:0}},M)})})}function eU(n){var e=n.getModel("universalTransition").get("seriesKey");return e||n.id}function tU(n){return $t(n)?n.sort().join(","):n}function Wd(n){if(n.hostModel)return n.hostModel.getModel("universalTransition").get("divideShape")}function LCe(n,e){var t=In(),i=In(),r=In();return ne(n.oldSeries,function(a,o){var s=n.oldDataGroupIds[o],l=n.oldData[o],u=eU(a),c=tU(u);i.set(c,{dataGroupId:s,data:l}),$t(u)&&ne(u,function(d){r.set(d,{key:c,dataGroupId:s,data:l})})}),ne(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=eU(a),u=tU(l),c=i.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Wd(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Wd(s),data:s}]});else if($t(l)){var d=[];ne(l,function(p){var m=i.get(p);m.data&&d.push({dataGroupId:m.dataGroupId,divide:Wd(m.data),data:m.data})}),d.length&&t.set(u,{oldSeries:d,newSeries:[{dataGroupId:o,data:s,divide:Wd(s)}]})}else{var h=r.get(l);if(h){var f=t.get(h.key);f||(f={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Wd(h.data)}],newSeries:[]},t.set(h.key,f)),f.newSeries.push({dataGroupId:o,data:s,divide:Wd(s)})}}}}),t}function nU(n,e){for(var t=0;t<n.length;t++){var i=e.seriesIndex!=null&&e.seriesIndex===n[t].seriesIndex||e.seriesId!=null&&e.seriesId===n[t].id;if(i)return t}}function ICe(n,e,t,i){var r=[],a=[];ne(Ar(n.from),function(o){var s=nU(e.oldSeries,o);s>=0&&r.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Wd(e.oldData[s]),groupIdDim:o.dimension})}),ne(Ar(n.to),function(o){var s=nU(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Wd(l),groupIdDim:o.dimension})}}),r.length>0&&a.length>0&&mQ(r,a,i)}function DCe(n){n.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){ne(Ar(i.seriesTransition),function(r){ne(Ar(r.to),function(a){for(var o=i.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][s5]=!0)})})}),n.registerUpdateLifecycle("series:transition",function(e,t,i){var r=CCe(t);if(r.oldSeries&&i.updatedSeries&&i.optionChanged){var a=i.seriesTransition;if(a)ne(Ar(a),function(f){ICe(f,r,i,t)});else{var o=LCe(r,i);ne(o.keys(),function(f){var p=o.get(f);mQ(p.oldSeries,p.newSeries,t)})}ne(i.updatedSeries,function(f){f[s5]&&(f[s5]=!1)})}for(var s=e.getSeries(),l=r.oldSeries=[],u=r.oldDataGroupIds=[],c=r.oldData=[],d=0;d<s.length;d++){var h=s[d].getData();h.count()<vQ&&(l.push(s[d]),u.push(s[d].get("dataGroupId")),c.push(h))}})}Ci([Xge]);Ci([Uge]);Ci([y9e,F9e,Y9e,F3e,Q3e,qye,T6e,c4e,B4e,q4e,r5e,l8e,k8e,X8e,p_e,b_e,z_e,Y_e,l7e,m7e,P7e,pSe]);Ci(OSe);Ci(gbe);Ci(dZ);Ci(Nbe);Ci(ZZ);Ci(Ube);Ci(Kbe);Ci(Zxe);Ci(Swe);Ci(N3);Ci(Gwe);Ci(Hwe);Ci(rTe);Ci(pTe);Ci(xTe);Ci(RTe);Ci(WTe);Ci(hAe);Ci(nQ);Ci(iQ);Ci(zAe);Ci(lQ);Ci(uQ);Ci(WAe);Ci(iCe);Ci(oCe);Ci(DCe);Ci(age);var O6=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function NCe(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function B6(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var L8={exports:{}};L8.exports;(function(n,e){function t(Z){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},t(Z)}function i(Z,H){if(!(Z instanceof H))throw new TypeError("Cannot call a class as a function")}function r(Z,H){for(var w=0;w<H.length;w++){var T=H[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(Z,T.key,T)}}function a(Z,H,w){return H&&r(Z.prototype,H),w&&r(Z,w),Object.defineProperty(Z,"prototype",{writable:!1}),Z}function o(Z,H,w){return H in Z?Object.defineProperty(Z,H,{value:w,enumerable:!0,configurable:!0,writable:!0}):Z[H]=w,Z}var s=function(){function Z(H,w){i(this,Z),this.coreX=H,this.coreY=w}return a(Z,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}}]),Z}();Date.prototype.Format=function(Z){var H={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(Z)&&(Z=Z.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var w in H)new RegExp("("+w+")").test(Z)&&(Z=Z.replace(RegExp.$1,RegExp.$1.length==1?H[w]:("00"+H[w]).substr((""+H[w]).length)));return Z};var l=function(H,w,T){var R=document.getElementsByTagName("head")[0].getElementsByTagName("script"),N=!1;if(T)N=T();else for(var z=0;z<R.length;z++)R[z].getAttribute("src")==H&&(N=!0,w());if(N)w();else{var U=document.createElement("script");U.setAttribute("src",H),U.setAttribute("crossorigin",!0),U.onload=w,document.getElementsByTagName("head")[0].appendChild(U)}},u=function(H,w){for(var T=document.getElementsByTagName("head")[0].getElementsByTagName("link"),R=!1,N=0;N<T.length;N++)T[N].getAttribute("href")==H&&(R=!0);if(!R){var z=document.createElement("link");z.rel="stylesheet",z.type="text/css",z.href=H,z.onload=w,document.getElementsByTagName("head")[0].appendChild(z)}},c=function(H){return!!H&&(t(H)==="object"||typeof H=="function")&&typeof H.then=="function"},d=function(H,w){var T=new RegExp("(\\?|#|&)"+H+"=(.*?)(#|&|$)"),R=(w||window.location.href).match(T);return decodeURIComponent(R?R[2]:"")},h=function(H,w){var T=w.parentNode;T.lastChild==w?T.appendChild(H):T.insertBefore(H,w.nextSibling)},f=function(H){console.log("requestFullScreen",document.getElementById(H));var w=H.requestFullScreen||H.webkitRequestFullScreen||H.mozRequestFullScreen||H.msRequestFullScreen;if(w)w.call(H);else if(typeof window.ActiveXObject!="undefined"){var T=new window.ActiveXObject("WScript.Shell");T!==null&&T.SendKeys("{F11}")}},p=function(H){var w=document.documentElement.clientWidth,T=document.documentElement.clientHeight,R=H,N="";N+="width:"+T+"px;",N+="height:"+w+"px;",N+="-webkit-transform: rotate(90.001deg); transform: rotate(90.001deg);",N+="-webkit-transform-origin: "+w/2+"px "+w/2+"px;",N+="transform-origin: "+w/2+"px "+w/2+"px;",N+="position: fixed;top: 0;left: 0;z-index:10",R.style.cssText=N},m=function(H){f(H);var w=new Promise(function(T,R){var N=setInterval(function(){var U=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;if(U)return clearInterval(N),T(!0)},100),z=setTimeout(function(){var U=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;U||R(!1),clearTimeout(z)},2e3)});return w},v=function(H,w,T){var R="";R+="width:"+w+"px;",R+="height:"+T+"px;",R+="-webkit-transform: none; transform: none;",R+="-webkit-transform-origin: 0 0;",R+="transform-origin: 0 0;",H.style.cssText=R},g=function(){document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen&&document.mozCancelFullScreen()},_=function(H){g();var w=new Promise(function(T,R){var N=setInterval(function(){var U=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;if(!U)return clearInterval(N),T(!0)},50),z=setTimeout(function(){var U=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;U&&R(!1),clearTimeout(z)},2e3)});return w},S=function(H){var w=H.split("/")[3],T=H.split("/")[4].split(".")[0],R=H.split("/")[2].split("@").length===2?H.split("/")[2].split("@")[0]:"",N=H.indexOf(".hd")!==-1,z=H.split("/")[4].split(".")[H.split("/")[4].split(".").length-1].split("?")[0];return z==="rec"&&H.indexOf(".cloud.rec")!==-1&&(z="cloud.rec"),{deviceSerial:w,channelNo:T,validCode:R,hd:N,type:z}};function x(Z){if(typeof Z=="string")try{var H=JSON.parse(Z);return!!(t(H)==="object"&&H)}catch(w){return!1}console.log("It is not a string!")}var A=function(H,w,T,R,N,z){var U=H,ue=new XMLHttpRequest;ue.onreadystatechange=function(){if(ue.readyState==4&&ue.status==200)if(x(ue.responseText)){var se=JSON.parse(ue.responseText);N(se)}else N(ue.responseText)},ue.open(w,U,!0);var pe=new FormData;for(var de in T)pe.append(de,T[de]);ue.send(pe)},C=function(){function Z(H,w){var T=this;i(this,Z),l("https://open.ys7.com/assets/ezuikit_v3.4/js/hls.js",function(){console.log("加载hls.min.js成功",window.Hls),console.log("isSupportHls",window.Hls.isSupported()),window.Hls.isSupported()&&T.initHLS(H,w)},function(){return!!window.Hls})}return a(Z,[{key:"toString",value:function(){return"hls ".concat(this.coreX,"-").concat(this.coreY)}},{key:"initHLS",value:function(w,T){var R=document.getElementById(w),N=new window.Hls({defaultAudioCodec:"mp4a.40.2"});N.loadSource(T),N.attachMedia(R),N.on(window.Hls.Events.MANIFEST_PARSED,function(){R.play()}),N.on(window.Hls.Events.ERROR,function(z,U){if(U.fatal)switch(U.type){case window.Hls.ErrorTypes.NETWORK_ERROR:console.log("fatal network error encountered, try to recover"),N.startLoad();break;case window.Hls.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover"),N.recoverMediaError();break;default:N.destroy();break}}),this.hls=N,this.video=R,this.hlsUrl=T}},{key:"play",value:function(){console.log("执行hls播放",this.video),this.hls.startLoad(),this.video.play()}},{key:"stop",value:function(){this.video.pause(),this.hls.stopLoad()}}]),Z}(),M=function(){function Z(H,w){var T=this;i(this,Z),l("https://open.ys7.com/assets/ezuikit_v3.4/js/flv.min.js",function(){console.log("加载flv.min.js成功",window.flvjs),console.log("isSupportFlv",window.flvjs.isSupported()),window.flvjs.isSupported()&&T.initFLV(H,w)})}return a(Z,[{key:"toString",value:function(){return"Flv ".concat(this.coreX,"-").concat(this.coreY)}},{key:"initFLV",value:function(w,T){var R=document.getElementById(w),N=R.getAttribute("controls");N||R.setAttribute("controls",!0);var z=window.flvjs.createPlayer({type:"flv",url:T,isLive:!0},{enableStashBuffer:!0,stashInitialSize:128,enableWorker:!0});z.attachMediaElement(R),z.load(),z.play(),this.flvUrl=T,this.flv=z,this.video=R}},{key:"play",value:function(){console.log("执行flv播放",this.video),this.video.play()}},{key:"stop",value:function(){this.video.pause(),this.flv.unload()}}]),Z}(),I=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof O6!="undefined"?O6:typeof self!="undefined"?self:{};function D(Z,H){return H={exports:{}},Z(H,H.exports),H.exports}var E=D(function(Z,H){(function(){var w,T="4.17.21",R=200,N="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",z="Expected a function",U="Invalid `variable` option passed into `_.template`",ue="__lodash_hash_undefined__",pe=500,de="__lodash_placeholder__",se=1,re=2,Oe=4,be=1,me=2,ge=1,Ze=2,fe=4,B=8,te=16,oe=32,Ie=64,Ge=128,nt=256,at=512,St=30,zt="...",qt=800,kt=16,On=1,Wn=2,Vn=3,ii=1/0,ti=9007199254740991,di=17976931348623157e292,tr=0/0,Ve=4294967295,Mt=Ve-1,jt=Ve>>>1,Sn=[["ary",Ge],["bind",ge],["bindKey",Ze],["curry",B],["curryRight",te],["flip",at],["partial",oe],["partialRight",Ie],["rearg",nt]],Hn="[object Arguments]",pi="[object Array]",hi="[object AsyncFunction]",yi="[object Boolean]",nr="[object Date]",zl="[object DOMException]",fs="[object Error]",zr="[object Function]",Xo="[object GeneratorFunction]",ir="[object Map]",wa="[object Number]",co="[object Null]",Ui="[object Object]",xr="[object Promise]",_i="[object Proxy]",jn="[object RegExp]",wi="[object Set]",mr="[object String]",ye="[object Symbol]",Ne="[object Undefined]",qe="[object WeakMap]",tt="[object WeakSet]",ve="[object ArrayBuffer]",ct="[object DataView]",et="[object Float32Array]",gt="[object Float64Array]",Dt="[object Int8Array]",fn="[object Int16Array]",Gt="[object Int32Array]",vn="[object Uint8Array]",gr="[object Uint8ClampedArray]",ea="[object Uint16Array]",vi="[object Uint32Array]",Kr=/\b__p \+= '';/g,Ii=/\b(__p \+=) '' \+/g,yr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ps=/&(?:amp|lt|gt|quot|#39);/g,vs=/[&<>"']/g,zi=RegExp(ps.source),Gr=RegExp(vs.source),lu=/<%-([\s\S]+?)%>/g,od=/<%([\s\S]+?)%>/g,uu=/<%=([\s\S]+?)%>/g,jh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$h=/^\w*$/,_a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zr=/[\\^$.*+?()[\]{}|]/g,Yo=RegExp(Zr.source),Ds=/^\s+/,Gl=/\s/,oc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,sc=/\{\n\/\* \[wrapped with (.+)\] \*/,qh=/,? & /,l1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,sd=/[()=,{}\[\]\/\s]/,ms=/\\(\\)?/g,C7=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,u1=/\w*$/,M7=/^[-+]0x[0-9a-f]+$/i,E7=/^0b[01]+$/i,Ja=/^\[object .+?Constructor\]$/,P7=/^0o[0-7]+$/i,Si=/^(?:0|[1-9]\d*)$/,ua=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xh=/($^)/,Yh=/['\n\r\u2028\u2029\\]/g,ld="\\ud800-\\udfff",X="\\u0300-\\u036f",q="\\ufe20-\\ufe2f",ce="\\u20d0-\\u20ff",Je=X+q+ce,Nt="\\u2700-\\u27bf",Cn="a-z\\xdf-\\xf6\\xf8-\\xff",Fi="\\xac\\xb1\\xd7\\xf7",Ki="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wr="\\u2000-\\u206f",br=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_r="A-Z\\xc0-\\xd6\\xd8-\\xde",gs="\\ufe0e\\ufe0f",To=Fi+Ki+wr+br,ca="['’]",Qa="["+ld+"]",ud="["+To+"]",cu="["+Je+"]",cd="\\d+",Kh="["+Nt+"]",dd="["+Cn+"]",hd="[^"+ld+To+cd+Nt+Cn+_r+"]",c1="\\ud83c[\\udffb-\\udfff]",q3="(?:"+cu+"|"+c1+")",lL="[^"+ld+"]",R7="(?:\\ud83c[\\udde6-\\uddff]){2}",L7="[\\ud800-\\udbff][\\udc00-\\udfff]",d1="["+_r+"]",uL="\\u200d",cL="(?:"+dd+"|"+hd+")",rne="(?:"+d1+"|"+hd+")",dL="(?:"+ca+"(?:d|ll|m|re|s|t|ve))?",hL="(?:"+ca+"(?:D|LL|M|RE|S|T|VE))?",fL=q3+"?",pL="["+gs+"]?",ane="(?:"+uL+"(?:"+[lL,R7,L7].join("|")+")"+pL+fL+")*",one="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",sne="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",vL=pL+fL+ane,lne="(?:"+[Kh,R7,L7].join("|")+")"+vL,une="(?:"+[lL+cu+"?",cu,R7,L7,Qa].join("|")+")",cne=RegExp(ca,"g"),dne=RegExp(cu,"g"),I7=RegExp(c1+"(?="+c1+")|"+une+vL,"g"),hne=RegExp([d1+"?"+dd+"+"+dL+"(?="+[ud,d1,"$"].join("|")+")",rne+"+"+hL+"(?="+[ud,d1+cL,"$"].join("|")+")",d1+"?"+cL+"+"+dL,d1+"+"+hL,sne,one,cd,lne].join("|"),"g"),fne=RegExp("["+uL+ld+Je+gs+"]"),pne=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],mne=-1,va={};va[et]=va[gt]=va[Dt]=va[fn]=va[Gt]=va[vn]=va[gr]=va[ea]=va[vi]=!0,va[Hn]=va[pi]=va[ve]=va[yi]=va[ct]=va[nr]=va[fs]=va[zr]=va[ir]=va[wa]=va[Ui]=va[jn]=va[wi]=va[mr]=va[qe]=!1;var da={};da[Hn]=da[pi]=da[ve]=da[ct]=da[yi]=da[nr]=da[et]=da[gt]=da[Dt]=da[fn]=da[Gt]=da[ir]=da[wa]=da[Ui]=da[jn]=da[wi]=da[mr]=da[ye]=da[vn]=da[gr]=da[ea]=da[vi]=!0,da[fs]=da[zr]=da[qe]=!1;var gne={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},yne={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_ne={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Sne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},bne=parseFloat,xne=parseInt,mL=typeof I=="object"&&I&&I.Object===Object&&I,wne=typeof self=="object"&&self&&self.Object===Object&&self,Do=mL||wne||Function("return this")(),D7=H&&!H.nodeType&&H,Zh=D7&&!0&&Z&&!Z.nodeType&&Z,gL=Zh&&Zh.exports===D7,N7=gL&&mL.process,Ul=function(){try{var dt=Zh&&Zh.require&&Zh.require("util").types;return dt||N7&&N7.binding&&N7.binding("util")}catch(Qt){}}(),yL=Ul&&Ul.isArrayBuffer,_L=Ul&&Ul.isDate,SL=Ul&&Ul.isMap,bL=Ul&&Ul.isRegExp,xL=Ul&&Ul.isSet,wL=Ul&&Ul.isTypedArray;function pl(dt,Qt,Ut){switch(Ut.length){case 0:return dt.call(Qt);case 1:return dt.call(Qt,Ut[0]);case 2:return dt.call(Qt,Ut[0],Ut[1]);case 3:return dt.call(Qt,Ut[0],Ut[1],Ut[2])}return dt.apply(Qt,Ut)}function Tne(dt,Qt,Ut,Yn){for(var Di=-1,Cr=dt==null?0:dt.length;++Di<Cr;){var ho=dt[Di];Qt(Yn,ho,Ut(ho),dt)}return Yn}function Vl(dt,Qt){for(var Ut=-1,Yn=dt==null?0:dt.length;++Ut<Yn&&Qt(dt[Ut],Ut,dt)!==!1;);return dt}function Ane(dt,Qt){for(var Ut=dt==null?0:dt.length;Ut--&&Qt(dt[Ut],Ut,dt)!==!1;);return dt}function TL(dt,Qt){for(var Ut=-1,Yn=dt==null?0:dt.length;++Ut<Yn;)if(!Qt(dt[Ut],Ut,dt))return!1;return!0}function fd(dt,Qt){for(var Ut=-1,Yn=dt==null?0:dt.length,Di=0,Cr=[];++Ut<Yn;){var ho=dt[Ut];Qt(ho,Ut,dt)&&(Cr[Di++]=ho)}return Cr}function X3(dt,Qt){var Ut=dt==null?0:dt.length;return!!Ut&&h1(dt,Qt,0)>-1}function k7(dt,Qt,Ut){for(var Yn=-1,Di=dt==null?0:dt.length;++Yn<Di;)if(Ut(Qt,dt[Yn]))return!0;return!1}function Sa(dt,Qt){for(var Ut=-1,Yn=dt==null?0:dt.length,Di=Array(Yn);++Ut<Yn;)Di[Ut]=Qt(dt[Ut],Ut,dt);return Di}function pd(dt,Qt){for(var Ut=-1,Yn=Qt.length,Di=dt.length;++Ut<Yn;)dt[Di+Ut]=Qt[Ut];return dt}function F7(dt,Qt,Ut,Yn){var Di=-1,Cr=dt==null?0:dt.length;for(Yn&&Cr&&(Ut=dt[++Di]);++Di<Cr;)Ut=Qt(Ut,dt[Di],Di,dt);return Ut}function Cne(dt,Qt,Ut,Yn){var Di=dt==null?0:dt.length;for(Yn&&Di&&(Ut=dt[--Di]);Di--;)Ut=Qt(Ut,dt[Di],Di,dt);return Ut}function O7(dt,Qt){for(var Ut=-1,Yn=dt==null?0:dt.length;++Ut<Yn;)if(Qt(dt[Ut],Ut,dt))return!0;return!1}var Mne=B7("length");function Ene(dt){return dt.split("")}function Pne(dt){return dt.match(l1)||[]}function AL(dt,Qt,Ut){var Yn;return Ut(dt,function(Di,Cr,ho){if(Qt(Di,Cr,ho))return Yn=Cr,!1}),Yn}function Y3(dt,Qt,Ut,Yn){for(var Di=dt.length,Cr=Ut+(Yn?1:-1);Yn?Cr--:++Cr<Di;)if(Qt(dt[Cr],Cr,dt))return Cr;return-1}function h1(dt,Qt,Ut){return Qt===Qt?Une(dt,Qt,Ut):Y3(dt,CL,Ut)}function Rne(dt,Qt,Ut,Yn){for(var Di=Ut-1,Cr=dt.length;++Di<Cr;)if(Yn(dt[Di],Qt))return Di;return-1}function CL(dt){return dt!==dt}function ML(dt,Qt){var Ut=dt==null?0:dt.length;return Ut?G7(dt,Qt)/Ut:tr}function B7(dt){return function(Qt){return Qt==null?w:Qt[dt]}}function z7(dt){return function(Qt){return dt==null?w:dt[Qt]}}function EL(dt,Qt,Ut,Yn,Di){return Di(dt,function(Cr,ho,ta){Ut=Yn?(Yn=!1,Cr):Qt(Ut,Cr,ho,ta)}),Ut}function Lne(dt,Qt){var Ut=dt.length;for(dt.sort(Qt);Ut--;)dt[Ut]=dt[Ut].value;return dt}function G7(dt,Qt){for(var Ut,Yn=-1,Di=dt.length;++Yn<Di;){var Cr=Qt(dt[Yn]);Cr!==w&&(Ut=Ut===w?Cr:Ut+Cr)}return Ut}function U7(dt,Qt){for(var Ut=-1,Yn=Array(dt);++Ut<dt;)Yn[Ut]=Qt(Ut);return Yn}function Ine(dt,Qt){return Sa(Qt,function(Ut){return[Ut,dt[Ut]]})}function PL(dt){return dt&&dt.slice(0,DL(dt)+1).replace(Ds,"")}function vl(dt){return function(Qt){return dt(Qt)}}function V7(dt,Qt){return Sa(Qt,function(Ut){return dt[Ut]})}function lm(dt,Qt){return dt.has(Qt)}function RL(dt,Qt){for(var Ut=-1,Yn=dt.length;++Ut<Yn&&h1(Qt,dt[Ut],0)>-1;);return Ut}function LL(dt,Qt){for(var Ut=dt.length;Ut--&&h1(Qt,dt[Ut],0)>-1;);return Ut}function Dne(dt,Qt){for(var Ut=dt.length,Yn=0;Ut--;)dt[Ut]===Qt&&++Yn;return Yn}var Nne=z7(gne),kne=z7(yne);function Fne(dt){return"\\"+Sne[dt]}function One(dt,Qt){return dt==null?w:dt[Qt]}function f1(dt){return fne.test(dt)}function Bne(dt){return pne.test(dt)}function zne(dt){for(var Qt,Ut=[];!(Qt=dt.next()).done;)Ut.push(Qt.value);return Ut}function H7(dt){var Qt=-1,Ut=Array(dt.size);return dt.forEach(function(Yn,Di){Ut[++Qt]=[Di,Yn]}),Ut}function IL(dt,Qt){return function(Ut){return dt(Qt(Ut))}}function vd(dt,Qt){for(var Ut=-1,Yn=dt.length,Di=0,Cr=[];++Ut<Yn;){var ho=dt[Ut];(ho===Qt||ho===de)&&(dt[Ut]=de,Cr[Di++]=Ut)}return Cr}function K3(dt){var Qt=-1,Ut=Array(dt.size);return dt.forEach(function(Yn){Ut[++Qt]=Yn}),Ut}function Gne(dt){var Qt=-1,Ut=Array(dt.size);return dt.forEach(function(Yn){Ut[++Qt]=[Yn,Yn]}),Ut}function Une(dt,Qt,Ut){for(var Yn=Ut-1,Di=dt.length;++Yn<Di;)if(dt[Yn]===Qt)return Yn;return-1}function Vne(dt,Qt,Ut){for(var Yn=Ut+1;Yn--;)if(dt[Yn]===Qt)return Yn;return Yn}function p1(dt){return f1(dt)?Wne(dt):Mne(dt)}function N0(dt){return f1(dt)?jne(dt):Ene(dt)}function DL(dt){for(var Qt=dt.length;Qt--&&Gl.test(dt.charAt(Qt)););return Qt}var Hne=z7(_ne);function Wne(dt){for(var Qt=I7.lastIndex=0;I7.test(dt);)++Qt;return Qt}function jne(dt){return dt.match(I7)||[]}function $ne(dt){return dt.match(hne)||[]}var qne=function dt(Qt){Qt=Qt==null?Do:v1.defaults(Do.Object(),Qt,v1.pick(Do,vne));var Ut=Qt.Array,Yn=Qt.Date,Di=Qt.Error,Cr=Qt.Function,ho=Qt.Math,ta=Qt.Object,W7=Qt.RegExp,Xne=Qt.String,Hl=Qt.TypeError,Z3=Ut.prototype,Yne=Cr.prototype,m1=ta.prototype,J3=Qt["__core-js_shared__"],Q3=Yne.toString,Ur=m1.hasOwnProperty,Kne=0,NL=function(){var y=/[^.]+$/.exec(J3&&J3.keys&&J3.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),ey=m1.toString,Zne=Q3.call(ta),Jne=Do._,Qne=W7("^"+Q3.call(Ur).replace(Zr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ty=gL?Qt.Buffer:w,md=Qt.Symbol,ny=Qt.Uint8Array,kL=ty?ty.allocUnsafe:w,iy=IL(ta.getPrototypeOf,ta),FL=ta.create,OL=m1.propertyIsEnumerable,ry=Z3.splice,BL=md?md.isConcatSpreadable:w,um=md?md.iterator:w,Jh=md?md.toStringTag:w,ay=function(){try{var y=rf(ta,"defineProperty");return y({},"",{}),y}catch(b){}}(),eie=Qt.clearTimeout!==Do.clearTimeout&&Qt.clearTimeout,tie=Yn&&Yn.now!==Do.Date.now&&Yn.now,nie=Qt.setTimeout!==Do.setTimeout&&Qt.setTimeout,oy=ho.ceil,sy=ho.floor,j7=ta.getOwnPropertySymbols,iie=ty?ty.isBuffer:w,zL=Qt.isFinite,rie=Z3.join,aie=IL(ta.keys,ta),fo=ho.max,Ko=ho.min,oie=Yn.now,sie=Qt.parseInt,GL=ho.random,lie=Z3.reverse,$7=rf(Qt,"DataView"),cm=rf(Qt,"Map"),q7=rf(Qt,"Promise"),g1=rf(Qt,"Set"),dm=rf(Qt,"WeakMap"),hm=rf(ta,"create"),ly=dm&&new dm,y1={},uie=af($7),cie=af(cm),die=af(q7),hie=af(g1),fie=af(dm),uy=md?md.prototype:w,fm=uy?uy.valueOf:w,UL=uy?uy.toString:w;function Se(y){if(Ia(y)&&!Oi(y)&&!(y instanceof sr)){if(y instanceof Wl)return y;if(Ur.call(y,"__wrapped__"))return VI(y)}return new Wl(y)}var _1=function(){function y(){}return function(b){if(!Ta(b))return{};if(FL)return FL(b);y.prototype=b;var L=new y;return y.prototype=w,L}}();function cy(){}function Wl(y,b){this.__wrapped__=y,this.__actions__=[],this.__chain__=!!b,this.__index__=0,this.__values__=w}Se.templateSettings={escape:lu,evaluate:od,interpolate:uu,variable:"",imports:{_:Se}},Se.prototype=cy.prototype,Se.prototype.constructor=Se,Wl.prototype=_1(cy.prototype),Wl.prototype.constructor=Wl;function sr(y){this.__wrapped__=y,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ve,this.__views__=[]}function pie(){var y=new sr(this.__wrapped__);return y.__actions__=Ns(this.__actions__),y.__dir__=this.__dir__,y.__filtered__=this.__filtered__,y.__iteratees__=Ns(this.__iteratees__),y.__takeCount__=this.__takeCount__,y.__views__=Ns(this.__views__),y}function vie(){if(this.__filtered__){var y=new sr(this);y.__dir__=-1,y.__filtered__=!0}else y=this.clone(),y.__dir__*=-1;return y}function mie(){var y=this.__wrapped__.value(),b=this.__dir__,L=Oi(y),j=b<0,le=L?y.length:0,Me=Ere(0,le,this.__views__),Ke=Me.start,rt=Me.end,yt=rt-Ke,ln=j?rt:Ke-1,un=this.__iteratees__,mn=un.length,Gn=0,ri=Ko(yt,this.__takeCount__);if(!L||!j&&le==yt&&ri==yt)return dI(y,this.__actions__);var Ti=[];e:for(;yt--&&Gn<ri;){ln+=b;for(var Wi=-1,Ai=y[ln];++Wi<mn;){var or=un[Wi],hr=or.iteratee,yl=or.type,Ss=hr(Ai);if(yl==Wn)Ai=Ss;else if(!Ss){if(yl==On)continue e;break e}}Ti[Gn++]=Ai}return Ti}sr.prototype=_1(cy.prototype),sr.prototype.constructor=sr;function Qh(y){var b=-1,L=y==null?0:y.length;for(this.clear();++b<L;){var j=y[b];this.set(j[0],j[1])}}function gie(){this.__data__=hm?hm(null):{},this.size=0}function yie(y){var b=this.has(y)&&delete this.__data__[y];return this.size-=b?1:0,b}function _ie(y){var b=this.__data__;if(hm){var L=b[y];return L===ue?w:L}return Ur.call(b,y)?b[y]:w}function Sie(y){var b=this.__data__;return hm?b[y]!==w:Ur.call(b,y)}function bie(y,b){var L=this.__data__;return this.size+=this.has(y)?0:1,L[y]=hm&&b===w?ue:b,this}Qh.prototype.clear=gie,Qh.prototype.delete=yie,Qh.prototype.get=_ie,Qh.prototype.has=Sie,Qh.prototype.set=bie;function lc(y){var b=-1,L=y==null?0:y.length;for(this.clear();++b<L;){var j=y[b];this.set(j[0],j[1])}}function xie(){this.__data__=[],this.size=0}function wie(y){var b=this.__data__,L=dy(b,y);if(L<0)return!1;var j=b.length-1;return L==j?b.pop():ry.call(b,L,1),--this.size,!0}function Tie(y){var b=this.__data__,L=dy(b,y);return L<0?w:b[L][1]}function Aie(y){return dy(this.__data__,y)>-1}function Cie(y,b){var L=this.__data__,j=dy(L,y);return j<0?(++this.size,L.push([y,b])):L[j][1]=b,this}lc.prototype.clear=xie,lc.prototype.delete=wie,lc.prototype.get=Tie,lc.prototype.has=Aie,lc.prototype.set=Cie;function uc(y){var b=-1,L=y==null?0:y.length;for(this.clear();++b<L;){var j=y[b];this.set(j[0],j[1])}}function Mie(){this.size=0,this.__data__={hash:new Qh,map:new(cm||lc),string:new Qh}}function Eie(y){var b=wy(this,y).delete(y);return this.size-=b?1:0,b}function Pie(y){return wy(this,y).get(y)}function Rie(y){return wy(this,y).has(y)}function Lie(y,b){var L=wy(this,y),j=L.size;return L.set(y,b),this.size+=L.size==j?0:1,this}uc.prototype.clear=Mie,uc.prototype.delete=Eie,uc.prototype.get=Pie,uc.prototype.has=Rie,uc.prototype.set=Lie;function ef(y){var b=-1,L=y==null?0:y.length;for(this.__data__=new uc;++b<L;)this.add(y[b])}function Iie(y){return this.__data__.set(y,ue),this}function Die(y){return this.__data__.has(y)}ef.prototype.add=ef.prototype.push=Iie,ef.prototype.has=Die;function k0(y){var b=this.__data__=new lc(y);this.size=b.size}function Nie(){this.__data__=new lc,this.size=0}function kie(y){var b=this.__data__,L=b.delete(y);return this.size=b.size,L}function Fie(y){return this.__data__.get(y)}function Oie(y){return this.__data__.has(y)}function Bie(y,b){var L=this.__data__;if(L instanceof lc){var j=L.__data__;if(!cm||j.length<R-1)return j.push([y,b]),this.size=++L.size,this;L=this.__data__=new uc(j)}return L.set(y,b),this.size=L.size,this}k0.prototype.clear=Nie,k0.prototype.delete=kie,k0.prototype.get=Fie,k0.prototype.has=Oie,k0.prototype.set=Bie;function VL(y,b){var L=Oi(y),j=!L&&of(y),le=!L&&!j&&bd(y),Me=!L&&!j&&!le&&w1(y),Ke=L||j||le||Me,rt=Ke?U7(y.length,Xne):[],yt=rt.length;for(var ln in y)(b||Ur.call(y,ln))&&!(Ke&&(ln=="length"||le&&(ln=="offset"||ln=="parent")||Me&&(ln=="buffer"||ln=="byteLength"||ln=="byteOffset")||fc(ln,yt)))&&rt.push(ln);return rt}function HL(y){var b=y.length;return b?y[rS(0,b-1)]:w}function zie(y,b){return Ty(Ns(y),tf(b,0,y.length))}function Gie(y){return Ty(Ns(y))}function X7(y,b,L){(L!==w&&!F0(y[b],L)||L===w&&!(b in y))&&cc(y,b,L)}function pm(y,b,L){var j=y[b];(!(Ur.call(y,b)&&F0(j,L))||L===w&&!(b in y))&&cc(y,b,L)}function dy(y,b){for(var L=y.length;L--;)if(F0(y[L][0],b))return L;return-1}function Uie(y,b,L,j){return gd(y,function(le,Me,Ke){b(j,le,L(le),Ke)}),j}function WL(y,b){return y&&hu(b,Ao(b),y)}function Vie(y,b){return y&&hu(b,Fs(b),y)}function cc(y,b,L){b=="__proto__"&&ay?ay(y,b,{configurable:!0,enumerable:!0,value:L,writable:!0}):y[b]=L}function Y7(y,b){for(var L=-1,j=b.length,le=Ut(j),Me=y==null;++L<j;)le[L]=Me?w:PS(y,b[L]);return le}function tf(y,b,L){return y===y&&(L!==w&&(y=y<=L?y:L),b!==w&&(y=y>=b?y:b)),y}function jl(y,b,L,j,le,Me){var Ke,rt=b&se,yt=b&re,ln=b&Oe;if(L&&(Ke=le?L(y,j,le,Me):L(y)),Ke!==w)return Ke;if(!Ta(y))return y;var un=Oi(y);if(un){if(Ke=Rre(y),!rt)return Ns(y,Ke)}else{var mn=Zo(y),Gn=mn==zr||mn==Xo;if(bd(y))return pI(y,rt);if(mn==Ui||mn==Hn||Gn&&!le){if(Ke=yt||Gn?{}:DI(y),!rt)return yt?_re(y,Vie(Ke,y)):yre(y,WL(Ke,y))}else{if(!da[mn])return le?y:{};Ke=Lre(y,mn,rt)}}Me||(Me=new k0);var ri=Me.get(y);if(ri)return ri;Me.set(y,Ke),lD(y)?y.forEach(function(Ai){Ke.add(jl(Ai,b,L,Ai,y,Me))}):oD(y)&&y.forEach(function(Ai,or){Ke.set(or,jl(Ai,b,L,or,y,Me))});var Ti=ln?yt?vS:pS:yt?Fs:Ao,Wi=un?w:Ti(y);return Vl(Wi||y,function(Ai,or){Wi&&(or=Ai,Ai=y[or]),pm(Ke,or,jl(Ai,b,L,or,y,Me))}),Ke}function Hie(y){var b=Ao(y);return function(L){return jL(L,y,b)}}function jL(y,b,L){var j=L.length;if(y==null)return!j;for(y=ta(y);j--;){var le=L[j],Me=b[le],Ke=y[le];if(Ke===w&&!(le in y)||!Me(Ke))return!1}return!0}function $L(y,b,L){if(typeof y!="function")throw new Hl(z);return bm(function(){y.apply(w,L)},b)}function vm(y,b,L,j){var le=-1,Me=X3,Ke=!0,rt=y.length,yt=[],ln=b.length;if(!rt)return yt;L&&(b=Sa(b,vl(L))),j?(Me=k7,Ke=!1):b.length>=R&&(Me=lm,Ke=!1,b=new ef(b));e:for(;++le<rt;){var un=y[le],mn=L==null?un:L(un);if(un=j||un!==0?un:0,Ke&&mn===mn){for(var Gn=ln;Gn--;)if(b[Gn]===mn)continue e;yt.push(un)}else Me(b,mn,j)||yt.push(un)}return yt}var gd=_I(du),qL=_I(Z7,!0);function Wie(y,b){var L=!0;return gd(y,function(j,le,Me){return L=!!b(j,le,Me),L}),L}function hy(y,b,L){for(var j=-1,le=y.length;++j<le;){var Me=y[j],Ke=b(Me);if(Ke!=null&&(rt===w?Ke===Ke&&!gl(Ke):L(Ke,rt)))var rt=Ke,yt=Me}return yt}function jie(y,b,L,j){var le=y.length;for(L=Vi(L),L<0&&(L=-L>le?0:le+L),j=j===w||j>le?le:Vi(j),j<0&&(j+=le),j=L>j?0:cD(j);L<j;)y[L++]=b;return y}function XL(y,b){var L=[];return gd(y,function(j,le,Me){b(j,le,Me)&&L.push(j)}),L}function No(y,b,L,j,le){var Me=-1,Ke=y.length;for(L||(L=Dre),le||(le=[]);++Me<Ke;){var rt=y[Me];b>0&&L(rt)?b>1?No(rt,b-1,L,j,le):pd(le,rt):j||(le[le.length]=rt)}return le}var K7=SI(),YL=SI(!0);function du(y,b){return y&&K7(y,b,Ao)}function Z7(y,b){return y&&YL(y,b,Ao)}function fy(y,b){return fd(b,function(L){return pc(y[L])})}function nf(y,b){b=_d(b,y);for(var L=0,j=b.length;y!=null&&L<j;)y=y[fu(b[L++])];return L&&L==j?y:w}function KL(y,b,L){var j=b(y);return Oi(y)?j:pd(j,L(y))}function ys(y){return y==null?y===w?Ne:co:Jh&&Jh in ta(y)?Mre(y):Gre(y)}function J7(y,b){return y>b}function $ie(y,b){return y!=null&&Ur.call(y,b)}function qie(y,b){return y!=null&&b in ta(y)}function Xie(y,b,L){return y>=Ko(b,L)&&y<fo(b,L)}function Q7(y,b,L){for(var j=L?k7:X3,le=y[0].length,Me=y.length,Ke=Me,rt=Ut(Me),yt=1/0,ln=[];Ke--;){var un=y[Ke];Ke&&b&&(un=Sa(un,vl(b))),yt=Ko(un.length,yt),rt[Ke]=!L&&(b||le>=120&&un.length>=120)?new ef(Ke&&un):w}un=y[0];var mn=-1,Gn=rt[0];e:for(;++mn<le&&ln.length<yt;){var ri=un[mn],Ti=b?b(ri):ri;if(ri=L||ri!==0?ri:0,!(Gn?lm(Gn,Ti):j(ln,Ti,L))){for(Ke=Me;--Ke;){var Wi=rt[Ke];if(!(Wi?lm(Wi,Ti):j(y[Ke],Ti,L)))continue e}Gn&&Gn.push(Ti),ln.push(ri)}}return ln}function Yie(y,b,L,j){return du(y,function(le,Me,Ke){b(j,L(le),Me,Ke)}),j}function mm(y,b,L){b=_d(b,y),y=OI(y,b);var j=y==null?y:y[fu(ql(b))];return j==null?w:pl(j,y,L)}function ZL(y){return Ia(y)&&ys(y)==Hn}function Kie(y){return Ia(y)&&ys(y)==ve}function Zie(y){return Ia(y)&&ys(y)==nr}function gm(y,b,L,j,le){return y===b?!0:y==null||b==null||!Ia(y)&&!Ia(b)?y!==y&&b!==b:Jie(y,b,L,j,gm,le)}function Jie(y,b,L,j,le,Me){var Ke=Oi(y),rt=Oi(b),yt=Ke?pi:Zo(y),ln=rt?pi:Zo(b);yt=yt==Hn?Ui:yt,ln=ln==Hn?Ui:ln;var un=yt==Ui,mn=ln==Ui,Gn=yt==ln;if(Gn&&bd(y)){if(!bd(b))return!1;Ke=!0,un=!1}if(Gn&&!un)return Me||(Me=new k0),Ke||w1(y)?RI(y,b,L,j,le,Me):Are(y,b,yt,L,j,le,Me);if(!(L&be)){var ri=un&&Ur.call(y,"__wrapped__"),Ti=mn&&Ur.call(b,"__wrapped__");if(ri||Ti){var Wi=ri?y.value():y,Ai=Ti?b.value():b;return Me||(Me=new k0),le(Wi,Ai,L,j,Me)}}return Gn?(Me||(Me=new k0),Cre(y,b,L,j,le,Me)):!1}function Qie(y){return Ia(y)&&Zo(y)==ir}function eS(y,b,L,j){var le=L.length,Me=le,Ke=!j;if(y==null)return!Me;for(y=ta(y);le--;){var rt=L[le];if(Ke&&rt[2]?rt[1]!==y[rt[0]]:!(rt[0]in y))return!1}for(;++le<Me;){rt=L[le];var yt=rt[0],ln=y[yt],un=rt[1];if(Ke&&rt[2]){if(ln===w&&!(yt in y))return!1}else{var mn=new k0;if(j)var Gn=j(ln,un,yt,y,b,mn);if(!(Gn===w?gm(un,ln,be|me,j,mn):Gn))return!1}}return!0}function JL(y){if(!Ta(y)||kre(y))return!1;var b=pc(y)?Qne:Ja;return b.test(af(y))}function ere(y){return Ia(y)&&ys(y)==jn}function tre(y){return Ia(y)&&Zo(y)==wi}function nre(y){return Ia(y)&&Ry(y.length)&&!!va[ys(y)]}function QL(y){return typeof y=="function"?y:y==null?Os:typeof y=="object"?Oi(y)?nI(y[0],y[1]):tI(y):bD(y)}function tS(y){if(!Sm(y))return aie(y);var b=[];for(var L in ta(y))Ur.call(y,L)&&L!="constructor"&&b.push(L);return b}function ire(y){if(!Ta(y))return zre(y);var b=Sm(y),L=[];for(var j in y)j=="constructor"&&(b||!Ur.call(y,j))||L.push(j);return L}function nS(y,b){return y<b}function eI(y,b){var L=-1,j=ks(y)?Ut(y.length):[];return gd(y,function(le,Me,Ke){j[++L]=b(le,Me,Ke)}),j}function tI(y){var b=gS(y);return b.length==1&&b[0][2]?kI(b[0][0],b[0][1]):function(L){return L===y||eS(L,y,b)}}function nI(y,b){return _S(y)&&NI(b)?kI(fu(y),b):function(L){var j=PS(L,y);return j===w&&j===b?RS(L,y):gm(b,j,be|me)}}function py(y,b,L,j,le){y!==b&&K7(b,function(Me,Ke){if(le||(le=new k0),Ta(Me))rre(y,b,Ke,L,py,j,le);else{var rt=j?j(bS(y,Ke),Me,Ke+"",y,b,le):w;rt===w&&(rt=Me),X7(y,Ke,rt)}},Fs)}function rre(y,b,L,j,le,Me,Ke){var rt=bS(y,L),yt=bS(b,L),ln=Ke.get(yt);if(ln){X7(y,L,ln);return}var un=Me?Me(rt,yt,L+"",y,b,Ke):w,mn=un===w;if(mn){var Gn=Oi(yt),ri=!Gn&&bd(yt),Ti=!Gn&&!ri&&w1(yt);un=yt,Gn||ri||Ti?Oi(rt)?un=rt:za(rt)?un=Ns(rt):ri?(mn=!1,un=pI(yt,!0)):Ti?(mn=!1,un=vI(yt,!0)):un=[]:xm(yt)||of(yt)?(un=rt,of(rt)?un=dD(rt):(!Ta(rt)||pc(rt))&&(un=DI(yt))):mn=!1}mn&&(Ke.set(yt,un),le(un,yt,j,Me,Ke),Ke.delete(yt)),X7(y,L,un)}function iI(y,b){var L=y.length;if(L)return b+=b<0?L:0,fc(b,L)?y[b]:w}function rI(y,b,L){b.length?b=Sa(b,function(Me){return Oi(Me)?function(Ke){return nf(Ke,Me.length===1?Me[0]:Me)}:Me}):b=[Os];var j=-1;b=Sa(b,vl(bi()));var le=eI(y,function(Me,Ke,rt){var yt=Sa(b,function(ln){return ln(Me)});return{criteria:yt,index:++j,value:Me}});return Lne(le,function(Me,Ke){return gre(Me,Ke,L)})}function are(y,b){return aI(y,b,function(L,j){return RS(y,j)})}function aI(y,b,L){for(var j=-1,le=b.length,Me={};++j<le;){var Ke=b[j],rt=nf(y,Ke);L(rt,Ke)&&ym(Me,_d(Ke,y),rt)}return Me}function ore(y){return function(b){return nf(b,y)}}function iS(y,b,L,j){var le=j?Rne:h1,Me=-1,Ke=b.length,rt=y;for(y===b&&(b=Ns(b)),L&&(rt=Sa(y,vl(L)));++Me<Ke;)for(var yt=0,ln=b[Me],un=L?L(ln):ln;(yt=le(rt,un,yt,j))>-1;)rt!==y&&ry.call(rt,yt,1),ry.call(y,yt,1);return y}function oI(y,b){for(var L=y?b.length:0,j=L-1;L--;){var le=b[L];if(L==j||le!==Me){var Me=le;fc(le)?ry.call(y,le,1):sS(y,le)}}return y}function rS(y,b){return y+sy(GL()*(b-y+1))}function sre(y,b,L,j){for(var le=-1,Me=fo(oy((b-y)/(L||1)),0),Ke=Ut(Me);Me--;)Ke[j?Me:++le]=y,y+=L;return Ke}function aS(y,b){var L="";if(!y||b<1||b>ti)return L;do b%2&&(L+=y),b=sy(b/2),b&&(y+=y);while(b);return L}function Zi(y,b){return xS(FI(y,b,Os),y+"")}function lre(y){return HL(T1(y))}function ure(y,b){var L=T1(y);return Ty(L,tf(b,0,L.length))}function ym(y,b,L,j){if(!Ta(y))return y;b=_d(b,y);for(var le=-1,Me=b.length,Ke=Me-1,rt=y;rt!=null&&++le<Me;){var yt=fu(b[le]),ln=L;if(yt==="__proto__"||yt==="constructor"||yt==="prototype")return y;if(le!=Ke){var un=rt[yt];ln=j?j(un,yt,rt):w,ln===w&&(ln=Ta(un)?un:fc(b[le+1])?[]:{})}pm(rt,yt,ln),rt=rt[yt]}return y}var sI=ly?function(y,b){return ly.set(y,b),y}:Os,cre=ay?function(y,b){return ay(y,"toString",{configurable:!0,enumerable:!1,value:IS(b),writable:!0})}:Os;function dre(y){return Ty(T1(y))}function $l(y,b,L){var j=-1,le=y.length;b<0&&(b=-b>le?0:le+b),L=L>le?le:L,L<0&&(L+=le),le=b>L?0:L-b>>>0,b>>>=0;for(var Me=Ut(le);++j<le;)Me[j]=y[j+b];return Me}function hre(y,b){var L;return gd(y,function(j,le,Me){return L=b(j,le,Me),!L}),!!L}function vy(y,b,L){var j=0,le=y==null?j:y.length;if(typeof b=="number"&&b===b&&le<=jt){for(;j<le;){var Me=j+le>>>1,Ke=y[Me];Ke!==null&&!gl(Ke)&&(L?Ke<=b:Ke<b)?j=Me+1:le=Me}return le}return oS(y,b,Os,L)}function oS(y,b,L,j){var le=0,Me=y==null?0:y.length;if(Me===0)return 0;b=L(b);for(var Ke=b!==b,rt=b===null,yt=gl(b),ln=b===w;le<Me;){var un=sy((le+Me)/2),mn=L(y[un]),Gn=mn!==w,ri=mn===null,Ti=mn===mn,Wi=gl(mn);if(Ke)var Ai=j||Ti;else ln?Ai=Ti&&(j||Gn):rt?Ai=Ti&&Gn&&(j||!ri):yt?Ai=Ti&&Gn&&!ri&&(j||!Wi):ri||Wi?Ai=!1:Ai=j?mn<=b:mn<b;Ai?le=un+1:Me=un}return Ko(Me,Mt)}function lI(y,b){for(var L=-1,j=y.length,le=0,Me=[];++L<j;){var Ke=y[L],rt=b?b(Ke):Ke;if(!L||!F0(rt,yt)){var yt=rt;Me[le++]=Ke===0?0:Ke}}return Me}function uI(y){return typeof y=="number"?y:gl(y)?tr:+y}function ml(y){if(typeof y=="string")return y;if(Oi(y))return Sa(y,ml)+"";if(gl(y))return UL?UL.call(y):"";var b=y+"";return b=="0"&&1/y==-ii?"-0":b}function yd(y,b,L){var j=-1,le=X3,Me=y.length,Ke=!0,rt=[],yt=rt;if(L)Ke=!1,le=k7;else if(Me>=R){var ln=b?null:wre(y);if(ln)return K3(ln);Ke=!1,le=lm,yt=new ef}else yt=b?[]:rt;e:for(;++j<Me;){var un=y[j],mn=b?b(un):un;if(un=L||un!==0?un:0,Ke&&mn===mn){for(var Gn=yt.length;Gn--;)if(yt[Gn]===mn)continue e;b&&yt.push(mn),rt.push(un)}else le(yt,mn,L)||(yt!==rt&&yt.push(mn),rt.push(un))}return rt}function sS(y,b){return b=_d(b,y),y=OI(y,b),y==null||delete y[fu(ql(b))]}function cI(y,b,L,j){return ym(y,b,L(nf(y,b)),j)}function my(y,b,L,j){for(var le=y.length,Me=j?le:-1;(j?Me--:++Me<le)&&b(y[Me],Me,y););return L?$l(y,j?0:Me,j?Me+1:le):$l(y,j?Me+1:0,j?le:Me)}function dI(y,b){var L=y;return L instanceof sr&&(L=L.value()),F7(b,function(j,le){return le.func.apply(le.thisArg,pd([j],le.args))},L)}function lS(y,b,L){var j=y.length;if(j<2)return j?yd(y[0]):[];for(var le=-1,Me=Ut(j);++le<j;)for(var Ke=y[le],rt=-1;++rt<j;)rt!=le&&(Me[le]=vm(Me[le]||Ke,y[rt],b,L));return yd(No(Me,1),b,L)}function hI(y,b,L){for(var j=-1,le=y.length,Me=b.length,Ke={};++j<le;){var rt=j<Me?b[j]:w;L(Ke,y[j],rt)}return Ke}function uS(y){return za(y)?y:[]}function cS(y){return typeof y=="function"?y:Os}function _d(y,b){return Oi(y)?y:_S(y,b)?[y]:UI(Pr(y))}var fre=Zi;function Sd(y,b,L){var j=y.length;return L=L===w?j:L,!b&&L>=j?y:$l(y,b,L)}var fI=eie||function(y){return Do.clearTimeout(y)};function pI(y,b){if(b)return y.slice();var L=y.length,j=kL?kL(L):new y.constructor(L);return y.copy(j),j}function dS(y){var b=new y.constructor(y.byteLength);return new ny(b).set(new ny(y)),b}function pre(y,b){var L=b?dS(y.buffer):y.buffer;return new y.constructor(L,y.byteOffset,y.byteLength)}function vre(y){var b=new y.constructor(y.source,u1.exec(y));return b.lastIndex=y.lastIndex,b}function mre(y){return fm?ta(fm.call(y)):{}}function vI(y,b){var L=b?dS(y.buffer):y.buffer;return new y.constructor(L,y.byteOffset,y.length)}function mI(y,b){if(y!==b){var L=y!==w,j=y===null,le=y===y,Me=gl(y),Ke=b!==w,rt=b===null,yt=b===b,ln=gl(b);if(!rt&&!ln&&!Me&&y>b||Me&&Ke&&yt&&!rt&&!ln||j&&Ke&&yt||!L&&yt||!le)return 1;if(!j&&!Me&&!ln&&y<b||ln&&L&&le&&!j&&!Me||rt&&L&&le||!Ke&&le||!yt)return-1}return 0}function gre(y,b,L){for(var j=-1,le=y.criteria,Me=b.criteria,Ke=le.length,rt=L.length;++j<Ke;){var yt=mI(le[j],Me[j]);if(yt){if(j>=rt)return yt;var ln=L[j];return yt*(ln=="desc"?-1:1)}}return y.index-b.index}function gI(y,b,L,j){for(var le=-1,Me=y.length,Ke=L.length,rt=-1,yt=b.length,ln=fo(Me-Ke,0),un=Ut(yt+ln),mn=!j;++rt<yt;)un[rt]=b[rt];for(;++le<Ke;)(mn||le<Me)&&(un[L[le]]=y[le]);for(;ln--;)un[rt++]=y[le++];return un}function yI(y,b,L,j){for(var le=-1,Me=y.length,Ke=-1,rt=L.length,yt=-1,ln=b.length,un=fo(Me-rt,0),mn=Ut(un+ln),Gn=!j;++le<un;)mn[le]=y[le];for(var ri=le;++yt<ln;)mn[ri+yt]=b[yt];for(;++Ke<rt;)(Gn||le<Me)&&(mn[ri+L[Ke]]=y[le++]);return mn}function Ns(y,b){var L=-1,j=y.length;for(b||(b=Ut(j));++L<j;)b[L]=y[L];return b}function hu(y,b,L,j){var le=!L;L||(L={});for(var Me=-1,Ke=b.length;++Me<Ke;){var rt=b[Me],yt=j?j(L[rt],y[rt],rt,L,y):w;yt===w&&(yt=y[rt]),le?cc(L,rt,yt):pm(L,rt,yt)}return L}function yre(y,b){return hu(y,yS(y),b)}function _re(y,b){return hu(y,LI(y),b)}function gy(y,b){return function(L,j){var le=Oi(L)?Tne:Uie,Me=b?b():{};return le(L,y,bi(j,2),Me)}}function S1(y){return Zi(function(b,L){var j=-1,le=L.length,Me=le>1?L[le-1]:w,Ke=le>2?L[2]:w;for(Me=y.length>3&&typeof Me=="function"?(le--,Me):w,Ke&&_s(L[0],L[1],Ke)&&(Me=le<3?w:Me,le=1),b=ta(b);++j<le;){var rt=L[j];rt&&y(b,rt,j,Me)}return b})}function _I(y,b){return function(L,j){if(L==null)return L;if(!ks(L))return y(L,j);for(var le=L.length,Me=b?le:-1,Ke=ta(L);(b?Me--:++Me<le)&&j(Ke[Me],Me,Ke)!==!1;);return L}}function SI(y){return function(b,L,j){for(var le=-1,Me=ta(b),Ke=j(b),rt=Ke.length;rt--;){var yt=Ke[y?rt:++le];if(L(Me[yt],yt,Me)===!1)break}return b}}function Sre(y,b,L){var j=b&ge,le=_m(y);function Me(){var Ke=this&&this!==Do&&this instanceof Me?le:y;return Ke.apply(j?L:this,arguments)}return Me}function bI(y){return function(b){b=Pr(b);var L=f1(b)?N0(b):w,j=L?L[0]:b.charAt(0),le=L?Sd(L,1).join(""):b.slice(1);return j[y]()+le}}function b1(y){return function(b){return F7(_D(yD(b).replace(cne,"")),y,"")}}function _m(y){return function(){var b=arguments;switch(b.length){case 0:return new y;case 1:return new y(b[0]);case 2:return new y(b[0],b[1]);case 3:return new y(b[0],b[1],b[2]);case 4:return new y(b[0],b[1],b[2],b[3]);case 5:return new y(b[0],b[1],b[2],b[3],b[4]);case 6:return new y(b[0],b[1],b[2],b[3],b[4],b[5]);case 7:return new y(b[0],b[1],b[2],b[3],b[4],b[5],b[6])}var L=_1(y.prototype),j=y.apply(L,b);return Ta(j)?j:L}}function bre(y,b,L){var j=_m(y);function le(){for(var Me=arguments.length,Ke=Ut(Me),rt=Me,yt=x1(le);rt--;)Ke[rt]=arguments[rt];var ln=Me<3&&Ke[0]!==yt&&Ke[Me-1]!==yt?[]:vd(Ke,yt);if(Me-=ln.length,Me<L)return CI(y,b,yy,le.placeholder,w,Ke,ln,w,w,L-Me);var un=this&&this!==Do&&this instanceof le?j:y;return pl(un,this,Ke)}return le}function xI(y){return function(b,L,j){var le=ta(b);if(!ks(b)){var Me=bi(L,3);b=Ao(b),L=function(rt){return Me(le[rt],rt,le)}}var Ke=y(b,L,j);return Ke>-1?le[Me?b[Ke]:Ke]:w}}function wI(y){return hc(function(b){var L=b.length,j=L,le=Wl.prototype.thru;for(y&&b.reverse();j--;){var Me=b[j];if(typeof Me!="function")throw new Hl(z);if(le&&!Ke&&xy(Me)=="wrapper")var Ke=new Wl([],!0)}for(j=Ke?j:L;++j<L;){Me=b[j];var rt=xy(Me),yt=rt=="wrapper"?mS(Me):w;yt&&SS(yt[0])&&yt[1]==(Ge|B|oe|nt)&&!yt[4].length&&yt[9]==1?Ke=Ke[xy(yt[0])].apply(Ke,yt[3]):Ke=Me.length==1&&SS(Me)?Ke[rt]():Ke.thru(Me)}return function(){var ln=arguments,un=ln[0];if(Ke&&ln.length==1&&Oi(un))return Ke.plant(un).value();for(var mn=0,Gn=L?b[mn].apply(this,ln):un;++mn<L;)Gn=b[mn].call(this,Gn);return Gn}})}function yy(y,b,L,j,le,Me,Ke,rt,yt,ln){var un=b&Ge,mn=b&ge,Gn=b&Ze,ri=b&(B|te),Ti=b&at,Wi=Gn?w:_m(y);function Ai(){for(var or=arguments.length,hr=Ut(or),yl=or;yl--;)hr[yl]=arguments[yl];if(ri)var Ss=x1(Ai),_l=Dne(hr,Ss);if(j&&(hr=gI(hr,j,le,ri)),Me&&(hr=yI(hr,Me,Ke,ri)),or-=_l,ri&&or<ln){var Ga=vd(hr,Ss);return CI(y,b,yy,Ai.placeholder,L,hr,Ga,rt,yt,ln-or)}var O0=mn?L:this,mc=Gn?O0[y]:y;return or=hr.length,rt?hr=Ure(hr,rt):Ti&&or>1&&hr.reverse(),un&&yt<or&&(hr.length=yt),this&&this!==Do&&this instanceof Ai&&(mc=Wi||_m(mc)),mc.apply(O0,hr)}return Ai}function TI(y,b){return function(L,j){return Yie(L,y,b(j),{})}}function _y(y,b){return function(L,j){var le;if(L===w&&j===w)return b;if(L!==w&&(le=L),j!==w){if(le===w)return j;typeof L=="string"||typeof j=="string"?(L=ml(L),j=ml(j)):(L=uI(L),j=uI(j)),le=y(L,j)}return le}}function hS(y){return hc(function(b){return b=Sa(b,vl(bi())),Zi(function(L){var j=this;return y(b,function(le){return pl(le,j,L)})})})}function Sy(y,b){b=b===w?" ":ml(b);var L=b.length;if(L<2)return L?aS(b,y):b;var j=aS(b,oy(y/p1(b)));return f1(b)?Sd(N0(j),0,y).join(""):j.slice(0,y)}function xre(y,b,L,j){var le=b&ge,Me=_m(y);function Ke(){for(var rt=-1,yt=arguments.length,ln=-1,un=j.length,mn=Ut(un+yt),Gn=this&&this!==Do&&this instanceof Ke?Me:y;++ln<un;)mn[ln]=j[ln];for(;yt--;)mn[ln++]=arguments[++rt];return pl(Gn,le?L:this,mn)}return Ke}function AI(y){return function(b,L,j){return j&&typeof j!="number"&&_s(b,L,j)&&(L=j=w),b=vc(b),L===w?(L=b,b=0):L=vc(L),j=j===w?b<L?1:-1:vc(j),sre(b,L,j,y)}}function by(y){return function(b,L){return typeof b=="string"&&typeof L=="string"||(b=Xl(b),L=Xl(L)),y(b,L)}}function CI(y,b,L,j,le,Me,Ke,rt,yt,ln){var un=b&B,mn=un?Ke:w,Gn=un?w:Ke,ri=un?Me:w,Ti=un?w:Me;b|=un?oe:Ie,b&=~(un?Ie:oe),b&fe||(b&=~(ge|Ze));var Wi=[y,b,le,ri,mn,Ti,Gn,rt,yt,ln],Ai=L.apply(w,Wi);return SS(y)&&BI(Ai,Wi),Ai.placeholder=j,zI(Ai,y,b)}function fS(y){var b=ho[y];return function(L,j){if(L=Xl(L),j=j==null?0:Ko(Vi(j),292),j&&zL(L)){var le=(Pr(L)+"e").split("e"),Me=b(le[0]+"e"+(+le[1]+j));return le=(Pr(Me)+"e").split("e"),+(le[0]+"e"+(+le[1]-j))}return b(L)}}var wre=g1&&1/K3(new g1([,-0]))[1]==ii?function(y){return new g1(y)}:kS;function MI(y){return function(b){var L=Zo(b);return L==ir?H7(b):L==wi?Gne(b):Ine(b,y(b))}}function dc(y,b,L,j,le,Me,Ke,rt){var yt=b&Ze;if(!yt&&typeof y!="function")throw new Hl(z);var ln=j?j.length:0;if(ln||(b&=~(oe|Ie),j=le=w),Ke=Ke===w?Ke:fo(Vi(Ke),0),rt=rt===w?rt:Vi(rt),ln-=le?le.length:0,b&Ie){var un=j,mn=le;j=le=w}var Gn=yt?w:mS(y),ri=[y,b,L,j,le,un,mn,Me,Ke,rt];if(Gn&&Bre(ri,Gn),y=ri[0],b=ri[1],L=ri[2],j=ri[3],le=ri[4],rt=ri[9]=ri[9]===w?yt?0:y.length:fo(ri[9]-ln,0),!rt&&b&(B|te)&&(b&=~(B|te)),!b||b==ge)var Ti=Sre(y,b,L);else b==B||b==te?Ti=bre(y,b,rt):(b==oe||b==(ge|oe))&&!le.length?Ti=xre(y,b,L,j):Ti=yy.apply(w,ri);var Wi=Gn?sI:BI;return zI(Wi(Ti,ri),y,b)}function EI(y,b,L,j){return y===w||F0(y,m1[L])&&!Ur.call(j,L)?b:y}function PI(y,b,L,j,le,Me){return Ta(y)&&Ta(b)&&(Me.set(b,y),py(y,b,w,PI,Me),Me.delete(b)),y}function Tre(y){return xm(y)?w:y}function RI(y,b,L,j,le,Me){var Ke=L&be,rt=y.length,yt=b.length;if(rt!=yt&&!(Ke&&yt>rt))return!1;var ln=Me.get(y),un=Me.get(b);if(ln&&un)return ln==b&&un==y;var mn=-1,Gn=!0,ri=L&me?new ef:w;for(Me.set(y,b),Me.set(b,y);++mn<rt;){var Ti=y[mn],Wi=b[mn];if(j)var Ai=Ke?j(Wi,Ti,mn,b,y,Me):j(Ti,Wi,mn,y,b,Me);if(Ai!==w){if(Ai)continue;Gn=!1;break}if(ri){if(!O7(b,function(or,hr){if(!lm(ri,hr)&&(Ti===or||le(Ti,or,L,j,Me)))return ri.push(hr)})){Gn=!1;break}}else if(!(Ti===Wi||le(Ti,Wi,L,j,Me))){Gn=!1;break}}return Me.delete(y),Me.delete(b),Gn}function Are(y,b,L,j,le,Me,Ke){switch(L){case ct:if(y.byteLength!=b.byteLength||y.byteOffset!=b.byteOffset)return!1;y=y.buffer,b=b.buffer;case ve:return!(y.byteLength!=b.byteLength||!Me(new ny(y),new ny(b)));case yi:case nr:case wa:return F0(+y,+b);case fs:return y.name==b.name&&y.message==b.message;case jn:case mr:return y==b+"";case ir:var rt=H7;case wi:var yt=j&be;if(rt||(rt=K3),y.size!=b.size&&!yt)return!1;var ln=Ke.get(y);if(ln)return ln==b;j|=me,Ke.set(y,b);var un=RI(rt(y),rt(b),j,le,Me,Ke);return Ke.delete(y),un;case ye:if(fm)return fm.call(y)==fm.call(b)}return!1}function Cre(y,b,L,j,le,Me){var Ke=L&be,rt=pS(y),yt=rt.length,ln=pS(b),un=ln.length;if(yt!=un&&!Ke)return!1;for(var mn=yt;mn--;){var Gn=rt[mn];if(!(Ke?Gn in b:Ur.call(b,Gn)))return!1}var ri=Me.get(y),Ti=Me.get(b);if(ri&&Ti)return ri==b&&Ti==y;var Wi=!0;Me.set(y,b),Me.set(b,y);for(var Ai=Ke;++mn<yt;){Gn=rt[mn];var or=y[Gn],hr=b[Gn];if(j)var yl=Ke?j(hr,or,Gn,b,y,Me):j(or,hr,Gn,y,b,Me);if(!(yl===w?or===hr||le(or,hr,L,j,Me):yl)){Wi=!1;break}Ai||(Ai=Gn=="constructor")}if(Wi&&!Ai){var Ss=y.constructor,_l=b.constructor;Ss!=_l&&"constructor"in y&&"constructor"in b&&!(typeof Ss=="function"&&Ss instanceof Ss&&typeof _l=="function"&&_l instanceof _l)&&(Wi=!1)}return Me.delete(y),Me.delete(b),Wi}function hc(y){return xS(FI(y,w,jI),y+"")}function pS(y){return KL(y,Ao,yS)}function vS(y){return KL(y,Fs,LI)}var mS=ly?function(y){return ly.get(y)}:kS;function xy(y){for(var b=y.name+"",L=y1[b],j=Ur.call(y1,b)?L.length:0;j--;){var le=L[j],Me=le.func;if(Me==null||Me==y)return le.name}return b}function x1(y){var b=Ur.call(Se,"placeholder")?Se:y;return b.placeholder}function bi(){var y=Se.iteratee||DS;return y=y===DS?QL:y,arguments.length?y(arguments[0],arguments[1]):y}function wy(y,b){var L=y.__data__;return Nre(b)?L[typeof b=="string"?"string":"hash"]:L.map}function gS(y){for(var b=Ao(y),L=b.length;L--;){var j=b[L],le=y[j];b[L]=[j,le,NI(le)]}return b}function rf(y,b){var L=One(y,b);return JL(L)?L:w}function Mre(y){var b=Ur.call(y,Jh),L=y[Jh];try{y[Jh]=w;var j=!0}catch(Me){}var le=ey.call(y);return j&&(b?y[Jh]=L:delete y[Jh]),le}var yS=j7?function(y){return y==null?[]:(y=ta(y),fd(j7(y),function(b){return OL.call(y,b)}))}:FS,LI=j7?function(y){for(var b=[];y;)pd(b,yS(y)),y=iy(y);return b}:FS,Zo=ys;($7&&Zo(new $7(new ArrayBuffer(1)))!=ct||cm&&Zo(new cm)!=ir||q7&&Zo(q7.resolve())!=xr||g1&&Zo(new g1)!=wi||dm&&Zo(new dm)!=qe)&&(Zo=function(y){var b=ys(y),L=b==Ui?y.constructor:w,j=L?af(L):"";if(j)switch(j){case uie:return ct;case cie:return ir;case die:return xr;case hie:return wi;case fie:return qe}return b});function Ere(y,b,L){for(var j=-1,le=L.length;++j<le;){var Me=L[j],Ke=Me.size;switch(Me.type){case"drop":y+=Ke;break;case"dropRight":b-=Ke;break;case"take":b=Ko(b,y+Ke);break;case"takeRight":y=fo(y,b-Ke);break}}return{start:y,end:b}}function Pre(y){var b=y.match(sc);return b?b[1].split(qh):[]}function II(y,b,L){b=_d(b,y);for(var j=-1,le=b.length,Me=!1;++j<le;){var Ke=fu(b[j]);if(!(Me=y!=null&&L(y,Ke)))break;y=y[Ke]}return Me||++j!=le?Me:(le=y==null?0:y.length,!!le&&Ry(le)&&fc(Ke,le)&&(Oi(y)||of(y)))}function Rre(y){var b=y.length,L=new y.constructor(b);return b&&typeof y[0]=="string"&&Ur.call(y,"index")&&(L.index=y.index,L.input=y.input),L}function DI(y){return typeof y.constructor=="function"&&!Sm(y)?_1(iy(y)):{}}function Lre(y,b,L){var j=y.constructor;switch(b){case ve:return dS(y);case yi:case nr:return new j(+y);case ct:return pre(y,L);case et:case gt:case Dt:case fn:case Gt:case vn:case gr:case ea:case vi:return vI(y,L);case ir:return new j;case wa:case mr:return new j(y);case jn:return vre(y);case wi:return new j;case ye:return mre(y)}}function Ire(y,b){var L=b.length;if(!L)return y;var j=L-1;return b[j]=(L>1?"& ":"")+b[j],b=b.join(L>2?", ":" "),y.replace(oc,`{
/* [wrapped with `+b+`] */
`)}function Dre(y){return Oi(y)||of(y)||!!(BL&&y&&y[BL])}function fc(y,b){var L=typeof y;return b=b==null?ti:b,!!b&&(L=="number"||L!="symbol"&&Si.test(y))&&y>-1&&y%1==0&&y<b}function _s(y,b,L){if(!Ta(L))return!1;var j=typeof b;return(j=="number"?ks(L)&&fc(b,L.length):j=="string"&&b in L)?F0(L[b],y):!1}function _S(y,b){if(Oi(y))return!1;var L=typeof y;return L=="number"||L=="symbol"||L=="boolean"||y==null||gl(y)?!0:$h.test(y)||!jh.test(y)||b!=null&&y in ta(b)}function Nre(y){var b=typeof y;return b=="string"||b=="number"||b=="symbol"||b=="boolean"?y!=="__proto__":y===null}function SS(y){var b=xy(y),L=Se[b];if(typeof L!="function"||!(b in sr.prototype))return!1;if(y===L)return!0;var j=mS(L);return!!j&&y===j[0]}function kre(y){return!!NL&&NL in y}var Fre=J3?pc:OS;function Sm(y){var b=y&&y.constructor,L=typeof b=="function"&&b.prototype||m1;return y===L}function NI(y){return y===y&&!Ta(y)}function kI(y,b){return function(L){return L==null?!1:L[y]===b&&(b!==w||y in ta(L))}}function Ore(y){var b=Ey(y,function(j){return L.size===pe&&L.clear(),j}),L=b.cache;return b}function Bre(y,b){var L=y[1],j=b[1],le=L|j,Me=le<(ge|Ze|Ge),Ke=j==Ge&&L==B||j==Ge&&L==nt&&y[7].length<=b[8]||j==(Ge|nt)&&b[7].length<=b[8]&&L==B;if(!(Me||Ke))return y;j&ge&&(y[2]=b[2],le|=L&ge?0:fe);var rt=b[3];if(rt){var yt=y[3];y[3]=yt?gI(yt,rt,b[4]):rt,y[4]=yt?vd(y[3],de):b[4]}return rt=b[5],rt&&(yt=y[5],y[5]=yt?yI(yt,rt,b[6]):rt,y[6]=yt?vd(y[5],de):b[6]),rt=b[7],rt&&(y[7]=rt),j&Ge&&(y[8]=y[8]==null?b[8]:Ko(y[8],b[8])),y[9]==null&&(y[9]=b[9]),y[0]=b[0],y[1]=le,y}function zre(y){var b=[];if(y!=null)for(var L in ta(y))b.push(L);return b}function Gre(y){return ey.call(y)}function FI(y,b,L){return b=fo(b===w?y.length-1:b,0),function(){for(var j=arguments,le=-1,Me=fo(j.length-b,0),Ke=Ut(Me);++le<Me;)Ke[le]=j[b+le];le=-1;for(var rt=Ut(b+1);++le<b;)rt[le]=j[le];return rt[b]=L(Ke),pl(y,this,rt)}}function OI(y,b){return b.length<2?y:nf(y,$l(b,0,-1))}function Ure(y,b){for(var L=y.length,j=Ko(b.length,L),le=Ns(y);j--;){var Me=b[j];y[j]=fc(Me,L)?le[Me]:w}return y}function bS(y,b){if(!(b==="constructor"&&typeof y[b]=="function")&&b!="__proto__")return y[b]}var BI=GI(sI),bm=nie||function(y,b){return Do.setTimeout(y,b)},xS=GI(cre);function zI(y,b,L){var j=b+"";return xS(y,Ire(j,Vre(Pre(j),L)))}function GI(y){var b=0,L=0;return function(){var j=oie(),le=kt-(j-L);if(L=j,le>0){if(++b>=qt)return arguments[0]}else b=0;return y.apply(w,arguments)}}function Ty(y,b){var L=-1,j=y.length,le=j-1;for(b=b===w?j:b;++L<b;){var Me=rS(L,le),Ke=y[Me];y[Me]=y[L],y[L]=Ke}return y.length=b,y}var UI=Ore(function(y){var b=[];return y.charCodeAt(0)===46&&b.push(""),y.replace(_a,function(L,j,le,Me){b.push(le?Me.replace(ms,"$1"):j||L)}),b});function fu(y){if(typeof y=="string"||gl(y))return y;var b=y+"";return b=="0"&&1/y==-ii?"-0":b}function af(y){if(y!=null){try{return Q3.call(y)}catch(b){}try{return y+""}catch(b){}}return""}function Vre(y,b){return Vl(Sn,function(L){var j="_."+L[0];b&L[1]&&!X3(y,j)&&y.push(j)}),y.sort()}function VI(y){if(y instanceof sr)return y.clone();var b=new Wl(y.__wrapped__,y.__chain__);return b.__actions__=Ns(y.__actions__),b.__index__=y.__index__,b.__values__=y.__values__,b}function Hre(y,b,L){(L?_s(y,b,L):b===w)?b=1:b=fo(Vi(b),0);var j=y==null?0:y.length;if(!j||b<1)return[];for(var le=0,Me=0,Ke=Ut(oy(j/b));le<j;)Ke[Me++]=$l(y,le,le+=b);return Ke}function Wre(y){for(var b=-1,L=y==null?0:y.length,j=0,le=[];++b<L;){var Me=y[b];Me&&(le[j++]=Me)}return le}function jre(){var y=arguments.length;if(!y)return[];for(var b=Ut(y-1),L=arguments[0],j=y;j--;)b[j-1]=arguments[j];return pd(Oi(L)?Ns(L):[L],No(b,1))}var $re=Zi(function(y,b){return za(y)?vm(y,No(b,1,za,!0)):[]}),qre=Zi(function(y,b){var L=ql(b);return za(L)&&(L=w),za(y)?vm(y,No(b,1,za,!0),bi(L,2)):[]}),Xre=Zi(function(y,b){var L=ql(b);return za(L)&&(L=w),za(y)?vm(y,No(b,1,za,!0),w,L):[]});function Yre(y,b,L){var j=y==null?0:y.length;return j?(b=L||b===w?1:Vi(b),$l(y,b<0?0:b,j)):[]}function Kre(y,b,L){var j=y==null?0:y.length;return j?(b=L||b===w?1:Vi(b),b=j-b,$l(y,0,b<0?0:b)):[]}function Zre(y,b){return y&&y.length?my(y,bi(b,3),!0,!0):[]}function Jre(y,b){return y&&y.length?my(y,bi(b,3),!0):[]}function Qre(y,b,L,j){var le=y==null?0:y.length;return le?(L&&typeof L!="number"&&_s(y,b,L)&&(L=0,j=le),jie(y,b,L,j)):[]}function HI(y,b,L){var j=y==null?0:y.length;if(!j)return-1;var le=L==null?0:Vi(L);return le<0&&(le=fo(j+le,0)),Y3(y,bi(b,3),le)}function WI(y,b,L){var j=y==null?0:y.length;if(!j)return-1;var le=j-1;return L!==w&&(le=Vi(L),le=L<0?fo(j+le,0):Ko(le,j-1)),Y3(y,bi(b,3),le,!0)}function jI(y){var b=y==null?0:y.length;return b?No(y,1):[]}function eae(y){var b=y==null?0:y.length;return b?No(y,ii):[]}function tae(y,b){var L=y==null?0:y.length;return L?(b=b===w?1:Vi(b),No(y,b)):[]}function nae(y){for(var b=-1,L=y==null?0:y.length,j={};++b<L;){var le=y[b];j[le[0]]=le[1]}return j}function $I(y){return y&&y.length?y[0]:w}function iae(y,b,L){var j=y==null?0:y.length;if(!j)return-1;var le=L==null?0:Vi(L);return le<0&&(le=fo(j+le,0)),h1(y,b,le)}function rae(y){var b=y==null?0:y.length;return b?$l(y,0,-1):[]}var aae=Zi(function(y){var b=Sa(y,uS);return b.length&&b[0]===y[0]?Q7(b):[]}),oae=Zi(function(y){var b=ql(y),L=Sa(y,uS);return b===ql(L)?b=w:L.pop(),L.length&&L[0]===y[0]?Q7(L,bi(b,2)):[]}),sae=Zi(function(y){var b=ql(y),L=Sa(y,uS);return b=typeof b=="function"?b:w,b&&L.pop(),L.length&&L[0]===y[0]?Q7(L,w,b):[]});function lae(y,b){return y==null?"":rie.call(y,b)}function ql(y){var b=y==null?0:y.length;return b?y[b-1]:w}function uae(y,b,L){var j=y==null?0:y.length;if(!j)return-1;var le=j;return L!==w&&(le=Vi(L),le=le<0?fo(j+le,0):Ko(le,j-1)),b===b?Vne(y,b,le):Y3(y,CL,le,!0)}function cae(y,b){return y&&y.length?iI(y,Vi(b)):w}var dae=Zi(qI);function qI(y,b){return y&&y.length&&b&&b.length?iS(y,b):y}function hae(y,b,L){return y&&y.length&&b&&b.length?iS(y,b,bi(L,2)):y}function fae(y,b,L){return y&&y.length&&b&&b.length?iS(y,b,w,L):y}var pae=hc(function(y,b){var L=y==null?0:y.length,j=Y7(y,b);return oI(y,Sa(b,function(le){return fc(le,L)?+le:le}).sort(mI)),j});function vae(y,b){var L=[];if(!(y&&y.length))return L;var j=-1,le=[],Me=y.length;for(b=bi(b,3);++j<Me;){var Ke=y[j];b(Ke,j,y)&&(L.push(Ke),le.push(j))}return oI(y,le),L}function wS(y){return y==null?y:lie.call(y)}function mae(y,b,L){var j=y==null?0:y.length;return j?(L&&typeof L!="number"&&_s(y,b,L)?(b=0,L=j):(b=b==null?0:Vi(b),L=L===w?j:Vi(L)),$l(y,b,L)):[]}function gae(y,b){return vy(y,b)}function yae(y,b,L){return oS(y,b,bi(L,2))}function _ae(y,b){var L=y==null?0:y.length;if(L){var j=vy(y,b);if(j<L&&F0(y[j],b))return j}return-1}function Sae(y,b){return vy(y,b,!0)}function bae(y,b,L){return oS(y,b,bi(L,2),!0)}function xae(y,b){var L=y==null?0:y.length;if(L){var j=vy(y,b,!0)-1;if(F0(y[j],b))return j}return-1}function wae(y){return y&&y.length?lI(y):[]}function Tae(y,b){return y&&y.length?lI(y,bi(b,2)):[]}function Aae(y){var b=y==null?0:y.length;return b?$l(y,1,b):[]}function Cae(y,b,L){return y&&y.length?(b=L||b===w?1:Vi(b),$l(y,0,b<0?0:b)):[]}function Mae(y,b,L){var j=y==null?0:y.length;return j?(b=L||b===w?1:Vi(b),b=j-b,$l(y,b<0?0:b,j)):[]}function Eae(y,b){return y&&y.length?my(y,bi(b,3),!1,!0):[]}function Pae(y,b){return y&&y.length?my(y,bi(b,3)):[]}var Rae=Zi(function(y){return yd(No(y,1,za,!0))}),Lae=Zi(function(y){var b=ql(y);return za(b)&&(b=w),yd(No(y,1,za,!0),bi(b,2))}),Iae=Zi(function(y){var b=ql(y);return b=typeof b=="function"?b:w,yd(No(y,1,za,!0),w,b)});function Dae(y){return y&&y.length?yd(y):[]}function Nae(y,b){return y&&y.length?yd(y,bi(b,2)):[]}function kae(y,b){return b=typeof b=="function"?b:w,y&&y.length?yd(y,w,b):[]}function TS(y){if(!(y&&y.length))return[];var b=0;return y=fd(y,function(L){if(za(L))return b=fo(L.length,b),!0}),U7(b,function(L){return Sa(y,B7(L))})}function XI(y,b){if(!(y&&y.length))return[];var L=TS(y);return b==null?L:Sa(L,function(j){return pl(b,w,j)})}var Fae=Zi(function(y,b){return za(y)?vm(y,b):[]}),Oae=Zi(function(y){return lS(fd(y,za))}),Bae=Zi(function(y){var b=ql(y);return za(b)&&(b=w),lS(fd(y,za),bi(b,2))}),zae=Zi(function(y){var b=ql(y);return b=typeof b=="function"?b:w,lS(fd(y,za),w,b)}),Gae=Zi(TS);function Uae(y,b){return hI(y||[],b||[],pm)}function Vae(y,b){return hI(y||[],b||[],ym)}var Hae=Zi(function(y){var b=y.length,L=b>1?y[b-1]:w;return L=typeof L=="function"?(y.pop(),L):w,XI(y,L)});function YI(y){var b=Se(y);return b.__chain__=!0,b}function Wae(y,b){return b(y),y}function Ay(y,b){return b(y)}var jae=hc(function(y){var b=y.length,L=b?y[0]:0,j=this.__wrapped__,le=function(Me){return Y7(Me,y)};return b>1||this.__actions__.length||!(j instanceof sr)||!fc(L)?this.thru(le):(j=j.slice(L,+L+(b?1:0)),j.__actions__.push({func:Ay,args:[le],thisArg:w}),new Wl(j,this.__chain__).thru(function(Me){return b&&!Me.length&&Me.push(w),Me}))});function $ae(){return YI(this)}function qae(){return new Wl(this.value(),this.__chain__)}function Xae(){this.__values__===w&&(this.__values__=uD(this.value()));var y=this.__index__>=this.__values__.length,b=y?w:this.__values__[this.__index__++];return{done:y,value:b}}function Yae(){return this}function Kae(y){for(var b,L=this;L instanceof cy;){var j=VI(L);j.__index__=0,j.__values__=w,b?le.__wrapped__=j:b=j;var le=j;L=L.__wrapped__}return le.__wrapped__=y,b}function Zae(){var y=this.__wrapped__;if(y instanceof sr){var b=y;return this.__actions__.length&&(b=new sr(this)),b=b.reverse(),b.__actions__.push({func:Ay,args:[wS],thisArg:w}),new Wl(b,this.__chain__)}return this.thru(wS)}function Jae(){return dI(this.__wrapped__,this.__actions__)}var Qae=gy(function(y,b,L){Ur.call(y,L)?++y[L]:cc(y,L,1)});function eoe(y,b,L){var j=Oi(y)?TL:Wie;return L&&_s(y,b,L)&&(b=w),j(y,bi(b,3))}function toe(y,b){var L=Oi(y)?fd:XL;return L(y,bi(b,3))}var noe=xI(HI),ioe=xI(WI);function roe(y,b){return No(Cy(y,b),1)}function aoe(y,b){return No(Cy(y,b),ii)}function ooe(y,b,L){return L=L===w?1:Vi(L),No(Cy(y,b),L)}function KI(y,b){var L=Oi(y)?Vl:gd;return L(y,bi(b,3))}function ZI(y,b){var L=Oi(y)?Ane:qL;return L(y,bi(b,3))}var soe=gy(function(y,b,L){Ur.call(y,L)?y[L].push(b):cc(y,L,[b])});function loe(y,b,L,j){y=ks(y)?y:T1(y),L=L&&!j?Vi(L):0;var le=y.length;return L<0&&(L=fo(le+L,0)),Ly(y)?L<=le&&y.indexOf(b,L)>-1:!!le&&h1(y,b,L)>-1}var uoe=Zi(function(y,b,L){var j=-1,le=typeof b=="function",Me=ks(y)?Ut(y.length):[];return gd(y,function(Ke){Me[++j]=le?pl(b,Ke,L):mm(Ke,b,L)}),Me}),coe=gy(function(y,b,L){cc(y,L,b)});function Cy(y,b){var L=Oi(y)?Sa:eI;return L(y,bi(b,3))}function doe(y,b,L,j){return y==null?[]:(Oi(b)||(b=b==null?[]:[b]),L=j?w:L,Oi(L)||(L=L==null?[]:[L]),rI(y,b,L))}var hoe=gy(function(y,b,L){y[L?0:1].push(b)},function(){return[[],[]]});function foe(y,b,L){var j=Oi(y)?F7:EL,le=arguments.length<3;return j(y,bi(b,4),L,le,gd)}function poe(y,b,L){var j=Oi(y)?Cne:EL,le=arguments.length<3;return j(y,bi(b,4),L,le,qL)}function voe(y,b){var L=Oi(y)?fd:XL;return L(y,Py(bi(b,3)))}function moe(y){var b=Oi(y)?HL:lre;return b(y)}function goe(y,b,L){(L?_s(y,b,L):b===w)?b=1:b=Vi(b);var j=Oi(y)?zie:ure;return j(y,b)}function yoe(y){var b=Oi(y)?Gie:dre;return b(y)}function _oe(y){if(y==null)return 0;if(ks(y))return Ly(y)?p1(y):y.length;var b=Zo(y);return b==ir||b==wi?y.size:tS(y).length}function Soe(y,b,L){var j=Oi(y)?O7:hre;return L&&_s(y,b,L)&&(b=w),j(y,bi(b,3))}var boe=Zi(function(y,b){if(y==null)return[];var L=b.length;return L>1&&_s(y,b[0],b[1])?b=[]:L>2&&_s(b[0],b[1],b[2])&&(b=[b[0]]),rI(y,No(b,1),[])}),My=tie||function(){return Do.Date.now()};function xoe(y,b){if(typeof b!="function")throw new Hl(z);return y=Vi(y),function(){if(--y<1)return b.apply(this,arguments)}}function JI(y,b,L){return b=L?w:b,b=y&&b==null?y.length:b,dc(y,Ge,w,w,w,w,b)}function QI(y,b){var L;if(typeof b!="function")throw new Hl(z);return y=Vi(y),function(){return--y>0&&(L=b.apply(this,arguments)),y<=1&&(b=w),L}}var AS=Zi(function(y,b,L){var j=ge;if(L.length){var le=vd(L,x1(AS));j|=oe}return dc(y,j,b,L,le)}),eD=Zi(function(y,b,L){var j=ge|Ze;if(L.length){var le=vd(L,x1(eD));j|=oe}return dc(b,j,y,L,le)});function tD(y,b,L){b=L?w:b;var j=dc(y,B,w,w,w,w,w,b);return j.placeholder=tD.placeholder,j}function nD(y,b,L){b=L?w:b;var j=dc(y,te,w,w,w,w,w,b);return j.placeholder=nD.placeholder,j}function iD(y,b,L){var j,le,Me,Ke,rt,yt,ln=0,un=!1,mn=!1,Gn=!0;if(typeof y!="function")throw new Hl(z);b=Xl(b)||0,Ta(L)&&(un=!!L.leading,mn="maxWait"in L,Me=mn?fo(Xl(L.maxWait)||0,b):Me,Gn="trailing"in L?!!L.trailing:Gn);function ri(Ga){var O0=j,mc=le;return j=le=w,ln=Ga,Ke=y.apply(mc,O0),Ke}function Ti(Ga){return ln=Ga,rt=bm(or,b),un?ri(Ga):Ke}function Wi(Ga){var O0=Ga-yt,mc=Ga-ln,xD=b-O0;return mn?Ko(xD,Me-mc):xD}function Ai(Ga){var O0=Ga-yt,mc=Ga-ln;return yt===w||O0>=b||O0<0||mn&&mc>=Me}function or(){var Ga=My();if(Ai(Ga))return hr(Ga);rt=bm(or,Wi(Ga))}function hr(Ga){return rt=w,Gn&&j?ri(Ga):(j=le=w,Ke)}function yl(){rt!==w&&fI(rt),ln=0,j=yt=le=rt=w}function Ss(){return rt===w?Ke:hr(My())}function _l(){var Ga=My(),O0=Ai(Ga);if(j=arguments,le=this,yt=Ga,O0){if(rt===w)return Ti(yt);if(mn)return fI(rt),rt=bm(or,b),ri(yt)}return rt===w&&(rt=bm(or,b)),Ke}return _l.cancel=yl,_l.flush=Ss,_l}var woe=Zi(function(y,b){return $L(y,1,b)}),Toe=Zi(function(y,b,L){return $L(y,Xl(b)||0,L)});function Aoe(y){return dc(y,at)}function Ey(y,b){if(typeof y!="function"||b!=null&&typeof b!="function")throw new Hl(z);var L=function(){var j=arguments,le=b?b.apply(this,j):j[0],Me=L.cache;if(Me.has(le))return Me.get(le);var Ke=y.apply(this,j);return L.cache=Me.set(le,Ke)||Me,Ke};return L.cache=new(Ey.Cache||uc),L}Ey.Cache=uc;function Py(y){if(typeof y!="function")throw new Hl(z);return function(){var b=arguments;switch(b.length){case 0:return!y.call(this);case 1:return!y.call(this,b[0]);case 2:return!y.call(this,b[0],b[1]);case 3:return!y.call(this,b[0],b[1],b[2])}return!y.apply(this,b)}}function Coe(y){return QI(2,y)}var Moe=fre(function(y,b){b=b.length==1&&Oi(b[0])?Sa(b[0],vl(bi())):Sa(No(b,1),vl(bi()));var L=b.length;return Zi(function(j){for(var le=-1,Me=Ko(j.length,L);++le<Me;)j[le]=b[le].call(this,j[le]);return pl(y,this,j)})}),CS=Zi(function(y,b){var L=vd(b,x1(CS));return dc(y,oe,w,b,L)}),rD=Zi(function(y,b){var L=vd(b,x1(rD));return dc(y,Ie,w,b,L)}),Eoe=hc(function(y,b){return dc(y,nt,w,w,w,b)});function Poe(y,b){if(typeof y!="function")throw new Hl(z);return b=b===w?b:Vi(b),Zi(y,b)}function Roe(y,b){if(typeof y!="function")throw new Hl(z);return b=b==null?0:fo(Vi(b),0),Zi(function(L){var j=L[b],le=Sd(L,0,b);return j&&pd(le,j),pl(y,this,le)})}function Loe(y,b,L){var j=!0,le=!0;if(typeof y!="function")throw new Hl(z);return Ta(L)&&(j="leading"in L?!!L.leading:j,le="trailing"in L?!!L.trailing:le),iD(y,b,{leading:j,maxWait:b,trailing:le})}function Ioe(y){return JI(y,1)}function Doe(y,b){return CS(cS(b),y)}function Noe(){if(!arguments.length)return[];var y=arguments[0];return Oi(y)?y:[y]}function koe(y){return jl(y,Oe)}function Foe(y,b){return b=typeof b=="function"?b:w,jl(y,Oe,b)}function Ooe(y){return jl(y,se|Oe)}function Boe(y,b){return b=typeof b=="function"?b:w,jl(y,se|Oe,b)}function zoe(y,b){return b==null||jL(y,b,Ao(b))}function F0(y,b){return y===b||y!==y&&b!==b}var Goe=by(J7),Uoe=by(function(y,b){return y>=b}),of=ZL(function(){return arguments}())?ZL:function(y){return Ia(y)&&Ur.call(y,"callee")&&!OL.call(y,"callee")},Oi=Ut.isArray,Voe=yL?vl(yL):Kie;function ks(y){return y!=null&&Ry(y.length)&&!pc(y)}function za(y){return Ia(y)&&ks(y)}function Hoe(y){return y===!0||y===!1||Ia(y)&&ys(y)==yi}var bd=iie||OS,Woe=_L?vl(_L):Zie;function joe(y){return Ia(y)&&y.nodeType===1&&!xm(y)}function $oe(y){if(y==null)return!0;if(ks(y)&&(Oi(y)||typeof y=="string"||typeof y.splice=="function"||bd(y)||w1(y)||of(y)))return!y.length;var b=Zo(y);if(b==ir||b==wi)return!y.size;if(Sm(y))return!tS(y).length;for(var L in y)if(Ur.call(y,L))return!1;return!0}function qoe(y,b){return gm(y,b)}function Xoe(y,b,L){L=typeof L=="function"?L:w;var j=L?L(y,b):w;return j===w?gm(y,b,w,L):!!j}function MS(y){if(!Ia(y))return!1;var b=ys(y);return b==fs||b==zl||typeof y.message=="string"&&typeof y.name=="string"&&!xm(y)}function Yoe(y){return typeof y=="number"&&zL(y)}function pc(y){if(!Ta(y))return!1;var b=ys(y);return b==zr||b==Xo||b==hi||b==_i}function aD(y){return typeof y=="number"&&y==Vi(y)}function Ry(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=ti}function Ta(y){var b=typeof y;return y!=null&&(b=="object"||b=="function")}function Ia(y){return y!=null&&typeof y=="object"}var oD=SL?vl(SL):Qie;function Koe(y,b){return y===b||eS(y,b,gS(b))}function Zoe(y,b,L){return L=typeof L=="function"?L:w,eS(y,b,gS(b),L)}function Joe(y){return sD(y)&&y!=+y}function Qoe(y){if(Fre(y))throw new Di(N);return JL(y)}function ese(y){return y===null}function tse(y){return y==null}function sD(y){return typeof y=="number"||Ia(y)&&ys(y)==wa}function xm(y){if(!Ia(y)||ys(y)!=Ui)return!1;var b=iy(y);if(b===null)return!0;var L=Ur.call(b,"constructor")&&b.constructor;return typeof L=="function"&&L instanceof L&&Q3.call(L)==Zne}var ES=bL?vl(bL):ere;function nse(y){return aD(y)&&y>=-ti&&y<=ti}var lD=xL?vl(xL):tre;function Ly(y){return typeof y=="string"||!Oi(y)&&Ia(y)&&ys(y)==mr}function gl(y){return typeof y=="symbol"||Ia(y)&&ys(y)==ye}var w1=wL?vl(wL):nre;function ise(y){return y===w}function rse(y){return Ia(y)&&Zo(y)==qe}function ase(y){return Ia(y)&&ys(y)==tt}var ose=by(nS),sse=by(function(y,b){return y<=b});function uD(y){if(!y)return[];if(ks(y))return Ly(y)?N0(y):Ns(y);if(um&&y[um])return zne(y[um]());var b=Zo(y),L=b==ir?H7:b==wi?K3:T1;return L(y)}function vc(y){if(!y)return y===0?y:0;if(y=Xl(y),y===ii||y===-ii){var b=y<0?-1:1;return b*di}return y===y?y:0}function Vi(y){var b=vc(y),L=b%1;return b===b?L?b-L:b:0}function cD(y){return y?tf(Vi(y),0,Ve):0}function Xl(y){if(typeof y=="number")return y;if(gl(y))return tr;if(Ta(y)){var b=typeof y.valueOf=="function"?y.valueOf():y;y=Ta(b)?b+"":b}if(typeof y!="string")return y===0?y:+y;y=PL(y);var L=E7.test(y);return L||P7.test(y)?xne(y.slice(2),L?2:8):M7.test(y)?tr:+y}function dD(y){return hu(y,Fs(y))}function lse(y){return y?tf(Vi(y),-ti,ti):y===0?y:0}function Pr(y){return y==null?"":ml(y)}var use=S1(function(y,b){if(Sm(b)||ks(b)){hu(b,Ao(b),y);return}for(var L in b)Ur.call(b,L)&&pm(y,L,b[L])}),hD=S1(function(y,b){hu(b,Fs(b),y)}),Iy=S1(function(y,b,L,j){hu(b,Fs(b),y,j)}),cse=S1(function(y,b,L,j){hu(b,Ao(b),y,j)}),dse=hc(Y7);function hse(y,b){var L=_1(y);return b==null?L:WL(L,b)}var fse=Zi(function(y,b){y=ta(y);var L=-1,j=b.length,le=j>2?b[2]:w;for(le&&_s(b[0],b[1],le)&&(j=1);++L<j;)for(var Me=b[L],Ke=Fs(Me),rt=-1,yt=Ke.length;++rt<yt;){var ln=Ke[rt],un=y[ln];(un===w||F0(un,m1[ln])&&!Ur.call(y,ln))&&(y[ln]=Me[ln])}return y}),pse=Zi(function(y){return y.push(w,PI),pl(fD,w,y)});function vse(y,b){return AL(y,bi(b,3),du)}function mse(y,b){return AL(y,bi(b,3),Z7)}function gse(y,b){return y==null?y:K7(y,bi(b,3),Fs)}function yse(y,b){return y==null?y:YL(y,bi(b,3),Fs)}function _se(y,b){return y&&du(y,bi(b,3))}function Sse(y,b){return y&&Z7(y,bi(b,3))}function bse(y){return y==null?[]:fy(y,Ao(y))}function xse(y){return y==null?[]:fy(y,Fs(y))}function PS(y,b,L){var j=y==null?w:nf(y,b);return j===w?L:j}function wse(y,b){return y!=null&&II(y,b,$ie)}function RS(y,b){return y!=null&&II(y,b,qie)}var Tse=TI(function(y,b,L){b!=null&&typeof b.toString!="function"&&(b=ey.call(b)),y[b]=L},IS(Os)),Ase=TI(function(y,b,L){b!=null&&typeof b.toString!="function"&&(b=ey.call(b)),Ur.call(y,b)?y[b].push(L):y[b]=[L]},bi),Cse=Zi(mm);function Ao(y){return ks(y)?VL(y):tS(y)}function Fs(y){return ks(y)?VL(y,!0):ire(y)}function Mse(y,b){var L={};return b=bi(b,3),du(y,function(j,le,Me){cc(L,b(j,le,Me),j)}),L}function Ese(y,b){var L={};return b=bi(b,3),du(y,function(j,le,Me){cc(L,le,b(j,le,Me))}),L}var Pse=S1(function(y,b,L){py(y,b,L)}),fD=S1(function(y,b,L,j){py(y,b,L,j)}),Rse=hc(function(y,b){var L={};if(y==null)return L;var j=!1;b=Sa(b,function(Me){return Me=_d(Me,y),j||(j=Me.length>1),Me}),hu(y,vS(y),L),j&&(L=jl(L,se|re|Oe,Tre));for(var le=b.length;le--;)sS(L,b[le]);return L});function Lse(y,b){return pD(y,Py(bi(b)))}var Ise=hc(function(y,b){return y==null?{}:are(y,b)});function pD(y,b){if(y==null)return{};var L=Sa(vS(y),function(j){return[j]});return b=bi(b),aI(y,L,function(j,le){return b(j,le[0])})}function Dse(y,b,L){b=_d(b,y);var j=-1,le=b.length;for(le||(le=1,y=w);++j<le;){var Me=y==null?w:y[fu(b[j])];Me===w&&(j=le,Me=L),y=pc(Me)?Me.call(y):Me}return y}function Nse(y,b,L){return y==null?y:ym(y,b,L)}function kse(y,b,L,j){return j=typeof j=="function"?j:w,y==null?y:ym(y,b,L,j)}var vD=MI(Ao),mD=MI(Fs);function Fse(y,b,L){var j=Oi(y),le=j||bd(y)||w1(y);if(b=bi(b,4),L==null){var Me=y&&y.constructor;le?L=j?new Me:[]:Ta(y)?L=pc(Me)?_1(iy(y)):{}:L={}}return(le?Vl:du)(y,function(Ke,rt,yt){return b(L,Ke,rt,yt)}),L}function Ose(y,b){return y==null?!0:sS(y,b)}function Bse(y,b,L){return y==null?y:cI(y,b,cS(L))}function zse(y,b,L,j){return j=typeof j=="function"?j:w,y==null?y:cI(y,b,cS(L),j)}function T1(y){return y==null?[]:V7(y,Ao(y))}function Gse(y){return y==null?[]:V7(y,Fs(y))}function Use(y,b,L){return L===w&&(L=b,b=w),L!==w&&(L=Xl(L),L=L===L?L:0),b!==w&&(b=Xl(b),b=b===b?b:0),tf(Xl(y),b,L)}function Vse(y,b,L){return b=vc(b),L===w?(L=b,b=0):L=vc(L),y=Xl(y),Xie(y,b,L)}function Hse(y,b,L){if(L&&typeof L!="boolean"&&_s(y,b,L)&&(b=L=w),L===w&&(typeof b=="boolean"?(L=b,b=w):typeof y=="boolean"&&(L=y,y=w)),y===w&&b===w?(y=0,b=1):(y=vc(y),b===w?(b=y,y=0):b=vc(b)),y>b){var j=y;y=b,b=j}if(L||y%1||b%1){var le=GL();return Ko(y+le*(b-y+bne("1e-"+((le+"").length-1))),b)}return rS(y,b)}var Wse=b1(function(y,b,L){return b=b.toLowerCase(),y+(L?gD(b):b)});function gD(y){return LS(Pr(y).toLowerCase())}function yD(y){return y=Pr(y),y&&y.replace(ua,Nne).replace(dne,"")}function jse(y,b,L){y=Pr(y),b=ml(b);var j=y.length;L=L===w?j:tf(Vi(L),0,j);var le=L;return L-=b.length,L>=0&&y.slice(L,le)==b}function $se(y){return y=Pr(y),y&&Gr.test(y)?y.replace(vs,kne):y}function qse(y){return y=Pr(y),y&&Yo.test(y)?y.replace(Zr,"\\$&"):y}var Xse=b1(function(y,b,L){return y+(L?"-":"")+b.toLowerCase()}),Yse=b1(function(y,b,L){return y+(L?" ":"")+b.toLowerCase()}),Kse=bI("toLowerCase");function Zse(y,b,L){y=Pr(y),b=Vi(b);var j=b?p1(y):0;if(!b||j>=b)return y;var le=(b-j)/2;return Sy(sy(le),L)+y+Sy(oy(le),L)}function Jse(y,b,L){y=Pr(y),b=Vi(b);var j=b?p1(y):0;return b&&j<b?y+Sy(b-j,L):y}function Qse(y,b,L){y=Pr(y),b=Vi(b);var j=b?p1(y):0;return b&&j<b?Sy(b-j,L)+y:y}function ele(y,b,L){return L||b==null?b=0:b&&(b=+b),sie(Pr(y).replace(Ds,""),b||0)}function tle(y,b,L){return(L?_s(y,b,L):b===w)?b=1:b=Vi(b),aS(Pr(y),b)}function nle(){var y=arguments,b=Pr(y[0]);return y.length<3?b:b.replace(y[1],y[2])}var ile=b1(function(y,b,L){return y+(L?"_":"")+b.toLowerCase()});function rle(y,b,L){return L&&typeof L!="number"&&_s(y,b,L)&&(b=L=w),L=L===w?Ve:L>>>0,L?(y=Pr(y),y&&(typeof b=="string"||b!=null&&!ES(b))&&(b=ml(b),!b&&f1(y))?Sd(N0(y),0,L):y.split(b,L)):[]}var ale=b1(function(y,b,L){return y+(L?" ":"")+LS(b)});function ole(y,b,L){return y=Pr(y),L=L==null?0:tf(Vi(L),0,y.length),b=ml(b),y.slice(L,L+b.length)==b}function sle(y,b,L){var j=Se.templateSettings;L&&_s(y,b,L)&&(b=w),y=Pr(y),b=Iy({},b,j,EI);var le=Iy({},b.imports,j.imports,EI),Me=Ao(le),Ke=V7(le,Me),rt,yt,ln=0,un=b.interpolate||Xh,mn="__p += '",Gn=W7((b.escape||Xh).source+"|"+un.source+"|"+(un===uu?C7:Xh).source+"|"+(b.evaluate||Xh).source+"|$","g"),ri="//# sourceURL="+(Ur.call(b,"sourceURL")?(b.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++mne+"]")+`
`;y.replace(Gn,function(Ai,or,hr,yl,Ss,_l){return hr||(hr=yl),mn+=y.slice(ln,_l).replace(Yh,Fne),or&&(rt=!0,mn+=`' +
__e(`+or+`) +
'`),Ss&&(yt=!0,mn+=`';
`+Ss+`;
__p += '`),hr&&(mn+=`' +
((__t = (`+hr+`)) == null ? '' : __t) +
'`),ln=_l+Ai.length,Ai}),mn+=`';
`;var Ti=Ur.call(b,"variable")&&b.variable;if(!Ti)mn=`with (obj) {
`+mn+`
}
`;else if(sd.test(Ti))throw new Di(U);mn=(yt?mn.replace(Kr,""):mn).replace(Ii,"$1").replace(yr,"$1;"),mn="function("+(Ti||"obj")+`) {
`+(Ti?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(rt?", __e = _.escape":"")+(yt?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+mn+`return __p
}`;var Wi=SD(function(){return Cr(Me,ri+"return "+mn).apply(w,Ke)});if(Wi.source=mn,MS(Wi))throw Wi;return Wi}function lle(y){return Pr(y).toLowerCase()}function ule(y){return Pr(y).toUpperCase()}function cle(y,b,L){if(y=Pr(y),y&&(L||b===w))return PL(y);if(!y||!(b=ml(b)))return y;var j=N0(y),le=N0(b),Me=RL(j,le),Ke=LL(j,le)+1;return Sd(j,Me,Ke).join("")}function dle(y,b,L){if(y=Pr(y),y&&(L||b===w))return y.slice(0,DL(y)+1);if(!y||!(b=ml(b)))return y;var j=N0(y),le=LL(j,N0(b))+1;return Sd(j,0,le).join("")}function hle(y,b,L){if(y=Pr(y),y&&(L||b===w))return y.replace(Ds,"");if(!y||!(b=ml(b)))return y;var j=N0(y),le=RL(j,N0(b));return Sd(j,le).join("")}function fle(y,b){var L=St,j=zt;if(Ta(b)){var le="separator"in b?b.separator:le;L="length"in b?Vi(b.length):L,j="omission"in b?ml(b.omission):j}y=Pr(y);var Me=y.length;if(f1(y)){var Ke=N0(y);Me=Ke.length}if(L>=Me)return y;var rt=L-p1(j);if(rt<1)return j;var yt=Ke?Sd(Ke,0,rt).join(""):y.slice(0,rt);if(le===w)return yt+j;if(Ke&&(rt+=yt.length-rt),ES(le)){if(y.slice(rt).search(le)){var ln,un=yt;for(le.global||(le=W7(le.source,Pr(u1.exec(le))+"g")),le.lastIndex=0;ln=le.exec(un);)var mn=ln.index;yt=yt.slice(0,mn===w?rt:mn)}}else if(y.indexOf(ml(le),rt)!=rt){var Gn=yt.lastIndexOf(le);Gn>-1&&(yt=yt.slice(0,Gn))}return yt+j}function ple(y){return y=Pr(y),y&&zi.test(y)?y.replace(ps,Hne):y}var vle=b1(function(y,b,L){return y+(L?" ":"")+b.toUpperCase()}),LS=bI("toUpperCase");function _D(y,b,L){return y=Pr(y),b=L?w:b,b===w?Bne(y)?$ne(y):Pne(y):y.match(b)||[]}var SD=Zi(function(y,b){try{return pl(y,w,b)}catch(L){return MS(L)?L:new Di(L)}}),mle=hc(function(y,b){return Vl(b,function(L){L=fu(L),cc(y,L,AS(y[L],y))}),y});function gle(y){var b=y==null?0:y.length,L=bi();return y=b?Sa(y,function(j){if(typeof j[1]!="function")throw new Hl(z);return[L(j[0]),j[1]]}):[],Zi(function(j){for(var le=-1;++le<b;){var Me=y[le];if(pl(Me[0],this,j))return pl(Me[1],this,j)}})}function yle(y){return Hie(jl(y,se))}function IS(y){return function(){return y}}function _le(y,b){return y==null||y!==y?b:y}var Sle=wI(),ble=wI(!0);function Os(y){return y}function DS(y){return QL(typeof y=="function"?y:jl(y,se))}function xle(y){return tI(jl(y,se))}function wle(y,b){return nI(y,jl(b,se))}var Tle=Zi(function(y,b){return function(L){return mm(L,y,b)}}),Ale=Zi(function(y,b){return function(L){return mm(y,L,b)}});function NS(y,b,L){var j=Ao(b),le=fy(b,j);L==null&&!(Ta(b)&&(le.length||!j.length))&&(L=b,b=y,y=this,le=fy(b,Ao(b)));var Me=!(Ta(L)&&"chain"in L)||!!L.chain,Ke=pc(y);return Vl(le,function(rt){var yt=b[rt];y[rt]=yt,Ke&&(y.prototype[rt]=function(){var ln=this.__chain__;if(Me||ln){var un=y(this.__wrapped__),mn=un.__actions__=Ns(this.__actions__);return mn.push({func:yt,args:arguments,thisArg:y}),un.__chain__=ln,un}return yt.apply(y,pd([this.value()],arguments))})}),y}function Cle(){return Do._===this&&(Do._=Jne),this}function kS(){}function Mle(y){return y=Vi(y),Zi(function(b){return iI(b,y)})}var Ele=hS(Sa),Ple=hS(TL),Rle=hS(O7);function bD(y){return _S(y)?B7(fu(y)):ore(y)}function Lle(y){return function(b){return y==null?w:nf(y,b)}}var Ile=AI(),Dle=AI(!0);function FS(){return[]}function OS(){return!1}function Nle(){return{}}function kle(){return""}function Fle(){return!0}function Ole(y,b){if(y=Vi(y),y<1||y>ti)return[];var L=Ve,j=Ko(y,Ve);b=bi(b),y-=Ve;for(var le=U7(j,b);++L<y;)b(L);return le}function Ble(y){return Oi(y)?Sa(y,fu):gl(y)?[y]:Ns(UI(Pr(y)))}function zle(y){var b=++Kne;return Pr(y)+b}var Gle=_y(function(y,b){return y+b},0),Ule=fS("ceil"),Vle=_y(function(y,b){return y/b},1),Hle=fS("floor");function Wle(y){return y&&y.length?hy(y,Os,J7):w}function jle(y,b){return y&&y.length?hy(y,bi(b,2),J7):w}function $le(y){return ML(y,Os)}function qle(y,b){return ML(y,bi(b,2))}function Xle(y){return y&&y.length?hy(y,Os,nS):w}function Yle(y,b){return y&&y.length?hy(y,bi(b,2),nS):w}var Kle=_y(function(y,b){return y*b},1),Zle=fS("round"),Jle=_y(function(y,b){return y-b},0);function Qle(y){return y&&y.length?G7(y,Os):0}function e0e(y,b){return y&&y.length?G7(y,bi(b,2)):0}return Se.after=xoe,Se.ary=JI,Se.assign=use,Se.assignIn=hD,Se.assignInWith=Iy,Se.assignWith=cse,Se.at=dse,Se.before=QI,Se.bind=AS,Se.bindAll=mle,Se.bindKey=eD,Se.castArray=Noe,Se.chain=YI,Se.chunk=Hre,Se.compact=Wre,Se.concat=jre,Se.cond=gle,Se.conforms=yle,Se.constant=IS,Se.countBy=Qae,Se.create=hse,Se.curry=tD,Se.curryRight=nD,Se.debounce=iD,Se.defaults=fse,Se.defaultsDeep=pse,Se.defer=woe,Se.delay=Toe,Se.difference=$re,Se.differenceBy=qre,Se.differenceWith=Xre,Se.drop=Yre,Se.dropRight=Kre,Se.dropRightWhile=Zre,Se.dropWhile=Jre,Se.fill=Qre,Se.filter=toe,Se.flatMap=roe,Se.flatMapDeep=aoe,Se.flatMapDepth=ooe,Se.flatten=jI,Se.flattenDeep=eae,Se.flattenDepth=tae,Se.flip=Aoe,Se.flow=Sle,Se.flowRight=ble,Se.fromPairs=nae,Se.functions=bse,Se.functionsIn=xse,Se.groupBy=soe,Se.initial=rae,Se.intersection=aae,Se.intersectionBy=oae,Se.intersectionWith=sae,Se.invert=Tse,Se.invertBy=Ase,Se.invokeMap=uoe,Se.iteratee=DS,Se.keyBy=coe,Se.keys=Ao,Se.keysIn=Fs,Se.map=Cy,Se.mapKeys=Mse,Se.mapValues=Ese,Se.matches=xle,Se.matchesProperty=wle,Se.memoize=Ey,Se.merge=Pse,Se.mergeWith=fD,Se.method=Tle,Se.methodOf=Ale,Se.mixin=NS,Se.negate=Py,Se.nthArg=Mle,Se.omit=Rse,Se.omitBy=Lse,Se.once=Coe,Se.orderBy=doe,Se.over=Ele,Se.overArgs=Moe,Se.overEvery=Ple,Se.overSome=Rle,Se.partial=CS,Se.partialRight=rD,Se.partition=hoe,Se.pick=Ise,Se.pickBy=pD,Se.property=bD,Se.propertyOf=Lle,Se.pull=dae,Se.pullAll=qI,Se.pullAllBy=hae,Se.pullAllWith=fae,Se.pullAt=pae,Se.range=Ile,Se.rangeRight=Dle,Se.rearg=Eoe,Se.reject=voe,Se.remove=vae,Se.rest=Poe,Se.reverse=wS,Se.sampleSize=goe,Se.set=Nse,Se.setWith=kse,Se.shuffle=yoe,Se.slice=mae,Se.sortBy=boe,Se.sortedUniq=wae,Se.sortedUniqBy=Tae,Se.split=rle,Se.spread=Roe,Se.tail=Aae,Se.take=Cae,Se.takeRight=Mae,Se.takeRightWhile=Eae,Se.takeWhile=Pae,Se.tap=Wae,Se.throttle=Loe,Se.thru=Ay,Se.toArray=uD,Se.toPairs=vD,Se.toPairsIn=mD,Se.toPath=Ble,Se.toPlainObject=dD,Se.transform=Fse,Se.unary=Ioe,Se.union=Rae,Se.unionBy=Lae,Se.unionWith=Iae,Se.uniq=Dae,Se.uniqBy=Nae,Se.uniqWith=kae,Se.unset=Ose,Se.unzip=TS,Se.unzipWith=XI,Se.update=Bse,Se.updateWith=zse,Se.values=T1,Se.valuesIn=Gse,Se.without=Fae,Se.words=_D,Se.wrap=Doe,Se.xor=Oae,Se.xorBy=Bae,Se.xorWith=zae,Se.zip=Gae,Se.zipObject=Uae,Se.zipObjectDeep=Vae,Se.zipWith=Hae,Se.entries=vD,Se.entriesIn=mD,Se.extend=hD,Se.extendWith=Iy,NS(Se,Se),Se.add=Gle,Se.attempt=SD,Se.camelCase=Wse,Se.capitalize=gD,Se.ceil=Ule,Se.clamp=Use,Se.clone=koe,Se.cloneDeep=Ooe,Se.cloneDeepWith=Boe,Se.cloneWith=Foe,Se.conformsTo=zoe,Se.deburr=yD,Se.defaultTo=_le,Se.divide=Vle,Se.endsWith=jse,Se.eq=F0,Se.escape=$se,Se.escapeRegExp=qse,Se.every=eoe,Se.find=noe,Se.findIndex=HI,Se.findKey=vse,Se.findLast=ioe,Se.findLastIndex=WI,Se.findLastKey=mse,Se.floor=Hle,Se.forEach=KI,Se.forEachRight=ZI,Se.forIn=gse,Se.forInRight=yse,Se.forOwn=_se,Se.forOwnRight=Sse,Se.get=PS,Se.gt=Goe,Se.gte=Uoe,Se.has=wse,Se.hasIn=RS,Se.head=$I,Se.identity=Os,Se.includes=loe,Se.indexOf=iae,Se.inRange=Vse,Se.invoke=Cse,Se.isArguments=of,Se.isArray=Oi,Se.isArrayBuffer=Voe,Se.isArrayLike=ks,Se.isArrayLikeObject=za,Se.isBoolean=Hoe,Se.isBuffer=bd,Se.isDate=Woe,Se.isElement=joe,Se.isEmpty=$oe,Se.isEqual=qoe,Se.isEqualWith=Xoe,Se.isError=MS,Se.isFinite=Yoe,Se.isFunction=pc,Se.isInteger=aD,Se.isLength=Ry,Se.isMap=oD,Se.isMatch=Koe,Se.isMatchWith=Zoe,Se.isNaN=Joe,Se.isNative=Qoe,Se.isNil=tse,Se.isNull=ese,Se.isNumber=sD,Se.isObject=Ta,Se.isObjectLike=Ia,Se.isPlainObject=xm,Se.isRegExp=ES,Se.isSafeInteger=nse,Se.isSet=lD,Se.isString=Ly,Se.isSymbol=gl,Se.isTypedArray=w1,Se.isUndefined=ise,Se.isWeakMap=rse,Se.isWeakSet=ase,Se.join=lae,Se.kebabCase=Xse,Se.last=ql,Se.lastIndexOf=uae,Se.lowerCase=Yse,Se.lowerFirst=Kse,Se.lt=ose,Se.lte=sse,Se.max=Wle,Se.maxBy=jle,Se.mean=$le,Se.meanBy=qle,Se.min=Xle,Se.minBy=Yle,Se.stubArray=FS,Se.stubFalse=OS,Se.stubObject=Nle,Se.stubString=kle,Se.stubTrue=Fle,Se.multiply=Kle,Se.nth=cae,Se.noConflict=Cle,Se.noop=kS,Se.now=My,Se.pad=Zse,Se.padEnd=Jse,Se.padStart=Qse,Se.parseInt=ele,Se.random=Hse,Se.reduce=foe,Se.reduceRight=poe,Se.repeat=tle,Se.replace=nle,Se.result=Dse,Se.round=Zle,Se.runInContext=dt,Se.sample=moe,Se.size=_oe,Se.snakeCase=ile,Se.some=Soe,Se.sortedIndex=gae,Se.sortedIndexBy=yae,Se.sortedIndexOf=_ae,Se.sortedLastIndex=Sae,Se.sortedLastIndexBy=bae,Se.sortedLastIndexOf=xae,Se.startCase=ale,Se.startsWith=ole,Se.subtract=Jle,Se.sum=Qle,Se.sumBy=e0e,Se.template=sle,Se.times=Ole,Se.toFinite=vc,Se.toInteger=Vi,Se.toLength=cD,Se.toLower=lle,Se.toNumber=Xl,Se.toSafeInteger=lse,Se.toString=Pr,Se.toUpper=ule,Se.trim=cle,Se.trimEnd=dle,Se.trimStart=hle,Se.truncate=fle,Se.unescape=ple,Se.uniqueId=zle,Se.upperCase=vle,Se.upperFirst=LS,Se.each=KI,Se.eachRight=ZI,Se.first=$I,NS(Se,function(){var y={};return du(Se,function(b,L){Ur.call(Se.prototype,L)||(y[L]=b)}),y}(),{chain:!1}),Se.VERSION=T,Vl(["bind","bindKey","curry","curryRight","partial","partialRight"],function(y){Se[y].placeholder=Se}),Vl(["drop","take"],function(y,b){sr.prototype[y]=function(L){L=L===w?1:fo(Vi(L),0);var j=this.__filtered__&&!b?new sr(this):this.clone();return j.__filtered__?j.__takeCount__=Ko(L,j.__takeCount__):j.__views__.push({size:Ko(L,Ve),type:y+(j.__dir__<0?"Right":"")}),j},sr.prototype[y+"Right"]=function(L){return this.reverse()[y](L).reverse()}}),Vl(["filter","map","takeWhile"],function(y,b){var L=b+1,j=L==On||L==Vn;sr.prototype[y]=function(le){var Me=this.clone();return Me.__iteratees__.push({iteratee:bi(le,3),type:L}),Me.__filtered__=Me.__filtered__||j,Me}}),Vl(["head","last"],function(y,b){var L="take"+(b?"Right":"");sr.prototype[y]=function(){return this[L](1).value()[0]}}),Vl(["initial","tail"],function(y,b){var L="drop"+(b?"":"Right");sr.prototype[y]=function(){return this.__filtered__?new sr(this):this[L](1)}}),sr.prototype.compact=function(){return this.filter(Os)},sr.prototype.find=function(y){return this.filter(y).head()},sr.prototype.findLast=function(y){return this.reverse().find(y)},sr.prototype.invokeMap=Zi(function(y,b){return typeof y=="function"?new sr(this):this.map(function(L){return mm(L,y,b)})}),sr.prototype.reject=function(y){return this.filter(Py(bi(y)))},sr.prototype.slice=function(y,b){y=Vi(y);var L=this;return L.__filtered__&&(y>0||b<0)?new sr(L):(y<0?L=L.takeRight(-y):y&&(L=L.drop(y)),b!==w&&(b=Vi(b),L=b<0?L.dropRight(-b):L.take(b-y)),L)},sr.prototype.takeRightWhile=function(y){return this.reverse().takeWhile(y).reverse()},sr.prototype.toArray=function(){return this.take(Ve)},du(sr.prototype,function(y,b){var L=/^(?:filter|find|map|reject)|While$/.test(b),j=/^(?:head|last)$/.test(b),le=Se[j?"take"+(b=="last"?"Right":""):b],Me=j||/^find/.test(b);le&&(Se.prototype[b]=function(){var Ke=this.__wrapped__,rt=j?[1]:arguments,yt=Ke instanceof sr,ln=rt[0],un=yt||Oi(Ke),mn=function(or){var hr=le.apply(Se,pd([or],rt));return j&&Gn?hr[0]:hr};un&&L&&typeof ln=="function"&&ln.length!=1&&(yt=un=!1);var Gn=this.__chain__,ri=!!this.__actions__.length,Ti=Me&&!Gn,Wi=yt&&!ri;if(!Me&&un){Ke=Wi?Ke:new sr(this);var Ai=y.apply(Ke,rt);return Ai.__actions__.push({func:Ay,args:[mn],thisArg:w}),new Wl(Ai,Gn)}return Ti&&Wi?y.apply(this,rt):(Ai=this.thru(mn),Ti?j?Ai.value()[0]:Ai.value():Ai)})}),Vl(["pop","push","shift","sort","splice","unshift"],function(y){var b=Z3[y],L=/^(?:push|sort|unshift)$/.test(y)?"tap":"thru",j=/^(?:pop|shift)$/.test(y);Se.prototype[y]=function(){var le=arguments;if(j&&!this.__chain__){var Me=this.value();return b.apply(Oi(Me)?Me:[],le)}return this[L](function(Ke){return b.apply(Oi(Ke)?Ke:[],le)})}}),du(sr.prototype,function(y,b){var L=Se[b];if(L){var j=L.name+"";Ur.call(y1,j)||(y1[j]=[]),y1[j].push({name:b,func:L})}}),y1[yy(w,Ze).name]=[{name:"wrapper",func:w}],sr.prototype.clone=pie,sr.prototype.reverse=vie,sr.prototype.value=mie,Se.prototype.at=jae,Se.prototype.chain=$ae,Se.prototype.commit=qae,Se.prototype.next=Xae,Se.prototype.plant=Kae,Se.prototype.reverse=Zae,Se.prototype.toJSON=Se.prototype.valueOf=Se.prototype.value=Jae,Se.prototype.first=Se.prototype.head,um&&(Se.prototype[um]=Yae),Se},v1=qne();Zh?((Zh.exports=v1)._=v1,D7._=v1):Do._=v1}).call(I)});function P(Z,H){var w=H.parentNode;w.lastChild==H?w.appendChild(Z):w.insertBefore(Z,H.nextSibling)}var F=function(){function Z(H,w){i(this,Z),this.id=w,this.jSPlugin=H,this.state={play:!1,loading:!1,text:""},this.loadingSetText=this.loadingSetText}return a(Z,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"setPlayStatus",value:function(w){this.state=Object.assign(this.state,w)}},{key:"loadingStart",value:function(w){var T=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(T),T.innerHTML="@keyframes antRotate {to {transform: rotate(400deg);transform-origin:50% 50%;}} .loading {display: inline-block;z-index: 1000;-webkit-animation: antRotate 1s infinite linear;animation: antRotate 1s infinite linear;}";var R=w,N=document.getElementById(R),z=N.offsetWidth,U=N.offsetHeight,ue=0,pe=N.offsetLeft;document.getElementById("".concat(w,"-loading-id-0"))&&document.getElementById("".concat(w,"-loading-id-0")).parentNode.removeChild(document.getElementById("".concat(w,"-loading-id-0")));var de=document.createElement("div");de.setAttribute("id","".concat(w,"-loading-id-0"));var be="position:absolute;outline:none;pointer-events:none;";console.log("this.jSPlugin",this.jSPlugin),be+="width: 100%;background-size: cover; background-repeat:no-repeat;",be+="height: 100%;",be+="top:"+ue+";",be+="left:"+pe+"px;",de.setAttribute("style",be),de.style.height=U,de.setAttribute("class","loading-container"),P(de,N);var se=1,re=document.createElement("div"),Oe=document.createElement("div");re.setAttribute("class","loading-item"),re.setAttribute("id","".concat(w,"-loading-item-0"));var be="display:inline-flex;pointer-events:none;flex-direction:column;justify-content:center;align-items: center;width:100%;height:"+U+"px;outline:none;vertical-align: top;position:absolute;";be+="left:"+me(U,z,se,0).left+"px;",be+="top:"+me(U,z,se,0).top+"px;",re.setAttribute("style",be);function me(fe,B,te,oe){var Ie=parseInt(oe/te,10)*(fe/te),Ge=oe%te*(B/te);return{top:Ie,left:Ge}}var ge=document.createElement("div");Oe.innerHTML="",Oe.style.color="#fff",ge.setAttribute("class","loading"),ge.setAttribute("id","loading-icon");var Ze='<svg t="1567069979438" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399" width="32" height="32"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#ffffff" p-id="2400"></path></svg>';ge.innerHTML=Ze,re.appendChild(ge),re.appendChild(Oe),de.appendChild(re)}},{key:"loadingStop",value:function(w){var T=document.getElementById("".concat(w,"-loading-item-0"));T&&T.removeChild(document.getElementById("loading-icon"))}},{key:"loadingSetText",value:function(w){var T=this;if(this.loadingClearText(),document.getElementById("".concat(this.id,"-loading-item-0"))){var R=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes[1];if(!R){var N=document.getElementById("".concat(this.id,"-loading-item-0"));N.style.height="100%",R=document.createElement("div"),R.innerHTML=w.text,N.appendChild(R)}R.innerHTML=w.text,R.style.fontSize="14px",R.style.color=w.color||"#FFFFFF",this.state.text=w.text,w.delayClear&&setTimeout(function(){T.loadingClearText()},parseInt(w.delayClear))}}},{key:"loadingClearText",value:function(){if(document.getElementById("".concat(this.id,"-loading-item-0"))){var w=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes;w.length>1?w[1].parentNode.removeChild(w[1]):w[0]&&w[0].parentNode.removeChild(w[0])}}},{key:"loadingClear",value:function(){if(document.getElementById("".concat(this.id,"-loading-item-0"))){for(var w=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes,T=w.length-1;T>=0;T--)w[T].parentNode.removeChild(w[T]);document.getElementById("".concat(this.id,"-loading-id-0"))&&(document.getElementById("".concat(this.id,"-loading-id-0")).style.background="none"),document.getElementById("loading-icon")&&document.getElementById("loading-icon").parentNode.removeChild(document.getElementById("loading-icon"))}}},{key:"loadingEnd",value:function(){var w=document.getElementById("".concat(this.id,"-loading-item-0"));if(w){w.parentNode.removeChild(w);var T=document.getElementById("".concat(this.id,"-loading-id-0"));T&&T.children.length===0&&T.parentNode.removeChild(T)}document.getElementById("".concat(this.id,"-loading-item-0")).style.background="none"}}]),Z}(),V=function(){function Z(H,w){i(this,Z),this.id=w,this.jSPlugin=H,this.timer=null,this.state={play:!1,loading:!1}}return a(Z,[{key:"default",value:function(w){var T=this,R="msgId";document.getElementById("".concat(this.id,"-").concat(R))&&document.getElementById("".concat(this.id,"-wrap")).removeChild(document.getElementById("".concat(this.id,"-").concat(R)));var N=document.createElement("div");N.id="".concat(this.id,"-").concat(R),N.style="position: absolute;top: 50%;left:calc(50% - ".concat(w.length*14/2,"px);padding: 4px 16px;background: #00000080;color: #FFFFFF;font-size: 14px"),N.innerHTML=w,document.getElementById("".concat(this.id,"-wrap")).appendChild(N),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){document.getElementById("".concat(T.id,"-wrap")).removeChild(document.getElementById("".concat(T.id,"-").concat(R)))},2e3)}}]),Z}(),G=[{moduleCode:"",detailCode:"405984",description:"",solution:"",updateTime:1559564188e3},{moduleCode:"",detailCode:"10035",description:"获取子账户AccessToken异常,子账户不存在或子账户不属于该开发者",solution:"",updateTime:1559551958e3},{moduleCode:"",detailCode:"1052674",description:"获取本地录像失败",solution:"",updateTime:1558579653e3},{moduleCode:"",detailCode:"395547",description:"",solution:"",updateTime:1557367296e3},{moduleCode:"",detailCode:"12",description:"",solution:"",updateTime:1557229476e3},{moduleCode:"",detailCode:"10052",description:"余额不足",solution:"",updateTime:1557121463e3},{moduleCode:"",detailCode:"20108",description:"当前用户和所添加用户不是好友关系",solution:"",updateTime:1556541725e3},{moduleCode:"",detailCode:"10009",description:"",solution:"",updateTime:1556422452e3},{moduleCode:"",detailCode:"320001",description:"通道不存在",solution:"请检查录像机的关联状态是否正常,没有摄像头的通道无法播放",updateTime:1556419044e3},{moduleCode:"",detailCode:"120001",description:"通道不存在",solution:"请检查录像机的关联状态是否正常,没有摄像头的通道无法播放",updateTime:155641903e4},{moduleCode:"",detailCode:"320049",description:"",solution:"",updateTime:1556272984e3},{moduleCode:"",detailCode:"380227",description:"",solution:"",updateTime:1556264379e3},{moduleCode:"",detailCode:"10033",description:"policy参数信息异常",solution:"",updateTime:1555922124e3},{moduleCode:"",detailCode:"10065",description:"weakAppKey 不属于accessToken对应的用户",solution:"",updateTime:1555497522e3},{moduleCode:"",detailCode:"100001",description:"",solution:"",updateTime:1555141776e3},{moduleCode:"",detailCode:"395558",description:"",solution:"",updateTime:1554987121e3},{moduleCode:"",detailCode:"70001",description:"智能家居买断用户设备受到限制,建议合理选择pagestart和pageSize",solution:"",updateTime:1554691023e3},{moduleCode:"",detailCode:"170001",description:"",solution:"",updateTime:1554691023e3},{moduleCode:"",detailCode:"1012",description:"重置失败",solution:"",updateTime:1554645841e3},{moduleCode:"",detailCode:"1043",description:"重置失败",solution:"",updateTime:1554645834e3},{moduleCode:"",detailCode:"60060",description:"直播功能未开通",solution:"通道未开通直播功能,请先开通直播",updateTime:1554346018e3},{moduleCode:"",detailCode:"380203",description:"",solution:"",updateTime:1554093666e3},{moduleCode:"",detailCode:"399048",description:"免费版并发数达到上限,请升级企业版使用多并发能力",solution:"升级成为企业版套餐即可取消并发数限制",updateTime:1553839878e3},{moduleCode:"",detailCode:"60007",description:"预置点个数超过最大值",solution:"",updateTime:1553671316e3},{moduleCode:"",detailCode:"1005",description:"",solution:"",updateTime:1553513701e3},{moduleCode:"",detailCode:"20605",description:"其他用户正在认证中",solution:"",updateTime:1552976317e3},{moduleCode:"",detailCode:"90004",description:"当前型号设备暂时不支持AI任务:CS-C3W-3B1WFR-YGL",solution:"",updateTime:1552898525e3},{moduleCode:"",detailCode:"60046",description:"添加的设备的IP和本设备的IP冲突",solution:"",updateTime:1552872372e3},{moduleCode:"",detailCode:"3",description:"修改视频清晰度失败!",solution:"",updateTime:1552440229e3},{moduleCode:"",detailCode:"1013",description:"",solution:"",updateTime:1552035069e3},{moduleCode:"",detailCode:"370007",description:"",solution:"",updateTime:1551852327e3},{moduleCode:"",detailCode:"-1",description:"",solution:"",updateTime:1551752889e3},{moduleCode:"",detailCode:"30005",description:"弱账户不存在",solution:"",updateTime:1551422358e3},{moduleCode:"",detailCode:"90006",description:"用户操作AI任务受限",solution:"",updateTime:155107332e4},{moduleCode:"",detailCode:"60203",description:"未开通相关服务",solution:"",updateTime:155062307e4},{moduleCode:"",detailCode:"10002",description:"accessToken过期或异常",solution:"",updateTime:1550300346e3},{moduleCode:"",detailCode:"380339",description:"",solution:"",updateTime:1549889458e3},{moduleCode:"",detailCode:"90002",description:"AI任务设备配置数达到上限:3",solution:"",updateTime:1549071664e3},{moduleCode:"",detailCode:"380008",description:"",solution:"",updateTime:1549005979e3},{moduleCode:"",detailCode:"320227",description:"",solution:"",updateTime:1548739731e3},{moduleCode:"",detailCode:"60059",description:"ezopen地址均不可用",solution:"",updateTime:154839535e4},{moduleCode:"",detailCode:"10005",description:"appKey异常",solution:"",updateTime:1548317858e3},{moduleCode:"",detailCode:"60045",description:"添加的设备的IP和其他通道的IP冲突",solution:"",updateTime:1548155085e3},{moduleCode:"",detailCode:"60047",description:"码流类型不支持",solution:"",updateTime:1547962108e3},{moduleCode:"",detailCode:"60041",description:"添加的设备被其他设备关联或响应超时",solution:"",updateTime:154796098e4},{moduleCode:"",detailCode:"110029",description:"个人用户接口调用频率超限",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1547606859e3},{moduleCode:"",detailCode:"380355",description:"设备直连推流异常结束",solution:"",updateTime:1547106294e3},{moduleCode:"",detailCode:"320081",description:"",solution:"",updateTime:1547106279e3},{moduleCode:"",detailCode:"60035",description:"购买云存储服务失败",solution:"",updateTime:1547026959e3},{moduleCode:"",detailCode:"90005",description:"设备已存在:C75714141",solution:"",updateTime:1546940622e3},{moduleCode:"",detailCode:"1053445",description:"该时间段没有录像片段",solution:"",updateTime:1546935727e3},{moduleCode:"",detailCode:"90007",description:"设备未加入到AI任务",solution:"",updateTime:1546932948e3},{moduleCode:"",detailCode:"326000",description:"",solution:"",updateTime:1546823143e3},{moduleCode:"",detailCode:"1021",description:"重置失败",solution:"",updateTime:1546781152e3},{moduleCode:"",detailCode:"2001",description:"删除设备失败!",solution:"",updateTime:1546422886e3},{moduleCode:"",detailCode:"380425",description:"",solution:"",updateTime:1546407694e3},{moduleCode:"",detailCode:"120097",description:"",solution:"",updateTime:1546085995e3},{moduleCode:"",detailCode:"10059",description:"requestId已存在",solution:"",updateTime:1545824509e3},{moduleCode:"",detailCode:"1154723",description:"",solution:"",updateTime:1545795209e3},{moduleCode:"",detailCode:"60043",description:"添加的设备超出最大数量",solution:"",updateTime:1545493607e3},{moduleCode:"",detailCode:"1152677",description:"",solution:"",updateTime:1545313404e3},{moduleCode:"",detailCode:"20097",description:"设备添加异常,设备验证码为ABCDEF或设备被N1,R1关联",solution:"",updateTime:1545310795e3},{moduleCode:"",detailCode:"10060",description:"设备不支持该云存储类型",solution:"",updateTime:1545309064e3},{moduleCode:"",detailCode:"20102",description:"无相应邀请信息,无法接受邀请",solution:"",updateTime:1545204966e3},{moduleCode:"",detailCode:"10053",description:"云存储开通中",solution:"",updateTime:1545100293e3},{moduleCode:"",detailCode:"20401",description:"用户云空间信息不存在",solution:"",updateTime:154501788e4},{moduleCode:"",detailCode:"20600",description:"临时密码数已达上限",solution:"",updateTime:1544873457e3},{moduleCode:"",detailCode:"901",description:"",solution:"",updateTime:1544693519e3},{moduleCode:"",detailCode:"60210",description:"图片数据错误",solution:"",updateTime:1544604457e3},{moduleCode:"",detailCode:"10013",description:"您的应用没有权限调用",solution:"",updateTime:1544416237e3},{moduleCode:"",detailCode:"70007",description:"授权码不存在",solution:"",updateTime:1544179533e3},{moduleCode:"",detailCode:"10015",description:"授权地址不存在",solution:"",updateTime:154416324e4},{moduleCode:"",detailCode:"320423",description:"",solution:"",updateTime:1544100685e3},{moduleCode:"",detailCode:"370009",description:"",solution:"",updateTime:1544077151e3},{moduleCode:"",detailCode:"10031",description:"子账户或萤石用户没有权限",solution:"",updateTime:1543990462e3},{moduleCode:"",detailCode:"10055",description:"设备不支持试用云存储服务",solution:"",updateTime:1543986292e3},{moduleCode:"",detailCode:"60042",description:"添加的设备密码错误",solution:"",updateTime:1543710913e3},{moduleCode:"",detailCode:"60082",description:"设备正在响应本次声源定位",solution:"",updateTime:1543647426e3},{moduleCode:"",detailCode:"10056",description:"设备不支持云存储服务转出",solution:"",updateTime:1543558342e3},{moduleCode:"",detailCode:"20104",description:"好友不存在",solution:"",updateTime:1543492403e3},{moduleCode:"",detailCode:"20111",description:"好友不是等待验证状态,无法接受邀请",solution:"",updateTime:1543492365e3},{moduleCode:"",detailCode:"20107",description:"不能添加自己为好友",solution:"",updateTime:1543480986e3},{moduleCode:"",detailCode:"1",description:"设备返回其他错误",solution:"",updateTime:1543459921e3},{moduleCode:"",detailCode:"60084",description:"当前正在关闭隐私遮蔽",solution:"",updateTime:1543456515e3},{moduleCode:"",detailCode:"380255",description:"",solution:"",updateTime:1543411652e3},{moduleCode:"",detailCode:"20015",description:"设备不支持",solution:"",updateTime:1543390936e3},{moduleCode:"",detailCode:"30003",description:"手机验证码错误",solution:"",updateTime:1543389137e3},{moduleCode:"",detailCode:"20615",description:"锁用户已存在",solution:"",updateTime:1543388325e3},{moduleCode:"",detailCode:"60061",description:"账户流量已超出或未购买,限制开通",solution:"",updateTime:1543372581e3},{moduleCode:"",detailCode:"60020",description:"设备不支持该信令",solution:"",updateTime:1543321636e3},{moduleCode:"",detailCode:"320146",description:"",solution:"",updateTime:1543318472e3},{moduleCode:"",detailCode:"60018",description:"设备升级失败",solution:"",updateTime:1543304928e3},{moduleCode:"",detailCode:"60044",description:"添加的设备网络不可达超时",solution:"",updateTime:1543304102e3},{moduleCode:"",detailCode:"20619",description:"主用户无法删除",solution:"",updateTime:1543290219e3},{moduleCode:"",detailCode:"20608",description:"锁用户不存在",solution:"",updateTime:154328195e4},{moduleCode:"",detailCode:"20609",description:"设备响应超时,门锁通信故障或者电量不足,请重试.",solution:"",updateTime:1543281601e3},{moduleCode:"",detailCode:"1049954",description:"升级设备失败",solution:"",updateTime:1543279264e3},{moduleCode:"",detailCode:"60009",description:"正在调用预置点",solution:"",updateTime:1543238114e3},{moduleCode:"",detailCode:"1052677",description:"获取本地录像失败",solution:"",updateTime:1543207604e3},{moduleCode:"",detailCode:"327000",description:"",solution:"",updateTime:1543196609e3},{moduleCode:"",detailCode:"20021",description:"设备在线,未被用户添加",solution:"",updateTime:1543193436e3},{moduleCode:"",detailCode:"20202",description:"操作留言信息失败",solution:"",updateTime:1543191562e3},{moduleCode:"",detailCode:"1052678",description:"获取本地录像失败",solution:"",updateTime:1543132218e3},{moduleCode:"",detailCode:"1054723",description:"格式化设备失败",solution:"",updateTime:1543129833e3},{moduleCode:"",detailCode:"20109",description:"对应分享不存在",solution:"",updateTime:1543129111e3},{moduleCode:"",detailCode:"60026",description:"设备处于隐私遮蔽状态",solution:"",updateTime:1543110403e3},{moduleCode:"",detailCode:"60083",description:"当前正在开启隐私遮蔽",solution:"",updateTime:1543071148e3},{moduleCode:"",detailCode:"60001",description:"用户无云台控制权限",solution:"",updateTime:1543059167e3},{moduleCode:"",detailCode:"2003",description:"设备不在线",solution:"",updateTime:1543051046e3},{moduleCode:"",detailCode:"-24",description:"设置设备enable错误",solution:"",updateTime:1543042701e3},{moduleCode:"",detailCode:"10018",description:"",solution:"",updateTime:1543041564e3},{moduleCode:"",detailCode:"20103",description:"好友已存在",solution:"",updateTime:154303843e4},{moduleCode:"",detailCode:"70010",description:"授权异常请重试",solution:"",updateTime:154303559e4},{moduleCode:"",detailCode:"60056",description:"删除设备失败",solution:"",updateTime:1543031275e3},{moduleCode:"",detailCode:"60040",description:"添加的设备不在同一局域网",solution:"",updateTime:154303121e4},{moduleCode:"",detailCode:"60019",description:"加密已开启",solution:"",updateTime:1543029931e3},{moduleCode:"",detailCode:"1054722",description:"格式化设备失败",solution:"",updateTime:1543028537e3},{moduleCode:"",detailCode:"20016",description:"当前设备正在格式化",solution:"",updateTime:1543028537e3},{moduleCode:"",detailCode:"10024",description:"透明通道权限校验不通过",solution:"",updateTime:154302554e4},{moduleCode:"",detailCode:"6002",description:"删除设备失败!",solution:"",updateTime:1543025026e3},{moduleCode:"",detailCode:"1011",description:"验证码错误!",solution:"",updateTime:1543016865e3},{moduleCode:"",detailCode:"60032",description:"卡密已使用",solution:"",updateTime:1543006668e3},{moduleCode:"",detailCode:"10034",description:"子账号已存在",solution:"",updateTime:1542989194e3},{moduleCode:"",detailCode:"20301",description:"根据uuid查询联动信息不存在",solution:"",updateTime:1542988651e3},{moduleCode:"",detailCode:"1041",description:"获取验证码过于频繁",solution:"",updateTime:1542980953e3},{moduleCode:"",detailCode:"10012",description:"该appkey下已绑定重复的phone!",solution:"",updateTime:15429808e5},{moduleCode:"",detailCode:"1008",description:"phone不合法!",solution:"",updateTime:1542979812e3},{moduleCode:"",detailCode:"60023",description:"订阅操作失败",solution:"",updateTime:1542979006e3},{moduleCode:"",detailCode:"5",description:"设备返回其他错误",solution:"",updateTime:1542977828e3},{moduleCode:"",detailCode:"60006",description:"云台当前操作失败",solution:"",updateTime:1542977598e3},{moduleCode:"",detailCode:"131",description:"修改视频清晰度失败!",solution:"",updateTime:1542977246e3},{moduleCode:"",detailCode:"10019",description:"密码错误",solution:"",updateTime:1542976628e3},{moduleCode:"",detailCode:"10004",description:"用户不存在",solution:"",updateTime:1542976268e3},{moduleCode:"",detailCode:"20201",description:"操作报警信息失败",solution:"",updateTime:1542975906e3},{moduleCode:"",detailCode:"20024",description:"设备不在线,已经被别的用户添加",solution:"",updateTime:1542975858e3},{moduleCode:"",detailCode:"60004",description:"设备云台旋转达到左限位",solution:"",updateTime:1542975207e3},{moduleCode:"",detailCode:"1052679",description:"修改视频清晰度失败!",solution:"",updateTime:1542974886e3},{moduleCode:"",detailCode:"20031",description:"请在萤石客户端关闭终端绑定",solution:"",updateTime:1542974756e3},{moduleCode:"",detailCode:"1053825",description:"获取本地录像失败",solution:"",updateTime:1542974692e3},{moduleCode:"",detailCode:"60011",description:"预置点不存在",solution:"",updateTime:1542974414e3},{moduleCode:"",detailCode:"1052936",description:"修改视频清晰度失败!",solution:"",updateTime:154297439e4},{moduleCode:"",detailCode:"1016",description:"",solution:"",updateTime:1542974273e3},{moduleCode:"",detailCode:"10032",description:"子账号不存在",solution:"",updateTime:1542973906e3},{moduleCode:"",detailCode:"20013",description:"设备已被别人添加",solution:"",updateTime:1542973817e3},{moduleCode:"",detailCode:"50000",description:"服务器错误!",solution:"",updateTime:1542973801e3},{moduleCode:"",detailCode:"60010",description:"该预置点已经是当前位置",solution:"",updateTime:15429738e5},{moduleCode:"",detailCode:"60003",description:"设备云台旋转达到下限位",solution:"",updateTime:154297377e4},{moduleCode:"",detailCode:"4",description:"设备返回其他错误",solution:"",updateTime:1542973755e3},{moduleCode:"",detailCode:"60016",description:"加密未开启,无需关闭",solution:"",updateTime:1542973753e3},{moduleCode:"",detailCode:"60002",description:"设备云台旋转达到上限位",solution:"",updateTime:1542973742e3},{moduleCode:"",detailCode:"20023",description:"设备不在线,未被用户添加",solution:"",updateTime:1542973685e3},{moduleCode:"",detailCode:"10008",description:"",solution:"",updateTime:1542973676e3},{moduleCode:"",detailCode:"20010",description:"设备验证码错误",solution:"",updateTime:1542973658e3},{moduleCode:"",detailCode:"60005",description:"设备云台旋转达到右限位",solution:"",updateTime:1542973657e3},{moduleCode:"",detailCode:"20017",description:"设备已经被自己添加",solution:"",updateTime:1542973648e3},{moduleCode:"",detailCode:"20020",description:"设备在线,已经被自己添加",solution:"",updateTime:1542973533e3},{moduleCode:"",detailCode:"20029",description:"设备不在线,已经被自己添加",solution:"",updateTime:154297353e4},{moduleCode:"",detailCode:"10014",description:"APPKEY下对应的第三方userId和phone未绑定!",solution:"",updateTime:1542973499e3},{moduleCode:"",detailCode:"20002",description:"设备不存在",solution:"",updateTime:1542973499e3},{moduleCode:"",detailCode:"10030",description:"appkey和appsecret不匹配",solution:"",updateTime:154297349e4},{moduleCode:"",detailCode:"20022",description:"设备在线,已经被别的用户添加",solution:"",updateTime:1542973486e3},{moduleCode:"",detailCode:"20008",description:"设备响应超时",solution:"",updateTime:1542973484e3},{moduleCode:"",detailCode:"20032",description:"该用户下通道不存在",solution:"",updateTime:1542973481e3},{moduleCode:"",detailCode:"20006",description:"网络异常",solution:"",updateTime:1542973475e3},{moduleCode:"",detailCode:"20014",description:"deviceSerial不合法!",solution:"",updateTime:1542973454e3},{moduleCode:"",detailCode:"20007",description:"设备不在线",solution:"",updateTime:1542973454e3},{moduleCode:"",detailCode:"20018",description:"该用户不拥有该设备",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"10010",description:"",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"10011",description:"未绑定!",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"20001",description:"通道不存在!",solution:"",updateTime:1542973452e3},{moduleCode:"",detailCode:"10017",description:"appKey不存在",solution:"",updateTime:1542973451e3},{moduleCode:"",detailCode:"400259",description:"",solution:"",updateTime:1542875643e3},{moduleCode:"",detailCode:"400004",description:"",solution:"",updateTime:1542873364e3},{moduleCode:"",detailCode:"3840",description:"",solution:"",updateTime:154186e7},{moduleCode:"",detailCode:"-1017",description:"",solution:"",updateTime:1541733663e3},{moduleCode:"",detailCode:"320025",description:"",solution:"",updateTime:1541078281e3},{moduleCode:"",detailCode:"320024",description:"",solution:"",updateTime:1540801374e3},{moduleCode:"",detailCode:"321002",description:"",solution:"",updateTime:1540631734e3},{moduleCode:"",detailCode:"321000",description:"",solution:"",updateTime:1540609178e3},{moduleCode:"",detailCode:"321022",description:"",solution:"",updateTime:1540548345e3},{moduleCode:"",detailCode:"321016",description:"",solution:"",updateTime:1540287187e3},{moduleCode:"",detailCode:"320023",description:"",solution:"",updateTime:1539825993e3},{moduleCode:"",detailCode:"-1016",description:"",solution:"",updateTime:1539584931e3},{moduleCode:"",detailCode:"8",description:"",solution:"",updateTime:1539391812e3},{moduleCode:"",detailCode:"1075127593",description:"",solution:"",updateTime:1538959251e3},{moduleCode:"",detailCode:"380421",description:"",solution:"",updateTime:1537288465e3},{moduleCode:"",detailCode:"322000",description:"麦克风权限未开启",solution:"",updateTime:1536820136e3},{moduleCode:"",detailCode:"1152678",description:"",solution:"",updateTime:1536738348e3},{moduleCode:"",detailCode:"320047",description:"",solution:"",updateTime:1536664472e3},{moduleCode:"",detailCode:"327006",description:"",solution:"",updateTime:153613612e4},{moduleCode:"",detailCode:"1074807593",description:"",solution:"",updateTime:1536135035e3},{moduleCode:"",detailCode:"320291",description:"",solution:"",updateTime:1536110836e3},{moduleCode:"",detailCode:"320045",description:"",solution:"",updateTime:1535963775e3},{moduleCode:"",detailCode:"370004",description:"",solution:"",updateTime:1535883699e3},{moduleCode:"",detailCode:"1149954",description:"",solution:"",updateTime:1535700674e3},{moduleCode:"",detailCode:"320053",description:"",solution:"",updateTime:1535681079e3},{moduleCode:"",detailCode:"400000",description:"",solution:"",updateTime:1535532332e3},{moduleCode:"",detailCode:"110028",description:"个人版抓图接口日调用次数超出限制",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348756e3},{moduleCode:"",detailCode:"110027",description:"个人版帐号数量超出安全限制,无法调用",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348734e3},{moduleCode:"",detailCode:"110026",description:"设备数量超出个人版限制,当前设备无法操作",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348588e3},{moduleCode:"",detailCode:"100000",description:"",solution:"",updateTime:1534980008e3},{moduleCode:"",detailCode:"324004",description:"",solution:"",updateTime:1534927762e3},{moduleCode:"",detailCode:"360104",description:"",solution:"",updateTime:1534761006e3},{moduleCode:"",detailCode:"320204",description:"",solution:"",updateTime:1534584221e3},{moduleCode:"",detailCode:"380001",description:"",solution:"",updateTime:1534404715e3},{moduleCode:"",detailCode:"380204",description:"",solution:"",updateTime:1534401682e3},{moduleCode:"",detailCode:"328006",description:"",solution:"",updateTime:1534144407e3},{moduleCode:"",detailCode:"321703",description:"",solution:"",updateTime:1534127274e3},{moduleCode:"",detailCode:"321510",description:"",solution:"",updateTime:1533428892e3},{moduleCode:"",detailCode:"321006",description:"",solution:"",updateTime:1533036916e3},{moduleCode:"",detailCode:"50009",description:"",solution:"",updateTime:1532078548e3},{moduleCode:"",detailCode:"50007",description:"",solution:"",updateTime:153199172e4},{moduleCode:"",detailCode:"50018",description:"",solution:"",updateTime:1531912829e3},{moduleCode:"",detailCode:"380451",description:"",solution:"",updateTime:15316157e5},{moduleCode:"",detailCode:"380336",description:"",solution:"",updateTime:1531231721e3},{moduleCode:"",detailCode:"360020",description:"",solution:"",updateTime:1531117554e3},{moduleCode:"",detailCode:"380418",description:"",solution:"",updateTime:153110707e4},{moduleCode:"",detailCode:"1153445",description:"设备在该时间段内没有录像",solution:"",updateTime:1530944007e3},{moduleCode:"",detailCode:"110007",description:"调用接口总次数达到上限",solution:"请升级企业版,获取更高能力",updateTime:1530935584e3},{moduleCode:"",detailCode:"360019",description:"",solution:"",updateTime:1530869771e3},{moduleCode:"",detailCode:"360100",description:"",solution:"",updateTime:1530786188e3},{moduleCode:"",detailCode:"380042",description:"",solution:"",updateTime:1530775199e3},{moduleCode:"",detailCode:"320355",description:"",solution:"",updateTime:1530716074e3},{moduleCode:"",detailCode:"100003",description:"",solution:"",updateTime:1530232541e3},{moduleCode:"",detailCode:"371026",description:"",solution:"",updateTime:15301926e5},{moduleCode:"",detailCode:"102",description:"",solution:"",updateTime:1529895641e3},{moduleCode:"",detailCode:"380201",description:"",solution:"",updateTime:1529740929e3},{moduleCode:"",detailCode:"320054",description:"",solution:"",updateTime:1529544875e3},{moduleCode:"",detailCode:"500101",description:"",solution:"",updateTime:1529485953e3},{moduleCode:"",detailCode:"321001",description:"",solution:"",updateTime:1529411048e3},{moduleCode:"",detailCode:"321508",description:"",solution:"",updateTime:1529393279e3},{moduleCode:"",detailCode:"405991",description:"",solution:"",updateTime:1529380238e3},{moduleCode:"",detailCode:"380461",description:"",solution:"",updateTime:1529130941e3},{moduleCode:"",detailCode:"-1019",description:"",solution:"",updateTime:1529057245e3},{moduleCode:"",detailCode:"322009",description:"",solution:"",updateTime:1528965717e3},{moduleCode:"",detailCode:"324005",description:"",solution:"",updateTime:1528950153e3},{moduleCode:"",detailCode:"325000",description:"",solution:"",updateTime:1528947143e3},{moduleCode:"",detailCode:"326032",description:"",solution:"",updateTime:1528872971e3},{moduleCode:"",detailCode:"325032",description:"",solution:"",updateTime:1528863189e3},{moduleCode:"",detailCode:"328000",description:"",solution:"",updateTime:1528794505e3},{moduleCode:"",detailCode:"53",description:"",solution:"",updateTime:1528693249e3},{moduleCode:"",detailCode:"-1020",description:"",solution:"",updateTime:152849944e4},{moduleCode:"",detailCode:"329032",description:"",solution:"",updateTime:1528446301e3},{moduleCode:"",detailCode:"-1202",description:"",solution:"",updateTime:152843982e4},{moduleCode:"",detailCode:"2",description:"",solution:"",updateTime:1528434175e3},{moduleCode:"",detailCode:"1152936",description:"",solution:"",updateTime:1528345986e3},{moduleCode:"",detailCode:"328011",description:"",solution:"",updateTime:15283386e5},{moduleCode:"",detailCode:"28",description:"",solution:"",updateTime:152833753e4},{moduleCode:"",detailCode:"320356",description:"",solution:"",updateTime:1528188693e3},{moduleCode:"",detailCode:"320357",description:"",solution:"",updateTime:1528188517e3},{moduleCode:"",detailCode:"405800",description:"",solution:"",updateTime:1528168732e3},{moduleCode:"",detailCode:"405996",description:"",solution:"",updateTime:1528168686e3},{moduleCode:"",detailCode:"380357",description:"",solution:"",updateTime:1528011565e3},{moduleCode:"",detailCode:"328022",description:"",solution:"",updateTime:1527929065e3},{moduleCode:"",detailCode:"380003",description:"",solution:"",updateTime:1527927819e3},{moduleCode:"",detailCode:"50004",description:"",solution:"",updateTime:1527770643e3},{moduleCode:"",detailCode:"50011",description:"",solution:"",updateTime:1527770635e3},{moduleCode:"",detailCode:"370017",description:"",solution:"",updateTime:1527739514e3},{moduleCode:"",detailCode:"327032",description:"",solution:"",updateTime:1527726704e3},{moduleCode:"",detailCode:"324001",description:"",solution:"",updateTime:1527681892e3},{moduleCode:"",detailCode:"405997",description:"",solution:"",updateTime:1527653408e3},{moduleCode:"",detailCode:"405995",description:"",solution:"",updateTime:1527647283e3},{moduleCode:"",detailCode:"1153825",description:"",solution:"",updateTime:1527601747e3},{moduleCode:"",detailCode:"328002",description:"",solution:"",updateTime:1527495292e3},{moduleCode:"",detailCode:"1152679",description:"",solution:"",updateTime:1527486665e3},{moduleCode:"",detailCode:"380356",description:"",solution:"",updateTime:1527125669e3},{moduleCode:"",detailCode:"328032",description:"",solution:"",updateTime:1527069382e3},{moduleCode:"",detailCode:"22",description:"",solution:"",updateTime:1527049826e3},{moduleCode:"",detailCode:"9",description:"",solution:"",updateTime:1527006778e3},{moduleCode:"",detailCode:"89",description:"",solution:"",updateTime:1526622784e3},{moduleCode:"",detailCode:"328016",description:"",solution:"",updateTime:1526452365e3},{moduleCode:"",detailCode:"368005",description:"",solution:"",updateTime:1525921264e3},{moduleCode:"",detailCode:"0",description:"",solution:"",updateTime:1525920242e3},{moduleCode:"",detailCode:"380006",description:"",solution:"",updateTime:1525918868e3},{moduleCode:"",detailCode:"310",description:"",solution:"",updateTime:1525834436e3},{moduleCode:"",detailCode:"360011",description:"",solution:"",updateTime:1525681552e3},{moduleCode:"",detailCode:"170005",description:"",solution:"",updateTime:15254339e5},{moduleCode:"",detailCode:"50023",description:"",solution:"",updateTime:1525403338e3},{moduleCode:"",detailCode:"100131",description:"",solution:"",updateTime:1525229691e3},{moduleCode:"",detailCode:"-1018",description:"",solution:"",updateTime:1525142341e3},{moduleCode:"",detailCode:"362026",description:"",solution:"",updateTime:1524882677e3},{moduleCode:"",detailCode:"368007",description:"",solution:"",updateTime:1524832269e3},{moduleCode:"",detailCode:"54",description:"",solution:"",updateTime:1524793646e3},{moduleCode:"",detailCode:"1154722",description:"",solution:"",updateTime:1524620807e3},{moduleCode:"",detailCode:"320229",description:"",solution:"",updateTime:1524551682e3},{moduleCode:"",detailCode:"360012",description:"",solution:"",updateTime:1524472094e3},{moduleCode:"",detailCode:"380229",description:"",solution:"",updateTime:1524110755e3},{moduleCode:"",detailCode:"360016",description:"",solution:"",updateTime:1523933518e3},{moduleCode:"",detailCode:"-1003",description:"",solution:"",updateTime:1523584804e3},{moduleCode:"",detailCode:"410026",description:"",solution:"",updateTime:152351743e4},{moduleCode:"",detailCode:"360102",description:"TTS初始化失败",solution:"",updateTime:1523503528e3},{moduleCode:"",detailCode:"360013",description:"设备开启了隐私保护",solution:"",updateTime:1523503507e3},{moduleCode:"",detailCode:"360010",description:"设备正在对讲中",solution:"",updateTime:1523503491e3},{moduleCode:"",detailCode:"360007",description:"TTS关闭了与客户端的连接",solution:"",updateTime:1523503475e3},{moduleCode:"",detailCode:"360006",description:"客户端接收发生错误",solution:"",updateTime:1523503457e3},{moduleCode:"",detailCode:"360005",description:"客户端发送的消息错误",solution:"",updateTime:1523503437e3},{moduleCode:"",detailCode:"360004",description:"TTS内部发生错误",solution:"",updateTime:1523503421e3},{moduleCode:"",detailCode:"360003",description:"TTS的设备端发生错误",solution:"",updateTime:1523503397e3},{moduleCode:"",detailCode:"360002",description:"对讲发起超时",solution:"",updateTime:1523503376e3},{moduleCode:"",detailCode:"360001",description:"客户端请求超时",solution:"",updateTime:1523503357e3},{moduleCode:"",detailCode:"320077",description:"",solution:"",updateTime:1523444274e3},{moduleCode:"",detailCode:"370047",description:"",solution:"",updateTime:152344048e4},{moduleCode:"",detailCode:"100002",description:"",solution:"",updateTime:1523413964e3},{moduleCode:"",detailCode:"-1004",description:"",solution:"",updateTime:1523336653e3},{moduleCode:"",detailCode:"380000",description:"",solution:"",updateTime:1523180856e3},{moduleCode:"",detailCode:"380213",description:"",solution:"",updateTime:1523180623e3},{moduleCode:"",detailCode:"380101",description:"",solution:"",updateTime:1522834231e3},{moduleCode:"",detailCode:"50047",description:"",solution:"",updateTime:1522833243e3},{moduleCode:"",detailCode:"-999",description:"",solution:"",updateTime:1522831034e3},{moduleCode:"",detailCode:"320418",description:"",solution:"",updateTime:1522829072e3},{moduleCode:"",detailCode:"-1009",description:"",solution:"",updateTime:1522746247e3},{moduleCode:"",detailCode:"320209",description:"",solution:"",updateTime:1522744395e3},{moduleCode:"",detailCode:"368006",description:"",solution:"",updateTime:15227443e5},{moduleCode:"",detailCode:"369003",description:"",solution:"",updateTime:1522736355e3},{moduleCode:"",detailCode:"405989",description:"",solution:"",updateTime:1522726571e3},{moduleCode:"",detailCode:"-1012",description:"",solution:"",updateTime:1522726203e3},{moduleCode:"",detailCode:"322016",description:"",solution:"",updateTime:1522722918e3},{moduleCode:"",detailCode:"500103",description:"",solution:"",updateTime:1522655556e3},{moduleCode:"",detailCode:"405999",description:"",solution:"",updateTime:1522654716e3},{moduleCode:"",detailCode:"321032",description:"",solution:"",updateTime:1522647732e3},{moduleCode:"",detailCode:"381101",description:"",solution:"",updateTime:1522392414e3},{moduleCode:"",detailCode:"399999",description:"",solution:"",updateTime:1522379834e3},{moduleCode:"",detailCode:"380103",description:"",solution:"",updateTime:1522312724e3},{moduleCode:"",detailCode:"360014",description:"",solution:"",updateTime:1522304341e3},{moduleCode:"",detailCode:"-1005",description:"",solution:"",updateTime:1522288195e3},{moduleCode:"",detailCode:"100005",description:"",solution:"",updateTime:1522218849e3},{moduleCode:"",detailCode:"100004",description:"",solution:"",updateTime:1522209053e3},{moduleCode:"",detailCode:"106002",description:"",solution:"",updateTime:15222062e5},{moduleCode:"",detailCode:"410030",description:"",solution:"",updateTime:1522162252e3},{moduleCode:"",detailCode:"-1002",description:"",solution:"",updateTime:152215069e4},{moduleCode:"",detailCode:"-1200",description:"",solution:"",updateTime:1522139025e3},{moduleCode:"",detailCode:"-1001",description:"",solution:"",updateTime:1522046436e3},{moduleCode:"",detailCode:"-1011",description:"",solution:"",updateTime:1522045931e3},{moduleCode:"",detailCode:"381102",description:"",solution:"",updateTime:1522044953e3},{moduleCode:"",detailCode:"381103",description:"",solution:"",updateTime:1522044953e3},{moduleCode:"",detailCode:"391205",description:"vtdu解析服务器ip失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391206",description:"vtdu描述符select失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391207",description:"vtdu文件描述符不在可读中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391208",description:"vtdu网络发生错误getsockopt",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391209",description:"vtdu描述符select超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395000",description:"cas回复信令,发现内存已经释放(和设备之间异常断开)",msg:"播放失败请重试",solution:"检查设备网络;刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395400",description:"私有化协议vtm检测私有化协议中码流类型小于0或者设备序列号为空等非法参数场景返回(app不重试取流)",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395402",description:"回放找不到录像文件",msg:"回放找不到录像文件,本地存储请检查存储卡是否接触良好",solution:"检查是否有存储卡并且接触良好",updateTime:1522034841e3},{moduleCode:"",detailCode:"395403",description:"操作码或信令密钥与设备不匹配",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395404",description:"设备不在线",solution:"检查设备网络;重启设备接入萤石云",msg:"设备不在线,请检查设备网络或重启设备接入萤石云",updateTime:1522034841e3},{moduleCode:"",detailCode:"395405",description:"流媒体向设备发送或接受信令超时/cas响应超时",msg:"播放失败,请检查设备网络或重启设备",solution:"检查设备网络;重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395406",description:"token失效",msg:"播放失败请重试或重启设备",solution:"刷新重试或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395407",description:"客户端的URL格式错误",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395409",description:"预览开启隐私保护",msg:"播放失败请关闭隐私遮蔽",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395410",description:"设备达到最大连接数",solution:"请升级设备固件版本",updateTime:1522034841e3},{moduleCode:"",detailCode:"395411",description:"token无权限",msg:"播放失败",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395412",description:"session不存在",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395413",description:"验证token的他异常(不具体) ",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395415",description:"设备通道错",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395416",description:"设备资源受限",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395451",description:"设备不支持的码流类型",msg:"播放失败请重试或切换设备码流",solution:"刷新重试或者切换到高清模式",updateTime:1522034841e3},{moduleCode:"",detailCode:"395452",description:"设备链接流媒体服务器失败",msg:"播放失败,请检查设备网络或重启设备或重新加载",solution:"检查设备网络,重启设备,刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395454",description:"流媒体中关于设备取流会话不存在",msg:"播放失败请重试",solution:"流媒体中关于设备取流会话不存在",updateTime:152222018e4},{moduleCode:"",detailCode:"395455",description:"设备通道未关联",msg:"播放失败,请检查设备通道是否关联",solution:"检查设备通道是否关联",updateTime:152222018e4},{moduleCode:"",detailCode:"395456",description:"设备通道关联设备不在线",msg:"播放失败,请检查设备通道是否上线",solution:"检查设备通道是否上线",updateTime:152222018e4},{moduleCode:"",detailCode:"395457",description:"客户端不支持端到端加密",msg:"播放失败",solution:"客户端不支持端到端加密",updateTime:152222018e4},{moduleCode:"",detailCode:"395458",description:"设备不支持当前并发ECDH密",msg:"客户端不支持端到端加密",solution:"设备不支持当前并发ECDH密",updateTime:152222018e4},{moduleCode:"",detailCode:"395459",description:"VTDU 处理ECDH 加密失败",msg:"播放失败",solution:"VTDU 处理ECDH 加密失败",updateTime:152222018e4},{moduleCode:"",detailCode:"395460",description:"流媒体中关于设备取流会话不存在",msg:"播放失败请重试",solution:"流媒体中关于设备取流会话不存在",updateTime:152222018e4},{moduleCode:"",detailCode:"395492",description:"设备不支持的命令",msg:"操作失败,设备不支持",solution:"",updateTime:152222018e4},{moduleCode:"",detailCode:"395500",description:"服务器处理失败",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395501",description:"流媒体vtdu达到最大负载,请扩容",msg:"播放失败请重试",solution:"服务器负载达到上限,请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395503",description:"vtm返回分配vtdu失败",msg:"播放失败请重试",solution:"vtdu服务异常,请请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395504",description:"流媒体vtdu达到最大负载",msg:"播放失败请重试",solution:"服务器负载达到上限,请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395505",description:"vtm ecdh解密失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395506",description:"vtm 返回IPC不支持取流(需要IPC添加NVR后支持)",msg:"播放失败,请绑定NVR使用",solution:"IPC绑定NVR使用",updateTime:1522034841e3},{moduleCode:"",detailCode:"395544",description:"设备返回无视频源",msg:"播放失败,请检查设备接触情况",solution:"设备是否接触良好; 如果一直无法解决,请联系技术支持",updateTime:1522034841e3},{moduleCode:"",detailCode:"395545",description:"视频分享时间已经结束",msg:"视频分享时间已结束",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395546",description:"vtdu返回达到取流并发路数限制",msg:"并发上限,请升级为企业版",solution:"请升级为企业版,放开并发限制",updateTime:1522034841e3},{moduleCode:"",detailCode:"395547",description:"vtdu返回开放平台用户并发限制",msg:"并发上限,请升级为企业版",solution:"请确定开放平台用户预览是否超过用户并发数量限制",updateTime:1522034841e3},{moduleCode:"",detailCode:"395556",description:"ticket校验失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395557",description:"回放服务器等待流头超时",msg:"播放失败请重试",solution:"刷新重试,检测设备网络,重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395558",description:"查找录像开始时间错误",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395560",description:"群组分享取流二次验证失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395561",description:"分享群组用户被锁住",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395562",description:"群组分享用户权限变更",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395563",description:"认证服务连接失败",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395564",description:"认证超时",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395566",description:"不在分享时间内预览",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395567",description:"分享通道被锁定",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395568",description:"未找到认证类型",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395569",description:"认证返回的参数异常",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395600",description:"分享设备不在分享时间内",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395601",description:"群组分享用户没权限",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395602",description:"群组分享权限变更",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395610",description:"接收流头失败",msg:"播放失败请重试并检查设备网络情况以及设备配置",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395620",description:"心跳超时",msg:"播放失败请重试并检查设备网络情况以及设备配置",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395530",description:"机房故障不可用",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395701",description:"cas信令返回格式错误",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395702",description:"SPGW请求Cas、Status透传超时",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395703",description:"SPGW请求http不通",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396001",description:"客户端参数出错",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396099",description:"客户端默认错误",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396101",description:"不支持的命令",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396102",description:"设备流头发送失败",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396103",description:"cas/设备返回错误1",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396104",description:"cas/设备返回错误-1",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396105",description:"设备返回错误码3",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396106",description:"设备返回错误码4",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396107",description:"设备返回错误码5",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396108",description:"cas信令回应重复",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396109",description:"视频广场取消分享",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396110",description:"设备信令默认错误",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396501",description:"设备数据链路和实际链路不匹配",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396502",description:"设备数据链路重复建立连接",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396503",description:"设备数据链路端口不匹配",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396504",description:"缓存设备数据链路失败(内存块不足)",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396505",description:"设备发送确认头消息重复",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396506",description:"设备数据先于确定头部到达",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396508",description:"设备数据头部长度非法",msg:"播放失败请重试或重启设备",solution:"刷新重试,或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"396509",description:"索引找不到设备数据管理块",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396510",description:"设备数据链路vtdu内存块协议状态不匹配",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396511",description:"设备数据头部没有streamkey错误",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396512",description:"设备数据头部非法(较笼统)",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396513",description:"设备数据长度过小",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396514",description:"设备老协议推流头部没有streamkey错误",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396515",description:"设备老协议推流数据非法",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396516",description:"设备老协议索引找不到内存管理块",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396517",description:"设备老协议推流数据非法",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396518",description:"设备数据包过大",msg:"播放失败请重试或重启设备",solution:"刷新重试,或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"396519",description:"设备推流链路网络不稳定",msg:"播放失败,请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396520",description:"设备推流链路网络不稳定(默认)",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396700",description:"异常数据包",msg:"播放失败,设备重启",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396701",description:"回放结束数据包",msg:"回放结束",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397001",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397002",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397003",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397004",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397005",description:"VTDU连接失败,或VTDU侧断开连接",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397006",description:"vtm断开连接(无需 关注)",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397007",description:"客户端发送缓冲区满(上行带宽太小)",msg:"播放失败,上行带宽过小请检查设备网络情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399000",description:"无效包,包过大",msg:" 检查设备重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399001",description:"地址不合法",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399002",description:"缺少端口",msg:" 播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"170003",description:"refreshToken不存在",solution:"建议用户重新调用logout接口,然后调用openLoginPage接口重新启动登录页面登录",updateTime:1522034841e3},{moduleCode:"",detailCode:"170004",description:"refreshToken已过期",solution:"建议用户重新调用logout接口,然后调用openLoginPage接口重新启动登录页面登录",updateTime:1522034841e3},{moduleCode:"",detailCode:"380011",description:"设备隐私保护中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380045",description:"设备直连取流连接数量过大",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380047",description:"设备不支持该命令",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380077",description:"设备正在对讲中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380102",description:"数据接收异常",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380205",description:"设备检测入参异常",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380209",description:"网络连接超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380212",description:"设备端网络连接超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"101007",description:"手机号未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120503",description:"正在响铃",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390016",description:"vtdu成功响应未携带流头",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101008",description:"手机号码不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120504",description:"室内机正在通话",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390017",description:"无数据流,尚未使用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101009",description:"用户名与手机不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120505",description:"设备操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390018",description:"信令消息体PB解析失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101010",description:"获取验证码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120506",description:"非法命令",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390019",description:"信令消息体PB封装失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101011",description:"验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120507",description:"智能锁密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390020",description:"申请系统内存资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101012",description:"验证码失效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120508",description:"开关锁失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390021",description:"vtdu地址尚未获取到",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101013",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120509",description:"开关锁超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390022",description:"客户端尚未支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101014",description:"密码不正确或者appKey不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120510",description:"智能锁设备繁忙",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390023",description:"获取系统socket资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101015",description:"用户被锁住",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120511",description:"远程开锁功能未打开",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390024",description:"上层填充的StreamSsnId不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101021",description:"验证参数异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120600",description:"临时密码数已达上限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390025",description:"链接服务器失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101026",description:"邮箱已经被注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120601",description:"添加临时密码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390026",description:"客户端请求未收到服务端应答",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101031",description:"邮箱未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120602",description:"删除临时密码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390027",description:"链路断开",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101032",description:"邮箱不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120603",description:"该临时密码不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390028",description:"没有取流链接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101041",description:"获取验证码过于频繁",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120604",description:"指纹锁射频通信失败,请稍后再试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390029",description:"流成功停止",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101043",description:"手机验证码输入错误超过规定次数",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120605",description:"其他用户正在认证中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390030",description:"客户端防串流校验失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102000",description:"设备不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120606",description:"验证已启动,请在120s内进行本地验证和调用添加设备接口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390031",description:"应用层tcp粘包处理缓冲区满",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102001",description:"摄像机不存在",solution:"摄像机未注册到萤石云平台,请仔细检查摄像机的网络配置,确保连接到网络",updateTime:152203484e4},{moduleCode:"",detailCode:"120607",description:"删除用户失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390032",description:"无效状态迁移",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102003",description:"设备不在线",solution:"参考服务中心排查方法",updateTime:152203484e4},{moduleCode:"",detailCode:"120608",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390033",description:"无效客户端状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102004",description:"设备异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120609",description:"设备响应超时,门锁通信故障或者电量不足,请重试.",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390034",description:"向vtm取流流媒体信息请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102007",description:"设备序列号不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120610",description:"获取临时密码列表失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390035",description:"向代理取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102009",description:"设备请求响应超时异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130001",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390036",description:"向代理保活取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105000",description:"设备已被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130002",description:"手机号码已经注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390037",description:"向vtdu取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105001",description:"设备已被别人添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130003",description:"手机验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390038",description:"向vtdu保活取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105002",description:"设备验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130004",description:"终端绑定操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391001",description:"vtm地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107001",description:"邀请不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"149999",description:"数据异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391002",description:"vtm生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107002",description:"邀请验证失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"150000",description:"服务器异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391003",description:"vtm设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107003",description:"邀请用户不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160000",description:"设备不支持云台控制",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391004",description:"vtm设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107004",description:"云存储连接失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160001",description:"用户无云台控制权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391005",description:"vtm解析服务器ip失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"7005",description:"VTDU主动断开连接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107005",description:"VTDU主动断开连接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160002",description:"设备云台旋转达到上限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391006",description:"vtm描述符select失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107006",description:"不能邀请自己",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160003",description:"设备云台旋转达到下限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391007",description:"vtm文件描述符不在可读中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107007",description:"重复邀请",solution:"分享和删除分享必须全部由接口形式操作,如果与萤石客户端混用会造成这个问题,解决办法:在萤石客户端清空所有相关分享数据并重新添加设备,再通过接口操作即可",updateTime:152203484e4},{moduleCode:"",detailCode:"160004",description:"设备云台旋转达到左限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391008",description:"vtm网络发生错误getsockopt",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110001",description:"参数错误",solution:"参数为空或者格式不对",updateTime:152203484e4},{moduleCode:"",detailCode:"160005",description:"设备云台旋转达到右限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391009",description:"vtm描述符select超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110002",description:"accessToken异常或过期",solution:"accessToken有效期为七天,建议在accessToken即将过期或者出现10002错误码的时候重新获取accessToken",updateTime:152203484e4},{moduleCode:"",detailCode:"160006",description:"云台当前操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391101",description:"proxy地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110004",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160007",description:"预置点个数超过最大值",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391102",description:"proxy生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110005",description:"appKey异常",solution:"确认appKey状态,不通过或者冻结状态会返回该错误码",updateTime:152203484e4},{moduleCode:"",detailCode:"160009",description:"正在调用预置点",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391103",description:"proxy设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110006",description:"ip受限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160010",description:"该预置点已经是当前位置",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391104",description:"proxy设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160011",description:"预置点不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391105",description:"proxy解析服务器ip失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110008",description:"签名错误",solution:"①获取签名方式详见apidemo及[旧]API文档 ②注意编码格式为UTF-8",updateTime:152203484e4},{moduleCode:"",detailCode:"160013",description:"设备版本已是最新",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391106",description:"proxy描述符select失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110009",description:"签名参数错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160014",description:"设备正在升级",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391107",description:"proxy文件描述符不在可读中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110010",description:"签名超时",solution:"请调用同步服务器时间接口进行校时",updateTime:152203484e4},{moduleCode:"",detailCode:"160015",description:"设备正在重启",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391108",description:"proxy网络发生错误getsockopt",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110011",description:"未开通萤石云服务",solution:"参照绑定流程",updateTime:152203484e4},{moduleCode:"",detailCode:"160016",description:"加密未开启,无须关闭",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391109",description:"proxy描述符select超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110012",description:"第三方账户与萤石账号已经绑定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160017",description:"设备抓图失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391201",description:"vtdu地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110013",description:"应用没有权限调用此接口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160018",description:"设备升级失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391202",description:"vtdu生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110014",description:"APPKEY下对应的第三方userId和phone未绑定",solution:"获取AccessToken时所用appKey与SDK所用appKey不一致",updateTime:152203484e4},{moduleCode:"",detailCode:"160019",description:"加密已开启",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391203",description:"vtdu设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110017",description:"appKey不存在",solution:"请填写在官网申请的应用秘钥",updateTime:152203484e4},{moduleCode:"",detailCode:"160020",description:"不支持该命令",solution:"请确认设备是否支持该命令",updateTime:152203484e4},{moduleCode:"",detailCode:"391204",description:"vtdu设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110018",description:"AccessToken与Appkey不匹配",solution:"请检查获取accessToken对应的appKey和SDK中设置的appKey是否一致",updateTime:152203484e4},{moduleCode:"",detailCode:"160023",description:"订阅操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110019",description:"密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160024",description:"取消订阅操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110020",description:"请求方法为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160025",description:"客流统计配置失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110021",description:"ticket校验失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160026",description:"设备处于隐私遮蔽状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110022",description:"透传目的地非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160027",description:"设备正在镜像操作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110024",description:"无透传权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160028",description:"设备正在键控动作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110025",description:"appKey被禁止使用通明通道",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160029",description:"设备处于语音对讲状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160030",description:"卡密输入错误次数过多,24小时后再输入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160031",description:"卡密信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160032",description:"卡密状态不对或已过期",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160033",description:"卡密非卖品,只能开通对应的绑定设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110030",description:"appKey和appSecret不匹配",solution:"请检查appKey和appSecret是否对应",updateTime:152203484e4},{moduleCode:"",detailCode:"160035",description:"购买云存储服务失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110031",description:"子账户或萤石用户没有权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160040",description:"添加的设备不在同一局域网",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110032",description:"子账户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160041",description:"添加的设备被其他设备关联或响应超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110033",description:"子账户未设置授权策略",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160042",description:"添加的设备密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110034",description:"子账户已存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160043",description:"添加的设备超出最大数量",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110035",description:"获取子账户AccessToken异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160044",description:"添加的设备网络不可达超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110036",description:"子账户被禁用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160045",description:"添加的设备的IP和其他通道的IP冲突",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110051",description:"无权限进行抓图",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160046",description:"添加的设备的IP和本设备的IP冲突",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160047",description:"码流类型不支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120002",description:"设备不存在",solution:"①设备没有注册到萤石云平台,请检查下设备网络参数,确保能正常连接网络②设备序列号不存在",updateTime:152203484e4},{moduleCode:"",detailCode:"160048",description:"带宽超出系统接入带宽",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120003",description:"参数异常,SDK版本过低",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160049",description:"IP或者端口不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120004",description:"参数异常,SDK版本过低",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160050",description:"添加的设备版本不支持需要升级才能接入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120005",description:"安全认证失败,需进行SDK安全认证",solution:"已去掉安全验证",updateTime:152203484e4},{moduleCode:"",detailCode:"160051",description:"添加的设备不支持接入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120006",description:"网络异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160052",description:"添加的设备通道号出错",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120007",description:"设备不在线",solution:"参考服务中心排查方法",updateTime:152203484e4},{moduleCode:"",detailCode:"160053",description:"添加的设备分辨率不支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120008",description:"设备响应超时",solution:"设备响应超时,请检测设备网络或重试",updateTime:152203484e4},{moduleCode:"",detailCode:"160054",description:"添加的设备账号被锁定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120009",description:"子账号不能添加设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160055",description:"添加的设备取码流出错",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120010",description:"设备验证码错误",solution:"验证码在设备标签上,六位大写字母,注意大小写",updateTime:152203484e4},{moduleCode:"",detailCode:"160056",description:"删除设备失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120012",description:"设备添加失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160057",description:"删除的设备未关联",solution:"检查IPC与NVR是否有关联关系",updateTime:152203484e4},{moduleCode:"",detailCode:"120013",description:"设备已被别人添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160060",description:"地址未绑定",solution:"请前往官网设置直播",updateTime:152203484e4},{moduleCode:"",detailCode:"120014",description:"设备序列号不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160061",description:"账户流量已超出或未购买,限制开通",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120015",description:"设备不支持该功能",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160062",description:"该通道直播已开通",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120016",description:"当前设备正在格式化",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160063",description:"直播未使用或直播已关闭",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120017",description:"设备已被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160070",description:"设备不能转移给自己",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120018",description:"该用户不拥有该设备",solution:"确认设备是否属于用户",updateTime:152203484e4},{moduleCode:"",detailCode:"160071",description:"设备不能转移,设备与其他设备存在关联关系",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400001",description:"参数为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120019",description:"设备不支持云存储服务",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160072",description:"设备不能转移,通道被分享给其他用户或者分享到视频广场",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400002",description:"参数错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120020",description:"设备在线,被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160073",description:"云存储转移失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400025",description:"设备不支持对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120021",description:"设备在线,但是未被用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160080",description:"当前正在声源定位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400029",description:"没有初始化或资源被释放",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120022",description:"设备在线,但是已经被别的用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160081",description:"当前正在轨迹巡航",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400030",description:"json解析异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120023",description:"设备不在线,未被用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160082",description:"设备正在响应本次声源定位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400031",description:"网络异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120024",description:"设备不在线,但是已经被别的用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160083",description:"当前正在开启隐私遮蔽",solution:"设备正在操作隐私遮蔽,无法进行当前操作",updateTime:152203484e4},{moduleCode:"",detailCode:"400032",description:"设备信息异常为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120025",description:"重复申请分享",solution:"确认设备是否由添加过该设备且申请过分享的账户下是否还存在分享记录",updateTime:152203484e4},{moduleCode:"",detailCode:"160084",description:"当前正在关闭隐私遮蔽",solution:"设备正在操作隐私遮蔽,无法进行当前操作",updateTime:152203484e4},{moduleCode:"",detailCode:"400034",description:"取流超时",solution:"一般是由于网络状况不好导致,可以尝试下让用户重新播放",updateTime:152203484e4},{moduleCode:"",detailCode:"120026",description:"视频广场不存在该视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"380290",description:" 连接CAS服务器失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400035",description:"设备已加密,需要输入验证码",solution:"收到此错误码,需要让用户输入验证码后,调用EZPlayer.setPlayKey传入验证码,并重新调用播放函数",updateTime:152203484e4},{moduleCode:"",detailCode:"120027",description:"视频转码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361001",description:"对讲服务端排队超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400036",description:"播放验证码错误",solution:"收到此错误码,需要让用户输入验证码后,调用EZPlayer.setPlayKey传入验证码,并重新调用播放函数",updateTime:152203484e4},{moduleCode:"",detailCode:"120028",description:"设备固件升级包不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361002",description:"对讲服务端处理超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400037",description:"surfacehold错误",solution:"请检查是否是播放之前销毁了surface,收到此错误也可以重新建立surface后播放",updateTime:152203484e4},{moduleCode:"",detailCode:"120029",description:"设备不在线,但是已经被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361003",description:"设备链接对讲服务器超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400100",description:"未知错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120030",description:"该用户不拥有该视频广场视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361004",description:"服务器内部错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400200",description:"player sdk出错,这种错误一般开发者也是无法解决,不具体分类传出,传一个统一的inner错误码出去",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120031",description:"开启终端绑定,硬件特征码验证失败",solution:"请在萤石客户端关闭终端绑定,参考此步骤",updateTime:152203484e4},{moduleCode:"",detailCode:"361005",description:"解析消息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400300",description:"内存溢出",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120032",description:"该用户下通道不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361006",description:"请求重定向--需要向其他服务申请对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400901",description:"设备不在线,可以提示用户",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120033",description:"无法收藏自己分享的视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361007",description:"请求url非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400902",description:"accesstoken异常或失效,需要重新获取accesstoken,并传入到sdk",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120034",description:"该用户下无设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361008",description:"token失效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400903",description:"当前账号开启了终端绑定,只允许指定设备登录操作,提示用户登录i.ys7.com解除终端绑定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120090",description:"用户反馈失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361009",description:"设备验证码或者通信秘钥不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400904",description:"设备正在对讲中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120095",description:"APP包下载失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361010",description:"设备已经在对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400905",description:"设备开启了隐私保护,不允许预览、对讲等",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120096",description:"APP包信息删除失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361011",description:"设备10s响应超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120101",description:"视频不支持分享给本人",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361012",description:"设备不在线",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320002",description:"参数无效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120102",description:"无相应邀请信息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361013",description:"设备开启隐私保护拒绝对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320003",description:"暂不支持此操作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120103",description:"好友已存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361014",description:"token无权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320004",description:"内存溢出",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120104",description:"好友不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361015",description:"设备返回session不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320005",description:"创建CAS session失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120105",description:"好友状态错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361016",description:"验证token其他异常错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320006",description:"创建cloud session失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120106",description:"对应群组不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361017",description:"服务端监听设备建立端口超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320007",description:"token失效",solution:"重新设置token后再重试",updateTime:152203484e4},{moduleCode:"",detailCode:"120107",description:"不能添加自己为好友",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361018",description:"设备链路异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320008",description:"token池里面没有token,请传入token",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120108",description:"当前用户和所添加用户不是好友关系",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361019",description:"对讲服务端不支持的信令消息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320009",description:"传入新的INIT_PARAM并reset(保留,目前未用)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120109",description:"对应分享不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361020",description:"对讲服务端解析对讲请求未携带会话描述能力集",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320010",description:"请重试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120110",description:"好友群组不属于当前用户",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361021",description:"对讲服务端优先能力集结果为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320011",description:"500毫秒后请重试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120111",description:"好友不是等待验证状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361022",description:"cas链路异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320012",description:"token池已满",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120112",description:"添加应用下的用户为好友失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361023",description:"对讲服务端分配对讲会话资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320013",description:"P2P client超过限制",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120201",description:"操作报警信息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361024",description:"对讲服务端解析信令消息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320014",description:"sdk未初始化",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120202",description:"操作留言信息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390001",description:"通用错误返回",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320015",description:"超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120301",description:"根据UUID查询报警消息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390002",description:"入参为空指针",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320016",description:"正在打洞中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120302",description:"根据UUID查询图片不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390003",description:"入参值无效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320017",description:"没有视频文件头(播放器层面产生和处理此错误)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120303",description:"根据FID查询图片不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390004",description:"信令消息解析非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320018",description:"解码错误/超时(播放器层面产生和处理此错误)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120305",description:"设备ip解析错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390005",description:"内存资源不足",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320019",description:"取消(保留,用户不用处理)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120401",description:"用户云空间信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390006",description:"协议格式不对或者消息体长度超过STREAM_MAX_MSGBODY_LEN",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320020",description:"播放过程中预连接被用户清除预操作信息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120402",description:"云空间操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390007",description:"设备序列号长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320021",description:"流加密码不对",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120403",description:"用户目录不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390008",description:"取流url长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320022",description:"未传入播放窗口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120404",description:"要操作的目标目录不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390009",description:"解析vtm返回vtdu地址不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"100200",description:"操作成功",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120405",description:"要删除的文件信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390010",description:"解析vtm返回级联vtdu地址不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101001",description:"用户名不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120406",description:"已开通云存储",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390011",description:"解析vtm返回会话标识长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101002",description:"用户名已被占用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120407",description:"开通记录失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390012",description:"vtdu返回流头长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101003",description:"密码不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120500",description:"获取数据错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390013",description:"vtdu会话长度非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101004",description:"密码为同一字符",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120501",description:"开锁失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390014",description:"回调函数未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101006",description:"手机号码已经被注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120502",description:"室内机未收到呼叫",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390015",description:"vtdu成功响应未携带会话标识",solution:"",updateTime:152203484e4}],W="200",Y="操作成功!",Q={data:G,code:W,msg:Y},K=function(){function Z(H,w){i(this,Z),this.coreX=H,this.coreY=w,console.log("ErrorCode",Q)}return a(Z,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"matchErrorInfo",value:function(w){return Q.data.find(function(T){return T.detailCode.substr(-4)==w})}}]),Z}(),ae={color:"red",backgroundColor:"red",activeColor:"red",btnList:[{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-header-0",iconId:"deviceID",part:"left",defaultActive:1,isrender:1,themeId:"934f270c08b14e928bf0c2ae8e1a937d"},{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-header-1",iconId:"deviceName",part:"left",defaultActive:1,isrender:1,themeId:"934f270c08b14e928bf0c2ae8e1a937d"}]},ie={color:"blue",backgroundColor:"blue",activeColor:"blue",btnList:[{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-footer-0",iconId:"play",part:"left",defaultActive:0,isrender:0,themeId:"934f270c08b14e928bf0c2ae8e1a937d"}]},he={header:ae,footer:ie},Ee=function Z(H){this.jsPlugin=H;var w={isMouseDown:!1,isOver:!1,mousePosition:null,oldTime:null,nowTime:null,moved:null,hoverTime:"2018-12-07 12:00:00",hoverLeft:0,timeTipShow:!1,randomNum:123,timeWidthTbls:[60,1800,3600,86400],timeUnits:["范围: 1分钟; 单位: 秒","范围: 30分钟; 单位: 分钟","范围: 1小时; 单位: 分钟","范围: 1天; 单位: 小时","范围: 3天; 单位: 小时"],drawPen:null,timeSection:[],canvasWidth:null,canvasHeight:null,timeTips:null},T=this;Object.keys(w).forEach(function(R){T[R]=w[R]}),this.options={width:this.canvasWidth,height:48,time:new Date().getTime(),timeSection:[],timeWidth:0},Z.prototype.subTime=function(R){return R<10?"0"+R:R},Z.prototype.tranTime=function(R){var N=R;if(R){var z=new Date(R);N=z.getFullYear()+"/"+(z.getMonth()+1)+"/"+z.getDate()+" "+this.subTime(z.getHours())+":"+this.subTime(z.getMinutes())+":"+this.subTime(z.getSeconds())}return N},Z.prototype.init=function(R){R.width&&document.getElementById(R.id).setAttribute("width",parseInt(R.width,10)+"px");var N=this,z=this.options;N.randomNum=(Math.random()+"").split(".").join(""),N.timeWidthTblIndex=z.timeWidth;var U=document.querySelector("#".concat(this.jsPlugin.id,"-canvas"));N.drawPen=U.getContext("2d"),N.nowTime=z.time||Date.now(),N.timeSection=z.timeSection||[],N.canvasWidth=U.offsetWidth,N.canvasHeight=U.offsetHeight,N.updata(),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mousemove",function(ue){N.options.readOnly||N.mousemove(ue)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mouseover",function(ue){N.options.readOnly||N.mouseover(ue)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mouseleave",function(ue){N.options.readOnly||N.mouseleave(ue)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mousedown",function(ue){N.options.readOnly||N.mousedown(ue)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mouseup",function(ue){if(!N.options.readOnly){var pe=R.onChange;N.mouseUpFn(ue,pe)}})},Z.prototype.setWidth=function(R){var N=this,z=this;R.width&&(document.getElementById(this.jsPlugin.id).style.width=R.width,document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.width=R.width,document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.width=R.width,z.canvasWidth=R.width,setTimeout(function(){N.updata({time:new Date})},500))},Z.prototype.mousemove=function(R){if(this.isMouseDown&&this.isOver){var N=this.mousePosition-R.pageX;if(N===0)return;var z=0;switch(this.timeWidth){case 60:z=1/10;break;case 1800:z=1/20*60;break;case 3600:z=1/20*60;break;case 86400:z=1/30*60*60;break}var U=new Date(this.oldTime).getTime()+N*z*1e3;this.updata({time:U}),this.moved=!0}else{var ue=parseInt(document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).offsetLeft,10);this.mousePosition=R.pageX-ue,this.updata()}},Z.prototype.mousedown=function(R){this.isMouseDown=!0,this.mousePosition=R.pageX,this.oldTime=this.nowTime},Z.prototype.mouseover=function(R){this.isOver=!0},Z.prototype.mouseleave=function(R){this.isOver=!1,this.isMouseDown=!1,this.updata()},Z.prototype.changeSize=function(R){console.log("changeSize",R),this.options.timeWidth=R,this.updata({timeWidth:R})},Z.prototype.mouseUpFn=function(R,N){if(this.isMouseDown&&(this.isMouseDown=!1,this.moved)){this.moved=!1;var z=this.subTime(new Date(this.nowTime).getHours())+":"+this.subTime(new Date(this.nowTime).getMinutes())+":"+this.subTime(new Date(this.nowTime).getSeconds()),U=new Date(this.oldTime).getFullYear()+"/"+(new Date(this.oldTime).getMonth()+1)+"/"+new Date(this.oldTime).getDate();this.nowTime=new Date("".concat(U," ").concat(z)),this.updata({time:this.nowTime}),this.oldTime=this.nowTime,console.log("nowTime",new Date(this.nowTime),"".concat(U," ").concat(z)),N(this.nowTime)}},Z.prototype.readOnly=function(R){console.log("更改为只读"),this.options.readOnly=!0,document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.cursor="not-allowed"},Z.prototype.unReadOnly=function(R){console.log("更改为只读"),this.options.readOnly=!1,document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.cursor="pointer"},Z.prototype.run=function(R){this.isMouseDown||this.updata(R)},Z.prototype.getTime=function(R){console.log("this",this),console.log("当前时间",new Date(this.nowTime))},Z.prototype.updata=function(R){var N=this;R=R||{},N.nowTime=R.time||N.nowTime,N.timeSection=R.timeSection||N.timeSection,N.timeWidthTblIndex=R.timeWidth||N.timeWidthTblIndex,N.timeWidth=N.timeWidthTbls[R.timeWidth||N.timeWidthTblIndex],N.timeUnit=N.timeUnits[R.timeWidth||N.timeWidthTblIndex],R.timeWidth===0&&(N.timeWidthTblIndex=0,N.timeWidth=N.timeWidthTbls[0],N.timeUnit=N.timeUnits[0]),N.drawPen.fillStyle="#000000",N.drawPen.fillRect(0,0,N.canvasWidth,N.canvasHeight),N.drawScale(),N.drawRecord(),N.drawOtherMsg(),document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.width=N.options.width+"px",document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.width=N.options.width+"px",document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.height=N.options.height+"px",document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.height=N.options.height+"px"},Z.prototype.drawSolidLine=function(R,N,z,U,ue,pe){this.drawPen.save(),this.drawPen.strokeStyle=pe,this.drawPen.lineWidth=ue,this.drawPen.beginPath(),this.drawPen.moveTo(R,N),this.drawPen.lineTo(z,U),this.drawPen.stroke(),this.drawPen.restore()},Z.prototype.drawString=function(R,N,z,U,ue){this.drawPen.font="12px serif",this.drawPen.fillStyle="#ffffff",this.drawPen.textAlign=U||"left",this.drawPen.fillText(R,N,z+10)},Z.prototype.drawScale=function(){var R=this,N="rgba(255,255,255)",z=new Date(R.nowTime),U=z.getFullYear(),ue=z.getSeconds(),pe=z.getMinutes(),de=z.getHours(),se=z.getDate(),re=0;switch(R.timeWidth){case 60:{var Oe=parseInt(R.canvasWidth/10);z.setSeconds(z.getSeconds()-parseInt(Oe/2,10)),se=z.getDate(),de=z.getHours(),pe=z.getMinutes(),ue=z.getSeconds();for(var be=0;be<Oe;be++){if(re=ue+be,z.setSeconds(re),re%10===0){R.drawSolidLine(be*R.canvasWidth/Oe,8,be*R.canvasWidth/Oe,R.canvasHeight/5+8,1,N);var me=this.subTime(z.getHours())+":"+this.subTime(z.getMinutes())+":"+this.subTime(z.getSeconds());R.drawString(me,be*R.canvasWidth/Oe,R.canvasHeight/5*2.5,"center","rgba(255,255,255,0.3)")}else R.drawSolidLine(be*R.canvasWidth/Oe,8,be*R.canvasWidth/Oe,R.canvasHeight/5*.5+8,1,N);z.setDate(se),z.setHours(de),z.setMinutes(pe)}break}case 1800:{var Oe=parseInt(R.canvasWidth/20);z.setMinutes(z.getMinutes()-parseInt(Oe/2,10)),de=z.getHours(),pe=z.getMinutes();for(var be=0;be<=Oe;be++){if(re=pe+be,z.setMinutes(re),re%5===0){R.drawSolidLine(be*R.canvasWidth/Oe,8,be*R.canvasWidth/Oe,R.canvasHeight/5*1.5+8,1,N);var me=this.subTime(z.getHours())+":"+this.subTime(z.getMinutes());R.drawString(me,be*R.canvasWidth/Oe,R.canvasHeight/5*2.5,"center","rgba(255,255,255,0.3)")}else R.drawSolidLine(be*R.canvasWidth/Oe,8,be*R.canvasWidth/Oe,R.canvasHeight/5*.5+8,1,N);z.setHours(de)}break}case 3600:{var Oe=parseInt(R.canvasWidth/20);z.setMinutes(z.getMinutes()-parseInt(Oe/2,10)),de=z.getHours(),pe=z.getMinutes();for(var be=0;be<=Oe;be++){if(re=pe+be,z.setMinutes(re),re%10===0){R.drawSolidLine(be*R.canvasWidth/Oe,8,be*R.canvasWidth/Oe,R.canvasHeight/5*1.5+8,1,N);var me=this.subTime(z.getHours())+":"+this.subTime(z.getMinutes());R.drawString(me,be*R.canvasWidth/Oe,R.canvasHeight/5*2.5,"center","rgba(255,255,255,0.3)")}else R.drawSolidLine(be*R.canvasWidth/Oe,8,be*R.canvasWidth/Oe,R.canvasHeight/5*.5+8,1,N);z.setHours(de)}break}case 86400:{var Oe=parseInt(R.canvasWidth/30);z.setHours(z.getHours()-parseInt(Oe/2,10)),ue=z.getSeconds(),pe=z.getMinutes(),de=z.getHours(),se=z.getDate(),U=z.getFullYear();for(var be=0;be<=Oe;be++){re=de+be,z.setHours(re);var me;me=this.subTime(z.getHours())+":00",R.drawSolidLine(be*R.canvasWidth/Oe,8,be*R.canvasWidth/Oe,R.canvasHeight/5*.5+8,1,N),re%2===0&&R.drawString(me,be*R.canvasWidth/Oe,R.canvasHeight/5*2,"center","rgba(255,255,255,0.3)"),z.setFullYear(U),z.setDate(se),z.setHours(de)}break}}},Z.prototype.getRecord=function(R,N,z){this.timeSection=R,this.drawRecord()},Z.prototype.drawRecord=function(){for(var R=this.timeSection||[],N=this,z=N.drawPen,U=0;U<R.length;U++){var ue=de(R[U].startTime),pe=de(R[U].endTime);z.fillStyle="#1890ff80",z.fillRect(ue,0,pe-ue,48)}function de(se){var re=10;switch(N.timeWidth){case 60:re=10;break;case 1800:re=20/60;break;case 3600:re=20/60;break;case 86400:re=20/60/60;break}var Oe=N.canvasWidth/2,be=Oe+(se-N.nowTime)/1e3*re;return be>N.canvasWidth&&(be=N.canvasWidth),be<=0&&(be=0),be}},Z.prototype.drawOtherMsg=function(){this.drawSolidLine(this.canvasWidth/2,0,this.canvasWidth/2,this.canvasHeight,2,"#1890FF"),this.drawPen.shadowBlur=0,this.isOver&&!this.isMouseDown?(this.mouseTime=this.mousePosition/this.canvasWidth*this.timeWidth*1e3+this.nowTime-this.timeWidth/2*1e3,this.mouseString=this.tranTime(this.mouseTime),this.hoverTime=this.mouseString,this.hoverLeft=this.mousePosition-60,this.timeTipShow=!0):this.timeTipShow=!1}},He=function(){function Z(H){if(i(this,Z),this.jSPlugin=H,!document.getElementById("".concat(this.jSPlugin.id,"-audioControls")))return!1;this.currentTimeWidth=0,this.date=new Date,this.datepickerVisible=!1,this.seekTimer=null,this.disabled=!1,this.seekFrequency=2e3,this.jSPlugin.params&&this.jSPlugin.params.seekFrequency&&(this.seekFrequency=this.jSPlugin.params.seekFrequency),this.recInit()}return a(Z,[{key:"recInit",value:function(){var w=this;this.currentTimeWidth=0;var T=parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).width,10)-100,R=document.createElement("div");R.style="display:inline-block;height:48px;",R.id=this.jSPlugin.id+"-canvas-container";var N=document.createElement("canvas");N.id=this.jSPlugin.id+"-canvas",N.className="time-line-body",N.height="48",N.width=T,N.style="display:inline-block;",N.innerHTML="该浏览器不支持canvas",R.appendChild(N),h(R,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")));var z=document.createElement("div");z.className="timeline-controls",z.style="display:flex;width:100px;height:48px;text-align:center;line-height: 48px;vertical-align: top;background: #000000;";var U=`
<div class="timeline-controls-scale" style="display: inline-flex;flex-direction: column;justify-content: center;vertical-align: top;padding: 0 20px;">
<span style="vertical-Align: middle;line-height: 14px;height: 18px; width: 18px;cursor:pointer;" id="`.concat(this.jSPlugin.id,`-timeline-scale-add">
<svg fill="#2C2C2C" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20"
viewBox="0 0 20 20">
<title>add</title>
<g>
<polygon points="0.1,0.5 15,0.5 15,15.4 0.1,15.4 " />
</g>
<g>
<path
fill="#FFFFFF";
d="M7.6,12.4c-0.3,0-0.5-0.2-0.5-0.5v-8c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v8C8.1,12.2,7.9,12.4,7.6,12.4z" />
</g>
<g>
<path
fill="#FFFFFF";
d="M11.6,8.4h-8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h8c0.3,0,0.5,0.2,0.5,0.5S11.8,8.4,11.6,8.4z" />
</g>
</svg>
</span>
<span style="vertical-Align: middle;line-height: 14px;height: 18px; width: 18px;cursor:pointer;" id="`).concat(this.jSPlugin.id,`-timeline-scale-sub">
<svg fill="#2C2C2C" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20"
viewBox="0 0 20 20">
<title>reduce</title>
<g>
<polygon class="st0" points="1,0.8 15.2,0.8 15.2,15 1,15 " />
</g>
<g>
<path class="st1"
fill="#FFFFFF";
d="M12.1,8.4h-8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h8c0.3,0,0.5,0.2,0.5,0.5S12.4,8.4,12.1,8.4z" />
</g>
</svg>
</span>
</div>
<label for="`).concat(this.jSPlugin.id,`-datepicker">
<div class="timeline-controls-date">
<span>
<svg fill="#2C2C2C" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20"
viewBox="0 0 20 20">
<title>ifttt</title>
<g id="Rectangle">
<rect x="0.6" y="0.9" class="st0" width="20" height="20" />
</g>
<g id="Stroke-1">
<path fill="#FFFFFF"; class="st1"
d="M14,7.2c-0.3,0-0.5-0.2-0.5-0.5V3.4c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v3.3C14.5,7,14.2,7.2,14,7.2z" />
</g>
<g id="Stroke-3">
<path fill="#FFFFFF"; class="st1"
d="M7.3,7.2C7,7.2,6.8,7,6.8,6.7V3.4c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v3.3C7.8,7,7.6,7.2,7.3,7.2z" />
</g>
<g id="Stroke-5">
<path fill="#FFFFFF"; class="st1"
d="M18.1,9.7h-15c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h15c0.3,0,0.5,0.2,0.5,0.5S18.4,9.7,18.1,9.7z" />
</g>
<g id="Stroke-7">
<path fill="#FFFFFF"; class="st1" d="M16.5,19.7H4.8c-1.2,0-2.2-1-2.2-2.2V6.7c0-1.2,1-2.2,2.2-2.2h11.7c1.2,0,2.2,1,2.2,2.2v10.8
C18.6,18.8,17.7,19.7,16.5,19.7z M4.8,5.6c-0.6,0-1.2,0.5-1.2,1.2v10.8c0,0.6,0.5,1.2,1.2,1.2h11.7c0.6,0,1.2-0.5,1.2-1.2V6.7
c0-0.6-0.5-1.2-1.2-1.2H4.8z" />
</g>
<g id="Stroke-9">
<path fill="#FFFFFF"; class="st1" d="M10.6,13.3c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5s0.3-0.2,0.5-0.2h0h0c0.4,0,0.7,0.3,0.7,0.7
S11,13.3,10.6,13.3z" />
</g>
<g id="Stroke-11">
<path fill="#FFFFFF"; class="st1" d="M14.8,13.3c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5c0.1-0.1,0.3-0.2,0.5-0.2c0.4,0,0.7,0.3,0.7,0.7
S15.2,13.3,14.8,13.3z M14.8,12.3c-0.2,0-0.3,0.1-0.3,0.3c0,0.2,0.3,0.4,0.5,0.2c0.1-0.1,0.1-0.1,0.1-0.2
C15.1,12.4,15,12.3,14.8,12.3z" />
</g>
<g id="Stroke-13">
<path fill="#FFFFFF"; class="st1" d="M6.5,16.6c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5c0.1-0.1,0.3-0.2,0.5-0.2h0h0c0.4,0,0.7,0.3,0.7,0.7
C7.2,16.3,6.9,16.6,6.5,16.6z" />
</g>
<g id="Stroke-15">
<path fill="#FFFFFF"; class="st1" d="M10.6,16.6c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5c0.1-0.1,0.3-0.2,0.5-0.2h0h0c0.4,0,0.7,0.3,0.7,0.7
C11.4,16.3,11,16.6,10.6,16.6z" />
</g>
</svg>
</span>
</div>
</label>
<input autocomplete="off" data-toggle="`).concat(this.jSPlugin.id,'-datepicker" id="').concat(this.jSPlugin.id,'-datepicker" name="').concat(this.jSPlugin.id,`-datepicker" style="opacity:0;width:24px;margin-left:-24px;cursor:pointer;" />
`);z.innerHTML=U,h(z,R),this.timeLine=new Ee(this.jSPlugin),this.timeLine.init({id:this.jSPlugin.id+"-canvas",width:T,onChange:function(re){console.log("time",re,new Date(re).Format("yyyyMMddhhmmss"));var Oe=new Date(re).Format("yyyyMMddhhmmss");if(console.log("----------------this.jSPlugin.url",w.jSPlugin.url),S(w.jSPlugin.url).type==="cloud.rec"||w.jSPlugin.capacity&&w.jSPlugin.capacity.support_seek_playback=="1"){var be=function(){w.jSPlugin.seek(Oe.substr(8,6),"235959"),w.unSyncTimeLine(),setTimeout(function(){w.syncTimeLine()},6e3)};w.seekTimer?clearTimeout(w.seekTimer):be(),w.seekTimer=setTimeout(function(){be(),clearTimeout(w.seekTimer),w.seekTimer=null},w.seekFrequency)}else{var me=function(){setTimeout(function(){w.disabled=!1},w.seekFrequency)},ge=function(fe){w.disabled=!0,w.jSPlugin.pause().then(function(){console.log("暂停成功"),w.jSPlugin.resume(Oe).then(function(B){console.log("恢复成功:",B),w.jSPlugin.Theme&&w.jSPlugin.Theme.setDecoderState({play:!0}),w.jSPlugin.Theme&&w.jSPlugin.Theme.decoderState.state.sound&&w.jSPlugin.openSound(),fe&&fe()}).catch(function(B){console.log("恢复失败",B)})}).catch(function(){console.log("暂停失败"),w.jSPlugin.resume(Oe).then(function(B){console.log("恢复成功"),w.jSPlugin.Theme&&w.jSPlugin.Theme.setDecoderState({play:!0}),fe&&fe()}).catch(function(B){console.log("恢复失败",B)})})};w.disabled?(console.log("操作频繁,等待2秒后执行"),w.seekTimer&&clearTimeout(w.seekTimer),w.seekTimer=setTimeout(function(){ge(me)},w.seekFrequency)):ge(me)}}}),this.syncTimeLine(),u("".concat(this.jSPlugin.staticPath,"/rec/datepicker.min.css")),l("".concat(this.jSPlugin.staticPath,"/rec/jquery.min.js"),function(){l("".concat(w.jSPlugin.staticPath,"/rec/datepicker.js"),function(){l("".concat(w.jSPlugin.staticPath,"/rec/datepicker.zh-CN.js"),function(){!document.getElementsByClassName("datepicker-container")[0]&&$("#".concat(w.jSPlugin.id,"-datepicker")).datepicker&&$("#".concat(w.jSPlugin.id,"-datepicker")).datepicker({autoShow:!1,autoHide:!0,autoPick:!0,language:"zh-CN",date:new Date(d("begin",w.jSPlugin.params.url).replace(/(\d{4})(\d{2})(\d{2})/,"$1-$2-$3"))||new Date,format:"yyyy-mm-dd",endDate:new Date,inline:!0,container:document.getElementById("".concat(w.jSPlugin.id,"-wrap"))}),document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"),w.datepickerVisible=!1,$("#".concat(w.jSPlugin.id,"-datepicker")).on("pick.datepicker",function(se){console.log("重新选择日期",se.date,new Date(se.date).Format("yyyyMMdd"),new Date(document.getElementById("".concat(w.jSPlugin.id,"-datepicker")).value).Format("yyyyMMdd")),se.date>new Date||new Date(se.date).Format("yyyyMMdd")===new Date(document.getElementById("".concat(w.jSPlugin.id,"-datepicker")).value).Format("yyyyMMdd")?se.preventDefault():(document.getElementById("".concat(w.jSPlugin.id,"-datepicker")).value=new Date(se.date).Format("yyyy-MM-dd"),w.renderRec(se.date),w.jSPlugin.decoderState&&w.jSPlugin.decoderState.state?w.jSPlugin.decoderState.state.cloudRec?w.jSPlugin.changePlayUrl({begin:new Date(se.date).Format("yyyyMMdd"),type:"cloud.rec"}):w.jSPlugin.decoderState.state.rec?w.jSPlugin.changePlayUrl({begin:new Date(se.date).Format("yyyyMMdd"),type:"rec"}):w.jSPlugin.changePlayUrl({begin:new Date(se.date).Format("yyyyMMdd")}):w.jSPlugin.changePlayUrl({begin:new Date(se.date).Format("yyyyMMdd")})),document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"),w.datepickerVisible=!1,w.jSPlugin.decoderState&&w.jSPlugin.decoderState&&w.jSPlugin.decoderState.state&&w.jSPlugin.decoderState.state.zoom&&(w.jSPlugin.setDecoderState({zoom:!1}),w.jSPlugin.Zoom.stopZoom())}),$("#".concat(w.jSPlugin.id,"-datepicker")).off("click").on("click",function(se){console.log("点击日期"),w.datepickerVisible?document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"):document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="inline"),w.datepickerVisible=!w.datepickerVisible})})})}),document.getElementById("".concat(this.jSPlugin.id,"-timeline-scale-add")).onclick=function(){var se=w.currentTimeWidth;se<3&&w.timeLine.changeSize(++w.currentTimeWidth)},document.getElementById("".concat(this.jSPlugin.id,"-timeline-scale-sub")).onclick=function(){var se=w.currentTimeWidth;se>0&&w.timeLine.changeSize(--w.currentTimeWidth)};var ue=d("begin",this.jSPlugin.url)||new Date().Format("yyyyMMdd");this.renderRec("".concat(ue.slice(0,4),"-").concat(ue.slice(4,6),"-").concat(ue.slice(6,8))),this.observer=new MutationObserver(function(se,re){w.recAutoSize()});var pe={attributes:!0,attributeOldValue:!0,attributeFilter:["style"]},de=document.getElementById("".concat(this.jSPlugin.id));this.observer.observe(de,pe)}},{key:"setDatepickerDate",value:function(w){if(document.getElementsByClassName("datepicker-container")[0]){var T=document.getElementsByClassName("datepicker-container")[0],R=T.parentNode;R.removeChild(T),document.getElementById("".concat(this.jSPlugin.id,"-datepicker")).value=w.replace(/(\d{4})(\d{2})(\d{2})/,"$1-$2-$3"),$("#".concat(this.jSPlugin.id,"-datepicker")).datepicker({autoShow:!1,autoHide:!0,autoPick:!0,language:"zh-CN",defaultDate:w,format:"yyyy-mm-dd",endDate:new Date,inline:!0,container:document.getElementById("".concat(this.jSPlugin.id,"-wrap"))})}}},{key:"datepickerHide",value:function(){document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"),this.datepickerVisible=!1}},{key:"datepickerShow",value:function(){document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="inline"),this.datepickerVisible=!0}},{key:"recAutoSize",value:function(){var w=this;if(document.getElementById("".concat(this.jSPlugin.id,"-canvas"))){var T=parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).width,10)-100;T!==parseInt(document.getElementById("".concat(this.jSPlugin.id,"-canvas")).width)&&(document.getElementById("".concat(this.jSPlugin.id,"-canvas")).width=T,this.timeLine.init({id:"".concat(this.jSPlugin.id,"-canvas"),width:T,onChange:function(N){console.log("time",N,new Date(N).Format("yyyyMMddhhmmss")),console.log("jSPlugin",w.jSPlugin);var z=new Date(N).Format("yyyyMMddhhmmss");w.jSPlugin.changePlayUrl({begin:z})}}),this.renderRec(this.date),this.syncTimeLine())}}},{key:"syncTimeLine",value:function(){var w=this;this.jSPlugin.recTimer&&clearInterval(this.jSPlugin.recTimer),this.jSPlugin.recTimer=setInterval(function(){var T=w.jSPlugin.getOSDTime();T.then(function(R){var N=R.data;N===-1?console.log("获取播放时间错误"):N>0&&w.timeLine.run({time:new Date(N>1e12?N:N*1e3)})}).catch(function(R){})},1e3)}},{key:"unSyncTimeLine",value:function(){this.jSPlugin.recTimer&&clearInterval(this.jSPlugin.recTimer)}},{key:"renderRec",value:function(w){var T=this;this.date=w;var R=this,N=new Date(new Date(w).Format("yyyy-MM-dd 00:00:00").replace(/-/g,"/")).getTime(),z=new Date(new Date(w).Format("yyyy-MM-dd 23:59:59").replace(/-/g,"/")).getTime();this.timeLine.getRecord([],N,z),console.log("-----------233---------this.jSPlugin.url",this.jSPlugin.url);var U={accessToken:this.jSPlugin.accessToken,recType:S(this.jSPlugin.url).type==="cloud.rec"?1:2,deviceSerial:S(this.jSPlugin.url).deviceSerial,channelNo:S(this.jSPlugin.url).channelNo,startTime:N,endTime:z,version:"2.0"},ue=function(se){if(se.data&&se.data.files&&se.data.files.length>0){var re=se.data.files,Oe=new Date().getTime(),be=se.data.isAll;if(be)T.timeLine.getRecord(re,N,z);else{var me=function ge(){function Ze(fe){fe.data&&fe.data.files&&fe.data.files.length>0?fe.data.isAll==!1?(fe.data.files&&(re=re.concat(fe.data.files)),Oe=fe.data.nextFileTime>0?fe.data.nextFileTime:new Date().getTime(),ge()):(console.log("云存储执行渲染片段"),R.timeLine.getRecord(re,N,z)):R.timeLine.getRecord(re,N,z)}U.startTime=Oe,A(this.jSPlugin.env.domain+"/api/lapp/video/by/time","POST",U,"",Ze)};me()}T.timeLine.run({time:new Date(N)})}else se.data&&se.data.length>0&&(console.log("获取本地录像片段成功",se),R.timeLine.getRecord(se.data,N,z),R.timeLine.run({time:new Date(N)}))},pe=this.jSPlugin.env.domain+"/api/lapp/video/by/time";A(pe,"POST",U,"",ue)}}]),Z}(),xe=function(H){console.log("执行TimeLine - params",H),this.state={id:H.id,start:"00:00:00",end:"24:00:00",current:0,timelag:30,timeArr:[],availTimeLine:[],scrollTop:0,index:0,date:"",noTimeLineTxt:"",disabled:!1};var w=this;this.setState=function(T){Object.keys(T).forEach(function(R){w.state[R]=T[R],R==="scrollTop"&&document.getElementById("time-line-item").parentNode.scrollTo(0,T[R]),R==="current"&&(document.getElementById("time-line-current").innerHTML=T[R])})},this.setDisabled=function(T){this.setState({disabled:T}),document.getElementById("time-line-item").parentNode.style.overflowY=T?"hidden":"scroll"},this.timeToSecond=function(T){var R=T.split(":"),N=Number(R[0]),z=Number(R[1]),U=Number(R[2]);return N*60*60+z*60+(U||0)},this.minuteToTime=function(T){var R=Math.floor(T/60),N=T%60;return(R>9?R:"0"+R)+":"+(N>9?N:"0"+N)},this.timeToMinute=function(T){var R=T.split(":"),N=Number(R[0]),z=Number(R[1]);return N*60+z},this.getPalyParam=H.getPalyParam,document.getElementById("time-line-item").parentNode.ontouchstart=function(){if(w.state.disabled)return!1;H.ontouchstart()},document.getElementById("time-line-item").parentNode.ontouchmove=function(){if(w.state.disabled)return!1;H.ontouchmove()},document.getElementById("time-line-item").parentNode.ontouchend=function(){if(w.state.disabled)return!1;var T,R=new Promise(function(N,z){var U=-1;T=setInterval(function(){var ue=document.getElementById("time-line-item").parentNode.scrollTop;ue!==U?(console.log("scolling",ue,U),U=ue):(console.log("scoll stop",ue,U),clearInterval(T),N(ue))},100)});R.then(function(N){console.log("scollPromise: then",N,w),w.rectTopTotime(N),console.log("页面滚动实际高度",N,w.state),w.getPalyParam({current:w.state.current})}),H.ontouchend()},this.matchTimeDot()};xe.prototype.changeScale=function(Z){this.setState({timelag:Z}),this.matchTimeDot()},xe.prototype.setDateLine=function(Z,H){Z.length>0?(typeof H=="undefined"&&(H=Z.length-1),this.setState({availTimeLine:Z,start:Z[H].st,end:Z[H].et,current:Z[H].st}),console.log("this.state",this.state),this.matchRecTimeDot(),this.primaryOffsetH()):(this.setState({availTimeLine:[]}),console.log("this.state",this.state),this.matchRecTimeDot())},xe.prototype.matchTimeDot=function(){var Z=this.state,H=Z.start,w=Z.end,T=Z.timelag;Z.availTimeLine,console.log("start",H,"end",w);var R=[],N=this.timeToMinute(w);N=Math.floor(N/T)*T;for(var z=N;z>=0;){var U=0,ue=0,pe=[];z==N&&(U=70),z==0&&(ue=230);var de=this.minuteToTime(z);R.push({id:z,current:de,label:"a"+z,marginTop:U,marginBottom:ue,recArr:pe}),z=z-T}this.setState({timeArr:R}),this.renderDateLine()},xe.prototype.matchRecTimeDot=function(){var Z=this.state,H=Z.start,w=Z.end,T=Z.timelag,R=Z.availTimeLine,N=Z.timeArr;console.log("start",H,"end",w);var z=[],U=R.length;if(U===0)for(var ue=0;ue<N.length;ue++)N[ue].recArr=[];else{for(var pe=0;pe<N.length;pe++)N[pe].recArr=[];for(var de=0;de<U;de++){var se=R[de],re=this.timeToSecond(se.st),Oe=this.timeToSecond(se.et),be=void 0,me=void 0,ge=0,Ze=0;be=Math.floor(re/(T*60))*T,ge=(re-be*60)/T,me=Math.floor(Oe/(T*60))*T,Ze=(Oe-me*60)/T,z[de]={st:be,et:me,stAvailPercent:ge,etAvailPercent:Ze};for(var ue=0;ue<N.length;ue++)if(N[ue].id==be&&N[ue].id==me){var fe=Ze-ge,B=60-Ze;N[ue].recArr.push({height:fe,top:B})}else N[ue].id==be?N[ue].recArr.push({height:60-ge,top:0}):N[ue].id==me?N[ue].recArr.push({height:Ze,top:60-Ze}):N[ue].id>be&&N[ue].id<me&&N[ue].recArr.push({height:60,top:0})}}console.log("availArr: ",z),this.setState({timeArr:N}),console.log("timeArr:",this.state),this.renderDateLine()},xe.prototype.renderDateLine=function(){var Z=this.state,H=Z.id,w=Z.timeArr;console.log("id,timeArr",H,w);var T=document.getElementById("time-line-item");T.innerHTML="",w.forEach(function(R,N){var z=document.createElement("div");z.setAttribute("class","time-item"),z.style="margin-top: ".concat(R.marginTop,"px; margin-bottom: ").concat(R.marginBottom,"px; border-right-color: ").concat(R.borderColor,";");var U=document.createElement("div");U.setAttribute("class","scale");var ue='<div class="scale"></div><div class="scale"></div><div class="scale"></div><div class="scale"></div><div class="scale"></div><div class="scale" style="width:10px"></div>';R.recArr.forEach(function(pe,de){ue+='<div class="item-unavail" style="height: '.concat(pe.height,"px;background-color:#A8B9ED; top: ").concat(pe.top,'px"></div>')}),ue+="<div id=".concat(R.label,' style="position: relative; top: 51px; left: 40%"> ').concat(R.current,"</div>"),z.innerHTML=ue,T.appendChild(z)})},xe.prototype.primaryOffsetH=function(){var Z=this.state,H=Z.start,w=Z.timelag,T=Z.timeArr,R=T[0].current,N=this.timeToSecond(R),z=this.timeToSecond(H),U=N-z,ue=Math.ceil(U/w)+60;this.setState({scrollTop:ue}),console.log("起始偏移量",ue)},xe.prototype.currentOffsetH=function(){var Z=this.state,H=Z.current,w=Z.timelag,T=Z.timeArr,R=T[0].current,N=this.timeToSecond(R),z=this.timeToSecond(H),U=N-z,ue=Math.ceil(U/w)+60;this.setState({scrollTop:ue})},xe.prototype.rectTopTotime=function(Z){var H=this.state.timelag,w=Math.floor(Z/60),T=Z-w*60,R,N;if(console.log("index:",w,"offsetH:",T),T==0)R=this.state.timeArr[w-1].current,N=0;else{var z=this.state.timeArr[w].current,U=this.timeToMinute(z),ue=60-T,pe=ue*H,de=Math.floor(pe/60)+U,se=Math.floor(pe/60)*60;N=Math.ceil(pe-se),R=this.minuteToTime(de)}this.setState({current:R+":"+(N>9?N:"0"+N),scrollTop:Z})},xe.prototype.stepScrollTimeLine=function(Z){this.setState({current:Z}),this.currentOffsetH()},xe.prototype.secondCountDown=function(Z){var H=this.state.current,w=H.split(":"),T=Number(w[0]),R=Number(w[1]),N=Number(w[2]),z=T*60*60+R*60+N+1,U=Math.floor(z/3600),ue=Math.floor((z-U*3600)/60),pe=z-U*3600-ue*60;this.setState({current:(U>9?U:"0"+U)+":"+(ue>9?ue:"0"+ue)+":"+(pe>9?pe:"0"+pe)})};var Fe=xe;Date.prototype.Format=function(Z){var H={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(Z)&&(Z=Z.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var w in H)new RegExp("("+w+")").test(Z)&&(Z=Z.replace(RegExp.$1,RegExp.$1.length==1?H[w]:("00"+H[w]).substr((""+H[w]).length)));return Z};function pt(Z){var H=new Date(Z),w=H.getHours(),T=H.getMinutes(),R=H.getSeconds();return(w>9?w:"0"+w)+":"+(T>9?T:"0"+T)+":"+(R>9?R:"0"+R)}var Ot=function(){function Z(H,w,T){var R=this;i(this,Z),this.changeRecSpeed=w,this.resetMobileZoomStatus=T,this.isMobile=!0,this.jSPlugin=H,this.timer=null,this.date=new Date().Format("yyyy-MM-dd"),this.begin=(new Date().Format("yyyy-MM-dd")+" 00:00:00").replace(/-/g,"/"),this.end=(new Date().Format("yyyy-MM-dd")+" 23:59:59").replace(/-/g,"/"),this.initBegin=null,this.initEnd=null,this.type=S(this.jSPlugin.url).type,this.operating=!1,this.seekTimer=null,this.disabled=!1,this.seekFrequency=2e3,this.jSPlugin.params&&this.jSPlugin.params.seekFrequency&&(this.seekFrequency=this.jSPlugin.params.seekFrequency);var N=document.createElement("style");if(N.innerHTML=`
body{
padding: 0;
margin: 0;
}
.time-line-container {
text-align: left;
height: 300px;
/* outline: 1px solid red; */
/* background: gray; */
position: relative;
/* padding-top: 60px; */
margin-top: 20px;
}
.time-line-container .time-line-item-container {
display: inline-block;
/* height: 400px; */
width: 30%;
/* background: indianred; */
overflow-y: scroll;
overflow-x: hidden;
/* padding-top: 60px; */
height: 300px;
box-sizing: border-box;
white-space: nowrap;
position: relative;
}
.time-line-container .time-line-item-container::-webkit-scrollbar {
width: 0px;
/*滚动条宽度*/
height: 0px;
/*滚动条高度*/
}
.time-line-item .time-item {
position: relative;
box-sizing: border-box;
height: 60px;
font-size: 12px;
color: rgb(150, 150, 150);
border-right: 6px solid;
border-right-color: #ddd;
}
.time-line-item .time-item .scale {
width: 6px;
height: 9px;
border-bottom: 1px solid #ccc;
float: right;
clear: both;
}
.time-line-item .time-item .item-unavail {
width: 6px;
position: absolute;
left: 100%;
background-color: #ddd;
}
.time-line-container .current-time {
position: absolute;
left: 0;
top: 40px;
height: 29px;
/* line-height: 58px; */
border-bottom: 1px solid #648FFC;
width: 60%;
margin-left: 26%;
}
.time-line-container .current-time .current-time-bg {
position: relative;
top: 15px;
width: 100px;
height: 29px;
line-height: 29px;
left: -70px;
font-size: 12px;
color: #2C2C2C;
}
.time-line-container .current-time .current-time-bg::before {
content: '';
display: inline-block;
width: 6px;
height: 6px;
border-radius: 100%;
background: #648FFC;
top: 11px;
position: absolute;
right: 30px;
}
.date-switch-container {
height: 40px;
position: relative;
text-align: center;
margin: 20px 10px;
}
.date-switch-container .current-date {
line-height: 40px;
height: 22px;
font-size: 16px;
color: #2C2C2C;
text-align: center;
font-weight: bold;
}
.date-container {
width: 40px;
height: 40px;
position: absolute;
right: 0;
top: 0;
}
.rec-type-container {
display: flex;
justify-content: space-between;
}
.rec-type-container .rec-type-text {
padding: 0 15px;
font-size: 12px;
color: #2C2C2C;
}
.rec-type-container .rec-type-switch {
padding: 0 20px;
}
.date-container input {
position: absolute;
opacity: 0;
display: inline-block;
width: 40px;
height: 40px;
z-index: 10;
left: 0;
}
.date-container label {
position: absolute;
left: 0;
top: 0;
/* display: none; */
z-index: 0;
}
.date-icon {
display: inline-block;
width: 40px;
height: 40px;
background: url('https://resource.eziot.com/group2/M00/00/6A/CtwQF2F6VieAQrU9AAABP-_Nsqo949.png') no-repeat 100% 100%;
}
.select-container {
padding: 10px;
display: flex;
justify-content: space-between;
}
.advice {
height: 24px;
width: 70px;
display: flex;
justify-content: space-between;
line-height: 24px;
background: #F8F8F8;
border-radius: 8px;
}
.advice span {
width: 40px;
display: inline-block;
}
input[type="checkbox"]:not(:checked)+.advice span:first-child {
box-shadow: 0px 2px 5px 0px rgb(23 45 101 / 20%);
border-radius: 8px;
text-align: center;
}
input[type="checkbox"]:checked+.advice span:last-child {
box-shadow: 0px 2px 5px 0px rgb(23 45 101 / 20%);
border-radius: 8px;
text-align: center;
}
input[type="checkbox"]:not(:checked)+.advice span:first-child svg {
fill: #648FFC !important;
}
input[type="checkbox"]:checked+.advice span:last-child svg {
fill: #648FFC !important;
}`,document.getElementsByTagName("head")[0].appendChild(N),d("begin",this.jSPlugin.url)){var z=d("begin",this.jSPlugin.url);this.date=z.slice(0,4)+"/"+z.slice(4,6)+"/"+z.slice(6,8),this.begin=this.date+" ".concat(z.slice(8,10)||"00",":").concat(z.slice(10,12)||"00",":").concat(z.slice(12,14)||"00"),this.end=this.date+" 23:59:59",this.initBegin=this.begin}if(d("end",this.jSPlugin.url)){var U=d("end",this.jSPlugin.url);this.end=this.date+" ".concat(U.slice(8,10)||"23",":").concat(U.slice(10,12)||"59",":").concat(U.slice(12,14)||"59"),this.initEnd=this.end}var ue=document.createElement("div");ue.id="date-switch-container-wrap",ue.className="date-switch-container-wrap",ue.style="",ue.innerHTML=`
<div class="date-switch-container">
<div class="current-date" id="current-date">今日录像</div>
<div class="date-container">
<label for="date">
<div class="date-icon"></div>
</label>
<input type="date" name="date" id="date" />
</div>
</div>
`,h(ue,document.getElementById("".concat(this.jSPlugin.id,"-wrap")));var pe=document.createElement("div");pe.id="rec-type-container-wrap",pe.className="rec-type-container-wrap",pe.style="",pe.innerHTML=`
<div class="rec-type-container">
<div class="rec-type-text">共<span id="recCount">0</span>个录像</div>
<div class="rec-type-switch">
<label>
<input type="checkbox" name="type" id="cloudType" value="1" hidden />
<label for="cloudType" class="advice">
<span>
<svg fill="#CCCCCC" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="2 0 20 20">
<path class="st0" d="M12.6,5c-2.3,0.1-4.3,1.4-5.3,3.3L7.2,8.6c-2.4,0.5-4.1,2.5-4.1,4.9c0,2.8,2.4,5,5.2,5h9.9
c2.4,0,4.3-1.9,4.3-4.2l0-0.2c-0.1-2-1.6-3.5-3.5-3.9l-0.1,0l0-0.2c-0.4-2.8-3-5-6.1-5L12.6,5z"/>
</svg>
</span>
<span>
<svg fill="#CCCCCC" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="2 0 20 20">
<path id="形状结合" class="st0" d="M14.3,4c0.6,0,1.2,0.2,1.7,0.7l0,0L18.3,7C18.7,7.4,19,8,19,8.6l0,0v9c0,1.3-1.1,2.3-2.4,2.3
l0,0H8.4C7.1,20,6,19,6,17.7l0,0V6.3C6,5,7.1,4,8.4,4l0,0H14.3z M9.7,7.2C9.3,7.2,8.9,7.6,8.9,8l0,0v2.5l0,0.1
c0,0.4,0.4,0.6,0.7,0.6c0.4,0,0.8-0.3,0.8-0.8l0,0V8l0-0.1C10.4,7.5,10,7.2,9.7,7.2z M12.2,7.2c-0.4,0-0.8,0.3-0.8,0.8l0,0v2.5
l0,0.1c0,0.4,0.4,0.6,0.7,0.6c0.4,0,0.8-0.3,0.8-0.8l0,0V8l0-0.1C12.9,7.5,12.5,7.2,12.2,7.2z M14.7,7.2c-0.4,0-0.8,0.3-0.8,0.8l0,0
v2.5l0,0.1c0,0.4,0.4,0.6,0.7,0.6c0.4,0,0.8-0.3,0.8-0.8l0,0V8l0-0.1C15.4,7.5,15,7.2,14.7,7.2z"/>
</svg>
</span>
</label>
</label>
</div>
</div>
`,h(pe,ue);var de=document.createElement("div");de.id="mobile-rec-wrap",de.className="mobileRec-wrap",de.style="",de.innerHTML=`
<div class="time-line-container">
<div class="current-time">
<div class="current-time-bg" id="time-line-current">2020-01-01 00:00:00</div>
</div>
<div class="time-line-item-container">
<div class="time-line-item" id="time-line-item">
</div>
</div>
</div>
`,h(de,pe);var se=function(ge){console.log("子组件传值到父组件",ge,ge.current);var Ze=ge.current,fe=new Date(R.date).Format("yyyyMMdd").substr(0,8)+(ge.current?Ze.replace(/:/g,""):ge.current.replace(/:/g,""));if(R.initBegin&&new Date("".concat(R.date," ").concat(ge.current)).getTime()<new Date(R.initBegin).getTime()&&(console.log("超过限制最低值"),fe=new Date(R.initBegin).Format("yyyyMMddhhmmss")),R.initEnd&&new Date("".concat(R.date," ").concat(ge.current)).getTime()>new Date(R.initEnd).getTime()&&(console.log("超过限制最高值"),fe=new Date(R.initBegin).Format("yyyyMMddhhmmss")),R.type==="cloud.rec"){var B=function(){R.jSPlugin.seek(fe.substr(8,6),"235959"),setTimeout(function(){R.syncTimeLine()},6e3)};R.seekTimer?clearTimeout(R.seekTimer):B(),console.log("this.jsPlug",R.jSPlugin.params),R.seekTimer=setTimeout(function(){B(),clearTimeout(R.seekTimer),R.seekTimer=null},R.seekFrequency)}else{var te=function(){setTimeout(function(){R.disabled=!1},R.seekFrequency)},oe=function(Ge){R.disabled=!0,R.jSPlugin.pause().then(function(){console.log("暂停成功"),R.jSPlugin.resume(fe).then(function(nt){console.log("恢复成功"),R.jSPlugin.Theme&&R.jSPlugin.Theme.setDecoderState({play:!0}),R.jSPlugin.Theme&&R.jSPlugin.Theme.decoderState.state.sound&&R.jSPlugin.openSound(),R.syncTimeLine(),Ge&&Ge()})}).catch(function(){console.log("暂停失败"),R.jSPlugin.resume(fe).then(function(nt){console.log("恢复成功"),R.jSPlugin.Theme&&R.jSPlugin.Theme.setDecoderState({play:!0}),R.syncTimeLine(),Ge&&Ge()})})};R.disabled?(console.log("操作频繁,等待2秒后执行"),R.seekTimer&&clearTimeout(R.seekTimer),R.seekTimer=setTimeout(function(){oe(te)},R.seekFrequency)):oe(te)}},re=function(){R.operating=!0,R.unSyncTimeLine()},Oe=function(){},be=function(){R.operating=!1,console.log("ontouchend")};this.TimeLineOBJ=new Fe({id:"time-line-item",getPalyParam:se,ontouchstart:re,ontouchmove:Oe,ontouchend:be}),this.fetchDeviceRec(),document.getElementById("date").addEventListener("change",function(me){if(console.log("日期变化",me.target.value),R.initBegin||R.initEnd)return console.log("您开启了时间限制,无法切换日期"),!1;R.date=new Date(me.target.value).Format("yyyy/MM/dd"),R.begin=R.date+" 00:00:00",R.end=R.date+" 23:59:59",R.fetchDeviceRec(),R.jSPlugin.changePlayUrl({type:R.type,begin:"".concat(new Date(R.date).Format("yyyyMMdd"),"000000")}),R.changeRecSpeed(1),R.resetMobileZoomStatus()}),document.getElementById("cloudType").checked=this.type==="rec",document.getElementById("cloudType").addEventListener("change",function(me){var ge=me.target.checked?2:1;R.type=me.target.checked?"rec":"cloud.rec",console.log("recType",ge),R.fetchDeviceRec(),R.jSPlugin.changePlayUrl({type:R.type,begin:"".concat(new Date(R.date).Format("yyyyMMdd"),"000000")}).then(function(){console.log("切换类型成功"),R.syncTimeLine(),R.changeRecSpeed(1),R.resetMobileZoomStatus()},function(Ze){console.log("err",Ze)}).catch(function(Ze){console.log(Ze)})}),this.syncTimeLine()}return a(Z,[{key:"fetchDeviceRec",value:function(){var w=this,T=function(z){var U=z.length;document.getElementById("recCount").innerHTML=U;for(var ue=[],pe=U-1;pe>=0;pe--){var de=z[pe],se=pt(de.endTime),re=pt(de.startTime);ue.push({st:re,et:se})}w.TimeLineOBJ.setDateLine(ue)},R=new FormData;R.append("deviceSerial",S(this.jSPlugin.url).deviceSerial),R.append("channelNo",S(this.jSPlugin.url).channelNo),R.append("accessToken",this.jSPlugin.accessToken),R.append("recType",this.type==="cloud.rec"?1:2),R.append("startTime",new Date(this.begin).getTime()),R.append("endTime",new Date(this.end).getTime()),fetch(this.jSPlugin.env.domain+"/api/lapp/video/by/time",{method:"POST",body:R}).then(function(N){return N.json()}).then(function(N){if(N.code==200&&N.data){var z=[];z=N.data,T(z)}else T([])})}},{key:"syncTimeLine",value:function(){var w=this,T=function(N){var z=new Date(N),U=z.getHours(),ue=z.getMinutes(),pe=z.getSeconds();return(U>9?U:"0"+U)+":"+(ue>9?ue:"0"+ue)+":"+(pe>9?pe:"0"+pe)};this.timer&&clearInterval(this.timer),this.timer=setInterval(function(){if(w.operating)return console.log("操作中"),!1;w.jSPlugin.getOSDTime().then(function(R){R.data>0?w.TimeLineOBJ.stepScrollTimeLine(T(R.data*1e3)):(console.log("未找到当前获取播放时间,等待中..."),console.log("res:-----------------",R))}).catch(function(R){console.log("err:-----",R),console.log("未找到当前获取播放时间,等待中...")})},1e3)}},{key:"unSyncTimeLine",value:function(){this.timer&&clearInterval(this.timer)}}]),Z}(),bt=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"ptzStart"},{code:10001,msg:"操作失败",desc:"参数为空或格式不正确",text:"参数错误",type:"ptzStart"},{code:10002,msg:"账号异常,操作失败",desc:"重新获取accessToken",text:"accessToken异常或过期",type:"ptzStart"},{code:10005,msg:"账号异常,操作失败",desc:"appKey被冻结",text:"appKey异常",type:"ptzStart"},{code:20002,msg:"设备不存在,请检查设备连接情况",desc:"",text:"设备不存在",type:"ptzStart"},{code:20006,msg:"操作失败,请检查设备网络情况",desc:"检查设备网络状况,稍后再试",text:"网络异常",type:"ptzStart"},{code:20007,msg:"操作失败,请检查设备在线情况",desc:"检查设备是否在线",text:"设备不在线",type:"ptzStart"},{code:20008,msg:"操作过于频繁,稍后再试",desc:"操作过于频繁,稍后再试",text:"设备响应超时",type:"ptzStart"},{code:20014,msg:"操作失败",desc:"",text:"deviceSerial不合法",type:"ptzStart"},{code:20032,msg:"通道不存在请检查设备连接情况",desc:"该用户下通道不存在",text:"该用户下通道不存在",type:"ptzStart"},{code:49999,msg:"操作失败,请重试",desc:"接口调用异常",text:"数据异常",type:"ptzStart"},{code:6e4,msg:"操作失败,设备不支持该操作",desc:"",text:"设备不支持云台控制",type:"ptzStart"},{code:60001,msg:"操作失败,用户无权限",desc:"",text:"用户无云台控制权限",type:"ptzStart"},{code:60002,msg:"设备已旋转到上限位",desc:"",text:"设备云台旋转达到上限位",type:"ptzStart"},{code:60003,msg:"设备已旋转到下限位",desc:"",text:"设备云台旋转达到下限位",type:"ptzStart"},{code:60004,msg:"设备已旋转到左限位",desc:"",text:"设备云台旋转达到左限位",type:"ptzStart"},{code:60005,msg:"设备已旋转到右限位",desc:"",text:"设备云台旋转达到右限位",type:"ptzStart"},{code:60006,msg:"操作失败,请重试",desc:"稍候再试",text:"云台当前操作失败",type:"ptzStart"},{code:60009,msg:"设备正在操作中",desc:"",text:"正在调用预置点",type:"ptzStart"},{code:60020,msg:"操作失败",desc:"确认设备是否支持该操作",text:"不支持该命令",type:"ptzStart"}],ht=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"ptzStop"},{code:10001,msg:"操作失败",desc:"参数为空或格式不正确",text:"参数错误",type:"ptzStop"},{code:10002,msg:"账号异常,操作失败",desc:"重新获取accessToken",text:"accessToken异常或过期",type:"ptzStop"},{code:10005,msg:"账号异常,操作失败",desc:"appKey被冻结",text:"appKey异常",type:"ptzStop"},{code:20002,msg:"设备不存在,请检查设备连接情况",desc:"",text:"设备不存在",type:"ptzStop"},{code:20006,msg:"操作失败,请检查设备网络情况",desc:"检查设备网络状况,稍后再试",text:"网络异常",type:"ptzStop"},{code:20007,msg:"操作失败,请检查设备在线情况",desc:"检查设备是否在线",text:"设备不在线",type:"ptzStop"},{code:20008,msg:"操作过于频繁,稍后再试",desc:"操作过于频繁,稍后再试",text:"设备响应超时",type:"ptzStop"},{code:20014,msg:"操作失败",desc:"",text:"deviceSerial不合法",type:"ptzStop"},{code:20032,msg:"通道不存在请检查设备连接情况",desc:"该用户下通道不存在",text:"该用户下通道不存在",type:"ptzStop"},{code:49999,msg:"操作失败,请重试",desc:"接口调用异常",text:"数据异常",type:"ptzStop"},{code:6e4,msg:"操作失败,设备不支持该操作",desc:"",text:"设备不支持云台控制",type:"ptzStop"},{code:60001,msg:"操作失败,用户无权限",desc:"",text:"用户无云台控制权限",type:"ptzStop"},{code:60006,msg:"操作失败,请重试",desc:"稍候再试",text:"云台当前操作失败",type:"ptzStop"},{code:60009,msg:"设备正在操作中",desc:"",text:"正在调用预置点",type:"ptzStop"},{code:60020,msg:"操作失败",desc:"确认设备是否支持该操作",text:"不支持该命令",type:"ptzStop"}],Kt=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"talk"},{code:10001,msg:"播放失败",desc:"参数为空或格式不正确",text:"参数错误",type:"talk"},{code:10002,msg:"账号异常,操作失败",desc:"",text:"accessToken异常或过期",type:"talk"},{code:10031,msg:"账号异常,操作失败",desc:"",text:"子账户或萤石用户没有权限",type:"talk"},{code:20002,msg:"设备不存在请检查设备连接情况",desc:"设备序列号输入有误或者设备未被添加或者通道异常",text:"设备不存在",type:"talk"},{code:60059,msg:"播放失败",desc:"",text:"ezopen地址均不可用",type:"talk"}],Tt=[{code:200,msg:"",desc:"",text:"操作成功",type:"time"},{code:10001,msg:"播放失败",desc:"参数为空或格式不正确",text:"参数错误",type:"time"},{code:10002,msg:"账号异常,播放失败",desc:"",text:"accessToken异常或过期",type:"time"},{code:10004,msg:"账号异常,播放失败",desc:"",text:"用户不存在",type:"time"},{code:10005,msg:"账号异常,播放失败",desc:"",text:"appKey异常",type:"time"},{code:10011,msg:"播放失败",desc:"设备对应用户未注册至应用下",text:"未开通萤石服务",type:"time"},{code:10013,msg:"账号异常,播放失败",desc:"",text:"非开发者账号无权限调用",type:"time"},{code:10030,msg:"播放失败",desc:"",text:"appkey和appsecret不匹配",type:"time"},{code:20002,msg:"设备不存在请检查设备连接情况",desc:"设备序列号输入有误或者设备未被添加或者通道异常",text:"设备不存在",type:"time"},{code:20014,msg:"播放失败",desc:"",text:"deviceSerial不合法",type:"time"},{code:20032,msg:"设备不存在请检查设备连接情况",desc:"",text:"该用户下通道不存在",type:"time"},{code:60024,msg:"播放失败请重试",desc:"",text:"取消订阅操作失败",type:"time"},{code:49999,msg:"播放失败请重试",desc:"",text:"操作异常",type:"time"}],Ae={ptzStart:bt,ptzStop:ht,talk:Kt,time:Tt},Lt=function(){function Z(H,w){i(this,Z),this.coreX=H,this.coreY=w,console.log("uikitCode",Ae)}return a(Z,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"matchInfo",value:function(w,T){if(Ae[T]){var R={};return Ae[T].map(function(N){N.code==w&&(R=N)}),R}else return{code:500,msg:"未知错误",desc:"未知的错误码,或错误码类型有误",text:"",type:T}}}]),Z}(),vt=function(){function Z(H){var w=this;if(i(this,Z),this.jSPlugin=H,this.codeHandler=new Lt,this.pluginStatus=new F(this,this.jSPlugin.id),console.log("云台初始化"),document.getElementById(this.jSPlugin.id+"-ez-ptz-item"))return!1;var T=document.createElement("div");T.id=this.jSPlugin.id+"-ez-ptz-item",T.className="ez-ptz-wrap",T.style="display:none";var R=document.createElement("style");R.innerHTML=`
.ez-ptz-container {
position: relative;
width: 80px;
height: 80px;
background: rgba(255, 255, 255, 0.80);
box-shadow: 0px 0px 33px 4px rgb(0 0 0 / 15%);
border: 1px solid rgba(255, 255, 255, 0.80);
border-radius: 100%;
cursor: pointer;
overflow: hidden;
user-select: none;
}
.ez-ptz-container .ez-ptz-icon.top {
width: 0;
height: 0;
border-left: 3px solid transparent;
border-right: 3px solid transparent;
border-bottom: 6px solid #333333;
position: absolute;
display: inline-block;
left: calc(50% - 3px);
top: 2px;
}
.ez-ptz-container .ez-ptz-icon.top.active {
border-bottom-color: #1890FF;
}
.ez-ptz-container .ez-ptz-icon.bottom {
width: 0;
height: 0;
border-left: 3px solid transparent;
border-right: 3px solid transparent;
border-top: 6px solid #333333;
position: absolute;
display: inline-block;
left: calc(50% - 3px);
bottom: 2px;
}
.ez-ptz-container .ez-ptz-icon.bottom.active {
border-top-color: #1890FF;
}
.ez-ptz-container .ez-ptz-icon.right {
width: 0;
height: 0;
border-top: 3px solid transparent;
border-bottom: 3px solid transparent;
border-left: 6px solid #333333;
position: absolute;
display: inline-block;
top: calc(50% - 3px);
right: 2px;
}
.ez-ptz-container .ez-ptz-icon.right.active {
border-left-color: #1890FF;
}
.ez-ptz-container .ez-ptz-icon.left {
width: 0;
height: 0;
border-top: 3px solid transparent;
border-bottom: 3px solid transparent;
border-right: 6px solid #333333;
position: absolute;
display: inline-block;
top: calc(50% - 3px);
left: 2px;
}
.ez-ptz-container .ez-ptz-icon.left.active {
border-right-color: #1890FF;
}
.ez-ptz-container .ez-ptz-main.center {
width: 23px;
height: 23px;
background: #1890FF;
border-radius: 100%;
top: calc(50% - 12.3px);
left: calc(50% - 12.3px);
position: absolute;
}
.ez-ptz-wrap {
position: absolute;
right: 20px;
top: calc(50% - 50px);
width: 100px;
height: 100px;
z-index: 999;
}
.ez-ptz-close {
position: absolute;
color: #FFFFFF;
top: 0;
right: 0px;
}`,document.getElementsByTagName("head")[0].appendChild(R),T.innerHTML=`
<div class="ez-ptz-container" id="`.concat(this.jSPlugin.id,`-ez-ptz-container" style="position: relative;width: 80px;height: 80px;background: rgba(255, 255, 255, 0.80);box-shadow: 0px 0px 33px 4px rgba(0, 0, 0, 0.15);border: 1px solid rgba(255, 255, 255, 0.80);border-radius: 100%;cursor: pointer;overflow: hidden;user-select: none;">
<div class="ez-ptz-main center"></div>
<div class="ez-ptz-icon top active"></div>
<div class="ez-ptz-icon left active"></div>
<div class="ez-ptz-icon bottom active"></div>
<div class="ez-ptz-icon right active"></div>
`),document.getElementById("".concat(H.id,"-wrap")).appendChild(T),document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).onmousedown=function(N){N.preventDefault(),console.log("触摸开始"),w._handlePtzTouch(N,"start")},document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).onmouseup=function(N){N.preventDefault(),console.log("触摸结束"),w._handlePtzTouch(N,"stop")},document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).ontouchstart=function(N){N.preventDefault(),console.log("触摸开始"),w._handlePtzTouch(N,"start")},document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).ontouchend=function(N){N.preventDefault(),console.log("触摸结束",N),w._handlePtzTouch(N,"stop")}}return a(Z,[{key:"show",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-item")).style="display: inline-block"}},{key:"hide",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-item")).style="display: none"}},{key:"_handlePtzTouch",value:function(w,T){var R=this,N=document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).getBoundingClientRect(),z=N.left+41,U=N.top+41,ue=w.x||w.changedTouches[0].clientX,pe=w.y||w.changedTouches[0].clientY,de=ue-z,se=pe-U,re=0,Oe=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start";if(Math.abs(de)>Math.abs(se)?de>0?re=3:re=2:se>0?re=1:re=0,/^rotate\(90/.test(document.getElementById("".concat(this.jSPlugin.id,"-wrap")).style.transform))switch(re){case 0:re=2;break;case 1:re=3;break;case 2:re=1;break;case 3:re=0;break}document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).style="background-image:linear-gradient(".concat(re===0?180:re===1?0:re===2?90:270,"deg, #1d8dd8 0%, rgba(100,143,252,0.00) 30%)"),T==="stop"&&(Oe=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop",document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).style="");var be=new FormData;be.append("deviceSerial",S(this.jSPlugin.url).deviceSerial),be.append("channelNo",S(this.jSPlugin.url).channelNo),be.append("speed",1),be.append("direction",re),be.append("accessToken",this.jSPlugin.accessToken),fetch(Oe,{method:"POST",body:be}).then(function(me){return me.json()}).then(function(me){me.code==200||(console.log(me.code,R.codeHandler.matchInfo(me.code,T==="start"?"ptzStart":"ptzStop")),R.pluginStatus.loadingSetText({text:R.codeHandler.matchInfo(me.code,T==="start"?"ptzStart":"ptzStop").msg,color:"red",delayClear:2e3}),(me.code==60005||me.code==60002||me.code==60003||me.code==60004)&&(document.getElementById("".concat(R.jSPlugin.id,"-ez-ptz-container")).style="background-image:linear-gradient(".concat(re===0?180:re===1?0:re===2?90:270,"deg, #f45656 0%, rgba(100,143,252,0.00) 30%)")))}).catch(function(me){console.log("云台调用异常",me)})}}]),Z}();(function(Z){if(t(e)==="object")n.exports=Z();else{var H;typeof window!="undefined"?H=window:typeof O6!="undefined"?H=O6:typeof self!="undefined"?H=self:H=this,H.adapter=Z()}})(function(){return function(){function Z(H,w,T){function R(U,ue){if(!w[U]){if(!H[U]){var pe=typeof B6=="function"&&B6;if(!ue&&pe)return pe(U,!0);if(N)return N(U,!0);var de=new Error("Cannot find module '"+U+"'");throw de.code="MODULE_NOT_FOUND",de}var se=w[U]={exports:{}};H[U][0].call(se.exports,function(re){var Oe=H[U][1][re];return R(Oe||re)},se,se.exports,Z,H,w,T)}return w[U].exports}for(var N=typeof B6=="function"&&B6,z=0;z<T.length;z++)R(T[z]);return R}return Z}()({1:[function(Z,H,w){var T=Z("./adapter_factory.js"),R=(0,T.adapterFactory)({window});window.adapter=R,H.exports=R},{"./adapter_factory.js":2}],2:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.adapterFactory=ge;var T=Z("./utils"),R=me(T),N=Z("./chrome/chrome_shim"),z=me(N),U=Z("./edge/edge_shim"),ue=me(U),pe=Z("./firefox/firefox_shim"),de=me(pe),se=Z("./safari/safari_shim"),re=me(se),Oe=Z("./common_shim"),be=me(Oe);function me(Ze){if(Ze&&Ze.__esModule)return Ze;var fe={};if(Ze!=null)for(var B in Ze)Object.prototype.hasOwnProperty.call(Ze,B)&&(fe[B]=Ze[B]);return fe.default=Ze,fe}function ge(){var Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=Ze.window,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0},te=R.log,oe=R.detectBrowser(fe),Ie={browserDetails:oe,commonShim:be,extractVersion:R.extractVersion,disableLog:R.disableLog,disableWarnings:R.disableWarnings};switch(oe.browser){case"chrome":if(!z||!z.shimPeerConnection||!B.shimChrome)return te("Chrome shim is not included in this adapter release."),Ie;te("adapter.js shimming chrome."),Ie.browserShim=z,z.shimGetUserMedia(fe),z.shimMediaStream(fe),z.shimPeerConnection(fe),z.shimOnTrack(fe),z.shimAddTrackRemoveTrack(fe),z.shimGetSendersWithDtmf(fe),z.shimGetStats(fe),z.shimSenderReceiverGetStats(fe),z.fixNegotiationNeeded(fe),be.shimRTCIceCandidate(fe),be.shimConnectionState(fe),be.shimMaxMessageSize(fe),be.shimSendThrowTypeError(fe),be.removeAllowExtmapMixed(fe);break;case"firefox":if(!de||!de.shimPeerConnection||!B.shimFirefox)return te("Firefox shim is not included in this adapter release."),Ie;te("adapter.js shimming firefox."),Ie.browserShim=de,de.shimGetUserMedia(fe),de.shimPeerConnection(fe),de.shimOnTrack(fe),de.shimRemoveStream(fe),de.shimSenderGetStats(fe),de.shimReceiverGetStats(fe),de.shimRTCDataChannel(fe),de.shimAddTransceiver(fe),de.shimCreateOffer(fe),de.shimCreateAnswer(fe),be.shimRTCIceCandidate(fe),be.shimConnectionState(fe),be.shimMaxMessageSize(fe),be.shimSendThrowTypeError(fe);break;case"edge":if(!ue||!ue.shimPeerConnection||!B.shimEdge)return te("MS edge shim is not included in this adapter release."),Ie;te("adapter.js shimming edge."),Ie.browserShim=ue,ue.shimGetUserMedia(fe),ue.shimGetDisplayMedia(fe),ue.shimPeerConnection(fe),ue.shimReplaceTrack(fe),be.shimMaxMessageSize(fe),be.shimSendThrowTypeError(fe);break;case"safari":if(!re||!B.shimSafari)return te("Safari shim is not included in this adapter release."),Ie;te("adapter.js shimming safari."),Ie.browserShim=re,re.shimRTCIceServerUrls(fe),re.shimCreateOfferLegacy(fe),re.shimCallbacksAPI(fe),re.shimLocalStreamsAPI(fe),re.shimRemoteStreamsAPI(fe),re.shimTrackEventTransceiver(fe),re.shimGetUserMedia(fe),be.shimRTCIceCandidate(fe),be.shimMaxMessageSize(fe),be.shimSendThrowTypeError(fe),be.removeAllowExtmapMixed(fe);break;default:te("Unsupported browser!");break}return Ie}},{"./chrome/chrome_shim":3,"./common_shim":6,"./edge/edge_shim":7,"./firefox/firefox_shim":11,"./safari/safari_shim":14,"./utils":15}],3:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.shimGetDisplayMedia=w.shimGetUserMedia=void 0;var T=typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?function(B){return t(B)}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":t(B)},R=Z("./getusermedia");Object.defineProperty(w,"shimGetUserMedia",{enumerable:!0,get:function(){return R.shimGetUserMedia}});var N=Z("./getdisplaymedia");Object.defineProperty(w,"shimGetDisplayMedia",{enumerable:!0,get:function(){return N.shimGetDisplayMedia}}),w.shimMediaStream=de,w.shimOnTrack=se,w.shimGetSendersWithDtmf=re,w.shimGetStats=Oe,w.shimSenderReceiverGetStats=be,w.shimAddTrackRemoveTrackWithNative=me,w.shimAddTrackRemoveTrack=ge,w.shimPeerConnection=Ze,w.fixNegotiationNeeded=fe;var z=Z("../utils.js"),U=ue(z);function ue(B){if(B&&B.__esModule)return B;var te={};if(B!=null)for(var oe in B)Object.prototype.hasOwnProperty.call(B,oe)&&(te[oe]=B[oe]);return te.default=B,te}function pe(B,te,oe){return te in B?Object.defineProperty(B,te,{value:oe,enumerable:!0,configurable:!0,writable:!0}):B[te]=oe,B}function de(B){B.MediaStream=B.MediaStream||B.webkitMediaStream}function se(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection&&!("ontrack"in B.RTCPeerConnection.prototype)){Object.defineProperty(B.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(Ie){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=Ie)},enumerable:!0,configurable:!0});var te=B.RTCPeerConnection.prototype.setRemoteDescription;B.RTCPeerConnection.prototype.setRemoteDescription=function(){var Ie=this;return this._ontrackpoly||(this._ontrackpoly=function(Ge){Ge.stream.addEventListener("addtrack",function(nt){var at=void 0;B.RTCPeerConnection.prototype.getReceivers?at=Ie.getReceivers().find(function(zt){return zt.track&&zt.track.id===nt.track.id}):at={track:nt.track};var St=new Event("track");St.track=nt.track,St.receiver=at,St.transceiver={receiver:at},St.streams=[Ge.stream],Ie.dispatchEvent(St)}),Ge.stream.getTracks().forEach(function(nt){var at=void 0;B.RTCPeerConnection.prototype.getReceivers?at=Ie.getReceivers().find(function(zt){return zt.track&&zt.track.id===nt.id}):at={track:nt};var St=new Event("track");St.track=nt,St.receiver=at,St.transceiver={receiver:at},St.streams=[Ge.stream],Ie.dispatchEvent(St)})},this.addEventListener("addstream",this._ontrackpoly)),te.apply(this,arguments)}}else U.wrapPeerConnectionEvent(B,"track",function(oe){return oe.transceiver||Object.defineProperty(oe,"transceiver",{value:{receiver:oe.receiver}}),oe})}function re(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection&&!("getSenders"in B.RTCPeerConnection.prototype)&&"createDTMFSender"in B.RTCPeerConnection.prototype){var te=function(zt,qt){return{track:qt,get dtmf(){return this._dtmf===void 0&&(qt.kind==="audio"?this._dtmf=zt.createDTMFSender(qt):this._dtmf=null),this._dtmf},_pc:zt}};if(!B.RTCPeerConnection.prototype.getSenders){B.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var oe=B.RTCPeerConnection.prototype.addTrack;B.RTCPeerConnection.prototype.addTrack=function(zt,qt){var kt=oe.apply(this,arguments);return kt||(kt=te(this,zt),this._senders.push(kt)),kt};var Ie=B.RTCPeerConnection.prototype.removeTrack;B.RTCPeerConnection.prototype.removeTrack=function(zt){Ie.apply(this,arguments);var qt=this._senders.indexOf(zt);qt!==-1&&this._senders.splice(qt,1)}}var Ge=B.RTCPeerConnection.prototype.addStream;B.RTCPeerConnection.prototype.addStream=function(zt){var qt=this;this._senders=this._senders||[],Ge.apply(this,[zt]),zt.getTracks().forEach(function(kt){qt._senders.push(te(qt,kt))})};var nt=B.RTCPeerConnection.prototype.removeStream;B.RTCPeerConnection.prototype.removeStream=function(zt){var qt=this;this._senders=this._senders||[],nt.apply(this,[zt]),zt.getTracks().forEach(function(kt){var On=qt._senders.find(function(Wn){return Wn.track===kt});On&&qt._senders.splice(qt._senders.indexOf(On),1)})}}else if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection&&"getSenders"in B.RTCPeerConnection.prototype&&"createDTMFSender"in B.RTCPeerConnection.prototype&&B.RTCRtpSender&&!("dtmf"in B.RTCRtpSender.prototype)){var at=B.RTCPeerConnection.prototype.getSenders;B.RTCPeerConnection.prototype.getSenders=function(){var zt=this,qt=at.apply(this,[]);return qt.forEach(function(kt){return kt._pc=zt}),qt},Object.defineProperty(B.RTCRtpSender.prototype,"dtmf",{get:function(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function Oe(B){if(B.RTCPeerConnection){var te=B.RTCPeerConnection.prototype.getStats;B.RTCPeerConnection.prototype.getStats=function(){var Ie=this,Ge=Array.prototype.slice.call(arguments),nt=Ge[0],at=Ge[1],St=Ge[2];if(arguments.length>0&&typeof nt=="function")return te.apply(this,arguments);if(te.length===0&&(arguments.length===0||typeof nt!="function"))return te.apply(this,[]);var zt=function(Wn){var Vn={},ii=Wn.result();return ii.forEach(function(ti){var di={id:ti.id,timestamp:ti.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[ti.type]||ti.type};ti.names().forEach(function(tr){di[tr]=ti.stat(tr)}),Vn[di.id]=di}),Vn},qt=function(Wn){return new Map(Object.keys(Wn).map(function(Vn){return[Vn,Wn[Vn]]}))};if(arguments.length>=2){var kt=function(Wn){at(qt(zt(Wn)))};return te.apply(this,[kt,nt])}return new Promise(function(On,Wn){te.apply(Ie,[function(Vn){On(qt(zt(Vn)))},Wn])}).then(at,St)}}}function be(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection&&B.RTCRtpSender&&B.RTCRtpReceiver){if(!("getStats"in B.RTCRtpSender.prototype)){var te=B.RTCPeerConnection.prototype.getSenders;te&&(B.RTCPeerConnection.prototype.getSenders=function(){var at=this,St=te.apply(this,[]);return St.forEach(function(zt){return zt._pc=at}),St});var oe=B.RTCPeerConnection.prototype.addTrack;oe&&(B.RTCPeerConnection.prototype.addTrack=function(){var at=oe.apply(this,arguments);return at._pc=this,at}),B.RTCRtpSender.prototype.getStats=function(){var at=this;return this._pc.getStats().then(function(St){return U.filterStats(St,at.track,!0)})}}if(!("getStats"in B.RTCRtpReceiver.prototype)){var Ie=B.RTCPeerConnection.prototype.getReceivers;Ie&&(B.RTCPeerConnection.prototype.getReceivers=function(){var at=this,St=Ie.apply(this,[]);return St.forEach(function(zt){return zt._pc=at}),St}),U.wrapPeerConnectionEvent(B,"track",function(nt){return nt.receiver._pc=nt.srcElement,nt}),B.RTCRtpReceiver.prototype.getStats=function(){var at=this;return this._pc.getStats().then(function(St){return U.filterStats(St,at.track,!1)})}}if("getStats"in B.RTCRtpSender.prototype&&"getStats"in B.RTCRtpReceiver.prototype){var Ge=B.RTCPeerConnection.prototype.getStats;B.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof B.MediaStreamTrack){var at=arguments[0],St=void 0,zt=void 0,qt=void 0;return this.getSenders().forEach(function(kt){kt.track===at&&(St?qt=!0:St=kt)}),this.getReceivers().forEach(function(kt){return kt.track===at&&(zt?qt=!0:zt=kt),kt.track===at}),qt||St&&zt?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):St?St.getStats():zt?zt.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return Ge.apply(this,arguments)}}}}function me(B){B.RTCPeerConnection.prototype.getLocalStreams=function(){var at=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(function(St){return at._shimmedLocalStreams[St][0]})};var te=B.RTCPeerConnection.prototype.addTrack;B.RTCPeerConnection.prototype.addTrack=function(at,St){if(!St)return te.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var zt=te.apply(this,arguments);return this._shimmedLocalStreams[St.id]?this._shimmedLocalStreams[St.id].indexOf(zt)===-1&&this._shimmedLocalStreams[St.id].push(zt):this._shimmedLocalStreams[St.id]=[St,zt],zt};var oe=B.RTCPeerConnection.prototype.addStream;B.RTCPeerConnection.prototype.addStream=function(at){var St=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},at.getTracks().forEach(function(kt){var On=St.getSenders().find(function(Wn){return Wn.track===kt});if(On)throw new DOMException("Track already exists.","InvalidAccessError")});var zt=this.getSenders();oe.apply(this,arguments);var qt=this.getSenders().filter(function(kt){return zt.indexOf(kt)===-1});this._shimmedLocalStreams[at.id]=[at].concat(qt)};var Ie=B.RTCPeerConnection.prototype.removeStream;B.RTCPeerConnection.prototype.removeStream=function(at){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[at.id],Ie.apply(this,arguments)};var Ge=B.RTCPeerConnection.prototype.removeTrack;B.RTCPeerConnection.prototype.removeTrack=function(at){var St=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},at&&Object.keys(this._shimmedLocalStreams).forEach(function(zt){var qt=St._shimmedLocalStreams[zt].indexOf(at);qt!==-1&&St._shimmedLocalStreams[zt].splice(qt,1),St._shimmedLocalStreams[zt].length===1&&delete St._shimmedLocalStreams[zt]}),Ge.apply(this,arguments)}}function ge(B){if(!B.RTCPeerConnection)return;var te=U.detectBrowser(B);if(B.RTCPeerConnection.prototype.addTrack&&te.version>=65)return me(B);var oe=B.RTCPeerConnection.prototype.getLocalStreams;B.RTCPeerConnection.prototype.getLocalStreams=function(){var kt=this,On=oe.apply(this);return this._reverseStreams=this._reverseStreams||{},On.map(function(Wn){return kt._reverseStreams[Wn.id]})};var Ie=B.RTCPeerConnection.prototype.addStream;B.RTCPeerConnection.prototype.addStream=function(kt){var On=this;if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},kt.getTracks().forEach(function(Vn){var ii=On.getSenders().find(function(ti){return ti.track===Vn});if(ii)throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[kt.id]){var Wn=new B.MediaStream(kt.getTracks());this._streams[kt.id]=Wn,this._reverseStreams[Wn.id]=kt,kt=Wn}Ie.apply(this,[kt])};var Ge=B.RTCPeerConnection.prototype.removeStream;B.RTCPeerConnection.prototype.removeStream=function(kt){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},Ge.apply(this,[this._streams[kt.id]||kt]),delete this._reverseStreams[this._streams[kt.id]?this._streams[kt.id].id:kt.id],delete this._streams[kt.id]},B.RTCPeerConnection.prototype.addTrack=function(kt,On){var Wn=this;if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var Vn=[].slice.call(arguments,1);if(Vn.length!==1||!Vn[0].getTracks().find(function(tr){return tr===kt}))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");var ii=this.getSenders().find(function(tr){return tr.track===kt});if(ii)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var ti=this._streams[On.id];if(ti)ti.addTrack(kt),Promise.resolve().then(function(){Wn.dispatchEvent(new Event("negotiationneeded"))});else{var di=new B.MediaStream([kt]);this._streams[On.id]=di,this._reverseStreams[di.id]=On,this.addStream(di)}return this.getSenders().find(function(tr){return tr.track===kt})};function nt(qt,kt){var On=kt.sdp;return Object.keys(qt._reverseStreams||[]).forEach(function(Wn){var Vn=qt._reverseStreams[Wn],ii=qt._streams[Vn.id];On=On.replace(new RegExp(ii.id,"g"),Vn.id)}),new RTCSessionDescription({type:kt.type,sdp:On})}function at(qt,kt){var On=kt.sdp;return Object.keys(qt._reverseStreams||[]).forEach(function(Wn){var Vn=qt._reverseStreams[Wn],ii=qt._streams[Vn.id];On=On.replace(new RegExp(Vn.id,"g"),ii.id)}),new RTCSessionDescription({type:kt.type,sdp:On})}["createOffer","createAnswer"].forEach(function(qt){var kt=B.RTCPeerConnection.prototype[qt],On=pe({},qt,function(){var Wn=this,Vn=arguments,ii=arguments.length&&typeof arguments[0]=="function";return ii?kt.apply(this,[function(ti){var di=nt(Wn,ti);Vn[0].apply(null,[di])},function(ti){Vn[1]&&Vn[1].apply(null,ti)},arguments[2]]):kt.apply(this,arguments).then(function(ti){return nt(Wn,ti)})});B.RTCPeerConnection.prototype[qt]=On[qt]});var St=B.RTCPeerConnection.prototype.setLocalDescription;B.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?St.apply(this,arguments):(arguments[0]=at(this,arguments[0]),St.apply(this,arguments))};var zt=Object.getOwnPropertyDescriptor(B.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(B.RTCPeerConnection.prototype,"localDescription",{get:function(){var kt=zt.get.apply(this);return kt.type===""?kt:nt(this,kt)}}),B.RTCPeerConnection.prototype.removeTrack=function(kt){var On=this;if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!kt._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");var Wn=kt._pc===this;if(!Wn)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};var Vn=void 0;Object.keys(this._streams).forEach(function(ii){var ti=On._streams[ii].getTracks().find(function(di){return kt.track===di});ti&&(Vn=On._streams[ii])}),Vn&&(Vn.getTracks().length===1?this.removeStream(this._reverseStreams[Vn.id]):Vn.removeTrack(kt.track),this.dispatchEvent(new Event("negotiationneeded")))}}function Ze(B){var te=U.detectBrowser(B);if(!B.RTCPeerConnection&&B.webkitRTCPeerConnection&&(B.RTCPeerConnection=B.webkitRTCPeerConnection),!!B.RTCPeerConnection){te.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(Ie){var Ge=B.RTCPeerConnection.prototype[Ie],nt=pe({},Ie,function(){return arguments[0]=new(Ie==="addIceCandidate"?B.RTCIceCandidate:B.RTCSessionDescription)(arguments[0]),Ge.apply(this,arguments)});B.RTCPeerConnection.prototype[Ie]=nt[Ie]});var oe=B.RTCPeerConnection.prototype.addIceCandidate;B.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?te.version<78&&arguments[0]&&arguments[0].candidate===""?Promise.resolve():oe.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}}function fe(B){U.wrapPeerConnectionEvent(B,"negotiationneeded",function(te){var oe=te.target;if(oe.signalingState==="stable")return te})}},{"../utils.js":15,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.shimGetDisplayMedia=T;function T(R,N){if(!(R.navigator.mediaDevices&&"getDisplayMedia"in R.navigator.mediaDevices)&&R.navigator.mediaDevices){if(typeof N!="function"){console.error("shimGetDisplayMedia: getSourceId argument is not a function");return}R.navigator.mediaDevices.getDisplayMedia=function(U){return N(U).then(function(ue){var pe=U.video&&U.video.width,de=U.video&&U.video.height,se=U.video&&U.video.frameRate;return U.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:ue,maxFrameRate:se||3}},pe&&(U.video.mandatory.maxWidth=pe),de&&(U.video.mandatory.maxHeight=de),R.navigator.mediaDevices.getUserMedia(U)})}}}},{}],5:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0});var T=typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?function(pe){return t(pe)}:function(pe){return pe&&typeof Symbol=="function"&&pe.constructor===Symbol&&pe!==Symbol.prototype?"symbol":t(pe)};w.shimGetUserMedia=ue;var R=Z("../utils.js"),N=z(R);function z(pe){if(pe&&pe.__esModule)return pe;var de={};if(pe!=null)for(var se in pe)Object.prototype.hasOwnProperty.call(pe,se)&&(de[se]=pe[se]);return de.default=pe,de}var U=N.log;function ue(pe){var de=pe&&pe.navigator;if(de.mediaDevices){var se=N.detectBrowser(pe),re=function(fe){if((typeof fe=="undefined"?"undefined":T(fe))!=="object"||fe.mandatory||fe.optional)return fe;var B={};return Object.keys(fe).forEach(function(te){if(!(te==="require"||te==="advanced"||te==="mediaSource")){var oe=T(fe[te])==="object"?fe[te]:{ideal:fe[te]};oe.exact!==void 0&&typeof oe.exact=="number"&&(oe.min=oe.max=oe.exact);var Ie=function(at,St){return at?at+St.charAt(0).toUpperCase()+St.slice(1):St==="deviceId"?"sourceId":St};if(oe.ideal!==void 0){B.optional=B.optional||[];var Ge={};typeof oe.ideal=="number"?(Ge[Ie("min",te)]=oe.ideal,B.optional.push(Ge),Ge={},Ge[Ie("max",te)]=oe.ideal,B.optional.push(Ge)):(Ge[Ie("",te)]=oe.ideal,B.optional.push(Ge))}oe.exact!==void 0&&typeof oe.exact!="number"?(B.mandatory=B.mandatory||{},B.mandatory[Ie("",te)]=oe.exact):["min","max"].forEach(function(nt){oe[nt]!==void 0&&(B.mandatory=B.mandatory||{},B.mandatory[Ie(nt,te)]=oe[nt])})}}),fe.advanced&&(B.optional=(B.optional||[]).concat(fe.advanced)),B},Oe=function(fe,B){if(se.version>=61)return B(fe);if(fe=JSON.parse(JSON.stringify(fe)),fe&&T(fe.audio)==="object"){var te=function(at,St,zt){St in at&&!(zt in at)&&(at[zt]=at[St],delete at[St])};fe=JSON.parse(JSON.stringify(fe)),te(fe.audio,"autoGainControl","googAutoGainControl"),te(fe.audio,"noiseSuppression","googNoiseSuppression"),fe.audio=re(fe.audio)}if(fe&&T(fe.video)==="object"){var oe=fe.video.facingMode;oe=oe&&((typeof oe=="undefined"?"undefined":T(oe))==="object"?oe:{ideal:oe});var Ie=se.version<66;if(oe&&(oe.exact==="user"||oe.exact==="environment"||oe.ideal==="user"||oe.ideal==="environment")&&!(de.mediaDevices.getSupportedConstraints&&de.mediaDevices.getSupportedConstraints().facingMode&&!Ie)){delete fe.video.facingMode;var Ge=void 0;if(oe.exact==="environment"||oe.ideal==="environment"?Ge=["back","rear"]:(oe.exact==="user"||oe.ideal==="user")&&(Ge=["front"]),Ge)return de.mediaDevices.enumerateDevices().then(function(nt){nt=nt.filter(function(St){return St.kind==="videoinput"});var at=nt.find(function(St){return Ge.some(function(zt){return St.label.toLowerCase().includes(zt)})});return!at&&nt.length&&Ge.includes("back")&&(at=nt[nt.length-1]),at&&(fe.video.deviceId=oe.exact?{exact:at.deviceId}:{ideal:at.deviceId}),fe.video=re(fe.video),U("chrome: "+JSON.stringify(fe)),B(fe)})}fe.video=re(fe.video)}return U("chrome: "+JSON.stringify(fe)),B(fe)},be=function(fe){return se.version>=64?fe:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[fe.name]||fe.name,message:fe.message,constraint:fe.constraint||fe.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},me=function(fe,B,te){Oe(fe,function(oe){de.webkitGetUserMedia(oe,B,function(Ie){te&&te(be(Ie))})})};if(de.getUserMedia=me.bind(de),de.mediaDevices.getUserMedia){var ge=de.mediaDevices.getUserMedia.bind(de.mediaDevices);de.mediaDevices.getUserMedia=function(Ze){return Oe(Ze,function(fe){return ge(fe).then(function(B){if(fe.audio&&!B.getAudioTracks().length||fe.video&&!B.getVideoTracks().length)throw B.getTracks().forEach(function(te){te.stop()}),new DOMException("","NotFoundError");return B},function(B){return Promise.reject(be(B))})})}}}}},{"../utils.js":15}],6:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0});var T=typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?function(me){return t(me)}:function(me){return me&&typeof Symbol=="function"&&me.constructor===Symbol&&me!==Symbol.prototype?"symbol":t(me)};w.shimRTCIceCandidate=de,w.shimMaxMessageSize=se,w.shimSendThrowTypeError=re,w.shimConnectionState=Oe,w.removeAllowExtmapMixed=be;var R=Z("sdp"),N=pe(R),z=Z("./utils"),U=ue(z);function ue(me){if(me&&me.__esModule)return me;var ge={};if(me!=null)for(var Ze in me)Object.prototype.hasOwnProperty.call(me,Ze)&&(ge[Ze]=me[Ze]);return ge.default=me,ge}function pe(me){return me&&me.__esModule?me:{default:me}}function de(me){if(!(!me.RTCIceCandidate||me.RTCIceCandidate&&"foundation"in me.RTCIceCandidate.prototype)){var ge=me.RTCIceCandidate;me.RTCIceCandidate=function(fe){if((typeof fe=="undefined"?"undefined":T(fe))==="object"&&fe.candidate&&fe.candidate.indexOf("a=")===0&&(fe=JSON.parse(JSON.stringify(fe)),fe.candidate=fe.candidate.substr(2)),fe.candidate&&fe.candidate.length){var B=new ge(fe),te=N.default.parseCandidate(fe.candidate),oe=Object.assign(B,te);return oe.toJSON=function(){return{candidate:oe.candidate,sdpMid:oe.sdpMid,sdpMLineIndex:oe.sdpMLineIndex,usernameFragment:oe.usernameFragment}},oe}return new ge(fe)},me.RTCIceCandidate.prototype=ge.prototype,U.wrapPeerConnectionEvent(me,"icecandidate",function(Ze){return Ze.candidate&&Object.defineProperty(Ze,"candidate",{value:new me.RTCIceCandidate(Ze.candidate),writable:"false"}),Ze})}}function se(me){if(me.RTCPeerConnection){var ge=U.detectBrowser(me);"sctp"in me.RTCPeerConnection.prototype||Object.defineProperty(me.RTCPeerConnection.prototype,"sctp",{get:function(){return typeof this._sctp=="undefined"?null:this._sctp}});var Ze=function(Ge){if(!Ge||!Ge.sdp)return!1;var nt=N.default.splitSections(Ge.sdp);return nt.shift(),nt.some(function(at){var St=N.default.parseMLine(at);return St&&St.kind==="application"&&St.protocol.indexOf("SCTP")!==-1})},fe=function(Ge){var nt=Ge.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(nt===null||nt.length<2)return-1;var at=parseInt(nt[1],10);return at!==at?-1:at},B=function(Ge){var nt=65536;return ge.browser==="firefox"&&(ge.version<57?Ge===-1?nt=16384:nt=2147483637:ge.version<60?nt=ge.version===57?65535:65536:nt=2147483637),nt},te=function(Ge,nt){var at=65536;ge.browser==="firefox"&&ge.version===57&&(at=65535);var St=N.default.matchPrefix(Ge.sdp,"a=max-message-size:");return St.length>0?at=parseInt(St[0].substr(19),10):ge.browser==="firefox"&&nt!==-1&&(at=2147483637),at},oe=me.RTCPeerConnection.prototype.setRemoteDescription;me.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,ge.browser==="chrome"&&ge.version>=76){var Ge=this.getConfiguration(),nt=Ge.sdpSemantics;nt==="plan-b"&&Object.defineProperty(this,"sctp",{get:function(){return typeof this._sctp=="undefined"?null:this._sctp},enumerable:!0,configurable:!0})}if(Ze(arguments[0])){var at=fe(arguments[0]),St=B(at),zt=te(arguments[0],at),qt=void 0;St===0&&zt===0?qt=Number.POSITIVE_INFINITY:St===0||zt===0?qt=Math.max(St,zt):qt=Math.min(St,zt);var kt={};Object.defineProperty(kt,"maxMessageSize",{get:function(){return qt}}),this._sctp=kt}return oe.apply(this,arguments)}}}function re(me){if(!(me.RTCPeerConnection&&"createDataChannel"in me.RTCPeerConnection.prototype))return;function ge(fe,B){var te=fe.send;fe.send=function(){var Ie=arguments[0],Ge=Ie.length||Ie.size||Ie.byteLength;if(fe.readyState==="open"&&B.sctp&&Ge>B.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+B.sctp.maxMessageSize+" bytes)");return te.apply(fe,arguments)}}var Ze=me.RTCPeerConnection.prototype.createDataChannel;me.RTCPeerConnection.prototype.createDataChannel=function(){var B=Ze.apply(this,arguments);return ge(B,this),B},U.wrapPeerConnectionEvent(me,"datachannel",function(fe){return ge(fe.channel,fe.target),fe})}function Oe(me){if(!(!me.RTCPeerConnection||"connectionState"in me.RTCPeerConnection.prototype)){var ge=me.RTCPeerConnection.prototype;Object.defineProperty(ge,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(ge,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(fe){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),fe&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=fe)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(function(Ze){var fe=ge[Ze];ge[Ze]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=function(B){var te=B.target;if(te._lastConnectionState!==te.connectionState){te._lastConnectionState=te.connectionState;var oe=new Event("connectionstatechange",B);te.dispatchEvent(oe)}return B},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),fe.apply(this,arguments)}})}}function be(me){if(me.RTCPeerConnection){var ge=U.detectBrowser(me);if(!(ge.browser==="chrome"&&ge.version>=71)){var Ze=me.RTCPeerConnection.prototype.setRemoteDescription;me.RTCPeerConnection.prototype.setRemoteDescription=function(B){return B&&B.sdp&&B.sdp.indexOf(`
a=extmap-allow-mixed`)!==-1&&(B.sdp=B.sdp.split(`
`).filter(function(te){return te.trim()!=="a=extmap-allow-mixed"}).join(`
`)),Ze.apply(this,arguments)}}}}},{"./utils":15,sdp:17}],7:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.shimGetDisplayMedia=w.shimGetUserMedia=void 0;var T=Z("./getusermedia");Object.defineProperty(w,"shimGetUserMedia",{enumerable:!0,get:function(){return T.shimGetUserMedia}});var R=Z("./getdisplaymedia");Object.defineProperty(w,"shimGetDisplayMedia",{enumerable:!0,get:function(){return R.shimGetDisplayMedia}}),w.shimPeerConnection=re,w.shimReplaceTrack=Oe;var N=Z("../utils"),z=se(N),U=Z("./filtericeservers"),ue=Z("rtcpeerconnection-shim"),pe=de(ue);function de(be){return be&&be.__esModule?be:{default:be}}function se(be){if(be&&be.__esModule)return be;var me={};if(be!=null)for(var ge in be)Object.prototype.hasOwnProperty.call(be,ge)&&(me[ge]=be[ge]);return me.default=be,me}function re(be){var me=z.detectBrowser(be);if(be.RTCIceGatherer&&(be.RTCIceCandidate||(be.RTCIceCandidate=function(B){return B}),be.RTCSessionDescription||(be.RTCSessionDescription=function(B){return B}),me.version<15025)){var ge=Object.getOwnPropertyDescriptor(be.MediaStreamTrack.prototype,"enabled");Object.defineProperty(be.MediaStreamTrack.prototype,"enabled",{set:function(B){ge.set.call(this,B);var te=new Event("enabled");te.enabled=B,this.dispatchEvent(te)}})}be.RTCRtpSender&&!("dtmf"in be.RTCRtpSender.prototype)&&Object.defineProperty(be.RTCRtpSender.prototype,"dtmf",{get:function(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=new be.RTCDtmfSender(this):this.track.kind==="video"&&(this._dtmf=null)),this._dtmf}}),be.RTCDtmfSender&&!be.RTCDTMFSender&&(be.RTCDTMFSender=be.RTCDtmfSender);var Ze=(0,pe.default)(be,me.version);be.RTCPeerConnection=function(B){return B&&B.iceServers&&(B.iceServers=(0,U.filterIceServers)(B.iceServers,me.version),z.log("ICE servers after filtering:",B.iceServers)),new Ze(B)},be.RTCPeerConnection.prototype=Ze.prototype}function Oe(be){be.RTCRtpSender&&!("replaceTrack"in be.RTCRtpSender.prototype)&&(be.RTCRtpSender.prototype.replaceTrack=be.RTCRtpSender.prototype.setTrack)}},{"../utils":15,"./filtericeservers":8,"./getdisplaymedia":9,"./getusermedia":10,"rtcpeerconnection-shim":16}],8:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.filterIceServers=z;var T=Z("../utils"),R=N(T);function N(U){if(U&&U.__esModule)return U;var ue={};if(U!=null)for(var pe in U)Object.prototype.hasOwnProperty.call(U,pe)&&(ue[pe]=U[pe]);return ue.default=U,ue}function z(U,ue){var pe=!1;return U=JSON.parse(JSON.stringify(U)),U.filter(function(de){if(de&&(de.urls||de.url)){var se=de.urls||de.url;de.url&&!de.urls&&R.deprecated("RTCIceServer.url","RTCIceServer.urls");var re=typeof se=="string";return re&&(se=[se]),se=se.filter(function(Oe){if(Oe.indexOf("stun:")===0)return!1;var be=Oe.startsWith("turn")&&!Oe.startsWith("turn:[")&&Oe.includes("transport=udp");return be&&!pe?(pe=!0,!0):be&&!pe}),delete de.url,de.urls=re?se[0]:se,!!se.length}})}},{"../utils":15}],9:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.shimGetDisplayMedia=T;function T(R){"getDisplayMedia"in R.navigator&&R.navigator.mediaDevices&&(R.navigator.mediaDevices&&"getDisplayMedia"in R.navigator.mediaDevices||(R.navigator.mediaDevices.getDisplayMedia=R.navigator.getDisplayMedia.bind(R.navigator)))}},{}],10:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.shimGetUserMedia=T;function T(R){var N=R&&R.navigator,z=function(pe){return{name:{PermissionDeniedError:"NotAllowedError"}[pe.name]||pe.name,message:pe.message,constraint:pe.constraint,toString:function(){return this.name}}},U=N.mediaDevices.getUserMedia.bind(N.mediaDevices);N.mediaDevices.getUserMedia=function(ue){return U(ue).catch(function(pe){return Promise.reject(z(pe))})}}},{}],11:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.shimGetDisplayMedia=w.shimGetUserMedia=void 0;var T=typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?function(B){return t(B)}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":t(B)},R=Z("./getusermedia");Object.defineProperty(w,"shimGetUserMedia",{enumerable:!0,get:function(){return R.shimGetUserMedia}});var N=Z("./getdisplaymedia");Object.defineProperty(w,"shimGetDisplayMedia",{enumerable:!0,get:function(){return N.shimGetDisplayMedia}}),w.shimOnTrack=de,w.shimPeerConnection=se,w.shimSenderGetStats=re,w.shimReceiverGetStats=Oe,w.shimRemoveStream=be,w.shimRTCDataChannel=me,w.shimAddTransceiver=ge,w.shimCreateOffer=Ze,w.shimCreateAnswer=fe;var z=Z("../utils"),U=ue(z);function ue(B){if(B&&B.__esModule)return B;var te={};if(B!=null)for(var oe in B)Object.prototype.hasOwnProperty.call(B,oe)&&(te[oe]=B[oe]);return te.default=B,te}function pe(B,te,oe){return te in B?Object.defineProperty(B,te,{value:oe,enumerable:!0,configurable:!0,writable:!0}):B[te]=oe,B}function de(B){(typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCTrackEvent&&"receiver"in B.RTCTrackEvent.prototype&&!("transceiver"in B.RTCTrackEvent.prototype)&&Object.defineProperty(B.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function se(B){var te=U.detectBrowser(B);if(!((typeof B=="undefined"?"undefined":T(B))!=="object"||!(B.RTCPeerConnection||B.mozRTCPeerConnection))){if(!B.RTCPeerConnection&&B.mozRTCPeerConnection&&(B.RTCPeerConnection=B.mozRTCPeerConnection),te.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(nt){var at=B.RTCPeerConnection.prototype[nt],St=pe({},nt,function(){return arguments[0]=new(nt==="addIceCandidate"?B.RTCIceCandidate:B.RTCSessionDescription)(arguments[0]),at.apply(this,arguments)});B.RTCPeerConnection.prototype[nt]=St[nt]}),te.version<68){var oe=B.RTCPeerConnection.prototype.addIceCandidate;B.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&arguments[0].candidate===""?Promise.resolve():oe.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}var Ie={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},Ge=B.RTCPeerConnection.prototype.getStats;B.RTCPeerConnection.prototype.getStats=function(){var at=Array.prototype.slice.call(arguments),St=at[0],zt=at[1],qt=at[2];return Ge.apply(this,[St||null]).then(function(kt){if(te.version<53&&!zt)try{kt.forEach(function(On){On.type=Ie[On.type]||On.type})}catch(On){if(On.name!=="TypeError")throw On;kt.forEach(function(Wn,Vn){kt.set(Vn,Object.assign({},Wn,{type:Ie[Wn.type]||Wn.type}))})}return kt}).then(zt,qt)}}}function re(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection&&B.RTCRtpSender&&!(B.RTCRtpSender&&"getStats"in B.RTCRtpSender.prototype)){var te=B.RTCPeerConnection.prototype.getSenders;te&&(B.RTCPeerConnection.prototype.getSenders=function(){var Ge=this,nt=te.apply(this,[]);return nt.forEach(function(at){return at._pc=Ge}),nt});var oe=B.RTCPeerConnection.prototype.addTrack;oe&&(B.RTCPeerConnection.prototype.addTrack=function(){var Ge=oe.apply(this,arguments);return Ge._pc=this,Ge}),B.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}}function Oe(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection&&B.RTCRtpSender&&!(B.RTCRtpSender&&"getStats"in B.RTCRtpReceiver.prototype)){var te=B.RTCPeerConnection.prototype.getReceivers;te&&(B.RTCPeerConnection.prototype.getReceivers=function(){var Ie=this,Ge=te.apply(this,[]);return Ge.forEach(function(nt){return nt._pc=Ie}),Ge}),U.wrapPeerConnectionEvent(B,"track",function(oe){return oe.receiver._pc=oe.srcElement,oe}),B.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}}function be(B){!B.RTCPeerConnection||"removeStream"in B.RTCPeerConnection.prototype||(B.RTCPeerConnection.prototype.removeStream=function(oe){var Ie=this;U.deprecated("removeStream","removeTrack"),this.getSenders().forEach(function(Ge){Ge.track&&oe.getTracks().includes(Ge.track)&&Ie.removeTrack(Ge)})})}function me(B){B.DataChannel&&!B.RTCDataChannel&&(B.RTCDataChannel=B.DataChannel)}function ge(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection){var te=B.RTCPeerConnection.prototype.addTransceiver;te&&(B.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var Ie=arguments[1],Ge=Ie&&"sendEncodings"in Ie;Ge&&Ie.sendEncodings.forEach(function(zt){if("rid"in zt){var qt=/^[a-z0-9]{0,16}$/i;if(!qt.test(zt.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in zt&&!(parseFloat(zt.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in zt&&!(parseFloat(zt.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});var nt=te.apply(this,arguments);if(Ge){var at=nt.sender,St=at.getParameters();"encodings"in St||(St.encodings=Ie.sendEncodings,this.setParametersPromises.push(at.setParameters(St).catch(function(){})))}return nt})}}function Ze(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection){var te=B.RTCPeerConnection.prototype.createOffer;B.RTCPeerConnection.prototype.createOffer=function(){var Ie=this,Ge=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return te.apply(Ie,Ge)}).finally(function(){Ie.setParametersPromises=[]}):te.apply(this,arguments)}}}function fe(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection){var te=B.RTCPeerConnection.prototype.createAnswer;B.RTCPeerConnection.prototype.createAnswer=function(){var Ie=this,Ge=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return te.apply(Ie,Ge)}).finally(function(){Ie.setParametersPromises=[]}):te.apply(this,arguments)}}}},{"../utils":15,"./getdisplaymedia":12,"./getusermedia":13}],12:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.shimGetDisplayMedia=T;function T(R,N){R.navigator.mediaDevices&&"getDisplayMedia"in R.navigator.mediaDevices||R.navigator.mediaDevices&&(R.navigator.mediaDevices.getDisplayMedia=function(U){if(!(U&&U.video)){var ue=new DOMException("getDisplayMedia without video constraints is undefined");return ue.name="NotFoundError",ue.code=8,Promise.reject(ue)}return U.video===!0?U.video={mediaSource:N}:U.video.mediaSource=N,R.navigator.mediaDevices.getUserMedia(U)})}},{}],13:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0});var T=typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?function(ue){return t(ue)}:function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":t(ue)};w.shimGetUserMedia=U;var R=Z("../utils"),N=z(R);function z(ue){if(ue&&ue.__esModule)return ue;var pe={};if(ue!=null)for(var de in ue)Object.prototype.hasOwnProperty.call(ue,de)&&(pe[de]=ue[de]);return pe.default=ue,pe}function U(ue){var pe=N.detectBrowser(ue),de=ue&&ue.navigator,se=ue&&ue.MediaStreamTrack;if(de.getUserMedia=function(ge,Ze,fe){N.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),de.mediaDevices.getUserMedia(ge).then(Ze,fe)},!(pe.version>55&&"autoGainControl"in de.mediaDevices.getSupportedConstraints())){var re=function(Ze,fe,B){fe in Ze&&!(B in Ze)&&(Ze[B]=Ze[fe],delete Ze[fe])},Oe=de.mediaDevices.getUserMedia.bind(de.mediaDevices);if(de.mediaDevices.getUserMedia=function(ge){return(typeof ge=="undefined"?"undefined":T(ge))==="object"&&T(ge.audio)==="object"&&(ge=JSON.parse(JSON.stringify(ge)),re(ge.audio,"autoGainControl","mozAutoGainControl"),re(ge.audio,"noiseSuppression","mozNoiseSuppression")),Oe(ge)},se&&se.prototype.getSettings){var be=se.prototype.getSettings;se.prototype.getSettings=function(){var ge=be.apply(this,arguments);return re(ge,"mozAutoGainControl","autoGainControl"),re(ge,"mozNoiseSuppression","noiseSuppression"),ge}}if(se&&se.prototype.applyConstraints){var me=se.prototype.applyConstraints;se.prototype.applyConstraints=function(ge){return this.kind==="audio"&&(typeof ge=="undefined"?"undefined":T(ge))==="object"&&(ge=JSON.parse(JSON.stringify(ge)),re(ge,"autoGainControl","mozAutoGainControl"),re(ge,"noiseSuppression","mozNoiseSuppression")),me.apply(this,[ge])}}}}},{"../utils":15}],14:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0});var T=typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?function(me){return t(me)}:function(me){return me&&typeof Symbol=="function"&&me.constructor===Symbol&&me!==Symbol.prototype?"symbol":t(me)};w.shimLocalStreamsAPI=U,w.shimRemoteStreamsAPI=ue,w.shimCallbacksAPI=pe,w.shimGetUserMedia=de,w.shimConstraints=se,w.shimRTCIceServerUrls=re,w.shimTrackEventTransceiver=Oe,w.shimCreateOfferLegacy=be;var R=Z("../utils"),N=z(R);function z(me){if(me&&me.__esModule)return me;var ge={};if(me!=null)for(var Ze in me)Object.prototype.hasOwnProperty.call(me,Ze)&&(ge[Ze]=me[Ze]);return ge.default=me,ge}function U(me){if(!((typeof me=="undefined"?"undefined":T(me))!=="object"||!me.RTCPeerConnection)){if("getLocalStreams"in me.RTCPeerConnection.prototype||(me.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in me.RTCPeerConnection.prototype)){var ge=me.RTCPeerConnection.prototype.addTrack;me.RTCPeerConnection.prototype.addStream=function(fe){var B=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(fe)||this._localStreams.push(fe),fe.getAudioTracks().forEach(function(te){return ge.call(B,te,fe)}),fe.getVideoTracks().forEach(function(te){return ge.call(B,te,fe)})},me.RTCPeerConnection.prototype.addTrack=function(fe){var B=arguments[1];return B&&(this._localStreams?this._localStreams.includes(B)||this._localStreams.push(B):this._localStreams=[B]),ge.apply(this,arguments)}}"removeStream"in me.RTCPeerConnection.prototype||(me.RTCPeerConnection.prototype.removeStream=function(fe){var B=this;this._localStreams||(this._localStreams=[]);var te=this._localStreams.indexOf(fe);if(te!==-1){this._localStreams.splice(te,1);var oe=fe.getTracks();this.getSenders().forEach(function(Ie){oe.includes(Ie.track)&&B.removeTrack(Ie)})}})}}function ue(me){if(!((typeof me=="undefined"?"undefined":T(me))!=="object"||!me.RTCPeerConnection)&&("getRemoteStreams"in me.RTCPeerConnection.prototype||(me.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in me.RTCPeerConnection.prototype))){Object.defineProperty(me.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(fe){var B=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=fe),this.addEventListener("track",this._onaddstreampoly=function(te){te.streams.forEach(function(oe){if(B._remoteStreams||(B._remoteStreams=[]),!B._remoteStreams.includes(oe)){B._remoteStreams.push(oe);var Ie=new Event("addstream");Ie.stream=oe,B.dispatchEvent(Ie)}})})}});var ge=me.RTCPeerConnection.prototype.setRemoteDescription;me.RTCPeerConnection.prototype.setRemoteDescription=function(){var fe=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(B){B.streams.forEach(function(te){if(fe._remoteStreams||(fe._remoteStreams=[]),!(fe._remoteStreams.indexOf(te)>=0)){fe._remoteStreams.push(te);var oe=new Event("addstream");oe.stream=te,fe.dispatchEvent(oe)}})}),ge.apply(fe,arguments)}}}function pe(me){if(!((typeof me=="undefined"?"undefined":T(me))!=="object"||!me.RTCPeerConnection)){var ge=me.RTCPeerConnection.prototype,Ze=ge.createOffer,fe=ge.createAnswer,B=ge.setLocalDescription,te=ge.setRemoteDescription,oe=ge.addIceCandidate;ge.createOffer=function(nt,at){var St=arguments.length>=2?arguments[2]:arguments[0],zt=Ze.apply(this,[St]);return at?(zt.then(nt,at),Promise.resolve()):zt},ge.createAnswer=function(nt,at){var St=arguments.length>=2?arguments[2]:arguments[0],zt=fe.apply(this,[St]);return at?(zt.then(nt,at),Promise.resolve()):zt};var Ie=function(nt,at,St){var zt=B.apply(this,[nt]);return St?(zt.then(at,St),Promise.resolve()):zt};ge.setLocalDescription=Ie,Ie=function(nt,at,St){var zt=te.apply(this,[nt]);return St?(zt.then(at,St),Promise.resolve()):zt},ge.setRemoteDescription=Ie,Ie=function(nt,at,St){var zt=oe.apply(this,[nt]);return St?(zt.then(at,St),Promise.resolve()):zt},ge.addIceCandidate=Ie}}function de(me){var ge=me&&me.navigator;if(ge.mediaDevices&&ge.mediaDevices.getUserMedia){var Ze=ge.mediaDevices,fe=Ze.getUserMedia.bind(Ze);ge.mediaDevices.getUserMedia=function(B){return fe(se(B))}}!ge.getUserMedia&&ge.mediaDevices&&ge.mediaDevices.getUserMedia&&(ge.getUserMedia=function(te,oe,Ie){ge.mediaDevices.getUserMedia(te).then(oe,Ie)}.bind(ge))}function se(me){return me&&me.video!==void 0?Object.assign({},me,{video:N.compactObject(me.video)}):me}function re(me){var ge=me.RTCPeerConnection;me.RTCPeerConnection=function(fe,B){if(fe&&fe.iceServers){for(var te=[],oe=0;oe<fe.iceServers.length;oe++){var Ie=fe.iceServers[oe];!Ie.hasOwnProperty("urls")&&Ie.hasOwnProperty("url")?(N.deprecated("RTCIceServer.url","RTCIceServer.urls"),Ie=JSON.parse(JSON.stringify(Ie)),Ie.urls=Ie.url,delete Ie.url,te.push(Ie)):te.push(fe.iceServers[oe])}fe.iceServers=te}return new ge(fe,B)},me.RTCPeerConnection.prototype=ge.prototype,"generateCertificate"in me.RTCPeerConnection&&Object.defineProperty(me.RTCPeerConnection,"generateCertificate",{get:function(){return ge.generateCertificate}})}function Oe(me){(typeof me=="undefined"?"undefined":T(me))==="object"&&me.RTCTrackEvent&&"receiver"in me.RTCTrackEvent.prototype&&!("transceiver"in me.RTCTrackEvent.prototype)&&Object.defineProperty(me.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function be(me){var ge=me.RTCPeerConnection.prototype.createOffer;me.RTCPeerConnection.prototype.createOffer=function(fe){if(fe){typeof fe.offerToReceiveAudio!="undefined"&&(fe.offerToReceiveAudio=!!fe.offerToReceiveAudio);var B=this.getTransceivers().find(function(oe){return oe.receiver.track.kind==="audio"});fe.offerToReceiveAudio===!1&&B?B.direction==="sendrecv"?B.setDirection?B.setDirection("sendonly"):B.direction="sendonly":B.direction==="recvonly"&&(B.setDirection?B.setDirection("inactive"):B.direction="inactive"):fe.offerToReceiveAudio===!0&&!B&&this.addTransceiver("audio"),typeof fe.offerToReceiveVideo!="undefined"&&(fe.offerToReceiveVideo=!!fe.offerToReceiveVideo);var te=this.getTransceivers().find(function(oe){return oe.receiver.track.kind==="video"});fe.offerToReceiveVideo===!1&&te?te.direction==="sendrecv"?te.setDirection?te.setDirection("sendonly"):te.direction="sendonly":te.direction==="recvonly"&&(te.setDirection?te.setDirection("inactive"):te.direction="inactive"):fe.offerToReceiveVideo===!0&&!te&&this.addTransceiver("video")}return ge.apply(this,arguments)}}},{"../utils":15}],15:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0});var T=typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?function(fe){return t(fe)}:function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":t(fe)};w.extractVersion=U,w.wrapPeerConnectionEvent=ue,w.disableLog=pe,w.disableWarnings=de,w.log=se,w.deprecated=re,w.detectBrowser=Oe,w.compactObject=me,w.walkStats=ge,w.filterStats=Ze;function R(fe,B,te){return B in fe?Object.defineProperty(fe,B,{value:te,enumerable:!0,configurable:!0,writable:!0}):fe[B]=te,fe}var N=!0,z=!0;function U(fe,B,te){var oe=fe.match(B);return oe&&oe.length>=te&&parseInt(oe[te],10)}function ue(fe,B,te){if(fe.RTCPeerConnection){var oe=fe.RTCPeerConnection.prototype,Ie=oe.addEventListener;oe.addEventListener=function(nt,at){if(nt!==B)return Ie.apply(this,arguments);var St=function(qt){var kt=te(qt);kt&&at(kt)};return this._eventMap=this._eventMap||{},this._eventMap[at]=St,Ie.apply(this,[nt,St])};var Ge=oe.removeEventListener;oe.removeEventListener=function(nt,at){if(nt!==B||!this._eventMap||!this._eventMap[at])return Ge.apply(this,arguments);var St=this._eventMap[at];return delete this._eventMap[at],Ge.apply(this,[nt,St])},Object.defineProperty(oe,"on"+B,{get:function(){return this["_on"+B]},set:function(at){this["_on"+B]&&(this.removeEventListener(B,this["_on"+B]),delete this["_on"+B]),at&&this.addEventListener(B,this["_on"+B]=at)},enumerable:!0,configurable:!0})}}function pe(fe){return typeof fe!="boolean"?new Error("Argument type: "+(typeof fe=="undefined"?"undefined":T(fe))+". Please use a boolean."):(N=fe,fe?"adapter.js logging disabled":"adapter.js logging enabled")}function de(fe){return typeof fe!="boolean"?new Error("Argument type: "+(typeof fe=="undefined"?"undefined":T(fe))+". Please use a boolean."):(z=!fe,"adapter.js deprecation warnings "+(fe?"disabled":"enabled"))}function se(){if((typeof window=="undefined"?"undefined":T(window))==="object"){if(N)return;typeof console!="undefined"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function re(fe,B){z&&console.warn(fe+" is deprecated, please use "+B+" instead.")}function Oe(fe){var B=fe.navigator,te={browser:null,version:null};if(typeof fe=="undefined"||!fe.navigator)return te.browser="Not a browser.",te;if(B.mozGetUserMedia)te.browser="firefox",te.version=U(B.userAgent,/Firefox\/(\d+)\./,1);else if(B.webkitGetUserMedia||fe.isSecureContext===!1&&fe.webkitRTCPeerConnection&&!fe.RTCIceGatherer)te.browser="chrome",te.version=U(B.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(B.mediaDevices&&B.userAgent.match(/Edge\/(\d+).(\d+)$/))te.browser="edge",te.version=U(B.userAgent,/Edge\/(\d+).(\d+)$/,2);else if(fe.RTCPeerConnection&&B.userAgent.match(/AppleWebKit\/(\d+)\./))te.browser="safari",te.version=U(B.userAgent,/AppleWebKit\/(\d+)\./,1),te.supportsUnifiedPlan=fe.RTCRtpTransceiver&&"currentDirection"in fe.RTCRtpTransceiver.prototype;else return te.browser="Not a supported browser.",te;return te}function be(fe){return Object.prototype.toString.call(fe)==="[object Object]"}function me(fe){return be(fe)?Object.keys(fe).reduce(function(B,te){var oe=be(fe[te]),Ie=oe?me(fe[te]):fe[te],Ge=oe&&!Object.keys(Ie).length;return Ie===void 0||Ge?B:Object.assign(B,R({},te,Ie))},{}):fe}function ge(fe,B,te){!B||te.has(B.id)||(te.set(B.id,B),Object.keys(B).forEach(function(oe){oe.endsWith("Id")?ge(fe,fe.get(B[oe]),te):oe.endsWith("Ids")&&B[oe].forEach(function(Ie){ge(fe,fe.get(Ie),te)})}))}function Ze(fe,B,te){var oe=te?"outbound-rtp":"inbound-rtp",Ie=new Map;if(B===null)return Ie;var Ge=[];return fe.forEach(function(nt){nt.type==="track"&&nt.trackIdentifier===B.id&&Ge.push(nt)}),Ge.forEach(function(nt){fe.forEach(function(at){at.type===oe&&at.trackId===nt.id&&ge(fe,at,Ie)})}),Ie}},{}],16:[function(Z,H,w){var T=Z("sdp");function R(se){return{inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[se.type]||se.type}function N(se,re,Oe,be,me){var ge=T.writeRtpDescription(se.kind,re);if(ge+=T.writeIceParameters(se.iceGatherer.getLocalParameters()),ge+=T.writeDtlsParameters(se.dtlsTransport.getLocalParameters(),Oe==="offer"?"actpass":me||"active"),ge+="a=mid:"+se.mid+`\r
`,se.rtpSender&&se.rtpReceiver?ge+=`a=sendrecv\r
`:se.rtpSender?ge+=`a=sendonly\r
`:se.rtpReceiver?ge+=`a=recvonly\r
`:ge+=`a=inactive\r
`,se.rtpSender){var Ze=se.rtpSender._initialTrackId||se.rtpSender.track.id;se.rtpSender._initialTrackId=Ze;var fe="msid:"+(be?be.id:"-")+" "+Ze+`\r
`;ge+="a="+fe,ge+="a=ssrc:"+se.sendEncodingParameters[0].ssrc+" "+fe,se.sendEncodingParameters[0].rtx&&(ge+="a=ssrc:"+se.sendEncodingParameters[0].rtx.ssrc+" "+fe,ge+="a=ssrc-group:FID "+se.sendEncodingParameters[0].ssrc+" "+se.sendEncodingParameters[0].rtx.ssrc+`\r
`)}return ge+="a=ssrc:"+se.sendEncodingParameters[0].ssrc+" cname:"+T.localCName+`\r
`,se.rtpSender&&se.sendEncodingParameters[0].rtx&&(ge+="a=ssrc:"+se.sendEncodingParameters[0].rtx.ssrc+" cname:"+T.localCName+`\r
`),ge}function z(se,re){var Oe=!1;return se=JSON.parse(JSON.stringify(se)),se.filter(function(be){if(be&&(be.urls||be.url)){var me=be.urls||be.url;be.url&&!be.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var ge=typeof me=="string";return ge&&(me=[me]),me=me.filter(function(Ze){var fe=Ze.indexOf("turn:")===0&&Ze.indexOf("transport=udp")!==-1&&Ze.indexOf("turn:[")===-1&&!Oe;return fe?(Oe=!0,!0):Ze.indexOf("stun:")===0&&re>=14393&&Ze.indexOf("?transport=udp")===-1}),delete be.url,be.urls=ge?me[0]:me,!!me.length}})}function U(se,re){var Oe={codecs:[],headerExtensions:[],fecMechanisms:[]},be=function(Ze,fe){Ze=parseInt(Ze,10);for(var B=0;B<fe.length;B++)if(fe[B].payloadType===Ze||fe[B].preferredPayloadType===Ze)return fe[B]},me=function(Ze,fe,B,te){var oe=be(Ze.parameters.apt,B),Ie=be(fe.parameters.apt,te);return oe&&Ie&&oe.name.toLowerCase()===Ie.name.toLowerCase()};return se.codecs.forEach(function(ge){for(var Ze=0;Ze<re.codecs.length;Ze++){var fe=re.codecs[Ze];if(ge.name.toLowerCase()===fe.name.toLowerCase()&&ge.clockRate===fe.clockRate){if(ge.name.toLowerCase()==="rtx"&&ge.parameters&&fe.parameters.apt&&!me(ge,fe,se.codecs,re.codecs))continue;fe=JSON.parse(JSON.stringify(fe)),fe.numChannels=Math.min(ge.numChannels,fe.numChannels),Oe.codecs.push(fe),fe.rtcpFeedback=fe.rtcpFeedback.filter(function(B){for(var te=0;te<ge.rtcpFeedback.length;te++)if(ge.rtcpFeedback[te].type===B.type&&ge.rtcpFeedback[te].parameter===B.parameter)return!0;return!1});break}}}),se.headerExtensions.forEach(function(ge){for(var Ze=0;Ze<re.headerExtensions.length;Ze++){var fe=re.headerExtensions[Ze];if(ge.uri===fe.uri){Oe.headerExtensions.push(fe);break}}}),Oe}function ue(se,re,Oe){return{offer:{setLocalDescription:["stable","have-local-offer"],setRemoteDescription:["stable","have-remote-offer"]},answer:{setLocalDescription:["have-remote-offer","have-local-pranswer"],setRemoteDescription:["have-local-offer","have-remote-pranswer"]}}[re][se].indexOf(Oe)!==-1}function pe(se,re){var Oe=se.getRemoteCandidates().find(function(be){return re.foundation===be.foundation&&re.ip===be.ip&&re.port===be.port&&re.priority===be.priority&&re.protocol===be.protocol&&re.type===be.type});return Oe||se.addRemoteCandidate(re),!Oe}function de(se,re){var Oe=new Error(re);return Oe.name=se,Oe.code={NotSupportedError:9,InvalidStateError:11,InvalidAccessError:15,TypeError:void 0,OperationError:void 0}[se],Oe}H.exports=function(se,re){function Oe(B,te){te.addTrack(B),te.dispatchEvent(new se.MediaStreamTrackEvent("addtrack",{track:B}))}function be(B,te){te.removeTrack(B),te.dispatchEvent(new se.MediaStreamTrackEvent("removetrack",{track:B}))}function me(B,te,oe,Ie){var Ge=new Event("track");Ge.track=te,Ge.receiver=oe,Ge.transceiver={receiver:oe},Ge.streams=Ie,se.setTimeout(function(){B._dispatchEvent("track",Ge)})}var ge=function(te){var oe=this,Ie=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach(function(nt){oe[nt]=Ie[nt].bind(Ie)}),this.canTrickleIceCandidates=null,this.needNegotiation=!1,this.localStreams=[],this.remoteStreams=[],this._localDescription=null,this._remoteDescription=null,this.signalingState="stable",this.iceConnectionState="new",this.connectionState="new",this.iceGatheringState="new",te=JSON.parse(JSON.stringify(te||{})),this.usingBundle=te.bundlePolicy==="max-bundle",te.rtcpMuxPolicy==="negotiate")throw de("NotSupportedError","rtcpMuxPolicy 'negotiate' is not supported");switch(te.rtcpMuxPolicy||(te.rtcpMuxPolicy="require"),te.iceTransportPolicy){case"all":case"relay":break;default:te.iceTransportPolicy="all";break}switch(te.bundlePolicy){case"balanced":case"max-compat":case"max-bundle":break;default:te.bundlePolicy="balanced";break}if(te.iceServers=z(te.iceServers||[],re),this._iceGatherers=[],te.iceCandidatePoolSize)for(var Ge=te.iceCandidatePoolSize;Ge>0;Ge--)this._iceGatherers.push(new se.RTCIceGatherer({iceServers:te.iceServers,gatherPolicy:te.iceTransportPolicy}));else te.iceCandidatePoolSize=0;this._config=te,this.transceivers=[],this._sdpSessionId=T.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(ge.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(ge.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),ge.prototype.onicecandidate=null,ge.prototype.onaddstream=null,ge.prototype.ontrack=null,ge.prototype.onremovestream=null,ge.prototype.onsignalingstatechange=null,ge.prototype.oniceconnectionstatechange=null,ge.prototype.onconnectionstatechange=null,ge.prototype.onicegatheringstatechange=null,ge.prototype.onnegotiationneeded=null,ge.prototype.ondatachannel=null,ge.prototype._dispatchEvent=function(B,te){this._isClosed||(this.dispatchEvent(te),typeof this["on"+B]=="function"&&this["on"+B](te))},ge.prototype._emitGatheringStateChange=function(){var B=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",B)},ge.prototype.getConfiguration=function(){return this._config},ge.prototype.getLocalStreams=function(){return this.localStreams},ge.prototype.getRemoteStreams=function(){return this.remoteStreams},ge.prototype._createTransceiver=function(B,te){var oe=this.transceivers.length>0,Ie={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:B,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&oe)Ie.iceTransport=this.transceivers[0].iceTransport,Ie.dtlsTransport=this.transceivers[0].dtlsTransport;else{var Ge=this._createIceAndDtlsTransports();Ie.iceTransport=Ge.iceTransport,Ie.dtlsTransport=Ge.dtlsTransport}return te||this.transceivers.push(Ie),Ie},ge.prototype.addTrack=function(B,te){if(this._isClosed)throw de("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var oe=this.transceivers.find(function(nt){return nt.track===B});if(oe)throw de("InvalidAccessError","Track already exists.");for(var Ie,Ge=0;Ge<this.transceivers.length;Ge++)!this.transceivers[Ge].track&&this.transceivers[Ge].kind===B.kind&&(Ie=this.transceivers[Ge]);return Ie||(Ie=this._createTransceiver(B.kind)),this._maybeFireNegotiationNeeded(),this.localStreams.indexOf(te)===-1&&this.localStreams.push(te),Ie.track=B,Ie.stream=te,Ie.rtpSender=new se.RTCRtpSender(B,Ie.dtlsTransport),Ie.rtpSender},ge.prototype.addStream=function(B){var te=this;if(re>=15025)B.getTracks().forEach(function(Ie){te.addTrack(Ie,B)});else{var oe=B.clone();B.getTracks().forEach(function(Ie,Ge){var nt=oe.getTracks()[Ge];Ie.addEventListener("enabled",function(at){nt.enabled=at.enabled})}),oe.getTracks().forEach(function(Ie){te.addTrack(Ie,oe)})}},ge.prototype.removeTrack=function(B){if(this._isClosed)throw de("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(B instanceof se.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var te=this.transceivers.find(function(Ge){return Ge.rtpSender===B});if(!te)throw de("InvalidAccessError","Sender was not created by this connection.");var oe=te.stream;te.rtpSender.stop(),te.rtpSender=null,te.track=null,te.stream=null;var Ie=this.transceivers.map(function(Ge){return Ge.stream});Ie.indexOf(oe)===-1&&this.localStreams.indexOf(oe)>-1&&this.localStreams.splice(this.localStreams.indexOf(oe),1),this._maybeFireNegotiationNeeded()},ge.prototype.removeStream=function(B){var te=this;B.getTracks().forEach(function(oe){var Ie=te.getSenders().find(function(Ge){return Ge.track===oe});Ie&&te.removeTrack(Ie)})},ge.prototype.getSenders=function(){return this.transceivers.filter(function(B){return!!B.rtpSender}).map(function(B){return B.rtpSender})},ge.prototype.getReceivers=function(){return this.transceivers.filter(function(B){return!!B.rtpReceiver}).map(function(B){return B.rtpReceiver})},ge.prototype._createIceGatherer=function(B,te){var oe=this;if(te&&B>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var Ie=new se.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(Ie,"state",{value:"new",writable:!0}),this.transceivers[B].bufferedCandidateEvents=[],this.transceivers[B].bufferCandidates=function(Ge){var nt=!Ge.candidate||Object.keys(Ge.candidate).length===0;Ie.state=nt?"completed":"gathering",oe.transceivers[B].bufferedCandidateEvents!==null&&oe.transceivers[B].bufferedCandidateEvents.push(Ge)},Ie.addEventListener("localcandidate",this.transceivers[B].bufferCandidates),Ie},ge.prototype._gather=function(B,te){var oe=this,Ie=this.transceivers[te].iceGatherer;if(!Ie.onlocalcandidate){var Ge=this.transceivers[te].bufferedCandidateEvents;this.transceivers[te].bufferedCandidateEvents=null,Ie.removeEventListener("localcandidate",this.transceivers[te].bufferCandidates),Ie.onlocalcandidate=function(nt){if(!(oe.usingBundle&&te>0)){var at=new Event("icecandidate");at.candidate={sdpMid:B,sdpMLineIndex:te};var St=nt.candidate,zt=!St||Object.keys(St).length===0;if(zt)(Ie.state==="new"||Ie.state==="gathering")&&(Ie.state="completed");else{Ie.state==="new"&&(Ie.state="gathering"),St.component=1,St.ufrag=Ie.getLocalParameters().usernameFragment;var qt=T.writeCandidate(St);at.candidate=Object.assign(at.candidate,T.parseCandidate(qt)),at.candidate.candidate=qt,at.candidate.toJSON=function(){return{candidate:at.candidate.candidate,sdpMid:at.candidate.sdpMid,sdpMLineIndex:at.candidate.sdpMLineIndex,usernameFragment:at.candidate.usernameFragment}}}var kt=T.getMediaSections(oe._localDescription.sdp);zt?kt[at.candidate.sdpMLineIndex]+=`a=end-of-candidates\r
`:kt[at.candidate.sdpMLineIndex]+="a="+at.candidate.candidate+`\r
`,oe._localDescription.sdp=T.getDescription(oe._localDescription.sdp)+kt.join("");var On=oe.transceivers.every(function(Wn){return Wn.iceGatherer&&Wn.iceGatherer.state==="completed"});oe.iceGatheringState!=="gathering"&&(oe.iceGatheringState="gathering",oe._emitGatheringStateChange()),zt||oe._dispatchEvent("icecandidate",at),On&&(oe._dispatchEvent("icecandidate",new Event("icecandidate")),oe.iceGatheringState="complete",oe._emitGatheringStateChange())}},se.setTimeout(function(){Ge.forEach(function(nt){Ie.onlocalcandidate(nt)})},0)}},ge.prototype._createIceAndDtlsTransports=function(){var B=this,te=new se.RTCIceTransport(null);te.onicestatechange=function(){B._updateIceConnectionState(),B._updateConnectionState()};var oe=new se.RTCDtlsTransport(te);return oe.ondtlsstatechange=function(){B._updateConnectionState()},oe.onerror=function(){Object.defineProperty(oe,"state",{value:"failed",writable:!0}),B._updateConnectionState()},{iceTransport:te,dtlsTransport:oe}},ge.prototype._disposeIceAndDtlsTransports=function(B){var te=this.transceivers[B].iceGatherer;te&&(delete te.onlocalcandidate,delete this.transceivers[B].iceGatherer);var oe=this.transceivers[B].iceTransport;oe&&(delete oe.onicestatechange,delete this.transceivers[B].iceTransport);var Ie=this.transceivers[B].dtlsTransport;Ie&&(delete Ie.ondtlsstatechange,delete Ie.onerror,delete this.transceivers[B].dtlsTransport)},ge.prototype._transceive=function(B,te,oe){var Ie=U(B.localCapabilities,B.remoteCapabilities);te&&B.rtpSender&&(Ie.encodings=B.sendEncodingParameters,Ie.rtcp={cname:T.localCName,compound:B.rtcpParameters.compound},B.recvEncodingParameters.length&&(Ie.rtcp.ssrc=B.recvEncodingParameters[0].ssrc),B.rtpSender.send(Ie)),oe&&B.rtpReceiver&&Ie.codecs.length>0&&(B.kind==="video"&&B.recvEncodingParameters&&re<15019&&B.recvEncodingParameters.forEach(function(Ge){delete Ge.rtx}),B.recvEncodingParameters.length?Ie.encodings=B.recvEncodingParameters:Ie.encodings=[{}],Ie.rtcp={compound:B.rtcpParameters.compound},B.rtcpParameters.cname&&(Ie.rtcp.cname=B.rtcpParameters.cname),B.sendEncodingParameters.length&&(Ie.rtcp.ssrc=B.sendEncodingParameters[0].ssrc),B.rtpReceiver.receive(Ie))},ge.prototype.setLocalDescription=function(B){var te=this;if(["offer","answer"].indexOf(B.type)===-1)return Promise.reject(de("TypeError",'Unsupported type "'+B.type+'"'));if(!ue("setLocalDescription",B.type,te.signalingState)||te._isClosed)return Promise.reject(de("InvalidStateError","Can not set local "+B.type+" in state "+te.signalingState));var oe,Ie;if(B.type==="offer")oe=T.splitSections(B.sdp),Ie=oe.shift(),oe.forEach(function(nt,at){var St=T.parseRtpParameters(nt);te.transceivers[at].localCapabilities=St}),te.transceivers.forEach(function(nt,at){te._gather(nt.mid,at)});else if(B.type==="answer"){oe=T.splitSections(te._remoteDescription.sdp),Ie=oe.shift();var Ge=T.matchPrefix(Ie,"a=ice-lite").length>0;oe.forEach(function(nt,at){var St=te.transceivers[at],zt=St.iceGatherer,qt=St.iceTransport,kt=St.dtlsTransport,On=St.localCapabilities,Wn=St.remoteCapabilities,Vn=T.isRejected(nt)&&T.matchPrefix(nt,"a=bundle-only").length===0;if(!Vn&&!St.rejected){var ii=T.getIceParameters(nt,Ie),ti=T.getDtlsParameters(nt,Ie);Ge&&(ti.role="server"),(!te.usingBundle||at===0)&&(te._gather(St.mid,at),qt.state==="new"&&qt.start(zt,ii,Ge?"controlling":"controlled"),kt.state==="new"&&kt.start(ti));var di=U(On,Wn);te._transceive(St,di.codecs.length>0,!1)}})}return te._localDescription={type:B.type,sdp:B.sdp},B.type==="offer"?te._updateSignalingState("have-local-offer"):te._updateSignalingState("stable"),Promise.resolve()},ge.prototype.setRemoteDescription=function(B){var te=this;if(["offer","answer"].indexOf(B.type)===-1)return Promise.reject(de("TypeError",'Unsupported type "'+B.type+'"'));if(!ue("setRemoteDescription",B.type,te.signalingState)||te._isClosed)return Promise.reject(de("InvalidStateError","Can not set remote "+B.type+" in state "+te.signalingState));var oe={};te.remoteStreams.forEach(function(qt){oe[qt.id]=qt});var Ie=[],Ge=T.splitSections(B.sdp),nt=Ge.shift(),at=T.matchPrefix(nt,"a=ice-lite").length>0,St=T.matchPrefix(nt,"a=group:BUNDLE ").length>0;te.usingBundle=St;var zt=T.matchPrefix(nt,"a=ice-options:")[0];return zt?te.canTrickleIceCandidates=zt.substr(14).split(" ").indexOf("trickle")>=0:te.canTrickleIceCandidates=!1,Ge.forEach(function(qt,kt){var On=T.splitLines(qt),Wn=T.getKind(qt),Vn=T.isRejected(qt)&&T.matchPrefix(qt,"a=bundle-only").length===0,ii=On[0].substr(2).split(" ")[2],ti=T.getDirection(qt,nt),di=T.parseMsid(qt),tr=T.getMid(qt)||T.generateIdentifier();if(Vn||Wn==="application"&&(ii==="DTLS/SCTP"||ii==="UDP/DTLS/SCTP")){te.transceivers[kt]={mid:tr,kind:Wn,protocol:ii,rejected:!0};return}!Vn&&te.transceivers[kt]&&te.transceivers[kt].rejected&&(te.transceivers[kt]=te._createTransceiver(Wn,!0));var Ve,Mt,jt,Sn,Hn,pi,hi,yi,nr,zl=T.parseRtpParameters(qt),fs,zr;Vn||(fs=T.getIceParameters(qt,nt),zr=T.getDtlsParameters(qt,nt),zr.role="client"),hi=T.parseRtpEncodingParameters(qt);var Xo=T.parseRtcpParameters(qt),ir=T.matchPrefix(qt,"a=end-of-candidates",nt).length>0,wa=T.matchPrefix(qt,"a=candidate:").map(function(jn){return T.parseCandidate(jn)}).filter(function(jn){return jn.component===1});if((B.type==="offer"||B.type==="answer")&&!Vn&&St&&kt>0&&te.transceivers[kt]&&(te._disposeIceAndDtlsTransports(kt),te.transceivers[kt].iceGatherer=te.transceivers[0].iceGatherer,te.transceivers[kt].iceTransport=te.transceivers[0].iceTransport,te.transceivers[kt].dtlsTransport=te.transceivers[0].dtlsTransport,te.transceivers[kt].rtpSender&&te.transceivers[kt].rtpSender.setTransport(te.transceivers[0].dtlsTransport),te.transceivers[kt].rtpReceiver&&te.transceivers[kt].rtpReceiver.setTransport(te.transceivers[0].dtlsTransport)),B.type==="offer"&&!Vn){Ve=te.transceivers[kt]||te._createTransceiver(Wn),Ve.mid=tr,Ve.iceGatherer||(Ve.iceGatherer=te._createIceGatherer(kt,St)),wa.length&&Ve.iceTransport.state==="new"&&(ir&&(!St||kt===0)?Ve.iceTransport.setRemoteCandidates(wa):wa.forEach(function(jn){pe(Ve.iceTransport,jn)})),yi=se.RTCRtpReceiver.getCapabilities(Wn),re<15019&&(yi.codecs=yi.codecs.filter(function(jn){return jn.name!=="rtx"})),pi=Ve.sendEncodingParameters||[{ssrc:(2*kt+2)*1001}];var co=!1;if(ti==="sendrecv"||ti==="sendonly"){if(co=!Ve.rtpReceiver,Hn=Ve.rtpReceiver||new se.RTCRtpReceiver(Ve.dtlsTransport,Wn),co){var Ui;nr=Hn.track,di&&di.stream==="-"||(di?(oe[di.stream]||(oe[di.stream]=new se.MediaStream,Object.defineProperty(oe[di.stream],"id",{get:function(){return di.stream}})),Object.defineProperty(nr,"id",{get:function(){return di.track}}),Ui=oe[di.stream]):(oe.default||(oe.default=new se.MediaStream),Ui=oe.default)),Ui&&(Oe(nr,Ui),Ve.associatedRemoteMediaStreams.push(Ui)),Ie.push([nr,Hn,Ui])}}else Ve.rtpReceiver&&Ve.rtpReceiver.track&&(Ve.associatedRemoteMediaStreams.forEach(function(jn){var wi=jn.getTracks().find(function(mr){return mr.id===Ve.rtpReceiver.track.id});wi&&be(wi,jn)}),Ve.associatedRemoteMediaStreams=[]);Ve.localCapabilities=yi,Ve.remoteCapabilities=zl,Ve.rtpReceiver=Hn,Ve.rtcpParameters=Xo,Ve.sendEncodingParameters=pi,Ve.recvEncodingParameters=hi,te._transceive(te.transceivers[kt],!1,co)}else if(B.type==="answer"&&!Vn){Ve=te.transceivers[kt],Mt=Ve.iceGatherer,jt=Ve.iceTransport,Sn=Ve.dtlsTransport,Hn=Ve.rtpReceiver,pi=Ve.sendEncodingParameters,yi=Ve.localCapabilities,te.transceivers[kt].recvEncodingParameters=hi,te.transceivers[kt].remoteCapabilities=zl,te.transceivers[kt].rtcpParameters=Xo,wa.length&&jt.state==="new"&&((at||ir)&&(!St||kt===0)?jt.setRemoteCandidates(wa):wa.forEach(function(jn){pe(Ve.iceTransport,jn)})),(!St||kt===0)&&(jt.state==="new"&&jt.start(Mt,fs,"controlling"),Sn.state==="new"&&Sn.start(zr));var xr=U(Ve.localCapabilities,Ve.remoteCapabilities),_i=xr.codecs.filter(function(jn){return jn.name.toLowerCase()==="rtx"}).length;!_i&&Ve.sendEncodingParameters[0].rtx&&delete Ve.sendEncodingParameters[0].rtx,te._transceive(Ve,ti==="sendrecv"||ti==="recvonly",ti==="sendrecv"||ti==="sendonly"),Hn&&(ti==="sendrecv"||ti==="sendonly")?(nr=Hn.track,di?(oe[di.stream]||(oe[di.stream]=new se.MediaStream),Oe(nr,oe[di.stream]),Ie.push([nr,Hn,oe[di.stream]])):(oe.default||(oe.default=new se.MediaStream),Oe(nr,oe.default),Ie.push([nr,Hn,oe.default]))):delete Ve.rtpReceiver}}),te._dtlsRole===void 0&&(te._dtlsRole=B.type==="offer"?"active":"passive"),te._remoteDescription={type:B.type,sdp:B.sdp},B.type==="offer"?te._updateSignalingState("have-remote-offer"):te._updateSignalingState("stable"),Object.keys(oe).forEach(function(qt){var kt=oe[qt];if(kt.getTracks().length){if(te.remoteStreams.indexOf(kt)===-1){te.remoteStreams.push(kt);var On=new Event("addstream");On.stream=kt,se.setTimeout(function(){te._dispatchEvent("addstream",On)})}Ie.forEach(function(Wn){var Vn=Wn[0],ii=Wn[1];kt.id===Wn[2].id&&me(te,Vn,ii,[kt])})}}),Ie.forEach(function(qt){qt[2]||me(te,qt[0],qt[1],[])}),se.setTimeout(function(){te&&te.transceivers&&te.transceivers.forEach(function(qt){qt.iceTransport&&qt.iceTransport.state==="new"&&qt.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),qt.iceTransport.addRemoteCandidate({}))})},4e3),Promise.resolve()},ge.prototype.close=function(){this.transceivers.forEach(function(B){B.iceTransport&&B.iceTransport.stop(),B.dtlsTransport&&B.dtlsTransport.stop(),B.rtpSender&&B.rtpSender.stop(),B.rtpReceiver&&B.rtpReceiver.stop()}),this._isClosed=!0,this._updateSignalingState("closed")},ge.prototype._updateSignalingState=function(B){this.signalingState=B;var te=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",te)},ge.prototype._maybeFireNegotiationNeeded=function(){var B=this;this.signalingState!=="stable"||this.needNegotiation===!0||(this.needNegotiation=!0,se.setTimeout(function(){if(B.needNegotiation){B.needNegotiation=!1;var te=new Event("negotiationneeded");B._dispatchEvent("negotiationneeded",te)}},0))},ge.prototype._updateIceConnectionState=function(){var B,te={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(Ie){Ie.iceTransport&&!Ie.rejected&&te[Ie.iceTransport.state]++}),B="new",te.failed>0?B="failed":te.checking>0?B="checking":te.disconnected>0?B="disconnected":te.new>0?B="new":te.connected>0?B="connected":te.completed>0&&(B="completed"),B!==this.iceConnectionState){this.iceConnectionState=B;var oe=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",oe)}},ge.prototype._updateConnectionState=function(){var B,te={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(Ie){Ie.iceTransport&&Ie.dtlsTransport&&!Ie.rejected&&(te[Ie.iceTransport.state]++,te[Ie.dtlsTransport.state]++)}),te.connected+=te.completed,B="new",te.failed>0?B="failed":te.connecting>0?B="connecting":te.disconnected>0?B="disconnected":te.new>0?B="new":te.connected>0&&(B="connected"),B!==this.connectionState){this.connectionState=B;var oe=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",oe)}},ge.prototype.createOffer=function(){var B=this;if(B._isClosed)return Promise.reject(de("InvalidStateError","Can not call createOffer after close"));var te=B.transceivers.filter(function(at){return at.kind==="audio"}).length,oe=B.transceivers.filter(function(at){return at.kind==="video"}).length,Ie=arguments[0];if(Ie){if(Ie.mandatory||Ie.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");Ie.offerToReceiveAudio!==void 0&&(Ie.offerToReceiveAudio===!0?te=1:Ie.offerToReceiveAudio===!1?te=0:te=Ie.offerToReceiveAudio),Ie.offerToReceiveVideo!==void 0&&(Ie.offerToReceiveVideo===!0?oe=1:Ie.offerToReceiveVideo===!1?oe=0:oe=Ie.offerToReceiveVideo)}for(B.transceivers.forEach(function(at){at.kind==="audio"?(te--,te<0&&(at.wantReceive=!1)):at.kind==="video"&&(oe--,oe<0&&(at.wantReceive=!1))});te>0||oe>0;)te>0&&(B._createTransceiver("audio"),te--),oe>0&&(B._createTransceiver("video"),oe--);var Ge=T.writeSessionBoilerplate(B._sdpSessionId,B._sdpSessionVersion++);B.transceivers.forEach(function(at,St){var zt=at.track,qt=at.kind,kt=at.mid||T.generateIdentifier();at.mid=kt,at.iceGatherer||(at.iceGatherer=B._createIceGatherer(St,B.usingBundle));var On=se.RTCRtpSender.getCapabilities(qt);re<15019&&(On.codecs=On.codecs.filter(function(Vn){return Vn.name!=="rtx"})),On.codecs.forEach(function(Vn){Vn.name==="H264"&&Vn.parameters["level-asymmetry-allowed"]===void 0&&(Vn.parameters["level-asymmetry-allowed"]="1"),at.remoteCapabilities&&at.remoteCapabilities.codecs&&at.remoteCapabilities.codecs.forEach(function(ii){Vn.name.toLowerCase()===ii.name.toLowerCase()&&Vn.clockRate===ii.clockRate&&(Vn.preferredPayloadType=ii.payloadType)})}),On.headerExtensions.forEach(function(Vn){var ii=at.remoteCapabilities&&at.remoteCapabilities.headerExtensions||[];ii.forEach(function(ti){Vn.uri===ti.uri&&(Vn.id=ti.id)})});var Wn=at.sendEncodingParameters||[{ssrc:(2*St+1)*1001}];zt&&re>=15019&&qt==="video"&&!Wn[0].rtx&&(Wn[0].rtx={ssrc:Wn[0].ssrc+1}),at.wantReceive&&(at.rtpReceiver=new se.RTCRtpReceiver(at.dtlsTransport,qt)),at.localCapabilities=On,at.sendEncodingParameters=Wn}),B._config.bundlePolicy!=="max-compat"&&(Ge+="a=group:BUNDLE "+B.transceivers.map(function(at){return at.mid}).join(" ")+`\r
`),Ge+=`a=ice-options:trickle\r
`,B.transceivers.forEach(function(at,St){Ge+=N(at,at.localCapabilities,"offer",at.stream,B._dtlsRole),Ge+=`a=rtcp-rsize\r
`,at.iceGatherer&&B.iceGatheringState!=="new"&&(St===0||!B.usingBundle)&&(at.iceGatherer.getLocalCandidates().forEach(function(zt){zt.component=1,Ge+="a="+T.writeCandidate(zt)+`\r
`}),at.iceGatherer.state==="completed"&&(Ge+=`a=end-of-candidates\r
`))});var nt=new se.RTCSessionDescription({type:"offer",sdp:Ge});return Promise.resolve(nt)},ge.prototype.createAnswer=function(){var B=this;if(B._isClosed)return Promise.reject(de("InvalidStateError","Can not call createAnswer after close"));if(!(B.signalingState==="have-remote-offer"||B.signalingState==="have-local-pranswer"))return Promise.reject(de("InvalidStateError","Can not call createAnswer in signalingState "+B.signalingState));var te=T.writeSessionBoilerplate(B._sdpSessionId,B._sdpSessionVersion++);B.usingBundle&&(te+="a=group:BUNDLE "+B.transceivers.map(function(Ge){return Ge.mid}).join(" ")+`\r
`),te+=`a=ice-options:trickle\r
`;var oe=T.getMediaSections(B._remoteDescription.sdp).length;B.transceivers.forEach(function(Ge,nt){if(!(nt+1>oe)){if(Ge.rejected){Ge.kind==="application"?Ge.protocol==="DTLS/SCTP"?te+=`m=application 0 DTLS/SCTP 5000\r
`:te+="m=application 0 "+Ge.protocol+` webrtc-datachannel\r
`:Ge.kind==="audio"?te+=`m=audio 0 UDP/TLS/RTP/SAVPF 0\r
a=rtpmap:0 PCMU/8000\r
`:Ge.kind==="video"&&(te+=`m=video 0 UDP/TLS/RTP/SAVPF 120\r
a=rtpmap:120 VP8/90000\r
`),te+=`c=IN IP4 0.0.0.0\r
a=inactive\r
a=mid:`+Ge.mid+`\r
`;return}if(Ge.stream){var at;Ge.kind==="audio"?at=Ge.stream.getAudioTracks()[0]:Ge.kind==="video"&&(at=Ge.stream.getVideoTracks()[0]),at&&re>=15019&&Ge.kind==="video"&&!Ge.sendEncodingParameters[0].rtx&&(Ge.sendEncodingParameters[0].rtx={ssrc:Ge.sendEncodingParameters[0].ssrc+1})}var St=U(Ge.localCapabilities,Ge.remoteCapabilities),zt=St.codecs.filter(function(qt){return qt.name.toLowerCase()==="rtx"}).length;!zt&&Ge.sendEncodingParameters[0].rtx&&delete Ge.sendEncodingParameters[0].rtx,te+=N(Ge,St,"answer",Ge.stream,B._dtlsRole),Ge.rtcpParameters&&Ge.rtcpParameters.reducedSize&&(te+=`a=rtcp-rsize\r
`)}});var Ie=new se.RTCSessionDescription({type:"answer",sdp:te});return Promise.resolve(Ie)},ge.prototype.addIceCandidate=function(B){var te=this,oe;return B&&!(B.sdpMLineIndex!==void 0||B.sdpMid)?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise(function(Ie,Ge){if(te._remoteDescription)if(!B||B.candidate==="")for(var nt=0;nt<te.transceivers.length&&!(!te.transceivers[nt].rejected&&(te.transceivers[nt].iceTransport.addRemoteCandidate({}),oe=T.getMediaSections(te._remoteDescription.sdp),oe[nt]+=`a=end-of-candidates\r
`,te._remoteDescription.sdp=T.getDescription(te._remoteDescription.sdp)+oe.join(""),te.usingBundle));nt++);else{var at=B.sdpMLineIndex;if(B.sdpMid){for(var St=0;St<te.transceivers.length;St++)if(te.transceivers[St].mid===B.sdpMid){at=St;break}}var zt=te.transceivers[at];if(zt){if(zt.rejected)return Ie();var qt=Object.keys(B.candidate).length>0?T.parseCandidate(B.candidate):{};if(qt.protocol==="tcp"&&(qt.port===0||qt.port===9)||qt.component&&qt.component!==1)return Ie();if((at===0||at>0&&zt.iceTransport!==te.transceivers[0].iceTransport)&&!pe(zt.iceTransport,qt))return Ge(de("OperationError","Can not add ICE candidate"));var kt=B.candidate.trim();kt.indexOf("a=")===0&&(kt=kt.substr(2)),oe=T.getMediaSections(te._remoteDescription.sdp),oe[at]+="a="+(qt.type?kt:"end-of-candidates")+`\r
`,te._remoteDescription.sdp=T.getDescription(te._remoteDescription.sdp)+oe.join("")}else return Ge(de("OperationError","Can not add ICE candidate"))}else return Ge(de("InvalidStateError","Can not add ICE candidate without a remote description"));Ie()})},ge.prototype.getStats=function(B){if(B&&B instanceof se.MediaStreamTrack){var te=null;if(this.transceivers.forEach(function(Ie){Ie.rtpSender&&Ie.rtpSender.track===B?te=Ie.rtpSender:Ie.rtpReceiver&&Ie.rtpReceiver.track===B&&(te=Ie.rtpReceiver)}),!te)throw de("InvalidAccessError","Invalid selector.");return te.getStats()}var oe=[];return this.transceivers.forEach(function(Ie){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(Ge){Ie[Ge]&&oe.push(Ie[Ge].getStats())})}),Promise.all(oe).then(function(Ie){var Ge=new Map;return Ie.forEach(function(nt){nt.forEach(function(at){Ge.set(at.id,at)})}),Ge})};var Ze=["RTCRtpSender","RTCRtpReceiver","RTCIceGatherer","RTCIceTransport","RTCDtlsTransport"];Ze.forEach(function(B){var te=se[B];if(te&&te.prototype&&te.prototype.getStats){var oe=te.prototype.getStats;te.prototype.getStats=function(){return oe.apply(this).then(function(Ie){var Ge=new Map;return Object.keys(Ie).forEach(function(nt){Ie[nt].type=R(Ie[nt]),Ge.set(nt,Ie[nt])}),Ge})}}});var fe=["createOffer","createAnswer"];return fe.forEach(function(B){var te=ge.prototype[B];ge.prototype[B]=function(){var oe=arguments;return typeof oe[0]=="function"||typeof oe[1]=="function"?te.apply(this,[arguments[2]]).then(function(Ie){typeof oe[0]=="function"&&oe[0].apply(null,[Ie])},function(Ie){typeof oe[1]=="function"&&oe[1].apply(null,[Ie])}):te.apply(this,arguments)}}),fe=["setLocalDescription","setRemoteDescription","addIceCandidate"],fe.forEach(function(B){var te=ge.prototype[B];ge.prototype[B]=function(){var oe=arguments;return typeof oe[1]=="function"||typeof oe[2]=="function"?te.apply(this,arguments).then(function(){typeof oe[1]=="function"&&oe[1].apply(null)},function(Ie){typeof oe[2]=="function"&&oe[2].apply(null,[Ie])}):te.apply(this,arguments)}}),["getStats"].forEach(function(B){var te=ge.prototype[B];ge.prototype[B]=function(){var oe=arguments;return typeof oe[1]=="function"?te.apply(this,arguments).then(function(){typeof oe[1]=="function"&&oe[1].apply(null)}):te.apply(this,arguments)}}),ge}},{sdp:17}],17:[function(Z,H,w){var T={};T.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)},T.localCName=T.generateIdentifier(),T.splitLines=function(R){return R.trim().split(`
`).map(function(N){return N.trim()})},T.splitSections=function(R){var N=R.split(`
m=`);return N.map(function(z,U){return(U>0?"m="+z:z).trim()+`\r
`})},T.getDescription=function(R){var N=T.splitSections(R);return N&&N[0]},T.getMediaSections=function(R){var N=T.splitSections(R);return N.shift(),N},T.matchPrefix=function(R,N){return T.splitLines(R).filter(function(z){return z.indexOf(N)===0})},T.parseCandidate=function(R){var N;R.indexOf("a=candidate:")===0?N=R.substring(12).split(" "):N=R.substring(10).split(" ");for(var z={foundation:N[0],component:parseInt(N[1],10),protocol:N[2].toLowerCase(),priority:parseInt(N[3],10),ip:N[4],address:N[4],port:parseInt(N[5],10),type:N[7]},U=8;U<N.length;U+=2)switch(N[U]){case"raddr":z.relatedAddress=N[U+1];break;case"rport":z.relatedPort=parseInt(N[U+1],10);break;case"tcptype":z.tcpType=N[U+1];break;case"ufrag":z.ufrag=N[U+1],z.usernameFragment=N[U+1];break;default:z[N[U]]=N[U+1];break}return z},T.writeCandidate=function(R){var N=[];N.push(R.foundation),N.push(R.component),N.push(R.protocol.toUpperCase()),N.push(R.priority),N.push(R.address||R.ip),N.push(R.port);var z=R.type;return N.push("typ"),N.push(z),z!=="host"&&R.relatedAddress&&R.relatedPort&&(N.push("raddr"),N.push(R.relatedAddress),N.push("rport"),N.push(R.relatedPort)),R.tcpType&&R.protocol.toLowerCase()==="tcp"&&(N.push("tcptype"),N.push(R.tcpType)),(R.usernameFragment||R.ufrag)&&(N.push("ufrag"),N.push(R.usernameFragment||R.ufrag)),"candidate:"+N.join(" ")},T.parseIceOptions=function(R){return R.substr(14).split(" ")},T.parseRtpMap=function(R){var N=R.substr(9).split(" "),z={payloadType:parseInt(N.shift(),10)};return N=N[0].split("/"),z.name=N[0],z.clockRate=parseInt(N[1],10),z.channels=N.length===3?parseInt(N[2],10):1,z.numChannels=z.channels,z},T.writeRtpMap=function(R){var N=R.payloadType;R.preferredPayloadType!==void 0&&(N=R.preferredPayloadType);var z=R.channels||R.numChannels||1;return"a=rtpmap:"+N+" "+R.name+"/"+R.clockRate+(z!==1?"/"+z:"")+`\r
`},T.parseExtmap=function(R){var N=R.substr(9).split(" ");return{id:parseInt(N[0],10),direction:N[0].indexOf("/")>0?N[0].split("/")[1]:"sendrecv",uri:N[1]}},T.writeExtmap=function(R){return"a=extmap:"+(R.id||R.preferredId)+(R.direction&&R.direction!=="sendrecv"?"/"+R.direction:"")+" "+R.uri+`\r
`},T.parseFmtp=function(R){for(var N={},z,U=R.substr(R.indexOf(" ")+1).split(";"),ue=0;ue<U.length;ue++)z=U[ue].trim().split("="),N[z[0].trim()]=z[1];return N},T.writeFmtp=function(R){var N="",z=R.payloadType;if(R.preferredPayloadType!==void 0&&(z=R.preferredPayloadType),R.parameters&&Object.keys(R.parameters).length){var U=[];Object.keys(R.parameters).forEach(function(ue){R.parameters[ue]?U.push(ue+"="+R.parameters[ue]):U.push(ue)}),N+="a=fmtp:"+z+" "+U.join(";")+`\r
`}return N},T.parseRtcpFb=function(R){var N=R.substr(R.indexOf(" ")+1).split(" ");return{type:N.shift(),parameter:N.join(" ")}},T.writeRtcpFb=function(R){var N="",z=R.payloadType;return R.preferredPayloadType!==void 0&&(z=R.preferredPayloadType),R.rtcpFeedback&&R.rtcpFeedback.length&&R.rtcpFeedback.forEach(function(U){N+="a=rtcp-fb:"+z+" "+U.type+(U.parameter&&U.parameter.length?" "+U.parameter:"")+`\r
`}),N},T.parseSsrcMedia=function(R){var N=R.indexOf(" "),z={ssrc:parseInt(R.substr(7,N-7),10)},U=R.indexOf(":",N);return U>-1?(z.attribute=R.substr(N+1,U-N-1),z.value=R.substr(U+1)):z.attribute=R.substr(N+1),z},T.parseSsrcGroup=function(R){var N=R.substr(13).split(" ");return{semantics:N.shift(),ssrcs:N.map(function(z){return parseInt(z,10)})}},T.getMid=function(R){var N=T.matchPrefix(R,"a=mid:")[0];if(N)return N.substr(6)},T.parseFingerprint=function(R){var N=R.substr(14).split(" ");return{algorithm:N[0].toLowerCase(),value:N[1]}},T.getDtlsParameters=function(R,N){var z=T.matchPrefix(R+N,"a=fingerprint:");return{role:"auto",fingerprints:z.map(T.parseFingerprint)}},T.writeDtlsParameters=function(R,N){var z="a=setup:"+N+`\r
`;return R.fingerprints.forEach(function(U){z+="a=fingerprint:"+U.algorithm+" "+U.value+`\r
`}),z},T.getIceParameters=function(R,N){var z=T.splitLines(R);z=z.concat(T.splitLines(N));var U={usernameFragment:z.filter(function(ue){return ue.indexOf("a=ice-ufrag:")===0})[0].substr(12),password:z.filter(function(ue){return ue.indexOf("a=ice-pwd:")===0})[0].substr(10)};return U},T.writeIceParameters=function(R){return"a=ice-ufrag:"+R.usernameFragment+`\r
a=ice-pwd:`+R.password+`\r
`},T.parseRtpParameters=function(R){for(var N={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},z=T.splitLines(R),U=z[0].split(" "),ue=3;ue<U.length;ue++){var pe=U[ue],de=T.matchPrefix(R,"a=rtpmap:"+pe+" ")[0];if(de){var se=T.parseRtpMap(de),re=T.matchPrefix(R,"a=fmtp:"+pe+" ");switch(se.parameters=re.length?T.parseFmtp(re[0]):{},se.rtcpFeedback=T.matchPrefix(R,"a=rtcp-fb:"+pe+" ").map(T.parseRtcpFb),N.codecs.push(se),se.name.toUpperCase()){case"RED":case"ULPFEC":N.fecMechanisms.push(se.name.toUpperCase());break}}}return T.matchPrefix(R,"a=extmap:").forEach(function(Oe){N.headerExtensions.push(T.parseExtmap(Oe))}),N},T.writeRtpDescription=function(R,N){var z="";z+="m="+R+" ",z+=N.codecs.length>0?"9":"0",z+=" UDP/TLS/RTP/SAVPF ",z+=N.codecs.map(function(ue){return ue.preferredPayloadType!==void 0?ue.preferredPayloadType:ue.payloadType}).join(" ")+`\r
`,z+=`c=IN IP4 0.0.0.0\r
`,z+=`a=rtcp:9 IN IP4 0.0.0.0\r
`,N.codecs.forEach(function(ue){z+=T.writeRtpMap(ue),z+=T.writeFmtp(ue),z+=T.writeRtcpFb(ue)});var U=0;return N.codecs.forEach(function(ue){ue.maxptime>U&&(U=ue.maxptime)}),U>0&&(z+="a=maxptime:"+U+`\r
`),z+=`a=rtcp-mux\r
`,N.headerExtensions&&N.headerExtensions.forEach(function(ue){z+=T.writeExtmap(ue)}),z},T.parseRtpEncodingParameters=function(R){var N=[],z=T.parseRtpParameters(R),U=z.fecMechanisms.indexOf("RED")!==-1,ue=z.fecMechanisms.indexOf("ULPFEC")!==-1,pe=T.matchPrefix(R,"a=ssrc:").map(function(be){return T.parseSsrcMedia(be)}).filter(function(be){return be.attribute==="cname"}),de=pe.length>0&&pe[0].ssrc,se,re=T.matchPrefix(R,"a=ssrc-group:FID").map(function(be){var me=be.substr(17).split(" ");return me.map(function(ge){return parseInt(ge,10)})});re.length>0&&re[0].length>1&&re[0][0]===de&&(se=re[0][1]),z.codecs.forEach(function(be){if(be.name.toUpperCase()==="RTX"&&be.parameters.apt){var me={ssrc:de,codecPayloadType:parseInt(be.parameters.apt,10)};de&&se&&(me.rtx={ssrc:se}),N.push(me),U&&(me=JSON.parse(JSON.stringify(me)),me.fec={ssrc:de,mechanism:ue?"red+ulpfec":"red"},N.push(me))}}),N.length===0&&de&&N.push({ssrc:de});var Oe=T.matchPrefix(R,"b=");return Oe.length&&(Oe[0].indexOf("b=TIAS:")===0?Oe=parseInt(Oe[0].substr(7),10):Oe[0].indexOf("b=AS:")===0?Oe=parseInt(Oe[0].substr(5),10)*1e3*.95-50*40*8:Oe=void 0,N.forEach(function(be){be.maxBitrate=Oe})),N},T.parseRtcpParameters=function(R){var N={},z=T.matchPrefix(R,"a=ssrc:").map(function(pe){return T.parseSsrcMedia(pe)}).filter(function(pe){return pe.attribute==="cname"})[0];z&&(N.cname=z.value,N.ssrc=z.ssrc);var U=T.matchPrefix(R,"a=rtcp-rsize");N.reducedSize=U.length>0,N.compound=U.length===0;var ue=T.matchPrefix(R,"a=rtcp-mux");return N.mux=ue.length>0,N},T.parseMsid=function(R){var N,z=T.matchPrefix(R,"a=msid:");if(z.length===1)return N=z[0].substr(7).split(" "),{stream:N[0],track:N[1]};var U=T.matchPrefix(R,"a=ssrc:").map(function(ue){return T.parseSsrcMedia(ue)}).filter(function(ue){return ue.attribute==="msid"});if(U.length>0)return N=U[0].value.split(" "),{stream:N[0],track:N[1]}},T.parseSctpDescription=function(R){var N=T.parseMLine(R),z=T.matchPrefix(R,"a=max-message-size:"),U;z.length>0&&(U=parseInt(z[0].substr(19),10)),isNaN(U)&&(U=65536);var ue=T.matchPrefix(R,"a=sctp-port:");if(ue.length>0)return{port:parseInt(ue[0].substr(12),10),protocol:N.fmt,maxMessageSize:U};var pe=T.matchPrefix(R,"a=sctpmap:");if(pe.length>0){var de=T.matchPrefix(R,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(de[0],10),protocol:de[1],maxMessageSize:U}}},T.writeSctpDescription=function(R,N){var z=[];return R.protocol!=="DTLS/SCTP"?z=["m="+R.kind+" 9 "+R.protocol+" "+N.protocol+`\r
`,`c=IN IP4 0.0.0.0\r
`,"a=sctp-port:"+N.port+`\r
`]:z=["m="+R.kind+" 9 "+R.protocol+" "+N.port+`\r
`,`c=IN IP4 0.0.0.0\r
`,"a=sctpmap:"+N.port+" "+N.protocol+` 65535\r
`],N.maxMessageSize!==void 0&&z.push("a=max-message-size:"+N.maxMessageSize+`\r
`),z.join("")},T.generateSessionId=function(){return Math.random().toString().substr(2,21)},T.writeSessionBoilerplate=function(R,N,z){var U,ue=N!==void 0?N:2;R?U=R:U=T.generateSessionId();var pe=z||"thisisadapterortc";return`v=0\r
o=`+pe+" "+U+" "+ue+` IN IP4 127.0.0.1\r
s=-\r
t=0 0\r
`},T.writeMediaSection=function(R,N,z,U){var ue=T.writeRtpDescription(R.kind,N);if(ue+=T.writeIceParameters(R.iceGatherer.getLocalParameters()),ue+=T.writeDtlsParameters(R.dtlsTransport.getLocalParameters(),z==="offer"?"actpass":"active"),ue+="a=mid:"+R.mid+`\r
`,R.direction?ue+="a="+R.direction+`\r
`:R.rtpSender&&R.rtpReceiver?ue+=`a=sendrecv\r
`:R.rtpSender?ue+=`a=sendonly\r
`:R.rtpReceiver?ue+=`a=recvonly\r
`:ue+=`a=inactive\r
`,R.rtpSender){var pe="msid:"+U.id+" "+R.rtpSender.track.id+`\r
`;ue+="a="+pe,ue+="a=ssrc:"+R.sendEncodingParameters[0].ssrc+" "+pe,R.sendEncodingParameters[0].rtx&&(ue+="a=ssrc:"+R.sendEncodingParameters[0].rtx.ssrc+" "+pe,ue+="a=ssrc-group:FID "+R.sendEncodingParameters[0].ssrc+" "+R.sendEncodingParameters[0].rtx.ssrc+`\r
`)}return ue+="a=ssrc:"+R.sendEncodingParameters[0].ssrc+" cname:"+T.localCName+`\r
`,R.rtpSender&&R.sendEncodingParameters[0].rtx&&(ue+="a=ssrc:"+R.sendEncodingParameters[0].rtx.ssrc+" cname:"+T.localCName+`\r
`),ue},T.getDirection=function(R,N){for(var z=T.splitLines(R),U=0;U<z.length;U++)switch(z[U]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return z[U].substr(2)}return N?T.getDirection(N):"sendrecv"},T.getKind=function(R){var N=T.splitLines(R),z=N[0].split(" ");return z[0].substr(2)},T.isRejected=function(R){return R.split(" ",2)[1]==="0"},T.parseMLine=function(R){var N=T.splitLines(R),z=N[0].substr(2).split(" ");return{kind:z[0],port:parseInt(z[1],10),protocol:z[2],fmt:z.slice(3).join(" ")}},T.parseOLine=function(R){var N=T.matchPrefix(R,"o=")[0],z=N.substr(2).split(" ");return{username:z[0],sessionId:z[1],sessionVersion:parseInt(z[2],10),netType:z[3],addressType:z[4],address:z[5]}},T.isValidSDP=function(R){if(typeof R!="string"||R.length===0)return!1;for(var N=T.splitLines(R),z=0;z<N.length;z++)if(N[z].length<2||N[z].charAt(1)!=="=")return!1;return!0},t(H)==="object"&&(H.exports=T)},{}]},{},[1])(1)}),k.sessions={},k.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return!0;if(window.navigator.userAgent.match("Chrome")){var Z=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10),H=33;return window.navigator.userAgent.match("Linux")&&(H=35),Z>=26&&Z<=H?!0:k.extension.isInstalled()}else return!0};var Ft={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return document.querySelector("#janus-extension-installed")!==null},getScreen:function(H){var w=window.setTimeout(function(){var T=new Error("NavigatorUserMediaError");return T.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)',H(T)},1e3);this.cache[w]=H,window.postMessage({type:"janusGetScreen",id:w},"*")},init:function(){var H={};this.cache=H,window.addEventListener("message",function(w){if(w.origin==window.location.origin)if(w.data.type=="janusGotScreen"&&H[w.data.id]){var T=H[w.data.id];if(delete H[w.data.id],w.data.sourceId===""){var R=new Error("NavigatorUserMediaError");R.name="You cancelled the request for permission, giving up...",T(R)}else T(null,w.data.sourceId)}else w.data.type=="janusGetScreenPending"&&(console.log("clearing ",w.data.id),window.clearTimeout(w.data.id))})}};k.useDefaultDependencies=function(Z){var H=Z&&Z.fetch||fetch,w=Z&&Z.Promise||Promise,T=Z&&Z.WebSocket||WebSocket;return{newWebSocket:function(N,z){return new T(N,z)},extension:Z&&Z.extension||Ft,isArray:function(N){return Array.isArray(N)},webRTCAdapter:Z&&Z.adapter||window.adapter,httpAPICall:function(N,z){var U={method:z.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};z.verb==="POST"&&(U.headers["Content-Type"]="application/json"),z.withCredentials!==void 0&&(U.credentials=z.withCredentials===!0?"include":z.withCredentials?z.withCredentials:"omit"),z.body!==void 0&&(U.body=JSON.stringify(z.body));var ue=H(N,U).catch(function(de){return w.reject({message:"Probably a network error, is the server down?",error:de})});if(z.timeout!==void 0){var pe=new w(function(de,se){var re=setTimeout(function(){return clearTimeout(re),se({message:"Request timed out",timeout:z.timeout})},z.timeout)});ue=w.race([ue,pe])}return ue.then(function(de){if(de.ok){if(t(z.success)===t(k.noop))return de.json().then(function(se){z.success(se)}).catch(function(se){return w.reject({message:"Failed to parse response body",error:se,response:de})})}else return w.reject({message:"API call failed",response:de})}).catch(function(de){t(z.error)===t(k.noop)&&z.error(de.message||"<< internal error >>",de)}),ue}}},k.useOldDependencies=function(Z){var H=Z&&Z.jQuery||jQuery,w=Z&&Z.WebSocket||WebSocket;return{newWebSocket:function(R,N){return new w(R,N)},isArray:function(R){return H.isArray(R)},extension:Z&&Z.extension||Ft,webRTCAdapter:Z&&Z.adapter||adapter,httpAPICall:function(R,N){var z=N.body!==void 0?{contentType:"application/json",data:JSON.stringify(N.body)}:{},U=N.withCredentials!==void 0?{xhrFields:{withCredentials:N.withCredentials}}:{};return H.ajax(H.extend(z,U,{url:R,type:N.verb,cache:!1,dataType:"json",async:N.async,timeout:N.timeout,success:function(pe){t(N.success)===t(k.noop)&&N.success(pe)},error:function(pe,de,se){t(N.error)===t(k.noop)&&N.error(de,se)}}))}}},k.noop=function(){},k.dataChanDefaultLabel="JanusDataChannel",k.endOfCandidates=null,k.init=function(Z){if(Z=Z||{},Z.callback=typeof Z.callback=="function"?Z.callback:k.noop,k.initDone===!0)Z.callback();else{if((typeof console=="undefined"||typeof console.log=="undefined")&&(console={log:function(){}}),k.trace=k.noop,k.debug=k.noop,k.vdebug=k.noop,k.log=k.noop,k.warn=k.noop,k.error=k.noop,Z.debug===!0||Z.debug==="all")k.trace=console.trace.bind(console),k.debug=console.debug.bind(console),k.vdebug=console.debug.bind(console),k.log=console.log.bind(console),k.warn=console.warn.bind(console),k.error=console.error.bind(console);else if(Array.isArray(Z.debug))for(var H in Z.debug){var w=Z.debug[H];switch(w){case"trace":k.trace=console.trace.bind(console);break;case"debug":k.debug=console.debug.bind(console);break;case"vdebug":k.vdebug=console.debug.bind(console);break;case"log":k.log=console.log.bind(console);break;case"warn":k.warn=console.warn.bind(console);break;case"error":k.error=console.error.bind(console);break;default:console.error("Unknown debugging option '"+w+"' (supported: 'trace', 'debug', 'vdebug', 'log', warn', 'error')");break}}k.log("Initializing library");var T=Z.dependencies||k.useDefaultDependencies();k.isArray=T.isArray,k.webRTCAdapter=T.webRTCAdapter,k.httpAPICall=T.httpAPICall,k.newWebSocket=T.newWebSocket,k.extension=T.extension,k.extension.init(),k.listDevices=function(de,se){de=typeof de=="function"?de:k.noop,se==null&&(se={audio:!0,video:!0}),k.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(se).then(function(re){navigator.mediaDevices.enumerateDevices().then(function(Oe){k.debug(Oe),de(Oe);try{var be=re.getTracks();for(var me in be){var ge=be[me];ge!=null&&ge.stop()}}catch(Ze){}})}).catch(function(re){k.error(re),de([])}):(k.warn("navigator.mediaDevices unavailable"),de([]))},k.attachMediaStream=function(de,se){if(k.webRTCAdapter.browserDetails.browser==="chrome"){var re=k.webRTCAdapter.browserDetails.version;re>=52?de.srcObject=se:k.error("Error attaching stream to element")}else de.srcObject=se},k.reattachMediaStream=function(de,se){if(k.webRTCAdapter.browserDetails.browser==="chrome"){var re=k.webRTCAdapter.browserDetails.version;re>=52?de.srcObject=se.srcObject:typeof de.src!="undefined"?de.src=se.src:k.error("Error reattaching stream to element")}else de.srcObject=se.srcObject};var R=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0,N=R?"pagehide":"beforeunload",z=window["on"+N];if(window.addEventListener(N,function(de){k.log("Closing window");for(var se in k.sessions)k.sessions[se]!==null&&k.sessions[se]!==void 0&&k.sessions[se].destroyOnUnload&&(k.log("Destroying session "+se),k.sessions[se].destroy({asyncRequest:!1,notifyDestroyed:!1}));z&&typeof z=="function"&&z()}),k.safariVp8=!1,k.webRTCAdapter.browserDetails.browser==="safari"&&k.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(var H in RTCRtpSender.getCapabilities("video").codecs){var U=RTCRtpSender.getCapabilities("video").codecs[H];if(U&&U.mimeType&&U.mimeType.toLowerCase()==="video/vp8"){k.safariVp8=!0;break}}k.safariVp8?k.log("This version of Safari supports VP8"):k.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}else{var ue=new RTCPeerConnection({},{});ue.createOffer({offerToReceiveVideo:!0}).then(function(de){k.safariVp8=de.sdp.indexOf("VP8")!==-1,k.safariVp8?k.log("This version of Safari supports VP8"):k.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu"),ue.close(),ue=null})}if(k.unifiedPlan=!1,k.webRTCAdapter.browserDetails.browser==="firefox"&&k.webRTCAdapter.browserDetails.version>=59)k.unifiedPlan=!0;else if(k.webRTCAdapter.browserDetails.browser==="chrome"&&k.webRTCAdapter.browserDetails.version<72)k.unifiedPlan=!1;else if(typeof RTCRtpTransceiver!="undefined"&&!("currentDirection"in RTCRtpTransceiver.prototype))k.unifiedPlan=!1;else{var pe=new RTCPeerConnection;try{pe.addTransceiver("audio"),k.unifiedPlan=!0}catch(de){}pe.close()}k.initDone=!0,Z.callback()}},k.isWebrtcSupported=function(){return window.RTCPeerConnection!==void 0&&window.RTCPeerConnection!==null},k.isGetUserMediaAvailable=function(){return navigator.mediaDevices!==void 0&&navigator.mediaDevices!==null&&navigator.mediaDevices.getUserMedia!==void 0&&navigator.mediaDevices.getUserMedia!==null},k.randomString=function(Z){for(var H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",w="",T=0;T<Z;T++){var R=Math.floor(Math.random()*H.length);w+=H.substring(R,R+1)}return w};function k(Z){if(k.initDone===void 0)return Z.error("Library not initialized"),{};if(!k.isWebrtcSupported())return Z.error("WebRTC not supported by this browser"),{};if(k.log("Library initialized: "+k.initDone),Z=Z||{},Z.success=typeof Z.success=="function"?Z.success:k.noop,Z.error=typeof Z.error=="function"?Z.error:k.noop,Z.destroyed=typeof Z.destroyed=="function"?Z.destroyed:k.noop,Z.server===null||Z.server===void 0)return Z.error("Invalid server url"),{};var H=!1,w=null,T={},R=null,N=null,z=0,U=Z.server;k.isArray(U)?(k.log("Multiple servers provided ("+U.length+"), will use the first that works"),U=null,N=Z.server,k.debug(N)):U.indexOf("ws")===0?(H=!0,k.log("Using WebSockets to contact Janus: "+U)):(H=!1,k.log("Using REST API to contact Janus: "+U));var ue=Z.iceServers;ue==null&&(ue=[{urls:"stun:stun.l.google.com:19302"}]);var pe=Z.iceTransportPolicy,de=Z.bundlePolicy,se=Z.ipv6;se==null&&(se=!1);var re=!1;Z.withCredentials!==void 0&&Z.withCredentials!==null&&(re=Z.withCredentials===!0);var Oe=10;Z.max_poll_events!==void 0&&Z.max_poll_events!==null&&(Oe=Z.max_poll_events),Oe<1&&(Oe=1);var be=null;Z.token!==void 0&&Z.token!==null&&(be=Z.token);var me=null;Z.apisecret!==void 0&&Z.apisecret!==null&&(me=Z.apisecret),this.destroyOnUnload=!0,Z.destroyOnUnload!==void 0&&Z.destroyOnUnload!==null&&(this.destroyOnUnload=Z.destroyOnUnload===!0);var ge=25e3;Z.keepAlivePeriod!==void 0&&Z.keepAlivePeriod!==null&&(ge=Z.keepAlivePeriod),isNaN(ge)&&(ge=25e3);var Ze=6e4;Z.longPollTimeout!==void 0&&Z.longPollTimeout!==null&&(Ze=Z.longPollTimeout),isNaN(Ze)&&(Ze=6e4);function fe(ye){var Ne={high:9e5,medium:3e5,low:1e5};return ye!=null&&(ye.high&&(Ne.high=ye.high),ye.medium&&(Ne.medium=ye.medium),ye.low&&(Ne.low=ye.low)),Ne}var B=!1,te=null,oe={},Ie=this,Ge=0,nt={};qt(Z),this.getServer=function(){return U},this.isConnected=function(){return B},this.reconnect=function(ye){ye=ye||{},ye.success=typeof ye.success=="function"?ye.success:k.noop,ye.error=typeof ye.error=="function"?ye.error:k.noop,ye.reconnect=!0,qt(ye)},this.getSessionId=function(){return te},this.destroy=function(ye){kt(ye)},this.attach=function(ye){On(ye)};function at(){if(te!=null){if(k.debug("Long poll..."),!B){k.warn("Is the server down? (connected=false)");return}var ye=U+"/"+te+"?rid="+new Date().getTime();Oe!=null&&(ye=ye+"&maxev="+Oe),be!=null&&(ye=ye+"&token="+encodeURIComponent(be)),me!=null&&(ye=ye+"&apisecret="+encodeURIComponent(me)),k.httpAPICall(ye,{verb:"GET",withCredentials:re,success:St,timeout:Ze,error:function(qe,tt){if(k.error(qe+":",tt),Ge++,Ge>3){B=!1,Z.error("Lost connection to the server (is it down?)");return}at()}})}}function St(ye,Ne){if(Ge=0,!H&&te!==void 0&&te!==null&&Ne!==!0&&at(),!H&&k.isArray(ye)){for(var qe=0;qe<ye.length;qe++)St(ye[qe],!0);return}if(ye.rtcgw==="keepalive"){k.vdebug("Got a keepalive on session "+te);return}else if(ye.rtcgw==="ack"){k.debug("Got an ack on session "+te),k.debug(ye);var tt=ye.transaction;if(tt!=null){var ve=nt[tt];ve!=null&&ve(ye),delete nt[tt]}return}else if(ye.rtcgw==="success"){k.debug("Got a success on session "+te),k.debug(ye);var tt=ye.transaction;if(tt!=null){var ve=nt[tt];ve!=null&&ve(ye),delete nt[tt]}return}else if(ye.rtcgw==="trickle"){var ct=ye.sender;if(ct==null){k.warn("Missing sender...");return}var et=oe[ct];if(et==null){k.debug("This handle is not attached to this session");return}var gt=ye.candidate;k.debug("Got a trickled candidate on session "+te),k.debug(gt);var Dt=et.webrtcStuff;Dt.pc&&Dt.remoteSdp?(k.debug("Adding remote candidate:",gt),!gt||gt.completed===!0?Dt.pc.addIceCandidate(k.endOfCandidates):Dt.pc.addIceCandidate(gt)):(k.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),Dt.candidates||(Dt.candidates=[]),Dt.candidates.push(gt),k.debug(Dt.candidates))}else if(ye.rtcgw==="webrtcup"){k.debug("Got a webrtcup event on session "+te),k.debug(ye);var ct=ye.sender;if(ct==null){k.warn("Missing sender...");return}var et=oe[ct];if(et==null){k.debug("This handle is not attached to this session");return}et.webrtcState(!0);return}else if(ye.rtcgw==="hangup"){k.debug("Got a hangup event on session "+te),k.debug(ye);var ct=ye.sender;if(ct==null){k.warn("Missing sender...");return}var et=oe[ct];if(et==null){k.debug("This handle is not attached to this session");return}et.webrtcState(!1,ye.reason),et.hangup()}else if(ye.rtcgw==="detached"){k.debug("Got a detached event on session "+te),k.debug(ye);var ct=ye.sender;if(ct==null){k.warn("Missing sender...");return}var et=oe[ct];if(et==null)return;et.detached=!0,et.ondetached(),et.detach()}else if(ye.rtcgw==="media"){k.debug("Got a media event on session "+te),k.debug(ye);var ct=ye.sender;if(ct==null){k.warn("Missing sender...");return}var et=oe[ct];if(et==null){k.debug("This handle is not attached to this session");return}et.mediaState(ye.type,ye.receiving)}else if(ye.rtcgw==="slowlink"){k.debug("Got a slowlink event on session "+te),k.debug(ye);var ct=ye.sender;if(ct==null){k.warn("Missing sender...");return}var et=oe[ct];if(et==null){k.debug("This handle is not attached to this session");return}et.slowLink(ye.uplink,ye.lost)}else if(ye.rtcgw==="error"){k.error("Ooops: "+ye.error.code+" "+ye.error.reason),k.debug(ye);var tt=ye.transaction;if(tt!=null){var ve=nt[tt];ve!=null&&ve(ye),delete nt[tt]}return}else if(ye.rtcgw==="event"){k.debug("Got a plugin event on session "+te),k.debug(ye);var ct=ye.sender;if(ct==null){k.warn("Missing sender...");return}var fn=ye.plugindata;if(fn==null){k.warn("Missing plugindata...");return}k.debug(" -- Event is coming from "+ct+" ("+fn.plugin+")");var Gt=fn.data;k.debug(Gt);var et=oe[ct];if(et==null){k.warn("This handle is not attached to this session");return}var vn=ye.jsep;vn!=null&&(k.debug("Handling SDP as well..."),k.debug(vn));var gr=et.onmessage;gr!=null?(k.debug("Notifying application..."),gr(Gt,vn)):k.debug("No provided notification callback")}else if(ye.rtcgw==="timeout"){k.error("Timeout on session "+te),k.debug(ye),H&&w.close(3504,"Gateway timeout");return}else k.warn("Unknown message/event '"+ye.rtcgw+"' on session "+te),k.debug(ye)}function zt(){if(!(U===null||!H||!B)){R=setTimeout(zt,ge);var ye={rtcgw:"keepalive",session_id:te,transaction:k.randomString(12)};be!=null&&(ye.token=be),me!=null&&(ye.apisecret=me),w.send(JSON.stringify(ye))}}function qt(ye){var Ne=k.randomString(12),qe={rtcgw:"create",transaction:Ne,token:window.EZUIKit.opt.stream,device:window.EZUIKit.opt.deviceSerial,channel:window.EZUIKit.opt.channelNo};if(ye.reconnect&&(B=!1,qe.rtcgw="claim",qe.session_id=te,w&&(w.onopen=null,w.onerror=null,w.onclose=null,R&&(clearTimeout(R),R=null))),be!=null&&(qe.token=be),me!=null&&(qe.apisecret=me),U===null&&k.isArray(N)&&(U=N[z],U.indexOf("ws")===0?(H=!0,k.log("Server #"+(z+1)+": trying WebSockets to contact Janus ("+U+")")):(H=!1,k.log("Server #"+(z+1)+": trying REST API to contact Janus ("+U+")"))),H){w=k.newWebSocket(U,"rtcgw-protocol"),T={error:function(){if(k.error("Error connecting to the Janus WebSockets server... "+U),k.isArray(N)&&!ye.reconnect){if(z++,z==N.length){ye.error("Error connecting to any of the provided Janus servers: Is the server down?");return}U=null,setTimeout(function(){qt(ye)},200);return}ye.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){nt[Ne]=function(ct){if(k.debug(ct),ct.rtcgw!=="success"){k.error("Ooops: "+ct.error.code+" "+ct.error.reason),ye.error(ct.error.reason);return}R=setTimeout(zt,ge),B=!0,te=ct.session_id?ct.session_id:ct.data.id,ye.reconnect?k.log("Claimed session: "+te):k.log("Created session: "+te),k.sessions[te]=Ie,ye.success()},w.send(JSON.stringify(qe))},message:function(ct){St(JSON.parse(ct.data))},close:function(){U===null||!B||(B=!1,Z.error("Lost connection to the server (is it down?)"))}};for(var tt in T)w.addEventListener(tt,T[tt]);return}k.httpAPICall(U,{verb:"POST",withCredentials:re,body:qe,success:function(ct){if(k.debug(ct),ct.rtcgw!=="success"){k.error("Ooops: "+ct.error.code+" "+ct.error.reason),ye.error(ct.error.reason);return}B=!0,te=ct.session_id?ct.session_id:ct.data.id,ye.reconnect?k.log("Claimed session: "+te):k.log("Created session: "+te),k.sessions[te]=Ie,at(),ye.success()},error:function(ct,et){if(k.error(ct+":",et),k.isArray(N)&&!ye.reconnect){if(z++,z==N.length){ye.error("Error connecting to any of the provided Janus servers: Is the server down?");return}U=null,setTimeout(function(){qt(ye)},200);return}et===""?ye.error(ct+": Is the server down?"):ye.error(ct+": "+et)}})}function kt(ye){ye=ye||{},ye.success=typeof ye.success=="function"?ye.success:k.noop;var Ne=!0;ye.asyncRequest!==void 0&&ye.asyncRequest!==null&&(Ne=ye.asyncRequest===!0);var qe=!0;ye.notifyDestroyed!==void 0&&ye.notifyDestroyed!==null&&(qe=ye.notifyDestroyed===!0);var tt=!1;if(ye.cleanupHandles!==void 0&&ye.cleanupHandles!==null&&(tt=ye.cleanupHandles===!0),k.log("Destroying session "+te+" (async="+Ne+")"),!B){k.warn("Is the server down? (connected=false)"),ye.success();return}if(te==null){k.warn("No session to destroy"),ye.success(),qe&&Z.destroyed();return}if(tt)for(var ve in oe)tr(ve,{noRequest:!0});var ct={rtcgw:"destroy",transaction:k.randomString(12)};if(be!=null&&(ct.token=be),me!=null&&(ct.apisecret=me),H){ct.session_id=te;var et=function(){for(var Gt in T)w.removeEventListener(Gt,T[Gt]);w.removeEventListener("message",gt),w.removeEventListener("error",Dt),R&&clearTimeout(R),w.close()},gt=function(Gt){var vn=JSON.parse(Gt.data);vn.session_id==ct.session_id&&vn.transaction==ct.transaction&&(et(),ye.success(),qe&&Z.destroyed())},Dt=function(Gt){et(),ye.error("Failed to destroy the server: Is the server down?"),qe&&Z.destroyed()};w.addEventListener("message",gt),w.addEventListener("error",Dt),w.send(JSON.stringify(ct));return}k.httpAPICall(U+"/"+te,{verb:"POST",async:Ne,withCredentials:re,body:ct,success:function(Gt){k.log("Destroyed session:"),k.debug(Gt),te=null,B=!1,Gt.rtcgw!=="success"&&k.error("Ooops: "+Gt.error.code+" "+Gt.error.reason),ye.success(),qe&&Z.destroyed()},error:function(Gt,vn){k.error(Gt+":",vn),te=null,B=!1,ye.success(),qe&&Z.destroyed()}})}function On(ye){if(ye=ye||{},ye.success=typeof ye.success=="function"?ye.success:k.noop,ye.error=typeof ye.error=="function"?ye.error:k.noop,ye.consentDialog=typeof ye.consentDialog=="function"?ye.consentDialog:k.noop,ye.iceState=typeof ye.iceState=="function"?ye.iceState:k.noop,ye.mediaState=typeof ye.mediaState=="function"?ye.mediaState:k.noop,ye.webrtcState=typeof ye.webrtcState=="function"?ye.webrtcState:k.noop,ye.slowLink=typeof ye.slowLink=="function"?ye.slowLink:k.noop,ye.onmessage=typeof ye.onmessage=="function"?ye.onmessage:k.noop,ye.onlocalstream=typeof ye.onlocalstream=="function"?ye.onlocalstream:k.noop,ye.onremotestream=typeof ye.onremotestream=="function"?ye.onremotestream:k.noop,ye.ondata=typeof ye.ondata=="function"?ye.ondata:k.noop,ye.ondataopen=typeof ye.ondataopen=="function"?ye.ondataopen:k.noop,ye.oncleanup=typeof ye.oncleanup=="function"?ye.oncleanup:k.noop,ye.ondetached=typeof ye.ondetached=="function"?ye.ondetached:k.noop,!B){k.warn("Is the server down? (connected=false)"),ye.error("Is the server down? (connected=false)");return}var Ne=ye.plugin;if(Ne==null){k.error("Invalid plugin"),ye.error("Invalid plugin");return}var qe=ye.opaqueId,tt=ye.token?ye.token:be,ve=k.randomString(12),ct={rtcgw:"attach",plugin:Ne,opaque_id:qe,transaction:ve};if(tt!=null&&(ct.token=tt),me!=null&&(ct.apisecret=me),H){nt[ve]=function(et){if(k.debug(et),et.rtcgw!=="success"){k.error("Ooops: "+et.error.code+" "+et.error.reason),ye.error("Ooops: "+et.error.code+" "+et.error.reason);return}var gt=et.data.id;k.log("Created handle: "+gt);var Dt={session:Ie,plugin:Ne,id:gt,token:tt,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,remoteStream:null,mySdp:null,mediaConstraints:null,pc:null,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,volume:{value:null,timer:null},bitrate:{value:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,timer:null}},getId:function(){return gt},getPlugin:function(){return Ne},getVolume:function(){return hi(gt,!0)},getRemoteVolume:function(){return hi(gt,!0)},getLocalVolume:function(){return hi(gt,!1)},isAudioMuted:function(){return yi(gt,!1)},muteAudio:function(){return nr(gt,!1,!0)},unmuteAudio:function(){return nr(gt,!1,!1)},isVideoMuted:function(){return yi(gt,!0)},muteVideo:function(){return nr(gt,!0,!0)},unmuteVideo:function(){return nr(gt,!0,!1)},getBitrate:function(){return zl(gt)},send:function(Gt){Wn(gt,Gt)},data:function(Gt){ti(gt,Gt)},dtmf:function(Gt){di(gt,Gt)},consentDialog:ye.consentDialog,iceState:ye.iceState,mediaState:ye.mediaState,webrtcState:ye.webrtcState,slowLink:ye.slowLink,onmessage:ye.onmessage,createOffer:function(Gt){Mt(gt,!0,Gt)},createAnswer:function(Gt){Mt(gt,!1,Gt)},handleRemoteJsep:function(Gt){jt(gt,Gt)},onlocalstream:ye.onlocalstream,onremotestream:ye.onremotestream,ondata:ye.ondata,ondataopen:ye.ondataopen,oncleanup:ye.oncleanup,ondetached:ye.ondetached,hangup:function(Gt){zr(gt,Gt===!0)},detach:function(Gt){tr(gt,Gt)}};oe[gt]=Dt,ye.success(Dt)},ct.session_id=te,w.send(JSON.stringify(ct));return}k.httpAPICall(U+"/"+te,{verb:"POST",withCredentials:re,body:ct,success:function(gt){if(k.debug(gt),gt.rtcgw!=="success"){k.error("Ooops: "+gt.error.code+" "+gt.error.reason),ye.error("Ooops: "+gt.error.code+" "+gt.error.reason);return}var Dt=gt.data.id;k.log("Created handle: "+Dt);var fn={session:Ie,plugin:Ne,id:Dt,token:tt,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,remoteStream:null,mySdp:null,mediaConstraints:null,pc:null,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,volume:{value:null,timer:null},bitrate:{value:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,timer:null}},getId:function(){return Dt},getPlugin:function(){return Ne},getVolume:function(){return hi(Dt,!0)},getRemoteVolume:function(){return hi(Dt,!0)},getLocalVolume:function(){return hi(Dt,!1)},isAudioMuted:function(){return yi(Dt,!1)},muteAudio:function(){return nr(Dt,!1,!0)},unmuteAudio:function(){return nr(Dt,!1,!1)},isVideoMuted:function(){return yi(Dt,!0)},muteVideo:function(){return nr(Dt,!0,!0)},unmuteVideo:function(){return nr(Dt,!0,!1)},getBitrate:function(){return zl(Dt)},send:function(vn){Wn(Dt,vn)},data:function(vn){ti(Dt,vn)},dtmf:function(vn){di(Dt,vn)},consentDialog:ye.consentDialog,iceState:ye.iceState,mediaState:ye.mediaState,webrtcState:ye.webrtcState,slowLink:ye.slowLink,onmessage:ye.onmessage,createOffer:function(vn){Mt(Dt,!0,vn)},createAnswer:function(vn){Mt(Dt,!1,vn)},handleRemoteJsep:function(vn){jt(Dt,vn)},onlocalstream:ye.onlocalstream,onremotestream:ye.onremotestream,ondata:ye.ondata,ondataopen:ye.ondataopen,oncleanup:ye.oncleanup,ondetached:ye.ondetached,hangup:function(vn){zr(Dt,vn===!0)},detach:function(vn){tr(Dt,vn)}};oe[Dt]=fn,ye.success(fn)},error:function(gt,Dt){k.error(gt+":",Dt)}})}function Wn(ye,Ne){if(Ne=Ne||{},Ne.success=typeof Ne.success=="function"?Ne.success:k.noop,Ne.error=typeof Ne.error=="function"?Ne.error:k.noop,!B){k.warn("Is the server down? (connected=false)"),Ne.error("Is the server down? (connected=false)");return}var qe=oe[ye];if(qe==null||qe.webrtcStuff===null||qe.webrtcStuff===void 0){k.warn("Invalid handle"),Ne.error("Invalid handle");return}var tt=Ne.message,ve=Ne.jsep,ct=k.randomString(12),et={rtcgw:"message",body:tt,transaction:ct};if(qe.token!==null&&qe.token!==void 0&&(et.token=qe.token),me!=null&&(et.apisecret=me),ve!=null&&(et.jsep=ve),k.debug("Sending message to plugin (handle="+ye+"):"),k.debug(et),H){et.session_id=te,et.handle_id=ye,nt[ct]=function(gt){if(k.debug("Message sent!"),k.debug(gt),gt.rtcgw==="success"){var Dt=gt.plugindata;if(Dt==null){k.warn("Request succeeded, but missing plugindata..."),Ne.success();return}k.log("Synchronous transaction successful ("+Dt.plugin+")");var fn=Dt.data;k.debug(fn),Ne.success(fn);return}else if(gt.rtcgw!=="ack"){gt.error!==void 0&&gt.error!==null?(k.error("Ooops: "+gt.error.code+" "+gt.error.reason),Ne.error(gt.error.code+" "+gt.error.reason)):(k.error("Unknown error"),Ne.error("Unknown error"));return}Ne.success()},w.send(JSON.stringify(et));return}k.httpAPICall(U+"/"+te+"/"+ye,{verb:"POST",withCredentials:re,body:et,success:function(Dt){if(k.debug("Message sent!"),k.debug(Dt),Dt.rtcgw==="success"){var fn=Dt.plugindata;if(fn==null){k.warn("Request succeeded, but missing plugindata..."),Ne.success();return}k.log("Synchronous transaction successful ("+fn.plugin+")");var Gt=fn.data;k.debug(Gt),Ne.success(Gt);return}else if(Dt.rtcgw!=="ack"){Dt.error!==void 0&&Dt.error!==null?(k.error("Ooops: "+Dt.error.code+" "+Dt.error.reason),Ne.error(Dt.error.code+" "+Dt.error.reason)):(k.error("Unknown error"),Ne.error("Unknown error"));return}Ne.success()},error:function(Dt,fn){k.error(Dt+":",fn),Ne.error(Dt+": "+fn)}})}function Vn(ye,Ne){if(!B){k.warn("Is the server down? (connected=false)");return}var qe=oe[ye];if(qe==null||qe.webrtcStuff===null||qe.webrtcStuff===void 0){k.warn("Invalid handle");return}var tt={rtcgw:"trickle",candidate:Ne,transaction:k.randomString(12)};if(qe.token!==null&&qe.token!==void 0&&(tt.token=qe.token),me!=null&&(tt.apisecret=me),k.vdebug("Sending trickle candidate (handle="+ye+"):"),k.vdebug(tt),H){tt.session_id=te,tt.handle_id=ye,w.send(JSON.stringify(tt));return}k.httpAPICall(U+"/"+te+"/"+ye,{verb:"POST",withCredentials:re,body:tt,success:function(ct){if(k.vdebug("Candidate sent!"),k.vdebug(ct),ct.rtcgw!=="ack"){k.error("Ooops: "+ct.error.code+" "+ct.error.reason);return}},error:function(ct,et){k.error(ct+":",et)}})}function ii(ye,Ne,qe,tt){var ve=oe[ye];if(ve==null||ve.webrtcStuff===null||ve.webrtcStuff===void 0){k.warn("Invalid handle");return}var ct=ve.webrtcStuff,et=function(Gt){k.log("Received message on data channel:",Gt);var vn=Gt.target.label;ve.ondata(Gt.data,vn)},gt=function(Gt){k.log("Received state change on data channel:",Gt);var vn=Gt.target.label,gr=ct.dataChannel[vn]?ct.dataChannel[vn].readyState:"null";if(k.log("State change on <"+vn+"> data channel: "+gr),gr==="open"){if(ct.dataChannel[vn].pending&&ct.dataChannel[vn].pending.length>0){k.log("Sending pending messages on <"+vn+">:",ct.dataChannel[vn].pending.length);for(var ea in ct.dataChannel[vn].pending){var vi=ct.dataChannel[vn].pending[ea];k.log("Sending string on data channel <"+vn+">: "+vi),ct.dataChannel[vn].send(vi)}ct.dataChannel[vn].pending=[]}ve.ondataopen(vn)}},Dt=function(Gt){k.error("Got error on data channel:",Gt)};qe?ct.dataChannel[Ne]=qe:ct.dataChannel[Ne]=ct.pc.createDataChannel(Ne,{ordered:!1}),ct.dataChannel[Ne].onmessage=et,ct.dataChannel[Ne].onopen=gt,ct.dataChannel[Ne].onclose=gt,ct.dataChannel[Ne].onerror=Dt,ct.dataChannel[Ne].pending=[],tt&&ct.dataChannel[Ne].pending.push(tt)}function ti(ye,Ne){Ne=Ne||{},Ne.success=typeof Ne.success=="function"?Ne.success:k.noop,Ne.error=typeof Ne.error=="function"?Ne.error:k.noop;var qe=oe[ye];if(qe==null||qe.webrtcStuff===null||qe.webrtcStuff===void 0){k.warn("Invalid handle"),Ne.error("Invalid handle");return}var tt=qe.webrtcStuff,ve=Ne.text;if(ve==null){k.warn("Invalid text"),Ne.error("Invalid text");return}var ct=Ne.label?Ne.label:k.dataChanDefaultLabel;if(!tt.dataChannel[ct]){ii(ye,ct,!1,ve),Ne.success();return}if(tt.dataChannel[ct].readyState!=="open"){tt.dataChannel[ct].pending.push(ve),Ne.success();return}k.log("Sending string on data channel <"+ct+">: "+ve),tt.dataChannel[ct].send(ve),Ne.success()}function di(ye,Ne){Ne=Ne||{},Ne.success=typeof Ne.success=="function"?Ne.success:k.noop,Ne.error=typeof Ne.error=="function"?Ne.error:k.noop;var qe=oe[ye];if(qe==null||qe.webrtcStuff===null||qe.webrtcStuff===void 0){k.warn("Invalid handle"),Ne.error("Invalid handle");return}var tt=qe.webrtcStuff;if(tt.dtmfSender===null||tt.dtmfSender===void 0){if(tt.pc!==void 0&&tt.pc!==null){var ve=tt.pc.getSenders(),ct=ve.find(function(Gt){return Gt.track&&Gt.track.kind==="audio"});if(!ct){k.warn("Invalid DTMF configuration (no audio track)"),Ne.error("Invalid DTMF configuration (no audio track)");return}tt.dtmfSender=ct.dtmf,tt.dtmfSender&&(k.log("Created DTMF Sender"),tt.dtmfSender.ontonechange=function(Gt){k.debug("Sent DTMF tone: "+Gt.tone)})}if(tt.dtmfSender===null||tt.dtmfSender===void 0){k.warn("Invalid DTMF configuration"),Ne.error("Invalid DTMF configuration");return}}var et=Ne.dtmf;if(et==null){k.warn("Invalid DTMF parameters"),Ne.error("Invalid DTMF parameters");return}var gt=et.tones;if(gt==null){k.warn("Invalid DTMF string"),Ne.error("Invalid DTMF string");return}var Dt=et.duration;Dt==null&&(Dt=500);var fn=et.gap;fn==null&&(fn=50),k.debug("Sending DTMF string "+gt+" (duration "+Dt+"ms, gap "+fn+"ms)"),tt.dtmfSender.insertDTMF(gt,Dt,fn),Ne.success()}function tr(ye,Ne){Ne=Ne||{},Ne.success=typeof Ne.success=="function"?Ne.success:k.noop,Ne.error=typeof Ne.error=="function"?Ne.error:k.noop;var qe=!0;Ne.asyncRequest!==void 0&&Ne.asyncRequest!==null&&(qe=Ne.asyncRequest===!0);var tt=!0;Ne.noRequest!==void 0&&Ne.noRequest!==null&&(tt=Ne.noRequest===!0),k.log("Destroying handle "+ye+" (async="+qe+")"),zr(ye);var ve=oe[ye];if(ve==null||ve.detached){delete oe[ye],Ne.success();return}if(tt){delete oe[ye],Ne.success();return}if(!B){k.warn("Is the server down? (connected=false)"),Ne.error("Is the server down? (connected=false)");return}var ct={rtcgw:"detach",transaction:k.randomString(12)};if(ve.token!==null&&ve.token!==void 0&&(ct.token=ve.token),me!=null&&(ct.apisecret=me),H){ct.session_id=te,ct.handle_id=ye,w.send(JSON.stringify(ct)),delete oe[ye],Ne.success();return}k.httpAPICall(U+"/"+te+"/"+ye,{verb:"POST",async:qe,withCredentials:re,body:ct,success:function(gt){k.log("Destroyed handle:"),k.debug(gt),gt.rtcgw!=="success"&&k.error("Ooops: "+gt.error.code+" "+gt.error.reason),delete oe[ye],Ne.success()},error:function(gt,Dt){k.error(gt+":",Dt),delete oe[ye],Ne.success()}})}function Ve(ye,Ne,qe,tt,ve){var ct=oe[ye];if(ct==null||ct.webrtcStuff===null||ct.webrtcStuff===void 0){k.warn("Invalid handle"),tt.error("Invalid handle");return}var et=ct.webrtcStuff;k.debug("streamsDone:",ve),ve&&(k.debug(" -- Audio tracks:",ve.getAudioTracks()),k.debug(" -- Video tracks:",ve.getVideoTracks()));var gt=!1;if(!et.myStream||!qe.update||et.streamExternal)et.myStream=ve,gt=!0;else{if((!qe.update&&ir(qe)||qe.update&&(qe.addAudio||qe.replaceAudio))&&ve.getAudioTracks()&&ve.getAudioTracks().length)if(et.myStream.addTrack(ve.getAudioTracks()[0]),k.unifiedPlan){k.log((qe.replaceAudio?"Replacing":"Adding")+" audio track:",ve.getAudioTracks()[0]);var Dt=null,fn=et.pc.getTransceivers();if(fn&&fn.length>0)for(var Gt in fn){var vn=fn[Gt];if(vn.sender&&vn.sender.track&&vn.sender.track.kind==="audio"||vn.receiver&&vn.receiver.track&&vn.receiver.track.kind==="audio"){Dt=vn;break}}Dt&&Dt.sender?Dt.sender.replaceTrack(ve.getAudioTracks()[0]):et.pc.addTrack(ve.getAudioTracks()[0],ve)}else k.log((qe.replaceAudio?"Replacing":"Adding")+" audio track:",ve.getAudioTracks()[0]),et.pc.addTrack(ve.getAudioTracks()[0],ve);if((!qe.update&&Ui(qe)||qe.update&&(qe.addVideo||qe.replaceVideo))&&ve.getVideoTracks()&&ve.getVideoTracks().length)if(et.myStream.addTrack(ve.getVideoTracks()[0]),k.unifiedPlan){k.log((qe.replaceVideo?"Replacing":"Adding")+" video track:",ve.getVideoTracks()[0]);var gr=null,fn=et.pc.getTransceivers();if(fn&&fn.length>0)for(var Gt in fn){var vn=fn[Gt];if(vn.sender&&vn.sender.track&&vn.sender.track.kind==="video"||vn.receiver&&vn.receiver.track&&vn.receiver.track.kind==="video"){gr=vn;break}}gr&&gr.sender?gr.sender.replaceTrack(ve.getVideoTracks()[0]):et.pc.addTrack(ve.getVideoTracks()[0],ve)}else k.log((qe.replaceVideo?"Replacing":"Adding")+" video track:",ve.getVideoTracks()[0]),et.pc.addTrack(ve.getVideoTracks()[0],ve)}if(!et.pc){var ea={iceServers:ue,iceTransportPolicy:pe,bundlePolicy:de};k.webRTCAdapter.browserDetails.browser==="chrome"&&(ea.sdpSemantics=k.webRTCAdapter.browserDetails.version<72?"plan-b":"unified-plan");var vi={optional:[{DtlsSrtpKeyAgreement:!0}]};if(se===!0&&vi.optional.push({googIPv6:!0}),tt.rtcConstraints&&t(tt.rtcConstraints)==="object"){k.debug("Adding custom PeerConnection constraints:",tt.rtcConstraints);for(var Gt in tt.rtcConstraints)vi.optional.push(tt.rtcConstraints[Gt])}k.webRTCAdapter.browserDetails.browser==="edge"&&(ea.bundlePolicy="max-bundle"),k.log("Creating PeerConnection"),k.debug(vi),et.pc=new RTCPeerConnection(ea,vi),k.debug(et.pc),et.pc.getStats&&(et.volume={},et.bitrate.value="0 kbits/sec"),k.log("Preparing local SDP and gathering candidates (trickle="+et.trickle+")"),et.pc.oniceconnectionstatechange=function(Ii){et.pc&&ct.iceState(et.pc.iceConnectionState)},et.pc.onicecandidate=function(Ii){if(Ii.candidate==null||k.webRTCAdapter.browserDetails.browser==="edge"&&Ii.candidate.candidate.indexOf("endOfCandidates")>0)k.log("End of candidates."),et.iceDone=!0,et.trickle===!0?Vn(ye,{completed:!0}):pi(ye,tt);else{var yr={candidate:Ii.candidate.candidate,sdpMid:Ii.candidate.sdpMid,sdpMLineIndex:Ii.candidate.sdpMLineIndex};et.trickle===!0&&Vn(ye,yr)}},et.pc.ontrack=function(Ii){k.log("Handling Remote Track"),k.debug(Ii),Ii.streams&&(et.remoteStream=Ii.streams[0],ct.onremotestream(et.remoteStream),!Ii.track.onended&&(k.log("Adding onended callback to track:",Ii.track),Ii.track.onended=function(yr){k.log("Remote track muted/removed:",yr),et.remoteStream&&(et.remoteStream.removeTrack(yr.target),ct.onremotestream(et.remoteStream))},Ii.track.onmute=Ii.track.onended,Ii.track.onunmute=function(yr){k.log("Remote track flowing again:",yr);try{et.remoteStream.addTrack(yr.target),ct.onremotestream(et.remoteStream)}catch(ps){k.error(ps)}}))}}if(gt&&ve!==null&&ve!==void 0){k.log("Adding local stream");var Kr=tt.simulcast2===!0;ve.getTracks().forEach(function(Ii){if(k.log("Adding local track:",Ii),!Kr)et.pc.addTrack(Ii,ve);else if(Ii.kind==="audio")et.pc.addTrack(Ii,ve);else{k.log("Enabling rid-based simulcasting:",Ii);var yr=fe(tt.simulcastMaxBitrates);et.pc.addTransceiver(Ii,{direction:"sendrecv",streams:[ve],sendEncodings:[{rid:"h",active:!0,maxBitrate:yr.high},{rid:"m",active:!0,maxBitrate:yr.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:yr.low,scaleResolutionDownBy:4}]})}})}wi(qe)&&!et.dataChannel[k.dataChanDefaultLabel]&&(k.log("Creating data channel"),ii(ye,k.dataChanDefaultLabel,!1),et.pc.ondatachannel=function(Ii){k.log("Data channel created by Janus:",Ii),ii(ye,Ii.channel.label,Ii.channel)}),et.myStream&&ct.onlocalstream(et.myStream),Ne==null?Sn(ye,qe,tt):et.pc.setRemoteDescription(Ne).then(function(){if(k.log("Remote description accepted!"),et.remoteSdp=Ne.sdp,et.candidates&&et.candidates.length>0){for(var Ii=0;Ii<et.candidates.length;Ii++){var yr=et.candidates[Ii];k.debug("Adding remote candidate:",yr),!yr||yr.completed===!0?et.pc.addIceCandidate(k.endOfCandidates):et.pc.addIceCandidate(yr)}et.candidates=[]}Hn(ye,qe,tt)},tt.error)}function Mt(ye,Ne,qe){qe=qe||{},qe.success=typeof qe.success=="function"?qe.success:k.noop,qe.error=typeof qe.error=="function"?qe.error:fs;var tt=qe.jsep;if(Ne&&tt){k.error("Provided a JSEP to a createOffer"),qe.error("Provided a JSEP to a createOffer");return}else if(!Ne&&(!tt||!tt.type||!tt.sdp)){k.error("A valid JSEP is required for createAnswer"),qe.error("A valid JSEP is required for createAnswer");return}qe.media=qe.media||{audio:!0,video:!0};var ve=qe.media,ct=oe[ye];if(ct==null||ct.webrtcStuff===null||ct.webrtcStuff===void 0){k.warn("Invalid handle"),qe.error("Invalid handle");return}var et=ct.webrtcStuff;if(et.trickle=mr(qe.trickle),et.pc===void 0||et.pc===null)ve.update=!1,ve.keepAudio=!1,ve.keepVideo=!1;else if(et.pc!==void 0&&et.pc!==null){if(k.log("Updating existing media session"),ve.update=!0,qe.stream!==null&&qe.stream!==void 0)qe.stream!==et.myStream&&k.log("Renegotiation involves a new external stream");else{if(ve.addAudio){if(ve.keepAudio=!1,ve.replaceAudio=!1,ve.removeAudio=!1,ve.audioSend=!0,et.myStream&&et.myStream.getAudioTracks()&&et.myStream.getAudioTracks().length){k.error("Can't add audio stream, there already is one"),qe.error("Can't add audio stream, there already is one");return}}else ve.removeAudio?(ve.keepAudio=!1,ve.replaceAudio=!1,ve.addAudio=!1,ve.audioSend=!1):ve.replaceAudio&&(ve.keepAudio=!1,ve.addAudio=!1,ve.removeAudio=!1,ve.audioSend=!0);if(et.myStream===null||et.myStream===void 0?(ve.replaceAudio&&(ve.keepAudio=!1,ve.replaceAudio=!1,ve.addAudio=!0,ve.audioSend=!0),ir(ve)&&(ve.keepAudio=!1,ve.addAudio=!0)):et.myStream.getAudioTracks()===null||et.myStream.getAudioTracks()===void 0||et.myStream.getAudioTracks().length===0?(ve.replaceAudio&&(ve.keepAudio=!1,ve.replaceAudio=!1,ve.addAudio=!0,ve.audioSend=!0),ir(ve)&&(ve.keepVideo=!1,ve.addAudio=!0)):ir(ve)&&!ve.removeAudio&&!ve.replaceAudio&&(ve.keepAudio=!0),ve.addVideo){if(ve.keepVideo=!1,ve.replaceVideo=!1,ve.removeVideo=!1,ve.videoSend=!0,et.myStream&&et.myStream.getVideoTracks()&&et.myStream.getVideoTracks().length){k.error("Can't add video stream, there already is one"),qe.error("Can't add video stream, there already is one");return}}else ve.removeVideo?(ve.keepVideo=!1,ve.replaceVideo=!1,ve.addVideo=!1,ve.videoSend=!1):ve.replaceVideo&&(ve.keepVideo=!1,ve.addVideo=!1,ve.removeVideo=!1,ve.videoSend=!0);et.myStream===null||et.myStream===void 0||et.myStream.getVideoTracks()===null||et.myStream.getVideoTracks()===void 0||et.myStream.getVideoTracks().length===0?(ve.replaceVideo&&(ve.keepVideo=!1,ve.replaceVideo=!1,ve.addVideo=!0,ve.videoSend=!0),Ui(ve)&&(ve.keepVideo=!1,ve.addVideo=!0)):Ui(ve)&&!ve.removeVideo&&!ve.replaceVideo&&(ve.keepVideo=!0),ve.addData&&(ve.data=!0)}if(ir(ve)&&ve.keepAudio&&Ui(ve)&&ve.keepVideo){ct.consentDialog(!1),Ve(ye,tt,ve,qe,et.myStream);return}}if(ve.update&&!et.streamExternal){if(ve.removeAudio||ve.replaceAudio){if(et.myStream&&et.myStream.getAudioTracks()&&et.myStream.getAudioTracks().length){var gt=et.myStream.getAudioTracks()[0];k.log("Removing audio track:",gt),et.myStream.removeTrack(gt);try{gt.stop()}catch(_a){}}if(et.pc.getSenders()&&et.pc.getSenders().length){var Dt=!0;if(ve.replaceAudio&&k.unifiedPlan&&(Dt=!1),Dt)for(var fn in et.pc.getSenders()){var gt=et.pc.getSenders()[fn];gt&&gt.track&&gt.track.kind==="audio"&&(k.log("Removing audio sender:",gt),et.pc.removeTrack(gt))}}}if(ve.removeVideo||ve.replaceVideo){if(et.myStream&&et.myStream.getVideoTracks()&&et.myStream.getVideoTracks().length){var gt=et.myStream.getVideoTracks()[0];k.log("Removing video track:",gt),et.myStream.removeTrack(gt);try{gt.stop()}catch(Zr){}}if(et.pc.getSenders()&&et.pc.getSenders().length){var Gt=!0;if(ve.replaceVideo&&k.unifiedPlan&&(Gt=!1),Gt)for(var fn in et.pc.getSenders()){var gt=et.pc.getSenders()[fn];gt&&gt.track&&gt.track.kind==="video"&&(k.log("Removing video sender:",gt),et.pc.removeTrack(gt))}}}}if(qe.stream!==null&&qe.stream!==void 0){var vn=qe.stream;if(k.log("MediaStream provided by the application"),k.debug(vn),ve.update&&et.myStream&&et.myStream!==qe.stream&&!et.streamExternal){try{var gr=et.myStream.getTracks();for(var ea in gr){var vi=gr[ea];k.log(vi),vi!=null&&vi.stop()}}catch(_a){}et.myStream=null}et.streamExternal=!0,ct.consentDialog(!1),Ve(ye,tt,ve,qe,vn);return}if(ir(ve)||Ui(ve)){if(!k.isGetUserMediaAvailable()){qe.error("getUserMedia not available");return}var Kr={mandatory:{},optional:[]};ct.consentDialog(!0);var Ii=ir(ve);Ii===!0&&ve!=null&&ve!=null&&t(ve.audio)==="object"&&(Ii=ve.audio);var yr=Ui(ve);if(yr===!0&&ve!=null&&ve!=null){var ps=qe.simulcast===!0,vs=qe.simulcast2===!0;if((ps||vs)&&!tt&&(ve.video===void 0||ve.video===!1)&&(ve.video="hires"),ve.video&&ve.video!="screen"&&ve.video!="window")if(t(ve.video)==="object")yr=ve.video;else{var zi=0,Gr=0;ve.video==="lowres"?(Gr=240,zi=320):ve.video==="lowres-16:9"?(Gr=180,zi=320):ve.video==="hires"||ve.video==="hires-16:9"||ve.video==="hdres"?(Gr=720,zi=1280):ve.video==="fhdres"?(Gr=1080,zi=1920):ve.video==="4kres"?(Gr=2160,zi=3840):ve.video==="stdres"?(Gr=480,zi=640):ve.video==="stdres-16:9"?(Gr=360,zi=640):(k.log("Default video setting is stdres 4:3"),Gr=480,zi=640),k.log("Adding media constraint:",ve.video),yr={height:{ideal:Gr},width:{ideal:zi}},k.log("Adding video constraint:",yr)}else if(ve.video==="screen"||ve.video==="window"){var lu=function(Zr,Yo){ct.consentDialog(!1),Zr?qe.error(Zr):Ve(ye,tt,ve,qe,Yo)},od=function(Zr,Yo,Ds){k.log("Adding media constraint (screen capture)"),k.debug(Zr),navigator.mediaDevices.getUserMedia(Zr).then(function(Gl){Ds?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(oc){Gl.addTrack(oc.getAudioTracks()[0]),Yo(null,Gl)}):Yo(null,Gl)}).catch(function(Gl){ct.consentDialog(!1),Yo(Gl)})};if(ve.screenshareFrameRate||(ve.screenshareFrameRate=3),navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia){navigator.mediaDevices.getDisplayMedia({video:!0}).then(function(_a){ct.consentDialog(!1),ir(ve)&&!ve.keepAudio?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(Zr){_a.addTrack(Zr.getAudioTracks()[0]),Ve(ye,tt,ve,qe,_a)}):Ve(ye,tt,ve,qe,_a)},function(_a){ct.consentDialog(!1),qe.error(_a)});return}if(k.webRTCAdapter.browserDetails.browser==="chrome"){var uu=k.webRTCAdapter.browserDetails.version,jh=33;window.navigator.userAgent.match("Linux")&&(jh=35),uu>=26&&uu<=jh?(Kr={video:{mandatory:{googLeakyBucket:!0,maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:ve.screenshareFrameRate,maxFrameRate:ve.screenshareFrameRate,chromeMediaSource:"screen"}},audio:ir(ve)&&!ve.keepAudio},od(Kr,lu)):k.extension.getScreen(function(_a,Zr){if(_a)return ct.consentDialog(!1),qe.error(_a);Kr={audio:!1,video:{mandatory:{chromeMediaSource:"desktop",maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:ve.screenshareFrameRate,maxFrameRate:ve.screenshareFrameRate},optional:[{googLeakyBucket:!0},{googTemporalLayeredScreencast:!0}]}},Kr.video.mandatory.chromeMediaSourceId=Zr,od(Kr,lu,ir(ve)&&!ve.keepAudio)})}else if(k.webRTCAdapter.browserDetails.browser==="firefox")if(k.webRTCAdapter.browserDetails.version>=33)Kr={video:{mozMediaSource:ve.video,mediaSource:ve.video},audio:ir(ve)&&!ve.keepAudio},od(Kr,function(_a,Zr){if(lu(_a,Zr),!_a)var Yo=Zr.currentTime,Ds=window.setInterval(function(){Zr||window.clearInterval(Ds),Zr.currentTime==Yo&&(window.clearInterval(Ds),Zr.onended&&Zr.onended()),Yo=Zr.currentTime},500)});else{var $h=new Error("NavigatorUserMediaError");$h.name="Your version of Firefox does not support screen sharing, please install Firefox 33 (or more recent versions)",ct.consentDialog(!1),qe.error($h);return}return}}(ve==null||ve.video!=="screen")&&navigator.mediaDevices.enumerateDevices().then(function(_a){var Zr=_a.some(function(ms){return ms.kind==="audioinput"}),Yo=jn(ve)||_a.some(function(ms){return ms.kind==="videoinput"}),Ds=ir(ve),Gl=Ui(ve),oc=wa(ve),sc=xr(ve);if(Ds||Gl||oc||sc){var qh=Ds?Zr:!1,l1=Gl?Yo:!1;if(!qh&&!l1)return ct.consentDialog(!1),qe.error("No capture device found"),!1;if(!qh&&oc)return ct.consentDialog(!1),qe.error("Audio capture is required, but no capture device found"),!1;if(!l1&&sc)return ct.consentDialog(!1),qe.error("Video capture is required, but no capture device found"),!1}var sd={audio:Zr&&!ve.keepAudio?Ii:!1,video:Yo&&!ve.keepVideo?yr:!1};k.debug("getUserMedia constraints",sd),!sd.audio&&!sd.video?(ct.consentDialog(!1),Ve(ye,tt,ve,qe,vn)):navigator.mediaDevices.getUserMedia(sd).then(function(ms){ct.consentDialog(!1),Ve(ye,tt,ve,qe,ms)}).catch(function(ms){ct.consentDialog(!1),qe.error({code:ms.code,name:ms.name,message:ms.message})})}).catch(function(_a){ct.consentDialog(!1),qe.error("enumerateDevices error",_a)})}else Ve(ye,tt,ve,qe)}function jt(ye,Ne){Ne=Ne||{},Ne.success=typeof Ne.success=="function"?Ne.success:k.noop,Ne.error=typeof Ne.error=="function"?Ne.error:fs;var qe=Ne.jsep,tt=oe[ye];if(tt==null||tt.webrtcStuff===null||tt.webrtcStuff===void 0){k.warn("Invalid handle"),Ne.error("Invalid handle");return}var ve=tt.webrtcStuff;if(qe!=null){if(ve.pc===null){k.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),Ne.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");return}ve.pc.setRemoteDescription(qe).then(function(){if(k.log("Remote description accepted!"),ve.remoteSdp=qe.sdp,ve.candidates&&ve.candidates.length>0){for(var ct=0;ct<ve.candidates.length;ct++){var et=ve.candidates[ct];k.debug("Adding remote candidate:",et),!et||et.completed===!0?ve.pc.addIceCandidate(k.endOfCandidates):ve.pc.addIceCandidate(et)}ve.candidates=[]}Ne.success()},Ne.error)}else Ne.error("Invalid JSEP")}function Sn(ye,Ne,qe){qe=qe||{},qe.success=typeof qe.success=="function"?qe.success:k.noop,qe.error=typeof qe.error=="function"?qe.error:k.noop,qe.customizeSdp=typeof qe.customizeSdp=="function"?qe.customizeSdp:k.noop;var tt=oe[ye];if(tt==null||tt.webrtcStuff===null||tt.webrtcStuff===void 0){k.warn("Invalid handle"),qe.error("Invalid handle");return}var ve=tt.webrtcStuff,ct=qe.simulcast===!0;ct?k.log("Creating offer (iceDone="+ve.iceDone+", simulcast="+ct+")"):k.log("Creating offer (iceDone="+ve.iceDone+")");var et={};if(k.unifiedPlan){var gt=null,Dt=null,fn=ve.pc.getTransceivers();if(fn&&fn.length>0)for(var Gt in fn){var vn=fn[Gt];if(vn.sender&&vn.sender.track&&vn.sender.track.kind==="audio"||vn.receiver&&vn.receiver.track&&vn.receiver.track.kind==="audio"){gt||(gt=vn);continue}if(vn.sender&&vn.sender.track&&vn.sender.track.kind==="video"||vn.receiver&&vn.receiver.track&&vn.receiver.track.kind==="video"){Dt||(Dt=vn);continue}}var gr=ir(Ne),ea=co(Ne);!gr&&!ea?Ne.removeAudio&&gt&&(gt.setDirection?gt.setDirection("inactive"):gt.direction="inactive",k.log("Setting audio transceiver to inactive:",gt)):gr&&ea?gt&&(gt.setDirection?gt.setDirection("sendrecv"):gt.direction="sendrecv",k.log("Setting audio transceiver to sendrecv:",gt)):gr&&!ea?gt&&(gt.setDirection?gt.setDirection("sendonly"):gt.direction="sendonly",k.log("Setting audio transceiver to sendonly:",gt)):!gr&&ea&&(gt?(gt.setDirection?gt.setDirection("recvonly"):gt.direction="recvonly",k.log("Setting audio transceiver to recvonly:",gt)):(gt=ve.pc.addTransceiver("audio",{direction:"recvonly"}),k.log("Adding recvonly audio transceiver:",gt)));var vi=Ui(Ne),Kr=_i(Ne);!vi&&!Kr?Ne.removeVideo&&Dt&&(Dt.setDirection?Dt.setDirection("inactive"):Dt.direction="inactive",k.log("Setting video transceiver to inactive:",Dt)):vi&&Kr?Dt&&(Dt.setDirection?Dt.setDirection("sendrecv"):Dt.direction="sendrecv",k.log("Setting video transceiver to sendrecv:",Dt)):vi&&!Kr?Dt&&(Dt.setDirection?Dt.setDirection("sendonly"):Dt.direction="sendonly",k.log("Setting video transceiver to sendonly:",Dt)):!vi&&Kr&&(Dt?(Dt.setDirection?Dt.setDirection("recvonly"):Dt.direction="recvonly",k.log("Setting video transceiver to recvonly:",Dt)):(Dt=ve.pc.addTransceiver("video",{direction:"recvonly"}),k.log("Adding recvonly video transceiver:",Dt)))}else et.offerToReceiveAudio=co(Ne),et.offerToReceiveVideo=_i(Ne);var Ii=qe.iceRestart===!0;Ii&&(et.iceRestart=!0),k.debug(et);var yr=Ui(Ne);if(yr&&ct&&k.webRTCAdapter.browserDetails.browser==="firefox"){k.log("Enabling Simulcasting for Firefox (RID)");var ps=ve.pc.getSenders().find(function(Gr){return Gr.track.kind=="video"});if(ps){var vs=ps.getParameters();vs||(vs={});var zi=fe(qe.simulcastMaxBitrates);vs.encodings=[{rid:"h",active:!0,maxBitrate:zi.high},{rid:"m",active:!0,maxBitrate:zi.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:zi.low,scaleResolutionDownBy:4}],ps.setParameters(vs)}}ve.pc.createOffer(et).then(function(Gr){k.debug(Gr);var lu={type:Gr.type,sdp:Gr.sdp};if(qe.customizeSdp(lu),Gr.sdp=lu.sdp,k.log("Setting local description"),yr&&ct&&(k.webRTCAdapter.browserDetails.browser==="chrome"||k.webRTCAdapter.browserDetails.browser==="safari"?(k.log("Enabling Simulcasting for Chrome (SDP munging)"),Gr.sdp=Xo(Gr.sdp)):k.webRTCAdapter.browserDetails.browser!=="firefox"&&k.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")),ve.mySdp=Gr.sdp,ve.pc.setLocalDescription(Gr).catch(qe.error),ve.mediaConstraints=et,!ve.iceDone&&!ve.trickle){k.log("Waiting for all candidates...");return}k.log("Offer ready"),k.debug(qe),qe.success(Gr)},qe.error)}function Hn(ye,Ne,qe){qe=qe||{},qe.success=typeof qe.success=="function"?qe.success:k.noop,qe.error=typeof qe.error=="function"?qe.error:k.noop,qe.customizeSdp=typeof qe.customizeSdp=="function"?qe.customizeSdp:k.noop;var tt=oe[ye];if(tt==null||tt.webrtcStuff===null||tt.webrtcStuff===void 0){k.warn("Invalid handle"),qe.error("Invalid handle");return}var ve=tt.webrtcStuff,ct=qe.simulcast===!0;ct?k.log("Creating answer (iceDone="+ve.iceDone+", simulcast="+ct+")"):k.log("Creating answer (iceDone="+ve.iceDone+")");var et=null;if(k.unifiedPlan){et={};var gt=null,Dt=null,fn=ve.pc.getTransceivers();if(fn&&fn.length>0)for(var Gt in fn){var vn=fn[Gt];if(vn.sender&&vn.sender.track&&vn.sender.track.kind==="audio"||vn.receiver&&vn.receiver.track&&vn.receiver.track.kind==="audio"){gt||(gt=vn);continue}if(vn.sender&&vn.sender.track&&vn.sender.track.kind==="video"||vn.receiver&&vn.receiver.track&&vn.receiver.track.kind==="video"){Dt||(Dt=vn);continue}}var gr=ir(Ne),ea=co(Ne);if(!gr&&!ea){if(Ne.removeAudio&&gt)try{gt.setDirection?gt.setDirection("inactive"):gt.direction="inactive",k.log("Setting audio transceiver to inactive:",gt)}catch(zi){k.error(zi)}}else if(gr&&ea){if(gt)try{gt.setDirection?gt.setDirection("sendrecv"):gt.direction="sendrecv",k.log("Setting audio transceiver to sendrecv:",gt)}catch(zi){k.error(zi)}}else if(gr&&!ea)try{gt&&(gt.setDirection?gt.setDirection("sendonly"):gt.direction="sendonly",k.log("Setting audio transceiver to sendonly:",gt))}catch(zi){k.error(zi)}else if(!gr&&ea)if(gt)try{gt.setDirection?gt.setDirection("recvonly"):gt.direction="recvonly",k.log("Setting audio transceiver to recvonly:",gt)}catch(zi){k.error(zi)}else gt=ve.pc.addTransceiver("audio",{direction:"recvonly"}),k.log("Adding recvonly audio transceiver:",gt);var vi=Ui(Ne),Kr=_i(Ne);if(!vi&&!Kr){if(Ne.removeVideo&&Dt)try{Dt.setDirection?Dt.setDirection("inactive"):Dt.direction="inactive",k.log("Setting video transceiver to inactive:",Dt)}catch(zi){k.error(zi)}}else if(vi&&Kr){if(Dt)try{Dt.setDirection?Dt.setDirection("sendrecv"):Dt.direction="sendrecv",k.log("Setting video transceiver to sendrecv:",Dt)}catch(zi){k.error(zi)}}else if(vi&&!Kr){if(Dt)try{Dt.setDirection?Dt.setDirection("sendonly"):Dt.direction="sendonly",k.log("Setting video transceiver to sendonly:",Dt)}catch(zi){k.error(zi)}}else if(!vi&&Kr)if(Dt)try{Dt.setDirection?Dt.setDirection("recvonly"):Dt.direction="recvonly",k.log("Setting video transceiver to recvonly:",Dt)}catch(zi){k.error(zi)}else Dt=ve.pc.addTransceiver("video",{direction:"recvonly"}),k.log("Adding recvonly video transceiver:",Dt)}else k.webRTCAdapter.browserDetails.browser=="firefox"||k.webRTCAdapter.browserDetails.browser=="edge"?et={offerToReceiveAudio:co(Ne),offerToReceiveVideo:_i(Ne)}:et={mandatory:{OfferToReceiveAudio:co(Ne),OfferToReceiveVideo:_i(Ne)}};k.debug(et);var Ii=Ui(Ne);if(Ii&&ct&&k.webRTCAdapter.browserDetails.browser==="firefox"){k.log("Enabling Simulcasting for Firefox (RID)");var yr=ve.pc.getSenders()[1];k.log(yr);var ps=yr.getParameters();k.log(ps);var vs=fe(qe.simulcastMaxBitrates);yr.setParameters({encodings:[{rid:"high",active:!0,priority:"high",maxBitrate:vs.high},{rid:"medium",active:!0,priority:"medium",maxBitrate:vs.medium},{rid:"low",active:!0,priority:"low",maxBitrate:vs.low}]})}ve.pc.createAnswer(et).then(function(zi){k.debug(zi);var Gr={type:zi.type,sdp:zi.sdp};if(qe.customizeSdp(Gr),zi.sdp=Gr.sdp,k.log("Setting local description"),Ii&&ct&&(k.webRTCAdapter.browserDetails.browser==="chrome"?k.warn("simulcast=true, but this is an answer, and video breaks in Chrome if we enable it"):k.webRTCAdapter.browserDetails.browser!=="firefox"&&k.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")),ve.mySdp=zi.sdp,ve.pc.setLocalDescription(zi).catch(qe.error),ve.mediaConstraints=et,!ve.iceDone&&!ve.trickle){k.log("Waiting for all candidates...");return}qe.success(zi)},qe.error)}function pi(ye,Ne){Ne=Ne||{},Ne.success=typeof Ne.success=="function"?Ne.success:k.noop,Ne.error=typeof Ne.error=="function"?Ne.error:k.noop;var qe=oe[ye];if(qe==null||qe.webrtcStuff===null||qe.webrtcStuff===void 0){k.warn("Invalid handle, not sending anything");return}var tt=qe.webrtcStuff;if(k.log("Sending offer/answer SDP..."),tt.mySdp===null||tt.mySdp===void 0){k.warn("Local SDP instance is invalid, not sending anything...");return}tt.mySdp={type:tt.pc.localDescription.type,sdp:tt.pc.localDescription.sdp},tt.trickle===!1&&(tt.mySdp.trickle=!1),k.debug(Ne),tt.sdpSent=!0,Ne.success(tt.mySdp)}function hi(ye,Ne){var qe=oe[ye];if(qe==null||qe.webrtcStuff===null||qe.webrtcStuff===void 0)return k.warn("Invalid handle"),0;var tt=Ne?"remote":"local",ve=qe.webrtcStuff;return ve.volume[tt]||(ve.volume[tt]={value:0}),ve.pc.getStats&&k.webRTCAdapter.browserDetails.browser==="chrome"?Ne&&(ve.remoteStream===null||ve.remoteStream===void 0)?(k.warn("Remote stream unavailable"),0):!Ne&&(ve.myStream===null||ve.myStream===void 0)?(k.warn("Local stream unavailable"),0):ve.volume[tt].timer===null||ve.volume[tt].timer===void 0?(k.log("Starting "+tt+" volume monitor"),ve.volume[tt].timer=setInterval(function(){ve.pc.getStats(function(ct){for(var et=ct.result(),gt=0;gt<et.length;gt++){var Dt=et[gt];Dt.type=="ssrc"&&(Ne&&Dt.stat("audioOutputLevel")?ve.volume[tt].value=parseInt(Dt.stat("audioOutputLevel")):!Ne&&Dt.stat("audioInputLevel")&&(ve.volume[tt].value=parseInt(Dt.stat("audioInputLevel"))))}})},200),0):ve.volume[tt].value:(k.warn("Getting the "+tt+" volume unsupported by browser"),0)}function yi(ye,Ne){var qe=oe[ye];if(qe==null||qe.webrtcStuff===null||qe.webrtcStuff===void 0)return k.warn("Invalid handle"),!0;var tt=qe.webrtcStuff;return tt.pc===null||tt.pc===void 0?(k.warn("Invalid PeerConnection"),!0):tt.myStream===void 0||tt.myStream===null?(k.warn("Invalid local MediaStream"),!0):Ne?tt.myStream.getVideoTracks()===null||tt.myStream.getVideoTracks()===void 0||tt.myStream.getVideoTracks().length===0?(k.warn("No video track"),!0):!tt.myStream.getVideoTracks()[0].enabled:tt.myStream.getAudioTracks()===null||tt.myStream.getAudioTracks()===void 0||tt.myStream.getAudioTracks().length===0?(k.warn("No audio track"),!0):!tt.myStream.getAudioTracks()[0].enabled}function nr(ye,Ne,qe){var tt=oe[ye];if(tt==null||tt.webrtcStuff===null||tt.webrtcStuff===void 0)return k.warn("Invalid handle"),!1;var ve=tt.webrtcStuff;return ve.pc===null||ve.pc===void 0?(k.warn("Invalid PeerConnection"),!1):ve.myStream===void 0||ve.myStream===null?(k.warn("Invalid local MediaStream"),!1):Ne?ve.myStream.getVideoTracks()===null||ve.myStream.getVideoTracks()===void 0||ve.myStream.getVideoTracks().length===0?(k.warn("No video track"),!1):(ve.myStream.getVideoTracks()[0].enabled=!qe,!0):ve.myStream.getAudioTracks()===null||ve.myStream.getAudioTracks()===void 0||ve.myStream.getAudioTracks().length===0?(k.warn("No audio track"),!1):(ve.myStream.getAudioTracks()[0].enabled=!qe,!0)}function zl(ye){var Ne=oe[ye];if(Ne==null||Ne.webrtcStuff===null||Ne.webrtcStuff===void 0)return k.warn("Invalid handle"),"Invalid handle";var qe=Ne.webrtcStuff;return qe.pc===null||qe.pc===void 0?"Invalid PeerConnection":qe.pc.getStats?qe.bitrate.timer===null||qe.bitrate.timer===void 0?(k.log("Starting bitrate timer (via getStats)"),qe.bitrate.timer=setInterval(function(){qe.pc.getStats().then(function(tt){tt.forEach(function(ve){if(ve){var ct=!1;if(((ve.mediaType==="video"||ve.id.toLowerCase().indexOf("video")>-1)&&ve.type==="inbound-rtp"&&ve.id.indexOf("rtcp")<0||ve.type=="ssrc"&&ve.bytesReceived&&(ve.googCodecName==="VP8"||ve.googCodecName===""))&&(ct=!0),ct)if(qe.bitrate.bsnow=ve.bytesReceived,qe.bitrate.tsnow=ve.timestamp,qe.bitrate.bsbefore===null||qe.bitrate.tsbefore===null)qe.bitrate.bsbefore=qe.bitrate.bsnow,qe.bitrate.tsbefore=qe.bitrate.tsnow;else{var et=qe.bitrate.tsnow-qe.bitrate.tsbefore;k.webRTCAdapter.browserDetails.browser=="safari"&&(et=et/1e3);var gt=Math.round((qe.bitrate.bsnow-qe.bitrate.bsbefore)*8/et);k.webRTCAdapter.browserDetails.browser==="safari"&&(gt=parseInt(gt/1e3)),qe.bitrate.value=gt+" kbits/sec",qe.bitrate.bsbefore=qe.bitrate.bsnow,qe.bitrate.tsbefore=qe.bitrate.tsnow}}})})},1e3),"0 kbits/sec"):qe.bitrate.value:(k.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser")}function fs(ye){k.error("WebRTC error:",ye)}function zr(ye,Ne){k.log("Cleaning WebRTC stuff");var qe=oe[ye];if(qe!=null){var tt=qe.webrtcStuff;if(tt!=null){if(Ne===!0){var ve={rtcgw:"hangup",transaction:k.randomString(12)};qe.token!==null&&qe.token!==void 0&&(ve.token=qe.token),me!=null&&(ve.apisecret=me),k.debug("Sending hangup request (handle="+ye+"):"),k.debug(ve),H?(ve.session_id=te,ve.handle_id=ye,w.send(JSON.stringify(ve))):k.httpAPICall(U+"/"+te+"/"+ye,{verb:"POST",withCredentials:re,body:ve})}tt.remoteStream=null,tt.volume&&(tt.volume.local&&tt.volume.local.timer&&clearInterval(tt.volume.local.timer),tt.volume.remote&&tt.volume.remote.timer&&clearInterval(tt.volume.remote.timer)),tt.volume={},tt.bitrate.timer&&clearInterval(tt.bitrate.timer),tt.bitrate.timer=null,tt.bitrate.bsnow=null,tt.bitrate.bsbefore=null,tt.bitrate.tsnow=null,tt.bitrate.tsbefore=null,tt.bitrate.value=null;try{if(!tt.streamExternal&&tt.myStream!==null&&tt.myStream!==void 0){k.log("Stopping local stream tracks");var ct=tt.myStream.getTracks();for(var et in ct){var gt=ct[et];k.log(gt),gt!=null&&gt.stop()}}}catch(Dt){}tt.streamExternal=!1,tt.myStream=null;try{tt.pc.close()}catch(Dt){}tt.pc=null,tt.candidates=null,tt.mySdp=null,tt.remoteSdp=null,tt.iceDone=!1,tt.dataChannel={},tt.dtmfSender=null}qe.oncleanup()}}function Xo(ye){for(var Ne=ye.split(`\r
`),qe=!1,tt=[-1],ve=[-1],ct=null,et=null,gt=null,Dt=null,fn=-1,Gt=0;Gt<Ne.length;Gt++){var vn=Ne[Gt].match(/m=(\w+) */);if(vn){var gr=vn[1];if(gr==="video")if(tt[0]<0)qe=!0;else{fn=Gt;break}else if(tt[0]>-1){fn=Gt;break}continue}if(qe){var ea=Ne[Gt].match(/a=ssrc-group:FID (\d+) (\d+)/);if(ea){tt[0]=ea[1],ve[0]=ea[2],Ne.splice(Gt,1),Gt--;continue}if(tt[0]){var vi=Ne[Gt].match("a=ssrc:"+tt[0]+" cname:(.+)");if(vi&&(ct=vi[1]),vi=Ne[Gt].match("a=ssrc:"+tt[0]+" msid:(.+)"),vi&&(et=vi[1]),vi=Ne[Gt].match("a=ssrc:"+tt[0]+" mslabel:(.+)"),vi&&(gt=vi[1]),vi=Ne[Gt].match("a=ssrc:"+tt[0]+" label:(.+)"),vi&&(Dt=vi[1]),Ne[Gt].indexOf("a=ssrc:"+ve[0])===0){Ne.splice(Gt,1),Gt--;continue}if(Ne[Gt].indexOf("a=ssrc:"+tt[0])===0){Ne.splice(Gt,1),Gt--;continue}}if(Ne[Gt].length==0){Ne.splice(Gt,1),Gt--;continue}}}if(tt[0]<0){fn=-1,qe=!1;for(var Gt=0;Gt<Ne.length;Gt++){var vn=Ne[Gt].match(/m=(\w+) */);if(vn){var gr=vn[1];if(gr==="video")if(tt[0]<0)qe=!0;else{fn=Gt;break}else if(tt[0]>-1){fn=Gt;break}continue}if(qe){if(tt[0]<0){var Kr=Ne[Gt].match(/a=ssrc:(\d+)/);if(Kr){tt[0]=Kr[1],Ne.splice(Gt,1),Gt--;continue}}else{var vi=Ne[Gt].match("a=ssrc:"+tt[0]+" cname:(.+)");if(vi&&(ct=vi[1]),vi=Ne[Gt].match("a=ssrc:"+tt[0]+" msid:(.+)"),vi&&(et=vi[1]),vi=Ne[Gt].match("a=ssrc:"+tt[0]+" mslabel:(.+)"),vi&&(gt=vi[1]),vi=Ne[Gt].match("a=ssrc:"+tt[0]+" label:(.+)"),vi&&(Dt=vi[1]),Ne[Gt].indexOf("a=ssrc:"+ve[0])===0){Ne.splice(Gt,1),Gt--;continue}if(Ne[Gt].indexOf("a=ssrc:"+tt[0])===0){Ne.splice(Gt,1),Gt--;continue}}if(Ne[Gt].length==0){Ne.splice(Gt,1),Gt--;continue}}}}if(tt[0]<0)return k.warn("Couldn't find the video SSRC, simulcasting NOT enabled"),ye;fn<0&&(fn=Ne.length),tt[1]=Math.floor(Math.random()*4294967295),tt[2]=Math.floor(Math.random()*4294967295),ve[1]=Math.floor(Math.random()*4294967295),ve[2]=Math.floor(Math.random()*4294967295);for(var Gt=0;Gt<tt.length;Gt++)ct&&(Ne.splice(fn,0,"a=ssrc:"+tt[Gt]+" cname:"+ct),fn++),et&&(Ne.splice(fn,0,"a=ssrc:"+tt[Gt]+" msid:"+et),fn++),gt&&(Ne.splice(fn,0,"a=ssrc:"+tt[Gt]+" mslabel:"+gt),fn++),Dt&&(Ne.splice(fn,0,"a=ssrc:"+tt[Gt]+" label:"+Dt),fn++),ct&&(Ne.splice(fn,0,"a=ssrc:"+ve[Gt]+" cname:"+ct),fn++),et&&(Ne.splice(fn,0,"a=ssrc:"+ve[Gt]+" msid:"+et),fn++),gt&&(Ne.splice(fn,0,"a=ssrc:"+ve[Gt]+" mslabel:"+gt),fn++),Dt&&(Ne.splice(fn,0,"a=ssrc:"+ve[Gt]+" label:"+Dt),fn++);return Ne.splice(fn,0,"a=ssrc-group:FID "+tt[2]+" "+ve[2]),Ne.splice(fn,0,"a=ssrc-group:FID "+tt[1]+" "+ve[1]),Ne.splice(fn,0,"a=ssrc-group:FID "+tt[0]+" "+ve[0]),Ne.splice(fn,0,"a=ssrc-group:SIM "+tt[0]+" "+tt[1]+" "+tt[2]),ye=Ne.join(`\r
`),ye.endsWith(`\r
`)||(ye+=`\r
`),ye}function ir(ye){return k.debug("isAudioSendEnabled:",ye),ye==null?!0:ye.audio===!1?!1:ye.audioSend===void 0||ye.audioSend===null?!0:ye.audioSend===!0}function wa(ye){return k.debug("isAudioSendRequired:",ye),ye==null||ye.audio===!1||ye.audioSend===!1||ye.failIfNoAudio===void 0||ye.failIfNoAudio===null?!1:ye.failIfNoAudio===!0}function co(ye){return k.debug("isAudioRecvEnabled:",ye),ye==null?!0:ye.audio===!1?!1:ye.audioRecv===void 0||ye.audioRecv===null?!0:ye.audioRecv===!0}function Ui(ye){return k.debug("isVideoSendEnabled:",ye),ye==null?!0:ye.video===!1?!1:ye.videoSend===void 0||ye.videoSend===null?!0:ye.videoSend===!0}function xr(ye){return k.debug("isVideoSendRequired:",ye),ye==null||ye.video===!1||ye.videoSend===!1||ye.failIfNoVideo===void 0||ye.failIfNoVideo===null?!1:ye.failIfNoVideo===!0}function _i(ye){return k.debug("isVideoRecvEnabled:",ye),ye==null?!0:ye.video===!1?!1:ye.videoRecv===void 0||ye.videoRecv===null?!0:ye.videoRecv===!0}function jn(ye){if(k.debug("isScreenSendEnabled:",ye),ye==null||t(ye.video)!=="object"||t(ye.video.mandatory)!=="object")return!1;var Ne=ye.video.mandatory;return Ne.chromeMediaSource?Ne.chromeMediaSource==="desktop"||Ne.chromeMediaSource==="screen":Ne.mozMediaSource?Ne.mozMediaSource==="window"||Ne.mozMediaSource==="screen":Ne.mediaSource?Ne.mediaSource==="window"||Ne.mediaSource==="screen":!1}function wi(ye){return k.debug("isDataEnabled:",ye),k.webRTCAdapter.browserDetails.browser=="edge"?(k.warn("Edge doesn't support data channels yet"),!1):ye==null?!1:ye.data===!0}function mr(ye){return k.debug("isTrickleEnabled:",ye),ye==null?!0:ye===!0}}window.Janus=k;var _t=null,Ct=null,J="tts-"+Janus.randomString(12),ee=null;Janus=window.Janus,Janus.init({debug:"all",callback:function(){window.stopTalk=function(){_t.destroy()},window.startTalk=function(){if(!Janus.isWebrtcSupported()){bootbox.alert("No WebRTC support... ");return}_t=new Janus({server:window.EZUIKit.opt.rtcUrl,success:function(){_t.attach({plugin:"rtcgw.plugin.tts",opaqueId:J,success:function(T){Ct=T,Janus.log("Plugin attached! ("+Ct.getPlugin()+", id="+Ct.getId()+")");var R=window.EZUIKit.opt.talkLink;console.log("ttsUlr",R);var N={request:"start",url:R,codec:"opus",dir:"sendrecv",audio_debug:1};window.EZUIKit.opt.talkType==="gb28181"&&(N.devProto="gb28181"),Janus.debug("Trying a createOffer too (audio/video sendrecv)"),Ct.createOffer({media:{audio:!0,video:!1,data:!1},simulcast:!1,simulcast2:!1,success:function(U){Janus.debug("Got SDP!"),Janus.debug(U),Ct.send({message:N,jsep:U}),typeof window.EZUIKit.handleTalkSuccess!="undefined"&&window.EZUIKit.handleTalkSuccess()},error:function(U){Janus.error("WebRTC error:",U),typeof window.EZUIKit.handleTalkError!="undefined"&&window.EZUIKit.handleTalkError(U)}})},error:function(T){console.error(" -- Error attaching plugin...",T),bootbox.alert("Error attaching plugin... "+T),window.EZUIKit.handleTalkError!=="undefined"&&window.EZUIKit.handleTalkError(T)},consentDialog:function(T){Janus.debug("Consent dialog should be "+(T?"on":"off")+" now")},iceState:function(T){Janus.log("ICE state changed to "+T)},mediaState:function(T,R){Janus.log("Janus "+(R?"started":"stopped")+" receiving our "+T)},webrtcState:function(T){Janus.log("Janus says our WebRTC PeerConnection is "+(T?"up":"down")+" now")},slowLink:function(T,R){Janus.warn("Janus reports problems "+(T?"sending":"receiving")+" packets on this PeerConnection ("+R+" lost packets)")},onmessage:function(T,R){Janus.debug(" ::: Got a message :::"),Janus.debug(T),R!=null&&(Janus.debug("Handling SDP as well..."),Janus.debug(R),Ct.handleRemoteJsep({jsep:R}));var N=T.result;if(N!=null){if(N==="done"){bootbox.alert("The TTS Test is over"),ee!=null&&ee.stop(),ee=null;return}N==="msg"&&typeof window.EZUIKit.handleTalkMessage!="undefined"&&window.EZUIKit.handleTalkMessage(T);var z=N.status;z==="slow_link"&&toastr.warning("Janus apparently missed many packets we sent, maybe we should reduce the bitrate","Packet loss?",{timeOut:2e3})}},onlocalstream:function(T){Janus.debug(" ::: Got a local stream :::"),Janus.debug(T),Janus.attachMediaStream(document.getElementById("myaudio"),T),Ct.webrtcStuff.pc.iceConnectionState!=="completed"&&Ct.webrtcStuff.pc.iceConnectionState!=="connected"&&(ee==null?document.getElementById("audioright"):ee.spin());var R=T.getAudioTracks();R==null||R.length},onremotestream:function(T){Janus.debug(" ::: Got a remote stream :::"),Janus.debug(T),Janus.attachMediaStream(document.getElementById("peeraudio"),T);var R=T.getAudioTracks();R==null||R.length===0||document.getElementById("peeraudio").play()},ondataopen:function(T){Janus.log("The DataChannel is available!")},ondata:function(T){Janus.debug("We got data from the DataChannel! "+T)},oncleanup:function(){Janus.log(" ::: Got a cleanup notification :::"),ee!=null&&ee.stop(),ee=null}})},error:function(w){Janus.error(w),window.EZUIKit.handleTalkError!=="undefined"&&window.EZUIKit.handleTalkError(w)},destroyed:function(){}})}}}),window.janus=_t,window.tts=Ct;var Ue=function(){function Z(H){var w=this;i(this,Z),this.jSPlugin=H,this.codeHandler=new Lt,this.pluginStatus=new F(this,this.jSPlugin.params.id);var T=document.createElement("div");T.id="audioleft";var R=document.createElement("div");R.id="audioright",R.style="display:none;";var N=document.createElement("audio");N.id="myaudio",N.muted=!0,N.setAttribute("autoplay",!0),N.setAttribute("controls",!0),T.appendChild(N),T.style="display:none;";var z=document.createElement("audio");z.id="peeraudio",z.setAttribute("autoplay",!0),z.setAttribute("controls",!0),R.appendChild(z),window.EZUIKit.handleTalkError=function(U){console.log("talk err",U),typeof w.jSPlugin.handleTalkError!="undefined"&&w.jSPlugin.handleTalkError(U)},window.EZUIKit.handleTalkSuccess=function(U){console.log("talk success",U),typeof w.jSPlugin.handleTalkSuccess!="undefined"&&w.jSPlugin.handleTalkSuccess(U)},window.EZUIKit.opt={rtcUrl:"",talkLink:"",ttsUrl:"",stream:"",deviceSerial:S(this.jSPlugin.url).deviceSerial,channelNo:S(this.jSPlugin.url).channelNo},document.body.appendChild(T),document.body.appendChild(R)}return a(Z,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"startTalk",value:function(){var w=this;if(this.jSPlugin.capacity&&this.jSPlugin.capacity.support_talk&&!(this.jSPlugin.capacity&&(this.jSPlugin.capacity.support_talk==="3"||this.jSPlugin.capacity.support_talk==="1")))return typeof this.jSPlugin.params.handleError=="function"&&(this.pluginStatus.loadingSetText({text:"设备不支持对讲",color:"red",delayClear:2e3}),this.jSPlugin.params.handleError({msg:"设备不支持对讲",retcode:-1e3,id:this.jSPlugin.params.id,type:"handleError"})),console.log("设备不支持对讲"),!1;var T=new FormData;T.append("accessToken",this.jSPlugin.accessToken),T.append("deviceSerial",S(this.jSPlugin.url).deviceSerial),T.append("channelNo",S(this.jSPlugin.url).channelNo),fetch(this.jSPlugin.env.domain+"/api/lapp/live/talk/url",{method:"POST",body:T}).then(function(R){return R.json()}).then(function(R){if(R.code==200){var N=R.data;if(N){var z=N.rtcUrl;z.indexOf("ws")===-1&&(z=z.replace("https","wss").replace("rtcgw","rtcgw-ws")),window.EZUIKit.opt.rtcUrl=z,window.EZUIKit.opt.ttsUrl="tts://"+N.ttsUrl,window.EZUIKit.opt.deviceSerial=S(w.jSPlugin.url).deviceSerial,window.EZUIKit.opt.channelNo=S(w.jSPlugin.url).channelNo;var U=window.EZUIKit.opt.ttsUrl.split("?");if(U.length===2){var ue="talk?dev="+window.EZUIKit.opt.deviceSerial+"&chann="+window.EZUIKit.opt.channelNo+"&encodetype=2";window.EZUIKit.opt.talkLink=window.EZUIKit.opt.ttsUrl.split("?")[0]+"/"+ue,window.EZUIKit.opt.talkType="gb28181"}else{var ue="talk://"+window.EZUIKit.opt.deviceSerial+":0:"+window.EZUIKit.opt.channelNo+":cas.ys7.com:6500";window.EZUIKit.opt.talkLink=window.EZUIKit.opt.ttsUrl.split("?")[0]+"/"+ue}window.EZUIKit.opt.stream=N.stream,window.startTalk()}}else console.log(R.code,w.codeHandler.matchInfo(R.code,"talk")),w.pluginStatus.loadingSetText({text:w.codeHandler.matchInfo(R.code,"talk").msg||R.msg,color:"red",delayClear:2e3}),typeof w.jSPlugin.params.handleError=="function"&&w.jSPlugin.params.handleError({msg:R.msg,retcode:R.code,id:w.jSPlugin.params.id,type:"handleError"})}).catch(function(R){console.log("err",R)})}},{key:"stopTalk",value:function(){window.stopTalk(),document.getElementById("myaudio")&&document.getElementById("myaudio").srcObject&&document.getElementById("myaudio").srcObject.getTracks()[0].stop()}}]),Z}(),xt=function(){function Z(H){var w=this;i(this,Z),this.jSPlugin=H;var T=document.createElement("style");T.innerHTML=`
body{
padding: 0;
margin: 0;
}
#mobile-ez-ptz-container {
display: inline-block;
width: 375px;
text-align: center;
}
.live-ptz-title{
height: 25px;
font-size: 18px;
color: #2c2c2c;
text-align: center;
font-weight: 700;
margin: 24px 0 12px;
}
.live-ptz-intro {
margin-bottom: 24px;
color: #aaaaaa;
}
.mobile-ez-ptz-wrap {
background-image: linear-gradient(180deg, #f6f8ff 0%, #ededed6b 50%)
}
#mobile-ez-ptz-container .mobile-ez-ptz-container {
position: relative;
width: 260px;
height: 260px;
background: rgba(255, 255, 255, 0.80);
border: 1px solid rgba(255, 255, 255, 0.80);
border-radius: 100%;
cursor: pointer;
overflow: hidden;
margin: auto;
}
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.top {
width: 0;
height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #aaaaaa;
position: absolute;
display: inline-block;
left: calc(50% - 6px);
top: 10px;
}
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.top.active {
border-bottom-color: #1890FF;
}
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.bottom {
width: 0;
height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid #aaaaaa;
position: absolute;
display: inline-block;
left: calc(50% - 6px);
bottom: 10px;
}
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.bottom.active {
border-top-color: #1890FF;
}
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.right {
width: 0;
height: 0;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-left: 6px solid #aaaaaa;
position: absolute;
display: inline-block;
top: calc(50% - 6px);
right: 10px;
}
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.right.active {
border-left-color: #1890FF;
}
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.left {
width: 0;
height: 0;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-right: 6px solid #aaaaaa;
position: absolute;
display: inline-block;
top: calc(50% - 6px);
left: 10px;
}
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.left.active {
border-right-color: #1890FF;
}
#mobile-ez-ptz-container .mobile-ez-ptz-container .ez-ptz-main.center {
width: 52px;
height: 52px;
background: #FFFFFF;
border: 2px solid #eee;
border-radius: 100%;
top: calc(50% - 26px);
left: calc(50% - 26px);
position: absolute;
/* box-shadow: 0px -39px 40px 6px #1890ff; */
}
#mobile-ez-ptz-container .mobile-ez-ptz-wrap {
display: inline-block;
padding: 24px 24px;
border-radius: 100%;
overflow: hidden;
}
#mobile-ez-ptz-container .ez-ptz-close {
position: absolute;
color: #FFFFFF;
top: 0;
right: 0px;
}`,document.getElementsByTagName("head")[0].appendChild(T);var R=document.createElement("div");R.className="mobile-ez-ptz-container",R.id="mobile-ez-ptz-container",R.style="display:inline-block;width: ".concat(this.jSPlugin.width,"px;text-align:center;");var N=document.createElement("div");N.className="live-ptz-title",N.id="live-ptz-title",N.innerHTML="云台控制",document.getElementById("live-ptz-title")||R.appendChild(N);var z=document.createElement("div");z.className="live-ptz-intro",z.id="live-ptz-intro",z.innerHTML="请通过操控云台来调整摄像机视角",document.getElementById("live-ptz-intro")||R.appendChild(z);var U=document.createElement("div");U.id="mobile-ez-ptz-item",U.className="mobile-ez-ptz-wrap",U.innerHTML=`
<div class="mobile-ez-ptz-container" id="mobile-ez-ptz-container">
<div class="ez-ptz-main center"></div>
<div class="mobile-ez-ptz-icon top default"></div>
<div class="mobile-ez-ptz-icon left default"></div>
<div class="mobile-ez-ptz-icon bottom default"></div>
<div class="mobile-ez-ptz-icon right default"></div>
</div>
`,document.getElementById("mobile-ez-ptz-item")||R.appendChild(U),h(R,document.getElementById("".concat(this.jSPlugin.id,"-wrap"))),document.getElementById("mobile-ez-ptz-item").ontouchstart=function(ue){ue.preventDefault(),console.log("触摸开始"),w._handlePtzTouch(ue,"start")},document.getElementById("mobile-ez-ptz-item").ontouchend=function(ue){ue.preventDefault(),console.log("触摸结束",ue),w._handlePtzTouch(ue,"stop")},document.getElementById("mobile-ez-ptz-item").onmousedown=function(ue){ue.preventDefault(),console.log("触摸开始"),w._handlePtzTouch(ue,"start")},document.getElementById("mobile-ez-ptz-item").onmouseup=function(ue){ue.preventDefault(),console.log("触摸结束",ue),w._handlePtzTouch(ue,"stop")}}return a(Z,[{key:"show",value:function(){document.getElementById("mobile-ez-ptz-item").style="display: inline-block"}},{key:"hide",value:function(){document.getElementById("mobile-ez-ptz-item").style="display: none"}},{key:"_handlePtzTouch",value:function(w,T){var R=document.getElementById("mobile-ez-ptz-item").getBoundingClientRect(),N=R.left+130,z=R.top+130,U=w.x||w.changedTouches[0].clientX,ue=w.y||w.changedTouches[0].clientY,pe=U-N,de=ue-z,se=0,re=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start";Math.abs(pe)>Math.abs(de)?pe>0?(se=3,document.getElementsByClassName("mobile-ez-ptz-icon")[3].className=document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("default","active")):(se=2,document.getElementsByClassName("mobile-ez-ptz-icon")[1].className=document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("default","active")):de>0?(se=1,document.getElementsByClassName("mobile-ez-ptz-icon")[2].className=document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("default","active")):(se=0,document.getElementsByClassName("mobile-ez-ptz-icon")[0].className=document.getElementsByClassName("mobile-ez-ptz-icon")[0].className.replace("default","active")),document.getElementById("mobile-ez-ptz-item").style="background-image:linear-gradient(".concat(se===0?180:se===1?0:se===2?90:270,"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)"),T==="stop"&&(re=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop",document.getElementById("mobile-ez-ptz-item").style="",document.getElementsByClassName("mobile-ez-ptz-icon")[3].className=document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[1].className=document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[2].className=document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[0].className=document.getElementsByClassName("mobile-ez-ptz-icon")[0].className.replace("active","default"));var Oe=new FormData;Oe.append("deviceSerial",S(this.jSPlugin.url).deviceSerial),Oe.append("channelNo",S(this.jSPlugin.url).channelNo),Oe.append("speed",1),Oe.append("direction",se),Oe.append("accessToken",this.jSPlugin.accessToken),fetch(re,{method:"POST",body:Oe}).then(function(be){return be.json()}).then(function(be){be.code==200||(be.code==60005||be.code==60002||be.code==60003||be.code==60004)&&(document.getElementById("mobile-ez-ptz-item").style="background-image:linear-gradient(".concat(se===0?180:se===1?0:se===2?90:270,"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)"))}).catch(function(be){console.log("云台调用异常",be)})}}]),Z}(),Bt=0,Ce="成功",We={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"}]},footer:{color:"#FFFFFF",backgroundColor:"rgb(0 0 0 / 0%)",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-0",iconId:"play",part:"left",defaultActive:1,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-1",iconId:"capturePicture",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-2",iconId:"sound",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-3",iconId:"pantile",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-4",iconId:"recordvideo",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-5",iconId:"talk",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-6",iconId:"hd",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-7",iconId:"webExpend",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-8",iconId:"expend",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"}]}},$e={retcode:Bt,msg:Ce,data:We},mt={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},Yt={data:mt},st={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},it={data:st},Vt={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},Zt={data:Vt},nn={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},cn={data:nn},an={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:0},{iconId:"deviceName",part:"left",defaultActive:0,isrender:0},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:0},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:0},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:0}]}},Ln={data:an},je={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},Ht={data:je},wn={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},zn={data:wn},Be=[{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"pcLive",themeIntro:"PC直播全量版",themeName:"PC直播全量版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:Zt.data.header,footer:Zt.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"security",themeIntro:"PC直播安防版",themeName:"PC直播安防版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:cn.data.header,footer:cn.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"voice",themeIntro:"PC直播语音版",themeName:"PC直播语音版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:Ht.data.header,footer:Ht.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"simple",themeIntro:"PC直播极简版",themeName:"PC直播极简版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"",header:Ln.data.header,footer:Ln.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"pcRec",themeIntro:"PC回放全量版",themeName:"PC回放全量版",themeType:"webRec",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:zn.data.header,footer:zn.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"mobileLive",themeIntro:"Mobile直播全量版",themeName:"Mobile直播全量版",themeType:"mobileLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:Yt.data.header,footer:Yt.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"mobileRec",themeIntro:"Mobile回放全量版",themeName:"Mobile回放全量版",themeType:"mobileRec",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:it.data.header,footer:it.data.footer}],pn=function(){function Z(H){var w=this;i(this,Z),this.jSPlugin=H,this.enableZoom=!1,this.isMouseDown=!1,this.videoWidth=1920,this.videoHeight=1080,this.currentScale=1,this.currentPosition={x:0,y:0,xPercent:.1,yPercent:.1,xCurrentVideo:0,yCurrentVideo:0,left:0,top:0,right:1920,bottom:1080},this.DOM=document.getElementById(H.id),this.clientRect=document.getElementById(H.id).getBoundingClientRect();var T=document.createElement("div");T.id="".concat(H.id,"-zoom-container"),T.style=`position: absolute;
display:none;
left: 12px;
bottom: 80px;`;var R=`
<div
style="display: inline-flex;flex-direction: column;width: 38px;height: 160px;background:rgba(0,0,0,0.60);border-radius: 8px;align-items: center;">
<div id="`.concat(this.jSPlugin.id,`-scale-value" style="font-size: 12px;color:#FFFFFF;margin-top:10px;margin-bottom:4px;">2.0X</div>
<div style="width: 24px;" id="`).concat(this.jSPlugin.id,`-addScale">
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" fill="#FFFFFF" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
<title>放大</title>
<g id="矩形">
<rect class="st0" width="20" height="20" fill="none"/>
</g>
<g id="形状结合">
<path class="st1" d="M10,3.8c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2S3.8,13.5,3.8,10S6.5,3.8,10,3.8z M10,5c-2.8,0-5,2.2-5,5
s2.2,5,5,5s5-2.2,5-5S12.8,5,10,5z"/>
</g>
<g id="路径-4">
<path class="st2" d="M12.5,10.7h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S12.8,10.7,12.5,10.7z"/>
</g>
<g id="路径-4备份">
<path class="st2" d="M10,13.2c-0.3,0-0.6-0.3-0.6-0.6v-5c0-0.3,0.3-0.6,0.6-0.6s0.6,0.3,0.6,0.6v5C10.6,12.9,10.3,13.2,10,13.2z"/>
</g>
</svg>
</div>
<div style="
position: relative;
width: 1px;
height: 64px;
border: 1px solid rgba(255,255,255,0.75);
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;">
<div class="scale-body-line-dot" id="`).concat(this.jSPlugin.id,`-scale-body-line-dot" style="width: 8px;
height: 8px;
background: #FFFFFF;
border-radius: 100%;
position: absolute;
border: 1.5px solid rgba(64,122,255,1);"></div>
<div id="`).concat(this.jSPlugin.id,`-line-dot" style="width: 1px;
height: 0%;
background: #1890FF;
bottom: 0;"></div>
</div>
<div style="width: 24px;margin-top: 6px;" id="`).concat(this.jSPlugin.id,`-subScale">
<?xml version="1.0" encoding="utf-8"?>
<svg fill="#FFFFFF" version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
<title>缩小</title>
<g id="矩形">
<rect class="st0" width="20" height="20" fill="none"/>
</g>
<g id="形状结合">
<path class="st1" d="M10,3.8c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2S3.8,13.5,3.8,10S6.5,3.8,10,3.8z M10,5c-2.8,0-5,2.2-5,5
s2.2,5,5,5s5-2.2,5-5S12.8,5,10,5z"/>
</g>
<g id="路径-4">
<path class="st2" d="M12.5,10.7h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S12.8,10.7,12.5,10.7z"/>
</g>
</svg>
</div>
</div>
`);T.innerHTML=R,document.getElementById("".concat(H.id,"-audioControls-left")).parentNode.appendChild(T),document.getElementById("".concat(H.id,"-addScale")).onclick=function(){w.addScale()},document.getElementById("".concat(H.id,"-subScale")).onclick=function(){w.subScale()}}return a(Z,[{key:"onMouseDown",value:function(w){this.currentPosition,this.currentScale;var T=this.enableZoom;if(!T)return!1;this.moveX=w.clientX,this.moveY=w.clientY,this.isMouseDown=!0}},{key:"onMouseUp",value:function(w){var T=this.currentPosition,R=this.enableZoom;if(!R)return!1;this.isMouseDown=!1,T.left=T.left-(w.clientX-this.moveX),T.top=T.top-(w.clientY-this.moveY),this.doScale()}},{key:"onMouseOut",value:function(w){var T=this.enableZoom;if(!T)return!1;this.isMouseDown&&(console.log("鼠标按上",w),this.isMouseDown=!1),this.isMouseDown=!1}},{key:"renderDot",value:function(){var w=this.currentScale;document.getElementById("".concat(this.jSPlugin.id,"-scale-value")).innerHTML="".concat(w,".0X"),document.getElementById("".concat(this.jSPlugin.id,"-line-dot")).style.height="".concat((w-1)/7*100,"%"),document.getElementById("".concat(this.jSPlugin.id,"-scale-body-line-dot")).style.bottom="calc(".concat((w-1)/7*100,"% - 6px)")}},{key:"startZoom",value:function(){var w=this,T=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=T.width,this.videoHeight=T.height,this.currentPosition.right=T.width,this.currentPosition.bottom=T.height,this.currentScale=1,document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="block",this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),this.renderDot(),this.enableZoom=!0,document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0"))?(document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("mousedown",function(R){return w.onMouseDown(R)}),document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("mouseup",function(R){return w.onMouseUp(R)}),document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("mouseout",function(R){return w.onMouseOut(R)})):document.getElementById("".concat(this.jSPlugin.id,"-player"))&&(document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("mousedown",function(R){return w.onMouseDown(R)}),document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("mouseup",function(R){return w.onMouseUp(R)}),document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("mouseout",function(R){return w.onMouseOut(R)}))}},{key:"stopZoom",value:function(){var w=this;this.currentScale=1,this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none",this.renderDot(),this.enableZoom=!1,document.getElementById(this.jSPlugin.id).removeEventListener("mousedown",function(T){return w.onMouseDown(T)}),document.getElementById(this.jSPlugin.id).removeEventListener("mouseup",function(T){return w.onMouseUp(T)}),document.getElementById(this.jSPlugin.id).removeEventListener("mouseout",function(T){return w.onMouseOut(T)})}},{key:"doScale",value:function(){console.log("执行放大");var w=this.currentPosition,T=this.currentScale;w.left=w.left+w.xPercent*(w.right-w.left)-1/2*(this.videoWidth/T),w.left<0?w.left=0:w.left>this.videoWidth-this.videoWidth/T&&(w.left=this.videoWidth-this.videoWidth/T),w.right=w.left+this.videoWidth/T,w.top=w.top+w.yPercent*(w.bottom-w.top)-1/2*(this.videoHeight/T),w.top<0?w.top=0:w.top>this.videoHeight-this.videoHeight/T&&(w.top=this.videoHeight-this.videoHeight/T),w.bottom=w.top+this.videoHeight/T,w.left=parseInt(w.left,10),w.right=parseInt(w.right,10),w.top=parseInt(w.top,10),w.bottom=parseInt(w.bottom,10),console.log("计算后,",this.jSPlugin.jSPlugin,w.left,w.right,w.top,w.bottom,w.xPercent,w.yPercent),this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(w.left,w.right,w.top,w.bottom),this.renderDot()}},{key:"calCurrentPosition",value:function(w){var T=this.currentPosition,R=this.clientRect;T.x=w.clientX,T.y=w.clientY,T.xPercent=(w.clientX-R.x)/R.width,T.yPercent=(w.clientY-R.y)/R.height,this.doScale()}},{key:"addScale",value:function(){var w=this.currentScale,T=this.currentPosition;if(w>=8)return console.log("达到最大倍率了"),this.jSPlugin.Message&&this.jSPlugin.Message.default("已经放大到最大倍数8.0X"),!1;this.currentScale++,T.xPercent=.5,T.yPercent=.5,this.doScale()}},{key:"subScale",value:function(){var w=this.currentScale,T=this.currentPosition;if(w<=1)return console.log("达到最小倍率了"),!1;this.currentScale--,T.xPercent=.5,T.yPercent=.5,this.doScale()}}]),Z}();function dn(Z,H){return Math.abs(H.clientX-Z.clientX)*Math.abs(H.clientX-Z.clientX)+Math.abs(H.clientY-Z.clientY)*Math.abs(H.clientY-Z.clientY)}var Un=function(){function Z(H){var w=this;i(this,Z),this.jSPlugin=H,this.enableZoom=!1,this.isDubboTouch=!1,this.videoWidth=0,this.videoHeight=0,this.currentScale=1,this.currentPosition={x:0,y:0,xPercent:.1,yPercent:.1,xCurrentVideo:0,yCurrentVideo:0,left:0,top:0,right:1920,bottom:1080},this.DOM=document.getElementById(H.id),this.clientRect=document.getElementById(H.id).getBoundingClientRect(),this.point1={clientX:0,clientY:0},this.point2={clientX:0,clientY:0},this.touchLineLength=0,this.inited=!1;var T=document.createElement("div");T.id="".concat(H.id,"-zoom-container"),T.style=`display:none;
position: absolute;
left: 10px;
top: -30px;
border: 1px solid rgba(0,0,0,0.6);
color: #FFFFFF;
background: rgba(0,0,0,0.6);
border-radius: 10px;
width: 36px;
font-size: 12px;
text-align: center;
height: 22px;
line-height: 22px;`;var R="1X";T.innerHTML=R,document.getElementById("".concat(H.id,"-audioControls-left")).parentNode.appendChild(T),document.getElementById(this.jSPlugin.id).addEventListener("touchstart",function(N){return w.onTouchstart(N)}),document.getElementById(this.jSPlugin.id).addEventListener("touchmove",function(N){return w.onTouchmove(N)})}return a(Z,[{key:"onTouchstart",value:function(w){var T=this.jSPlugin.beforeMobileZoomVerify();if(!T)return!1;if(!this.inited){var R=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=R.width,this.videoHeight=R.height,this.currentPosition.right=R.width,this.currentPosition.bottom=R.height,this.inited=!0}var N=this.currentPosition;this.currentScale,console.log("双指按下",N);var z=w.touches,U=z[0],ue=z[1];U&&(this.point1.clientX=U.clientX,this.point1.clientY=U.clientY),ue&&(this.point2.clientX=ue.clientX,this.point2.clientY=ue.clientY,this.touchLineLength=dn(this.point1,this.point2),this.isDubboTouch=!0,this.moveX=U.clientX,this.moveY=U.clientY),console.log("双指按下2",N)}},{key:"onTouchmove",value:function(w){var T=this.isDubboTouch,R=this.currentPosition,N=this.clientRect,z=this.jSPlugin.beforeMobileZoomVerify();if(!z)return!1;if(w.touches.length===1){var ue=w.touches[0];return R.xPercent=R.xPercent+(this.point1.clientX-ue.clientX)/N.width/this.currentScale,R.yPercent=R.yPercent+(this.point1.clientY-ue.clientY)/N.height/this.currentScale,this.doScale(),this.point1.clientX=ue.clientX,this.point1.clientY=ue.clientY,!1}if(!T)return!1;var U=w.touches,ue=U[0],pe=U[1];if(ue&&(this.point1.clientX=ue.clientX,this.point1.clientY=ue.clientY),pe){this.point2.clientX=pe.clientX,this.point2.clientY=pe.clientY;var de=dn(this.point1,this.point2);de!==this.touchLineLength&&(de>this.touchLineLength?this.currentScale<8?(++this.currentScale,R.xPercent=(this.point1.clientX+this.point2.clientX)/2/N.width,R.yPercent=(this.point1.clientY+this.point2.clientY)/2/N.height,this.doScale()):console.log("已经是最大8倍率了"):this.currentScale>1?(--this.currentScale,R.xPercent=(this.point1.clientX+this.point2.clientX)/2/N.width,R.yPercent=(this.point1.clientY+this.point2.clientY)/2/N.height,this.doScale()):console.log("已经是最小1倍率了"),this.isDubboTouch=!1)}}},{key:"startZoom",value:function(){var w=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=w.width,this.videoHeight=w.height,this.currentPosition.right=w.width,this.currentPosition.bottom=w.height,this.currentScale=1,document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="block",this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),this.renderDot()}},{key:"stopZoom",value:function(){this.currentScale=1,this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none",this.renderDot()}},{key:"resetZoom",value:function(){this.currentScale=1,document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none"}},{key:"doScale",value:function(){var w=this.currentPosition,T=this.currentScale;w.left=w.left+w.xPercent*(w.right-w.left)-1/2*(this.videoWidth/T),w.left<0?w.left=0:w.left>this.videoWidth-this.videoWidth/T&&(w.left=this.videoWidth-this.videoWidth/T),w.right=w.left+this.videoWidth/T,w.top=w.top+w.yPercent*(w.bottom-w.top)-1/2*(this.videoHeight/T),w.top<0?w.top=0:w.top>this.videoHeight-this.videoHeight/T&&(w.top=this.videoHeight-this.videoHeight/T),w.bottom=w.top+this.videoHeight/T,w.left=parseInt(w.left,10),w.right=parseInt(w.right,10),w.top=parseInt(w.top,10),w.bottom=parseInt(w.bottom,10),console.log("视频宽高",this.videoWidth,this.videoHeight),console.log("计算后,",w.left,w.right,w.top,w.bottom,w.xPercent,w.yPercent),w.left<w.right&&w.top<w.bottom&&w.bottom<=this.videoHeight&&w.right<=this.videoWidth&&this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(w.left,w.right,w.top,w.bottom),document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).innerHTML="".concat(T,".0X"),document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display=T===1?"none":"inline-block"}},{key:"calCurrentPosition",value:function(w){var T=this.currentPosition,R=this.clientRect;T.x=w.clientX,T.y=w.clientY,T.xPercent=(w.clientX-R.x)/R.width,T.yPercent=(w.clientY-R.y)/R.height,this.doScale()}}]),Z}(),En=function(H){var w="";return Object.keys(H).map(function(T,R){w+="".concat(T,":").concat(H[T]).concat(R<Object.keys(H).length-1?";":"")}),w},Tn=500,ut=function(){function Z(H){var w=this;if(i(this,Z),this.jSPlugin=H,this.isNeedRenderHeader=!1,this.isNeedRenderFooter=!1,this.autoFocus=0,this.autoFocusTimer=null,this.recordTimer=null,this.nextRate=1,this.showHD=!1,this.themeInited=!1,this.decoderState={state:{isEditing:!1,play:!1,sound:!1,recordvideo:!1,recordCount:"00:00",talk:!1,zoom:!1,pantile:!1,hd:!1,speed:!1,expend:!1,webExpend:!1,cloudRec:S(H.url).type==="cloud.rec",rec:S(H.url).type==="rec",type:S(H.url).type}},this.pluginStatus=new F(this,this.jSPlugin.params.id),console.log(" matchEzopenUrl(jSPlugin.url)",S(H.url),this.decoderState.state),this.inited=!1,this.isMobile=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i),typeof H.isMobile!="undefined"&&(this.isMobile=H.isMobile),this.themeData=$e.data,this.jSPlugin.themeId)switch(this.jSPlugin.themeId){case"pcLive":case"pcRec":case"mobileLive":case"mobileRec":case"security":case"voice":case"simple":var T=E.find(Be,function(R){return R.themeId===w.jSPlugin.themeId});T&&(this.themeData=T),this.initThemeData(),this.renderThemeData();break;case"themeData":this.themeData=this.jSPlugin.params.themeData,this.initThemeData(),this.renderThemeData();break;default:this.fetchThemeData(this.jSPlugin.themeId);break}this.jSPlugin.Talk||(this.jSPlugin.Talk=new Ue(this.jSPlugin)),u("".concat(this.jSPlugin.staticPath,"/speed/speed.css")),u("".concat(this.jSPlugin.staticPath,"/css/theme.css"))}return a(Z,[{key:"fetchThemeData",value:function(w){var T=this,R="".concat(this.jSPlugin.env.domain,"/console/jssdk/ezopen/template/getDetail?accessToken=").concat(this.jSPlugin.accessToken,"&id=").concat(w);(window.location.hostname==="test11open.ys7.com"||window.location.hostname==="127.0.0.1"||window.location.hostname==="jianboyu.top")&&(R=R.replace("test12open.ys7.com/console/jssdk","test11open.ys7.com/console/jssdk")),fetch(R,{method:"GET"}).then(function(N){return N.json()}).then(function(N){console.log("get theme data",N),N.meta.code===0&&N.data&&(T.themeData=N.data,N.data.header&&(T.themeData.header=N.data.header,T.themeData.header.btnList=T.themeData.header.btnList.sort(function(z,U){return z.btnKey.split("-")[3]-U.btnKey.split("-")[3]})),N.data.footer&&(T.themeData.footer=N.data.footer,T.themeData.footer.btnList=T.themeData.footer.btnList.sort(function(z,U){return z.btnKey.split("-")[3]-U.btnKey.split("-")[3]})),T.initThemeData(),T.renderThemeData())}).catch(function(N){T.renderThemeData()})}},{key:"changeTheme",value:function(w){var T=this;if(typeof w=="string")switch(this.jSPlugin.themeId=w,this.jSPlugin.themeId){case"pcLive":case"pcRec":case"mobileLive":case"mobileRec":case"security":case"voice":case"simple":var R=E.find(Be,function(N){return N.themeId===T.jSPlugin.themeId});R&&(this.themeData=R),this.initThemeData(),this.renderThemeData();break;default:this.fetchThemeData(w);break}else t(w)==="object"&&(this.themeData=w,this.initThemeData(),this.renderThemeData(),this.decoderState.state.isEditing&&this.editStart());this.jSPlugin&&this.jSPlugin.handleThemeChange&&this.jSPlugin.handleThemeChange(w)}},{key:"renderThemeData",value:function(){var w=this,T=this.themeData,R=T.header,N=T.footer;if(this.isNeedRenderHeader&&R&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=R.backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=R.color.replace("-diy",""),R.btnList.map(function(pe,de){pe.isrender&&w.setDecoderState(o({},pe.iconId,w.decoderState.state[pe.iconId]))})),this.isNeedRenderFooter&&N)document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=N.backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=N.color.replace("-diy",""),N.btnList.map(function(pe,de){if(pe.isrender&&w.setDecoderState(o({},pe.iconId,w.decoderState.state[pe.iconId])),pe.iconId==="play"&&pe.defaultActive&&!w.themeInited)var se=setInterval(function(){window.EZUIKit[w.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(se),w.jSPlugin.play(),w.themeInited=!0)},50)}),this.jSPlugin.url.indexOf("hd.live")!==-1&&this.setDecoderState({hd:!0}),this.themeData.autoFocus>0&&(this.autoFocus=parseInt(this.themeData.autoFocus),this.startAutoFocus(),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).addEventListener("click",function(){w.stopAutoFocus()})),this.setDecoderState({cloudRec:S(this.jSPlugin.url).type==="cloud.rec",rec:S(this.jSPlugin.url).type==="rec",type:S(this.jSPlugin.url).type});else if(!this.themeInited)var z=setInterval(function(){window.EZUIKit[w.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(z),w.jSPlugin.play(),w.themeInited=!0)},50);var U=E.findIndex(this.themeData.footer.btnList,function(pe){return pe.iconId==="zoom"&&pe.isrender>0})>=0;U&&(this.isMobile?(this.jSPlugin.beforeMobileZoomVerify=function(){var pe=w.decoderState.state.play;return console.log("手机端电子放大前校验回调play------------",pe),!!pe},this.jSPlugin.Zoom=new Un(this.jSPlugin)):this.jSPlugin.Zoom=new pn(this.jSPlugin));var ue=setInterval(function(){window.EZUIKit[w.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(ue),w.jSPlugin.reSize(w.jSPlugin.params.width,w.jSPlugin.params.height))},50)}},{key:"setDecoderState",value:function(w){var T=this,R=this.themeData,N=R.header,z=R.footer;Object.keys(w).map(function(U,ue){var pe="#FFFFFF",de="#FFFFFF",se=N.btnList.findIndex(function(re){return re.iconId===U});switch(se===-1?(pe=z.color.replace("-diy",""),de=z.activeColor.replace("-diy","")):(pe=N.color.replace("-diy",""),de=z.activeColor.replace("-diy","")),U){case"play":w[U]?document.getElementById("".concat(T.jSPlugin.id,"-play"))&&(document.getElementById("".concat(T.jSPlugin.id,"-play-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-play-content")).children[0].children[1].style="display:none",document.getElementById("".concat(T.jSPlugin.id,"-play")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-play-content")).childNodes[0].children[0].style.fill=w[U]?de:pe):document.getElementById("".concat(T.jSPlugin.id,"-play"))&&(document.getElementById("".concat(T.jSPlugin.id,"-play-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-play-content")).children[0].children[0].style="display:none",document.getElementById("".concat(T.jSPlugin.id,"-play")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-play-content")).childNodes[0].children[1].style.fill=w[U]?de:pe);break;case"sound":document.getElementById("".concat(T.jSPlugin.id,"-sound"))&&(w[U]?(document.getElementById("".concat(T.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:none",document.getElementById("".concat(T.jSPlugin.id,"-sound")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-sound-content")).childNodes[0].children[1].style.fill=w[U]?de:pe):(document.getElementById("".concat(T.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:none",document.getElementById("".concat(T.jSPlugin.id,"-sound")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-sound-content")).childNodes[0].children[0].style.fill=w[U]?de:pe));break;case"recordvideo":document.getElementById("".concat(T.jSPlugin.id,"-recordvideo"))&&(document.getElementById("".concat(T.jSPlugin.id,"-recordvideo")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-recordvideo-content")).childNodes[0].style.fill=w[U]?de:pe,w[U]?T.countTime("add",0):T.countTime("destroy",0));break;case"talk":document.getElementById("".concat(T.jSPlugin.id,"-talk"))&&(document.getElementById("".concat(T.jSPlugin.id,"-talk")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-talk-content")).childNodes[1].style.fill=w[U]?de:pe);break;case"zoom":document.getElementById("".concat(T.jSPlugin.id,"-zoom"))&&(document.getElementById("".concat(T.jSPlugin.id,"-zoom")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-zoom-content")).childNodes[1].style.fill=w[U]?de:pe);break;case"pantile":document.getElementById("".concat(T.jSPlugin.id,"-pantile"))&&(document.getElementById("".concat(T.jSPlugin.id,"-pantile")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-pantile-content")).childNodes[0].style.fill=w[U]?de:pe);break;case"webExpend":w[U]?(document.getElementById("".concat(T.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-webExpend-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-webExpend-content")).children[0].children[0].style="display:none"),document.getElementById("".concat(T.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-expend")).className="disabled")):(document.getElementById("".concat(T.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-webExpend-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-webExpend-content")).children[0].children[1].style="display:none"),document.getElementById("".concat(T.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-expend")).className="")),document.getElementById("".concat(T.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-webExpend")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-webExpend-content")).childNodes[0].childNodes[0].style.fill=w[U]?de:pe,document.getElementById("".concat(T.jSPlugin.id,"-webExpend-content")).childNodes[0].childNodes[1].style.fill=w[U]?de:pe);break;case"capturePicture":document.getElementById("".concat(T.jSPlugin.id,"-capturePicture"))&&(document.getElementById("".concat(T.jSPlugin.id,"-capturePicture")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-capturePicture-content")).childNodes[0].style.fill=w[U]?de:pe);break;case"expend":w[U]?(document.getElementById("".concat(T.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-expend-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-expend-content")).children[0].children[0].style="display:none"),document.getElementById("".concat(T.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-webExpend")).className="disabled")):(document.getElementById("".concat(T.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-expend-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-expend-content")).children[0].children[1].style="display:none"),document.getElementById("".concat(T.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-webExpend")).className="")),document.getElementById("".concat(T.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-expend")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-expend-content")).childNodes[0].childNodes[0].style.fill=w[U]?de:pe,document.getElementById("".concat(T.jSPlugin.id,"-expend-content")).childNodes[0].childNodes[1].style.fill=w[U]?de:pe);break;case"hd":w[U]?document.getElementById("".concat(T.jSPlugin.id,"-hd"))&&(document.getElementById("".concat(T.jSPlugin.id,"-hd-content")).children[1].children[0].style="display:block",document.getElementById("".concat(T.jSPlugin.id,"-hd-content")).children[1].children[1].style="display:none"):document.getElementById("".concat(T.jSPlugin.id,"-hd"))&&(document.getElementById("".concat(T.jSPlugin.id,"-hd-content")).children[1].children[1].style="display:block",document.getElementById("".concat(T.jSPlugin.id,"-hd-content")).children[1].children[0].style="display:none");break;case"speed":document.getElementById("".concat(T.jSPlugin.id,"-speed"))&&(document.getElementById("".concat(T.jSPlugin.id,"-speed-content")).children[1].children[0].style.color=w[U]?de:pe,document.getElementById("".concat(T.jSPlugin.id,"-speed-content")).children[1].children[0].style.borderColor=w[U]?de:pe),document.getElementById("".concat(T.jSPlugin.id,"-select-mask"))&&(T.isMobile&&w[U]?document.getElementById("".concat(T.jSPlugin.id,"-select-mask")).style.display="block":document.getElementById("".concat(T.jSPlugin.id,"-select-mask")).style.display="none");break;case"cloudRec":document.getElementById("".concat(T.jSPlugin.id,"-cloudRec"))&&(console.log("document.getElementById(`${this.jSPlugin.id}-cloudRec-content`)",document.getElementById("".concat(T.jSPlugin.id,"-cloudRec"))),document.getElementById("".concat(T.jSPlugin.id,"-cloudRec")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-cloudRec-content")).children[0].children[0].style.fill=w[U]?de:pe),document.getElementById("".concat(T.jSPlugin.id,"-rec"))&&(document.getElementById("".concat(T.jSPlugin.id,"-rec")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=w[U]?pe:de);break;case"rec":document.getElementById("".concat(T.jSPlugin.id,"-cloudRec"))&&(document.getElementById("".concat(T.jSPlugin.id,"-cloudRec")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-cloudRec-content")).children[0].children[0].style.fill=w[U]?pe:de),document.getElementById("".concat(T.jSPlugin.id,"-rec"))&&(document.getElementById("".concat(T.jSPlugin.id,"-rec")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=w[U]?de:pe);break}T.decoderState.state=Object.assign(T.decoderState.state,w)})}},{key:"startAutoFocus",value:function(){var w=this,T=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout(function(){document.getElementById("".concat(w.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(w.jSPlugin.id,"-audioControls")).style.opacity=0,document.getElementById("".concat(w.jSPlugin.id,"-audioControls")).style.pointerEvents="none")},T*1e3)}},{key:"stopAutoFocus",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.opacity=1,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.pointerEvents="all"),this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.startAutoFocus()}},{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"renderFooter",value:function(w,T){var R=this,N=this.matchBtn(w);if(this.isMobile&&N.id==="zoom")return!1;var z=document.createElement("div");z.className="theme-icon-item",z.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(N.id,'" style="position:relative;">')+'<div id="'.concat(this.jSPlugin.id,"-").concat(N.id,'-content" title="').concat(N.title,'" style="height:').concat(this.jSPlugin.width>Tn?48:32,'px;display: flex;align-items: center;position:relative;">')).concat(N.domString,"</div>")+"</span>",z.onclick=function(de){if(R.decoderState.state.isEditing)return!1;N.onclick(de)},N.onmouseenter&&(z.onmouseenter=function(de){if(R.decoderState.state.isEditing)return!1;N.onmouseenter(de)}),N.onmouseleave&&(z.onmouseleave=function(de){if(R.decoderState.state.isEditing)return!1;N.onmouseleave(de)});var U=document.createElement("span");U.className="icon-move left",U.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(N.id,'-left" title="左移" style="position: absolute;top: calc(50% - 10px);left: -4px;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080;"><path d="M7.4,10V5.3c0-0.3-0.3-0.6-0.6-0.6c-0.1,0-0.3,0.1-0.4,0.2L3.7,7.4c-0.2,0.2-0.3,0.6,0,0.8 c0,0,0,0,0.1,0.1l2.7,2.2c0.2,0.2,0.6,0.2,0.8-0.1C7.3,10.3,7.4,10.2,7.4,10z"></path></svg></span>'),U.onclick=function(){R.editIcon(N.id,"left","footer")},z.appendChild(U);var ue=document.createElement("span");ue.className="icon-move right",ue.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(N.id,'-right" class="ezuikit-theme-icon" title="右移" style="position: absolute;top: calc(50% - 10px);left: calc(100% - 8px);"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080"><path d="M3.4,5.2v4.7c0,0.3,0.3,0.6,0.6,0.6c0.1,0,0.3-0.1,0.4-0.2l2.7-2.5c0.2-0.2,0.3-0.6,0-0.8 c0,0,0,0-0.1-0.1L4.4,4.8C4.1,4.6,3.8,4.6,3.6,4.9C3.5,5,3.4,5.1,3.4,5.2z"></path></svg></span>'),ue.onclick=function(){R.editIcon(N.id,"right","footer")},z.appendChild(ue);var pe=document.createElement("span");pe.className="icon-move close",pe.innerHTML='<span id="'.concat(N.id,'-remove" class="ezuikit-theme-icon" title="移除" style="position: absolute;top: -10px;right: -10px;">')+'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 15 15"><circle style="fill-rule:evenodd;clip-rule:evenodd;fill-opacity:0.8011;" cx="7.5" cy="7.6" r="7" /><rect x="3.9" y="3.5" class="st1" style="fill:none;" width="8.1" height="8.1" /><line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="5" x2="10" y2="10.1" /><line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="10.1" x2="10" y2="5" /></svg></span>',pe.onclick=function(){R.editIcon(N.id,"delete","footer")},z.appendChild(pe),T==="left"?document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).childNodes[0].appendChild(z):document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).childNodes[1].appendChild(z)}},{key:"editIcon",value:function(w,T,R){console.log("编辑组件",w,T,R);var N=this.themeData;console.log("themeData",this.themeData);var z=this.themeData[R].btnList,U=E.findIndex(z,function(Oe){return Oe.iconId===w}),ue=z[U];switch(T){case"delete":if(w==="rec"){if(E.findIndex(z,function(Oe){return Oe.iconId==="cloudRec"&&Oe.isrender==1})===-1)return this.jSPlugin.Message&&this.jSPlugin.Message.default("必须选中一种存储介质"),!1}else if(w==="cloudRec"&&E.findIndex(z,function(Oe){return Oe.iconId==="rec"&&Oe.isrender==1})===-1)return this.jSPlugin.Message&&this.jSPlugin.Message.default("必须选中一种存储介质"),!1;z[U].isrender=0;break;case"right":for(var pe=-1,de=U+1;de<z.length;de++)if(z[de].part===z[U].part&&z[de].isrender==1){pe=de;break}pe!==-1&&(z[U]=z[pe],z[pe]=ue);break;case"left":for(var se=-1,re=U-1;re>=0;re--)if(z[re].part===z[U].part&&z[re].isrender==1){se=re;break}se!==-1&&(z[U]=z[se],z[se]=ue);break}console.log("new btnList",z),N[R].btnList=z,this.changeTheme(N)}},{key:"renderHeader",value:function(w,T){var R=this,N=this.matchBtn(w),z=document.createElement("div");z.className="theme-icon-item",z.style="max-width:50%;",z.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(N.id,'" style="position:relative;";>')+'<span id="'.concat(this.jSPlugin.id,"-").concat(N.id,'-content" title="').concat(N.title,'" style="display:inline-block;height:').concat(this.width>Tn?48:32,'px;">')).concat(N.domString,"</span>")+'<span id="'.concat(this.jSPlugin.id,"-").concat(N.id,'-remove" title="移除" style="position: absolute;top: -6px;left: 38px;display: none;">')+'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 15 15"><circle style="fill-rule:evenodd;clip-rule:evenodd;fill-opacity:0.8011;" cx="7.5" cy="7.6" r="7" /><rect x="3.9" y="3.5" class="st1" style="fill:none;" width="8.1" height="8.1" /><line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="5" x2="10" y2="10.1" /><line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="10.1" x2="10" y2="5" /></svg></span></span>',z.onclick=function(ue){if(R.decoderState.state.isEditing)return!1;N.onclick(ue)};var U=document.createElement("span");U.className="icon-move close",U.innerHTML='<span id="'.concat(N.id,'-remove" class="ezuikit-theme-icon" title="移除" style="position: absolute;top: -6px;right: -6px;">')+'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 15 15"><circle style="fill-rule:evenodd;clip-rule:evenodd;fill-opacity:0.8011;" cx="7.5" cy="7.6" r="7" /><rect x="3.9" y="3.5" class="st1" style="fill:none;" width="8.1" height="8.1" /><line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="5" x2="10" y2="10.1" /><line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="10.1" x2="10" y2="5" /></svg></span>',U.onclick=function(){R.editIcon(N.id,"delete","header")},z.appendChild(U),T==="left"?document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[0].appendChild(z):document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[1].appendChild(z)}},{key:"countTime",value:function(w){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,R=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var N=document.createElement("div");N.id=this.jSPlugin.id+"time-area",N.className="time-area",N.innerHTML='<span class="dot"></span><span class="value">00:00</span>',document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(N)}if(this.countTimer&&clearInterval(this.countTimer),w==="add"){var z=T;document.getElementById(R.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval(function(){++z,document.getElementById(R.jSPlugin.id+"time-area").children[1].innerHTML=U(z)},1e3)}else w==="destroy"&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(R.jSPlugin.id+"time-area")&&(document.getElementById(R.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(R.jSPlugin.id+"time-area").style.display="none"));function U(ue){var pe=parseInt(ue),de=0,se=0,re="00",Oe="00",be="00";return pe>59&&(de=parseInt(pe/60),pe=parseInt(pe%60),de>59&&(se=parseInt(de/60),de=parseInt(de%60))),re=parseInt(pe)>9?parseInt(pe):"0"+parseInt(pe),Oe=parseInt(de)>9?parseInt(de):"0"+parseInt(de),be=parseInt(se)>9?parseInt(se):"0"+parseInt(se),se>0?be+":"+Oe+":"+re:de>0?Oe+":"+re:"00:"+re}}},{key:"setDisabled",value:function(w){var T=this.decoderState.state,R=T.sound,N=T.hd;document.getElementById(R?"".concat(this.jSPlugin.id,"-sound-icon"):"".concat(this.jSPlugin.id,"-nosound-icon"))!=null&&document.getElementById(R?"".concat(this.jSPlugin.id,"-sound-icon"):"".concat(this.jSPlugin.id,"-nosound-icon")).setAttribute("style",w?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-recordvideo-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-recordvideo-icon")).setAttribute("style",w?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-capturePicture-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-capturePicture-icon")).setAttribute("style",w?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-talk-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-talk-icon")).setAttribute("style",w?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-zoom-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-zoom-icon")).setAttribute("style",w?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon")).setAttribute("style",w?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById(N?"".concat(this.jSPlugin.id,"-hdSelect-icon"):"".concat(this.jSPlugin.id,"-sdSelect-icon"))!=null&&document.getElementById(N?"".concat(this.jSPlugin.id,"-hdSelect-icon"):"".concat(this.jSPlugin.id,"-sdSelect-icon")).setAttribute("style",w?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-speed-text"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).setAttribute("style",document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).getAttribute("style")+";"+(w?"cursor: not-allowed;color: gray;border-color: gray;":"cursor: default;color: #ffffff;border-color: #ffffff;"))}},{key:"matchBtn",value:function(w){var T=this,R=this.themeData,N=R.header,z=R.footer,U={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}},ue=N.btnList.findIndex(function(pe){return pe.iconId===w});switch(ue===-1?(U.color=z.color,U.backgroundColor=z.backgroundColor,U.activeColor=z.activeColor):(U.color=N.color,U.backgroundColor=N.backgroundColor,U.activeColor=N.activeColor),w){case"play":return U.title="播放/结束播放",U.id=w,U.domString='<div style="height: 100%">'+'<svg id="'.concat(this.jSPlugin.id+"-play-icon",'" class="theme-icon-item-icon" style="display:none" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,'" fill="').concat(U.color,`" viewBox="-6 -6 32 32">
<path id="Stroke-1" class="st1" d="M10.5,1.7c-4.9,0-8.8,4-8.8,8.8s4,8.8,8.8,8.8s8.8-4,8.8-8.8S15.4,1.7,10.5,1.7z M10.5,2.7
c4.3,0,7.8,3.5,7.8,7.8s-3.5,7.8-7.8,7.8s-7.8-3.5-7.8-7.8S6.2,2.7,10.5,2.7z"/>
<path class="st2" d="M8.7,8C9,8,9.3,8.3,9.3,8.6v3.8C9.3,12.7,9,13,8.7,13C8.3,13,8,12.7,8,12.4V8.6C8,8.3,8.3,8,8.7,8z"/>
<path id="Rectangle-Copy-10" class="st2" d="M12.8,8c0.3,0,0.6,0.3,0.6,0.6v3.8c0,0.3-0.3,0.6-0.6,0.6c-0.3,0-0.6-0.3-0.6-0.6V8.6
C12.2,8.3,12.5,8,12.8,8z"/>
</svg>`)+'<svg id="'.concat(this.jSPlugin.id+"-stop-icon",'" class="theme-icon-item-icon" fill="').concat(U.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M13,9.8L10.1,8C9.9,7.9,9.7,7.9,9.5,7.9c-0.6,0-1,0.4-1,1v3.7c0,0.2,0.1,0.4,0.2,0.5c0.3,0.5,0.9,0.6,1.4,0.3 l2.9-1.8c0.1-0.1,0.2-0.2,0.3-0.3C13.6,10.7,13.4,10.1,13,9.8z" /><path d="M10.5,1.9c-4.9,0-8.8,4-8.8,8.8c0,4.9,4,8.8,8.8,8.8s8.8-4,8.8-8.8C19.4,5.8,15.4,1.9,10.5,1.9z M10.5,18.5 c-4.3,0-7.8-3.5-7.8-7.8s3.5-7.8,7.8-7.8c4.3,0,7.8,3.5,7.8,7.8S14.9,18.5,10.5,18.5z" /></svg></div>',U.onclick=function(){var pe=T.decoderState.state,de=pe.play,se=pe.isEditing,re=pe.rec,Oe=pe.cloudRec,be=pe.recordvideo;if(se)return!1;de?(re||Oe?T.jSPlugin.pause():T.jSPlugin.stop(),be&&T.setDecoderState({recordvideo:!1}),T.jSPlugin.Zoom.stopZoom()):(re||Oe?T.jSPlugin.resume():T.jSPlugin.play(),T.resetMobileZoomStatus()),T.setDecoderState({zoom:!1,play:!de}),T.setDisabled(de)},U;case"sound":return U.title="声音",U.id=w,U.domString='<span style="height: 100%">'+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-nosound-icon" style="display:none" fill="').concat(U.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,`" viewBox="-6 -6 32 32">
<path d="M8.5,4.2c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8C5,13.2,5,12.9,5.1,12.7 c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3L9.2,5L5.9,7.8 C5.6,7.9,5.3,7.9,5.1,7.7C5,7.5,5,7.3,5.1,7.1L5.2,7L8.5,4.2z"/>
<path d="M5.5,6.9C5.8,6.9,6,7.1,6,7.4c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2C3.4,7.9,3.3,8,3.2,8.2l0,0.1v4 c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,12.5,6,12.7,6,13c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4 c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>
<path d="M17.4,7.9c0.2-0.2,0.5-0.2,0.7,0c0.2,0.2,0.2,0.4,0.1,0.6l-0.1,0.1l-3.8,3.8c-0.2,0.2-0.5,0.2-0.7,0 c-0.2-0.2-0.2-0.4-0.1-0.6l0.1-0.1L17.4,7.9z"/>
<path d="M13.7,7.9c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.8,3.8c0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1-0.1 l-3.7-3.8C13.5,8.4,13.5,8.1,13.7,7.9z"/>
</svg>`)+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-sound-icon" style="display:inline-block" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,'" fill="').concat(U.color,`" viewBox="-6 -6 32 32">
<path d="M13.2,7.1c0.1-0.2,0.5-0.3,0.7-0.2c1.1,0.7,1.9,2.2,1.9,3.7c0,1.6-0.7,3-1.9,3.7
c-0.2,0.1-0.5,0.1-0.7-0.2c-0.1-0.2-0.1-0.5,0.2-0.7c0.8-0.5,1.4-1.6,1.4-2.9c0-1.3-0.6-2.4-1.4-2.9C13.1,7.6,13,7.3,13.2,7.1z"/>
<path d="M15.7,4.5c0.2-0.2,0.5-0.2,0.7-0.1C18,5.8,19,8.2,19,10.7c0,2.5-1,4.8-2.7,6.3
c-0.2,0.2-0.5,0.2-0.7-0.1c-0.2-0.2-0.2-0.5,0.1-0.7c1.4-1.2,2.3-3.3,2.3-5.5c0-2.2-0.9-4.3-2.3-5.5C15.5,5,15.5,4.7,15.7,4.5z"/>
<path id="Stroke-5" class="st1" d="M8.5,4.7c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8
C5,13.7,5,13.4,5.1,13.2c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3l-0.1,0
L5.9,8.3C5.6,8.4,5.3,8.4,5.1,8.2C5,8,5,7.7,5.1,7.6l0.1-0.1L8.5,4.7z"/>
<path d="M5.5,7.4C5.8,7.4,6,7.6,6,7.9c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.2,0-0.3,0.1-0.3,0.3l0,0.1v4
c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,13,6,13.2,6,13.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4
c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>
</svg>`)+"</span>",U.onclick=function(){var pe=T.decoderState.state,de=pe.play,se=pe.sound,re=pe.talk;de&&(se?(T.jSPlugin.closeSound(),T.setDecoderState({sound:!1})):re||(T.jSPlugin.openSound(),T.setDecoderState({sound:!0})))},U;case"recordvideo":return U.title="录屏",U.id=w,U.domString='<svg id="'.concat(this.jSPlugin.id,'-recordvideo-icon" class="theme-icon-item-icon" fill="').concat(U.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M11.6,5.3H4.7c-1.4,0-2.5,1.1-2.5,2.5v5.9c0,1.4,1.1,2.5,2.5,2.5h6.9c1.4,0,2.5-1.1,2.5-2.5V7.7 C14.1,6.4,13,5.3,11.6,5.3z M4.7,6.3h6.9c0.8,0,1.5,0.7,1.5,1.5v5.9c0,0.8-0.7,1.5-1.5,1.5H4.7c-0.8,0-1.5-0.7-1.5-1.5V7.7 C3.3,6.9,3.9,6.3,4.7,6.3z" /><path d="M16.6,6.7c0.9-0.8,2.3-0.1,2.4,1l0,0.1v5.7c0,1.2-1.3,1.9-2.3,1.2l-0.1-0.1L13.3,12 c-0.2-0.2-0.2-0.5-0.1-0.7c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.7c0.3,0.2,0.7,0.1,0.8-0.3l0-0.1V7.8c0-0.4-0.4-0.6-0.7-0.4 l-0.1,0l-3.3,2.7c-0.2,0.2-0.5,0.1-0.7-0.1c-0.2-0.2-0.1-0.5,0-0.6l0.1-0.1L16.6,6.7z" /></svg>',U.onclick=function(){var pe=T.decoderState.state,de=pe.play,se=pe.recordvideo;de&&(se?(T.jSPlugin.stopSave(),T.setDecoderState({recordvideo:!1})):(T.jSPlugin.startSave("".concat(new Date().getTime())),T.setDecoderState({recordvideo:!0})))},U;case"capturePicture":return U.title="截图",U.id=w,U.domString='<svg id="'.concat(this.jSPlugin.id,'-capturePicture-icon" class="theme-icon-item-icon" fill="').concat(U.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.8,7.7c-2,0-3.7,1.6-3.7,3.7S8.7,15,10.8,15c2,0,3.7-1.6,3.7-3.7S12.8,7.7,10.8,7.7z M10.8,8.7c1.5,0,2.7,1.2,2.7,2.7S12.2,14,10.8,14c-1.5,0-2.7-1.2-2.7-2.7S9.3,8.7,10.8,8.7z" /><path d="M8.6,3.7l-0.1,0C8,3.7,7.7,4,7.5,4.3l-1,1.7l-1.3,0C4,6.1,3.1,7,3.1,8.2v7.1 c0,1.2,0.9,2.1,2.1,2.1h11.1c1.2,0,2.1-0.9,2.1-2.1V8.2l0-0.1c-0.1-1.1-1-1.9-2.1-1.9l-1.3,0l-1.1-1.8c-0.2-0.4-0.7-0.6-1.1-0.6H8.6 z M8.6,4.7h4.2c0.1,0,0.2,0.1,0.3,0.1l1.2,2c0.1,0.2,0.3,0.2,0.4,0.2h1.6c0.6,0,1.1,0.5,1.1,1.1v7.1c0,0.6-0.5,1.1-1.1,1.1H5.1 c-0.6,0-1.1-0.5-1.1-1.1V8.2c0-0.6,0.5-1.1,1.1-1.1h1.6c0.2,0,0.3-0.1,0.4-0.2l1.2-2C8.4,4.7,8.5,4.7,8.6,4.7z" /></svg>',U.onclick=function(){var pe=T.decoderState.state.play;pe?T.jSPlugin.capturePicture("".concat(new Date().getTime())):console.log("视频未播放,无法截图")},U;case"talk":return U.title="对讲",U.id=w,U.domString="<div></div>"+'<svg id="'.concat(this.jSPlugin.id,'-talk-icon" class="theme-icon-item-icon" fill="').concat(U.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.1,2.7C8.5,2.7,7.2,4,7.2,5.6v5.2c0,1.6,1.3,2.9,2.9,2.9l0.2,0c1.5-0.1,2.7-1.4,2.7-2.9V5.6 C13,4,11.7,2.7,10.1,2.7z M10.1,3.7c1.1,0,1.9,0.9,1.9,1.9v5.2c0,1-0.8,1.8-1.8,1.9l-0.1,0c-1,0-1.9-0.9-1.9-1.9V5.6 C8.2,4.5,9,3.7,10.1,3.7z" /><path d="M15.1,8.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,3-2.5,5.5-5.5,5.5c-3,0-5.4-2.3-5.5-5.3l0-0.2V9 c0-0.3,0.2-0.5,0.5-0.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,2.5,2,4.5,4.5,4.5c2.4,0,4.4-1.9,4.5-4.3l0-0.2V9 C14.6,8.7,14.8,8.5,15.1,8.5z" /><path d="M13.5,17.7c0.3,0,0.5,0.2,0.5,0.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-7c-0.3,0-0.5-0.2-0.5-0.5 c0-0.2,0.2-0.4,0.4-0.5l0.1,0H13.5z" /><path d="M10.1,15.2c0.2,0,0.4,0.2,0.5,0.4l0,0.1v2.5c0,0.3-0.2,0.5-0.5,0.5c-0.2,0-0.4-0.2-0.5-0.4l0-0.1 v-2.5C9.6,15.4,9.8,15.2,10.1,15.2z" /></svg>',U.onclick=function(){var pe=T.decoderState.state,de=pe.talk,se=pe.sound,re=pe.play;if(re)if(de){console.log("结束对讲"),T.setDecoderState({talk:!1}),T.jSPlugin.Talk.stopTalk();var Oe=E.findIndex(T.themeData.footer.btnList,function(be){return be.iconId==="sound"&&be.isrender===1&&be.defaultActive===1})>-1;T.themeData&&Oe&&(T.jSPlugin.openSound(),T.setDecoderState({sound:!0}))}else console.log("开始对讲"),T.setDecoderState({talk:!0}),se&&(T.jSPlugin.closeSound(),T.setDecoderState({sound:!1})),T.jSPlugin.Talk.startTalk()},U;case"zoom":return U.title="电子放大",U.id=w,U.domString="<div></div>"+'<svg id="'.concat(this.jSPlugin.id,'-zoom-icon" class="theme-icon-item-icon" fill="').concat(U.color,`" version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="`).concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,`" viewBox="5 -6 5 32" style="enable-background:new 0 0 20 20.1;" xml:space="preserve">
<path class="st1" d="M8.8,2.6c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2s-6.2-2.8-6.2-6.2S5.3,2.6,8.8,2.6z M8.8,3.9
c-2.8,0-5,2.2-5,5s2.2,5,5,5s5-2.2,5-5S11.5,3.9,8.8,3.9z M12.7,12.7l3.9,3.9"/>
<path class="st2" d="M11.2,9.5h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S11.6,9.5,11.2,9.5z"/>
<path class="st2" d="M8.7,12c-0.3,0-0.6-0.3-0.6-0.6v-5c0-0.3,0.3-0.6,0.6-0.6s0.6,0.3,0.6,0.6v5C9.3,11.8,9.1,12,8.7,12z"/>
<path class="st2" d="M16.9,17.6c-0.1,0-0.3-0.1-0.4-0.2l-3.9-3.9c-0.2-0.2-0.2-0.6,0-0.8s0.6-0.2,0.8,0l3.9,3.9
c0.2,0.2,0.2,0.6,0,0.8C17.2,17.5,17,17.6,16.9,17.6z"/>
</svg>`),U.onclick=function(){var pe=T.decoderState.state,de=pe.zoom,se=pe.play;if(!se)return!1;de?(console.log("结束电子放大"),T.setDecoderState({zoom:!1}),T.jSPlugin.Zoom.stopZoom()):(console.log("开始电子放大"),T.jSPlugin.Zoom.startZoom(),T.setDecoderState({zoom:!0}))},U;case"pantile":return U.title="云台控制",U.id=w,U.domString='<svg id="'.concat(this.jSPlugin.id,'-pantile-icon" class="theme-icon-item-icon" fill="').concat(U.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.2,7.8c1.6,0,2.9,1.3,2.9,2.9s-1.3,2.9-2.9,2.9s-2.9-1.3-2.9-2.9S8.5,7.8,10.2,7.8z M10.2,8.8c-1.1,0-1.9,0.9-1.9,1.9s0.9,1.9,1.9,1.9s1.9-0.9,1.9-1.9S11.2,8.8,10.2,8.8z" /><path d="M8.8,3.5c0.7-0.6,1.8-0.6,2.5-0.1l0.1,0.1l1.4,1.1c0.2,0.2,0.3,0.5,0.1,0.7 c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1,0l-1.4-1.1C10.5,3.9,10,3.9,9.6,4.2L9.4,4.3L8,5.4C7.8,5.5,7.5,5.5,7.3,5.3c-0.2-0.2-0.1-0.5,0-0.6 l0.1-0.1L8.8,3.5z" /><path d="M2.5,12.3c-0.6-0.7-0.6-1.8-0.1-2.5l0.1-0.1l1.1-1.4c0.2-0.2,0.5-0.3,0.7-0.1 c0.2,0.2,0.2,0.4,0.1,0.6l0,0.1l-1.1,1.4C3,10.6,3,11.1,3.2,11.5l0.1,0.1L4.4,13c0.2,0.2,0.1,0.5-0.1,0.7c-0.2,0.2-0.5,0.1-0.6,0 l-0.1-0.1L2.5,12.3z" /><path d="M17.7,12.3c0.6-0.7,0.6-1.8,0.1-2.5l-0.1-0.1l-1.1-1.4c-0.2-0.2-0.5-0.3-0.7-0.1 c-0.2,0.2-0.2,0.4-0.1,0.6l0,0.1l1.1,1.4c0.3,0.4,0.3,0.9,0.1,1.3l-0.1,0.1L15.8,13c-0.2,0.2-0.1,0.5,0.1,0.7c0.2,0.2,0.5,0.1,0.6,0 l0.1-0.1L17.7,12.3z" /><path d="M8.8,18.2c0.7,0.6,1.8,0.6,2.5,0.1l0.1-0.1l1.4-1.1c0.2-0.2,0.3-0.5,0.1-0.7 c-0.2-0.2-0.4-0.2-0.6-0.1l-0.1,0l-1.4,1.1c-0.4,0.3-0.9,0.3-1.3,0.1l-0.1-0.1L8,16.3c-0.2-0.2-0.5-0.1-0.7,0.1 c-0.2,0.2-0.1,0.5,0,0.6l0.1,0.1L8.8,18.2z" /></svg>',U.onclick=function(){var pe=T.decoderState.state,de=pe.play,se=pe.pantile,re=pe.expend;if(de)if(se)console.log("隐藏云台"),T.Ptz.hide(),T.setDecoderState({pantile:!1});else{if(console.log("显示云台"),T.isMobile&&!re)return console.log("移动端,非全屏状态不展示云台"),!1;T.Ptz.show(),T.setDecoderState({pantile:!0})}},U;case"expend":return U.title="全局全屏",U.id=w,U.domString='<span><svg id="'.concat(this.jSPlugin.id,'-expend-icon" class="theme-icon-item-icon" fill="').concat(U.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M3.4,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-1.2,1-2.3,2.2-2.3h1.8c0.3,0,0.5,0.2,0.5,0.5S7.2,4.1,6.9,4.1H5.2 c-0.7,0-1.2,0.6-1.2,1.3v1.8C3.9,7.4,3.7,7.6,3.4,7.6z" /><path d="M6.9,18.1H5.2c-1.2,0-2.2-1-2.2-2.2v-1.8c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8c0,0.7,0.6,1.2,1.2,1.2 h1.8c0.3,0,0.5,0.2,0.5,0.5S7.2,18.1,6.9,18.1z" /><path d="M15.7,18.1h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8c0.7,0,1.2-0.6,1.2-1.2v-1.8 c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8C17.9,17.1,16.9,18.1,15.7,18.1z" /><path d="M17.4,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-0.7-0.6-1.3-1.2-1.3h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8 c1.2,0,2.2,1,2.2,2.3v1.8C17.9,7.4,17.7,7.6,17.4,7.6z" /></svg>'+'<svg class="theme-icon-item-icon" style="display:none" width="'.concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,'" fill="').concat(U.color,`" viewBox="-6 -6 32 32">
<path class="st1" d="M5.7,8.1H3.9c-0.3,0-0.6-0.2-0.6-0.6S3.6,7,3.9,7h1.9c0.7,0,1.3-0.6,1.3-1.3V3.8c0-0.3,0.2-0.6,0.6-0.6
s0.6,0.2,0.6,0.6v1.9C8.2,7,7.1,8.1,5.7,8.1z"/>
<path class="st1" d="M7.6,17.7c-0.3,0-0.6-0.2-0.6-0.6v-1.9c0-0.7-0.6-1.3-1.3-1.3H3.9c-0.3,0-0.6-0.2-0.6-0.6s0.2-0.6,0.6-0.6h1.9
c1.3,0,2.4,1.1,2.4,2.4v1.9C8.2,17.5,7.9,17.7,7.6,17.7z"/>
<path class="st1" d="M13.4,17.7c-0.3,0-0.6-0.2-0.6-0.6v-1.9c0-1.3,1.1-2.4,2.4-2.4h1.9c0.3,0,0.6,0.2,0.6,0.6S17.5,14,17.2,14
h-1.9c-0.7,0-1.3,0.6-1.3,1.3v1.9C14,17.5,13.8,17.7,13.4,17.7z"/>
<path class="st1" d="M17.2,8.1h-1.9c-1.3,0-2.4-1.1-2.4-2.4V3.8c0-0.3,0.2-0.6,0.6-0.6S14,3.5,14,3.8v1.9C14,6.4,14.6,7,15.3,7h1.9
c0.3,0,0.6,0.2,0.6,0.6S17.5,8.1,17.2,8.1z"/>
</svg>
</span>`),U.onclick=function(){var pe=T.decoderState.state,de=pe.webExpend,se=pe.expend;pe.play;var re=pe.pantile;if(de)return console.log("正在网站全屏"),!1;if(se)if(T.isMobile){var Oe=parseInt(getComputedStyle(document.getElementById("".concat(T.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(T.jSPlugin.id)).height,10);document.getElementById("".concat(T.jSPlugin.id,"-ez-iframe-footer-container"))&&(document.getElementById("".concat(T.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="-32px"),document.getElementById("".concat(T.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(T.jSPlugin.id,"-headControl")).style.position="relative"),v(document.getElementById("".concat(T.jSPlugin.id,"-wrap")),T.jSPlugin.width,T.jSPlugin.height+Oe),T.jSPlugin.jSPlugin.JS_Resize(T.jSPlugin.width,T.jSPlugin.height),re&&(T.Ptz.hide(),T.setDecoderState({pantile:!1}))}else{console.log("取消全局全屏");var Ze=_();Ze.then(function(fe){console.log("取消全屏",fe,T.jSPlugin),T.jSPlugin.jSPlugin.JS_Resize(T.jSPlugin.width,T.jSPlugin.height)})}else if(console.log("执行全局全屏"),T.isMobile){var Oe=parseInt(getComputedStyle(document.getElementById("".concat(T.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(T.jSPlugin.id)).height,10);p(document.getElementById("".concat(T.jSPlugin.id,"-wrap"))),setTimeout(function(){var fe=document.documentElement.clientWidth,B=document.documentElement.clientHeight;document.getElementById("".concat(T.jSPlugin.id)).style["backface-visibility"]="hidden",T.jSPlugin.jSPlugin.JS_Resize(B,fe-Oe)},100)}else{var be=window.screen.width,me=window.screen.height,ge=m(document.getElementById("".concat(T.jSPlugin.id)));ge.then(function(fe){T.jSPlugin.jSPlugin.JS_Resize(be,me)}).catch(function(fe){console.log(fe)})}T.setDecoderState({expend:!se})},U;case"webExpend":return U.title="网页全屏",U.id=w,U.domString='<span><svg id="'.concat(this.jSPlugin.id,'-webExpend-icon" class="theme-icon-item-icon" fill="').concat(U.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M3.1,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-1.2,1-2.3,2.2-2.3h1.8c0.3,0,0.5,0.2,0.5,0.5S6.8,4.1,6.6,4.1H4.8 c-0.7,0-1.2,0.6-1.2,1.3v1.8C3.6,7.4,3.3,7.6,3.1,7.6z" /><path d="M15.3,18.1h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8c0.7,0,1.2-0.6,1.2-1.2v-1.8 c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8C17.6,17.1,16.6,18.1,15.3,18.1z" /><circle class="st2" cx="10.2" cy="10.4" r="1.1"/></svg>'+'<svg class="theme-icon-item-icon" fill="'.concat(U.color,'" style="display:none;" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,`" viewBox="-6 -6 32 32">
<path class="st1" d="M5.4,8.1H3.5C3.2,8.1,3,7.9,3,7.6s0.2-0.5,0.5-0.5h1.9c0.8,0,1.4-0.6,1.4-1.4V3.8c0-0.3,0.2-0.5,0.5-0.5
s0.5,0.2,0.5,0.5v1.9C7.7,7,6.7,8.1,5.4,8.1z"/>
<path class="st1" d="M13.1,17.7c-0.3,0-0.5-0.2-0.5-0.5v-1.9c0-1.3,1.1-2.4,2.4-2.4h1.9c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5H15
c-0.8,0-1.4,0.6-1.4,1.4v1.9C13.6,17.4,13.4,17.7,13.1,17.7z"/>
<circle class="st2" cx="10.2" cy="10.4" r="1.1"/>
`)+"</svg></span>",U.onclick=function(){var pe=T.decoderState.state,de=pe.webExpend,se=pe.expend;if(pe.play,se)return console.log("正在全局全屏"),!1;if(T.jSPlugin.recTimer&&clearInterval(T.jSPlugin.recTimer),de){console.log("取消网页全屏");var fe=_();fe.then(function(B){T.jSPlugin.jSPlugin.JS_Resize(T.jSPlugin.width,T.jSPlugin.height),T.jSPlugin.Theme.Rec&&T.jSPlugin.Theme.Rec.recAutoSize()})}else{console.log("执行网页全屏");var re=0,Oe=0,be=T;["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(B){window.addEventListener(B,function(oe){var Ie=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;return Ie?document.getElementById("".concat(be.jSPlugin.id,"-loading-item-0"))&&(document.getElementById("".concat(be.jSPlugin.id,"-loading-item-0")).style.height=window.screen.height-parseInt(window.getComputedStyle(document.getElementById("".concat(be.jSPlugin.id,"-headControl"))).height,10)+"px"):document.getElementById("".concat(be.jSPlugin.id,"-loading-item-0"))&&(document.getElementById("".concat(be.jSPlugin.id,"-loading-item-0")).style.height=be.jSPlugin.height+parseInt(window.getComputedStyle(document.getElementById("".concat(be.jSPlugin.id,"-headControl"))).height,10)+"px"),Ie})});var me=window.screen.width,ge=window.screen.height,Ze=m(document.getElementById("".concat(T.jSPlugin.id,"-wrap")));Ze.then(function(B){document.getElementById("".concat(T.jSPlugin.id,"-canvas-container"))&&(re=parseInt(window.getComputedStyle(document.getElementById("".concat(T.jSPlugin.id,"-canvas-container"))).height,10)),document.getElementById("".concat(T.jSPlugin.id,"-headControl"))&&(Oe=parseInt(window.getComputedStyle(document.getElementById("".concat(T.jSPlugin.id,"-headControl"))).height,10)),T.jSPlugin.jSPlugin.JS_Resize(me,ge-re-Oe),T.jSPlugin.Theme.Rec&&T.jSPlugin.Theme.Rec.recAutoSize()}).catch(function(B){console.log(B)})}T.setDecoderState({webExpend:!de})},U;case"hd":return U.title="画面清晰度",U.id=w,U.domString='<ul id="'.concat(this.jSPlugin.id,'-hdSelect" class="hd speed-select ').concat(this.isMobile?"mobile":"",'" style="display:none;">')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;" name="option" id="'.concat(this.jSPlugin.id,'-select-hd">高清</li>')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;" name="option" id="'.concat(this.jSPlugin.id,'-select-sd">标清</li>')+'<li class="selectOption cancel" style="'.concat(this.isMobile?"":"display:none;",'" name="option" id="').concat(this.jSPlugin.id,'-select-speed">取消</li>')+"</ul>"+'<span><svg id="'.concat(this.jSPlugin.id,'-hdSelect-icon" class="theme-icon-item-icon" fill="').concat(U.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M17.4,16.5H3.1c-0.8,0-1.4-0.6-1.4-1.4V5.4c0-0.9,0.7-1.6,1.6-1.6h14.1c0.8,0,1.4,0.6,1.4,1.4v9.8 C18.8,15.9,18.2,16.5,17.4,16.5z M3.3,5C3.1,5,2.9,5.2,2.9,5.4v9.7c0,0.2,0.1,0.3,0.3,0.3h14.3c0.2,0,0.3-0.1,0.3-0.3V5.3 c0-0.2-0.1-0.3-0.3-0.3H3.3z" /><path d="M13.3,13.6h-1.6c-0.4,0-0.7-0.3-0.7-0.7V7.4c0-0.4,0.3-0.7,0.7-0.7h1.6c1.2,0,2.2,1,2.2,2.2v2.4 C15.6,12.6,14.6,13.6,13.3,13.6z M12.2,12.5h1.1c0.6,0,1.1-0.5,1.1-1.1V9c0-0.6-0.5-1.1-1.1-1.1h-1.1V12.5z" /><path d="M5.5,13.6c-0.3,0-0.6-0.2-0.6-0.6V7.3C5,7,5.2,6.8,5.5,6.8S6.1,7,6.1,7.3v5.7C6.1,13.4,5.8,13.6,5.5,13.6z" /><path d="M9.2,13.6c-0.3,0-0.6-0.2-0.6-0.6V7.3c0-0.3,0.2-0.6,0.6-0.6S9.8,7,9.8,7.3v5.7C9.8,13.4,9.5,13.6,9.2,13.6z" /><rect x="5.6" y="9.6" width="3.6" height="1.1" /></svg>'+'<svg id="'.concat(this.jSPlugin.id,'-sdSelect-icon" class="theme-icon-item-icon" style="display:none" fill="').concat(U.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,`" viewBox="-6 -8 40 44">
<path d="M24.1,23.8h-20c-1.1,0-1.9-0.9-1.9-1.9V8.4c0-1.2,1-2.2,2.1-2.2h19.7c1.1,0,1.9,0.9,1.9,1.9v13.8
C26,23,25.1,23.8,24.1,23.8z M4.3,7.7C4,7.7,3.7,8,3.7,8.4v13.5c0,0.2,0.2,0.4,0.4,0.4h20c0.2,0,0.4-0.2,0.4-0.4V8.2
c0-0.2-0.2-0.4-0.4-0.4H4.3z"/>
<path d="M18.4,19.8h-2.2c-0.5,0-0.9-0.4-0.9-0.9v-7.8c0-0.5,0.4-0.9,0.9-0.9h2.2c1.7,0,3.1,1.4,3.1,3.1v3.3
C21.5,18.4,20.1,19.8,18.4,19.8z M16.7,18.3h1.6c0.9,0,1.6-0.7,1.6-1.6v-3.3c0-0.9-0.7-1.6-1.6-1.6h-1.6V18.3z"/>
<path d="M10.5,19.8c1.2,0,2.1-0.3,2.7-0.9c0.6-0.6,0.9-1.3,0.9-2.1c0-0.8-0.3-1.4-0.9-1.8c-0.4-0.2-1.1-0.5-2.2-0.8
l0,0l-1-0.2c-0.4-0.1-0.8-0.2-1-0.4c-0.4-0.2-0.6-0.5-0.6-0.9c0-0.4,0.1-0.6,0.4-0.9s0.7-0.3,1.3-0.3c0.8,0,1.4,0.2,1.8,0.6
c0.2,0.3,0.3,0.6,0.4,0.9l0,0h1.4c0-0.6-0.2-1.1-0.5-1.6c-0.6-0.8-1.6-1.2-2.9-1.2c-1,0-1.8,0.3-2.4,0.8c-0.6,0.5-0.9,1.2-0.9,2
c0,0.7,0.3,1.3,1,1.7c0.4,0.2,0.9,0.4,1.7,0.6l0,0l1.2,0.3c0.6,0.2,1.1,0.3,1.3,0.4c0.3,0.2,0.5,0.5,0.5,0.9c0,0.5-0.2,0.9-0.6,1.1
s-0.9,0.4-1.5,0.4c-0.9,0-1.6-0.2-2-0.7c-0.2-0.3-0.3-0.6-0.4-1.1l0,0H6.8c0,0.9,0.3,1.6,0.9,2.2C8.2,19.5,9.2,19.8,10.5,19.8z"/>
<defs>
<filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="15.2" y="10.3" width="6.2" height="9.5">
<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
</filter>
</defs>
<mask maskUnits="userSpaceOnUse" x="15.2" y="10.3" width="6.2" height="9.5" id="mask-2_2_">
<g class="st2">
<path id="path-1_2_" class="st3" d="M24.1,23.1h-20c-0.6,0-1.2-0.5-1.2-1.2V8.2C2.9,7.5,3.5,7,4.1,7h19.7c0.8,0,1.4,0.6,1.4,1.4
v13.5C25.2,22.6,24.7,23.1,24.1,23.1z"/>
</g>
</mask>
<defs>
<filter id="Adobe_OpacityMaskFilter_1_" filterUnits="userSpaceOnUse" x="6.8" y="10.3" width="7.3" height="9.5">
<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
</filter>
</defs>
<mask maskUnits="userSpaceOnUse" x="6.8" y="10.3" width="7.3" height="9.5" id="mask-2_3_">
<g class="st5">
<path id="path-1_3_" class="st3" d="M24.1,23.1h-20c-0.6,0-1.2-0.5-1.2-1.2V8.2C2.9,7.5,3.5,7,4.1,7h19.7c0.8,0,1.4,0.6,1.4,1.4
v13.5C25.2,22.6,24.7,23.1,24.1,23.1z"/>
</g>
</mask>
</svg>
`)+`<span class='speed-select-mask' style="display:none" id="`.concat(this.jSPlugin.id,'-select-hd-mask"></span>')+"</span>",U.onclick=function(pe){var de=T.decoderState.state,se=de.hd,re=de.expend,Oe=de.recordvideo,be=de.play;be&&(se&&pe.target.id==="".concat(T.jSPlugin.id,"-select-sd")?(console.log("切换到标清"),T.jSPlugin.changeVideoLevel(0),T.setDecoderState({hd:!1}),T.resetMobileZoomStatus(),Oe&&T.setDecoderState({recordvideo:!1}),T.setDecoderState({zoom:!1}),T.jSPlugin.Zoom.stopZoom()):!se&&pe.target.id==="".concat(T.jSPlugin.id,"-select-hd")&&(T.jSPlugin.changeVideoLevel(1),T.setDecoderState({hd:!0}),T.resetMobileZoomStatus(),Oe&&T.setDecoderState({recordvideo:!1}),T.setDecoderState({zoom:!1}),T.jSPlugin.Zoom.stopZoom()),T.showHD=!T.showHD,document.getElementById("".concat(T.jSPlugin.id,"-hdSelect"))&&(document.getElementById("".concat(T.jSPlugin.id,"-hdSelect")).style.display=document.getElementById("".concat(T.jSPlugin.id,"-hdSelect")).style.display==="none"?"block":"none",T.isMobile&&(document.getElementById("".concat(T.jSPlugin.id,"-select-hd-mask")).style.display=document.getElementById("".concat(T.jSPlugin.id,"-select-hd-mask")).style.display==="none"?"block":"none")),T.isMobile&&re&&T.showHD?document.getElementById("".concat(T.jSPlugin.id,"-hdSelect")).className="hd speed-select mobile expend":document.getElementById("".concat(T.jSPlugin.id,"-hdSelect")).className=T.isMobile?"hd speed-select mobile":"speed-select")},U;case"speed":return U.title="回放倍速",U.id=w,U.domString='<ul id="'.concat(this.jSPlugin.id,'-speedSelect" class="speed speed-select ').concat(this.isMobile?"mobile":"",'" style="display:none;">')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed4">4倍</li>')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed2">2倍</li>')+'<li class="selectOption active" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed1">1倍(正常播放)</li>')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed05">0.5倍</li>')+'<li class="selectOption cancel" style="'.concat(this.isMobile?"":"display:none;",'" name="option" id="').concat(this.jSPlugin.id,'-select-speed">取消</li>')+"</ul>"+`<span>
<div style="font-size: 12px;
vertical-align: bottom;
display: inline-flex;
padding: 0px 7px;
width: 48px;
line-height: 24px;
justify-content: center;
border: 1px solid `.concat(U.color,`;
text-align: center;border-radius: 12.5px;"
id="`).concat(this.jSPlugin.id,`-speed-text"
>`).concat(this.nextRate===1?"倍速":"".concat(this.nextRate,"倍").replace("3","0.5"),`</div>
`)+`<span class='speed-select-mask' style="display:none" id="`.concat(this.jSPlugin.id,'-select-mask"></span>')+"</span>",this.isMobile||(U.onmouseenter=function(pe){var de=T.decoderState.state.play;if(!de)return!1;console.log("鼠标移入",pe),T.setDecoderState({speed:!0}),document.getElementById("".concat(T.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).style.display="block")},U.onmouseleave=function(pe){var de=T.decoderState.state.play;if(!de)return!1;console.log("鼠标移出",pe),T.setDecoderState({speed:!1}),document.getElementById("".concat(T.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).style.display="none")}),U.onclick=function(pe){var de=T.decoderState.state,se=de.speed,re=de.expend,Oe=de.play;if(!Oe)return!1;if(!se&&T.isMobile&&(document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).className=re?"speed speed-select mobile expend":"speed speed-select mobile"),T.nextRate=1,pe.target.id)switch(pe.target.id){case"".concat(T.jSPlugin.id,"-select-speed1"):console.log("倍速1"),T.nextRate=1,T.jSPlugin.jSPlugin.JS_Speed(T.nextRate),T.changeRecSpeed(1),T.jSPlugin.speed=1,T.setDecoderState({speed:!se});break;case"".concat(T.jSPlugin.id,"-select-speed2"):console.log("倍速2"),T.nextRate=2,T.jSPlugin.jSPlugin.JS_Speed(T.nextRate),T.changeRecSpeed(2),T.jSPlugin.speed=2,T.setDecoderState({speed:!se});break;case"".concat(T.jSPlugin.id,"-select-speed4"):console.log("倍速4"),T.nextRate=4,T.jSPlugin.jSPlugin.JS_Speed(T.nextRate),T.changeRecSpeed(4),T.jSPlugin.speed=4,T.setDecoderState({speed:!se});break;case"".concat(T.jSPlugin.id,"-select-speed05"):console.log("倍速05"),T.nextRate=3,T.jSPlugin.jSPlugin.JS_Speed(T.nextRate),T.changeRecSpeed(.5),T.jSPlugin.speed=.5,T.setDecoderState({speed:!se});break;default:T.isMobile?T.setDecoderState({speed:!se}):T.setDecoderState({speed:!0});break}!T.isMobile&&pe.target.id==="".concat(T.jSPlugin.id,"-speed-text")?document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).style.display="block":document.getElementById("".concat(T.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).style.display=document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).style.display==="none"?"block":"none")},U;case"deviceName":return U.title="设备名称",U.id=w,U.domString="<span>设备名称</span>",U.onclick=function(){},U;case"deviceID":return U.title="设备序列号",U.id=w,U.domString="<span>设备序列号</span>",U.onclick=function(){},U;case"cloudRec":return U.title="云存储回放",U.id=w,U.domString=`
<span>
<svg class="theme-icon-item-icon" fill="`.concat(U.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,`" viewBox="-10 0 40 15">
<path d="M9.5,13.1c-0.3,0-0.5-0.2-0.5-0.5V8.8c0-0.3,0.2-0.5,0.5-0.5S10,8.5,10,8.8v3.8C10,12.8,9.8,13.1,9.5,13.1z"/>
<path d="M7.6,10.6c-0.1,0-0.3-0.1-0.4-0.2C7,10.2,7,9.9,7.3,9.7l1.9-1.7c0.2-0.2,0.5-0.2,0.7,0l1.8,1.7
c0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.5,0.2-0.7,0L9.5,9.1l-1.6,1.4C7.8,10.6,7.7,10.6,7.6,10.6z"/>
<path d="M13.2,15.7H5.6c-2.1-0.1-3.8-1.8-3.8-3.9c0-1.8,1.3-3.4,3-3.8c0.4-2.2,2.3-3.9,4.6-3.9c2.3,0,4.2,1.7,4.6,3.8
c1.8,0.4,3.1,1.9,3.1,3.8C17.1,13.9,15.4,15.7,13.2,15.7z M5.6,14.7h7.6c1.6,0,2.9-1.3,2.9-2.9c0-1.5-1.1-2.7-2.6-2.9l-0.4,0l0-0.4
c-0.2-1.9-1.7-3.3-3.6-3.3C7.5,5.1,6,6.6,5.8,8.5l0,0.4l-0.4,0c-1.4,0.2-2.5,1.4-2.5,2.9C2.8,13.3,4.1,14.6,5.6,14.7z"/>
</svg>
</span>
`),U.onclick=function(){console.log("点击云回放"),T.setDecoderState({type:"cloud.rec",cloudRec:!0,rec:!1}),T.jSPlugin.changePlayUrl({type:"cloud.rec"},function(){console.log(T.jSPlugin);var pe=d("begin",T.jSPlugin.url)||new Date().Format("yyyyMMdd");T.Rec.renderRec("".concat(pe.slice(0,4),"-").concat(pe.slice(4,6),"-").concat(pe.slice(6,8)));var de=T.decoderState.state.zoom;de&&(T.setDecoderState({zoom:!1}),T.jSPlugin.Zoom.stopZoom())}),console.log(T.jSPlugin)},U;case"rec":return U.title="本地存储",U.id=w,U.domString=`
<span>
<svg class="theme-icon-item-icon" fill=`.concat(U.color,' version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Tn?48:32,'" height="').concat(this.jSPlugin.width>Tn?48:32,`" viewBox="0 0 40 15">
<path d="M13,16.3H5.5c-1.1,0-2-0.9-2-2V3.8c0-1.1,0.9-2,2-2h5.4c0.5,0,1,0.2,1.4,0.6l2.1,2.1C14.8,4.8,15,5.3,15,5.9
v8.4C15,15.4,14.1,16.3,13,16.3z M5.5,2.8c-0.6,0-1,0.4-1,1v10.5c0,0.6,0.4,1,1,1H13c0.6,0,1-0.4,1-1V5.9c0-0.3-0.1-0.5-0.3-0.7
L11.6,3c-0.2-0.2-0.4-0.3-0.7-0.3H5.5z"/>
<path d="M6.3,7.3C6,7.3,5.8,7,5.8,6.8V4.5C5.8,4.2,6,4,6.3,4s0.5,0.2,0.5,0.5v2.2C6.8,7,6.6,7.3,6.3,7.3z"/>
<path d="M8.5,7.3C8.3,7.3,8,7,8,6.8V4.5C8,4.2,8.3,4,8.5,4S9,4.2,9,4.5v2.2C9,7,8.8,7.3,8.5,7.3z"/>
<path d="M10.8,7.3c-0.3,0-0.5-0.2-0.5-0.5V4.5c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v2.2C11.3,7,11.1,7.3,10.8,7.3z"
/>
</svg>
</span>
`),U.onclick=function(){console.log("点击本地回放"),T.setDecoderState({type:"rec",cloudRec:!1,rec:!0}),T.jSPlugin.changePlayUrl({type:"rec"},function(){console.log("---------本地回放"),console.log(T.jSPlugin);var pe=d("begin",T.jSPlugin.url)||new Date().Format("yyyyMMdd");T.Rec.renderRec("".concat(pe.slice(0,4),"-").concat(pe.slice(4,6),"-").concat(pe.slice(6,8)));var de=T.decoderState.state.zoom;de&&(T.setDecoderState({zoom:!1}),T.jSPlugin.Zoom.stopZoom())}),console.log(T.jSPlugin)},U;default:return U}}},{key:"changeRecSpeed",value:function(w){var T=this,R=function(U){if(console.log("setLiActive",U),!document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")))return!1;document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[0].className=document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[0].className.replace("active","default"),document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[1].className=document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[1].className.replace("active","default"),document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[2].className=document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[2].className.replace("active","default"),document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[3].className=document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[3].className.replace("active","default"),document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[U].className=document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[U].className.replace("default","active")},N="1";switch(w){case 1:R(2),N="倍速";break;case 2:R(1),N="".concat(w,"倍");break;case 4:R(0),N="".concat(w,"倍");break;case .5:R(3),N="".concat(w,"倍");break;default:R(2),N="".concat(w,"倍");break}document.getElementById("".concat(this.jSPlugin.id,"-speed-text"))&&(document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).innerHTML=N)}},{key:"initThemeData",value:function(){var w=this,T=this.themeData,R=T.header,N=T.footer,z=this.jSPlugin.id;if(this.header=he.header,this.footer=he.footer,this.isNeedRenderHeader=E.findIndex(R.btnList,function(ge){return ge.isrender>0})>=0,this.isMobile&&(this.isNeedRenderHeader=E.findIndex(R.btnList,function(ge){return ge.isrender>0&&ge.iconId==="deviceID"||ge.isrender>0&&ge.iconId==="deviceName"})>=0),this.isNeedRenderFooter=E.findIndex(N.btnList,function(ge){return ge.isrender>0})>=0,this.isNeedRenderTimeLine=E.findIndex(R.btnList,function(ge){return ge.iconId==="cloudRec"&&ge.isrender===1||ge.iconId==="rec"&&ge.isrender===1})>=0&&!this.jSPlugin.disabledTimeLine,["date-switch-container-wrap","rec-type-container-wrap","mobile-rec-wrap","mobile-ez-ptz-container"].forEach(function(ge,Ze){document.getElementById(ge)&&document.getElementById(ge).parentElement.removeChild(document.getElementById(ge))}),this.isNeedRenderHeader)if(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' style='display:flex;width: calc(100% - 100px);'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' style='display:flex'></div>");else{var U=document.createElement("div");U.setAttribute("id","".concat(this.jSPlugin.id,"-headControl")),U.setAttribute("class","header-controls"),U.innerHTML="<div id='".concat(this.jSPlugin.id,`-headControl-left' class="header-controls-left" style='display:flex;width:calc(100% - 100px);overflow:hidden;'></div><div id='`).concat(this.jSPlugin.id,`-headControl-right' class="header-controls-right" style='display:flex;'></div>`);var ue={height:this.jSPlugin.width>Tn?"48px":"32px","line-height":this.jSPlugin.width>Tn?"48px":"32px",display:"flex","justify-content":"space-between",top:0,"z-index":1,background:"#000000",color:"#FFFFFF",width:"100%"};U.style=En(ue),document.getElementById("".concat(z,"-wrap")).insertBefore(U,document.getElementById(z));var pe=setInterval(function(){window.EZUIKit[w.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(pe)},50)}else document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&document.getElementById("".concat(this.jSPlugin.id,"-headControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-headControl")));if(this.isNeedRenderFooter)if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")))document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="-".concat(this.jSPlugin.width>Tn?48:32,"px"),document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='<div id="'.concat(this.jSPlugin.id,`-audioControls" class="footer-controls" style='display:flex;justify-content: space-between;height: `).concat(this.jSPlugin.width>Tn?48:32,"px;width:100%;'><div id='").concat(this.jSPlugin.id,`-audioControls-left' class="footer-controls-left" style='display:flex'></div><div id='`).concat(this.jSPlugin.id,`-audioControls-right' class="footer-controls-right" style='display:flex'></div></div>`));else{var de=document.createElement("div");de.setAttribute("id","".concat(this.jSPlugin.id,"-ez-iframe-footer-container")),de.setAttribute("class","ez-iframe-footer-container");var se={"min-height":this.jSPlugin.width>Tn?"48px":"32px","max-height":this.jSPlugin.width>Tn?"96px":"80px",position:"relative","margin-top":this.jSPlugin.width>Tn?"-48px":"-32px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%"};de.style=En(se),de.innerHTML='<div id="'.concat(this.jSPlugin.id,`-audioControls" class="footer-controls" style='display:flex;height:`).concat(this.jSPlugin.width>Tn?48:32,"px;justify-content: space-between;width:100%;z-index:999;position: relative;'><div id='").concat(this.jSPlugin.id,`-audioControls-left' class="footer-controls-left" style='display:flex;margin-lefacti'></div><div id='`).concat(this.jSPlugin.id,`-audioControls-right' class="footer-controls-right" style='display:flex'></div></div>`),h(de,document.getElementById(z))}else document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")));if(this.isNeedRenderHeader&&document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=R.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=R.color,R.btnList.map(function(ge,Ze){ge.isrender&&w.renderHeader(ge.iconId,ge.part)})),this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=N.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=N.color,N.btnList.map(function(ge,Ze){ge.isrender&&w.renderFooter(ge.iconId,ge.part)})),this.isNeedRenderTimeLine)if(this.isMobile)document.getElementById("".concat(this.jSPlugin.id,"-headControl-right"))&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl-right")).style.display="none"),this.Rec=new Ot(this.jSPlugin,this.changeRecSpeed,this.resetMobileZoomStatus);else{this.Rec?(this.Rec.unSyncTimeLine(),this.Rec.recInit()):(this.jSPlugin.decoderState=this.decoderState,this.jSPlugin.setDecoderState=this.setDecoderState,this.Rec=new He(this.jSPlugin));var re=setInterval(function(){window.EZUIKit[w.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(re)},50)}var Oe=E.findIndex(this.themeData.footer.btnList,function(ge){return ge.iconId==="pantile"&&ge.isrender===1})>=0&&!this.jSPlugin.disabledPTZ;Oe&&(this.isMobile&&(this.MobilePtz=new xt(this.jSPlugin)),this.Ptz=new vt(this.jSPlugin));var be=function(){var Ze=w.decoderState.state,fe=Ze.expend,B=Ze.webExpend,te=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;te||(w.jSPlugin.jSPlugin.JS_Resize(w.jSPlugin.width,w.jSPlugin.height),fe&&w.setDecoderState({expend:!1}),B&&w.setDecoderState({webExpend:!1})),w.jSPlugin.Theme.Rec&&w.jSPlugin.Theme.Rec.recAutoSize()};if(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(ge){window.addEventListener(ge,function(Ze){return be()})}),this.themeData.poster){this.jSPlugin.poster=this.themeData.poster;var me=setInterval(function(){window.EZUIKit[w.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(me),w.jSPlugin.setPoster(w.themeData.poster))},50)}this.inited=!0,this.getDeviceInfo()}},{key:"resetMobileZoomStatus",value:function(){if(this.isMobile){var w=document.getElementById("".concat(this.jSPlugin.id,"-zoom-container"));w&&w.style&&w.style.display!="none"&&(console.log("结束电子放大"),w.style.display="none"),this.jSPlugin.Zoom.resetZoom()}}},{key:"getDeviceInfo",value:function(){var w=this,T=function(N){N.code==200&&N.data&&(N.data.isEncrypt&&setTimeout(function(){w.pluginStatus.loadingClear(),w.pluginStatus.loadingSetText({text:"设备已加密",color:"red"})},1500),document.getElementById("".concat(w.jSPlugin.id,"-deviceName-content"))&&(document.getElementById("".concat(w.jSPlugin.id,"-deviceName-content")).style.maxWidth="100%",document.getElementById("".concat(w.jSPlugin.id,"-deviceName-content")).style.overflow="hidden",document.getElementById("".concat(w.jSPlugin.id,"-deviceName-content")).style.textOverflow="ellipsis",document.getElementById("".concat(w.jSPlugin.id,"-deviceName-content")).style.whiteSpace="nowrap",document.getElementById("".concat(w.jSPlugin.id,"-deviceName-content")).innerHTML=N.data.deviceName),document.getElementById("".concat(w.jSPlugin.id,"-deviceID-content"))&&(document.getElementById("".concat(w.jSPlugin.id,"-deviceID-content")).style.maxWidth="100%",document.getElementById("".concat(w.jSPlugin.id,"-deviceID-content")).style.overflow="hidden",document.getElementById("".concat(w.jSPlugin.id,"-deviceID-content")).style.textOverflow="ellipsis",document.getElementById("".concat(w.jSPlugin.id,"-deviceID-content")).style.whiteSpace="nowrap",document.getElementById("".concat(w.jSPlugin.id,"-deviceID-content")).innerHTML=S(w.jSPlugin.url).deviceSerial))};A(this.jSPlugin.env.domain+"/api/lapp/device/info","POST",{accessToken:this.jSPlugin.accessToken,deviceSerial:S(this.jSPlugin.url).deviceSerial},"",T)}},{key:"editStart",value:function(w){var T=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),R=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));R&&R.setAttribute("class","header-controls themeEditing"),T&&T.setAttribute("class","footer-controls themeEditing"),this.setDecoderState({isEditing:!0})}},{key:"editEnd",value:function(w){var T=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),R=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));R&&R.setAttribute("class","header-controls"),T&&T.setAttribute("class","footer-controls"),this.setDecoderState({isEditing:!1})}},{key:"webExpend",value:function(){var w=this,T=this.decoderState.state;T.webExpend;var R=T.expend,N=T.play;if(!N)return!1;if(R)return console.log("正在全局全屏"),!1;console.log("执行网页全屏");var z=0,U=0,ue=m(document.getElementById("".concat(this.jSPlugin.id,"-wrap")));ue.then(function(pe){console.log("全屏promise",window.screen.width),document.getElementById("".concat(w.jSPlugin.id,"-canvas-container"))&&(z=parseInt(window.getComputedStyle(document.getElementById("".concat(w.jSPlugin.id,"-canvas-container"))).height,10)),document.getElementById("".concat(w.jSPlugin.id,"-headControl"))&&(U=parseInt(window.getComputedStyle(document.getElementById("".concat(w.jSPlugin.id,"-headControl"))).height,10)),console.log("this.jSPlugin.JS_Resiz",z,U,document.body.clientWidth),w.jSPlugin.jSPlugin.JS_Resize(window.screen.width,window.screen.height-z-U)}).catch(function(pe){console.log(pe)})}},{key:"expend",value:function(){var w=this,T=this.decoderState.state,R=T.webExpend;T.expend;var N=T.play;if(T.pantile,!N)return!1;if(R)return console.log("正在网站全屏"),!1;if(console.log("执行全局全屏"),this.isMobile){var z=parseInt(getComputedStyle(document.getElementById("".concat(this.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).height,10);p(document.getElementById("".concat(this.jSPlugin.id,"-wrap"))),setTimeout(function(){var ue=document.documentElement.clientWidth,pe=document.documentElement.clientHeight;document.getElementById("".concat(w.jSPlugin.id)).style["backface-visibility"]="hidden",w.jSPlugin.jSPlugin.JS_Resize(pe,ue-z)},100)}else{var U=m(document.getElementById("".concat(this.jSPlugin.id)));U.then(function(ue){w.jSPlugin.jSPlugin.JS_Resize(window.screen.width,window.screen.height)}).catch(function(ue){console.log(ue)})}}}]),Z}();Date.prototype.Format=function(Z){var H={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(Z)&&(Z=Z.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var w in H)new RegExp("("+w+")").test(Z)&&(Z=Z.replace(RegExp.$1,RegExp.$1.length==1?H[w]:("00"+H[w]).substr((""+H[w]).length)));return Z};var Jt=function(){function Z(H,w){if(i(this,Z),this.params=H,this.state={},this.jsPlugin=w,this.url="https://log.ys7.com/statistics.do?",H.env)switch(H.env){case"test12":this.url="https://test12dclog.ys7.com/statistics.do?";break;case"online":break;default:this.url=H.env;break}}return a(Z,[{key:"uuid",value:function(){for(var w=[],T="0123456789abcdef",R=0;R<36;R++)w[R]=T.substr(Math.floor(Math.random()*16),1);w[14]="4",w[19]=T.substr(w[19]&3|8,1),w[8]=w[13]=w[18]=w[23]="-";var N=w.join("");return N}},{key:"dclog",value:function(w){var T=this.url,R=Object.assign({},{systemName:"open_website_monitor"},{bn:"ezuikit-js"},w,{un:w.url},{st:new Date().getTime(),h:window.location.pathname});Object.keys(R).forEach(function(z,U){var ue=R[z];typeof R[z]=="string"&&(ue=R[z].replace("%","%25")),typeof R[z]!="undefined"&&(T+="".concat(U===0?"":"&").concat(z,"=").concat(encodeURIComponent(ue)))});var N=new Image;N.src=T}},{key:"localInfoLog",value:function(w){var T=this.url,R=window.location.protocol+"//"+window.location.host,N={systemName:"open_netstream_localinfo",Ver:"v6.0.0",PlatAddr:R,ExterVer:"v6.0.0",OpId:this.uuid(),CltType:102,AppId:"",playurl:encodeURIComponent(this.jsPlugin.url),StartTime:new Date().Format("yyyy-MM-dd hh:mm:ss.S"),OS:navigator.platform};N=Object.assign(N,w),Object.keys(N).forEach(function(U,ue){var pe=N[U];typeof N[U]=="string"&&(pe=N[U].replace("%","%25")),typeof N[U]!="undefined"&&(T+="".concat(ue===0?"":"&").concat(U,"=").concat(encodeURIComponent(pe)))});var z=new Image;z.src=T}},{key:"playLog",value:function(w){var T=this.url,R=T,N={systemName:"open_netstream_play_main",playurl:encodeURIComponent(this.jsPlugin.url),Time:new Date().Format("yyyy-MM-dd hh:mm:ss.S"),Via:2,OpId:this.uuid()};N=Object.assign(N,w),Object.keys(N).forEach(function(U,ue){var pe=N[U];typeof N[U]=="string"&&(pe=N[U].replace("%","%25")),typeof N[U]!="undefined"&&(R+="".concat(ue===0?"":"&").concat(U,"=").concat(encodeURIComponent(pe)))});var z=new Image;z.src=R}}]),Z}();(function(Z,H){t(n)==="object"&&t(n.exports)==="object"?n.exports=Z.document?H(Z,!0):function(w){if(!w.document)throw new Error("EZUIPlayer requires a window with a document");return H(w)}:H(Z)})(typeof window!="undefined"?window:void 0,function(Z,H){var w;function T(se,re){for(var Oe=document.getElementsByTagName("head")[0].getElementsByTagName("script"),be=!1,me=0;me<Oe.length;me++)Oe[me].getAttribute("src")==se&&(be=!0,re());if(!be){var ge=document.createElement("script");ge.setAttribute("src",se),ge.onload=re,document.getElementsByTagName("head")[0].appendChild(ge)}}function R(se,re){for(var Oe=document.getElementsByTagName("head")[0].getElementsByTagName("link"),be=!1,me=0;me<Oe.length;me++)Oe[me].getAttribute("href")==se&&(be=!0,re());if(!be){var ge=document.createElement("link");ge.rel="stylesheet",ge.type="text/css",ge.href=se,ge.onload=re,document.getElementsByTagName("head")[0].appendChild(ge)}}function N(se,re,Oe,be,me,ge){var Ze=se,fe=new XMLHttpRequest;fe.onreadystatechange=function(){if(fe.readyState==4&&fe.status==200){var oe=JSON.parse(fe.responseText);me(oe)}},fe.open(re,Ze,!0);var B=new FormData;for(var te in Oe)B.append(te,Oe[te]);fe.send(B)}var z={EZUIKitPlayer:void 0,EZUIKitTalk:void 0,opt:{apiDomain:"https://open.ys7.com/api/lapp/live/talk/url",filePath:"https://open.ys7.com/assets/ezuikit_v2.6.4",accessToken:"",url:"",deviceSerial:"",channelNo:"",id:"",talkLink:"",rtcUrl:"",ttsUrl:"",stream:"",isReliesReady:!1,template:"simple",plugin:[],audio:1,autoplay:1,videoLoading:!1},state:(w={countTimer:void 0,recodeTime:0,recodeTimer:void 0},o(w,"recodeTime",0),o(w,"fetchDefaultList",!1),o(w,"page",0),o(w,"pageSize",5),w),handleTalkSuccess:function(){},handleTalkError:function(){}},U="https://open.ys7.com",ue=U,pe=function(re){var oe=this;this.opt={id:re.id,apiDomain:U+"/api/lapp/live/talk/url",filePath:ue+"/assets/ezuikit_v2.6.4",decoderVersion:"",accessToken:"",url:"",deviceSerial:"",channelNo:"",talkLink:"",rtcUrl:"",ttsUrl:"",stream:"",isReliesReady:!1,template:"simple",plugin:[],audio:1,autoplay:1,fullScreenStatus:0,bSupporDoubleClickFull:!0,videoLoading:!1},this.params=re,re.id&&(this.opt.id=re.id),re.accessToken&&(this.opt.accessToken=re.accessToken),typeof re.audio!="undefined"&&(this.opt.audio=re.audio),typeof re.decoderVersion!="undefined"&&(this.opt.decoderVersion=re.decoderVersion),typeof re.env!="undefined"&&(typeof re.env.domain!="undefined"&&(U=re.env.domain,this.opt.apiDomain=U+"/api/lapp/live/talk/url"),typeof re.env.filePathDomain!="undefined"&&(ue=re.env.filePathDomain,this.opt.filePathDomain=re.env.filePathDomain)),re.url&&(this.opt.url=re.url,this.opt.deviceSerial=re.url.split("/")[3],this.opt.channelNo=re.url.split("/")[4].split(".")[0]),typeof re.template!="undefined"&&(this.opt.template=re.template),re.plugin&&(this.opt.plugin=re.plugin),typeof re.autoplay!="undefined"&&(this.opt.autoplay=re.autoplay?1:0),typeof re.bSupporDoubleClickFull!="undefined"&&(this.opt.bSupporDoubleClickFull=re.bSupporDoubleClickFull),typeof re.handleTalkSuccess!="undefined"&&(Z.EZUIKit.handleTalkSuccess=re.handleTalkSuccess),typeof re.handleTalkError!="undefined"&&(Z.EZUIKit.handleTalkError=re.handleTalkError);var Oe=this.opt.id,be=document.getElementById(Oe);be.style.fontSize=0,be.style.overflowY="auto",be.style.position="relative";var me=document.createElement("iframe");function ge(){switch(oe.opt.template){case"simple":var Ge=U+"/ezopen/h5/iframe?bSupporDoubleClickFull=0&url="+oe.opt.url.replace("?","&")+"&autoplay="+oe.opt.autoplay+"&audio="+oe.opt.audio+"&accessToken="+re.accessToken+"&templete=0&id="+Oe+"&decoderVersion="+oe.opt.decoderVersion,nt="";return typeof re.controls!="undefined"&&re.controls&&(console.log("typeof",t(re.controls)),nt="play,voice,hd,fullScreen",re.controls.length>0&&(nt=re.controls.join(","),Ge+="&controls="+nt)),re.websocketParams&&(Ge+="&websocketParams="+JSON.stringify(re.websocketParams)),Ge;case"standard":return U+"/ezopen/h5/iframe?bSupporDoubleClickFull=0&url="+oe.opt.url.replace("?","&")+"&autoplay="+oe.opt.autoplay+"&audio="+oe.opt.audio+"&accessToken="+re.accessToken+"&templete=1&id="+Oe+"&decoderVersion="+oe.opt.decoderVersion;case"security":return U+"/ezopen/h5/iframe_se?bSupporDoubleClickFull=0&url="+oe.opt.url.replace("?","&")+"&autoplay="+oe.opt.autoplay+"&audio="+oe.opt.audio+"&accessToken="+re.accessToken+"&templete=0&id="+Oe+"&decoderVersion="+oe.opt.decoderVersion;case"theme":return Ge=U+"/jssdk/theme.html?url=".concat(re.url,"&accessToken=").concat(re.accessToken,"&id=").concat(Oe,"&isMobile=").concat(re.isMobile),typeof re.isMobile!="undefined"&&(Ge+="&isMobile="+re.isMobile),typeof re.autoplay!="undefined"&&(Ge+="&autoplay="+re.autoplay),typeof re.domain!="undefined"&&re.domain=="https://test12open.ys7.com"&&(Ge+="&env=test12"),typeof re.env!="undefined"&&typeof re.env.domain!="undefined"&&re.env.domain=="https://test12open.ys7.com"&&(Ge+="&env=test12"),typeof re.header!="undefined"&&(Ge+="&header="+re.header),Ge;default:return U+"/ezopen/h5/iframe?bSupporDoubleClickFull=0&url="+oe.opt.url.replace("?","&")+"&autoplay="+oe.opt.autoplay+"&audio="+oe.opt.audio+"&accessToken="+re.accessToken+"&templete=0&id="+Oe+"&decoderVersion="+oe.opt.decoderVersion}}me.src=ge();var Ze=document.getElementById(Oe).offsetHeight,fe=document.getElementById(Oe).offsetWidth;re.height&&(Ze=parseInt(re.height),/\%$/.test(re.height)&&(fe=document.getElementById(Oe).offsetWidth*(parseInt(re.height)/100))),re.width&&(fe=parseInt(re.width),/\%$/.test(re.width)&&(fe=document.getElementById(Oe).offsetWidth*(parseInt(re.width)/100))),me.width=fe,me.height=Ze,me.id="EZUIKitPlayer-"+Oe,me.setAttribute("allowfullscreen",!0),me.setAttribute("allow","autoplay"),me.setAttribute("frameborder",0),be.appendChild(me);var B=oe.opt.filePath+"/js/jquery.js",te="https://open.ys7.com/assets/layer/layer.js";T(B,function(){T(te,function(){if(Wn().headerContainer){var Ge=document.createElement("div");Ge.setAttribute("class","panel-top");var nt=document.createElement("div");if(nt.setAttribute("class","contros"),Ge.appendChild(nt),be.insertBefore(Ge,me),Wn().capturePictureModule){var at=document.createElement("span");at.innerHTML='<span title="截图"><svg id="capturePicture" title="截图" t="1578882764585" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5958" width="24" height="24"> <path d="M887.296 315.904h-153.6c-51.2 0-68.096-102.4-119.296-102.4H392.704c-34.304 0-51.2 102.4-102.4 102.4h-153.6c-29.696 0-51.2 21.504-51.2 51.2v439.296c0 25.6 21.504 47.104 51.2 47.104h751.104c29.696 0 51.2-21.504 51.2-51.2v-435.2c-0.512-30.208-21.504-51.2-51.712-51.2zM512 768c-115.2 0-204.8-89.6-204.8-200.704s89.6-200.704 204.8-200.704 204.8 89.6 204.8 200.704-93.696 200.704-204.8 200.704z m247.296-354.304c-12.8 0-25.6-12.8-25.6-25.6s12.8-25.6 25.6-25.6 25.6 12.8 25.6 25.6c0 17.408-12.8 25.6-25.6 25.6zM256 264.704c0-8.704-8.704-16.896-16.896-16.896h-51.2c-8.704 0-16.896 8.704-16.896 16.896V281.6H256v-16.896z m256 148.992c-85.504 0-153.6 68.096-153.6 153.6s68.096 153.6 153.6 153.6 153.6-68.096 153.6-153.6-68.096-153.6-153.6-153.6z" fill="#ffffff" p-id="5959"></path></svg></span>',at.onclick=function(){oe.capturePicture()},nt.appendChild(at)}if(console.log("matchHeaderOpt().saveModule",Wn().saveModule),Wn().saveModule){var St=document.createElement("span");St.innerHTML='<span title="开始录像"> <svg id="startSave" t="1578882716693" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3782" width="24" height="24"> <path d="M915.2 729.6l-128-76.8c-25.6-12.8-44.8-32-44.8-51.2V435.2c0-25.6 19.2-38.4 44.8-51.2l128-76.8c25.6-12.8 44.8 0 44.8 19.2V704c0 32-19.2 38.4-44.8 25.6z m-332.8 89.6H96c-51.2 0-89.6-38.4-89.6-89.6V332.8c0-51.2 38.4-89.6 89.6-89.6h486.4c51.2 0 89.6 38.4 89.6 89.6v396.8c0 51.2-38.4 89.6-89.6 89.6zM192 364.8c-32 6.4-57.6 32-64 64-12.8 57.6 38.4 115.2 96 102.4 32-6.4 57.6-32 64-70.4 12.8-57.6-38.4-108.8-96-96z m0 0" p-id="3783" fill="#ffffff"></path> </svg></span>',St.onclick=function(){oe.startSave(),document.getElementById("startSave").setAttribute("class","icon hide"),document.getElementById("stopSave").setAttribute("class","icon")},nt.appendChild(St);var zt=document.createElement("span");zt.innerHTML='<span title="结束录像"> <svg id="stopSave" t="1578882716693" class="icon hide" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3782" width="24" height="24"> <path d="M915.2 729.6l-128-76.8c-25.6-12.8-44.8-32-44.8-51.2V435.2c0-25.6 19.2-38.4 44.8-51.2l128-76.8c25.6-12.8 44.8 0 44.8 19.2V704c0 32-19.2 38.4-44.8 25.6z m-332.8 89.6H96c-51.2 0-89.6-38.4-89.6-89.6V332.8c0-51.2 38.4-89.6 89.6-89.6h486.4c51.2 0 89.6 38.4 89.6 89.6v396.8c0 51.2-38.4 89.6-89.6 89.6zM192 364.8c-32 6.4-57.6 32-64 64-12.8 57.6 38.4 115.2 96 102.4 32-6.4 57.6-32 64-70.4 12.8-57.6-38.4-108.8-96-96z m0 0" p-id="3783" fill="red"></path> </svg> </span>',zt.onclick=function(){oe.stopSave(),document.getElementById("stopSave").setAttribute("class","icon hide"),document.getElementById("startSave").setAttribute("class","icon")},nt.appendChild(zt)}if(Wn().zoomModule){var qt=document.createElement("span");qt.innerHTML='<span title="开启电子放大"> <svg id="enableZoom" t="1578882639834" class="icon" viewBox="0 0 1000 1000" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2227" width="24" height="24"> <path d="M830.6119 441.1089c0-193.7756-157.0939-350.8641-350.8775-350.8641S128.8559 247.3333 128.8559 441.1089 285.9508 791.972 479.7344 791.972 830.6119 634.8845 830.6119 441.1089zM483.2821 710.4863c-146.7975 0-265.8187-118.9953-265.8187-265.8088S336.4847 178.8697 483.2821 178.8697s265.8197 118.9953 265.8197 265.8078S630.0796 710.4863 483.2821 710.4863zM770.6031 653.5739l-72.6417 75.9485 141.6917 160.1814 82.0737-90.0739L770.6031 653.5739zM527.5849 267.4727h-88.60655762279428v132.90489048425167H306.0690340253259v88.60292721534799h132.90933675248866v132.9038911617923h88.60655762279428V488.9794719180395h132.90933675248866v-88.60292721534799H527.5849284006089V267.4726535408993z" p-id="2228" fill="#ffffff"></path> </svg></span>',qt.onclick=function(){oe.enableZoom(),document.getElementById("enableZoom").setAttribute("class","icon hide"),document.getElementById("closeZoom").setAttribute("class","icon")},nt.appendChild(qt);var kt=document.createElement("span");kt.innerHTML='<span title="关闭电子放大"> <svg id="closeZoom" t="1578882639834" class="icon hide" viewBox="0 0 1000 1000" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2227" width="24" height="24"> <path d="M830.6119 441.1089c0-193.7756-157.0939-350.8641-350.8775-350.8641S128.8559 247.3333 128.8559 441.1089 285.9508 791.972 479.7344 791.972 830.6119 634.8845 830.6119 441.1089zM483.2821 710.4863c-146.7975 0-265.8187-118.9953-265.8187-265.8088S336.4847 178.8697 483.2821 178.8697s265.8197 118.9953 265.8197 265.8078S630.0796 710.4863 483.2821 710.4863zM770.6031 653.5739l-72.6417 75.9485 141.6917 160.1814 82.0737-90.0739L770.6031 653.5739zM527.5849 267.4727h-88.60655762279428v132.90489048425167H306.0690340253259v88.60292721534799h132.90933675248866v132.9038911617923h88.60655762279428V488.9794719180395h132.90933675248866v-88.60292721534799H527.5849284006089V267.4726535408993z" p-id="2228" fill="red"></path> </svg></span>',kt.onclick=function(){oe.closeZoom(),document.getElementById("closeZoom").setAttribute("class","icon hide"),document.getElementById("enableZoom").setAttribute("class","icon")},nt.appendChild(kt)}}function On(){var xr={footerContainer:!1,talkModule:!1,broadcastModule:!1,hdModule:!1,fullScreenModule:!1},_i=oe.opt.template;switch(_i){case"simple":if(re.footer&&re.footer instanceof Array){var jn=re.footer;xr={footerContainer:!0,talkModule:jn.indexOf("talk")!==-1,broadcastModule:jn.indexOf("broadcast")!==-1,hdModule:jn.indexOf("hd")!==-1,fullScreenModule:jn.indexOf("fullScreen")!==-1}}break;case"standard":if(re.footer&&re.footer instanceof Array){var jn=re.footer;xr={footerContainer:!0,talkModule:jn.indexOf("talk")!==-1,broadcastModule:jn.indexOf("broadcast")!==-1,hdModule:jn.indexOf("hd")!==-1,fullScreenModule:jn.indexOf("fullScreen")!==-1}}break;case"security":break;case"voice":xr={footerContainer:!0,talkModule:!0,broadcastModule:!0,hdModule:!0,fullScreenModule:!0};break}return xr}function Wn(){var xr={headerContainer:!1,capturePictureModule:!1,saveModule:!1,zoomModule:!1},_i=oe.opt.template;switch(_i){case"simple":if(re.header&&re.header instanceof Array){var jn=re.header;xr={headerContainer:!0,capturePictureModule:jn.indexOf("capturePicture")!==-1,saveModule:jn.indexOf("save")!==-1,zoomModule:jn.indexOf("zoom")!==-1}}break;case"standard":break;case"security":break;case"voice":xr={headerContainer:!0,capturePictureModule:!0,saveModule:!0,zoomModule:!0};break}return xr}if(On().footerContainer||oe.opt.plugin.indexOf("talk")!==-1){var Vn=oe.opt.filePath+"/npm/css/recoder.css",ii=oe.opt.filePath+"/npm/js/recoder.js",ti=oe.opt.filePath+"/recorder.js";if(R(Vn,function(){}),T(ii,function(){T(ti,function(){})}),oe.opt.plugin.indexOf("talk")!==-1||On().talkModule){var di=function(_i){if(console.log("data",_i),_i.code==200){var jn=_i.data;if(jn){var wi=jn.rtcUrl;wi.indexOf("ws")===-1&&(wi=wi.replace("https","wss").replace("rtcgw","rtcgw-ws")),oe.opt.rtcUrl=wi,oe.opt.ttsUrl="tts://"+jn.ttsUrl;var mr="talk://"+oe.opt.deviceSerial+":0:"+oe.opt.channelNo+":cas.ys7.com:6500";if(oe.opt.talkLink=oe.opt.ttsUrl+"/"+mr,oe.opt.stream=jn.stream,console.log("_this.opt",oe.opt),!oe.opt.isReliesReady){var ye=oe.opt.filePath+"/npm/js/adapeter.js",Ne=oe.opt.filePath+"/npm/js/janus.js",qe=oe.opt.filePath+"/npm/js/tts.js";console.log("加载jquery.js"),T(ye,function(){console.log("加载adapeter.js"),T(Ne,function(){console.log("加载janus.js"),T(qe,function(){console.log("加载tts.js"),oe.opt.isReliesReady=!0})})},function(){return!!Z.adapter})}if(!document.getElementById("audioleft")){var tt=document.createElement("div");tt.style.display="none",tt.id="audioleft",document.body.appendChild(tt)}if(!document.getElementById("audioright")){var ve=document.createElement("div");ve.style.display="none",ve.id="audioright",document.body.appendChild(ve)}}}z.opt=oe.opt,Z.EZUIKit&&(Z.EZUIKit.opt=oe.opt)};N(oe.opt.apiDomain,"POST",{accessToken:oe.opt.accessToken,deviceSerial:oe.opt.deviceSerial,channelNo:oe.opt.channelNo},"",di)}if(On().footerContainer){var tr=function(_i,jn){if(clearInterval(z.state.countTimer),_i==="add"){var wi=jn;z.state.countTimer=setInterval(function(){++wi,document.getElementById("time-area").innerHTML=mr(wi)},1e3)}else if(_i==="sub"){var wi=jn;z.state.countTimer=setInterval(function(){wi>0?(wi--,document.getElementById("time-area").innerHTML=mr(wi)):(clearInterval(z.state.countTimer),z.state.countTimer=void 0,console.log("倒计时结束,开启声音"))},1e3)}else _i==="destory"&&(clearInterval(z.state.countTimer),z.state.countTimer=void 0,document.getElementById("time-area").innerHTML="00:00");function mr(ye){var Ne=parseInt(ye),qe=0,tt=0,ve="00",ct="00",et="00";return Ne>59&&(qe=parseInt(Ne/60),Ne=parseInt(Ne%60),qe>59&&(tt=parseInt(qe/60),qe=parseInt(qe%60))),ve=parseInt(Ne)>9?parseInt(Ne):"0"+parseInt(Ne),ct=parseInt(qe)>9?parseInt(qe):"0"+parseInt(qe),et=parseInt(tt)>9?parseInt(tt):"0"+parseInt(tt),tt>0?et+":"+ct+":"+ve:qe>0?ct+":"+ve:"00:"+ve}},Ve=document.createElement("div");if(Ve.setAttribute("class","audio-controls"),be.appendChild(Ve),On().hdModule||On().fullScreenModule){var Mt=document.createElement("div");if(Mt.setAttribute("class","contros"),Ve.appendChild(Mt),On().hdModule){var jt=document.createElement("span");jt.setAttribute("id","video-hd"),jt.innerHTML=oe.opt.url.indexOf(".hd")===-1?"标清":"高清",jt.onclick=function(){if(oe.opt.videoLoading)return layer.msg("视频加载中,请稍后"),!1;var xr=oe.stop();oe.opt.videoLoading=!0,xr.then(function(_i){oe.opt.videoLoading=!1,oe.opt.url.indexOf(".hd")===-1?(oe.opt.url=oe.opt.url.replace(".live",".hd.live"),jt.innerHTML=oe.opt.url.indexOf(".hd")===-1?"标清":"高清"):(oe.opt.url=oe.opt.url.replace(".hd.live",".live"),jt.innerHTML=oe.opt.url.indexOf(".hd")===-1?"标清":"高清"),oe.play(oe.opt.url)}).catch(function(_i){console.log("error",_i)})},Mt.appendChild(jt)}if(On().fullScreenModule){var Sn=document.createElement("span");Sn.setAttribute("class","hide"),Sn.setAttribute("id","ezuikit-open-sound"),Sn.setAttribute("title","打开声音"),Sn.setAttribute("style","vertical-align: top;"),Sn.innerHTML='<svg t="1590476263239" class="icon" viewBox="0 0 1178 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2273" width="16" height="16"><path d="M665.6 51.2 665.6 51.2c-10.24-30.72-40.96-51.2-71.68-51.2-5.12 0-15.36 0-20.48 5.12l0 0L358.4 153.6 51.2 209.92l0 0C20.48 220.16 0 250.88 0 281.6 0 286.72 0 291.84 0 307.2l0 0 0 409.6 0 0c0 15.36 0 20.48 0 25.6 0 30.72 20.48 61.44 51.2 71.68l0 0L358.4 870.4l97.28 71.68 107.52 76.8 0 0c5.12 5.12 15.36 5.12 25.6 5.12 40.96 0 76.8-35.84 76.8-76.8 0-10.24 0-10.24 0-25.6l0 0L665.6 51.2zM563.2 870.4l-153.6-102.4-307.2-51.2L102.4 307.2l307.2-51.2 153.6-102.4L563.2 870.4z" p-id="2274" fill="#FF0000"></path><path d="M1049.6 537.6l112.64-112.64c20.48-20.48 20.48-56.32 0-76.8-20.48-20.48-56.32-20.48-76.8 0L972.8 460.8l-112.64-112.64c0 0 0 0 0 0-20.48-20.48-56.32-20.48-76.8 0 0 0 0 0 0 0-20.48 20.48-20.48 56.32 0 76.8l112.64 112.64-112.64 112.64c-20.48 20.48-20.48 56.32 0 76.8 20.48 20.48 56.32 20.48 76.8 0L972.8 614.4l112.64 112.64c20.48 20.48 56.32 20.48 76.8 0s20.48-56.32 0-76.8L1049.6 537.6z" p-id="2275" fill="#FF0000"></path></svg>',Sn.onclick=function(){oe.openSound(0),Sn.setAttribute("class","hide"),Hn.setAttribute("class","")};var Hn=document.createElement("span");Sn.setAttribute("id","ezuikit-close-sound"),Hn.setAttribute("class","hide"),Hn.setAttribute("title","关闭声音"),Hn.setAttribute("style","vertical-align: top;"),Hn.innerHTML='<svg t="1590414410633" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20545" width="16" height="16"><path d="M840.533333 98.133333c-17.066667-17.066667-42.666667-17.066667-59.733333 0-17.066667 17.066667-17.066667 42.666667 0 59.733334C883.2 256 938.666667 392.533333 938.666667 533.333333c0 140.8-55.466667 277.333333-157.866667 375.466667-17.066667 17.066667-17.066667 42.666667 0 59.733333 8.533333 8.533333 21.333333 12.8 29.866667 12.8 8.533333 0 21.333333-4.266667 29.866666-12.8 115.2-110.933333 183.466667-268.8 183.466667-435.2 0-166.4-68.266667-324.266667-183.466667-435.2zM571.733333 12.8c-17.066667-8.533333-34.133333-4.266667-46.933333 8.533333L281.6 256H42.666667c-25.6 0-42.666667 17.066667-42.666667 42.666667v426.666666c0 25.6 17.066667 42.666667 42.666667 42.666667h238.933333l243.2 234.666667c8.533333 8.533333 17.066667 12.8 29.866667 12.8 4.266667 0 12.8 0 17.066666-4.266667 17.066667-8.533333 25.6-21.333333 25.6-38.4V51.2c0-17.066667-8.533333-34.133333-25.6-38.4zM512 870.4l-183.466667-179.2c-8.533333-4.266667-17.066667-8.533333-29.866666-8.533333H85.333333V341.333333h213.333334c12.8 0 21.333333-4.266667 29.866666-12.8L512 153.6v716.8z" p-id="20546" fill="#ffffff"></path><path d="M759.466667 349.866667c-12.8-21.333333-38.4-25.6-59.733334-8.533334-21.333333 12.8-25.6 38.4-8.533333 59.733334 21.333333 29.866667 34.133333 76.8 34.133333 123.733333 0 46.933333-12.8 93.866667-34.133333 123.733333-12.8 21.333333-8.533333 46.933333 8.533333 59.733334 8.533333 4.266667 17.066667 8.533333 25.6 8.533333 12.8 0 25.6-4.266667 34.133334-17.066667 34.133333-46.933333 51.2-106.666667 51.2-174.933333 0-68.266667-17.066667-128-51.2-174.933333z" p-id="20547" fill="#ffffff"></path></svg>',Hn.onclick=function(){oe.closeSound(0),Sn.setAttribute("class",""),Hn.setAttribute("class","hide")},Mt.appendChild(Sn),Mt.appendChild(Hn)}if(oe.opt.audio==1?Hn.setAttribute("class",""):(Sn.setAttribute("class",""),oe.closeSound(0)),On().fullScreenModule){var pi=document.createElement("span");pi.setAttribute("title","全屏"),pi.setAttribute("style","vertical-align: top;"),pi.innerHTML='<svg id="fullScreen" t="1578020167938" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5035" width="16" height="16"> <path d="M348.373333 625.706667l-128 128-64 64v-128a33.28 33.28 0 0 0-35.413333-35.413334A33.493333 33.493333 0 0 0 85.333333 689.706667v213.333333A33.706667 33.706667 0 0 0 120.96 938.666667h213.333333a35.626667 35.626667 0 0 0 0-71.04h-128l64-64 128-128a35.2 35.2 0 0 0-49.92-49.92zM206.293333 156.373333h128a33.28 33.28 0 0 0 35.413334-35.413333A33.493333 33.493333 0 0 0 334.293333 85.333333H113.706667c-7.04 0-14.08 7.04-21.333334 14.293334a26.026667 26.026667 0 0 0-7.04 21.333333v213.333333a33.493333 33.493333 0 0 0 35.626667 35.413334 33.28 33.28 0 0 0 35.413333-35.413334v-128l192 192a35.2 35.2 0 0 0 49.92-49.92zM903.04 85.333333h-213.333333a33.493333 33.493333 0 0 0-35.413334 35.626667 33.28 33.28 0 0 0 35.413334 35.413333h128l-64 64-128 128a35.2 35.2 0 0 0 49.92 49.92l128-128 64-64v128a35.626667 35.626667 0 0 0 71.04 0v-213.333333A33.706667 33.706667 0 0 0 903.04 85.333333zM903.04 654.293333a33.28 33.28 0 0 0-35.413333 35.413334v128l-64-64-128-128a35.2 35.2 0 0 0-49.92 49.92l128 128 64 64h-128a35.626667 35.626667 0 0 0 0 71.04h213.333333A33.706667 33.706667 0 0 0 938.666667 903.04v-213.333333a33.493333 33.493333 0 0 0-35.626667-35.413334z" p-id="5036" fill="#ffffff"></path></svg>',pi.onclick=function(){oe.fullScreen()},Mt.appendChild(pi)}}if(On().talkModule){var hi=document.createElement("div"),yi=document.createElement("div");hi.setAttribute("class","ptp-talk off"),hi.innerHTML='<span title="对讲"><svg t="1581930496966" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1641" width="16" height="16"> <path d="M715.648 647.872c-30.208-22.336-61.568 39.36-100.992 77.44-39.36 38.08-34.112 31.488-123.392-17.088S311.488 540.224 280 491.648C248.448 443.072 265.472 424.704 265.472 424.704s78.72-62.976 97.152-81.344c18.368-18.368 13.12-30.208 13.12-30.208l-128.64-190.144c-23.616-5.184-64.32 5.12-128.576 57.6C54.208 233.088 30.592 353.856 151.296 575.68c120.768 221.824 347.84 330.752 485.568 374.08 137.856 43.328 228.416-61.696 249.408-103.68 21.056-41.984 13.12-85.312 13.12-85.312S745.856 670.208 715.648 647.872z" p-id="1642" fill="#ffffff"></path> <path d="M715.328 64C580.992 64 472.192 172.864 472.192 307.2s108.8 243.2 243.136 243.2 243.2-108.864 243.2-243.2S849.6 64 715.328 64zM715.328 461.056c-84.992 0-153.856-68.864-153.856-153.856s68.864-153.856 153.856-153.856 153.856 68.928 153.856 153.856S800.32 461.056 715.328 461.056z" p-id="1643" fill="#ffffff"></path> <path d="M777.472 277.376c-18.176 0-32.96-14.784-32.96-33.024 0-8.448 3.136-16.064 8.32-21.888-11.52-5.12-24.128-8-37.568-8-51.2 0-92.672 41.472-92.672 92.736s41.472 92.736 92.672 92.736S808.064 358.4 808.064 307.2c0-13.696-3.072-26.688-8.384-38.4C793.728 274.112 786.048 277.376 777.472 277.376zM715.328 340.928c-18.624 0-33.664-15.104-33.664-33.728 0-18.624 15.04-33.728 33.664-33.728 18.688 0 33.728 15.104 33.728 33.728C749.056 325.824 734.016 340.928 715.328 340.928z" p-id="1644" fill="#ffffff"></path> </svg> </span> <span>开启对讲</span>',hi.onclick=function(){if(console.log("EZUIKit.state.countTimer",z.state.countTimer),z.state.countTimer)return Z.layer.msg("语音设备正忙,请稍后重试"),!1;tr("add",0),console.log("开始对讲,关闭声音"),oe.closeSound(0),console.log(oe.opt),oe.startTalk(),this.setAttribute("class","ptp-talk off hide"),yi.setAttribute("class","ptp-talk on")},yi.setAttribute("class","ptp-talk on hide"),yi.innerHTML='<span title="对讲"> <svg t="1581930496966" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1641" width="16" height="16"> <path d="M715.648 647.872c-30.208-22.336-61.568 39.36-100.992 77.44-39.36 38.08-34.112 31.488-123.392-17.088S311.488 540.224 280 491.648C248.448 443.072 265.472 424.704 265.472 424.704s78.72-62.976 97.152-81.344c18.368-18.368 13.12-30.208 13.12-30.208l-128.64-190.144c-23.616-5.184-64.32 5.12-128.576 57.6C54.208 233.088 30.592 353.856 151.296 575.68c120.768 221.824 347.84 330.752 485.568 374.08 137.856 43.328 228.416-61.696 249.408-103.68 21.056-41.984 13.12-85.312 13.12-85.312S745.856 670.208 715.648 647.872z" p-id="1642" fill="#ff0000"></path> <path d="M715.328 64C580.992 64 472.192 172.864 472.192 307.2s108.8 243.2 243.136 243.2 243.2-108.864 243.2-243.2S849.6 64 715.328 64zM715.328 461.056c-84.992 0-153.856-68.864-153.856-153.856s68.864-153.856 153.856-153.856 153.856 68.928 153.856 153.856S800.32 461.056 715.328 461.056z" p-id="1643" fill="#ff0000"></path> <path d="M777.472 277.376c-18.176 0-32.96-14.784-32.96-33.024 0-8.448 3.136-16.064 8.32-21.888-11.52-5.12-24.128-8-37.568-8-51.2 0-92.672 41.472-92.672 92.736s41.472 92.736 92.672 92.736S808.064 358.4 808.064 307.2c0-13.696-3.072-26.688-8.384-38.4C793.728 274.112 786.048 277.376 777.472 277.376zM715.328 340.928c-18.624 0-33.664-15.104-33.664-33.728 0-18.624 15.04-33.728 33.664-33.728 18.688 0 33.728 15.104 33.728 33.728C749.056 325.824 734.016 340.928 715.328 340.928z" p-id="1644" fill="#ff0000"></path> </svg> </span><span>关闭对讲</span>',yi.onclick=function(){console.log(oe.opt),oe.stopTalk(),tr("destory",0),oe.openSound(0),this.setAttribute("class","ptp-talk on hide"),hi.setAttribute("class","ptp-talk off")},Ve.appendChild(hi),Ve.appendChild(yi)}if(On().broadcastModule){var nr=function xr(_i){function jn(wi){console.log("data",wi),wi.code==200&&(zl(wi.data,5),z.state.page=wi.page.page,_i==0&&wi.data.length==0&&!z.state.fetchDefaultList&&(z.state.fetchDefaultList=!0,xr(0)))}N(U+"/api/lapp/voice/query","POST",{accessToken:oe.opt.accessToken,pageStart:_i,pageSize:z.state.pageSize,default:z.state.fetchDefaultList?"true":"false"},"",jn)},zl=function(_i){if(console.log("renderVoliceList",_i),_i&&_i.length>0){for(var jn=0;jn<_i.length;jn++){var wi=document.createElement("li");wi.innerHTML="<li class='voice-item' id='voice-item-"+jn+"' data-time="+(_i[jn].duration||20)+" data-url="+_i[jn].fileUrl+">"+(_i[jn].voiceName.length>10?_i[jn].voiceName.substr(0,10)+"...":_i[jn].voiceName)+"</li>",document.getElementsByClassName("voice-list-ul")[0].append(wi),wi.onclick=function(mr){console.log("点击元素",mr.target,mr.target.dataset.url);var ye=mr.target.dataset.url,Ne=mr.target.dataset.time;fs(ye,Ne)}}_i.length===z.state.pageSize?document.getElementById("voice-list-end").innerHTML="向下滚动加载更多":document.getElementById("voice-list-end").innerHTML="没有更多数据了"}},fs=function(_i,jn){console.log("播放语音",_i,jn);function wi(mr){console.log("data.data",mr.data),mr.code==200?tr("sub",parseInt(jn)):mr.code=="10001"?Z.layer.msg("未找到当前语音"):Z.layer.msg(mr.msg||"发送失败,请稍后再试")}N(U+"/api/lapp/voice/send","POST",{accessToken:oe.opt.accessToken,deviceSerial:oe.opt.deviceSerial,channelNo:oe.opt.channelNo,fileUrl:_i},"",wi)},zr=document.createElement("div"),Xo=document.createElement("div");zr.setAttribute("class","broadcast off"),Xo.setAttribute("class","broadcast on hide"),zr.innerHTML=' <span title="语音播报"> <svg t="1583561695846" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1126" width="16" height="16"> <path d="M513.82044445 964.38044445c-8.192 0-15.47377778-2.73066667-21.84533334-8.192 0 0-46.42133333-41.87022222-99.21422222-86.47111112-89.20177778-73.728-117.41866667-88.29155555-123.79022222-90.112H35.04355555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666V271.70133333c0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666666H246.21511111c7.28177778-2.73066667 37.31911111-15.47377778 137.44355556-91.02222222 58.25422222-43.69066667 111.04711111-86.47111111 111.04711111-86.47111112 5.46133333-4.55111111 12.74311111-7.28177778 20.02488889-7.28177778 4.55111111 0 10.01244445 0.91022222 14.56355555 3.6408889 10.92266667 5.46133333 18.20444445 17.29422222 18.20444445 30.03733333v837.40444444c0 12.74311111-7.28177778 25.48622222-19.11466667 30.94755556-5.46133333 1.82044445-10.01244445 2.73066667-14.56355555 2.73066667zM270.79111111 724.992c19.11466667 0 48.24177778 8.192 167.48088889 106.496 16.384 13.65333333 33.67822222 28.21688889 51.88266667 43.69066667l5.46133333 4.55111111V139.71911111l-5.46133333 3.64088889c-22.75555555 17.29422222-44.60088889 34.58844445-65.536 50.06222222C293.54666667 291.72622222 264.41955555 299.008 245.30488889 299.008H82.37511111c-20.02488889 0-21.84533333 12.74311111-21.84533333 26.39644445V694.04444445c0 23.66577778 6.37155555 30.03733333 28.21688889 30.03733333h180.224l1.82044444 0.91022222z m520.64711111 162.01955555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666 0-11.83288889 8.192-20.02488889 16.384-24.576 112.86755555-67.35644445 182.04444445-191.14666667 182.04444444-324.03911111 0-132.89244445-70.08711111-256.68266667-182.04444444-324.03911111-10.01244445-5.46133333-15.47377778-14.56355555-15.47377778-24.576 0-14.56355555 11.83288889-27.30666667 26.39644445-27.30666667 5.46133333 0 10.01244445 1.82044445 16.384 5.46133333 128.34133333 76.45866667 207.53066667 218.45333333 207.53066666 369.55022222 0 152.00711111-80.09955555 293.09155555-208.44088889 369.55022223-6.37155555 5.46133333-10.92266667 7.28177778-16.384 7.28177777z m-90.112-152.91733333c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666667 0-10.01244445 4.55111111-18.20444445 12.74311111-23.66577777 61.89511111-34.58844445 100.12444445-100.12444445 100.12444444-171.12177778 0-70.08711111-37.31911111-134.71288889-96.48355555-170.21155555-8.192-4.55111111-12.74311111-13.65333333-12.74311111-23.66577778 0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666667 4.55111111 0 11.83288889 2.73066667 15.47377778 4.55111111 74.63822222 44.60088889 121.96977778 127.43111111 121.96977778 215.72266667 0 90.112-48.24177778 173.85244445-125.61066667 218.45333333-1.82044445 0-9.10222222 4.55111111-15.47377778 4.55111111z" fill="#ffffff" p-id="1127"></path> </svg></span><span>语音播报</span>',zr.onclick=function(){this.setAttribute("class","broadcast off hide"),Xo.setAttribute("class","broadcast on")},Xo.innerHTML='<div class="pop-hover"> <div class="pop-hover-content"> <div class="vioce-list" id="voice-list"> <ul class="voice-list-ul"> </ul> <div id="voice-list-end"></div> </div> <div id="voice-custom" style="text-align: center;">自定义语音</div> </div></div><span title="语音播报"> <svg t="1583561695846" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1126" width="16" height="16"> <path d="M513.82044445 964.38044445c-8.192 0-15.47377778-2.73066667-21.84533334-8.192 0 0-46.42133333-41.87022222-99.21422222-86.47111112-89.20177778-73.728-117.41866667-88.29155555-123.79022222-90.112H35.04355555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666V271.70133333c0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666666H246.21511111c7.28177778-2.73066667 37.31911111-15.47377778 137.44355556-91.02222222 58.25422222-43.69066667 111.04711111-86.47111111 111.04711111-86.47111112 5.46133333-4.55111111 12.74311111-7.28177778 20.02488889-7.28177778 4.55111111 0 10.01244445 0.91022222 14.56355555 3.6408889 10.92266667 5.46133333 18.20444445 17.29422222 18.20444445 30.03733333v837.40444444c0 12.74311111-7.28177778 25.48622222-19.11466667 30.94755556-5.46133333 1.82044445-10.01244445 2.73066667-14.56355555 2.73066667zM270.79111111 724.992c19.11466667 0 48.24177778 8.192 167.48088889 106.496 16.384 13.65333333 33.67822222 28.21688889 51.88266667 43.69066667l5.46133333 4.55111111V139.71911111l-5.46133333 3.64088889c-22.75555555 17.29422222-44.60088889 34.58844445-65.536 50.06222222C293.54666667 291.72622222 264.41955555 299.008 245.30488889 299.008H82.37511111c-20.02488889 0-21.84533333 12.74311111-21.84533333 26.39644445V694.04444445c0 23.66577778 6.37155555 30.03733333 28.21688889 30.03733333h180.224l1.82044444 0.91022222z m520.64711111 162.01955555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666 0-11.83288889 8.192-20.02488889 16.384-24.576 112.86755555-67.35644445 182.04444445-191.14666667 182.04444444-324.03911111 0-132.89244445-70.08711111-256.68266667-182.04444444-324.03911111-10.01244445-5.46133333-15.47377778-14.56355555-15.47377778-24.576 0-14.56355555 11.83288889-27.30666667 26.39644445-27.30666667 5.46133333 0 10.01244445 1.82044445 16.384 5.46133333 128.34133333 76.45866667 207.53066667 218.45333333 207.53066666 369.55022222 0 152.00711111-80.09955555 293.09155555-208.44088889 369.55022223-6.37155555 5.46133333-10.92266667 7.28177778-16.384 7.28177777z m-90.112-152.91733333c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666667 0-10.01244445 4.55111111-18.20444445 12.74311111-23.66577777 61.89511111-34.58844445 100.12444445-100.12444445 100.12444444-171.12177778 0-70.08711111-37.31911111-134.71288889-96.48355555-170.21155555-8.192-4.55111111-12.74311111-13.65333333-12.74311111-23.66577778 0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666667 4.55111111 0 11.83288889 2.73066667 15.47377778 4.55111111 74.63822222 44.60088889 121.96977778 127.43111111 121.96977778 215.72266667 0 90.112-48.24177778 173.85244445-125.61066667 218.45333333-1.82044445 0-9.10222222 4.55111111-15.47377778 4.55111111z" fill="#ff0000" p-id="1127"></path> </svg></span><span>语音播报</span>',Xo.onclick=function(){this.setAttribute("class","broadcast on hide"),zr.setAttribute("class","broadcast off")},Ve.appendChild(zr),Ve.appendChild(Xo),document.getElementById("voice-custom").onclick=function(){console.log("显示自定义语音"),ir.setAttribute("class","speak off")},nr(0);var ir=document.createElement("div"),wa=document.createElement("div");ir.setAttribute("class","speak off hide"),wa.setAttribute("class","speak on hide"),ir.setAttribute("id","startSpeak"),wa.setAttribute("id","stopSpeak"),ir.innerHTML='<span title="按住说话"> <svg t="1581994757678" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1639" width="16" height="16"> <path d="M757.059829 393.846154v-52.512821h262.564103v52.512821H757.059829z m-420.102564 481.367521v96.273504h175.042735a8.752137 8.752137 0 0 1 8.752137 8.752137v35.008547a8.752137 8.752137 0 0 1-8.752137 8.752137H109.401709a8.752137 8.752137 0 0 1-8.752136-8.752137v-35.008547a8.752137 8.752137 0 0 1 8.752136-8.752137h175.042735v-96.273504C129.767932 875.213675 4.376068 749.821812 4.376068 595.145299V463.863248a26.25641 26.25641 0 1 1 52.512821 0v113.777778c0 140.174222 113.637744 253.811966 253.811966 253.811965s253.811966-113.637744 253.811966-253.811965V463.863248a26.25641 26.25641 0 1 1 52.51282 0v131.282051c0 154.676513-125.391863 280.068376-280.068376 280.068376z m-26.25641-96.273504c-111.178393 0-201.299145-90.120752-201.299146-201.299145V201.299145C109.401709 90.120752 199.522462 0 310.700855 0s201.299145 90.120752 201.299145 201.299145v376.341881c0 111.178393-90.120752 201.299145-201.299145 201.299145z m691.418803-280.068376H757.059829v-52.512821h245.059829v52.512821z m-17.504273 105.025641H757.059829v-52.512821h227.555556v52.512821z m-17.504274 105.025641H757.059829v-52.512821h210.051282v52.512821z m-8.752137 105.025641H757.059829v-52.512821h201.299145v52.512821z m-17.504273 105.025641H757.059829v-52.512821h183.794872v52.512821z m-26.25641 105.025641H757.059829v-52.512821h157.538462v52.512821z" p-id="1640" fill="#ffffff"></path> </svg></span><span>按住说话</span>',wa.innerHTML='<span title="按住说话"><svg t="1581994757678" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1639" width="16" height="16"> <path d="M757.059829 393.846154v-52.512821h262.564103v52.512821H757.059829z m-420.102564 481.367521v96.273504h175.042735a8.752137 8.752137 0 0 1 8.752137 8.752137v35.008547a8.752137 8.752137 0 0 1-8.752137 8.752137H109.401709a8.752137 8.752137 0 0 1-8.752136-8.752137v-35.008547a8.752137 8.752137 0 0 1 8.752136-8.752137h175.042735v-96.273504C129.767932 875.213675 4.376068 749.821812 4.376068 595.145299V463.863248a26.25641 26.25641 0 1 1 52.512821 0v113.777778c0 140.174222 113.637744 253.811966 253.811966 253.811965s253.811966-113.637744 253.811966-253.811965V463.863248a26.25641 26.25641 0 1 1 52.51282 0v131.282051c0 154.676513-125.391863 280.068376-280.068376 280.068376z m-26.25641-96.273504c-111.178393 0-201.299145-90.120752-201.299146-201.299145V201.299145C109.401709 90.120752 199.522462 0 310.700855 0s201.299145 90.120752 201.299145 201.299145v376.341881c0 111.178393-90.120752 201.299145-201.299145 201.299145z m691.418803-280.068376H757.059829v-52.512821h245.059829v52.512821z m-17.504273 105.025641H757.059829v-52.512821h227.555556v52.512821z m-17.504274 105.025641H757.059829v-52.512821h210.051282v52.512821z m-8.752137 105.025641H757.059829v-52.512821h201.299145v52.512821z m-17.504273 105.025641H757.059829v-52.512821h183.794872v52.512821z m-26.25641 105.025641H757.059829v-52.512821h157.538462v52.512821z" p-id="1640" fill="#ff0000"></path></svg></span><span>松开发送</span>',Ve.appendChild(ir),Ve.appendChild(wa),document.getElementById("voice-list").onscroll=function(xr){var _i=this.scrollHeight;console.log("sum",_i,this.scrollTop,document.getElementById("voice-list").clientHeight),_i<=this.scrollTop+this.clientHeight&&(console.log("拖动到底,执行加载",z.state.page),nr(++z.state.page))};var co=document.createElement("div");co.setAttribute("class","time-area"),co.setAttribute("id","time-area"),co.innerHTML="00:00",Ve.appendChild(co);var Ui;document.getElementById("startSpeak").onmousedown=function(){if(z.state.countTimer)return Z.layer.msg("语音设备正忙,请稍后重试"),!1;console.log("按住说话"),ir.setAttribute("class","speak off hide"),wa.setAttribute("class","speak on"),wi(),tr("add",0),setTimeout(function(){z.state.recodeTime=0,jn()},1e3),z.state.recodeTimer&&clearInterval(z.state.recodeTimer),z.state.recodeTimer=setInterval(function(){z.state.recodeTime>=59?(oe.stopTalk(),tr("destory",0),this.setAttribute("class","ptp-talk on hide"),hi.setAttribute("class","ptp-talk off"),Z.layer.msg("不超过1分钟")):z.state.recodeTime=z.state.recodeTime+1},1e3);var xr;function _i(mr){var ye=xr.createMediaStreamSource(mr);Ui=new Z.Recorder(ye)}function jn(){Ui&&Ui.record()}function wi(){console.log("run init");try{Z.AudioContext=Z.AudioContext||Z.webkitAudioContext,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia,Z.URL=Z.URL||Z.webkitURL,xr=new AudioContext,console.log("Audio context set up."),console.log("navigator.getUserMedia "+(navigator.getUserMedia?"available.":"not present!"))}catch(mr){console.log("err",mr),Z.layer.msg("No web audio support in this browser!")}navigator.getUserMedia({audio:!0},_i,function(mr){console.log("No live audio input: "+mr)})}},document.getElementById("stopSpeak").onmouseup=function(){console.log("松开发送"),wa.setAttribute("class","speak on hide"),xr();function xr(){if(tr("destory",0),z.state.recodeTime<1)return Z.layer.msg("说话时间过短"),clearInterval(z.state.recodeTimer),!1;clearInterval(z.state.recodeTimer),_i()}function _i(){try{Ui&&Ui.stop(),Ui&&Ui.exportWAV(function(jn){if(console.log("wav_file",jn),jn.size<1e3)return Z.layer.msg("录音失败,请重试"),z.state.recodeTime=0,!1;tr("sub",z.state.recodeTime+2);var wi=new FormData;wi.append("voiceFile",jn),wi.append("accessToken",oe.opt.accessToken),wi.append("deviceSerial",oe.opt.deviceSerial),wi.append("channelNo",oe.opt.channelNo);function mr(Ne){console.log("data.data",Ne.data),Ne.code==200?tr("sub",z.state.recodeTime+2):Ne.code=="10001"?Z.layer.msg("未找到当前语音"):Z.layer.msg(Ne.msg||"发送失败,请稍后再试")}function ye(Ne){console.log("err",Ne)}N(U+"/api/lapp/voice/sendonce","POST",{voiceFile:jn,accessToken:oe.opt.accessToken,deviceSerial:oe.opt.deviceSerial,channelNo:oe.opt.channelNo},"",mr,ye)}),Ui&&Ui.clear()}catch(jn){console.log(jn)}}}}}}})});var oe=this;Z.addEventListener("message",function(Ge){Ge.origin;var nt=oe.opt.id;if(Ge.data.type)switch(Ge.data.type){case"openSound":nt==Ge.data.id&&re.openSoundCallBack&&re.openSoundCallBack(Ge.data);break;case"closeSound":nt==Ge.data.id&&re.closeSoundCallBack&&re.closeSoundCallBack(Ge.data);break;case"capturePicture":nt==Ge.data.id&&re.capturePictureCallBack&&re.capturePictureCallBack(Ge.data);break;case"startSave":nt==Ge.data.id&&re.startSaveCallBack&&re.startSaveCallBack(Ge.data);break;case"stopSave":nt==Ge.data.id&&re.stopSaveCallBack&&re.stopSaveCallBack(Ge.data);break;case"fullScreen":nt==Ge.data.id&&re.fullScreenCallBack&&re.fullScreenCallBack(Ge.data);break;case"getOSDTime":nt==Ge.data.id&&re.getOSDTimeCallBack&&re.getOSDTimeCallBack(Ge.data);break;case"handleSuccess":nt==Ge.data.id&&re.handleSuccess&&re.handleSuccess(Ge.data);break;case"handleError":nt==Ge.data.id&&re.handleError&&re.handleError(Ge.data);break;case"dblclick":nt==Ge.data.id&&oe.opt.bSupporDoubleClickFull&&(oe.opt.fullScreenStatus===0?oe.fullScreen():oe.cancelFullScreen());break;case"startTalk":oe.startTalk(),oe.closeSound();break;case"stopTalk":oe.stopTalk(),oe.openSound();break;case"clickEventHandle":console.log("event.data",Ge.data),re.clickEventHandle&&re.clickEventHandle(Ge.data);break;case"removeEventHandle":re.removeEventHandle&&re.removeEventHandle(Ge.data);break;case"esc":re.clickEventHandle&&re.clickEventHandle(Ge.data);break;case"iframeFullScreen":if(nt==Ge.data.id){var at=function(zt){var qt=zt.requestFullScreen||zt.webkitRequestFullScreen||zt.mozRequestFullScreen||zt.msRequestFullScreen;if(qt)qt.call(zt);else if(typeof Z.ActiveXObject!="undefined"){var kt=new ActiveXObject("WScript.Shell");kt!==null&&kt.SendKeys("{F11}")}};at(document.getElementById("EZUIKitPlayer-"+Ge.data.id))}break}});function Ie(Ge){oe.opt.fullScreenStatus=Ge?1:0,re.fullScreenChangeCallBack&&re.fullScreenChangeCallBack({data:Ge,id:oe.opt.id})}typeof document.fullScreen!="undefined"?document.addEventListener("fullscreenchange",function(){var Ge=document.fullscreen||!1;Ie(Ge)}):typeof document.webkitIsFullScreen!="undefined"?document.addEventListener("webkitfullscreenchange",function(){var Ge=document.webkitIsFullScreen||!1;Ie(Ge)}):typeof document.mozFullScreen!="undefined"&&document.addEventListener("mozfullscreenchange",function(){var Ge=document.mozFullScreen||!1;Ie(Ge)})};pe.prototype.play=function(se){var re="EZUIKitPlayer-"+this.opt.id,Oe=document.getElementById(re).contentWindow;t(se)==="object"&&se.url&&(this.opt.url=se.url),t(se)==="object"&&se.accessToken&&(this.opt.accessToken=se.accessToken),typeof se=="string"&&(this.opt.url=se),Oe.postMessage({action:"play",accessToken:this.opt.accessToken,url:this.opt.url},U+"/ezopen/h5/iframe");var be=this;this.opt.videoLoading=!0;var me=new Promise(function(ge,Ze){Z.addEventListener("message",function(fe){var B=be.opt.id;B==fe.data.id&&fe.data.type==="handleSuccess"&&(setTimeout(function(){be.opt.videoLoading=!1},1e3),ge(fe.data))})});return me},pe.prototype.stop=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("stop",U+"/ezopen/h5/iframe");var Oe=this,be=new Promise(function(me,ge){Z.addEventListener("message",function(Ze){var fe=Oe.opt.id;fe==Ze.data.id&&Ze.data.type==="stop"&&me(Ze.data)})});return be},pe.prototype.openSound=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("openSound",U+"/ezopen/h5/iframe");var Oe=this,be=new Promise(function(me,ge){Z.addEventListener("message",function(Ze){var fe=Oe.opt.id;fe==Ze.data.id&&Ze.data.type==="openSound"&&me(Ze.data)})});return be},pe.prototype.closeSound=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("closeSound",U+"/ezopen/h5/iframe");var Oe=this,be=new Promise(function(me,ge){Z.addEventListener("message",function(Ze){var fe=Oe.opt.id;fe==Ze.data.id&&Ze.data.type==="closeSound"&&me(Ze.data)})});return be},pe.prototype.startSave=function(se){var re="EZUIKitPlayer-"+this.opt.id,Oe=document.getElementById(re).contentWindow;Oe.postMessage({action:"startSave",fileName:se||"default"},U+"/ezopen/h5/iframe");var be=this,me=new Promise(function(ge,Ze){Z.addEventListener("message",function(fe){var B=be.opt.id;B==fe.data.id&&fe.data.type==="startSave"&&ge(fe.data)})});return me},pe.prototype.stopSave=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("stopSave",U+"/ezopen/h5/iframe");var Oe=this,be=new Promise(function(me,ge){Z.addEventListener("message",function(Ze){var fe=Oe.opt.id;fe==Ze.data.id&&Ze.data.type==="stopSave"&&me(Ze.data)})});return be},pe.prototype.fullScreen=function(){if(this.opt.fullScreenStatus===1)return!1;var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;if(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)){var Oe=document.documentElement.clientWidth,be=document.documentElement.clientHeight,me=document.body;me=document.getElementById(se);var ge="";ge+="width:"+be+"px;",ge+="height:"+Oe+"px;",ge+="-webkit-transform: rotate(90deg); transform: rotate(90deg);",ge+="-webkit-transform-origin: "+Oe/2+"px "+Oe/2+"px;",ge+="transform-origin: "+Oe/2+"px "+Oe/2+"px;",ge+="position: fixed;top: 0;left: 0;z-index:10",me.style.cssText=ge,setTimeout(function(){re.postMessage("autoResize",U+"/ezopen/h5/iframe")},500)}else{var Ze=function(B){var te=B.requestFullScreen||B.webkitRequestFullScreen||B.mozRequestFullScreen||B.msRequestFullScreen;if(te)te.call(B);else if(typeof Z.ActiveXObject!="undefined"){var oe=new ActiveXObject("WScript.Shell");oe!==null&&oe.SendKeys("{F11}")}};Ze(document.getElementById(se))}this.params.fullScreenCallBack&&this.params.fullScreenCallBack(this.opt.id),this.opt.fullScreenStatus=1},pe.prototype.cancelFullScreen=function(){if(this.opt.fullScreenStatus===0)return!1;var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;if(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)){var Oe=document.getElementById(se).width,be=document.getElementById(se).height,me=document.body;me=document.getElementById(se);var ge="";ge+="width:"+Oe+"px;",ge+="height:"+be+"px;",ge+="-webkit-transform: none; transform: none;",ge+="-webkit-transform-origin: 0 0;",ge+="transform-origin: 0 0;",me.style.cssText=ge,setTimeout(function(){re.postMessage("autoResize",U+"/ezopen/h5/iframe")},500);var Ze=se+"cancel-full-screen",fe=document.getElementById(Ze);fe&&document.body.removeChild(fe)}else document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen&&document.mozCancelFullScreen();this.params.cancelFullScreenCallBack&&this.params.cancelFullScreenCallBack(this.opt.id),this.opt.fullScreenStatus=0},pe.prototype.capturePicture=function(se,re){var Oe="EZUIKitPlayer-"+this.opt.id,be=document.getElementById(Oe).contentWindow;be.postMessage({action:"capturePicture",fileName:se||"default",isUndownload:re},U+"/ezopen/h5/iframe");var me=this,ge=new Promise(function(Ze,fe){Z.addEventListener("message",function(B){var te=me.opt.id;te==B.data.id&&B.data.type==="capturePicture"&&Ze(B.data)})});return ge},pe.prototype.enableZoom=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("enableZoom",U+"/ezopen/h5/iframe")},pe.prototype.closeZoom=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("closeZoom",U+"/ezopen/h5/iframe")},pe.prototype.getOSDTime=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("getOSDTime",U+"/ezopen/h5/iframe");var Oe=this,be=new Promise(function(me,ge){Z.addEventListener("message",function(Ze){var fe=Oe.opt.id;fe==Ze.data.id&&Ze.data.type==="getOSDTime"&&me(Ze.data)})});return be},pe.prototype.autoResize=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("autoResize",U+"/ezopen/h5/iframe")},pe.prototype.reSize=function(se,re){var Oe="EZUIKitPlayer-"+this.opt.id,be=document.getElementById(Oe).contentWindow,me=document.getElementById(this.opt.id);me.style.width=se+"px",me.style.height=re+"px",document.getElementById(this.opt.id).style.width=se+"px",document.getElementById(this.opt.id).style.height=re+"px";var ge=document.getElementById(Oe);ge.setAttribute("width",se),ge.setAttribute("height",re),ge.style.width=se+"px",ge.style.height=re+"px",setTimeout(function(){be.postMessage({action:"autoResize"},U+"/ezopen/h5/iframe")},500)},pe.prototype.startTalk=function(){console.log("执行开始对讲"),console.log(this.opt);var se=this;z.opt=this.opt,Z.EZUIKit&&(Z.EZUIKit.opt=this.opt);var re=function(be){if(be.code==200){var me=be.data;if(me){var ge=me.rtcUrl;ge.indexOf("ws")===-1&&(ge=ge.replace("https","wss").replace("rtcgw","rtcgw-ws")),se.opt.rtcUrl=ge,se.opt.ttsUrl="tts://"+me.ttsUrl;var Ze="talk://"+se.opt.deviceSerial+":0:"+se.opt.channelNo+":cas.ys7.com:6500";se.opt.talkLink=se.opt.ttsUrl+"/"+Ze,se.opt.stream=me.stream,Z.startTalk()}}};N(se.opt.apiDomain,"POST",{accessToken:se.opt.accessToken,deviceSerial:se.opt.deviceSerial,channelNo:se.opt.channelNo},"",re)},pe.prototype.stopTalk=function(){console.log("执行结束对讲"),Z.stopTalk()},pe.prototype.edit=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("edit",U+"/ezopen/h5/iframe")},pe.prototype.btnReRender=function(se){var re="EZUIKitPlayer-"+this.opt.id,Oe=document.getElementById(re).contentWindow;Oe.postMessage({action:"btnReRender",data:se},U+"/ezopen/h5/iframe")},pe.prototype.changePlayUrl=function(se){se.deviceSerial&&(this.opt.deviceSerial=se.deviceSerial),se.channelNo&&(this.opt.channelNo=se.channelNo),se.accessToken&&(this.opt.accessToken=se.accessToken);var re="EZUIKitPlayer-"+this.opt.id,Oe=document.getElementById(re).contentWindow;Oe.postMessage({action:"changePlayUrl",data:se},U+"/ezopen/h5/iframe")},pe.prototype.fetchThemeData=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage({action:"fetchThemeData"},U+"/ezopen/h5/iframe")},pe.prototype.setThemeData=function(se,re,Oe){var be="EZUIKitPlayer-"+this.opt.id,me=document.getElementById(be).contentWindow;me.postMessage({action:"setThemeData",data:{accessToken:se,header:re,footer:Oe}},U+"/ezopen/h5/iframe")},z.EZUIKitPlayer=pe,Z.EZUIKitV3=z;var de=z;return de});var hn=EZUIKitV3,Nn=function(H){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=void 0,N=void 0,z=void 0,U=[];return function(){var de=Re(w),se=new Date().getTime(),re=!R||se-R>de;R=se;for(var Oe=arguments.length,be=Array(Oe),me=0;me<Oe;me++)be[me]=arguments[me];if(re&&T.leading)return T.accumulate?Promise.resolve(H.call(this,[be])).then(function(Ze){return Ze[0]}):Promise.resolve(H.call.apply(H,[this].concat(be)));if(N?clearTimeout(z):N=lt(),U.push(be),z=setTimeout(ue.bind(this),de),T.accumulate){var ge=U.length-1;return N.promise.then(function(Ze){return Ze[ge]})}return N.promise};function ue(){var pe=N;clearTimeout(z),Promise.resolve(T.accumulate?H.call(this,U):H.apply(this,U[U.length-1])).then(pe.resolve,pe.reject),U=[],N=null}};function Re(Z){return typeof Z=="function"?Z():Z}function lt(){var Z={};return Z.promise=new Promise(function(H,w){Z.resolve=H,Z.reject=w}),Z}(function(){var Z;function H(Ve){var Mt=0;return function(){return Mt<Ve.length?{done:!1,value:Ve[Mt++]}:{done:!0}}}var w=typeof Object.defineProperties=="function"?Object.defineProperty:function(Ve,Mt,jt){return Ve==Array.prototype||Ve==Object.prototype||(Ve[Mt]=jt.value),Ve};function T(Ve){Ve=[typeof globalThis=="object"&&globalThis,Ve,typeof window=="object"&&window,typeof self=="object"&&self,typeof I=="object"&&I];for(var Mt=0;Mt<Ve.length;++Mt){var jt=Ve[Mt];if(jt&&jt.Math==Math)return jt}throw Error("Cannot find global object")}var R=T(this);function N(Ve,Mt){if(Mt)e:{var jt=R;Ve=Ve.split(".");for(var Sn=0;Sn<Ve.length-1;Sn++){var Hn=Ve[Sn];if(!(Hn in jt))break e;jt=jt[Hn]}Ve=Ve[Ve.length-1],Sn=jt[Ve],Mt=Mt(Sn),Mt!=Sn&&Mt!=null&&w(jt,Ve,{configurable:!0,writable:!0,value:Mt})}}N("Symbol",function(Ve){function Mt(pi){if(this instanceof Mt)throw new TypeError("Symbol is not a constructor");return new jt(Sn+(pi||"")+"_"+Hn++,pi)}function jt(pi,hi){this.A=pi,w(this,"description",{configurable:!0,writable:!0,value:hi})}if(Ve)return Ve;jt.prototype.toString=function(){return this.A};var Sn="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",Hn=0;return Mt}),N("Symbol.iterator",function(Ve){if(Ve)return Ve;Ve=Symbol("Symbol.iterator");for(var Mt="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),jt=0;jt<Mt.length;jt++){var Sn=R[Mt[jt]];typeof Sn=="function"&&typeof Sn.prototype[Ve]!="function"&&w(Sn.prototype,Ve,{configurable:!0,writable:!0,value:function(){return z(H(this))}})}return Ve});function z(Ve){return Ve={next:Ve},Ve[Symbol.iterator]=function(){return this},Ve}function U(Ve){var Mt=typeof Symbol!="undefined"&&Symbol.iterator&&Ve[Symbol.iterator];return Mt?Mt.call(Ve):{next:H(Ve)}}var ue;if(typeof Object.setPrototypeOf=="function")ue=Object.setPrototypeOf;else{var pe;e:{var de={a:!0},se={};try{se.__proto__=de,pe=se.a;break e}catch(Ve){}pe=!1}ue=pe?function(Ve,Mt){if(Ve.__proto__=Mt,Ve.__proto__!==Mt)throw new TypeError(Ve+" is not extensible");return Ve}:null}var re=ue;function Oe(){this.m=!1,this.j=null,this.v=void 0,this.h=1,this.u=this.C=0,this.l=null}function be(Ve){if(Ve.m)throw new TypeError("Generator is already running");Ve.m=!0}Oe.prototype.o=function(Ve){this.v=Ve},Oe.prototype.s=function(Ve){this.l={D:Ve,F:!0},this.h=this.C||this.u},Oe.prototype.return=function(Ve){this.l={return:Ve},this.h=this.u};function me(Ve,Mt){return Ve.h=3,{value:Mt}}function ge(Ve){this.g=new Oe,this.G=Ve}ge.prototype.o=function(Ve){return be(this.g),this.g.j?fe(this,this.g.j.next,Ve,this.g.o):(this.g.o(Ve),B(this))};function Ze(Ve,Mt){be(Ve.g);var jt=Ve.g.j;return jt?fe(Ve,"return"in jt?jt.return:function(Sn){return{value:Sn,done:!0}},Mt,Ve.g.return):(Ve.g.return(Mt),B(Ve))}ge.prototype.s=function(Ve){return be(this.g),this.g.j?fe(this,this.g.j.throw,Ve,this.g.o):(this.g.s(Ve),B(this))};function fe(Ve,Mt,jt,Sn){try{var Hn=Mt.call(Ve.g.j,jt);if(!(Hn instanceof Object))throw new TypeError("Iterator result "+Hn+" is not an object");if(!Hn.done)return Ve.g.m=!1,Hn;var pi=Hn.value}catch(hi){return Ve.g.j=null,Ve.g.s(hi),B(Ve)}return Ve.g.j=null,Sn.call(Ve.g,pi),B(Ve)}function B(Ve){for(;Ve.g.h;)try{var Mt=Ve.G(Ve.g);if(Mt)return Ve.g.m=!1,{value:Mt.value,done:!1}}catch(jt){Ve.g.v=void 0,Ve.g.s(jt)}if(Ve.g.m=!1,Ve.g.l){if(Mt=Ve.g.l,Ve.g.l=null,Mt.F)throw Mt.D;return{value:Mt.return,done:!0}}return{value:void 0,done:!0}}function te(Ve){this.next=function(Mt){return Ve.o(Mt)},this.throw=function(Mt){return Ve.s(Mt)},this.return=function(Mt){return Ze(Ve,Mt)},this[Symbol.iterator]=function(){return this}}function oe(Ve,Mt){return Mt=new te(new ge(Mt)),re&&Ve.prototype&&re(Mt,Ve.prototype),Mt}function Ie(Ve,Mt){Ve instanceof String&&(Ve+="");var jt=0,Sn=!1,Hn={next:function(){if(!Sn&&jt<Ve.length){var pi=jt++;return{value:Mt(pi,Ve[pi]),done:!1}}return Sn=!0,{done:!0,value:void 0}}};return Hn[Symbol.iterator]=function(){return Hn},Hn}if(N("Array.prototype.entries",function(Ve){return Ve||function(){return Ie(this,function(Mt,jt){return[Mt,jt]})}}),typeof Blob!="undefined"&&(typeof FormData=="undefined"||!FormData.prototype.keys)){var Ge=function(Ve,Mt){for(var jt=0;jt<Ve.length;jt++)Mt(Ve[jt])},nt=function(Ve){return Ve.replace(/\r?\n|\r/g,`\r
`)},at=function(Ve,Mt,jt){return Mt instanceof Blob?(jt=jt!==void 0?jt+"":typeof Mt.name=="string"?Mt.name:"blob",(Mt.name!==jt||Object.prototype.toString.call(Mt)==="[object Blob]")&&(Mt=new File([Mt],jt)),[String(Ve),Mt]):[String(Ve),String(Mt)]},St=function(Ve,Mt){if(Ve.length<Mt)throw new TypeError(Mt+" argument required, but only "+Ve.length+" present.")},zt=typeof globalThis=="object"?globalThis:typeof window=="object"?window:typeof self=="object"?self:this,qt=zt.FormData,kt=zt.XMLHttpRequest&&zt.XMLHttpRequest.prototype.send,On=zt.Request&&zt.fetch,Wn=zt.navigator&&zt.navigator.sendBeacon,Vn=zt.Element&&zt.Element.prototype,ii=zt.Symbol&&Symbol.toStringTag;ii&&(Blob.prototype[ii]||(Blob.prototype[ii]="Blob"),"File"in zt&&!File.prototype[ii]&&(File.prototype[ii]="File"));try{new File([],"")}catch(Ve){zt.File=function(Mt,jt,Sn){return Mt=new Blob(Mt,Sn||{}),Object.defineProperties(Mt,{name:{value:jt},lastModified:{value:+(Sn&&Sn.lastModified!==void 0?new Date(Sn.lastModified):new Date)},toString:{value:function(){return"[object File]"}}}),ii&&Object.defineProperty(Mt,ii,{value:"File"}),Mt}}var ti=function(Ve){return Ve.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")},di=function(Ve){this.i=[];var Mt=this;Ve&&Ge(Ve.elements,function(jt){if(jt.name&&!jt.disabled&&jt.type!=="submit"&&jt.type!=="button"&&!jt.matches("form fieldset[disabled] *"))if(jt.type==="file"){var Sn=jt.files&&jt.files.length?jt.files:[new File([],"",{type:"application/octet-stream"})];Ge(Sn,function(Hn){Mt.append(jt.name,Hn)})}else jt.type==="select-multiple"||jt.type==="select-one"?Ge(jt.options,function(Hn){!Hn.disabled&&Hn.selected&&Mt.append(jt.name,Hn.value)}):jt.type==="checkbox"||jt.type==="radio"?jt.checked&&Mt.append(jt.name,jt.value):(Sn=jt.type==="textarea"?nt(jt.value):jt.value,Mt.append(jt.name,Sn))})};if(Z=di.prototype,Z.append=function(Ve,Mt,jt){St(arguments,2),this.i.push(at(Ve,Mt,jt))},Z.delete=function(Ve){St(arguments,1);var Mt=[];Ve=String(Ve),Ge(this.i,function(jt){jt[0]!==Ve&&Mt.push(jt)}),this.i=Mt},Z.entries=function Ve(){var Mt,jt=this;return oe(Ve,function(Sn){if(Sn.h==1&&(Mt=0),Sn.h!=3)return Mt<jt.i.length?Sn=me(Sn,jt.i[Mt]):(Sn.h=0,Sn=void 0),Sn;Mt++,Sn.h=2})},Z.forEach=function(Ve,Mt){St(arguments,1);for(var jt=U(this),Sn=jt.next();!Sn.done;Sn=jt.next()){var Hn=U(Sn.value);Sn=Hn.next().value,Hn=Hn.next().value,Ve.call(Mt,Hn,Sn,this)}},Z.get=function(Ve){St(arguments,1);var Mt=this.i;Ve=String(Ve);for(var jt=0;jt<Mt.length;jt++)if(Mt[jt][0]===Ve)return Mt[jt][1];return null},Z.getAll=function(Ve){St(arguments,1);var Mt=[];return Ve=String(Ve),Ge(this.i,function(jt){jt[0]===Ve&&Mt.push(jt[1])}),Mt},Z.has=function(Ve){St(arguments,1),Ve=String(Ve);for(var Mt=0;Mt<this.i.length;Mt++)if(this.i[Mt][0]===Ve)return!0;return!1},Z.keys=function Ve(){var Mt=this,jt,Sn,Hn,pi,hi;return oe(Ve,function(yi){if(yi.h==1&&(jt=U(Mt),Sn=jt.next()),yi.h!=3){if(Sn.done){yi.h=0;return}return Hn=Sn.value,pi=U(Hn),hi=pi.next().value,me(yi,hi)}Sn=jt.next(),yi.h=2})},Z.set=function(Ve,Mt,jt){St(arguments,2),Ve=String(Ve);var Sn=[],Hn=at(Ve,Mt,jt),pi=!0;Ge(this.i,function(hi){hi[0]===Ve?pi&&(pi=!Sn.push(Hn)):Sn.push(hi)}),pi&&Sn.push(Hn),this.i=Sn},Z.values=function Ve(){var Mt=this,jt,Sn,Hn,pi,hi;return oe(Ve,function(yi){if(yi.h==1&&(jt=U(Mt),Sn=jt.next()),yi.h!=3){if(Sn.done){yi.h=0;return}return Hn=Sn.value,pi=U(Hn),pi.next(),hi=pi.next().value,me(yi,hi)}Sn=jt.next(),yi.h=2})},di.prototype._asNative=function(){for(var Ve=new qt,Mt=U(this),jt=Mt.next();!jt.done;jt=Mt.next()){var Sn=U(jt.value);jt=Sn.next().value,Sn=Sn.next().value,Ve.append(jt,Sn)}return Ve},di.prototype._blob=function(){var Ve="----formdata-polyfill-"+Math.random(),Mt=[],jt="--"+Ve+`\r
Content-Disposition: form-data; name="`;return this.forEach(function(Sn,Hn){return typeof Sn=="string"?Mt.push(jt+ti(nt(Hn))+(`"\r
\r
`+nt(Sn)+`\r
`)):Mt.push(jt+ti(nt(Hn))+('"; filename="'+ti(Sn.name)+`"\r
Content-Type: `+(Sn.type||"application/octet-stream")+`\r
\r
`),Sn,`\r
`)}),Mt.push("--"+Ve+"--"),new Blob(Mt,{type:"multipart/form-data; boundary="+Ve})},di.prototype[Symbol.iterator]=function(){return this.entries()},di.prototype.toString=function(){return"[object FormData]"},Vn&&!Vn.matches&&(Vn.matches=Vn.matchesSelector||Vn.mozMatchesSelector||Vn.msMatchesSelector||Vn.oMatchesSelector||Vn.webkitMatchesSelector||function(Ve){Ve=(this.document||this.ownerDocument).querySelectorAll(Ve);for(var Mt=Ve.length;0<=--Mt&&Ve.item(Mt)!==this;);return-1<Mt}),ii&&(di.prototype[ii]="FormData"),kt){var tr=zt.XMLHttpRequest.prototype.setRequestHeader;zt.XMLHttpRequest.prototype.setRequestHeader=function(Ve,Mt){tr.call(this,Ve,Mt),Ve.toLowerCase()==="content-type"&&(this.B=!0)},zt.XMLHttpRequest.prototype.send=function(Ve){Ve instanceof di?(Ve=Ve._blob(),this.B||this.setRequestHeader("Content-Type",Ve.type),kt.call(this,Ve)):kt.call(this,Ve)}}On&&(zt.fetch=function(Ve,Mt){return Mt&&Mt.body&&Mt.body instanceof di&&(Mt.body=Mt.body._blob()),On.call(this,Ve,Mt)}),Wn&&(zt.navigator.sendBeacon=function(Ve,Mt){return Mt instanceof di&&(Mt=Mt._asNative()),Wn.call(this,Ve,Mt)}),zt.FormData=di}})();var sn=function(){function Z(H,w){for(var T=0;T<w.length;T++){var R=w[T];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(H,R.key,R)}}return function(H,w,T){return w&&Z(H.prototype,w),T&&Z(H,T),H}}();function Pi(Z,H){if(!(Z instanceof H))throw new TypeError("Cannot call a class as a function")}var er=function(){var Z=void 0;return function(H){return H&&(Z=H),Z}}();(function(){function Z(){if(Pi(this,Z),er())return er();if(Z.unique!==void 0)return Z.unique;Z.unique=this,this.oAudioContext=null,this.currentVolume=80,this.bSetVolume=!1,this.gainNode=null,this.iWndNum=-1,this.mVolumes=new Map;var H=window.AudioContext||window.webkitAudioContext;this.oAudioContext=new H,this.writeString=function(w,T,R){for(var N=0;N<R.length;N++)w.setUint8(T+N,R.charCodeAt(N))},this.setBufferToDataview=function(w,T,R){for(var N=0;N<R.length;N++,T++)w.setUint8(T,R[N])},er(this)}return sn(Z,[{key:"Play",value:function(w,T,R){var N=new ArrayBuffer(44+T),z=new DataView(N),U=R.samplesPerSec,ue=R.channels,pe=R.bitsPerSample;this.writeString(z,0,"RIFF"),z.setUint32(4,32+T*2,!0),this.writeString(z,8,"WAVE"),this.writeString(z,12,"fmt "),z.setUint32(16,16,!0),z.setUint16(20,1,!0),z.setUint16(22,ue,!0),z.setUint32(24,U,!0),z.setUint32(28,U*2,!0),z.setUint16(32,ue*pe/8,!0),z.setUint16(34,pe,!0),this.writeString(z,36,"data"),z.setUint32(40,T,!0),this.setBufferToDataview(z,44,w);var de=this;return this.oAudioContext.decodeAudioData(z.buffer,function(se){var re=de.oAudioContext.createBufferSource();if(re==null)return-1;re.buffer=se,re.start(0),(de.gainNode==null||de.bSetVolume)&&(de.gainNode=de.oAudioContext.createGain(),de.bSetVolume=!1),de.gainNode.gain.value=de.currentVolume/100,de.gainNode.connect(de.oAudioContext.destination),re.connect(de.gainNode)},function(se){return console.log("decode error"),-1}),0}},{key:"Stop",value:function(){return this.gainNode!=null&&(this.gainNode.disconnect(),this.gainNode=null),!0}},{key:"SetVolume",value:function(w){return this.bSetVolume=!0,this.currentVolume=w,this.mVolumes.set(this.iWndNum,this.currentVolume),!0}},{key:"SetWndNum",value:function(w){this.iWndNum=w;var T=this.mVolumes.get(w);return T==null&&(T=80),this.currentVolume=T,!0}},{key:"GetVolume",value:function(){var w=this.mVolumes.get(this.iWndNum);return w==null&&(w=80),w}}]),window.AudioRenderer=Z,Z})();var _e=["attribute vec4 vertexPos;","attribute vec2 texturePos;","varying vec2 textureCoord;","void main()","{","gl_Position = vertexPos;","textureCoord = texturePos;","}"].join(`
`),ze=["precision highp float;","varying highp vec2 textureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","const mat4 YUV2RGB = mat4","(","1.1643828125, 0, 1.59602734375, -.87078515625,","1.1643828125, -.39176171875, -.81296875, .52959375,","1.1643828125, 2.017234375, 0, -1.081390625,","0, 0, 0, 1",");","void main(void) {","highp float y = texture2D(ySampler, textureCoord).r;","highp float u = texture2D(uSampler, textureCoord).r;","highp float v = texture2D(vSampler, textureCoord).r;","gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join(`
`);(function(Z,H){window.SuperRender=H()})(void 0,function(){function Z(H){this.canvasElement=document.getElementById(H),this.initContextGL(),this.contextGL&&(this.YUVProgram=this.initProgram(_e,ze),this.initBuffers(),this.initTextures())}return Z.prototype.initContextGL=function(){var H=this.canvasElement,w=null;try{w=H.getContext("webgl")||H.getContext("experimental-webgl")}catch(T){w=null}(!w||typeof w.getParameter!="function")&&(w=null),this.contextGL=w,console.log("WebGL1.0")},Z.prototype.initProgram=function(H,w){var T=this.contextGL,R=T.createShader(T.VERTEX_SHADER);T.shaderSource(R,H),T.compileShader(R),T.getShaderParameter(R,T.COMPILE_STATUS)||console.log("Vertex shader failed to compile: "+T.getShaderInfoLog(R));var N=T.createShader(T.FRAGMENT_SHADER);T.shaderSource(N,w),T.compileShader(N),T.getShaderParameter(N,T.COMPILE_STATUS)||console.log("Fragment shader failed to compile: "+T.getShaderInfoLog(N));var z=T.createProgram();return T.attachShader(z,R),T.attachShader(z,N),T.linkProgram(z),T.getProgramParameter(z,T.LINK_STATUS)||console.log("Program failed to compile: "+T.getProgramInfoLog(z)),T.deleteShader(R),T.deleteShader(N),z},Z.prototype.initBuffers=function(){var H=this.contextGL,w=H.createBuffer();H.bindBuffer(H.ARRAY_BUFFER,w),H.bufferData(H.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),H.STATIC_DRAW),H.bindBuffer(H.ARRAY_BUFFER,null);var T=H.createBuffer();H.bindBuffer(H.ARRAY_BUFFER,T),H.bufferData(H.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),H.DYNAMIC_DRAW),H.bindBuffer(H.ARRAY_BUFFER,null),this.vertexPosBuffer=w,this.texturePosBuffer=T},Z.prototype.initTexture=function(){var H=this.contextGL,w=H.createTexture();return H.bindTexture(H.TEXTURE_2D,w),H.texParameteri(H.TEXTURE_2D,H.TEXTURE_MAG_FILTER,H.LINEAR),H.texParameteri(H.TEXTURE_2D,H.TEXTURE_MIN_FILTER,H.LINEAR),H.texParameteri(H.TEXTURE_2D,H.TEXTURE_WRAP_S,H.CLAMP_TO_EDGE),H.texParameteri(H.TEXTURE_2D,H.TEXTURE_WRAP_T,H.CLAMP_TO_EDGE),H.bindTexture(H.TEXTURE_2D,null),w},Z.prototype.initTextures=function(){var H=this.contextGL,w=this.YUVProgram;H.useProgram(w);var T=this.initTexture(),R=H.getUniformLocation(w,"ySampler");H.uniform1i(R,0),this.yTextureRef=T;var N=this.initTexture(),z=H.getUniformLocation(w,"uSampler");H.uniform1i(z,1),this.uTextureRef=N;var U=this.initTexture(),ue=H.getUniformLocation(w,"vSampler");H.uniform1i(ue,2),this.vTextureRef=U,H.useProgram(null)},Z.prototype.SR_DisplayFrameData=function(H,w,T,R,N){if(!(H<=0||w<=0)){var z=this.contextGL;if(T==null){z.clearColor(0,0,0,0),z.clear(z.COLOR_BUFFER_BIT|z.DEPTH_BUFFER_BIT);return}var U=this.canvasElement;this.nWindowWidth=U.width,this.nWindowHeight=U.height;var ue=this.nWindowWidth,pe=this.nWindowHeight;z.clearColor(.8,.8,1,1),z.clear(z.COLOR_BUFFER_BIT|z.DEPTH_BUFFER_BIT),z.viewport(0,0,ue,pe),this.updateFrameData(H,w,T,R,N);var de=this.YUVProgram;z.useProgram(de);var se=this.vertexPosBuffer;z.bindBuffer(z.ARRAY_BUFFER,se);var re=z.getAttribLocation(de,"vertexPos");z.enableVertexAttribArray(re),z.vertexAttribPointer(re,2,z.FLOAT,!1,0,0),z.bindBuffer(z.ARRAY_BUFFER,null);var Oe=this.texturePosBuffer;z.bindBuffer(z.ARRAY_BUFFER,Oe);var be=z.getAttribLocation(de,"texturePos");z.enableVertexAttribArray(be),z.vertexAttribPointer(be,2,z.FLOAT,!1,0,0),z.bindBuffer(z.ARRAY_BUFFER,null),z.drawArrays(z.TRIANGLE_STRIP,0,4),z.disableVertexAttribArray(re),z.disableVertexAttribArray(be),z.useProgram(null)}},Z.prototype.updateFrameData=function(H,w,T,R,N){var z=this.contextGL,U=this.yTextureRef,ue=this.uTextureRef,pe=this.vTextureRef,de=T;if(H==R&&w==N){var se=H*w,re=de.subarray(0,se);z.activeTexture(z.TEXTURE0),z.bindTexture(z.TEXTURE_2D,U),z.texImage2D(z.TEXTURE_2D,0,z.LUMINANCE,H,w,0,z.LUMINANCE,z.UNSIGNED_BYTE,re);var Oe=H/2*w/2,be=de.subarray(H*w,H*w+Oe);z.activeTexture(z.TEXTURE2),z.bindTexture(z.TEXTURE_2D,pe),z.texImage2D(z.TEXTURE_2D,0,z.LUMINANCE,H/2,w/2,0,z.LUMINANCE,z.UNSIGNED_BYTE,be);var me=Oe,ge=de.subarray(H*w+H*w/4,H*w+H*w/4+me);z.activeTexture(z.TEXTURE1),z.bindTexture(z.TEXTURE_2D,ue),z.texImage2D(z.TEXTURE_2D,0,z.LUMINANCE,H/2,w/2,0,z.LUMINANCE,z.UNSIGNED_BYTE,ge)}else{for(var se=R*N,re=new Uint8Array(se),Ze=0;Ze<N;Ze++)for(var fe=de.subarray(Ze*H,Ze*H+R),B=0;B<R;B++)re[Ze*R+B]=fe[B];z.activeTexture(z.TEXTURE0),z.bindTexture(z.TEXTURE_2D,U),z.texImage2D(z.TEXTURE_2D,0,z.LUMINANCE,R,N,0,z.LUMINANCE,z.UNSIGNED_BYTE,re),re=null,fe=null;for(var Oe=R/2*N/2,be=new Uint8Array(Oe),Ze=0;Ze<N/2;Ze++)for(var te=de.subarray(H*w+Ze*H/2,H*w+Ze*H/2+R/2),B=0;B<R/2;B++)be[Ze*R/2+B]=te[B];z.activeTexture(z.TEXTURE2),z.bindTexture(z.TEXTURE_2D,pe),z.texImage2D(z.TEXTURE_2D,0,z.LUMINANCE,R/2,N/2,0,z.LUMINANCE,z.UNSIGNED_BYTE,be),be=null,te=null;for(var me=Oe,ge=new Uint8Array(me),Ze=0;Ze<N/2;Ze++)for(var oe=de.subarray(H*w*5/4+Ze*H/2,H*w*5/4+Ze*H/2+R/2),B=0;B<R/2;B++)ge[Ze*R/2+B]=oe[B];z.activeTexture(z.TEXTURE1),z.bindTexture(z.TEXTURE_2D,ue),z.texImage2D(z.TEXTURE_2D,0,z.LUMINANCE,R/2,N/2,0,z.LUMINANCE,z.UNSIGNED_BYTE,ge),ge=null,oe=null}},Z.prototype.SR_SetDisplayRect=function(H){var w=this.contextGL,T=this.nWindowWidth,R=this.nWindowHeight,N=null;if(H&&T>0&&R>0){var z=H.left/T,U=H.top/R,ue=H.right/T,pe=H.bottom/R;N=new Float32Array([ue,U,z,U,ue,pe,z,pe])}else N=new Float32Array([1,0,0,0,1,1,0,1]);var de=this.texturePosBuffer;w.bindBuffer(w.ARRAY_BUFFER,de),w.bufferSubData(w.ARRAY_BUFFER,0,N),w.bindBuffer(w.ARRAY_BUFFER,null)},Z.prototype.SR_Destroy=function(){var H=this.contextGL,w=this.YUVProgram;H.deleteProgram(w);var T=this.vertexPosBuffer,R=this.texturePosBuffer;H.deleteBuffer(T),H.deleteBuffer(R);var N=this.yTextureRef,z=this.uTextureRef,U=this.vTextureRef;H.deleteTexture(N),H.deleteTexture(z),H.deleteTexture(U)},Z});var Qe="https://open.ys7.com",At="".concat(Qe,"/console/ezuikit_static/v66/v2"),ke="".concat(Qe,"/console/ezuikit_static/v66/v1"),ft=function(H,w){var T=["theme","standard"],R=["pcLive","pcRec","mobileLive","mobileRec","noData","security","voice","simple"];if(typeof H=="undefined")return w.themeData?{templateType:"themeData",templateId:"themeData"}:{templateType:"local",templateId:""};if(typeof H=="string"){if(H.length===32)return{templateType:"remote",templateId:H};if(T.indexOf(H)!==-1)return H==="simple"&&typeof w.header=="undefined"&&typeof w.footer=="undefined"?{templateType:"local",templateId:""}:{templateType:"iframe",templateId:H};if(R.indexOf(H)!==-1)return{templateType:"local",templateId:H}}},en=function(){var H=window.navigator.userAgent.toLowerCase(),w={sa:/version.*safari/.test(H),ch:/chrome/.test(H),ff:/gecko/.test(H)&&!/webkit/.test(H)},T=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);if(T)return!1;if(w.ch){var R=function(){for(var z=window.navigator.userAgent.split(" "),U="",ue=0;ue<z.length;ue++)/chrome/i.test(z[ue])&&(U=z[ue]);return U?Number(U.split("/")[1].split(".")[0]):!1};return R()>91&&!!window.SharedArrayBuffer}return!1},we=function(){function Z(H){var w=this;i(this,Z),this.isStoping=!1;var T=H.autoplay,R=T===void 0?!0:T;if((H.template||H.themeData)&&(R=!1),this.params=H,this.autoplay=R,window.EZUIKit[H.id]={state:{EZUIKitPlayer:{init:window.EZUIKit[H.id]&&window.EZUIKit[H.id].state&&window.EZUIKit[H.id].state.EZUIKitPlayer.init||!1,themeInit:window.EZUIKit[H.id]&&window.EZUIKit[H.id].state&&window.EZUIKit[H.id].state.EZUIKitPlayer.themeInit||!1,talkInit:window.EZUIKit[H.id]&&window.EZUIKit[H.id].state&&window.EZUIKit[H.id].state.EZUIKitPlayer.talkInit||!1}}},ft(this.params.template,H).templateType!=="iframe"){this.Monitor=new Jt({env:typeof H.disableMonitor!="undefined"&&H.disableMonitor?"test12":"online"},this),this.id=H.id,this.width=H.width,this.height=H.height,this.url=H.url,this.accessToken=H.accessToken,this.themeId=ft(H.template,H).templateId,this.id=H.id,this.audio=!0,this.poster=H.poster,this.speed=1,this.disabledTimeLine=!1,this.disabledPTZ=!1,this.enableSharedArrayBufferGuide=!1,this.capacity={},this.playTimer=null,this.env={domain:"https://open.ys7.com"};var N=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);this.isMobile=N,document.getElementById("".concat(this.id,"-wrap"))&&(document.getElementById("".concat(this.id,"-wrap")).innerHTML="",document.getElementById("".concat(this.id,"-wrap")).id=this.id),this.staticPath=en()?At:ke,typeof H.staticPath=="string"&&(H.staticPath.startsWith("http")?this.staticPath=H.staticPath:this.staticPath=window.location.protocol+"//"+window.location.host+H.staticPath,en()?this.staticPath+="/v2":this.staticPath+="/v1"),typeof H.audio!="undefined"&&(this.audio=H.audio),typeof H.env!="undefined"&&(this.env=Object.assign(this.env,H.env)),typeof H.isMobile!="undefined"&&(this.isMobile=H.isMobile),typeof H.disabledTimeLine!="undefined"&&(this.disabledTimeLine=H.disabledTimeLine),typeof H.disabledPTZ!="undefined"&&(this.disabledPTZ=H.disabledPTZ),typeof H.enableSharedArrayBufferGuide!="undefined"&&(this.enableSharedArrayBufferGuide=H.enableSharedArrayBufferGuide);var z="".concat(this.staticPath,"/js/jsPluginV1-1.0.0.min.js"),U=function(){if(window.addPluginUrlIng=!0,en())console.log("启用多线程解析视频"),z="".concat(w.staticPath,"/js/jsPluginV2-2.0.1.min.js");else{var de=function(){for(var ge=navigator.userAgent.split(" "),Ze="",fe=0;fe<ge.length;fe++)/chrome/i.test(ge[fe])&&(Ze=ge[fe]);return Ze?Number(Ze.split("/")[1].split(".")[0]):!1};if(!N&&91<de&&w.enableSharedArrayBufferGuide){console.log("提示用户开启谷歌实验室特性");var se="".concat(w.id,"-wrap"),re=document.createElement("div"),Oe=document.createElement("span");Oe.innerHTML="您当前浏览器可以开启谷歌实验室多线程特性,获取更好播放体验,避免浏览器卡顿及崩溃,详见",re.appendChild(Oe);var be=document.createElement("a");be.href="https://open.ys7.com/help/384",be.setAttribute("target","_blank"),re.appendChild(be),be.innerHTML="开启说明",re.id="".concat(w.id,"-guide"),re.style="font-size:12px;color:red;",setTimeout(function(){document.getElementById(se)&&document.getElementById(se).insertBefore(re,document.getElementById(w.id))},5e3)}}w.pluginStatus=new F(w,w.id),l(z,function(){if(w.autoplay){w.initTime=new Date().getTime(),w.Monitor.dclog({url:w.url,action:0,text:"startInit",isVersion2Available:en()?1:0}),w.Monitor.localInfoLog({Serial:S(w.url).deviceSerial,Channel:S(w.url).channelNo,Ver:en()?"v7.0.0":"v6.0.0",ExterVer:en()?"v7.0.0":"v6.0.0"}),console.log("初始化-");var me=w.initEZUIKitPlayer(H),ge=w._getRealUrlPromise(H.accessToken,H.url);Promise.all([me,ge]).then(function(Ze){Ze[1]?(w.playStartTime=new Date().getTime(),w._pluginPlay(Ze[1],function(){console.log("自动播放成功"),w.Monitor.dclog({url:w.url,action:202,d:new Date().getTime()-w.initTime,text:"autoPlaySuccess"})},function(){console.log("自动播放失败"),w.Monitor.dclog({url:w.url,action:402,d:new Date().getTime()-w.initTime,text:"autoPlayError"})})):console.log("promise of one",Ze),window.EZUIKit[H.id].state.EZUIKitPlayer.init=!0,document.getElementById("".concat(H.id,"canvas_draw0"))&&(document.getElementById("".concat(H.id,"canvas_draw0")).style.border="none")}).catch(function(Ze){console.log("err",Ze),w.Theme&&w.Theme.setDisabled(!0),w.pluginStatus.loadingClear(),w.pluginStatus.loadingSetText({text:Ze&&Ze.msg||"获取播放地址失败",color:"red"})})}else{w.initTime=new Date().getTime(),w.Monitor.dclog({url:w.url,action:0,text:"startInit",isVersion2Available:en()?1:0}),w.Monitor.localInfoLog({Serial:S(w.url).deviceSerial,Channel:S(w.url).channelNo,Ver:en()?"v7.0.0":"v6.0.0"});var me=w.initEZUIKitPlayer(H);me.then(function(fe){console.log("初始化成功",fe),window.EZUIKit[H.id].state.EZUIKitPlayer.init=!0,document.getElementById("".concat(H.id,"canvas_draw0"))&&(document.getElementById("".concat(H.id,"canvas_draw0")).style.border="none"),w.initSuccessTime=new Date().getTime(),w.Monitor.dclog({url:w.url,action:201,d:w.initSuccessTime-w.initTime,text:"initSuccess",isVersion2Available:en()?1:0})})}},function(){return en()?!!window.JSPluginV2||!!window.addPluginUrled:!!window.JSPluginV1||!!window.addPluginUrled}),H.plugin&&H.plugin.indexOf("talk")!==-1&&(w.Talk=new Ue(w),window.EZUIKit[H.id].state.EZUIKitPlayer.talkInit=!0),w.getDeviceCapacity()};if(window.addPluginUrlIng)var ue=setInterval(function(){(window.JSPluginV1||window.JSPluginV2)&&(clearInterval(ue),U())},50);else U()}else return new hn.EZUIKitPlayer(H);this.play=Nn(function(pe){return w._play(pe)},500,!0),this.resume=Nn(function(pe){return w._resume(pe)},500,!0),this.changePlayUrl=Nn(function(pe,de){return w._changePlayUrl(pe,de)},500),window.addEventListener("beforeunload",function(){console.log("退出页面,停止视频流"),w.stop()})}return a(Z,[{key:"initEZUIKitPlayer",value:function(w){var T=this,R=w.id,N=w.width,z=N===void 0?600:N,U=w.height,ue=U===void 0?400:U;if(!w.width||!w.height){var pe=document.getElementById(R).getBoundingClientRect();!w.width&&pe.width>0&&(z=pe.width),!w.height&&pe.height>0&&(ue=pe.height)}if(!document.getElementById("".concat(R,"-wrap"))){var de=document.createElement("div");de.id="".concat(R,"-wrap"),de.style="display:inline-block;width:".concat(z,"px;position:relative;vertical-align: bottom;"),document.getElementById(R).parentNode.insertBefore(de,document.getElementById(R)),document.getElementById(R).parentNode.removeChild(document.getElementById(R)),de.innerHTML="<div id=".concat(R,"></div>"),document.getElementById(R).style="display:inline-block;width:".concat(z,"px;height:").concat(ue,"px;"),document.getElementById(R).style.verticalAlign="top"}this.themeId&&(this.Theme=new ut(this,w.id),window.EZUIKit[w.id].state.EZUIKitPlayer.themeInit=!0,this.Monitor.dclog({url:this.url,action:2,text:this.themeId}),typeof this.params.handleThemeChange=="function"&&(this.handleThemeChange=this.params.handleThemeChange));var se=new V(this,R);this.Message=se;var re=function(me,ge){var Ze;if(en()){Ze=new window.JSPluginV2({szId:R,iType:2,iWidth:z,iHeight:ue,iMaxSplit:1,iCurrentSplit:1,szBasePath:"",staticPath:T.staticPath,oStyle:{border:"none",background:"#000000"}}),T.pluginStatus.loadingStart(R),T.pluginStatus.loadingSetText({text:"初始化播放器完成"}),Ze.EventCallback={pluginErrorHandler:function(te,oe,Ie){if(console.log(te,oe,Ie),oe===1003)console.log("断流"),T.Theme.setDecoderState({play:!1}),T.pluginStatus.setPlayStatus({play:!1}),Ze.bPlay||(T.pluginStatus.loadingClear(),T.pluginStatus.loadingSetText({text:"连接断开,请重试",color:"red"})),typeof T.params.handleError=="function"&&T.params.handleError({msg:"连接断开,请重试",retcode:1003,id:T.params.id,type:"handleError"});else if(Ie.errorCode!=1){var Ge=T.errorHander.matchErrorInfo(Ie.errorCode),nt="连接断开,请重试";Ge&&Ge.msg?nt=Ge.msg:Ge&&Ge.description&&(nt=Ge.description),T.Theme.setDecoderState({play:!1}),T.pluginStatus.setPlayStatus({play:!1}),T.pluginStatus.loadingClear(),T.pluginStatus.loadingSetText({text:nt,color:"red"})}else T.pluginStatus.loadingClear(),T.Theme&&T.Theme.setDisabled(!1)},openStreamCallback:function(){console.log("开启取流"),T.openStreamTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:224,d:T.openStreamTime-T.gotWsUrlTime,text:"openStream",isVersion2Available:en()?1:0})},getStreamHeaderCallback:function(){console.log("完成取流返回流头"),T.getStreamHeaderTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:225,d:T.getStreamHeaderTime-T.openStreamTime,text:"getStreamHeader",isVersion2Available:en()?1:0})},getVideoStreamCallback:function(){console.log("返回视频流(首次)"),T.getVideoStreamTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:226,d:T.getVideoStreamTime-T.getStreamHeaderTime,text:"getVideoStream",isVersion2Available:en()?1:0})},appearFirstFrameCallback:function(){console.log("出现首帧画面(播放成功)"),T.appearFirstFrameTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:227,d:T.appearFirstFrameTime-T.getStreamHeaderTime,text:"appearFirstFrame",isVersion2Available:en()?1:0})},averageStreamSuccessCallback:function(){console.log("平均成功取流的出流耗时"),T.averageStreamSuccessTime=T.initSuccessTime-T.initTime+(T.gotWsUrlTime-T.startGetWsUrlTime)+(T.appearFirstFrameTime-T.openStreamTime),T.Monitor.dclog({url:T.url,action:228,d:T.averageStreamSuccessTime,text:"averageStreamSuccess",isVersion2Available:en()?1:0})}},T.env={domain:"https://open.ys7.com"},typeof w.env!="undefined"&&(T.env=Object.assign(T.env,w.env)),typeof w.handleTalkSuccess!="undefined"&&(T.handleTalkSuccess=w.handleTalkSuccess),typeof w.handleTalkError!="undefined"&&(T.handleTalkError=w.handleTalkError),T.errorHander=new K,T.jSPlugin=Ze;var fe=setInterval(function(){window.JSPlayerModuleLoaded&&(clearInterval(fe),typeof T.params.handleInitSuccess=="function"&&T.params.handleInitSuccess({retcode:0,id:T.params.id,type:"handleInitSuccess"}),me({meta:{retcode:200,msg:"初始化成功"}}),w.url.indexOf("rec")!=-1&&T.Theme.changeTheme(T.isMobile?"mobileRec":"pcRec"))},50)}else Ze=new window.JSPluginV1({szId:R,iType:2,iWidth:z,iHeight:ue,iMaxSplit:1,iCurrentSplit:1,szBasePath:"",staticPath:T.staticPath,oStyle:{border:"none",background:"#000000"}}),T.pluginStatus.loadingStart(R),T.pluginStatus.loadingSetText({text:"初始化播放器完成"}),Ze.EventCallback={openStreamCallback:function(){console.log("开启取流---v1"),T.openStreamTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:224,d:T.openStreamTime-T.gotWsUrlTime,text:"openStream",isVersion2Available:en()?1:0})},getStreamHeaderCallback:function(){console.log("完成取流返回流头"),T.getStreamHeaderTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:225,d:T.getStreamHeaderTime-T.openStreamTime,text:"getStreamHeader",isVersion2Available:en()?1:0})},getVideoStreamCallback:function(){console.log("返回视频流(首次)"),T.getVideoStreamTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:226,d:T.getVideoStreamTime-T.getStreamHeaderTime,text:"getVideoStream",isVersion2Available:en()?1:0})},appearFirstFrameCallback:function(){console.log("出现首帧画面(播放成功)"),T.appearFirstFrameTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:227,d:T.appearFirstFrameTime-T.getStreamHeaderTime,text:"appearFirstFrame",isVersion2Available:en()?1:0})},averageStreamSuccessCallback:function(){console.log("平均成功取流的出流耗时"),T.averageStreamSuccessTime=T.initSuccessTime-T.initTime+(T.gotWsUrlTime-T.startGetWsUrlTime)+(T.appearFirstFrameTime-T.openStreamTime),T.Monitor.dclog({url:T.url,action:228,d:T.averageStreamSuccessTime,text:"averageStreamSuccess",isVersion2Available:en()?1:0})},loadEventHandler:function(){},zoomEventResponse:function(){},windowEventSelect:function(te){},pluginErrorHandler:function(te,oe,Ie){if(console.log(te,oe,Ie),oe===1003)console.log("断流"),T.Theme.setDecoderState({play:!1}),T.pluginStatus.setPlayStatus({play:!1}),Ze.bPlay||(T.pluginStatus.loadingClear(),T.pluginStatus.loadingSetText({text:"连接断开,请重试",color:"red"})),typeof T.params.handleError=="function"&&T.params.handleError({msg:"连接断开,请重试",retcode:1003,id:T.params.id,type:"handleError"});else if(Ie.errorCode!=1){var Ge=T.errorHander.matchErrorInfo(Ie.errorCode),nt="连接断开,请重试";Ge&&Ge.msg?nt=Ge.msg:Ge&&Ge.description&&(nt=Ge.description),T.Theme.setDecoderState({play:!1}),T.pluginStatus.setPlayStatus({play:!1}),T.pluginStatus.loadingClear(),T.pluginStatus.loadingSetText({text:nt,color:"red"})}else T.pluginStatus.loadingClear(),T.Theme&&T.Theme.setDisabled(!1)},windowEventOver:function(te){},windowEventOut:function(te){},windowEventUp:function(te){},windowFullCcreenChange:function(te){},firstFrameDisplay:function(te,oe,Ie){console.log(oe,Ie),Ze.JS_SetCanFullScreen(!1)},performanceLack:function(){},mouseEvent:function(te,oe,Ie){}},T.env={domain:"https://open.ys7.com"},typeof w.env!="undefined"&&(T.env=Object.assign(T.env,w.env)),typeof w.handleTalkSuccess!="undefined"&&(T.handleTalkSuccess=w.handleTalkSuccess),typeof w.handleTalkError!="undefined"&&(T.handleTalkError=w.handleTalkError),T.errorHander=new K,T.jSPlugin=Ze,typeof T.params.handleInitSuccess=="function"&&T.params.handleInitSuccess({retcode:0,id:T.params.id,type:"handleInitSuccess"}),me({meta:{retcode:200,msg:"初始化成功"}}),w.url.indexOf("rec")!=-1&&T.Theme.changeTheme(T.isMobile?"mobileRec":"pcRec")},Oe=new Promise(re);return Oe}},{key:"_getRealUrlPromise",value:function(w,T){var R=this;console.log("获取播放地址 url => ".concat(T," ").concat(this.accessToken)),console.log("开始获取wsurl"),this.startGetWsUrlTime=new Date().getTime(),this.Monitor.dclog({url:this.url,action:222,text:"startGetWsUrl",isVersion2Available:en()?1:0});var N=this.env.domain;this.env&&(N=this.env.domain);var z=function(de,se){var re="",Oe=N+"/api/lapp/live/url/ezopen",be=new FormData;be.append("ezopen",T),be.append("isFlv",!1),be.append("userAgent",window.navigator.userAgent),be.append("isHttp",!1),be.append("accessToken",w),fetch(Oe,{method:"POST",body:be}).then(function(me){return me.json()}).then(function(me){if(me.code==200||me.retcode==0){var ge="",Ze="";me.ext&&me.ext.token?(re+=me.data,Ze=me.ext.token,ge=me.data):me.data&&me.data.token&&(re+=me.data.url,Ze=me.data.token,ge=me.data.url);var fe=T.indexOf("live")!==-1?"live":"playback";fe==="live"?re=re+"&ssn="+Ze+"&auth=1&biz=4&cln=100":re=re+"&ssn="+Ze+"&auth=1&cln=100",console.log(re);var B=d("checkCode",re);if(B&&(typeof R.jSPlugin.decoderVersion!="undefined"&&R.jSPlugin.decoderVersion==="2.0"?R.validateCode=B:(console.log("设置密钥",B),R.jSPlugin.JS_SetSecretKey(0,B))),re.indexOf("playback")!==-1){var te=d("begin",ge)||d("begin",T),oe=d("end",ge)||d("end",T);if(te)re=re.replace("&begin="+d("begin",ge),"&begin="+U(te,"000000")),d("begin",re)||(re+="&begin="+U(te,"000000"));else{var Ie=new Date;re=re+"&begin="+Ie.Format("yyyyMMdd")+"T000000Z"}if(oe?(re=re.replace("&end="+d("end",ge),"&end="+U(oe,"235959")),d("end",re)||(re+="&end="+U(oe,"235959"))):re=re+"&end="+U(d("begin",re).substr(0,8),"235959"),d("stream",ge)||(re=re.replace("stream","&stream")),T.indexOf(".cloud")!==-1){var Ge=function(ii){if(ii.code==200){var ti=[];if(ii.data&&ii.data.files&&ii.data.files.length>0){var di=ii.data.files,tr=new Date().getTime(),Ve=ii.data.isAll;if(Ve){ti=Sn(di);var Mt=JSON.stringify(ti).replace("\\","");re+="&recSlice="+Mt.replace("\\","")+"&r="+Math.random(),de(re)}else{var jt=function Hn(){function pi(hi){if(hi.data&&hi.data.files&&hi.data.files.length>0)if(hi.data.isAll==!1)hi.data.files&&(di=di.concat(hi.data.files)),tr=hi.data.nextFileTime>0?hi.data.nextFileTime:new Date().getTime(),Hn();else{ti=Sn(di);var yi=JSON.stringify(ti).replace("\\","");re+="&recSlice="+yi.replace("\\","")+"&r="+Math.random(),de(re)}else{ti=Sn(di);var yi=JSON.stringify(ti).replace("\\","");re+="&recSlice="+yi.replace("\\","")+"&r="+Math.random(),de(re)}}kt.startTime=tr,A(qt,"POST",kt,"",pi)};jt()}}else se({retcode:-1,msg:"未找到录像片段"})}else se({retcode:-1,msg:"未找到录像片段"});function Sn(Hn){var pi=[];return Hn.forEach(function(hi,yi){pi.length==0||hi.downloadPath!==pi[pi.length-1].downloadPath?pi.push({downloadPath:hi.downloadPath,ownerId:hi.ownerId,iStorageVersion:hi.iStorageVersion,videoType:hi.videoType,iPlaySpeed:0,startTime:hi.startTime,endTime:hi.endTime}):pi[pi.length-1].endTime=hi.endTime}),pi}},nt=ue(d("begin",re)),at=ue(d("end",re)),St=d("serial",re),zt=d("chn",re),qt=N+"/api/lapp/video/by/time",kt={accessToken:R.accessToken,recType:1,deviceSerial:St,channelNo:zt,startTime:nt,endTime:at,version:"2.0"};A(qt,"POST",kt,"",Ge)}else if(T.indexOf("alarmId")!==-1){var On=function(jt){if(jt.code==200){var Sn=[];if(jt.data){Sn=pi([jt.data]);var Hn=JSON.stringify(Sn).replace("\\","");re+="&recSlice="+Hn.replace("\\",""),console.log("realUrl",re,jt.data.recType),jt.data.recType==1?re=re.replace("/playback","/cloudplayback"):re=re.replace("/cloudplayback","/playback"),de(re)}}function pi(hi){var yi=[];return hi.forEach(function(nr,zl){yi.length==0||nr.downloadPath!==yi[yi.length-1].downloadPath?yi.push({downloadPath:nr.downloadPath,ownerId:nr.ownerId,iStorageVersion:nr.iStorageVersion,videoType:nr.videoType,iPlaySpeed:0,startTime:nr.startTime,endTime:nr.endTime}):yi[yi.length-1].endTime=nr.endTime}),console.log("downloadPathArr",yi),yi}};console.log("进入alarmId回放");var Wn=d("alarmId",re),nt=ue(d("begin",re)),at=ue(d("end",re)),St=d("serial",re),zt=d("chn",re),qt=N+"/api/lapp/video/by/id",kt={accessToken:R.accessToken,deviceSerial:St,channelNo:zt,alarmId:Wn};A(qt,"POST",kt,"",On)}else de(re)}else de(re)}else R.Theme&&R.Theme.setDisabled(!0),R.pluginStatus.loadingClear(),R.pluginStatus.loadingSetText({text:me.msg,color:"red"}),typeof R.params.handleError=="function"&&R.params.handleError({retcode:me.code,msg:me.msg,id:R.params.id,type:"handleError"}),se(me)})};return new Promise(function(pe,de){return z(pe,de)});function U(pe,de){var se=/^[0-9]{8}T[0-9]{6}Z$/;if(se.test(pe))return pe;if(/[0-9]{8,14}/.test(pe)){var re=6-(14-pe.length),Oe=de.length,be=pe+de.substring(re,Oe);return be.slice(0,8)+"T"+be.slice(8)+"Z"}throw new Error("回放时间格式有误,请确认")}function ue(pe){var de=pe.slice(0,4),se=pe.slice(4,6),re=pe.slice(6,8),Oe=pe.slice(9,11),be=pe.slice(11,13),me=pe.slice(13,15),ge=de+"-"+se+"-"+re+" "+Oe+":"+be+":"+me;return new Date(ge.replace(/-/g,"/")).getTime()}}},{key:"_pluginPlay",value:function(w,T,R){var N=this;if(console.log("执行播放 _pluginPlay",w),!w)return!1;function z(de){var se=de.split("?")[0].replace("/live","").replace("/playback",""),re=(de.indexOf("/live")===-1?de.indexOf("cloudplayback")!==-1?"/cloudplayback?":"/playback?":"/live?")+de.split("?")[1];return re.indexOf("/playback")!==-1&&(re=re.replace("stream=2","stream=1")),{websocketConnectUrl:se,websocketStreamingParam:re}}var U=z(w).websocketConnectUrl;this.env&&this.env.wsUrl&&(U=this.env.wsUrl),this.gotWsUrlTime=new Date().getTime(),this.Monitor.dclog({url:this.url,action:223,d:this.gotWsUrlTime-this.startGetWsUrlTime,text:"getWsUrlSuccess",isVersion2Available:en()?1:0});var ue={playURL:z(w).websocketStreamingParam};console.log("播放前 stop 阶段 结束"),this.isStoping=!1;var pe=Date.now();console.log("执行播放 ... this.jSPlugin.JS_Play at ",pe),this.jSPlugin.JS_Play(U,ue,0).then(function(){if(console.log("执行播放 ... this.jSPlugin.JS_Play 播放成功",U,ue),console.log("执行播放耗时 ",Date.now()-pe),N.isStoping){console.log("现在在播放前 stop 阶段,此次应为无效播放成功触发。不执行后续回调, 此次耗时无效");return}if(N.validateCode&&typeof N.jSPlugin.decoderVersion!="undefined"&&N.jSPlugin.decoderVersion==="2.0"&&N.jSPlugin.JS_SetSecretKey(0,N.validateCode),N.pluginStatus.loadingClear(),N.pluginStatus.setPlayStatus({play:!0,loading:!1}),N.Theme){N.Theme.setDecoderState({play:!0});var de=E.findIndex(N.Theme.themeData.footer.btnList,function(se){return se.iconId==="sound"&&se.isrender===1&&se.defaultActive===1})>-1;N.audio=de}N.audio&&setTimeout(function(){N.openSound()},500),typeof N.params.handleSuccess=="function"&&N.params.handleSuccess({retcode:0,id:N.params.id,type:"handleSuccess"}),T(ue),N.Monitor.dclog({url:N.url,action:211,d:new Date().getTime()-N.playStartTime,text:"startPlaySuccess"}),N.Monitor.playLog({Enc:N.url.indexOf("@")===-1?0:1,PlTp:N.url.indexOf("back")===-1?1:2,Via:2,ErrCd:0,Cost:new Date().getTime()-N.playStartTime,Serial:S(N.url).deviceSerial,Channel:S(N.url).channelNo,Ver:en()?"v7.0.0":"v6.0.0"})},function(de){console.log("err",de);var se="播放失败,请检查设备及客户端网络",re=-1;if(N.jSPlugin.bPlay)return!1;if(de&&de.errorCode){var Oe=N.errorHander.matchErrorInfo(de.errorCode);N.Theme&&N.Theme.setDisabled(!0),Oe&&Oe.msg?se=Oe.msg:Oe&&Oe.description?se=Oe.description:se="播放失败,请检查设备及客户端网络",re=de.errorCode}N.pluginStatus.loadingClear(),N.pluginStatus.loadingSetText({text:se,color:"red"}),typeof N.params.handleError=="function"&&N.params.handleError({retcode:re,msg:se,id:N.params.id,type:"handleError"}),R(),N.Monitor.dclog({url:N.url,action:411,d:new Date().getTime()-N.playStartTime,text:"startPlayError"}),N.Monitor.playLog({Enc:N.url.indexOf("@")===-1?0:1,PlTp:N.url.indexOf("back")===-1?1:2,Via:2,ErrCd:re,Cost:-1,Serial:S(N.url).deviceSerial,Channel:S(N.url).channelNo,Ver:en()?"v7.0.0":"v6.0.0"})})}},{key:"_play",value:function(w){var T=this;console.log("执行播放 play options.url =>",w),this.pluginStatus.setPlayStatus({play:!1,loading:!0}),this.playStartTime=new Date().getTime(),this.Monitor.dclog({url:this.url,action:1,d:new Date().getTime()-this.initTime,text:"startPlay"}),w&&(typeof w=="string"&&(this.url=w),typeof w.url=="string"&&(this.url=w.url),typeof w.accessToken=="string"&&(this.accessToken=w.accessToken),this.Theme&&(typeof w.url=="string"||typeof w.accessToken=="string")&&this.Theme.getDeviceInfo());var R=new Promise(function(N,z){console.log("执行 播放前 stop"),T.isStoping=!0,T.jSPlugin.JS_Stop(0).then(function(){console.log("播放前 stop 执行成功 this.url => ".concat(T.url," ").concat(T.accessToken)),T._getRealUrlPromise(T.accessToken,T.url).then(function(U){T._pluginPlay(U,function(ue){N(!0)},function(){return z(!1)})}).catch(function(U){var ue=U.msg?U.msg:"播放失败,请检查设备及客户端网络";T.Theme&&T.Theme.setDisabled(!0),T.pluginStatus.loadingClear(),T.pluginStatus.loadingSetText({text:ue,color:"red"}),typeof T.params.handleError=="function"&&T.params.handleError({retcode:U.oError?U.oError.errorCode:-1,msg:ue,id:T.params.id,type:"handleError"}),z({retcode:U.oError?U.oError.errorCode:-1,msg:ue,id:T.params.id,type:"handleError"})})})});return R}},{key:"stop",value:function(){var w=this;return this.pluginStatus.setPlayStatus({loading:!0}),this.reSetTheme(),this.jSPlugin.JS_Stop(0).then(function(){console.log("停止成功"),w.pluginStatus.setPlayStatus({play:!1,loading:!1}),w.Theme&&w.Theme.setDecoderState({play:!1})})}},{key:"changeVideoLevel",value:function(w){var T=this,R=this.url,N=w?R.replace(".live",".hd.live"):R.replace(".hd.live",".live");this.jSPlugin.playURL=w?this.jSPlugin.playURL.replace("stream=2","stream=1"):this.jSPlugin.playURL.replace("stream=1","stream=2"),console.log("changeVideoLevel",N,this.jSPlugin.playURL),this.url=N;var z=new Promise(function(U,ue){T.pause().then(function(){console.log("暂停成功"),T.resume().then(function(pe){console.log("恢复成功")})}).catch(function(){console.log("暂停失败"),T.resume().then(function(pe){console.log("恢复成功")})})});return z}},{key:"reSetTheme",value:function(){this.Theme&&this.Theme.Ptz&&(this.Theme.setDecoderState({pantile:!1}),this.Theme.Ptz.hide()),this.Theme&&this.Theme.decoderState.state.recordvideo&&this.Theme.setDecoderState({recordvideo:!1}),this.Theme&&this.Theme.decoderState.state.zoom&&(this.Zoom.stopZoom(),this.Theme.setDecoderState({zoom:!1})),this.Theme&&this.Theme.decoderState.state.talk&&(this.stopTalk(),this.Theme.setDecoderState({talk:!1})),this.Theme&&this.Theme.Rec&&!this.Theme.isMobile&&this.Theme.Rec.datepickerHide(),this.Theme&&this.Theme.Rec&&(this.Theme.changeRecSpeed(1),this.Theme.nextRate=1,this.speed=1,this.Theme.setDecoderState({speed:!1}))}},{key:"_changePlayUrl",value:function(w){var T=this,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};console.log("_changePlayUrl"),console.log(w),this.reSetTheme(),this.getDeviceCapacity({accessToken:w.accessToken,deviceSerial:w.deviceSerial});var N=this.url,z=ue(N,w);w.accessToken&&(this.accessToken=w.accessToken),this.url=z,R(),this.pluginStatus.loadingStart(this.id),this.pluginStatus.loadingSetText({text:"加载中,请稍后"});var U=new Promise(function(pe,de){var se={url:z};return w.accessToken&&(se.accessToken=w.accessToken),console.log("切换播放地址 参数 ",se),T.play(se).then(function(){console.log("切换播放地址 play 执行成功 ",T.url,T.accessToken),T.Theme&&T.Theme.decoderState.state.webExpend&&T.Theme.webExpend(),T.Theme&&T.Theme.decoderState.state.expend&&T.Theme.expend(),w.type?w.type=="rec"||w.type=="cloud.rec"?T.Theme.changeTheme(T.isMobile?"mobileRec":"pcRec"):T.Theme.changeTheme(T.isMobile?"mobileLive":"pcLive"):T.url.indexOf(".rec")>-1?T.Theme.changeTheme(T.isMobile?"mobileRec":"pcRec"):T.Theme.changeTheme(T.isMobile?"mobileLive":"pcLive"),w&&w.begin&&w.deviceSerial&&T.Theme.Rec.setDatepickerDate(w.begin),T.Theme.setDisabled(!1),pe(z)}).catch(function(re){de(z),re&&re.msg&&(T.Theme&&T.Theme.setDisabled(!0),T.pluginStatus.loadingClear(),T.pluginStatus.loadingSetText({text:re.msg,color:"red"}))})});function ue(pe,de){if(de.url)return de.url;console.log("--------------matchInitUrl",pe);var se=pe.split("/")[4].split(".")[pe.split("/")[4].split(".").length-1].split("?")[0];se==="rec"&&pe.indexOf(".cloud.rec")!==-1&&(se="cloud.rec"),de.type&&(se=de.type);var re=pe.split("/")[3];de.deviceSerial&&(re=de.deviceSerial);var Oe=pe.split("/")[4].split(".")[0];de.channelNo&&(Oe=de.channelNo);var be=pe.split("/")[2].split("@").length===2?pe.split("/")[2].split("@")[0]:"";typeof de.validCode!="undefined"&&(be=de.validCode);var me=typeof de.hd=="undefined"?pe.indexOf(".hd")!==-1:de.hd,ge="ezopen://".concat(be?"".concat(be,"@"):"","open.ys7.com/").concat(re,"/").concat(Oe).concat(me?".hd":"",".").concat(se);return se==="live"||(ge="ezopen://".concat(be?"".concat(be,"@"):"","open.ys7.com/").concat(re,"/").concat(Oe,".").concat(se),de.begin&&de.end?ge+="?begin=".concat(de.begin,"&end=").concat(de.end):de.begin?ge+="?begin=".concat(de.begin):d("begin",pe)&&(ge+="?begin=".concat(d("begin",pe)))),ge}return U}},{key:"getOSDTime",value:function(){var w=this,T=new Promise(function(R,N){w.jSPlugin.JS_GetOSDTime(0).then(function(z){R({code:0,retcode:0,data:z}),typeof w.params.getOSDTimeCallBack=="function"&&w.params.getOSDTimeCallBack({id:w.id,type:"getOSDTime",code:0,data:z})}).catch(function(z){N({code:-1,retcode:-1,data:z}),typeof w.params.getOSDTimeCallBack=="function"&&w.params.getOSDTimeCallBack({id:w.id,type:"getOSDTime",code:-1,data:-1})})});return T}},{key:"capturePicture",value:function(w){var T=this,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,N=this.jSPlugin.JS_CapturePicture(0,w,"JPEG",R,!!R);return c(N)?(typeof this.params.capturePictureCallBack=="function"&&N.then(function(){T.params.capturePictureCallBack({id:T.id,type:"capturePicture",code:0})}).catch(function(){T.params.capturePictureCallBack({id:T.id,type:"capturePicture",code:-1})}),N):new Promise(function(z){z(N)})}},{key:"startSave",value:function(w){var T=this,R=this.jSPlugin.JS_StartSave(0,w);return c(R)?(typeof this.params.startSaveCallBack=="function"&&R.then(function(){T.params.startSaveCallBack({id:T.id,type:"startSave",code:0})}).catch(function(){T.params.startSaveCallBack({id:T.id,type:"startSave",code:-1})}),R):(this.Theme&&this.Theme.setDecoderState({recordvideo:!0}),new Promise(function(N){N(R)}))}},{key:"stopSave",value:function(){var w=this,T=this.jSPlugin.JS_StopSave(0);return c(T)?(typeof this.params.startSaveCallBack=="function"&&T.then(function(){w.params.stopSaveCallBack({id:w.id,type:"stopSave",code:0})}).catch(function(){w.params.stopSaveCallBack({id:w.id,type:"stopSave",code:-1})}),T):(this.Theme&&this.Theme.setDecoderState({recordvideo:!1}),new Promise(function(R){R(T)}))}},{key:"openSound",value:function(){var w=this.jSPlugin.JS_OpenSound(0);return console.log("打开声音",w),c(w)?w:(this.Theme&&this.Theme.setDecoderState({sound:!0}),typeof this.params.openSoundCallBack=="function"&&this.params.openSoundCallBack({id:this.id,type:"openSound",code:w}),new Promise(function(T){T(w)}))}},{key:"closeSound",value:function(){var w=this.jSPlugin.JS_CloseSound(0);return c(w)?w:(this.Theme&&this.Theme.setDecoderState({sound:!1}),typeof this.params.closeSoundCallBack=="function"&&this.params.closeSoundCallBack({id:this.id,type:"closeSound",code:w}),new Promise(function(T){T(w)}))}},{key:"enableZoom",value:function(){var w=this.jSPlugin.JS_EnableZoom(0);return c(w)?w:new Promise(function(T){T(w)})}},{key:"closeZoom",value:function(){var w=this.jSPlugin.JS_DisableZoom(0);return c(w)?w:new Promise(function(T){T(w)})}},{key:"setPoster",value:function(w){en()?document.getElementById("".concat(this.id))&&(document.getElementById("".concat(this.id)).style.backgroundImage="url(".concat(w,")"),document.getElementById("".concat(this.id)).style.backgroundSize="100% 100%"):document.getElementById("".concat(this.id,"canvas0"))&&(document.getElementById("".concat(this.id,"canvas0")).style.backgroundImage="url(".concat(w,")"),document.getElementById("".concat(this.id,"canvas0")).style.backgroundSize="cover")}},{key:"reSize",value:function(w,T){var R=0,N=0;if(this.params.height=T,this.params.width=w,this.Theme&&this.Theme.isNeedRenderHeader&&document.getElementById("".concat(this.id,"-headControl"))&&(R=parseInt(document.getElementById("".concat(this.id,"-headControl")).style.height,10)),this.Theme&&this.Theme.isNeedRenderTimeLine&&!this.isMobile&&(N=48),T=T-R-N,this.width=w,this.height=T,document.getElementById("".concat(this.id,"-wrap")).style="width:".concat(w,"px;position:relative;display:inline-block;vertical-align: bottom;"),document.getElementById("".concat(this.id)).style.width=w+"px",document.getElementById("".concat(this.id)).style.height=T+"px",this.jSPlugin&&this.jSPlugin.bPlay)this.jSPlugin&&(this.jSPlugin.iHeight=T,this.jSPlugin.iWidth=w),this.jSPlugin.JS_Resize(w,T);else{document.getElementById("".concat(this.id,"-player"))&&(document.getElementById("".concat(this.id,"-player")).width=w,document.getElementById("".concat(this.id,"-player")).height=T,document.getElementById("".concat(this.id,"-player")).style.width=w+"px",document.getElementById("".concat(this.id,"-player")).style.height=T+"px");var z=1;if(document.getElementById("".concat(this.id,"canvas0"))){var U=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);U&&(z=2),document.getElementById("".concat(this.id,"canvas0")).style.width=w*z+"px",document.getElementById("".concat(this.id,"canvas0")).style.height=T*z+"px",document.getElementById("".concat(this.id,"canvas0")).width=w*z,document.getElementById("".concat(this.id,"canvas0")).height=T*z,document.getElementById("".concat(this.id,"canvas0")).parentNode.style.width=w*z+"px",document.getElementById("".concat(this.id,"canvas0")).parentNode.style.height=T*z+"px",document.getElementById("".concat(this.id,"canvas_draw0")).height=T*z}this.jSPlugin&&(this.jSPlugin.iHeight=T*z,this.jSPlugin.iWidth=w*z)}}},{key:"fast",value:function(w){var T=this,R=this.speed;if(w)var N=this.jSPlugin.JS_Fast(0,w);else{if(R===1)R=2;else if(R===2)R=4;else return typeof this.params.handleError=="function"&&this.params.handleError({msg:"播放速度最大为4倍速度",retcode:1003,id:this.id,type:"handleError"}),new Promise(function(U,ue){T.speed=R,ue({code:-1,data:{speed:R,result:"播放速度最大为4倍速度"}})});var N=this.jSPlugin.JS_Fast(0)}return new Promise(function(z){T.speed=R,z({code:0,data:{speed:R,result:N}})})}},{key:"slow",value:function(){var w=this,T=this.speed;if(T===4)T=2;else if(T===2)T=1;else return typeof this.params.handleError=="function"&&this.params.handleError({msg:"播放速度最小为1倍速度",retcode:1003,id:this.id,type:"handleError"}),new Promise(function(N,z){w.speed=T,z({code:-1,data:{speed:T,result:"播放速度最小为1倍速度"}})});var R=this.jSPlugin.JS_Slow(0);return new Promise(function(N){w.speed=T,N({code:0,data:{speed:T,result:R}})})}},{key:"seek",value:function(w,T){var R=this.url,N=(d("begin",R)||new Date().Format("yyyyMMdd")).substr(0,8);if(T=z(N,"235959"),w.length===6)w=z(N,w);else if(w.length===16){if(w.substr(0,8)!==N)return typeof this.params.handleError=="function"&&this.params.handleError({msg:"seek时间不能跨日期",retcode:-1,id:this.id,type:"handleError"}),!1}else return typeof this.params.handleError=="function"&&this.params.handleError({msg:"seek时间格式错误",retcode:-1,id:this.id,type:"handleError"}),!1;function z(ue,pe){var de=/^[0-9]{8}T[0-9]{6}Z$/;if(de.test(ue))return ue;if(/[0-9]{8,14}/.test(ue)){var se=6-(14-ue.length),re=pe.length,Oe=ue+pe.substring(se,re);return Oe.slice(0,8)+"T"+Oe.slice(8)+"Z"}throw new Error("回放时间格式有误,请确认")}var U=this.jSPlugin.JS_Seek(0,w,T);return console.log("seekRT",U),c(U)?U:new Promise(function(ue){ue(U)})}},{key:"fullScreen",value:function(){var w=this,T=m(document.getElementById("".concat(this.id)));T.then(function(N){console.log("全屏promise",window.screen.availWidth),w.jSPlugin.JS_Resize(window.screen.availWidth,window.screen.availHeight),typeof w.params.fullScreenCallBack=="function"&&w.params.fullScreenCallBack({id:w.id,type:"fullScreen",code:0})});var R=function(){var z=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;z||w.jSPlugin.JS_Resize(w.width,w.height),typeof w.params.fullScreenChangeCallBack=="function"&&w.params.fullScreenChangeCallBack({id:w.id,type:"fullScreen",code:z})};["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(N){window.addEventListener(N,function(z){return R()})})}},{key:"cancelFullScreen",value:function(){var w=this,T=_();T.then(function(R){console.log("取消全屏",R,w.jSPlugin),w.jSPlugin.JS_Resize(w.width,w.height)})}},{key:"startTalk",value:function(){this.Talk.startTalk()}},{key:"stopTalk",value:function(){this.Talk.stopTalk()}},{key:"destroy",value:function(){var w=this.jSPlugin.JS_DestroyWorker(0);return this.Theme&&(this.Theme=null,window.EZUIKit[this.params.id].state.EZUIKitPlayer.themeInit=!1),c(w)?w:new Promise(function(T){T(w)})}},{key:"getDeviceCapacity",value:function(w){var T=this,R=this.env.domain;this.env&&(R=this.env.domain);var N=R+"/api/lapp/device/capacity",z=function(pe){pe.code==200&&pe.data&&(T.capacity=pe.data)},U=w||{accessToken:this.accessToken,deviceSerial:S(this.url).deviceSerial};A(N,"POST",U,"",z)}},{key:"pause",value:function(){var w=this;return new Promise(function(T,R){w.jSPlugin.JS_CloseSound(0),w.jSPlugin.JS_Pause(0,function(N){w.setPoster(N.base64)}).then(function(N){w.Theme&&w.Theme.setDecoderState({play:!1}),T()}).catch(function(N){console.log(N),R(N)})})}},{key:"_resume",value:function(w){var T=this;return new Promise(function(R,N){T.pluginStatus.setPlayStatus({play:!1,loading:!0}),T.jSPlugin.JS_Resume(w).then(function(z){if(setTimeout(function(){T.url.indexOf(".rec")!==-1&&T.speed!=1&&T.jSPlugin.JS_Speed(T.speed)},500),T.Theme){T.Theme.setDecoderState({play:!0,speed:T.speed});var U=T.Theme.decoderState.state.sound;U&&setTimeout(function(){T.openSound()},500)}R(z)}).catch(function(z){console.log("resume err",z),N(z)})})}}]),Z}(),Xe=null;function Pt(Z,H,w,T){return new WebControl({szPluginContainer:Z,iServicePortStart:14510,iServicePortEnd:14519,cbConnectSuccess:H,cbConnectError:w,cbConnectClose:T})}function Rt(){Xe!=null&&(Xe.JS_DestroyWnd().then(function(){console.log("JS_DestroyWnd")},function(){}),Xe.JS_StopService("window").then(function(){Xe.JS_Disconnect().then(function(){console.log("JS_Disconnect")},function(){})}))}function Et(Z){Z.responseMsg.eventName,console.log(Z.responseMsg)}function Fn(){Xe.JS_SetWindowControlCallback({cbIntegrationCallBack:Et}),Xe.JS_StartService("window",{dllPath:"./chain/cloudTransform.dll"}).then(function(){Xe.JS_CreateWnd("playWnd",900,500).then(function(){console.log("JS_CreateWnd success")})})}function Qn(){console.log("cbConnectError"),Xe=null,console.error("确认本地进程是否已安装并开启成功!")}function ci(Z){console.log("cbConnectClose"),Xe=null}window.onscroll=function(){Xe!=null&&Xe.JS_Resize(900,500)},window.onresize=function(){Xe!=null&&Xe.JS_Resize(900,500)},window.onunload=function(){try{Xe.JS_HideWnd(),Rt()}catch(Z){console.error(Z)}},window.onpagehide=function(){try{Xe.JS_HideWnd()}catch(Z){console.error(Z)}};var li=function(){function Z(H){var w=this;i(this,Z),o(this,"changeModel",function(T,R){var N=w;w.switchVideo=parseInt(T),Xe&&Xe.JS_RequestInterface({funcName:"ChangeModel",arguments:encodeURI(JSON.stringify({model:T}))}).then(function(z){T==0?N.play({deviceSerial:R.deviceSerial,channelNo:R.channelNo,validateCode:R.validateCode}):N.play({deviceSerial:R.deviceSerial,channelNo:R.channelNo,validateCode:R.validateCode,startTime:R.startTime,endTime:R.endTime})})}),o(this,"init",function(T){var R,N=w;if(!T.appKey||!T.accessToken){N.showTips(!1,"请输入appkey和token");return}typeof T.appKey!="undefined"&&(w.appKey=T.appKey),typeof T.accessToken!="undefined"&&(w.accessToken=T.accessToken),typeof T.platformId!="undefined"&&(w.platformId=T.platformId);var z=(R={layout:+N.layout,userName:"",waterMark:""},o(R,"waterMark","1"),o(R,"iWndType",0),o(R,"intelligenceEnable",1),o(R,"isRecord",1),o(R,"isSetPos",1),o(R,"motionDetectEnable",0),o(R,"playBackAlarmOverlyingEnable",0),o(R,"response",{code:0,message:null,data:{appKey:T.appKey,ezvizToken:T.accessToken,videoLevel:0,logLevel:3,showMainTool:1,showSubTool:1,waterMark:"1",userName:"openteam",platformId:T.platformId}}),R);console.log("初始化入参",z),Xe.JS_RequestInterface({funcName:"Init",arguments:encodeURI(JSON.stringify(z))}).then(function(U){console.log(U.responseMsg),N.showTips(!0,"视频初始化成功!")})}),o(this,"play",function(T){var R=w;if(!(!T.deviceSerial||!T.channelNo)){typeof T.deviceSerial!="undefined"&&(w.deviceSerial=T.deviceSerial),typeof T.channelNo!="undefined"&&(w.channelNo=T.channelNo),typeof T.startTime!="undefined"&&T.startTime&&(w.startTime=T.startTime+" 00:00:00"),typeof T.endTime!="undefined"&&T.endTime&&(w.endTime=T.endTime+" 23:59:59"),typeof T.validateCode!="undefined"&&T.validateCode&&(w.validateCode=T.validateCode);var N={response:{code:0,message:null,data:{deviceSerial:T.deviceSerial,channelCode:T.channelNo,channelNo:+T.channelNo,codeIsEncrypt:0,validateCode:T.validateCode,deviceClass:R.deviceClass,deviceType:"10222",channelId:"2222222222",channelName:"channelNameTest",storeName:"storeName",storeId:"storeid",startTime:w.startTime,endTime:w.endTime}}};R.deviceClass==="1"?(N.response.data.channelCode=R.channelNo,N.response.data.platformId=R.platformId):N.response.data.channelNo=+R.channelNo,w.switchVideo===1&&(w.startTime&&(N.response.data.startTime=w.startTime),w.endTime&&(N.response.data.endTime=w.endTime)),console.log("预览/回放入参",N),Xe.JS_RequestInterface({funcName:w.switchVideo===0?"StartPreview":"StartPlayback",arguments:encodeURI(JSON.stringify(N))}).then(function(z){console.log(z.responseMsg),R.showTips(!0,"预览/回放成功!")}).catch(function(z){console.log("开始播放:",z)})}}),o(this,"showCBInfo",function(T){w.callbackMessage=w.callbackMessage+JSON.stringify(T)+`
`,console.log(w.callbackMessage)}),o(this,"showTips",function(T,R){}),o(this,"hideVideo",function(){Xe.JS_HideWnd()}),o(this,"showVideo",function(){Xe.JS_ShowWnd()}),o(this,"GetLayout",function(){var T=null;Xe.JS_RequestInterface({funcName:"GetLayout",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:T}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),o(this,"capturePicture",function(T){var R=null;Xe.JS_RequestInterface({funcName:"CaptureJPGEx",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:R}}))}).then(function(N){console.log(JSON.stringify(N.responseMsg)),console.log(N.responseMsg)})}),o(this,"stop",function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;Xe.JS_RequestInterface({funcName:"StopPlay",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(T)}}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),o(this,"setLayout",function(T){var R=parseInt(T);if(isNaN(R)||R==0||R>=13){console.log("不支持实际布局大于16的窗口数");return}w.layout=R,Xe.JS_RequestInterface({funcName:"SetLayout",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{layout:R}}}))}).then(function(N){console.log(JSON.stringify(N.responseMsg)),console.log(N.responseMsg)})}),o(this,"setSoundVolumn",function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1,R=arguments.length>1?arguments[1]:void 0;Xe.JS_RequestInterface({funcName:"SoundVolumn",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(T),volumn:parseInt(R)}}}))}).then(function(N){console.log(JSON.stringify(N.responseMsg)),console.log(N.responseMsg)})}),o(this,"testMute",function(){var T=parseInt(prompt("请输入窗口ID"));Xe.JS_RequestInterface({funcName:"MuteOnOff",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:T}}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),o(this,"testSelectWnd",function(){var T=parseInt(prompt("请输入窗口ID"));Xe.JS_RequestInterface({funcName:"SelectPlayWnd",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:T}}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),o(this,"setVideoLevel",function(T,R){Xe.JS_RequestInterface({funcName:"SetVideoLevel",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:w.switchVideo==1?0:parseInt(T),level:parseInt(R,10)}}}))}).then(function(N){console.log(JSON.stringify(N.responseMsg)),console.log(N.responseMsg)})}),o(this,"startTalk",function(T){Xe.JS_RequestInterface({funcName:"StartTalk",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(T)}}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),o(this,"stopTalk",function(T){Xe.JS_RequestInterface({funcName:"StopTalk",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(T)}}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),o(this,"startSave",function(T){Xe.JS_RequestInterface({funcName:"StartRecord",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(T)}}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),o(this,"stopSave",function(T){Xe.JS_RequestInterface({funcName:"StopRecord",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(T)}}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),this.appKey="b9a3ad6e8026410095d8252169fa430a",this.accessToken="at.2vtum8873rrcwbrv431qb6pn94dkbv23-8dw2twn355-1u3x014-wrthellzk",this.deviceSerial="C33368372",this.channelNo="1",this.validateCode="",this.deviceClass="0",this.platformId="",this.startTime="",this.endTime="",this.layout=2,this.switchVideo=0,this.tips="调用成功",this.successTip=!1,this.tipsShow=!1,Xe=Pt("playWnd",Fn,Qn,ci)}return a(Z,[{key:"alarmMsg",value:function(){var w={request:{body:{alarmTypes:[10800,0,0,0,0],channelId:"066dde0465dd4abaab6afe355baf9d0b",endTime:"1621007999000",startTime:"1620921600000"},callBack:"GetAlarmMsgOrders",majorKey:"",method:"POST",storeId:"",url:"/videoplugin/message/getMessageByTypes"},response:{code:0,message:null,data:[{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620921217e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620920678e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620920586e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919513e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919483e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919333e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918913e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918616e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918305e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917858e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917658e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917244e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917064e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916994e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916668e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916529e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916343e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916081e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915825e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915676e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915531e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915394e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915197e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914971e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914644e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914533e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914457e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914376e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914284e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620913973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620913431e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912771e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912354e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912275e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912093e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912024e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091189e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911839e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911807e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091176e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911682e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091127e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911184e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910982e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910851e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910781e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910727e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910677e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910647e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910588e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910544e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910484e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091041e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091035e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910278e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910217e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910124e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909976e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909939e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909847e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909817e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909736e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909664e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909605e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909575e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909346e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909247e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909149e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090912e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909028e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908999e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908969e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908909e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090888e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908835e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090875e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090872e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908652e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908612e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908582e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908552e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908456e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908426e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908299e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908268e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090805e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907918e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907758e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907625e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907386e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907292e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907127e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906864e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906828e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906797e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906747e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906717e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906632e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906368e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906329e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906142e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906013e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905946e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905823e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905697e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905622e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905541e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905511e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905481e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905442e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905382e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905352e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905322e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905262e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905196e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090515e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904994e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904813e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090473e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16209047e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904618e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904286e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904173e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904143e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904053e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904023e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903854e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903789e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903723e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903643e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903612e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903573e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903505e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903383e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903329e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903299e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903268e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16209032e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903149e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090312e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902977e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090286e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090277e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902639e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902609e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902517e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902373e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090232e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902253e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902198e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902132e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090194e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090185e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901789e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901746e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901685e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901638e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090152e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901489e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901424e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901271e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901233e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901157e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900915e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900774e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900744e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090065e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090044e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900409e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900175e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900134e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900069e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900016e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899976e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899908e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899879e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899826e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899756e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899599e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899559e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899467e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899406e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899265e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899211e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089914e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089911e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089905e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898991e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898926e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898785e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898746e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898697e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898666e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898507e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898293e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898248e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898218e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898157e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898088e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089802e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089796e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089785e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897807e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897771e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897719e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089769e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089763e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16208976e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089757e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089754e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897475e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897369e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897339e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897279e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897237e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897207e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897172e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897142e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897024e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896985e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896874e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896843e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896814e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896783e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896736e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896621e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896478e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896447e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896358e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896307e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896277e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896247e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896214e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089604e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895953e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895921e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895868e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089577e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895704e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089559e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895559e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089548e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895442e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895377e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895347e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895293e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895171e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895136e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895017e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894926e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894896e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894864e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894738e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894599e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894539e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894426e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894359e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894297e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894213e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894183e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894051e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893964e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893934e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893843e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893754e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893676e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893606e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089353e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893452e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893423e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893357e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893288e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893143e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893051e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893006e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892904e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892824e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892764e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892541e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892479e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892311e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892281e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892209e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892063e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891991e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089187e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089181e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891708e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891655e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891585e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891531e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891401e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891297e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891257e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891178e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891128e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891033e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089094e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890879e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890794e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890714e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890616e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890586e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890469e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890414e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890346e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890288e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890179e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890108e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890041e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890011e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889937e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889719e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889635e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889481e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889451e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889317e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889227e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889139e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889034e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888902e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888837e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888767e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888737e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888706e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888633e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888413e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888353e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888323e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888249e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888162e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888e6},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887859e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887776e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887734e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887692e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887619e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887355e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088732e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887289e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887126e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887066e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887034e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088697e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886884e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886804e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886728e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886609e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886538e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886478e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886396e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886334e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886246e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886111e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886011e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885956e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885894e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885696e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885514e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885484e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885414e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885383e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885341e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885306e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885276e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885186e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885114e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885037e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885006e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884975e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884945e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884911e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884851e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088478e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884696e3}],success:!0}};console.log(w),Xe.JS_RequestInterface({funcName:"TransFunctionResult",arguments:encodeURI(JSON.stringify(w))})}}]),Z}();(function(Z,H){t(n)==="object"&&t(n.exports)==="object"?n.exports=Z.document?H(Z,!0):function(w){if(!w.document)throw new Error("EZUIPlayer requires a window with a document");return H(w)}:H(Z)})(typeof window!="undefined"?window:void 0,function(Z,H){var w={Core:s,HLS:C,FLV:M,EZUIKitPlayer:we,EZUIKitHD:li};return Z.EZUIKit=w,w})})(L8,L8.exports);var kCe=L8.exports;const FCe=NCe(kCe);var xw=null;function OCe(n){return xw||(xw=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){return setTimeout(e,16)}).bind(window)),xw(n)}var ww=null;function BCe(n){ww||(ww=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}).bind(window)),ww(n)}function zCe(n){var e=document.createElement("style");return e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n)),(document.querySelector("head")||document.body).appendChild(e),e}function z6(n,e){e===void 0&&(e={});var t=document.createElement(n);return Object.keys(e).forEach(function(i){t[i]=e[i]}),t}function gQ(n,e,t){var i=window.getComputedStyle(n,t||null)||{display:"none"};return i[e]}function NC(n){if(!document.documentElement.contains(n))return{detached:!0,rendered:!1};for(var e=n;e!==document;){if(gQ(e,"display")==="none")return{detached:!1,rendered:!1};e=e.parentNode}return{detached:!1,rendered:!0}}var GCe='.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%}',kC=0,p5=null;function UCe(n,e){n.__resize_mutation_handler__||(n.__resize_mutation_handler__=WCe.bind(n));var t=n.__resize_listeners__;if(!t){if(n.__resize_listeners__=[],window.ResizeObserver){var i=n.offsetWidth,r=n.offsetHeight,a=new ResizeObserver(function(){!n.__resize_observer_triggered__&&(n.__resize_observer_triggered__=!0,n.offsetWidth===i&&n.offsetHeight===r)||I8(n)}),o=NC(n),s=o.detached,l=o.rendered;n.__resize_observer_triggered__=s===!1&&l===!1,n.__resize_observer__=a,a.observe(n)}else if(n.attachEvent&&n.addEventListener)n.__resize_legacy_resize_handler__=function(){I8(n)},n.attachEvent("onresize",n.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",n.__resize_mutation_handler__);else if(kC||(p5=zCe(GCe)),jCe(n),n.__resize_rendered__=NC(n).rendered,window.MutationObserver){var u=new MutationObserver(n.__resize_mutation_handler__);u.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),n.__resize_mutation_observer__=u}}n.__resize_listeners__.push(e),kC++}function VCe(n,e){var t=n.__resize_listeners__;if(t){if(e&&t.splice(t.indexOf(e),1),!t.length||!e){if(n.detachEvent&&n.removeEventListener){n.detachEvent("onresize",n.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",n.__resize_mutation_handler__);return}n.__resize_observer__?(n.__resize_observer__.unobserve(n),n.__resize_observer__.disconnect(),n.__resize_observer__=null):(n.__resize_mutation_observer__&&(n.__resize_mutation_observer__.disconnect(),n.__resize_mutation_observer__=null),n.removeEventListener("scroll",nR),n.removeChild(n.__resize_triggers__.triggers),n.__resize_triggers__=null),n.__resize_listeners__=null}!--kC&&p5&&p5.parentNode.removeChild(p5)}}function HCe(n){var e=n.__resize_last__,t=e.width,i=e.height,r=n.offsetWidth,a=n.offsetHeight;return r!==t||a!==i?{width:r,height:a}:null}function WCe(){var n=NC(this),e=n.rendered,t=n.detached;e!==this.__resize_rendered__&&(!t&&this.__resize_triggers__&&(iR(this),this.addEventListener("scroll",nR,!0)),this.__resize_rendered__=e,I8(this))}function nR(){var n=this;iR(this),this.__resize_raf__&&BCe(this.__resize_raf__),this.__resize_raf__=OCe(function(){var e=HCe(n);e&&(n.__resize_last__=e,I8(n))})}function I8(n){!n||!n.__resize_listeners__||n.__resize_listeners__.forEach(function(e){e.call(n,n)})}function jCe(n){var e=gQ(n,"position");(!e||e==="static")&&(n.style.position="relative"),n.__resize_old_position__=e,n.__resize_last__={};var t=z6("div",{className:"resize-triggers"}),i=z6("div",{className:"resize-expand-trigger"}),r=z6("div"),a=z6("div",{className:"resize-contract-trigger"});i.appendChild(r),t.appendChild(i),t.appendChild(a),n.appendChild(t),n.__resize_triggers__={triggers:t,expand:i,expandChild:r,contract:a},iR(n),n.addEventListener("scroll",nR,!0),n.__resize_last__={width:n.offsetWidth,height:n.offsetHeight}}function iR(n){var e=n.__resize_triggers__,t=e.expand,i=e.expandChild,r=e.contract,a=r.scrollWidth,o=r.scrollHeight,s=t.offsetWidth,l=t.offsetHeight,u=t.scrollWidth,c=t.scrollHeight;r.scrollLeft=a,r.scrollTop=o,i.style.width=s+1+"px",i.style.height=l+1+"px",t.scrollLeft=u,t.scrollTop=c}var Au=function(){return Au=Object.assign||function(n){for(var e,t=1,i=arguments.length;t<i;t++)for(var r in e=arguments[t])Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},Au.apply(this,arguments)};var $Ce=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function qCe(n){return e=Object.create(null),$Ce.forEach(function(t){e[t]=function(i){return function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];if(!n.value)throw new Error("ECharts is not initialized yet.");return n.value[i].apply(n.value,r)}}(t)}),e;var e}var XCe={autoresize:[Boolean,Object]},YCe=/^on[^a-z]/,iU=function(n){return YCe.test(n)};function G6(n,e){var t=s0e(n)?Tr(n):n;return t&&typeof t=="object"&&"value"in t?t.value||e:t||e}var KCe="ecLoadingOptions",ZCe={loading:Boolean,loadingOptions:Object},eg=null,yQ="x-vue-echarts",rU=[],tg=[];(function(n,e){if(n&&typeof document!="undefined"){var t,i=e.prepend===!0?"prepend":"append",r=e.singleTag===!0,a=typeof e.container=="string"?document.querySelector(e.container):document.getElementsByTagName("head")[0];if(r){var o=rU.indexOf(a);o===-1&&(o=rU.push(a)-1,tg[o]={}),t=tg[o]&&tg[o][i]?tg[o][i]:tg[o][i]=s()}else t=s();n.charCodeAt(0)===65279&&(n=n.substring(1)),t.styleSheet?t.styleSheet.cssText+=n:t.appendChild(document.createTextNode(n))}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 d=i==="prepend"?"afterbegin":"beforeend";return a.insertAdjacentElement(d,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 JCe=function(){if(eg!=null)return eg;if(typeof HTMLElement=="undefined"||typeof customElements=="undefined")return eg=!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);
}
`)(yQ)}catch(n){return eg=!1}return eg=!0}(),QCe="ecTheme",eMe="ecInitOptions",tMe="ecUpdateOptions",aU=/(^&?~?!?)native:/,Ua=a0e({name:"echarts",props:Au(Au({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},XCe),ZCe),emits:{},inheritAttrs:!1,setup:function(n,e){var t=e.attrs,i=vg(),r=vg(),a=vg(),o=vg(),s=M2(QCe,null),l=M2(eMe,null),u=M2(tMe,null),c=o0e(n),d=c.autoresize,h=c.manualUpdate,f=c.loading,p=c.loadingOptions,m=Ye(function(){return o.value||n.option||null}),v=Ye(function(){return n.theme||G6(s,{})}),g=Ye(function(){return n.initOptions||G6(l,{})}),_=Ye(function(){return n.updateOptions||G6(u,{})}),S=Ye(function(){return function(P){var F={};for(var V in P)iU(V)||(F[V]=P[V]);return F}(t)}),x={},A=sj().proxy.$listeners,C={};function M(P){if(r.value){var F=a.value=bve(r.value,v.value,g.value);n.group&&(F.group=n.group),Object.keys(C).forEach(function(G){var W=C[G];if(W){var Y=G.toLowerCase();Y.charAt(0)==="~"&&(Y=Y.substring(1),W.__once__=!0);var Q=F;if(Y.indexOf("zr:")===0&&(Q=F.getZr(),Y=Y.substring(3)),W.__once__){delete W.__once__;var K=W;W=function(){for(var ae=[],ie=0;ie<arguments.length;ie++)ae[ie]=arguments[ie];K.apply(void 0,ae),Q.off(Y,W)}}Q.on(Y,W)}}),d.value?Qs(function(){F&&!F.isDisposed()&&F.resize(),V()}):V()}function V(){var G=P||m.value;G&&F.setOption(G,_.value)}}function I(){a.value&&(a.value.dispose(),a.value=void 0)}A?Object.keys(A).forEach(function(P){aU.test(P)?x[P.replace(aU,"$1")]=A[P]:C[P]=A[P]}):Object.keys(t).filter(function(P){return iU(P)}).forEach(function(P){var F=P.charAt(2).toLowerCase()+P.slice(3);if(F.indexOf("native:")!==0)F.substring(F.length-4)==="Once"&&(F="~".concat(F.substring(0,F.length-4))),C[F]=t[P];else{var V="on".concat(F.charAt(7).toUpperCase()).concat(F.slice(8));x[V]=t[P]}});var D=null;qa(h,function(P){typeof D=="function"&&(D(),D=null),P||(D=qa(function(){return n.option},function(F,V){F&&(a.value?a.value.setOption(F,Au({notMerge:F!==V},_.value)):M())},{deep:!0}))},{immediate:!0}),qa([v,g],function(){I(),M()},{deep:!0}),ED(function(){n.group&&a.value&&(a.value.group=n.group)});var E=qCe(a);return function(P,F,V){var G=M2(KCe,{}),W=Ye(function(){return Au(Au({},G6(G,{})),V==null?void 0:V.value)});ED(function(){var Y=P.value;Y&&(F.value?Y.showLoading(W.value):Y.hideLoading())})}(a,f,p),function(P,F,V){var G=null;qa([V,P,F],function(W,Y,Q){var K=W[0],ae=W[1],ie=W[2];if(K&&ae&&ie){var he=ie===!0?{}:ie,Ee=he.throttle,He=Ee===void 0?100:Ee,xe=he.onResize,Fe=function(){ae.resize(),xe==null||xe()};G=He?V_(Fe,He):Fe,UCe(K,G)}Q(function(){K&&G&&VCe(K,G)})})}(a,d,r),dl(function(){M()}),Bl(function(){JCe&&i.value?i.value.__dispose=I:I()}),Au({chart:a,root:i,inner:r,setOption:function(P,F){n.manualUpdate&&(o.value=P),a.value?a.value.setOption(P,F||{}):M(P)},nonEventAttrs:S,nativeListeners:x},E)},render:function(){var n=Au(Au({},this.nonEventAttrs),this.nativeListeners);return n.ref="root",n.class=n.class?["echarts"].concat(n.class):"echarts",PD(yQ,n,[PD("div",{ref:"inner",class:"vue-echarts-inner"})])}});const nMe=""+new URL("title-zs1-c15a5ee8-balabala-1782919616283.svg",import.meta.url).href,iMe=""+new URL("saoguang-ccf84a88-balabala-1782919616283.svg",import.meta.url).href,rMe=""+new URL("content-bottom-left-arrow-3a8a61f3-balabala-1782919616283.svg",import.meta.url).href,aMe=""+new URL("content-bottom-right-arrow-a3c5270d-balabala-1782919616283.svg",import.meta.url).href,oU=""+new URL("content-middle-line-162bc0d5-balabala-1782919616283.svg",import.meta.url).href;const oMe={class:"m-card-hd"},sMe={class:"m-card-hd-bg"},lMe=["width","viewBox"],uMe=["clip-path"],cMe=["width"],dMe=["id"],hMe=["d"],fMe=["d","fill"],pMe=["d","fill","mask"],vMe=["clip-path"],mMe=["x1"],gMe=["id","x1"],yMe=["id"],_Me=["id"],SMe=["width"],bMe=["id"],xMe={class:"m-card-hd-title"},wMe=["width","height","viewBox"],TMe={opacity:"0.6"},AMe=["d"],CMe=["d"],MMe={class:"m-card-bd-content"},Mi={__name:"index",props:{width:{type:Number,default:398},height:{type:Number,default:200},title:{type:String,default:"标题"}},setup(n){const e=n,t=Wt(1),i=Ye(()=>{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`}),r=Ye(()=>{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=Ye(()=>`width:${e.width}px;height:${e.height}px;`);return dl(()=>{t.value="__"+sj().uid}),(o,s)=>(Te(),Pe("div",{class:"m-card",style:Ji(a.value)},[O("div",oMe,[O("div",sMe,[(Te(),Pe("svg",{width:n.width,height:"36",viewBox:`0 0 ${n.width} 36`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[O("g",{"clip-path":`url(#clip0_70_69244${t.value})`},[O("rect",{y:"34.5",width:n.width,height:"1",fill:"url(#paint0_linear_70_69244)"},null,8,cMe),O("mask",{id:`path-2-inside-1_70_69244${t.value}`,fill:"white"},[O("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:`M10 0.5H165L175 10.5H${n.width}V34.5H0V10.5L10 0.5Z`},null,8,hMe)],8,dMe),O("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:`M10 0.5H165L175 10.5H${n.width}V34.5H0V10.5L10 0.5Z`,fill:`url(#paint1_linear_70_69244${t.value})`},null,8,fMe),O("path",{d:i.value,fill:`url(#paint2_linear_70_69244${t.value})`,mask:`url(#path-2-inside-1_70_69244${t.value})`},null,8,pMe),s[1]||(s[1]=pp('<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)),O("g",{style:{"mix-blend-mode":"plus-lighter"},"clip-path":`url(#clip1_70_69244${t.value})`},[...s[0]||(s[0]=[pp('<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,vMe)],8,uMe),O("defs",null,[O("linearGradient",{id:"paint0_linear_70_69244",x1:n.width,y1:"35.5021",x2:"0",y2:"35.5021",gradientUnits:"userSpaceOnUse"},[...s[2]||(s[2]=[O("stop",{"stop-color":"#35A8EB","stop-opacity":"0.1"},null,-1),O("stop",{offset:"1","stop-color":"#30DCFF"},null,-1)])],8,mMe),O("linearGradient",{id:`paint1_linear_70_69244${t.value}`,x1:n.width,y1:"17.5",x2:"7.94819",y2:"17.5",gradientUnits:"userSpaceOnUse"},[...s[3]||(s[3]=[O("stop",{offset:"0.0364889","stop-color":"#35A8EB","stop-opacity":"0.11"},null,-1),O("stop",{offset:"1","stop-color":"#30C1FF","stop-opacity":"0.27"},null,-1)])],8,gMe),O("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]=[O("stop",{"stop-color":"#35A8EB","stop-opacity":"0"},null,-1),O("stop",{offset:"1","stop-color":"#30DCFF"},null,-1)])],8,yMe),s[6]||(s[6]=pp('<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)),O("clipPath",{id:`clip0_70_69244${t.value}`},[O("rect",{width:n.width,height:"35",fill:"white",transform:"translate(0 0.5)"},null,8,SMe)],8,_Me),O("clipPath",{id:`clip1_70_69244${t.value}`},[...s[5]||(s[5]=[O("rect",{width:"130",height:"4",fill:"white",transform:"matrix(1 1.64302e-07 -0.0495776 -0.99877 28 4.5)"},null,-1)])],8,bMe)])],8,lMe))]),s[7]||(s[7]=O("img",{class:"m-card-hd-zs1",src:nMe,alt:""},null,-1)),s[8]||(s[8]=O("div",{class:"saoguang"},[O("img",{src:iMe,alt:""})],-1)),O("div",xMe,De(n.title),1)]),O("div",{class:"m-card-bd",style:Ji(a.value)},[O("div",{class:"m-card-bd-bg",style:Ji(a.value)},[(Te(),Pe("svg",{width:n.width,height:n.height,viewBox:`0 0 ${n.width} ${n.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[O("g",TMe,[O("path",{d:r.value,fill:"rgba(26, 57, 77,1)"},null,8,AMe),O("path",{d:r.value,stroke:"url(#paint1_linear_70_69585)"},null,8,CMe)]),s[9]||(s[9]=O("defs",null,[O("linearGradient",{id:"paint1_linear_70_69585",x1:"199",y1:"203.499",x2:"199",y2:"0.499359",gradientUnits:"userSpaceOnUse"},[O("stop",{"stop-color":"#4FC5DD"}),O("stop",{offset:"1","stop-color":"#05839D","stop-opacity":"0"})])],-1))],8,wMe)),s[10]||(s[10]=O("img",{class:"m-card-bd-bottom-left-arrow",src:rMe,alt:""},null,-1)),s[11]||(s[11]=O("img",{class:"m-card-bd-bottom-right-arrow",src:aMe,alt:""},null,-1)),s[12]||(s[12]=O("img",{class:"m-card-bd-middle-left-line",src:oU,alt:""},null,-1)),s[13]||(s[13]=O("img",{class:"m-card-bd-middle-right-line",src:oU,alt:""},null,-1))],4),O("div",MMe,[av(o.$slots,"default")])],4)],4))}};/**
* @license
* Copyright 2010-2023 Three.js Authors
* SPDX-License-Identifier: MIT
*/const rR="161",X1={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Y1={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},EMe=0,sU=1,PMe=2,_Q=1,RMe=2,Cc=3,Zc=0,rl=1,aa=2,_h=0,Pp=1,Mo=2,lU=3,uU=4,SQ=5,Xd=100,LMe=101,IMe=102,cU=103,dU=104,DMe=200,bQ=201,NMe=202,kMe=203,FC=204,OC=205,FMe=206,OMe=207,xQ=208,BMe=209,zMe=210,GMe=211,UMe=212,VMe=213,HMe=214,WMe=0,jMe=1,$Me=2,D8=3,qMe=4,XMe=5,YMe=6,KMe=7,aR=0,ZMe=1,JMe=2,Sh=0,QMe=1,eEe=2,tEe=3,nEe=4,iEe=5,rEe=6,hU="attached",aEe="detached",wQ=300,xv=301,wv=302,BC=303,zC=304,n7=306,Eo=1e3,us=1001,N8=1002,mo=1003,GC=1004,w2=1005,ao=1006,v5=1007,kc=1008,bh=1009,oEe=1010,sEe=1011,oR=1012,TQ=1013,uh=1014,Nu=1015,K9=1016,AQ=1017,CQ=1018,Rp=1020,lEe=1021,y0=1023,uEe=1024,cEe=1025,Lp=1026,Tv=1027,dEe=1028,MQ=1029,hEe=1030,EQ=1031,PQ=1033,Tw=33776,Aw=33777,Cw=33778,Mw=33779,fU=35840,pU=35841,vU=35842,mU=35843,RQ=36196,gU=37492,yU=37496,_U=37808,SU=37809,bU=37810,xU=37811,wU=37812,TU=37813,AU=37814,CU=37815,MU=37816,EU=37817,PU=37818,RU=37819,LU=37820,IU=37821,Ew=36492,DU=36494,NU=36495,fEe=36283,kU=36284,FU=36285,OU=36286,Z9=2300,Av=2301,Pw=2302,BU=2400,zU=2401,GU=2402,pEe=2500,vEe=0,LQ=1,UC=2,IQ=3e3,Ip=3001,mEe=3200,gEe=3201,sR=0,yEe=1,_0="",$r="srgb",bo="srgb-linear",lR="display-p3",i7="display-p3-linear",k8="linear",ma="srgb",F8="rec709",O8="p3",K1=7680,UU=519,_Ee=512,SEe=513,bEe=514,DQ=515,xEe=516,wEe=517,TEe=518,AEe=519,VC=35044,VU="300 es",HC=1035,Fc=2e3,B8=2001;class s1{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const r=i.slice(0);for(let a=0,o=r.length;a<o;a++)r[a].call(this,e);e.target=null}}}const es=["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 HU=1234567;const t9=Math.PI/180,Cv=180/Math.PI;function T0(){const n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(es[n&255]+es[n>>8&255]+es[n>>16&255]+es[n>>24&255]+"-"+es[e&255]+es[e>>8&255]+"-"+es[e>>16&15|64]+es[e>>24&255]+"-"+es[t&63|128]+es[t>>8&255]+"-"+es[t>>16&255]+es[t>>24&255]+es[i&255]+es[i>>8&255]+es[i>>16&255]+es[i>>24&255]).toLowerCase()}function so(n,e,t){return Math.max(e,Math.min(t,n))}function uR(n,e){return(n%e+e)%e}function CEe(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function MEe(n,e,t){return n!==e?(t-n)/(e-n):0}function n9(n,e,t){return(1-t)*n+t*e}function EEe(n,e,t,i){return n9(n,e,1-Math.exp(-t*i))}function PEe(n,e=1){return e-Math.abs(uR(n,e*2)-e)}function REe(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function LEe(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function IEe(n,e){return n+Math.floor(Math.random()*(e-n+1))}function DEe(n,e){return n+Math.random()*(e-n)}function NEe(n){return n*(.5-Math.random())}function kEe(n){n!==void 0&&(HU=n);let e=HU+=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 FEe(n){return n*t9}function OEe(n){return n*Cv}function WC(n){return(n&n-1)===0&&n!==0}function BEe(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function z8(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function zEe(n,e,t,i,r){const a=Math.cos,o=Math.sin,s=a(t/2),l=o(t/2),u=a((e+i)/2),c=o((e+i)/2),d=a((e-i)/2),h=o((e-i)/2),f=a((i-e)/2),p=o((i-e)/2);switch(r){case"XYX":n.set(s*c,l*d,l*h,s*u);break;case"YZY":n.set(l*h,s*c,l*d,s*u);break;case"ZXZ":n.set(l*d,l*h,s*c,s*u);break;case"XZX":n.set(s*c,l*p,l*f,s*u);break;case"YXY":n.set(l*f,s*c,l*p,s*u);break;case"ZYZ":n.set(l*p,l*f,s*c,s*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function q0(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function Vr(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const cR={DEG2RAD:t9,RAD2DEG:Cv,generateUUID:T0,clamp:so,euclideanModulo:uR,mapLinear:CEe,inverseLerp:MEe,lerp:n9,damp:EEe,pingpong:PEe,smoothstep:REe,smootherstep:LEe,randInt:IEe,randFloat:DEe,randFloatSpread:NEe,seededRandom:kEe,degToRad:FEe,radToDeg:OEe,isPowerOfTwo:WC,ceilPowerOfTwo:BEe,floorPowerOfTwo:z8,setQuaternionFromProperEuler:zEe,normalize:Vr,denormalize:q0};class on{constructor(e=0,t=0){on.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,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[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 i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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 i=this.dot(e)/t;return Math.acos(so(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}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,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,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 i=Math.cos(t),r=Math.sin(t),a=this.x-e.x,o=this.y-e.y;return this.x=a*i-o*r+e.x,this.y=a*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class ar{constructor(e,t,i,r,a,o,s,l,u){ar.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,a,o,s,l,u)}set(e,t,i,r,a,o,s,l,u){const c=this.elements;return c[0]=e,c[1]=r,c[2]=s,c[3]=t,c[4]=a,c[5]=l,c[6]=i,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,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.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 i=e.elements,r=t.elements,a=this.elements,o=i[0],s=i[3],l=i[6],u=i[1],c=i[4],d=i[7],h=i[2],f=i[5],p=i[8],m=r[0],v=r[3],g=r[6],_=r[1],S=r[4],x=r[7],A=r[2],C=r[5],M=r[8];return a[0]=o*m+s*_+l*A,a[3]=o*v+s*S+l*C,a[6]=o*g+s*x+l*M,a[1]=u*m+c*_+d*A,a[4]=u*v+c*S+d*C,a[7]=u*g+c*x+d*M,a[2]=h*m+f*_+p*A,a[5]=h*v+f*S+p*C,a[8]=h*g+f*x+p*M,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],i=e[1],r=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-i*a*c+i*s*l+r*a*u-r*o*l}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=c*o-s*u,h=s*l-c*a,f=u*a-o*l,p=t*d+i*h+r*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const m=1/p;return e[0]=d*m,e[1]=(r*u-c*i)*m,e[2]=(s*i-r*o)*m,e[3]=h*m,e[4]=(c*t-r*l)*m,e[5]=(r*a-s*t)*m,e[6]=f*m,e[7]=(i*l-u*t)*m,e[8]=(o*t-i*a)*m,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,i,r,a,o,s){const l=Math.cos(a),u=Math.sin(a);return this.set(i*l,i*u,-i*(l*o+u*s)+o+e,-r*u,r*l,-r*(-u*o+l*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(Rw.makeScale(e,t)),this}rotate(e){return this.premultiply(Rw.makeRotation(-e)),this}translate(e,t){return this.premultiply(Rw.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),i=Math.sin(e);return this.set(t,-i,0,i,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,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Rw=new ar;function NQ(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function J9(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function GEe(){const n=J9("canvas");return n.style.display="block",n}const WU={};function Dp(n){n in WU||(WU[n]=!0,console.warn(n))}const jU=new ar().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),$U=new ar().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),U6={[bo]:{transfer:k8,primaries:F8,toReference:n=>n,fromReference:n=>n},[$r]:{transfer:ma,primaries:F8,toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[i7]:{transfer:k8,primaries:O8,toReference:n=>n.applyMatrix3($U),fromReference:n=>n.applyMatrix3(jU)},[lR]:{transfer:ma,primaries:O8,toReference:n=>n.convertSRGBToLinear().applyMatrix3($U),fromReference:n=>n.applyMatrix3(jU).convertLinearToSRGB()}},UEe=new Set([bo,i7]),Br={enabled:!0,_workingColorSpace:bo,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!UEe.has(n))throw new Error(`Unsupported working color space, "${n}".`);this._workingColorSpace=n},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const i=U6[e].toReference,r=U6[t].fromReference;return r(i(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this._workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this._workingColorSpace)},getPrimaries:function(n){return U6[n].primaries},getTransfer:function(n){return n===_0?k8:U6[n].transfer}};function Q2(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Lw(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let Z1;class kQ{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement=="undefined")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Z1===void 0&&(Z1=J9("canvas")),Z1.width=e.width,Z1.height=e.height;const i=Z1.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Z1}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=J9("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),a=r.data;for(let o=0;o<a.length;o++)a[o]=Q2(a[o]/255)*255;return i.putImageData(r,0,0),t}else if(e.data){const t=e.data.slice(0);for(let i=0;i<t.length;i++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[i]=Math.floor(Q2(t[i]/255)*255):t[i]=Q2(t[i]);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 VEe=0;class FQ{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:VEe++}),this.uuid=T0(),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 i={uuid:this.uuid,url:""},r=this.data;if(r!==null){let a;if(Array.isArray(r)){a=[];for(let o=0,s=r.length;o<s;o++)r[o].isDataTexture?a.push(Iw(r[o].image)):a.push(Iw(r[o]))}else a=Iw(r);i.url=a}return t||(e.images[this.uuid]=i),i}}function Iw(n){return typeof HTMLImageElement!="undefined"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&n instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&n instanceof ImageBitmap?kQ.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let HEe=0;class yo extends s1{constructor(e=yo.DEFAULT_IMAGE,t=yo.DEFAULT_MAPPING,i=us,r=us,a=ao,o=kc,s=y0,l=bh,u=yo.DEFAULT_ANISOTROPY,c=_0){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:HEe++}),this.uuid=T0(),this.name="",this.source=new FQ(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=i,this.wrapT=r,this.magFilter=a,this.minFilter=o,this.anisotropy=u,this.format=s,this.internalFormat=null,this.type=l,this.offset=new on(0,0),this.repeat=new on(1,1),this.center=new on(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new ar,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,typeof c=="string"?this.colorSpace=c:(Dp("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=c===Ip?$r:_0),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 i={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&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==wQ)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Eo:e.x=e.x-Math.floor(e.x);break;case us:e.x=e.x<0?0:1;break;case N8: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 Eo:e.y=e.y-Math.floor(e.y);break;case us:e.y=e.y<0?0:1;break;case N8: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 Dp("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===$r?Ip:IQ}set encoding(e){Dp("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Ip?$r:_0}}yo.DEFAULT_IMAGE=null;yo.DEFAULT_MAPPING=wQ;yo.DEFAULT_ANISOTROPY=1;class Er{constructor(e=0,t=0,i=0,r=1){Er.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}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,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,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,i=this.y,r=this.z,a=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*a,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*a,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*a,this.w=o[3]*t+o[7]*i+o[11]*r+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,i,r,a;const l=e.elements,u=l[0],c=l[4],d=l[8],h=l[1],f=l[5],p=l[9],m=l[2],v=l[6],g=l[10];if(Math.abs(c-h)<.01&&Math.abs(d-m)<.01&&Math.abs(p-v)<.01){if(Math.abs(c+h)<.1&&Math.abs(d+m)<.1&&Math.abs(p+v)<.1&&Math.abs(u+f+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const S=(u+1)/2,x=(f+1)/2,A=(g+1)/2,C=(c+h)/4,M=(d+m)/4,I=(p+v)/4;return S>x&&S>A?S<.01?(i=0,r=.707106781,a=.707106781):(i=Math.sqrt(S),r=C/i,a=M/i):x>A?x<.01?(i=.707106781,r=0,a=.707106781):(r=Math.sqrt(x),i=C/r,a=I/r):A<.01?(i=.707106781,r=.707106781,a=0):(a=Math.sqrt(A),i=M/a,r=I/a),this.set(i,r,a,t),this}let _=Math.sqrt((v-p)*(v-p)+(d-m)*(d-m)+(h-c)*(h-c));return Math.abs(_)<.001&&(_=1),this.x=(v-p)/_,this.y=(d-m)/_,this.z=(h-c)/_,this.w=Math.acos((u+f+g-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 i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,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 WEe extends s1{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Er(0,0,e,t),this.scissorTest=!1,this.viewport=new Er(0,0,e,t);const r={width:e,height:t,depth:1};i.encoding!==void 0&&(Dp("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===Ip?$r:_0),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ao,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},i),this.texture=new yo(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps,this.texture.internalFormat=i.internalFormat,this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}setSize(e,t,i=1){(this.width!==e||this.height!==t||this.depth!==i)&&(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,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 FQ(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 Hp extends WEe{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class OQ extends yo{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=mo,this.minFilter=mo,this.wrapR=us,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class jEe extends yo{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=mo,this.minFilter=mo,this.wrapR=us,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ru{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,i,r,a,o,s){let l=i[r+0],u=i[r+1],c=i[r+2],d=i[r+3];const h=a[o+0],f=a[o+1],p=a[o+2],m=a[o+3];if(s===0){e[t+0]=l,e[t+1]=u,e[t+2]=c,e[t+3]=d;return}if(s===1){e[t+0]=h,e[t+1]=f,e[t+2]=p,e[t+3]=m;return}if(d!==m||l!==h||u!==f||c!==p){let v=1-s;const g=l*h+u*f+c*p+d*m,_=g>=0?1:-1,S=1-g*g;if(S>Number.EPSILON){const A=Math.sqrt(S),C=Math.atan2(A,g*_);v=Math.sin(v*C)/A,s=Math.sin(s*C)/A}const x=s*_;if(l=l*v+h*x,u=u*v+f*x,c=c*v+p*x,d=d*v+m*x,v===1-s){const A=1/Math.sqrt(l*l+u*u+c*c+d*d);l*=A,u*=A,c*=A,d*=A}}e[t]=l,e[t+1]=u,e[t+2]=c,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,a,o){const s=i[r],l=i[r+1],u=i[r+2],c=i[r+3],d=a[o],h=a[o+1],f=a[o+2],p=a[o+3];return e[t]=s*p+c*d+l*f-u*h,e[t+1]=l*p+c*h+u*d-s*f,e[t+2]=u*p+c*f+s*h-l*d,e[t+3]=c*p-s*d-l*h-u*f,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,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,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 i=e._x,r=e._y,a=e._z,o=e._order,s=Math.cos,l=Math.sin,u=s(i/2),c=s(r/2),d=s(a/2),h=l(i/2),f=l(r/2),p=l(a/2);switch(o){case"XYZ":this._x=h*c*d+u*f*p,this._y=u*f*d-h*c*p,this._z=u*c*p+h*f*d,this._w=u*c*d-h*f*p;break;case"YXZ":this._x=h*c*d+u*f*p,this._y=u*f*d-h*c*p,this._z=u*c*p-h*f*d,this._w=u*c*d+h*f*p;break;case"ZXY":this._x=h*c*d-u*f*p,this._y=u*f*d+h*c*p,this._z=u*c*p+h*f*d,this._w=u*c*d-h*f*p;break;case"ZYX":this._x=h*c*d-u*f*p,this._y=u*f*d+h*c*p,this._z=u*c*p-h*f*d,this._w=u*c*d+h*f*p;break;case"YZX":this._x=h*c*d+u*f*p,this._y=u*f*d+h*c*p,this._z=u*c*p-h*f*d,this._w=u*c*d-h*f*p;break;case"XZY":this._x=h*c*d-u*f*p,this._y=u*f*d-h*c*p,this._z=u*c*p+h*f*d,this._w=u*c*d+h*f*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],a=t[8],o=t[1],s=t[5],l=t[9],u=t[2],c=t[6],d=t[10],h=i+s+d;if(h>0){const f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(c-l)*f,this._y=(a-u)*f,this._z=(o-r)*f}else if(i>s&&i>d){const f=2*Math.sqrt(1+i-s-d);this._w=(c-l)/f,this._x=.25*f,this._y=(r+o)/f,this._z=(a+u)/f}else if(s>d){const f=2*Math.sqrt(1+s-i-d);this._w=(a-u)/f,this._x=(r+o)/f,this._y=.25*f,this._z=(l+c)/f}else{const f=2*Math.sqrt(1+d-i-s);this._w=(o-r)/f,this._x=(a+u)/f,this._y=(l+c)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return i<Number.EPSILON?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(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=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(so(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,t/i);return this.slerp(e,r),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 i=e._x,r=e._y,a=e._z,o=e._w,s=t._x,l=t._y,u=t._z,c=t._w;return this._x=i*c+o*s+r*u-a*l,this._y=r*c+o*l+a*s-i*u,this._z=a*c+o*u+i*l-r*s,this._w=o*c-i*s-r*l-a*u,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,r=this._y,a=this._z,o=this._w;let s=o*e._w+i*e._x+r*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=i,this._y=r,this._z=a,this;const l=1-s*s;if(l<=Number.EPSILON){const f=1-t;return this._w=f*o+t*this._w,this._x=f*i+t*this._x,this._y=f*r+t*this._y,this._z=f*a+t*this._z,this.normalize(),this}const u=Math.sqrt(l),c=Math.atan2(u,s),d=Math.sin((1-t)*c)/u,h=Math.sin(t*c)/u;return this._w=o*d+this._w*h,this._x=i*d+this._x*h,this._y=r*d+this._y*h,this._z=a*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),r=2*Math.PI*Math.random(),a=2*Math.PI*Math.random();return this.set(t*Math.cos(r),i*Math.sin(a),i*Math.cos(a),t*Math.sin(r))}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 Le{constructor(e=0,t=0,i=0){Le.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,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(qU.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(qU.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,a=e.elements;return this.x=a[0]*t+a[3]*i+a[6]*r,this.y=a[1]*t+a[4]*i+a[7]*r,this.z=a[2]*t+a[5]*i+a[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,a=e.elements,o=1/(a[3]*t+a[7]*i+a[11]*r+a[15]);return this.x=(a[0]*t+a[4]*i+a[8]*r+a[12])*o,this.y=(a[1]*t+a[5]*i+a[9]*r+a[13])*o,this.z=(a[2]*t+a[6]*i+a[10]*r+a[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,a=e.x,o=e.y,s=e.z,l=e.w,u=2*(o*r-s*i),c=2*(s*t-a*r),d=2*(a*i-o*t);return this.x=t+l*u+o*d-s*c,this.y=i+l*c+s*u-a*d,this.z=r+l*d+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,i=this.y,r=this.z,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*r,this.y=a[1]*t+a[5]*i+a[9]*r,this.z=a[2]*t+a[6]*i+a[10]*r,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 i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,a=e.z,o=t.x,s=t.y,l=t.z;return this.x=r*l-a*s,this.y=a*o-i*l,this.z=i*s-r*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Dw.copy(this).projectOnVector(e),this.sub(Dw)}reflect(e){return this.sub(Dw.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 i=this.dot(e)/t;return Math.acos(so(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}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,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,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(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,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,i=Math.sqrt(1-xd(e,2));return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Dw=new Le,qU=new ru;class I0{constructor(e=new Le(1/0,1/0,1/0),t=new Le(-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,i=e.length;t<i;t+=3)this.expandByPoint(G0.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(G0.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const i=G0.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),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 i=e.geometry;if(i!==void 0){const a=i.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,G0):G0.fromBufferAttribute(a,o),G0.applyMatrix4(e.matrixWorld),this.expandByPoint(G0);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),V6.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),V6.copy(i.boundingBox)),V6.applyMatrix4(e.matrixWorld),this.union(V6)}const r=e.children;for(let a=0,o=r.length;a<o;a++)this.expandByObject(r[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,G0),G0.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ng),H6.subVectors(this.max,ng),J1.subVectors(e.a,ng),Q1.subVectors(e.b,ng),e2.subVectors(e.c,ng),Dd.subVectors(Q1,J1),Nd.subVectors(e2,Q1),Df.subVectors(J1,e2);let t=[0,-Dd.z,Dd.y,0,-Nd.z,Nd.y,0,-Df.z,Df.y,Dd.z,0,-Dd.x,Nd.z,0,-Nd.x,Df.z,0,-Df.x,-Dd.y,Dd.x,0,-Nd.y,Nd.x,0,-Df.y,Df.x,0];return!Nw(t,J1,Q1,e2,H6)||(t=[1,0,0,0,1,0,0,0,1],!Nw(t,J1,Q1,e2,H6))?!1:(W6.crossVectors(Dd,Nd),t=[W6.x,W6.y,W6.z],Nw(t,J1,Q1,e2,H6))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,G0).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(G0).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:(Sc[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Sc[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Sc[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Sc[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Sc[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Sc[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Sc[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Sc[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Sc),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 Sc=[new Le,new Le,new Le,new Le,new Le,new Le,new Le,new Le],G0=new Le,V6=new I0,J1=new Le,Q1=new Le,e2=new Le,Dd=new Le,Nd=new Le,Df=new Le,ng=new Le,H6=new Le,W6=new Le,Nf=new Le;function Nw(n,e,t,i,r){for(let a=0,o=n.length-3;a<=o;a+=3){Nf.fromArray(n,a);const s=r.x*Math.abs(Nf.x)+r.y*Math.abs(Nf.y)+r.z*Math.abs(Nf.z),l=e.dot(Nf),u=t.dot(Nf),c=i.dot(Nf);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>s)return!1}return!0}const $Ee=new I0,ig=new Le,kw=new Le;class D0{constructor(e=new Le,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 i=this.center;t!==void 0?i.copy(t):$Ee.setFromPoints(e).getCenter(i);let r=0;for(let a=0,o=e.length;a<o;a++)r=Math.max(r,i.distanceToSquared(e[a]));return this.radius=Math.sqrt(r),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 i=this.center.distanceToSquared(e);return t.copy(e),i>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;ig.subVectors(e,this.center);const t=ig.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(ig,r/i),this.radius+=r}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):(kw.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(ig.copy(e.center).add(kw)),this.expandByPoint(ig.copy(e.center).sub(kw))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const bc=new Le,Fw=new Le,j6=new Le,kd=new Le,Ow=new Le,$6=new Le,Bw=new Le;class Qv{constructor(e=new Le,t=new Le(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,bc)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=bc.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(bc.copy(this.origin).addScaledVector(this.direction,t),bc.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){Fw.copy(e).add(t).multiplyScalar(.5),j6.copy(t).sub(e).normalize(),kd.copy(this.origin).sub(Fw);const a=e.distanceTo(t)*.5,o=-this.direction.dot(j6),s=kd.dot(this.direction),l=-kd.dot(j6),u=kd.lengthSq(),c=Math.abs(1-o*o);let d,h,f,p;if(c>0)if(d=o*l-s,h=o*s-l,p=a*c,d>=0)if(h>=-p)if(h<=p){const m=1/c;d*=m,h*=m,f=d*(d+o*h+2*s)+h*(o*d+h+2*l)+u}else h=a,d=Math.max(0,-(o*h+s)),f=-d*d+h*(h+2*l)+u;else h=-a,d=Math.max(0,-(o*h+s)),f=-d*d+h*(h+2*l)+u;else h<=-p?(d=Math.max(0,-(-o*a+s)),h=d>0?-a:Math.min(Math.max(-a,-l),a),f=-d*d+h*(h+2*l)+u):h<=p?(d=0,h=Math.min(Math.max(-a,-l),a),f=h*(h+2*l)+u):(d=Math.max(0,-(o*a+s)),h=d>0?a:Math.min(Math.max(-a,-l),a),f=-d*d+h*(h+2*l)+u);else h=o>0?-a:a,d=Math.max(0,-(o*h+s)),f=-d*d+h*(h+2*l)+u;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(Fw).addScaledVector(j6,h),f}intersectSphere(e,t){bc.subVectors(e.center,this.origin);const i=bc.dot(this.direction),r=bc.dot(bc)-i*i,a=e.radius*e.radius;if(r>a)return null;const o=Math.sqrt(a-r),s=i-o,l=i+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 i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,a,o,s,l;const u=1/this.direction.x,c=1/this.direction.y,d=1/this.direction.z,h=this.origin;return u>=0?(i=(e.min.x-h.x)*u,r=(e.max.x-h.x)*u):(i=(e.max.x-h.x)*u,r=(e.min.x-h.x)*u),c>=0?(a=(e.min.y-h.y)*c,o=(e.max.y-h.y)*c):(a=(e.max.y-h.y)*c,o=(e.min.y-h.y)*c),i>o||a>r||((a>i||isNaN(i))&&(i=a),(o<r||isNaN(r))&&(r=o),d>=0?(s=(e.min.z-h.z)*d,l=(e.max.z-h.z)*d):(s=(e.max.z-h.z)*d,l=(e.min.z-h.z)*d),i>l||s>r)||((s>i||i!==i)&&(i=s),(l<r||r!==r)&&(r=l),r<0)?null:this.at(i>=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,bc)!==null}intersectTriangle(e,t,i,r,a){Ow.subVectors(t,e),$6.subVectors(i,e),Bw.crossVectors(Ow,$6);let o=this.direction.dot(Bw),s;if(o>0){if(r)return null;s=1}else if(o<0)s=-1,o=-o;else return null;kd.subVectors(this.origin,e);const l=s*this.direction.dot($6.crossVectors(kd,$6));if(l<0)return null;const u=s*this.direction.dot(Ow.cross(kd));if(u<0||l+u>o)return null;const c=-s*kd.dot(Bw);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 Bi{constructor(e,t,i,r,a,o,s,l,u,c,d,h,f,p,m,v){Bi.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,i,r,a,o,s,l,u,c,d,h,f,p,m,v)}set(e,t,i,r,a,o,s,l,u,c,d,h,f,p,m,v){const g=this.elements;return g[0]=e,g[4]=t,g[8]=i,g[12]=r,g[1]=a,g[5]=o,g[9]=s,g[13]=l,g[2]=u,g[6]=c,g[10]=d,g[14]=h,g[3]=f,g[7]=p,g[11]=m,g[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 Bi().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[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,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/t2.setFromMatrixColumn(e,0).length(),a=1/t2.setFromMatrixColumn(e,1).length(),o=1/t2.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*a,t[5]=i[5]*a,t[6]=i[6]*a,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,r=e.y,a=e.z,o=Math.cos(i),s=Math.sin(i),l=Math.cos(r),u=Math.sin(r),c=Math.cos(a),d=Math.sin(a);if(e.order==="XYZ"){const h=o*c,f=o*d,p=s*c,m=s*d;t[0]=l*c,t[4]=-l*d,t[8]=u,t[1]=f+p*u,t[5]=h-m*u,t[9]=-s*l,t[2]=m-h*u,t[6]=p+f*u,t[10]=o*l}else if(e.order==="YXZ"){const h=l*c,f=l*d,p=u*c,m=u*d;t[0]=h+m*s,t[4]=p*s-f,t[8]=o*u,t[1]=o*d,t[5]=o*c,t[9]=-s,t[2]=f*s-p,t[6]=m+h*s,t[10]=o*l}else if(e.order==="ZXY"){const h=l*c,f=l*d,p=u*c,m=u*d;t[0]=h-m*s,t[4]=-o*d,t[8]=p+f*s,t[1]=f+p*s,t[5]=o*c,t[9]=m-h*s,t[2]=-o*u,t[6]=s,t[10]=o*l}else if(e.order==="ZYX"){const h=o*c,f=o*d,p=s*c,m=s*d;t[0]=l*c,t[4]=p*u-f,t[8]=h*u+m,t[1]=l*d,t[5]=m*u+h,t[9]=f*u-p,t[2]=-u,t[6]=s*l,t[10]=o*l}else if(e.order==="YZX"){const h=o*l,f=o*u,p=s*l,m=s*u;t[0]=l*c,t[4]=m-h*d,t[8]=p*d+f,t[1]=d,t[5]=o*c,t[9]=-s*c,t[2]=-u*c,t[6]=f*d+p,t[10]=h-m*d}else if(e.order==="XZY"){const h=o*l,f=o*u,p=s*l,m=s*u;t[0]=l*c,t[4]=-d,t[8]=u*c,t[1]=h*d+m,t[5]=o*c,t[9]=f*d-p,t[2]=p*d-f,t[6]=s*c,t[10]=m*d+h}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(qEe,e,XEe)}lookAt(e,t,i){const r=this.elements;return bl.subVectors(e,t),bl.lengthSq()===0&&(bl.z=1),bl.normalize(),Fd.crossVectors(i,bl),Fd.lengthSq()===0&&(Math.abs(i.z)===1?bl.x+=1e-4:bl.z+=1e-4,bl.normalize(),Fd.crossVectors(i,bl)),Fd.normalize(),q6.crossVectors(bl,Fd),r[0]=Fd.x,r[4]=q6.x,r[8]=bl.x,r[1]=Fd.y,r[5]=q6.y,r[9]=bl.y,r[2]=Fd.z,r[6]=q6.z,r[10]=bl.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,a=this.elements,o=i[0],s=i[4],l=i[8],u=i[12],c=i[1],d=i[5],h=i[9],f=i[13],p=i[2],m=i[6],v=i[10],g=i[14],_=i[3],S=i[7],x=i[11],A=i[15],C=r[0],M=r[4],I=r[8],D=r[12],E=r[1],P=r[5],F=r[9],V=r[13],G=r[2],W=r[6],Y=r[10],Q=r[14],K=r[3],ae=r[7],ie=r[11],he=r[15];return a[0]=o*C+s*E+l*G+u*K,a[4]=o*M+s*P+l*W+u*ae,a[8]=o*I+s*F+l*Y+u*ie,a[12]=o*D+s*V+l*Q+u*he,a[1]=c*C+d*E+h*G+f*K,a[5]=c*M+d*P+h*W+f*ae,a[9]=c*I+d*F+h*Y+f*ie,a[13]=c*D+d*V+h*Q+f*he,a[2]=p*C+m*E+v*G+g*K,a[6]=p*M+m*P+v*W+g*ae,a[10]=p*I+m*F+v*Y+g*ie,a[14]=p*D+m*V+v*Q+g*he,a[3]=_*C+S*E+x*G+A*K,a[7]=_*M+S*P+x*W+A*ae,a[11]=_*I+S*F+x*Y+A*ie,a[15]=_*D+S*V+x*Q+A*he,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],i=e[4],r=e[8],a=e[12],o=e[1],s=e[5],l=e[9],u=e[13],c=e[2],d=e[6],h=e[10],f=e[14],p=e[3],m=e[7],v=e[11],g=e[15];return p*(+a*l*d-r*u*d-a*s*h+i*u*h+r*s*f-i*l*f)+m*(+t*l*f-t*u*h+a*o*h-r*o*f+r*u*c-a*l*c)+v*(+t*u*d-t*s*f-a*o*d+i*o*f+a*s*c-i*u*c)+g*(-r*s*c-t*l*d+t*s*h+r*o*d-i*o*h+i*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,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=e[9],h=e[10],f=e[11],p=e[12],m=e[13],v=e[14],g=e[15],_=d*v*u-m*h*u+m*l*f-s*v*f-d*l*g+s*h*g,S=p*h*u-c*v*u-p*l*f+o*v*f+c*l*g-o*h*g,x=c*m*u-p*d*u+p*s*f-o*m*f-c*s*g+o*d*g,A=p*d*l-c*m*l-p*s*h+o*m*h+c*s*v-o*d*v,C=t*_+i*S+r*x+a*A;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const M=1/C;return e[0]=_*M,e[1]=(m*h*a-d*v*a-m*r*f+i*v*f+d*r*g-i*h*g)*M,e[2]=(s*v*a-m*l*a+m*r*u-i*v*u-s*r*g+i*l*g)*M,e[3]=(d*l*a-s*h*a-d*r*u+i*h*u+s*r*f-i*l*f)*M,e[4]=S*M,e[5]=(c*v*a-p*h*a+p*r*f-t*v*f-c*r*g+t*h*g)*M,e[6]=(p*l*a-o*v*a-p*r*u+t*v*u+o*r*g-t*l*g)*M,e[7]=(o*h*a-c*l*a+c*r*u-t*h*u-o*r*f+t*l*f)*M,e[8]=x*M,e[9]=(p*d*a-c*m*a-p*i*f+t*m*f+c*i*g-t*d*g)*M,e[10]=(o*m*a-p*s*a+p*i*u-t*m*u-o*i*g+t*s*g)*M,e[11]=(c*s*a-o*d*a-c*i*u+t*d*u+o*i*f-t*s*f)*M,e[12]=A*M,e[13]=(c*m*r-p*d*r+p*i*h-t*m*h-c*i*v+t*d*v)*M,e[14]=(p*s*r-o*m*r-p*i*l+t*m*l+o*i*v-t*s*v)*M,e[15]=(o*d*r-c*s*r+c*i*l-t*d*l-o*i*h+t*s*h)*M,this}scale(e){const t=this.elements,i=e.x,r=e.y,a=e.z;return t[0]*=i,t[4]*=r,t[8]*=a,t[1]*=i,t[5]*=r,t[9]*=a,t[2]*=i,t[6]*=r,t[10]*=a,t[3]*=i,t[7]*=r,t[11]*=a,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){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,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),a=1-i,o=e.x,s=e.y,l=e.z,u=a*o,c=a*s;return this.set(u*o+i,u*s-r*l,u*l+r*s,0,u*s+r*l,c*s+i,c*l-r*o,0,u*l-r*s,c*l+r*o,a*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,a,o){return this.set(1,i,a,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,a=t._x,o=t._y,s=t._z,l=t._w,u=a+a,c=o+o,d=s+s,h=a*u,f=a*c,p=a*d,m=o*c,v=o*d,g=s*d,_=l*u,S=l*c,x=l*d,A=i.x,C=i.y,M=i.z;return r[0]=(1-(m+g))*A,r[1]=(f+x)*A,r[2]=(p-S)*A,r[3]=0,r[4]=(f-x)*C,r[5]=(1-(h+g))*C,r[6]=(v+_)*C,r[7]=0,r[8]=(p+S)*M,r[9]=(v-_)*M,r[10]=(1-(h+m))*M,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let a=t2.set(r[0],r[1],r[2]).length();const o=t2.set(r[4],r[5],r[6]).length(),s=t2.set(r[8],r[9],r[10]).length();this.determinant()<0&&(a=-a),e.x=r[12],e.y=r[13],e.z=r[14],U0.copy(this);const u=1/a,c=1/o,d=1/s;return U0.elements[0]*=u,U0.elements[1]*=u,U0.elements[2]*=u,U0.elements[4]*=c,U0.elements[5]*=c,U0.elements[6]*=c,U0.elements[8]*=d,U0.elements[9]*=d,U0.elements[10]*=d,t.setFromRotationMatrix(U0),i.x=a,i.y=o,i.z=s,this}makePerspective(e,t,i,r,a,o,s=Fc){const l=this.elements,u=2*a/(t-e),c=2*a/(i-r),d=(t+e)/(t-e),h=(i+r)/(i-r);let f,p;if(s===Fc)f=-(o+a)/(o-a),p=-2*o*a/(o-a);else if(s===B8)f=-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]=d,l[12]=0,l[1]=0,l[5]=c,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=f,l[14]=p,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,r,a,o,s=Fc){const l=this.elements,u=1/(t-e),c=1/(i-r),d=1/(o-a),h=(t+e)*u,f=(i+r)*c;let p,m;if(s===Fc)p=(o+a)*d,m=-2*d;else if(s===B8)p=a*d,m=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return l[0]=2*u,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*c,l[9]=0,l[13]=-f,l[2]=0,l[6]=0,l[10]=m,l[14]=-p,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const t2=new Le,U0=new Bi,qEe=new Le(0,0,0),XEe=new Le(1,1,1),Fd=new Le,q6=new Le,bl=new Le,XU=new Bi,YU=new ru;class r7{constructor(e=0,t=0,i=0,r=r7.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=r}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,i,r=this._order){return this._x=e,this._y=t,this._z=i,this._order=r,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,i=!0){const r=e.elements,a=r[0],o=r[4],s=r[8],l=r[1],u=r[5],c=r[9],d=r[2],h=r[6],f=r[10];switch(t){case"XYZ":this._y=Math.asin(so(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,f),this._z=Math.atan2(-o,a)):(this._x=Math.atan2(h,u),this._z=0);break;case"YXZ":this._x=Math.asin(-so(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(s,f),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-d,a),this._z=0);break;case"ZXY":this._x=Math.asin(so(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-d,f),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(l,a));break;case"ZYX":this._y=Math.asin(-so(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(h,f),this._z=Math.atan2(l,a)):(this._x=0,this._z=Math.atan2(-o,u));break;case"YZX":this._z=Math.asin(so(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-d,a)):(this._x=0,this._y=Math.atan2(s,f));break;case"XZY":this._z=Math.asin(-so(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,u),this._y=Math.atan2(s,a)):(this._x=Math.atan2(-c,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return XU.makeRotationFromQuaternion(e),this.setFromRotationMatrix(XU,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return YU.setFromEuler(this),this.setFromQuaternion(YU,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}}r7.DEFAULT_ORDER="XYZ";class dR{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 YEe=0;const KU=new Le,n2=new ru,xc=new Bi,X6=new Le,rg=new Le,KEe=new Le,ZEe=new ru,ZU=new Le(1,0,0),JU=new Le(0,1,0),QU=new Le(0,0,1),JEe={type:"added"},QEe={type:"removed"};class la extends s1{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:YEe++}),this.uuid=T0(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=la.DEFAULT_UP.clone();const e=new Le,t=new r7,i=new ru,r=new Le(1,1,1);function a(){i.setFromEuler(t,!1)}function o(){t.setFromQuaternion(i,void 0,!1)}t._onChange(a),i._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:i},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new Bi},normalMatrix:{value:new ar}}),this.matrix=new Bi,this.matrixWorld=new Bi,this.matrixAutoUpdate=la.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=la.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new dR,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 n2.setFromAxisAngle(e,t),this.quaternion.multiply(n2),this}rotateOnWorldAxis(e,t){return n2.setFromAxisAngle(e,t),this.quaternion.premultiply(n2),this}rotateX(e){return this.rotateOnAxis(ZU,e)}rotateY(e){return this.rotateOnAxis(JU,e)}rotateZ(e){return this.rotateOnAxis(QU,e)}translateOnAxis(e,t){return KU.copy(e).applyQuaternion(this.quaternion),this.position.add(KU.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(ZU,e)}translateY(e){return this.translateOnAxis(JU,e)}translateZ(e){return this.translateOnAxis(QU,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(xc.copy(this.matrixWorld).invert())}lookAt(e,t,i){e.isVector3?X6.copy(e):X6.set(e,t,i);const r=this.parent;this.updateWorldMatrix(!0,!1),rg.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?xc.lookAt(rg,X6,this.up):xc.lookAt(X6,rg,this.up),this.quaternion.setFromRotationMatrix(xc),r&&(xc.extractRotation(r.matrixWorld),n2.setFromRotationMatrix(xc),this.quaternion.premultiply(n2.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(JEe)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(QEe)),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),xc.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),xc.multiply(e.parent.matrixWorld)),e.applyMatrix4(xc),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 i=0,r=this.children.length;i<r;i++){const o=this.children[i].getObjectByProperty(e,t);if(o!==void 0)return o}}getObjectsByProperty(e,t,i=[]){this[e]===t&&i.push(this);const r=this.children;for(let a=0,o=r.length;a<o;a++)r[a].getObjectsByProperty(e,t,i);return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(rg,e,KEe),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(rg,ZEe,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 i=0,r=t.length;i<r;i++)t[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let i=0,r=t.length;i<r;i++)t[i].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 i=0,r=t.length;i<r;i++){const a=t[i];(a.matrixWorldAutoUpdate===!0||e===!0)&&a.updateMatrixWorld(e)}}updateWorldMatrix(e,t){const i=this.parent;if(e===!0&&i!==null&&i.matrixWorldAutoUpdate===!0&&i.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 r=this.children;for(let a=0,o=r.length;a<o;a++){const s=r[a];s.matrixWorldAutoUpdate===!0&&s.updateWorldMatrix(!1,!0)}}}toJSON(e){const t=e===void 0||typeof e=="string",i={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const r={};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.visibility=this._visibility,r.active=this._active,r.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()})),r.maxGeometryCount=this._maxGeometryCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boundingSphere.radius}),this.boundingBox!==null&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.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?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.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 d=l[u];a(e.shapes,d)}else a(e.shapes,l)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(a(e.skeletons,this.skeleton),r.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]));r.material=s}else r.material=a(e.materials,this.material);if(this.children.length>0){r.children=[];for(let s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let s=0;s<this.animations.length;s++){const l=this.animations[s];r.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),d=o(e.shapes),h=o(e.skeletons),f=o(e.animations),p=o(e.nodes);s.length>0&&(i.geometries=s),l.length>0&&(i.materials=l),u.length>0&&(i.textures=u),c.length>0&&(i.images=c),d.length>0&&(i.shapes=d),h.length>0&&(i.skeletons=h),f.length>0&&(i.animations=f),p.length>0&&(i.nodes=p)}return i.object=r,i;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 i=0;i<e.children.length;i++){const r=e.children[i];this.add(r.clone())}return this}}la.DEFAULT_UP=new Le(0,1,0);la.DEFAULT_MATRIX_AUTO_UPDATE=!0;la.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const V0=new Le,wc=new Le,zw=new Le,Tc=new Le,i2=new Le,r2=new Le,eV=new Le,Gw=new Le,Uw=new Le,Vw=new Le;class X0{constructor(e=new Le,t=new Le,i=new Le){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,r){r.subVectors(i,t),V0.subVectors(e,t),r.cross(V0);const a=r.lengthSq();return a>0?r.multiplyScalar(1/Math.sqrt(a)):r.set(0,0,0)}static getBarycoord(e,t,i,r,a){V0.subVectors(r,t),wc.subVectors(i,t),zw.subVectors(e,t);const o=V0.dot(V0),s=V0.dot(wc),l=V0.dot(zw),u=wc.dot(wc),c=wc.dot(zw),d=o*u-s*s;if(d===0)return a.set(0,0,0),null;const h=1/d,f=(u*l-s*c)*h,p=(o*c-s*l)*h;return a.set(1-f-p,p,f)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,Tc)===null?!1:Tc.x>=0&&Tc.y>=0&&Tc.x+Tc.y<=1}static getInterpolation(e,t,i,r,a,o,s,l){return this.getBarycoord(e,t,i,r,Tc)===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,Tc.x),l.addScaledVector(o,Tc.y),l.addScaledVector(s,Tc.z),l)}static isFrontFacing(e,t,i,r){return V0.subVectors(i,t),wc.subVectors(e,t),V0.cross(wc).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),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 V0.subVectors(this.c,this.b),wc.subVectors(this.a,this.b),V0.cross(wc).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return X0.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return X0.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,a){return X0.getInterpolation(e,this.a,this.b,this.c,t,i,r,a)}containsPoint(e){return X0.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return X0.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,a=this.c;let o,s;i2.subVectors(r,i),r2.subVectors(a,i),Gw.subVectors(e,i);const l=i2.dot(Gw),u=r2.dot(Gw);if(l<=0&&u<=0)return t.copy(i);Uw.subVectors(e,r);const c=i2.dot(Uw),d=r2.dot(Uw);if(c>=0&&d<=c)return t.copy(r);const h=l*d-c*u;if(h<=0&&l>=0&&c<=0)return o=l/(l-c),t.copy(i).addScaledVector(i2,o);Vw.subVectors(e,a);const f=i2.dot(Vw),p=r2.dot(Vw);if(p>=0&&f<=p)return t.copy(a);const m=f*u-l*p;if(m<=0&&u>=0&&p<=0)return s=u/(u-p),t.copy(i).addScaledVector(r2,s);const v=c*p-f*d;if(v<=0&&d-c>=0&&f-p>=0)return eV.subVectors(a,r),s=(d-c)/(d-c+(f-p)),t.copy(r).addScaledVector(eV,s);const g=1/(v+m+h);return o=m*g,s=h*g,t.copy(i).addScaledVector(i2,o).addScaledVector(r2,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const BQ={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},Od={h:0,s:0,l:0},Y6={h:0,s:0,l:0};function Hw(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Jn{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=$r){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Br.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=Br.workingColorSpace){return this.r=e,this.g=t,this.b=i,Br.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=Br.workingColorSpace){if(e=uR(e,1),t=so(t,0,1),i=so(i,0,1),t===0)this.r=this.g=this.b=i;else{const a=i<=.5?i*(1+t):i+t-i*t,o=2*i-a;this.r=Hw(o,a,e+1/3),this.g=Hw(o,a,e),this.b=Hw(o,a,e-1/3)}return Br.toWorkingColorSpace(this,r),this}setStyle(e,t=$r){function i(a){a!==void 0&&parseFloat(a)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let a;const o=r[1],s=r[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 i(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 i(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 i(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(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const a=r[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=$r){const i=BQ[e.toLowerCase()];return i!==void 0?this.setHex(i,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=Q2(e.r),this.g=Q2(e.g),this.b=Q2(e.b),this}copyLinearToSRGB(e){return this.r=Lw(e.r),this.g=Lw(e.g),this.b=Lw(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=$r){return Br.fromWorkingColorSpace(ts.copy(this),e),Math.round(so(ts.r*255,0,255))*65536+Math.round(so(ts.g*255,0,255))*256+Math.round(so(ts.b*255,0,255))}getHexString(e=$r){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Br.workingColorSpace){Br.fromWorkingColorSpace(ts.copy(this),t);const i=ts.r,r=ts.g,a=ts.b,o=Math.max(i,r,a),s=Math.min(i,r,a);let l,u;const c=(s+o)/2;if(s===o)l=0,u=0;else{const d=o-s;switch(u=c<=.5?d/(o+s):d/(2-o-s),o){case i:l=(r-a)/d+(r<a?6:0);break;case r:l=(a-i)/d+2;break;case a:l=(i-r)/d+4;break}l/=6}return e.h=l,e.s=u,e.l=c,e}getRGB(e,t=Br.workingColorSpace){return Br.fromWorkingColorSpace(ts.copy(this),t),e.r=ts.r,e.g=ts.g,e.b=ts.b,e}getStyle(e=$r){Br.fromWorkingColorSpace(ts.copy(this),e);const t=ts.r,i=ts.g,r=ts.b;return e!==$r?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(r*255)})`}offsetHSL(e,t,i){return this.getHSL(Od),this.setHSL(Od.h+e,Od.s+t,Od.l+i)}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,i){return this.r=e.r+(t.r-e.r)*i,this.g=e.g+(t.g-e.g)*i,this.b=e.b+(t.b-e.b)*i,this}lerpHSL(e,t){this.getHSL(Od),e.getHSL(Y6);const i=n9(Od.h,Y6.h,t),r=n9(Od.s,Y6.s,t),a=n9(Od.l,Y6.l,t);return this.setHSL(i,r,a),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,i=this.g,r=this.b,a=e.elements;return this.r=a[0]*t+a[3]*i+a[6]*r,this.g=a[1]*t+a[4]*i+a[7]*r,this.b=a[2]*t+a[5]*i+a[8]*r,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 ts=new Jn;Jn.NAMES=BQ;let ePe=0;class A0 extends s1{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:ePe++}),this.uuid=T0(),this.name="",this.type="Material",this.blending=Pp,this.side=Zc,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=FC,this.blendDst=OC,this.blendEquation=Xd,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Jn(0,0,0),this.blendAlpha=0,this.depthFunc=D8,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=UU,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=K1,this.stencilZFail=K1,this.stencilZPass=K1,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 i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Pp&&(i.blending=this.blending),this.side!==Zc&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==FC&&(i.blendSrc=this.blendSrc),this.blendDst!==OC&&(i.blendDst=this.blendDst),this.blendEquation!==Xd&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==D8&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==UU&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==K1&&(i.stencilFail=this.stencilFail),this.stencilZFail!==K1&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==K1&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(a){const o=[];for(const s in a){const l=a[s];delete l.metadata,o.push(l)}return o}if(t){const a=r(e.textures),o=r(e.images);a.length>0&&(i.textures=a),o.length>0&&(i.images=o)}return i}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 i=null;if(t!==null){const r=t.length;i=new Array(r);for(let a=0;a!==r;++a)i[a]=t[a].clone()}return this.clippingPlanes=i,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 Mr extends A0{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Jn(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=aR,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 eo=new Le,K6=new on;class La{constructor(e,t,i=!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=i,this.usage=VC,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Nu,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return Dp("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,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,a=this.itemSize;r<a;r++)this.array[e+r]=t.array[i+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,i=this.count;t<i;t++)K6.fromBufferAttribute(this,t),K6.applyMatrix3(e),this.setXY(t,K6.x,K6.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)eo.fromBufferAttribute(this,t),eo.applyMatrix3(e),this.setXYZ(t,eo.x,eo.y,eo.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)eo.fromBufferAttribute(this,t),eo.applyMatrix4(e),this.setXYZ(t,eo.x,eo.y,eo.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)eo.fromBufferAttribute(this,t),eo.applyNormalMatrix(e),this.setXYZ(t,eo.x,eo.y,eo.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)eo.fromBufferAttribute(this,t),eo.transformDirection(e),this.setXYZ(t,eo.x,eo.y,eo.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let i=this.array[e*this.itemSize+t];return this.normalized&&(i=q0(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=Vr(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=q0(t,this.array)),t}setX(e,t){return this.normalized&&(t=Vr(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=q0(t,this.array)),t}setY(e,t){return this.normalized&&(t=Vr(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=q0(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Vr(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=q0(t,this.array)),t}setW(e,t){return this.normalized&&(t=Vr(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=Vr(t,this.array),i=Vr(i,this.array)),this.array[e+0]=t,this.array[e+1]=i,this}setXYZ(e,t,i,r){return e*=this.itemSize,this.normalized&&(t=Vr(t,this.array),i=Vr(i,this.array),r=Vr(r,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this}setXYZW(e,t,i,r,a){return e*=this.itemSize,this.normalized&&(t=Vr(t,this.array),i=Vr(i,this.array),r=Vr(r,this.array),a=Vr(a,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,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!==VC&&(e.usage=this.usage),e}}class zQ extends La{constructor(e,t,i){super(new Uint16Array(e),t,i)}}class GQ extends La{constructor(e,t,i){super(new Uint32Array(e),t,i)}}class ga extends La{constructor(e,t,i){super(new Float32Array(e),t,i)}}let tPe=0;const Ql=new Bi,Ww=new la,a2=new Le,xl=new I0,ag=new I0,Co=new Le;class Qr extends s1{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:tPe++}),this.uuid=T0(),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(NQ(e)?GQ:zQ)(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,i=0){this.groups.push({start:e,count:t,materialIndex:i})}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 i=this.attributes.normal;if(i!==void 0){const a=new ar().getNormalMatrix(e);i.applyNormalMatrix(a),i.needsUpdate=!0}const r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return Ql.makeRotationFromQuaternion(e),this.applyMatrix4(Ql),this}rotateX(e){return Ql.makeRotationX(e),this.applyMatrix4(Ql),this}rotateY(e){return Ql.makeRotationY(e),this.applyMatrix4(Ql),this}rotateZ(e){return Ql.makeRotationZ(e),this.applyMatrix4(Ql),this}translate(e,t,i){return Ql.makeTranslation(e,t,i),this.applyMatrix4(Ql),this}scale(e,t,i){return Ql.makeScale(e,t,i),this.applyMatrix4(Ql),this}lookAt(e){return Ww.lookAt(e),Ww.updateMatrix(),this.applyMatrix4(Ww.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(a2).negate(),this.translate(a2.x,a2.y,a2.z),this}setFromPoints(e){const t=[];for(let i=0,r=e.length;i<r;i++){const a=e[i];t.push(a.x,a.y,a.z||0)}return this.setAttribute("position",new ga(t,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new I0);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 Le(-1/0,-1/0,-1/0),new Le(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,r=t.length;i<r;i++){const a=t[i];xl.setFromBufferAttribute(a),this.morphTargetsRelative?(Co.addVectors(this.boundingBox.min,xl.min),this.boundingBox.expandByPoint(Co),Co.addVectors(this.boundingBox.max,xl.max),this.boundingBox.expandByPoint(Co)):(this.boundingBox.expandByPoint(xl.min),this.boundingBox.expandByPoint(xl.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 D0);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 Le,1/0);return}if(e){const i=this.boundingSphere.center;if(xl.setFromBufferAttribute(e),t)for(let a=0,o=t.length;a<o;a++){const s=t[a];ag.setFromBufferAttribute(s),this.morphTargetsRelative?(Co.addVectors(xl.min,ag.min),xl.expandByPoint(Co),Co.addVectors(xl.max,ag.max),xl.expandByPoint(Co)):(xl.expandByPoint(ag.min),xl.expandByPoint(ag.max))}xl.getCenter(i);let r=0;for(let a=0,o=e.count;a<o;a++)Co.fromBufferAttribute(e,a),r=Math.max(r,i.distanceToSquared(Co));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++)Co.fromBufferAttribute(s,u),l&&(a2.fromBufferAttribute(e,u),Co.add(a2)),r=Math.max(r,i.distanceToSquared(Co))}this.boundingSphere.radius=Math.sqrt(r),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 i=e.array,r=t.position.array,a=t.normal.array,o=t.uv.array,s=r.length/3;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new La(new Float32Array(4*s),4));const l=this.getAttribute("tangent").array,u=[],c=[];for(let E=0;E<s;E++)u[E]=new Le,c[E]=new Le;const d=new Le,h=new Le,f=new Le,p=new on,m=new on,v=new on,g=new Le,_=new Le;function S(E,P,F){d.fromArray(r,E*3),h.fromArray(r,P*3),f.fromArray(r,F*3),p.fromArray(o,E*2),m.fromArray(o,P*2),v.fromArray(o,F*2),h.sub(d),f.sub(d),m.sub(p),v.sub(p);const V=1/(m.x*v.y-v.x*m.y);isFinite(V)&&(g.copy(h).multiplyScalar(v.y).addScaledVector(f,-m.y).multiplyScalar(V),_.copy(f).multiplyScalar(m.x).addScaledVector(h,-v.x).multiplyScalar(V),u[E].add(g),u[P].add(g),u[F].add(g),c[E].add(_),c[P].add(_),c[F].add(_))}let x=this.groups;x.length===0&&(x=[{start:0,count:i.length}]);for(let E=0,P=x.length;E<P;++E){const F=x[E],V=F.start,G=F.count;for(let W=V,Y=V+G;W<Y;W+=3)S(i[W+0],i[W+1],i[W+2])}const A=new Le,C=new Le,M=new Le,I=new Le;function D(E){M.fromArray(a,E*3),I.copy(M);const P=u[E];A.copy(P),A.sub(M.multiplyScalar(M.dot(P))).normalize(),C.crossVectors(I,P);const V=C.dot(c[E])<0?-1:1;l[E*4]=A.x,l[E*4+1]=A.y,l[E*4+2]=A.z,l[E*4+3]=V}for(let E=0,P=x.length;E<P;++E){const F=x[E],V=F.start,G=F.count;for(let W=V,Y=V+G;W<Y;W+=3)D(i[W+0]),D(i[W+1]),D(i[W+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new La(new Float32Array(t.count*3),3),this.setAttribute("normal",i);else for(let h=0,f=i.count;h<f;h++)i.setXYZ(h,0,0,0);const r=new Le,a=new Le,o=new Le,s=new Le,l=new Le,u=new Le,c=new Le,d=new Le;if(e)for(let h=0,f=e.count;h<f;h+=3){const p=e.getX(h+0),m=e.getX(h+1),v=e.getX(h+2);r.fromBufferAttribute(t,p),a.fromBufferAttribute(t,m),o.fromBufferAttribute(t,v),c.subVectors(o,a),d.subVectors(r,a),c.cross(d),s.fromBufferAttribute(i,p),l.fromBufferAttribute(i,m),u.fromBufferAttribute(i,v),s.add(c),l.add(c),u.add(c),i.setXYZ(p,s.x,s.y,s.z),i.setXYZ(m,l.x,l.y,l.z),i.setXYZ(v,u.x,u.y,u.z)}else for(let h=0,f=t.count;h<f;h+=3)r.fromBufferAttribute(t,h+0),a.fromBufferAttribute(t,h+1),o.fromBufferAttribute(t,h+2),c.subVectors(o,a),d.subVectors(r,a),c.cross(d),i.setXYZ(h+0,c.x,c.y,c.z),i.setXYZ(h+1,c.x,c.y,c.z),i.setXYZ(h+2,c.x,c.y,c.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,i=e.count;t<i;t++)Co.fromBufferAttribute(e,t),Co.normalize(),e.setXYZ(t,Co.x,Co.y,Co.z)}toNonIndexed(){function e(s,l){const u=s.array,c=s.itemSize,d=s.normalized,h=new u.constructor(l.length*c);let f=0,p=0;for(let m=0,v=l.length;m<v;m++){s.isInterleavedBufferAttribute?f=l[m]*s.data.stride+s.offset:f=l[m]*c;for(let g=0;g<c;g++)h[p++]=u[f++]}return new La(h,c,d)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Qr,i=this.index.array,r=this.attributes;for(const s in r){const l=r[s],u=e(l,i);t.setAttribute(s,u)}const a=this.morphAttributes;for(const s in a){const l=[],u=a[s];for(let c=0,d=u.length;c<d;c++){const h=u[c],f=e(h,i);l.push(f)}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 i=this.attributes;for(const l in i){const u=i[l];e.data.attributes[l]=u.toJSON(e.data)}const r={};let a=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],c=[];for(let d=0,h=u.length;d<h;d++){const f=u[d];c.push(f.toJSON(e.data))}c.length>0&&(r[l]=c,a=!0)}a&&(e.data.morphAttributes=r,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 i=e.index;i!==null&&this.setIndex(i.clone(t));const r=e.attributes;for(const u in r){const c=r[u];this.setAttribute(u,c.clone(t))}const a=e.morphAttributes;for(const u in a){const c=[],d=a[u];for(let h=0,f=d.length;h<f;h++)c.push(d[h].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 d=o[u];this.addGroup(d.start,d.count,d.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 tV=new Bi,kf=new Qv,Z6=new D0,nV=new Le,o2=new Le,s2=new Le,l2=new Le,jw=new Le,J6=new Le,Q6=new on,e4=new on,t4=new on,iV=new Le,rV=new Le,aV=new Le,n4=new Le,i4=new Le;class fr extends la{constructor(e=new Qr,t=new Mr){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,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=r.length;a<o;a++){const s=r[a].name||String(a);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=a}}}}getVertexPosition(e,t){const i=this.geometry,r=i.attributes.position,a=i.morphAttributes.position,o=i.morphTargetsRelative;t.fromBufferAttribute(r,e);const s=this.morphTargetInfluences;if(a&&s){J6.set(0,0,0);for(let l=0,u=a.length;l<u;l++){const c=s[l],d=a[l];c!==0&&(jw.fromBufferAttribute(d,e),o?J6.addScaledVector(jw,c):J6.addScaledVector(jw.sub(t),c))}t.add(J6)}return t}raycast(e,t){const i=this.geometry,r=this.material,a=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),Z6.copy(i.boundingSphere),Z6.applyMatrix4(a),kf.copy(e.ray).recast(e.near),!(Z6.containsPoint(kf.origin)===!1&&(kf.intersectSphere(Z6,nV)===null||kf.origin.distanceToSquared(nV)>xd(e.far-e.near,2)))&&(tV.copy(a).invert(),kf.copy(e.ray).applyMatrix4(tV),!(i.boundingBox!==null&&kf.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,kf)))}_computeIntersections(e,t,i){let r;const a=this.geometry,o=this.material,s=a.index,l=a.attributes.position,u=a.attributes.uv,c=a.attributes.uv1,d=a.attributes.normal,h=a.groups,f=a.drawRange;if(s!==null)if(Array.isArray(o))for(let p=0,m=h.length;p<m;p++){const v=h[p],g=o[v.materialIndex],_=Math.max(v.start,f.start),S=Math.min(s.count,Math.min(v.start+v.count,f.start+f.count));for(let x=_,A=S;x<A;x+=3){const C=s.getX(x),M=s.getX(x+1),I=s.getX(x+2);r=r4(this,g,e,i,u,c,d,C,M,I),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=v.materialIndex,t.push(r))}}else{const p=Math.max(0,f.start),m=Math.min(s.count,f.start+f.count);for(let v=p,g=m;v<g;v+=3){const _=s.getX(v),S=s.getX(v+1),x=s.getX(v+2);r=r4(this,o,e,i,u,c,d,_,S,x),r&&(r.faceIndex=Math.floor(v/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(o))for(let p=0,m=h.length;p<m;p++){const v=h[p],g=o[v.materialIndex],_=Math.max(v.start,f.start),S=Math.min(l.count,Math.min(v.start+v.count,f.start+f.count));for(let x=_,A=S;x<A;x+=3){const C=x,M=x+1,I=x+2;r=r4(this,g,e,i,u,c,d,C,M,I),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=v.materialIndex,t.push(r))}}else{const p=Math.max(0,f.start),m=Math.min(l.count,f.start+f.count);for(let v=p,g=m;v<g;v+=3){const _=v,S=v+1,x=v+2;r=r4(this,o,e,i,u,c,d,_,S,x),r&&(r.faceIndex=Math.floor(v/3),t.push(r))}}}}function nPe(n,e,t,i,r,a,o,s){let l;if(e.side===rl?l=i.intersectTriangle(o,a,r,!0,s):l=i.intersectTriangle(r,a,o,e.side===Zc,s),l===null)return null;i4.copy(s),i4.applyMatrix4(n.matrixWorld);const u=t.ray.origin.distanceTo(i4);return u<t.near||u>t.far?null:{distance:u,point:i4.clone(),object:n}}function r4(n,e,t,i,r,a,o,s,l,u){n.getVertexPosition(s,o2),n.getVertexPosition(l,s2),n.getVertexPosition(u,l2);const c=nPe(n,e,t,i,o2,s2,l2,n4);if(c){r&&(Q6.fromBufferAttribute(r,s),e4.fromBufferAttribute(r,l),t4.fromBufferAttribute(r,u),c.uv=X0.getInterpolation(n4,o2,s2,l2,Q6,e4,t4,new on)),a&&(Q6.fromBufferAttribute(a,s),e4.fromBufferAttribute(a,l),t4.fromBufferAttribute(a,u),c.uv1=X0.getInterpolation(n4,o2,s2,l2,Q6,e4,t4,new on),c.uv2=c.uv1),o&&(iV.fromBufferAttribute(o,s),rV.fromBufferAttribute(o,l),aV.fromBufferAttribute(o,u),c.normal=X0.getInterpolation(n4,o2,s2,l2,iV,rV,aV,new Le),c.normal.dot(i.direction)>0&&c.normal.multiplyScalar(-1));const d={a:s,b:l,c:u,normal:new Le,materialIndex:0};X0.getNormal(o2,s2,l2,d.normal),c.face=d}return c}class em extends Qr{constructor(e=1,t=1,i=1,r=1,a=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:a,depthSegments:o};const s=this;r=Math.floor(r),a=Math.floor(a),o=Math.floor(o);const l=[],u=[],c=[],d=[];let h=0,f=0;p("z","y","x",-1,-1,i,t,e,o,a,0),p("z","y","x",1,-1,i,t,-e,o,a,1),p("x","z","y",1,1,e,i,t,r,o,2),p("x","z","y",1,-1,e,i,-t,r,o,3),p("x","y","z",1,-1,e,t,i,r,a,4),p("x","y","z",-1,-1,e,t,-i,r,a,5),this.setIndex(l),this.setAttribute("position",new ga(u,3)),this.setAttribute("normal",new ga(c,3)),this.setAttribute("uv",new ga(d,2));function p(m,v,g,_,S,x,A,C,M,I,D){const E=x/M,P=A/I,F=x/2,V=A/2,G=C/2,W=M+1,Y=I+1;let Q=0,K=0;const ae=new Le;for(let ie=0;ie<Y;ie++){const he=ie*P-V;for(let Ee=0;Ee<W;Ee++){const He=Ee*E-F;ae[m]=He*_,ae[v]=he*S,ae[g]=G,u.push(ae.x,ae.y,ae.z),ae[m]=0,ae[v]=0,ae[g]=C>0?1:-1,c.push(ae.x,ae.y,ae.z),d.push(Ee/M),d.push(1-ie/I),Q+=1}}for(let ie=0;ie<I;ie++)for(let he=0;he<M;he++){const Ee=h+he+W*ie,He=h+he+W*(ie+1),xe=h+(he+1)+W*(ie+1),Fe=h+(he+1)+W*ie;l.push(Ee,He,Fe),l.push(He,xe,Fe),K+=6}s.addGroup(f,K,D),f+=K,h+=Q}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new em(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Mv(n){const e={};for(const t in n){e[t]={};for(const i in n[t]){const r=n[t][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][i]=null):e[t][i]=r.clone():Array.isArray(r)?e[t][i]=r.slice():e[t][i]=r}}return e}function ws(n){const e={};for(let t=0;t<n.length;t++){const i=Mv(n[t]);for(const r in i)e[r]=i[r]}return e}function iPe(n){const e=[];for(let t=0;t<n.length;t++)e.push(n[t].clone());return e}function UQ(n){return n.getRenderTarget()===null?n.outputColorSpace:Br.workingColorSpace}const hR={clone:Mv,merge:ws};var rPe=`void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,aPe=`void main() {
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
}`;class Jc extends A0{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=rPe,this.fragmentShader=aPe,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=Mv(e.uniforms),this.uniformsGroups=iPe(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 r in this.uniforms){const o=this.uniforms[r].value;o&&o.isTexture?t.uniforms[r]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[r]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[r]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[r]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[r]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[r]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[r]={type:"m4",value:o.toArray()}:t.uniforms[r]={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 i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}let VQ=class extends la{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Bi,this.projectionMatrix=new Bi,this.projectionMatrixInverse=new Bi,this.coordinateSystem=Fc}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 Bd=new Le,oV=new on,sV=new on;class ss extends VQ{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,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=Cv*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(t9*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Cv*2*Math.atan(Math.tan(t9*.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,i){Bd.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Bd.x,Bd.y).multiplyScalar(-e/Bd.z),Bd.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Bd.x,Bd.y).multiplyScalar(-e/Bd.z)}getViewSize(e,t){return this.getViewBounds(e,oV,sV),t.subVectors(sV,oV)}setViewOffset(e,t,i,r,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=i,this.view.offsetY=r,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(t9*.5*this.fov)/this.zoom,i=2*t,r=this.aspect*i,a=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,u=o.fullHeight;a+=o.offsetX*r/l,t-=o.offsetY*i/u,r*=o.width/l,i*=o.height/u}const s=this.filmOffset;s!==0&&(a+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(a,a+r,t,t-i,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 u2=-90,c2=1;class oPe extends la{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new ss(u2,c2,e,t);r.layers=this.layers,this.add(r);const a=new ss(u2,c2,e,t);a.layers=this.layers,this.add(a);const o=new ss(u2,c2,e,t);o.layers=this.layers,this.add(o);const s=new ss(u2,c2,e,t);s.layers=this.layers,this.add(s);const l=new ss(u2,c2,e,t);l.layers=this.layers,this.add(l);const u=new ss(u2,c2,e,t);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,a,o,s,l]=t;for(const u of t)this.remove(u);if(e===Fc)i.up.set(0,1,0),i.lookAt(1,0,0),r.up.set(0,1,0),r.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===B8)i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.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:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[a,o,s,l,u,c]=this.children,d=e.getRenderTarget(),h=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;const m=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(t,a),e.setRenderTarget(i,1,r),e.render(t,o),e.setRenderTarget(i,2,r),e.render(t,s),e.setRenderTarget(i,3,r),e.render(t,l),e.setRenderTarget(i,4,r),e.render(t,u),i.texture.generateMipmaps=m,e.setRenderTarget(i,5,r),e.render(t,c),e.setRenderTarget(d,h,f),e.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class HQ extends yo{constructor(e,t,i,r,a,o,s,l,u,c){e=e!==void 0?e:[],t=t!==void 0?t:xv,super(e,t,i,r,a,o,s,l,u,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class sPe extends Hp{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];t.encoding!==void 0&&(Dp("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===Ip?$r:_0),this.texture=new HQ(r,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:ao}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 i={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 );
}
`},r=new em(5,5,5),a=new Jc({name:"CubemapFromEquirect",uniforms:Mv(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:rl,blending:_h});a.uniforms.tEquirect.value=t;const o=new fr(r,a),s=t.minFilter;return t.minFilter===kc&&(t.minFilter=ao),new oPe(1,10,this).update(e,o),t.minFilter=s,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,r){const a=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,r);e.setRenderTarget(a)}}const $w=new Le,lPe=new Le,uPe=new ar;let jd=class{constructor(e=new Le(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,i,r){return this.normal.set(e,t,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const r=$w.subVectors(i,t).cross(lPe.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,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 i=e.delta($w),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const a=-(e.start.dot(this.normal)+this.constant)/r;return a<0||a>1?null:t.copy(e.start).addScaledVector(i,a)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<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 i=t||uPe.getNormalMatrix(e),r=this.coplanarPoint($w).applyMatrix4(e),a=this.normal.applyMatrix3(i).normalize();return this.constant=-r.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 Ff=new D0,a4=new Le;class fR{constructor(e=new jd,t=new jd,i=new jd,r=new jd,a=new jd,o=new jd){this.planes=[e,t,i,r,a,o]}set(e,t,i,r,a,o){const s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(i),s[3].copy(r),s[4].copy(a),s[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=Fc){const i=this.planes,r=e.elements,a=r[0],o=r[1],s=r[2],l=r[3],u=r[4],c=r[5],d=r[6],h=r[7],f=r[8],p=r[9],m=r[10],v=r[11],g=r[12],_=r[13],S=r[14],x=r[15];if(i[0].setComponents(l-a,h-u,v-f,x-g).normalize(),i[1].setComponents(l+a,h+u,v+f,x+g).normalize(),i[2].setComponents(l+o,h+c,v+p,x+_).normalize(),i[3].setComponents(l-o,h-c,v-p,x-_).normalize(),i[4].setComponents(l-s,h-d,v-m,x-S).normalize(),t===Fc)i[5].setComponents(l+s,h+d,v+m,x+S).normalize();else if(t===B8)i[5].setComponents(s,d,m,S).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(),Ff.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Ff.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ff)}intersectsSprite(e){return Ff.center.set(0,0,0),Ff.radius=.7071067811865476,Ff.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ff)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let a=0;a<6;a++)if(t[a].distanceToPoint(i)<r)return!1;return!0}intersectsBox(e){const t=this.planes;for(let i=0;i<6;i++){const r=t[i];if(a4.x=r.normal.x>0?e.max.x:e.min.x,a4.y=r.normal.y>0?e.max.y:e.min.y,a4.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(a4)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function WQ(){let n=null,e=!1,t=null,i=null;function r(a,o){t(a,o),i=n.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(a){t=a},setContext:function(a){n=a}}}function cPe(n,e){const t=e.isWebGL2,i=new WeakMap;function r(u,c){const d=u.array,h=u.usage,f=d.byteLength,p=n.createBuffer();n.bindBuffer(c,p),n.bufferData(c,d,h),u.onUploadCallback();let m;if(d instanceof Float32Array)m=n.FLOAT;else if(d instanceof Uint16Array)if(u.isFloat16BufferAttribute)if(t)m=n.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else m=n.UNSIGNED_SHORT;else if(d instanceof Int16Array)m=n.SHORT;else if(d instanceof Uint32Array)m=n.UNSIGNED_INT;else if(d instanceof Int32Array)m=n.INT;else if(d instanceof Int8Array)m=n.BYTE;else if(d instanceof Uint8Array)m=n.UNSIGNED_BYTE;else if(d instanceof Uint8ClampedArray)m=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:p,type:m,bytesPerElement:d.BYTES_PER_ELEMENT,version:u.version,size:f}}function a(u,c,d){const h=c.array,f=c._updateRange,p=c.updateRanges;if(n.bindBuffer(d,u),f.count===-1&&p.length===0&&n.bufferSubData(d,0,h),p.length!==0){for(let m=0,v=p.length;m<v;m++){const g=p[m];t?n.bufferSubData(d,g.start*h.BYTES_PER_ELEMENT,h,g.start,g.count):n.bufferSubData(d,g.start*h.BYTES_PER_ELEMENT,h.subarray(g.start,g.start+g.count))}c.clearUpdateRanges()}f.count!==-1&&(t?n.bufferSubData(d,f.offset*h.BYTES_PER_ELEMENT,h,f.offset,f.count):n.bufferSubData(d,f.offset*h.BYTES_PER_ELEMENT,h.subarray(f.offset,f.offset+f.count)),f.count=-1),c.onUploadCallback()}function o(u){return u.isInterleavedBufferAttribute&&(u=u.data),i.get(u)}function s(u){u.isInterleavedBufferAttribute&&(u=u.data);const c=i.get(u);c&&(n.deleteBuffer(c.buffer),i.delete(u))}function l(u,c){if(u.isGLBufferAttribute){const h=i.get(u);(!h||h.version<u.version)&&i.set(u,{buffer:u.buffer,type:u.type,bytesPerElement:u.elementSize,version:u.version});return}u.isInterleavedBufferAttribute&&(u=u.data);const d=i.get(u);if(d===void 0)i.set(u,r(u,c));else if(d.version<u.version){if(d.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(d.buffer,u,c),d.version=u.version}}return{get:o,remove:s,update:l}}class Al extends Qr{constructor(e=1,t=1,i=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:i,heightSegments:r};const a=e/2,o=t/2,s=Math.floor(i),l=Math.floor(r),u=s+1,c=l+1,d=e/s,h=t/l,f=[],p=[],m=[],v=[];for(let g=0;g<c;g++){const _=g*h-o;for(let S=0;S<u;S++){const x=S*d-a;p.push(x,-_,0),m.push(0,0,1),v.push(S/s),v.push(1-g/l)}}for(let g=0;g<l;g++)for(let _=0;_<s;_++){const S=_+u*g,x=_+u*(g+1),A=_+1+u*(g+1),C=_+1+u*g;f.push(S,x,C),f.push(x,A,C)}this.setIndex(f),this.setAttribute("position",new ga(p,3)),this.setAttribute("normal",new ga(m,3)),this.setAttribute("uv",new ga(v,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Al(e.width,e.height,e.widthSegments,e.heightSegments)}}var dPe=`#ifdef USE_ALPHAHASH
if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
#endif`,hPe=`#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`,fPe=`#ifdef USE_ALPHAMAP
diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
#endif`,pPe=`#ifdef USE_ALPHAMAP
uniform sampler2D alphaMap;
#endif`,vPe=`#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`,mPe=`#ifdef USE_ALPHATEST
uniform float alphaTest;
#endif`,gPe=`#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`,yPe=`#ifdef USE_AOMAP
uniform sampler2D aoMap;
uniform float aoMapIntensity;
#endif`,_Pe=`#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`,SPe=`#ifdef USE_BATCHING
mat4 batchingMatrix = getBatchingMatrix( batchId );
#endif`,bPe=`vec3 transformed = vec3( position );
#ifdef USE_ALPHAHASH
vPosition = vec3( position );
#endif`,xPe=`vec3 objectNormal = vec3( normal );
#ifdef USE_TANGENT
vec3 objectTangent = vec3( tangent.xyz );
#endif`,wPe=`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`,TPe=`#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`,APe=`#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`,CPe=`#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`,MPe=`#if NUM_CLIPPING_PLANES > 0
varying vec3 vClipPosition;
uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
#endif`,EPe=`#if NUM_CLIPPING_PLANES > 0
varying vec3 vClipPosition;
#endif`,PPe=`#if NUM_CLIPPING_PLANES > 0
vClipPosition = - mvPosition.xyz;
#endif`,RPe=`#if defined( USE_COLOR_ALPHA )
diffuseColor *= vColor;
#elif defined( USE_COLOR )
diffuseColor.rgb *= vColor;
#endif`,LPe=`#if defined( USE_COLOR_ALPHA )
varying vec4 vColor;
#elif defined( USE_COLOR )
varying vec3 vColor;
#endif`,IPe=`#if defined( USE_COLOR_ALPHA )
varying vec4 vColor;
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
varying vec3 vColor;
#endif`,DPe=`#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`,NPe=`#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`,kPe=`#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`,FPe=`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`,OPe=`#ifdef USE_DISPLACEMENTMAP
uniform sampler2D displacementMap;
uniform float displacementScale;
uniform float displacementBias;
#endif`,BPe=`#ifdef USE_DISPLACEMENTMAP
transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );
#endif`,zPe=`#ifdef USE_EMISSIVEMAP
vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
totalEmissiveRadiance *= emissiveColor.rgb;
#endif`,GPe=`#ifdef USE_EMISSIVEMAP
uniform sampler2D emissiveMap;
#endif`,UPe="gl_FragColor = linearToOutputTexel( gl_FragColor );",VPe=`
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 );
}`,HPe=`#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`,WPe=`#ifdef USE_ENVMAP
uniform float envMapIntensity;
uniform float flipEnvMap;
#ifdef ENVMAP_TYPE_CUBE
uniform samplerCube envMap;
#else
uniform sampler2D envMap;
#endif
#endif`,jPe=`#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`,$Pe=`#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`,qPe=`#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`,XPe=`#ifdef USE_FOG
vFogDepth = - mvPosition.z;
#endif`,YPe=`#ifdef USE_FOG
varying float vFogDepth;
#endif`,KPe=`#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`,ZPe=`#ifdef USE_FOG
uniform vec3 fogColor;
varying float vFogDepth;
#ifdef FOG_EXP2
uniform float fogDensity;
#else
uniform float fogNear;
uniform float fogFar;
#endif
#endif`,JPe=`#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
}`,QPe=`#ifdef USE_LIGHTMAP
vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
reflectedLight.indirectDiffuse += lightMapIrradiance;
#endif`,eRe=`#ifdef USE_LIGHTMAP
uniform sampler2D lightMap;
uniform float lightMapIntensity;
#endif`,tRe=`LambertMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularStrength = specularStrength;`,nRe=`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`,iRe=`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`,rRe=`#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`,aRe=`ToonMaterial material;
material.diffuseColor = diffuseColor.rgb;`,oRe=`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`,sRe=`BlinnPhongMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularColor = specular;
material.specularShininess = shininess;
material.specularStrength = specularStrength;`,lRe=`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`,uRe=`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`,cRe=`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 );
}`,dRe=`
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`,hRe=`#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`,fRe=`#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`,pRe=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
#endif`,vRe=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
uniform float logDepthBufFC;
varying float vFragDepth;
varying float vIsPerspective;
#endif`,mRe=`#ifdef USE_LOGDEPTHBUF
#ifdef USE_LOGDEPTHBUF_EXT
varying float vFragDepth;
varying float vIsPerspective;
#else
uniform float logDepthBufFC;
#endif
#endif`,gRe=`#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`,yRe=`#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`,_Re=`#ifdef USE_MAP
uniform sampler2D map;
#endif`,SRe=`#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`,bRe=`#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`,xRe=`float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
metalnessFactor *= texelMetalness.b;
#endif`,wRe=`#ifdef USE_METALNESSMAP
uniform sampler2D metalnessMap;
#endif`,TRe=`#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`,ARe=`#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`,CRe=`#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`,MRe=`#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`,ERe=`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;`,PRe=`#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`,RRe=`#ifndef FLAT_SHADED
varying vec3 vNormal;
#ifdef USE_TANGENT
varying vec3 vTangent;
varying vec3 vBitangent;
#endif
#endif`,LRe=`#ifndef FLAT_SHADED
varying vec3 vNormal;
#ifdef USE_TANGENT
varying vec3 vTangent;
varying vec3 vBitangent;
#endif
#endif`,IRe=`#ifndef FLAT_SHADED
vNormal = normalize( transformedNormal );
#ifdef USE_TANGENT
vTangent = normalize( transformedTangent );
vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
#endif
#endif`,DRe=`#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`,NRe=`#ifdef USE_CLEARCOAT
vec3 clearcoatNormal = nonPerturbedNormal;
#endif`,kRe=`#ifdef USE_CLEARCOAT_NORMALMAP
vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
clearcoatMapN.xy *= clearcoatNormalScale;
clearcoatNormal = normalize( tbn2 * clearcoatMapN );
#endif`,FRe=`#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`,ORe=`#ifdef USE_IRIDESCENCEMAP
uniform sampler2D iridescenceMap;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
uniform sampler2D iridescenceThicknessMap;
#endif`,BRe=`#ifdef OPAQUE
diffuseColor.a = 1.0;
#endif
#ifdef USE_TRANSMISSION
diffuseColor.a *= material.transmissionAlpha;
#endif
gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,zRe=`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 );
}`,GRe=`#ifdef PREMULTIPLIED_ALPHA
gl_FragColor.rgb *= gl_FragColor.a;
#endif`,URe=`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;`,VRe=`#ifdef DITHERING
gl_FragColor.rgb = dithering( gl_FragColor.rgb );
#endif`,HRe=`#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`,WRe=`float roughnessFactor = roughness;
#ifdef USE_ROUGHNESSMAP
vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
roughnessFactor *= texelRoughness.g;
#endif`,jRe=`#ifdef USE_ROUGHNESSMAP
uniform sampler2D roughnessMap;
#endif`,$Re=`#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`,qRe=`#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`,XRe=`#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`,YRe=`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;
}`,KRe=`#ifdef USE_SKINNING
mat4 boneMatX = getBoneMatrix( skinIndex.x );
mat4 boneMatY = getBoneMatrix( skinIndex.y );
mat4 boneMatZ = getBoneMatrix( skinIndex.z );
mat4 boneMatW = getBoneMatrix( skinIndex.w );
#endif`,ZRe=`#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`,JRe=`#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`,QRe=`#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`,eLe=`float specularStrength;
#ifdef USE_SPECULARMAP
vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
specularStrength = texelSpecular.r;
#else
specularStrength = 1.0;
#endif`,tLe=`#ifdef USE_SPECULARMAP
uniform sampler2D specularMap;
#endif`,nLe=`#if defined( TONE_MAPPING )
gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
#endif`,iLe=`#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; }`,rLe=`#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`,aLe=`#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`,oLe=`#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`,sLe=`#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`,lLe=`#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`,uLe=`#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 cLe=`varying vec2 vUv;
uniform mat3 uvTransform;
void main() {
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
gl_Position = vec4( position.xy, 1.0, 1.0 );
}`,dLe=`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>
}`,hLe=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
gl_Position.z = gl_Position.w;
}`,fLe=`#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>
}`,pLe=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
gl_Position.z = gl_Position.w;
}`,vLe=`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>
}`,mLe=`#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;
}`,gLe=`#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
}`,yLe=`#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;
}`,_Le=`#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 );
}`,SLe=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
}`,bLe=`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>
}`,xLe=`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>
}`,wLe=`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>
}`,TLe=`#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>
}`,ALe=`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>
}`,CLe=`#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>
}`,MLe=`#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>
}`,ELe=`#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;
}`,PLe=`#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>
}`,RLe=`#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
}`,LLe=`#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
}`,ILe=`#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>
}`,DLe=`#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>
}`,NLe=`#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
}`,kLe=`#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>
}`,FLe=`#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>
}`,OLe=`#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>
}`,BLe=`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>
}`,zLe=`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>
}`,GLe=`#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>
}`,ULe=`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>
}`,VLe=`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>
}`,HLe=`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>
}`,ji={alphahash_fragment:dPe,alphahash_pars_fragment:hPe,alphamap_fragment:fPe,alphamap_pars_fragment:pPe,alphatest_fragment:vPe,alphatest_pars_fragment:mPe,aomap_fragment:gPe,aomap_pars_fragment:yPe,batching_pars_vertex:_Pe,batching_vertex:SPe,begin_vertex:bPe,beginnormal_vertex:xPe,bsdfs:wPe,iridescence_fragment:TPe,bumpmap_pars_fragment:APe,clipping_planes_fragment:CPe,clipping_planes_pars_fragment:MPe,clipping_planes_pars_vertex:EPe,clipping_planes_vertex:PPe,color_fragment:RPe,color_pars_fragment:LPe,color_pars_vertex:IPe,color_vertex:DPe,common:NPe,cube_uv_reflection_fragment:kPe,defaultnormal_vertex:FPe,displacementmap_pars_vertex:OPe,displacementmap_vertex:BPe,emissivemap_fragment:zPe,emissivemap_pars_fragment:GPe,colorspace_fragment:UPe,colorspace_pars_fragment:VPe,envmap_fragment:HPe,envmap_common_pars_fragment:WPe,envmap_pars_fragment:jPe,envmap_pars_vertex:$Pe,envmap_physical_pars_fragment:rRe,envmap_vertex:qPe,fog_vertex:XPe,fog_pars_vertex:YPe,fog_fragment:KPe,fog_pars_fragment:ZPe,gradientmap_pars_fragment:JPe,lightmap_fragment:QPe,lightmap_pars_fragment:eRe,lights_lambert_fragment:tRe,lights_lambert_pars_fragment:nRe,lights_pars_begin:iRe,lights_toon_fragment:aRe,lights_toon_pars_fragment:oRe,lights_phong_fragment:sRe,lights_phong_pars_fragment:lRe,lights_physical_fragment:uRe,lights_physical_pars_fragment:cRe,lights_fragment_begin:dRe,lights_fragment_maps:hRe,lights_fragment_end:fRe,logdepthbuf_fragment:pRe,logdepthbuf_pars_fragment:vRe,logdepthbuf_pars_vertex:mRe,logdepthbuf_vertex:gRe,map_fragment:yRe,map_pars_fragment:_Re,map_particle_fragment:SRe,map_particle_pars_fragment:bRe,metalnessmap_fragment:xRe,metalnessmap_pars_fragment:wRe,morphcolor_vertex:TRe,morphnormal_vertex:ARe,morphtarget_pars_vertex:CRe,morphtarget_vertex:MRe,normal_fragment_begin:ERe,normal_fragment_maps:PRe,normal_pars_fragment:RRe,normal_pars_vertex:LRe,normal_vertex:IRe,normalmap_pars_fragment:DRe,clearcoat_normal_fragment_begin:NRe,clearcoat_normal_fragment_maps:kRe,clearcoat_pars_fragment:FRe,iridescence_pars_fragment:ORe,opaque_fragment:BRe,packing:zRe,premultiplied_alpha_fragment:GRe,project_vertex:URe,dithering_fragment:VRe,dithering_pars_fragment:HRe,roughnessmap_fragment:WRe,roughnessmap_pars_fragment:jRe,shadowmap_pars_fragment:$Re,shadowmap_pars_vertex:qRe,shadowmap_vertex:XRe,shadowmask_pars_fragment:YRe,skinbase_vertex:KRe,skinning_pars_vertex:ZRe,skinning_vertex:JRe,skinnormal_vertex:QRe,specularmap_fragment:eLe,specularmap_pars_fragment:tLe,tonemapping_fragment:nLe,tonemapping_pars_fragment:iLe,transmission_fragment:rLe,transmission_pars_fragment:aLe,uv_pars_fragment:oLe,uv_pars_vertex:sLe,uv_vertex:lLe,worldpos_vertex:uLe,background_vert:cLe,background_frag:dLe,backgroundCube_vert:hLe,backgroundCube_frag:fLe,cube_vert:pLe,cube_frag:vLe,depth_vert:mLe,depth_frag:gLe,distanceRGBA_vert:yLe,distanceRGBA_frag:_Le,equirect_vert:SLe,equirect_frag:bLe,linedashed_vert:xLe,linedashed_frag:wLe,meshbasic_vert:TLe,meshbasic_frag:ALe,meshlambert_vert:CLe,meshlambert_frag:MLe,meshmatcap_vert:ELe,meshmatcap_frag:PLe,meshnormal_vert:RLe,meshnormal_frag:LLe,meshphong_vert:ILe,meshphong_frag:DLe,meshphysical_vert:NLe,meshphysical_frag:kLe,meshtoon_vert:FLe,meshtoon_frag:OLe,points_vert:BLe,points_frag:zLe,shadow_vert:GLe,shadow_frag:ULe,sprite_vert:VLe,sprite_frag:HLe},Pn={common:{diffuse:{value:new Jn(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new ar},alphaMap:{value:null},alphaMapTransform:{value:new ar},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new ar}},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 ar}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new ar}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new ar},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new ar},normalScale:{value:new on(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new ar},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new ar}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new ar}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new ar}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Jn(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 Jn(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new ar},alphaTest:{value:0},uvTransform:{value:new ar}},sprite:{diffuse:{value:new Jn(16777215)},opacity:{value:1},center:{value:new on(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new ar},alphaMap:{value:null},alphaMapTransform:{value:new ar},alphaTest:{value:0}}},qs={basic:{uniforms:ws([Pn.common,Pn.specularmap,Pn.envmap,Pn.aomap,Pn.lightmap,Pn.fog]),vertexShader:ji.meshbasic_vert,fragmentShader:ji.meshbasic_frag},lambert:{uniforms:ws([Pn.common,Pn.specularmap,Pn.envmap,Pn.aomap,Pn.lightmap,Pn.emissivemap,Pn.bumpmap,Pn.normalmap,Pn.displacementmap,Pn.fog,Pn.lights,{emissive:{value:new Jn(0)}}]),vertexShader:ji.meshlambert_vert,fragmentShader:ji.meshlambert_frag},phong:{uniforms:ws([Pn.common,Pn.specularmap,Pn.envmap,Pn.aomap,Pn.lightmap,Pn.emissivemap,Pn.bumpmap,Pn.normalmap,Pn.displacementmap,Pn.fog,Pn.lights,{emissive:{value:new Jn(0)},specular:{value:new Jn(1118481)},shininess:{value:30}}]),vertexShader:ji.meshphong_vert,fragmentShader:ji.meshphong_frag},standard:{uniforms:ws([Pn.common,Pn.envmap,Pn.aomap,Pn.lightmap,Pn.emissivemap,Pn.bumpmap,Pn.normalmap,Pn.displacementmap,Pn.roughnessmap,Pn.metalnessmap,Pn.fog,Pn.lights,{emissive:{value:new Jn(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ji.meshphysical_vert,fragmentShader:ji.meshphysical_frag},toon:{uniforms:ws([Pn.common,Pn.aomap,Pn.lightmap,Pn.emissivemap,Pn.bumpmap,Pn.normalmap,Pn.displacementmap,Pn.gradientmap,Pn.fog,Pn.lights,{emissive:{value:new Jn(0)}}]),vertexShader:ji.meshtoon_vert,fragmentShader:ji.meshtoon_frag},matcap:{uniforms:ws([Pn.common,Pn.bumpmap,Pn.normalmap,Pn.displacementmap,Pn.fog,{matcap:{value:null}}]),vertexShader:ji.meshmatcap_vert,fragmentShader:ji.meshmatcap_frag},points:{uniforms:ws([Pn.points,Pn.fog]),vertexShader:ji.points_vert,fragmentShader:ji.points_frag},dashed:{uniforms:ws([Pn.common,Pn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ji.linedashed_vert,fragmentShader:ji.linedashed_frag},depth:{uniforms:ws([Pn.common,Pn.displacementmap]),vertexShader:ji.depth_vert,fragmentShader:ji.depth_frag},normal:{uniforms:ws([Pn.common,Pn.bumpmap,Pn.normalmap,Pn.displacementmap,{opacity:{value:1}}]),vertexShader:ji.meshnormal_vert,fragmentShader:ji.meshnormal_frag},sprite:{uniforms:ws([Pn.sprite,Pn.fog]),vertexShader:ji.sprite_vert,fragmentShader:ji.sprite_frag},background:{uniforms:{uvTransform:{value:new ar},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ji.background_vert,fragmentShader:ji.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:ji.backgroundCube_vert,fragmentShader:ji.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ji.cube_vert,fragmentShader:ji.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ji.equirect_vert,fragmentShader:ji.equirect_frag},distanceRGBA:{uniforms:ws([Pn.common,Pn.displacementmap,{referencePosition:{value:new Le},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ji.distanceRGBA_vert,fragmentShader:ji.distanceRGBA_frag},shadow:{uniforms:ws([Pn.lights,Pn.fog,{color:{value:new Jn(0)},opacity:{value:1}}]),vertexShader:ji.shadow_vert,fragmentShader:ji.shadow_frag}};qs.physical={uniforms:ws([qs.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new ar},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new ar},clearcoatNormalScale:{value:new on(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new ar},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new ar},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new ar},sheen:{value:0},sheenColor:{value:new Jn(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new ar},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new ar},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new ar},transmissionSamplerSize:{value:new on},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new ar},attenuationDistance:{value:0},attenuationColor:{value:new Jn(0)},specularColor:{value:new Jn(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new ar},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new ar},anisotropyVector:{value:new on},anisotropyMap:{value:null},anisotropyMapTransform:{value:new ar}}]),vertexShader:ji.meshphysical_vert,fragmentShader:ji.meshphysical_frag};const o4={r:0,b:0,g:0};function WLe(n,e,t,i,r,a,o){const s=new Jn(0);let l=a===!0?0:1,u,c,d=null,h=0,f=null;function p(v,g){let _=!1,S=g.isScene===!0?g.background:null;S&&S.isTexture&&(S=(g.backgroundBlurriness>0?t:e).get(S)),S===null?m(s,l):S&&S.isColor&&(m(S,1),_=!0);const x=n.xr.getEnvironmentBlendMode();x==="additive"?i.buffers.color.setClear(0,0,0,1,o):x==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||_)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),S&&(S.isCubeTexture||S.mapping===n7)?(c===void 0&&(c=new fr(new em(1,1,1),new Jc({name:"BackgroundCubeMaterial",uniforms:Mv(qs.backgroundCube.uniforms),vertexShader:qs.backgroundCube.vertexShader,fragmentShader:qs.backgroundCube.fragmentShader,side:rl,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(A,C,M){this.matrixWorld.copyPosition(M.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(c)),c.material.uniforms.envMap.value=S,c.material.uniforms.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,c.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,c.material.toneMapped=Br.getTransfer(S.colorSpace)!==ma,(d!==S||h!==S.version||f!==n.toneMapping)&&(c.material.needsUpdate=!0,d=S,h=S.version,f=n.toneMapping),c.layers.enableAll(),v.unshift(c,c.geometry,c.material,0,0,null)):S&&S.isTexture&&(u===void 0&&(u=new fr(new Al(2,2),new Jc({name:"BackgroundMaterial",uniforms:Mv(qs.background.uniforms),vertexShader:qs.background.vertexShader,fragmentShader:qs.background.fragmentShader,side:Zc,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(u)),u.material.uniforms.t2D.value=S,u.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,u.material.toneMapped=Br.getTransfer(S.colorSpace)!==ma,S.matrixAutoUpdate===!0&&S.updateMatrix(),u.material.uniforms.uvTransform.value.copy(S.matrix),(d!==S||h!==S.version||f!==n.toneMapping)&&(u.material.needsUpdate=!0,d=S,h=S.version,f=n.toneMapping),u.layers.enableAll(),v.unshift(u,u.geometry,u.material,0,0,null))}function m(v,g){v.getRGB(o4,UQ(n)),i.buffers.color.setClear(o4.r,o4.g,o4.b,g,o)}return{getClearColor:function(){return s},setClearColor:function(v,g=1){s.set(v),l=g,m(s,l)},getClearAlpha:function(){return l},setClearAlpha:function(v){l=v,m(s,l)},render:p}}function jLe(n,e,t,i){const r=n.getParameter(n.MAX_VERTEX_ATTRIBS),a=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||a!==null,s={},l=v(null);let u=l,c=!1;function d(G,W,Y,Q,K){let ae=!1;if(o){const ie=m(Q,Y,W);u!==ie&&(u=ie,f(u.object)),ae=g(G,Q,Y,K),ae&&_(G,Q,Y,K)}else{const ie=W.wireframe===!0;(u.geometry!==Q.id||u.program!==Y.id||u.wireframe!==ie)&&(u.geometry=Q.id,u.program=Y.id,u.wireframe=ie,ae=!0)}K!==null&&t.update(K,n.ELEMENT_ARRAY_BUFFER),(ae||c)&&(c=!1,I(G,W,Y,Q),K!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t.get(K).buffer))}function h(){return i.isWebGL2?n.createVertexArray():a.createVertexArrayOES()}function f(G){return i.isWebGL2?n.bindVertexArray(G):a.bindVertexArrayOES(G)}function p(G){return i.isWebGL2?n.deleteVertexArray(G):a.deleteVertexArrayOES(G)}function m(G,W,Y){const Q=Y.wireframe===!0;let K=s[G.id];K===void 0&&(K={},s[G.id]=K);let ae=K[W.id];ae===void 0&&(ae={},K[W.id]=ae);let ie=ae[Q];return ie===void 0&&(ie=v(h()),ae[Q]=ie),ie}function v(G){const W=[],Y=[],Q=[];for(let K=0;K<r;K++)W[K]=0,Y[K]=0,Q[K]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:W,enabledAttributes:Y,attributeDivisors:Q,object:G,attributes:{},index:null}}function g(G,W,Y,Q){const K=u.attributes,ae=W.attributes;let ie=0;const he=Y.getAttributes();for(const Ee in he)if(he[Ee].location>=0){const xe=K[Ee];let Fe=ae[Ee];if(Fe===void 0&&(Ee==="instanceMatrix"&&G.instanceMatrix&&(Fe=G.instanceMatrix),Ee==="instanceColor"&&G.instanceColor&&(Fe=G.instanceColor)),xe===void 0||xe.attribute!==Fe||Fe&&xe.data!==Fe.data)return!0;ie++}return u.attributesNum!==ie||u.index!==Q}function _(G,W,Y,Q){const K={},ae=W.attributes;let ie=0;const he=Y.getAttributes();for(const Ee in he)if(he[Ee].location>=0){let xe=ae[Ee];xe===void 0&&(Ee==="instanceMatrix"&&G.instanceMatrix&&(xe=G.instanceMatrix),Ee==="instanceColor"&&G.instanceColor&&(xe=G.instanceColor));const Fe={};Fe.attribute=xe,xe&&xe.data&&(Fe.data=xe.data),K[Ee]=Fe,ie++}u.attributes=K,u.attributesNum=ie,u.index=Q}function S(){const G=u.newAttributes;for(let W=0,Y=G.length;W<Y;W++)G[W]=0}function x(G){A(G,0)}function A(G,W){const Y=u.newAttributes,Q=u.enabledAttributes,K=u.attributeDivisors;Y[G]=1,Q[G]===0&&(n.enableVertexAttribArray(G),Q[G]=1),K[G]!==W&&((i.isWebGL2?n:e.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](G,W),K[G]=W)}function C(){const G=u.newAttributes,W=u.enabledAttributes;for(let Y=0,Q=W.length;Y<Q;Y++)W[Y]!==G[Y]&&(n.disableVertexAttribArray(Y),W[Y]=0)}function M(G,W,Y,Q,K,ae,ie){ie===!0?n.vertexAttribIPointer(G,W,Y,K,ae):n.vertexAttribPointer(G,W,Y,Q,K,ae)}function I(G,W,Y,Q){if(i.isWebGL2===!1&&(G.isInstancedMesh||Q.isInstancedBufferGeometry)&&e.get("ANGLE_instanced_arrays")===null)return;S();const K=Q.attributes,ae=Y.getAttributes(),ie=W.defaultAttributeValues;for(const he in ae){const Ee=ae[he];if(Ee.location>=0){let He=K[he];if(He===void 0&&(he==="instanceMatrix"&&G.instanceMatrix&&(He=G.instanceMatrix),he==="instanceColor"&&G.instanceColor&&(He=G.instanceColor)),He!==void 0){const xe=He.normalized,Fe=He.itemSize,pt=t.get(He);if(pt===void 0)continue;const Ot=pt.buffer,bt=pt.type,ht=pt.bytesPerElement,Kt=i.isWebGL2===!0&&(bt===n.INT||bt===n.UNSIGNED_INT||He.gpuType===TQ);if(He.isInterleavedBufferAttribute){const Tt=He.data,Ae=Tt.stride,Lt=He.offset;if(Tt.isInstancedInterleavedBuffer){for(let vt=0;vt<Ee.locationSize;vt++)A(Ee.location+vt,Tt.meshPerAttribute);G.isInstancedMesh!==!0&&Q._maxInstanceCount===void 0&&(Q._maxInstanceCount=Tt.meshPerAttribute*Tt.count)}else for(let vt=0;vt<Ee.locationSize;vt++)x(Ee.location+vt);n.bindBuffer(n.ARRAY_BUFFER,Ot);for(let vt=0;vt<Ee.locationSize;vt++)M(Ee.location+vt,Fe/Ee.locationSize,bt,xe,Ae*ht,(Lt+Fe/Ee.locationSize*vt)*ht,Kt)}else{if(He.isInstancedBufferAttribute){for(let Tt=0;Tt<Ee.locationSize;Tt++)A(Ee.location+Tt,He.meshPerAttribute);G.isInstancedMesh!==!0&&Q._maxInstanceCount===void 0&&(Q._maxInstanceCount=He.meshPerAttribute*He.count)}else for(let Tt=0;Tt<Ee.locationSize;Tt++)x(Ee.location+Tt);n.bindBuffer(n.ARRAY_BUFFER,Ot);for(let Tt=0;Tt<Ee.locationSize;Tt++)M(Ee.location+Tt,Fe/Ee.locationSize,bt,xe,Fe*ht,Fe/Ee.locationSize*Tt*ht,Kt)}}else if(ie!==void 0){const xe=ie[he];if(xe!==void 0)switch(xe.length){case 2:n.vertexAttrib2fv(Ee.location,xe);break;case 3:n.vertexAttrib3fv(Ee.location,xe);break;case 4:n.vertexAttrib4fv(Ee.location,xe);break;default:n.vertexAttrib1fv(Ee.location,xe)}}}}C()}function D(){F();for(const G in s){const W=s[G];for(const Y in W){const Q=W[Y];for(const K in Q)p(Q[K].object),delete Q[K];delete W[Y]}delete s[G]}}function E(G){if(s[G.id]===void 0)return;const W=s[G.id];for(const Y in W){const Q=W[Y];for(const K in Q)p(Q[K].object),delete Q[K];delete W[Y]}delete s[G.id]}function P(G){for(const W in s){const Y=s[W];if(Y[G.id]===void 0)continue;const Q=Y[G.id];for(const K in Q)p(Q[K].object),delete Q[K];delete Y[G.id]}}function F(){V(),c=!0,u!==l&&(u=l,f(u.object))}function V(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:d,reset:F,resetDefaultState:V,dispose:D,releaseStatesOfGeometry:E,releaseStatesOfProgram:P,initAttributes:S,enableAttribute:x,disableUnusedAttributes:C}}function $Le(n,e,t,i){const r=i.isWebGL2;let a;function o(c){a=c}function s(c,d){n.drawArrays(a,c,d),t.update(d,a,1)}function l(c,d,h){if(h===0)return;let f,p;if(r)f=n,p="drawArraysInstanced";else if(f=e.get("ANGLE_instanced_arrays"),p="drawArraysInstancedANGLE",f===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}f[p](a,c,d,h),t.update(d,a,h)}function u(c,d,h){if(h===0)return;const f=e.get("WEBGL_multi_draw");if(f===null)for(let p=0;p<h;p++)this.render(c[p],d[p]);else{f.multiDrawArraysWEBGL(a,c,0,d,0,h);let p=0;for(let m=0;m<h;m++)p+=d[m];t.update(p,a,1)}}this.setMode=o,this.render=s,this.renderInstances=l,this.renderMultiDraw=u}function qLe(n,e,t){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const M=e.get("EXT_texture_filter_anisotropic");i=n.getParameter(M.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function a(M){if(M==="highp"){if(n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";M="mediump"}return M==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext!="undefined"&&n.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,d=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),h=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),f=n.getParameter(n.MAX_TEXTURE_SIZE),p=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),m=n.getParameter(n.MAX_VERTEX_ATTRIBS),v=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),g=n.getParameter(n.MAX_VARYING_VECTORS),_=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),S=h>0,x=o||e.has("OES_texture_float"),A=S&&x,C=o?n.getParameter(n.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:u,getMaxAnisotropy:r,getMaxPrecision:a,precision:s,logarithmicDepthBuffer:c,maxTextures:d,maxVertexTextures:h,maxTextureSize:f,maxCubemapSize:p,maxAttributes:m,maxVertexUniforms:v,maxVaryings:g,maxFragmentUniforms:_,vertexTextures:S,floatFragmentTextures:x,floatVertexTextures:A,maxSamples:C}}function XLe(n){const e=this;let t=null,i=0,r=!1,a=!1;const o=new jd,s=new ar,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,h){const f=d.length!==0||h||i!==0||r;return r=h,i=d.length,f},this.beginShadows=function(){a=!0,c(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(d,h){t=c(d,h,0)},this.setState=function(d,h,f){const p=d.clippingPlanes,m=d.clipIntersection,v=d.clipShadows,g=n.get(d);if(!r||p===null||p.length===0||a&&!v)a?c(null):u();else{const _=a?0:i,S=_*4;let x=g.clippingState||null;l.value=x,x=c(p,h,S,f);for(let A=0;A!==S;++A)x[A]=t[A];g.clippingState=x,this.numIntersection=m?this.numPlanes:0,this.numPlanes+=_}};function u(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function c(d,h,f,p){const m=d!==null?d.length:0;let v=null;if(m!==0){if(v=l.value,p!==!0||v===null){const g=f+m*4,_=h.matrixWorldInverse;s.getNormalMatrix(_),(v===null||v.length<g)&&(v=new Float32Array(g));for(let S=0,x=f;S!==m;++S,x+=4)o.copy(d[S]).applyMatrix4(_,s),o.normal.toArray(v,x),v[x+3]=o.constant}l.value=v,l.needsUpdate=!0}return e.numPlanes=m,e.numIntersection=0,v}}function YLe(n){let e=new WeakMap;function t(o,s){return s===BC?o.mapping=xv:s===zC&&(o.mapping=wv),o}function i(o){if(o&&o.isTexture){const s=o.mapping;if(s===BC||s===zC)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 sPe(l.height);return u.fromEquirectangularTexture(n,o),e.set(o,u),o.addEventListener("dispose",r),t(u.texture,o.mapping)}else return null}}return o}function r(o){const s=o.target;s.removeEventListener("dispose",r);const l=e.get(s);l!==void 0&&(e.delete(s),l.dispose())}function a(){e=new WeakMap}return{get:i,dispose:a}}class a7 extends VQ{constructor(e=-1,t=1,i=1,r=-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=i,this.bottom=r,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,i,r,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=i,this.view.offsetY=r,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),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let a=i-e,o=i+e,s=r+t,l=r-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 N2=4,lV=[.125,.215,.35,.446,.526,.582],tp=20,qw=new a7,uV=new Jn;let Xw=null,Yw=0,Kw=0;const qf=(1+Math.sqrt(5))/2,d2=1/qf,cV=[new Le(1,1,1),new Le(-1,1,1),new Le(1,1,-1),new Le(-1,1,-1),new Le(0,qf,d2),new Le(0,qf,-d2),new Le(d2,0,qf),new Le(-d2,0,qf),new Le(qf,d2,0),new Le(-qf,d2,0)];class dV{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,i=.1,r=100){Xw=this._renderer.getRenderTarget(),Yw=this._renderer.getActiveCubeFace(),Kw=this._renderer.getActiveMipmapLevel(),this._setSize(256);const a=this._allocateTargets();return a.depthBuffer=!0,this._sceneToCubeUV(e,i,r,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=pV(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=fV(),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(Xw,Yw,Kw),e.scissorTest=!1,s4(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===xv||e.mapping===wv?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Xw=this._renderer.getRenderTarget(),Yw=this._renderer.getActiveCubeFace(),Kw=this._renderer.getActiveMipmapLevel();const i=t||this._allocateTargets();return this._textureToCubeUV(e,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,i={magFilter:ao,minFilter:ao,generateMipmaps:!1,type:K9,format:y0,colorSpace:bo,depthBuffer:!1},r=hV(e,t,i);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=hV(e,t,i);const{_lodMax:a}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=KLe(a)),this._blurMaterial=ZLe(a,e,t)}return r}_compileMaterial(e){const t=new fr(this._lodPlanes[0],e);this._renderer.compile(t,qw)}_sceneToCubeUV(e,t,i,r){const s=new ss(90,1,t,i),l=[1,-1,1,1,1,1],u=[1,1,1,-1,-1,-1],c=this._renderer,d=c.autoClear,h=c.toneMapping;c.getClearColor(uV),c.toneMapping=Sh,c.autoClear=!1;const f=new Mr({name:"PMREM.Background",side:rl,depthWrite:!1,depthTest:!1}),p=new fr(new em,f);let m=!1;const v=e.background;v?v.isColor&&(f.color.copy(v),e.background=null,m=!0):(f.color.copy(uV),m=!0);for(let g=0;g<6;g++){const _=g%3;_===0?(s.up.set(0,l[g],0),s.lookAt(u[g],0,0)):_===1?(s.up.set(0,0,l[g]),s.lookAt(0,u[g],0)):(s.up.set(0,l[g],0),s.lookAt(0,0,u[g]));const S=this._cubeSize;s4(r,_*S,g>2?S:0,S,S),c.setRenderTarget(r),m&&c.render(p,s),c.render(e,s)}p.geometry.dispose(),p.material.dispose(),c.toneMapping=h,c.autoClear=d,e.background=v}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===xv||e.mapping===wv;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=pV()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=fV());const a=r?this._cubemapMaterial:this._equirectMaterial,o=new fr(this._lodPlanes[0],a),s=a.uniforms;s.envMap.value=e;const l=this._cubeSize;s4(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,qw)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;r<this._lodPlanes.length;r++){const a=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),o=cV[(r-1)%cV.length];this._blur(e,r-1,r,a,o)}t.autoClear=i}_blur(e,t,i,r,a){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,i,r,"latitudinal",a),this._halfBlur(o,e,i,i,r,"longitudinal",a)}_halfBlur(e,t,i,r,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,d=new fr(this._lodPlanes[r],u),h=u.uniforms,f=this._sizeLods[i]-1,p=isFinite(a)?Math.PI/(2*f):2*Math.PI/(2*tp-1),m=a/p,v=isFinite(a)?1+Math.floor(c*m):tp;v>tp&&console.warn(`sigmaRadians, ${a}, is too large and will clip, as it requested ${v} samples when the maximum is set to ${tp}`);const g=[];let _=0;for(let M=0;M<tp;++M){const I=M/m,D=Math.exp(-I*I/2);g.push(D),M===0?_+=D:M<v&&(_+=2*D)}for(let M=0;M<g.length;M++)g[M]=g[M]/_;h.envMap.value=e.texture,h.samples.value=v,h.weights.value=g,h.latitudinal.value=o==="latitudinal",s&&(h.poleAxis.value=s);const{_lodMax:S}=this;h.dTheta.value=p,h.mipInt.value=S-i;const x=this._sizeLods[r],A=3*x*(r>S-N2?r-S+N2:0),C=4*(this._cubeSize-x);s4(t,A,C,3*x,2*x),l.setRenderTarget(t),l.render(d,qw)}}function KLe(n){const e=[],t=[],i=[];let r=n;const a=n-N2+1+lV.length;for(let o=0;o<a;o++){const s=Math.pow(2,r);t.push(s);let l=1/s;o>n-N2?l=lV[o-n+N2-1]:o===0&&(l=0),i.push(l);const u=1/(s-2),c=-u,d=1+u,h=[c,c,d,c,d,d,c,c,d,d,c,d],f=6,p=6,m=3,v=2,g=1,_=new Float32Array(m*p*f),S=new Float32Array(v*p*f),x=new Float32Array(g*p*f);for(let C=0;C<f;C++){const M=C%3*2/3-1,I=C>2?0:-1,D=[M,I,0,M+2/3,I,0,M+2/3,I+1,0,M,I,0,M+2/3,I+1,0,M,I+1,0];_.set(D,m*p*C),S.set(h,v*p*C);const E=[C,C,C,C,C,C];x.set(E,g*p*C)}const A=new Qr;A.setAttribute("position",new La(_,m)),A.setAttribute("uv",new La(S,v)),A.setAttribute("faceIndex",new La(x,g)),e.push(A),r>N2&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function hV(n,e,t){const i=new Hp(n,e,t);return i.texture.mapping=n7,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function s4(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function ZLe(n,e,t){const i=new Float32Array(tp),r=new Le(0,1,0);return new Jc({name:"SphericalGaussianBlur",defines:{n:tp,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:pR(),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:_h,depthTest:!1,depthWrite:!1})}function fV(){return new Jc({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:pR(),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:_h,depthTest:!1,depthWrite:!1})}function pV(){return new Jc({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:pR(),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:_h,depthTest:!1,depthWrite:!1})}function pR(){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 JLe(n){let e=new WeakMap,t=null;function i(s){if(s&&s.isTexture){const l=s.mapping,u=l===BC||l===zC,c=l===xv||l===wv;if(u||c)if(s.isRenderTargetTexture&&s.needsPMREMUpdate===!0){s.needsPMREMUpdate=!1;let d=e.get(s);return t===null&&(t=new dV(n)),d=u?t.fromEquirectangular(s,d):t.fromCubemap(s,d),e.set(s,d),d.texture}else{if(e.has(s))return e.get(s).texture;{const d=s.image;if(u&&d&&d.height>0||c&&d&&r(d)){t===null&&(t=new dV(n));const h=u?t.fromEquirectangular(s):t.fromCubemap(s);return e.set(s,h),s.addEventListener("dispose",a),h.texture}else return null}}}return s}function r(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:i,dispose:o}}function QLe(n){const e={};function t(i){if(e[i]!==void 0)return e[i];let r;switch(i){case"WEBGL_depth_texture":r=n.getExtension("WEBGL_depth_texture")||n.getExtension("MOZ_WEBGL_depth_texture")||n.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=n.getExtension("WEBGL_compressed_texture_s3tc")||n.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=n.getExtension("WEBGL_compressed_texture_pvrtc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=n.getExtension(i)}return e[i]=r,r}return{has:function(i){return t(i)!==null},init:function(i){i.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(i){const r=t(i);return r===null&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function eIe(n,e,t,i){const r={},a=new WeakMap;function o(d){const h=d.target;h.index!==null&&e.remove(h.index);for(const p in h.attributes)e.remove(h.attributes[p]);for(const p in h.morphAttributes){const m=h.morphAttributes[p];for(let v=0,g=m.length;v<g;v++)e.remove(m[v])}h.removeEventListener("dispose",o),delete r[h.id];const f=a.get(h);f&&(e.remove(f),a.delete(h)),i.releaseStatesOfGeometry(h),h.isInstancedBufferGeometry===!0&&delete h._maxInstanceCount,t.memory.geometries--}function s(d,h){return r[h.id]===!0||(h.addEventListener("dispose",o),r[h.id]=!0,t.memory.geometries++),h}function l(d){const h=d.attributes;for(const p in h)e.update(h[p],n.ARRAY_BUFFER);const f=d.morphAttributes;for(const p in f){const m=f[p];for(let v=0,g=m.length;v<g;v++)e.update(m[v],n.ARRAY_BUFFER)}}function u(d){const h=[],f=d.index,p=d.attributes.position;let m=0;if(f!==null){const _=f.array;m=f.version;for(let S=0,x=_.length;S<x;S+=3){const A=_[S+0],C=_[S+1],M=_[S+2];h.push(A,C,C,M,M,A)}}else if(p!==void 0){const _=p.array;m=p.version;for(let S=0,x=_.length/3-1;S<x;S+=3){const A=S+0,C=S+1,M=S+2;h.push(A,C,C,M,M,A)}}else return;const v=new(NQ(h)?GQ:zQ)(h,1);v.version=m;const g=a.get(d);g&&e.remove(g),a.set(d,v)}function c(d){const h=a.get(d);if(h){const f=d.index;f!==null&&h.version<f.version&&u(d)}else u(d);return a.get(d)}return{get:s,update:l,getWireframeAttribute:c}}function tIe(n,e,t,i){const r=i.isWebGL2;let a;function o(f){a=f}let s,l;function u(f){s=f.type,l=f.bytesPerElement}function c(f,p){n.drawElements(a,p,s,f*l),t.update(p,a,1)}function d(f,p,m){if(m===0)return;let v,g;if(r)v=n,g="drawElementsInstanced";else if(v=e.get("ANGLE_instanced_arrays"),g="drawElementsInstancedANGLE",v===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}v[g](a,p,s,f*l,m),t.update(p,a,m)}function h(f,p,m){if(m===0)return;const v=e.get("WEBGL_multi_draw");if(v===null)for(let g=0;g<m;g++)this.render(f[g]/l,p[g]);else{v.multiDrawElementsWEBGL(a,p,0,s,f,0,m);let g=0;for(let _=0;_<m;_++)g+=p[_];t.update(g,a,1)}}this.setMode=o,this.setIndex=u,this.render=c,this.renderInstances=d,this.renderMultiDraw=h}function nIe(n){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function i(a,o,s){switch(t.calls++,o){case n.TRIANGLES:t.triangles+=s*(a/3);break;case n.LINES:t.lines+=s*(a/2);break;case n.LINE_STRIP:t.lines+=s*(a-1);break;case n.LINE_LOOP:t.lines+=s*a;break;case n.POINTS:t.points+=s*a;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function r(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:r,update:i}}function iIe(n,e){return n[0]-e[0]}function rIe(n,e){return Math.abs(e[1])-Math.abs(n[1])}function aIe(n,e,t){const i={},r=new Float32Array(8),a=new WeakMap,o=new Er,s=[];for(let u=0;u<8;u++)s[u]=[u,0];function l(u,c,d){const h=u.morphTargetInfluences;if(e.isWebGL2===!0){const f=c.morphAttributes.position||c.morphAttributes.normal||c.morphAttributes.color,p=f!==void 0?f.length:0;let m=a.get(c);if(m===void 0||m.count!==p){let G=function(){F.dispose(),a.delete(c),c.removeEventListener("dispose",G)};m!==void 0&&m.texture.dispose();const _=c.morphAttributes.position!==void 0,S=c.morphAttributes.normal!==void 0,x=c.morphAttributes.color!==void 0,A=c.morphAttributes.position||[],C=c.morphAttributes.normal||[],M=c.morphAttributes.color||[];let I=0;_===!0&&(I=1),S===!0&&(I=2),x===!0&&(I=3);let D=c.attributes.position.count*I,E=1;D>e.maxTextureSize&&(E=Math.ceil(D/e.maxTextureSize),D=e.maxTextureSize);const P=new Float32Array(D*E*4*p),F=new OQ(P,D,E,p);F.type=Nu,F.needsUpdate=!0;const V=I*4;for(let W=0;W<p;W++){const Y=A[W],Q=C[W],K=M[W],ae=D*E*4*W;for(let ie=0;ie<Y.count;ie++){const he=ie*V;_===!0&&(o.fromBufferAttribute(Y,ie),P[ae+he+0]=o.x,P[ae+he+1]=o.y,P[ae+he+2]=o.z,P[ae+he+3]=0),S===!0&&(o.fromBufferAttribute(Q,ie),P[ae+he+4]=o.x,P[ae+he+5]=o.y,P[ae+he+6]=o.z,P[ae+he+7]=0),x===!0&&(o.fromBufferAttribute(K,ie),P[ae+he+8]=o.x,P[ae+he+9]=o.y,P[ae+he+10]=o.z,P[ae+he+11]=K.itemSize===4?o.w:1)}}m={count:p,texture:F,size:new on(D,E)},a.set(c,m),c.addEventListener("dispose",G)}let v=0;for(let _=0;_<h.length;_++)v+=h[_];const g=c.morphTargetsRelative?1:1-v;d.getUniforms().setValue(n,"morphTargetBaseInfluence",g),d.getUniforms().setValue(n,"morphTargetInfluences",h),d.getUniforms().setValue(n,"morphTargetsTexture",m.texture,t),d.getUniforms().setValue(n,"morphTargetsTextureSize",m.size)}else{const f=h===void 0?0:h.length;let p=i[c.id];if(p===void 0||p.length!==f){p=[];for(let S=0;S<f;S++)p[S]=[S,0];i[c.id]=p}for(let S=0;S<f;S++){const x=p[S];x[0]=S,x[1]=h[S]}p.sort(rIe);for(let S=0;S<8;S++)S<f&&p[S][1]?(s[S][0]=p[S][0],s[S][1]=p[S][1]):(s[S][0]=Number.MAX_SAFE_INTEGER,s[S][1]=0);s.sort(iIe);const m=c.morphAttributes.position,v=c.morphAttributes.normal;let g=0;for(let S=0;S<8;S++){const x=s[S],A=x[0],C=x[1];A!==Number.MAX_SAFE_INTEGER&&C?(m&&c.getAttribute("morphTarget"+S)!==m[A]&&c.setAttribute("morphTarget"+S,m[A]),v&&c.getAttribute("morphNormal"+S)!==v[A]&&c.setAttribute("morphNormal"+S,v[A]),r[S]=C,g+=C):(m&&c.hasAttribute("morphTarget"+S)===!0&&c.deleteAttribute("morphTarget"+S),v&&c.hasAttribute("morphNormal"+S)===!0&&c.deleteAttribute("morphNormal"+S),r[S]=0)}const _=c.morphTargetsRelative?1:1-g;d.getUniforms().setValue(n,"morphTargetBaseInfluence",_),d.getUniforms().setValue(n,"morphTargetInfluences",r)}}return{update:l}}function oIe(n,e,t,i){let r=new WeakMap;function a(l){const u=i.render.frame,c=l.geometry,d=e.get(l,c);if(r.get(d)!==u&&(e.update(d),r.set(d,u)),l.isInstancedMesh&&(l.hasEventListener("dispose",s)===!1&&l.addEventListener("dispose",s),r.get(l)!==u&&(t.update(l.instanceMatrix,n.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,n.ARRAY_BUFFER),r.set(l,u))),l.isSkinnedMesh){const h=l.skeleton;r.get(h)!==u&&(h.update(),r.set(h,u))}return d}function o(){r=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 jQ extends yo{constructor(e,t,i,r,a,o,s,l,u,c){if(c=c!==void 0?c:Lp,c!==Lp&&c!==Tv)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&c===Lp&&(i=uh),i===void 0&&c===Tv&&(i=Rp),super(null,r,a,o,s,l,c,i,u),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=s!==void 0?s:mo,this.minFilter=l!==void 0?l:mo,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 $Q=new yo,qQ=new jQ(1,1);qQ.compareFunction=DQ;const XQ=new OQ,YQ=new jEe,KQ=new HQ,vV=[],mV=[],gV=new Float32Array(16),yV=new Float32Array(9),_V=new Float32Array(4);function tm(n,e,t){const i=n[0];if(i<=0||i>0)return n;const r=e*t;let a=vV[r];if(a===void 0&&(a=new Float32Array(r),vV[r]=a),e!==0){i.toArray(a,0);for(let o=1,s=0;o!==e;++o)s+=t,n[o].toArray(a,s)}return a}function xo(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t<i;t++)if(n[t]!==e[t])return!1;return!0}function wo(n,e){for(let t=0,i=e.length;t<i;t++)n[t]=e[t]}function o7(n,e){let t=mV[e];t===void 0&&(t=new Int32Array(e),mV[e]=t);for(let i=0;i!==e;++i)t[i]=n.allocateTextureUnit();return t}function sIe(n,e){const t=this.cache;t[0]!==e&&(n.uniform1f(this.addr,e),t[0]=e)}function lIe(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(xo(t,e))return;n.uniform2fv(this.addr,e),wo(t,e)}}function uIe(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.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)&&(n.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(xo(t,e))return;n.uniform3fv(this.addr,e),wo(t,e)}}function cIe(n,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)&&(n.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(xo(t,e))return;n.uniform4fv(this.addr,e),wo(t,e)}}function dIe(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(xo(t,e))return;n.uniformMatrix2fv(this.addr,!1,e),wo(t,e)}else{if(xo(t,i))return;_V.set(i),n.uniformMatrix2fv(this.addr,!1,_V),wo(t,i)}}function hIe(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(xo(t,e))return;n.uniformMatrix3fv(this.addr,!1,e),wo(t,e)}else{if(xo(t,i))return;yV.set(i),n.uniformMatrix3fv(this.addr,!1,yV),wo(t,i)}}function fIe(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(xo(t,e))return;n.uniformMatrix4fv(this.addr,!1,e),wo(t,e)}else{if(xo(t,i))return;gV.set(i),n.uniformMatrix4fv(this.addr,!1,gV),wo(t,i)}}function pIe(n,e){const t=this.cache;t[0]!==e&&(n.uniform1i(this.addr,e),t[0]=e)}function vIe(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(xo(t,e))return;n.uniform2iv(this.addr,e),wo(t,e)}}function mIe(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(xo(t,e))return;n.uniform3iv(this.addr,e),wo(t,e)}}function gIe(n,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)&&(n.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(xo(t,e))return;n.uniform4iv(this.addr,e),wo(t,e)}}function yIe(n,e){const t=this.cache;t[0]!==e&&(n.uniform1ui(this.addr,e),t[0]=e)}function _Ie(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(xo(t,e))return;n.uniform2uiv(this.addr,e),wo(t,e)}}function SIe(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(xo(t,e))return;n.uniform3uiv(this.addr,e),wo(t,e)}}function bIe(n,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)&&(n.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(xo(t,e))return;n.uniform4uiv(this.addr,e),wo(t,e)}}function xIe(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r);const a=this.type===n.SAMPLER_2D_SHADOW?qQ:$Q;t.setTexture2D(e||a,r)}function wIe(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTexture3D(e||YQ,r)}function TIe(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTextureCube(e||KQ,r)}function AIe(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTexture2DArray(e||XQ,r)}function CIe(n){switch(n){case 5126:return sIe;case 35664:return lIe;case 35665:return uIe;case 35666:return cIe;case 35674:return dIe;case 35675:return hIe;case 35676:return fIe;case 5124:case 35670:return pIe;case 35667:case 35671:return vIe;case 35668:case 35672:return mIe;case 35669:case 35673:return gIe;case 5125:return yIe;case 36294:return _Ie;case 36295:return SIe;case 36296:return bIe;case 35678:case 36198:case 36298:case 36306:case 35682:return xIe;case 35679:case 36299:case 36307:return wIe;case 35680:case 36300:case 36308:case 36293:return TIe;case 36289:case 36303:case 36311:case 36292:return AIe}}function MIe(n,e){n.uniform1fv(this.addr,e)}function EIe(n,e){const t=tm(e,this.size,2);n.uniform2fv(this.addr,t)}function PIe(n,e){const t=tm(e,this.size,3);n.uniform3fv(this.addr,t)}function RIe(n,e){const t=tm(e,this.size,4);n.uniform4fv(this.addr,t)}function LIe(n,e){const t=tm(e,this.size,4);n.uniformMatrix2fv(this.addr,!1,t)}function IIe(n,e){const t=tm(e,this.size,9);n.uniformMatrix3fv(this.addr,!1,t)}function DIe(n,e){const t=tm(e,this.size,16);n.uniformMatrix4fv(this.addr,!1,t)}function NIe(n,e){n.uniform1iv(this.addr,e)}function kIe(n,e){n.uniform2iv(this.addr,e)}function FIe(n,e){n.uniform3iv(this.addr,e)}function OIe(n,e){n.uniform4iv(this.addr,e)}function BIe(n,e){n.uniform1uiv(this.addr,e)}function zIe(n,e){n.uniform2uiv(this.addr,e)}function GIe(n,e){n.uniform3uiv(this.addr,e)}function UIe(n,e){n.uniform4uiv(this.addr,e)}function VIe(n,e,t){const i=this.cache,r=e.length,a=o7(t,r);xo(i,a)||(n.uniform1iv(this.addr,a),wo(i,a));for(let o=0;o!==r;++o)t.setTexture2D(e[o]||$Q,a[o])}function HIe(n,e,t){const i=this.cache,r=e.length,a=o7(t,r);xo(i,a)||(n.uniform1iv(this.addr,a),wo(i,a));for(let o=0;o!==r;++o)t.setTexture3D(e[o]||YQ,a[o])}function WIe(n,e,t){const i=this.cache,r=e.length,a=o7(t,r);xo(i,a)||(n.uniform1iv(this.addr,a),wo(i,a));for(let o=0;o!==r;++o)t.setTextureCube(e[o]||KQ,a[o])}function jIe(n,e,t){const i=this.cache,r=e.length,a=o7(t,r);xo(i,a)||(n.uniform1iv(this.addr,a),wo(i,a));for(let o=0;o!==r;++o)t.setTexture2DArray(e[o]||XQ,a[o])}function $Ie(n){switch(n){case 5126:return MIe;case 35664:return EIe;case 35665:return PIe;case 35666:return RIe;case 35674:return LIe;case 35675:return IIe;case 35676:return DIe;case 5124:case 35670:return NIe;case 35667:case 35671:return kIe;case 35668:case 35672:return FIe;case 35669:case 35673:return OIe;case 5125:return BIe;case 36294:return zIe;case 36295:return GIe;case 36296:return UIe;case 35678:case 36198:case 36298:case 36306:case 35682:return VIe;case 35679:case 36299:case 36307:return HIe;case 35680:case 36300:case 36308:case 36293:return WIe;case 36289:case 36303:case 36311:case 36292:return jIe}}class qIe{constructor(e,t,i){this.id=e,this.addr=i,this.cache=[],this.type=t.type,this.setValue=CIe(t.type)}}class XIe{constructor(e,t,i){this.id=e,this.addr=i,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=$Ie(t.type)}}class YIe{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,i){const r=this.seq;for(let a=0,o=r.length;a!==o;++a){const s=r[a];s.setValue(e,t[s.id],i)}}}const Zw=/(\w+)(\])?(\[|\.)?/g;function SV(n,e){n.seq.push(e),n.map[e.id]=e}function KIe(n,e,t){const i=n.name,r=i.length;for(Zw.lastIndex=0;;){const a=Zw.exec(i),o=Zw.lastIndex;let s=a[1];const l=a[2]==="]",u=a[3];if(l&&(s=s|0),u===void 0||u==="["&&o+2===r){SV(t,u===void 0?new qIe(s,n,e):new XIe(s,n,e));break}else{let d=t.map[s];d===void 0&&(d=new YIe(s),SV(t,d)),t=d}}}class m5{constructor(e,t){this.seq=[],this.map={};const i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let r=0;r<i;++r){const a=e.getActiveUniform(t,r),o=e.getUniformLocation(t,a.name);KIe(a,o,this)}}setValue(e,t,i,r){const a=this.map[t];a!==void 0&&a.setValue(e,i,r)}setOptional(e,t,i){const r=t[i];r!==void 0&&this.setValue(e,i,r)}static upload(e,t,i,r){for(let a=0,o=t.length;a!==o;++a){const s=t[a],l=i[s.id];l.needsUpdate!==!1&&s.setValue(e,l.value,r)}}static seqWithValue(e,t){const i=[];for(let r=0,a=e.length;r!==a;++r){const o=e[r];o.id in t&&i.push(o)}return i}}function bV(n,e,t){const i=n.createShader(e);return n.shaderSource(i,t),n.compileShader(i),i}const ZIe=37297;let JIe=0;function QIe(n,e){const t=n.split(`
`),i=[],r=Math.max(e-6,0),a=Math.min(e+6,t.length);for(let o=r;o<a;o++){const s=o+1;i.push(`${s===e?">":" "} ${s}: ${t[o]}`)}return i.join(`
`)}function eDe(n){const e=Br.getPrimaries(Br.workingColorSpace),t=Br.getPrimaries(n);let i;switch(e===t?i="":e===O8&&t===F8?i="LinearDisplayP3ToLinearSRGB":e===F8&&t===O8&&(i="LinearSRGBToLinearDisplayP3"),n){case bo:case i7:return[i,"LinearTransferOETF"];case $r:case lR:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[i,"LinearTransferOETF"]}}function xV(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),r=n.getShaderInfoLog(e).trim();if(i&&r==="")return"";const a=/ERROR: 0:(\d+)/.exec(r);if(a){const o=parseInt(a[1]);return t.toUpperCase()+`
`+r+`
`+QIe(n.getShaderSource(e),o)}else return r}function tDe(n,e){const t=eDe(e);return`vec4 ${n}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function nDe(n,e){let t;switch(e){case QMe:t="Linear";break;case eEe:t="Reinhard";break;case tEe:t="OptimizedCineon";break;case nEe:t="ACESFilmic";break;case rEe:t="AgX";break;case iEe:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function iDe(n){return[n.extensionDerivatives||n.envMapCubeUVHeight||n.bumpMap||n.normalMapTangentSpace||n.clearcoatNormalMap||n.flatShading||n.alphaToCoverage||n.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(n.extensionFragDepth||n.logarithmicDepthBuffer)&&n.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",n.extensionDrawBuffers&&n.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(n.extensionShaderTextureLOD||n.envMap||n.transmission)&&n.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(k2).join(`
`)}function rDe(n){return[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",n.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(k2).join(`
`)}function aDe(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(`
`)}function oDe(n,e){const t={},i=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const a=n.getActiveAttrib(e,r),o=a.name;let s=1;a.type===n.FLOAT_MAT2&&(s=2),a.type===n.FLOAT_MAT3&&(s=3),a.type===n.FLOAT_MAT4&&(s=4),t[o]={type:a.type,location:n.getAttribLocation(e,o),locationSize:s}}return t}function k2(n){return n!==""}function wV(n,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return n.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 TV(n,e){return n.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const sDe=/^[ \t]*#include +<([\w\d./]+)>/gm;function jC(n){return n.replace(sDe,uDe)}const lDe=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function uDe(n,e){let t=ji[e];if(t===void 0){const i=lDe.get(e);if(i!==void 0)t=ji[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return jC(t)}const cDe=/#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 AV(n){return n.replace(cDe,dDe)}function dDe(n,e,t,i){let r="";for(let a=parseInt(e);a<parseInt(t);a++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+a+" ]").replace(/UNROLLED_LOOP_INDEX/g,a);return r}function CV(n){let e=`precision ${n.precision} float;
precision ${n.precision} int;
precision ${n.precision} sampler2D;
precision ${n.precision} samplerCube;
`;return n.isWebGL2&&(e+=`precision ${n.precision} sampler3D;
precision ${n.precision} sampler2DArray;
precision ${n.precision} sampler2DShadow;
precision ${n.precision} samplerCubeShadow;
precision ${n.precision} sampler2DArrayShadow;
precision ${n.precision} isampler2D;
precision ${n.precision} isampler3D;
precision ${n.precision} isamplerCube;
precision ${n.precision} isampler2DArray;
precision ${n.precision} usampler2D;
precision ${n.precision} usampler3D;
precision ${n.precision} usamplerCube;
precision ${n.precision} usampler2DArray;
`),n.precision==="highp"?e+=`
#define HIGH_PRECISION`:n.precision==="mediump"?e+=`
#define MEDIUM_PRECISION`:n.precision==="lowp"&&(e+=`
#define LOW_PRECISION`),e}function hDe(n){let e="SHADOWMAP_TYPE_BASIC";return n.shadowMapType===_Q?e="SHADOWMAP_TYPE_PCF":n.shadowMapType===RMe?e="SHADOWMAP_TYPE_PCF_SOFT":n.shadowMapType===Cc&&(e="SHADOWMAP_TYPE_VSM"),e}function fDe(n){let e="ENVMAP_TYPE_CUBE";if(n.envMap)switch(n.envMapMode){case xv:case wv:e="ENVMAP_TYPE_CUBE";break;case n7:e="ENVMAP_TYPE_CUBE_UV";break}return e}function pDe(n){let e="ENVMAP_MODE_REFLECTION";if(n.envMap)switch(n.envMapMode){case wv:e="ENVMAP_MODE_REFRACTION";break}return e}function vDe(n){let e="ENVMAP_BLENDING_NONE";if(n.envMap)switch(n.combine){case aR:e="ENVMAP_BLENDING_MULTIPLY";break;case ZMe:e="ENVMAP_BLENDING_MIX";break;case JMe:e="ENVMAP_BLENDING_ADD";break}return e}function mDe(n){const e=n.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),7*16)),texelHeight:i,maxMip:t}}function gDe(n,e,t,i){const r=n.getContext(),a=t.defines;let o=t.vertexShader,s=t.fragmentShader;const l=hDe(t),u=fDe(t),c=pDe(t),d=vDe(t),h=mDe(t),f=t.isWebGL2?"":iDe(t),p=rDe(t),m=aDe(a),v=r.createProgram();let g,_,S=t.glslVersion?"#version "+t.glslVersion+`
`:"";t.isRawShaderMaterial?(g=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,m].filter(k2).join(`
`),g.length>0&&(g+=`
`),_=[f,"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,m].filter(k2).join(`
`),_.length>0&&(_+=`
`)):(g=[CV(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,m,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(k2).join(`
`),_=[f,CV(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,m,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 "+d:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.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!==Sh?"#define TONE_MAPPING":"",t.toneMapping!==Sh?ji.tonemapping_pars_fragment:"",t.toneMapping!==Sh?nDe("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",ji.colorspace_pars_fragment,tDe("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",`
`].filter(k2).join(`
`)),o=jC(o),o=wV(o,t),o=TV(o,t),s=jC(s),s=wV(s,t),s=TV(s,t),o=AV(o),s=AV(s),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(S=`#version 300 es
`,g=[p,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(`
`)+`
`+g,_=["precision mediump sampler2DArray;","#define varying in",t.glslVersion===VU?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===VU?"":"#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(`
`)+`
`+_);const x=S+g+o,A=S+_+s,C=bV(r,r.VERTEX_SHADER,x),M=bV(r,r.FRAGMENT_SHADER,A);r.attachShader(v,C),r.attachShader(v,M),t.index0AttributeName!==void 0?r.bindAttribLocation(v,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(v,0,"position"),r.linkProgram(v);function I(F){if(n.debug.checkShaderErrors){const V=r.getProgramInfoLog(v).trim(),G=r.getShaderInfoLog(C).trim(),W=r.getShaderInfoLog(M).trim();let Y=!0,Q=!0;if(r.getProgramParameter(v,r.LINK_STATUS)===!1)if(Y=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(r,v,C,M);else{const K=xV(r,C,"vertex"),ae=xV(r,M,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(v,r.VALIDATE_STATUS)+`
Material Name: `+F.name+`
Material Type: `+F.type+`
Program Info Log: `+V+`
`+K+`
`+ae)}else V!==""?console.warn("THREE.WebGLProgram: Program Info Log:",V):(G===""||W==="")&&(Q=!1);Q&&(F.diagnostics={runnable:Y,programLog:V,vertexShader:{log:G,prefix:g},fragmentShader:{log:W,prefix:_}})}r.deleteShader(C),r.deleteShader(M),D=new m5(r,v),E=oDe(r,v)}let D;this.getUniforms=function(){return D===void 0&&I(this),D};let E;this.getAttributes=function(){return E===void 0&&I(this),E};let P=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return P===!1&&(P=r.getProgramParameter(v,ZIe)),P},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(v),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=JIe++,this.cacheKey=e,this.usedTimes=1,this.program=v,this.vertexShader=C,this.fragmentShader=M,this}let yDe=0;class _De{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),a=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(a)===!1&&(o.add(a),a.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.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 i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new SDe(e),t.set(e,i)),i}}class SDe{constructor(e){this.id=yDe++,this.code=e,this.usedTimes=0}}function bDe(n,e,t,i,r,a,o){const s=new dR,l=new _De,u=new Set,c=[],d=r.isWebGL2,h=r.logarithmicDepthBuffer,f=r.vertexTextures;let p=r.precision;const m={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(E){return u.add(E),E===0?"uv":`uv${E}`}function g(E,P,F,V,G){const W=V.fog,Y=G.geometry,Q=E.isMeshStandardMaterial?V.environment:null,K=(E.isMeshStandardMaterial?t:e).get(E.envMap||Q),ae=K&&K.mapping===n7?K.image.height:null,ie=m[E.type];E.precision!==null&&(p=r.getMaxPrecision(E.precision),p!==E.precision&&console.warn("THREE.WebGLProgram.getParameters:",E.precision,"not supported, using",p,"instead."));const he=Y.morphAttributes.position||Y.morphAttributes.normal||Y.morphAttributes.color,Ee=he!==void 0?he.length:0;let He=0;Y.morphAttributes.position!==void 0&&(He=1),Y.morphAttributes.normal!==void 0&&(He=2),Y.morphAttributes.color!==void 0&&(He=3);let xe,Fe,pt,Ot;if(ie){const ut=qs[ie];xe=ut.vertexShader,Fe=ut.fragmentShader}else xe=E.vertexShader,Fe=E.fragmentShader,l.update(E),pt=l.getVertexShaderID(E),Ot=l.getFragmentShaderID(E);const bt=n.getRenderTarget(),ht=G.isInstancedMesh===!0,Kt=G.isBatchedMesh===!0,Tt=!!E.map,Ae=!!E.matcap,Lt=!!K,vt=!!E.aoMap,Ft=!!E.lightMap,k=!!E.bumpMap,_t=!!E.normalMap,Ct=!!E.displacementMap,J=!!E.emissiveMap,ee=!!E.metalnessMap,Ue=!!E.roughnessMap,xt=E.anisotropy>0,Bt=E.clearcoat>0,Ce=E.iridescence>0,We=E.sheen>0,$e=E.transmission>0,mt=xt&&!!E.anisotropyMap,Yt=Bt&&!!E.clearcoatMap,st=Bt&&!!E.clearcoatNormalMap,it=Bt&&!!E.clearcoatRoughnessMap,Vt=Ce&&!!E.iridescenceMap,Zt=Ce&&!!E.iridescenceThicknessMap,nn=We&&!!E.sheenColorMap,cn=We&&!!E.sheenRoughnessMap,an=!!E.specularMap,Ln=!!E.specularColorMap,je=!!E.specularIntensityMap,Ht=$e&&!!E.transmissionMap,wn=$e&&!!E.thicknessMap,zn=!!E.gradientMap,Be=!!E.alphaMap,pn=E.alphaTest>0,dn=!!E.alphaHash,Un=!!E.extensions;let En=Sh;E.toneMapped&&(bt===null||bt.isXRRenderTarget===!0)&&(En=n.toneMapping);const Tn={isWebGL2:d,shaderID:ie,shaderType:E.type,shaderName:E.name,vertexShader:xe,fragmentShader:Fe,defines:E.defines,customVertexShaderID:pt,customFragmentShaderID:Ot,isRawShaderMaterial:E.isRawShaderMaterial===!0,glslVersion:E.glslVersion,precision:p,batching:Kt,instancing:ht,instancingColor:ht&&G.instanceColor!==null,supportsVertexTextures:f,outputColorSpace:bt===null?n.outputColorSpace:bt.isXRRenderTarget===!0?bt.texture.colorSpace:bo,alphaToCoverage:!!E.alphaToCoverage,map:Tt,matcap:Ae,envMap:Lt,envMapMode:Lt&&K.mapping,envMapCubeUVHeight:ae,aoMap:vt,lightMap:Ft,bumpMap:k,normalMap:_t,displacementMap:f&&Ct,emissiveMap:J,normalMapObjectSpace:_t&&E.normalMapType===yEe,normalMapTangentSpace:_t&&E.normalMapType===sR,metalnessMap:ee,roughnessMap:Ue,anisotropy:xt,anisotropyMap:mt,clearcoat:Bt,clearcoatMap:Yt,clearcoatNormalMap:st,clearcoatRoughnessMap:it,iridescence:Ce,iridescenceMap:Vt,iridescenceThicknessMap:Zt,sheen:We,sheenColorMap:nn,sheenRoughnessMap:cn,specularMap:an,specularColorMap:Ln,specularIntensityMap:je,transmission:$e,transmissionMap:Ht,thicknessMap:wn,gradientMap:zn,opaque:E.transparent===!1&&E.blending===Pp&&E.alphaToCoverage===!1,alphaMap:Be,alphaTest:pn,alphaHash:dn,combine:E.combine,mapUv:Tt&&v(E.map.channel),aoMapUv:vt&&v(E.aoMap.channel),lightMapUv:Ft&&v(E.lightMap.channel),bumpMapUv:k&&v(E.bumpMap.channel),normalMapUv:_t&&v(E.normalMap.channel),displacementMapUv:Ct&&v(E.displacementMap.channel),emissiveMapUv:J&&v(E.emissiveMap.channel),metalnessMapUv:ee&&v(E.metalnessMap.channel),roughnessMapUv:Ue&&v(E.roughnessMap.channel),anisotropyMapUv:mt&&v(E.anisotropyMap.channel),clearcoatMapUv:Yt&&v(E.clearcoatMap.channel),clearcoatNormalMapUv:st&&v(E.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:it&&v(E.clearcoatRoughnessMap.channel),iridescenceMapUv:Vt&&v(E.iridescenceMap.channel),iridescenceThicknessMapUv:Zt&&v(E.iridescenceThicknessMap.channel),sheenColorMapUv:nn&&v(E.sheenColorMap.channel),sheenRoughnessMapUv:cn&&v(E.sheenRoughnessMap.channel),specularMapUv:an&&v(E.specularMap.channel),specularColorMapUv:Ln&&v(E.specularColorMap.channel),specularIntensityMapUv:je&&v(E.specularIntensityMap.channel),transmissionMapUv:Ht&&v(E.transmissionMap.channel),thicknessMapUv:wn&&v(E.thicknessMap.channel),alphaMapUv:Be&&v(E.alphaMap.channel),vertexTangents:!!Y.attributes.tangent&&(_t||xt),vertexColors:E.vertexColors,vertexAlphas:E.vertexColors===!0&&!!Y.attributes.color&&Y.attributes.color.itemSize===4,pointsUvs:G.isPoints===!0&&!!Y.attributes.uv&&(Tt||Be),fog:!!W,useFog:E.fog===!0,fogExp2:!!W&&W.isFogExp2,flatShading:E.flatShading===!0,sizeAttenuation:E.sizeAttenuation===!0,logarithmicDepthBuffer:h,skinning:G.isSkinnedMesh===!0,morphTargets:Y.morphAttributes.position!==void 0,morphNormals:Y.morphAttributes.normal!==void 0,morphColors:Y.morphAttributes.color!==void 0,morphTargetsCount:Ee,morphTextureStride:He,numDirLights:P.directional.length,numPointLights:P.point.length,numSpotLights:P.spot.length,numSpotLightMaps:P.spotLightMap.length,numRectAreaLights:P.rectArea.length,numHemiLights:P.hemi.length,numDirLightShadows:P.directionalShadowMap.length,numPointLightShadows:P.pointShadowMap.length,numSpotLightShadows:P.spotShadowMap.length,numSpotLightShadowsWithMaps:P.numSpotLightShadowsWithMaps,numLightProbes:P.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:E.dithering,shadowMapEnabled:n.shadowMap.enabled&&F.length>0,shadowMapType:n.shadowMap.type,toneMapping:En,useLegacyLights:n._useLegacyLights,decodeVideoTexture:Tt&&E.map.isVideoTexture===!0&&Br.getTransfer(E.map.colorSpace)===ma,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===aa,flipSided:E.side===rl,useDepthPacking:E.depthPacking>=0,depthPacking:E.depthPacking||0,index0AttributeName:E.index0AttributeName,extensionDerivatives:Un&&E.extensions.derivatives===!0,extensionFragDepth:Un&&E.extensions.fragDepth===!0,extensionDrawBuffers:Un&&E.extensions.drawBuffers===!0,extensionShaderTextureLOD:Un&&E.extensions.shaderTextureLOD===!0,extensionClipCullDistance:Un&&E.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:Un&&E.extensions.multiDraw===!0&&i.has("WEBGL_multi_draw"),rendererExtensionFragDepth:d||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:d||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:d||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:E.customProgramCacheKey()};return Tn.vertexUv1s=u.has(1),Tn.vertexUv2s=u.has(2),Tn.vertexUv3s=u.has(3),u.clear(),Tn}function _(E){const P=[];if(E.shaderID?P.push(E.shaderID):(P.push(E.customVertexShaderID),P.push(E.customFragmentShaderID)),E.defines!==void 0)for(const F in E.defines)P.push(F),P.push(E.defines[F]);return E.isRawShaderMaterial===!1&&(S(P,E),x(P,E),P.push(n.outputColorSpace)),P.push(E.customProgramCacheKey),P.join()}function S(E,P){E.push(P.precision),E.push(P.outputColorSpace),E.push(P.envMapMode),E.push(P.envMapCubeUVHeight),E.push(P.mapUv),E.push(P.alphaMapUv),E.push(P.lightMapUv),E.push(P.aoMapUv),E.push(P.bumpMapUv),E.push(P.normalMapUv),E.push(P.displacementMapUv),E.push(P.emissiveMapUv),E.push(P.metalnessMapUv),E.push(P.roughnessMapUv),E.push(P.anisotropyMapUv),E.push(P.clearcoatMapUv),E.push(P.clearcoatNormalMapUv),E.push(P.clearcoatRoughnessMapUv),E.push(P.iridescenceMapUv),E.push(P.iridescenceThicknessMapUv),E.push(P.sheenColorMapUv),E.push(P.sheenRoughnessMapUv),E.push(P.specularMapUv),E.push(P.specularColorMapUv),E.push(P.specularIntensityMapUv),E.push(P.transmissionMapUv),E.push(P.thicknessMapUv),E.push(P.combine),E.push(P.fogExp2),E.push(P.sizeAttenuation),E.push(P.morphTargetsCount),E.push(P.morphAttributeCount),E.push(P.numDirLights),E.push(P.numPointLights),E.push(P.numSpotLights),E.push(P.numSpotLightMaps),E.push(P.numHemiLights),E.push(P.numRectAreaLights),E.push(P.numDirLightShadows),E.push(P.numPointLightShadows),E.push(P.numSpotLightShadows),E.push(P.numSpotLightShadowsWithMaps),E.push(P.numLightProbes),E.push(P.shadowMapType),E.push(P.toneMapping),E.push(P.numClippingPlanes),E.push(P.numClipIntersection),E.push(P.depthPacking)}function x(E,P){s.disableAll(),P.isWebGL2&&s.enable(0),P.supportsVertexTextures&&s.enable(1),P.instancing&&s.enable(2),P.instancingColor&&s.enable(3),P.matcap&&s.enable(4),P.envMap&&s.enable(5),P.normalMapObjectSpace&&s.enable(6),P.normalMapTangentSpace&&s.enable(7),P.clearcoat&&s.enable(8),P.iridescence&&s.enable(9),P.alphaTest&&s.enable(10),P.vertexColors&&s.enable(11),P.vertexAlphas&&s.enable(12),P.vertexUv1s&&s.enable(13),P.vertexUv2s&&s.enable(14),P.vertexUv3s&&s.enable(15),P.vertexTangents&&s.enable(16),P.anisotropy&&s.enable(17),P.alphaHash&&s.enable(18),P.batching&&s.enable(19),E.push(s.mask),s.disableAll(),P.fog&&s.enable(0),P.useFog&&s.enable(1),P.flatShading&&s.enable(2),P.logarithmicDepthBuffer&&s.enable(3),P.skinning&&s.enable(4),P.morphTargets&&s.enable(5),P.morphNormals&&s.enable(6),P.morphColors&&s.enable(7),P.premultipliedAlpha&&s.enable(8),P.shadowMapEnabled&&s.enable(9),P.useLegacyLights&&s.enable(10),P.doubleSided&&s.enable(11),P.flipSided&&s.enable(12),P.useDepthPacking&&s.enable(13),P.dithering&&s.enable(14),P.transmission&&s.enable(15),P.sheen&&s.enable(16),P.opaque&&s.enable(17),P.pointsUvs&&s.enable(18),P.decodeVideoTexture&&s.enable(19),P.alphaToCoverage&&s.enable(20),E.push(s.mask)}function A(E){const P=m[E.type];let F;if(P){const V=qs[P];F=hR.clone(V.uniforms)}else F=E.uniforms;return F}function C(E,P){let F;for(let V=0,G=c.length;V<G;V++){const W=c[V];if(W.cacheKey===P){F=W,++F.usedTimes;break}}return F===void 0&&(F=new gDe(n,P,E,a),c.push(F)),F}function M(E){if(--E.usedTimes===0){const P=c.indexOf(E);c[P]=c[c.length-1],c.pop(),E.destroy()}}function I(E){l.remove(E)}function D(){l.dispose()}return{getParameters:g,getProgramCacheKey:_,getUniforms:A,acquireProgram:C,releaseProgram:M,releaseShaderCache:I,programs:c,dispose:D}}function xDe(){let n=new WeakMap;function e(a){let o=n.get(a);return o===void 0&&(o={},n.set(a,o)),o}function t(a){n.delete(a)}function i(a,o,s){n.get(a)[o]=s}function r(){n=new WeakMap}return{get:e,remove:t,update:i,dispose:r}}function wDe(n,e){return n.groupOrder!==e.groupOrder?n.groupOrder-e.groupOrder:n.renderOrder!==e.renderOrder?n.renderOrder-e.renderOrder:n.material.id!==e.material.id?n.material.id-e.material.id:n.z!==e.z?n.z-e.z:n.id-e.id}function MV(n,e){return n.groupOrder!==e.groupOrder?n.groupOrder-e.groupOrder:n.renderOrder!==e.renderOrder?n.renderOrder-e.renderOrder:n.z!==e.z?e.z-n.z:n.id-e.id}function EV(){const n=[];let e=0;const t=[],i=[],r=[];function a(){e=0,t.length=0,i.length=0,r.length=0}function o(d,h,f,p,m,v){let g=n[e];return g===void 0?(g={id:d.id,object:d,geometry:h,material:f,groupOrder:p,renderOrder:d.renderOrder,z:m,group:v},n[e]=g):(g.id=d.id,g.object=d,g.geometry=h,g.material=f,g.groupOrder=p,g.renderOrder=d.renderOrder,g.z=m,g.group=v),e++,g}function s(d,h,f,p,m,v){const g=o(d,h,f,p,m,v);f.transmission>0?i.push(g):f.transparent===!0?r.push(g):t.push(g)}function l(d,h,f,p,m,v){const g=o(d,h,f,p,m,v);f.transmission>0?i.unshift(g):f.transparent===!0?r.unshift(g):t.unshift(g)}function u(d,h){t.length>1&&t.sort(d||wDe),i.length>1&&i.sort(h||MV),r.length>1&&r.sort(h||MV)}function c(){for(let d=e,h=n.length;d<h;d++){const f=n[d];if(f.id===null)break;f.id=null,f.object=null,f.geometry=null,f.material=null,f.group=null}}return{opaque:t,transmissive:i,transparent:r,init:a,push:s,unshift:l,finish:c,sort:u}}function TDe(){let n=new WeakMap;function e(i,r){const a=n.get(i);let o;return a===void 0?(o=new EV,n.set(i,[o])):r>=a.length?(o=new EV,a.push(o)):o=a[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function ADe(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new Le,color:new Jn};break;case"SpotLight":t={position:new Le,direction:new Le,color:new Jn,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new Le,color:new Jn,distance:0,decay:0};break;case"HemisphereLight":t={direction:new Le,skyColor:new Jn,groundColor:new Jn};break;case"RectAreaLight":t={color:new Jn,position:new Le,halfWidth:new Le,halfHeight:new Le};break}return n[e.id]=t,t}}}function CDe(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new on};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new on};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new on,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let MDe=0;function EDe(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function PDe(n,e){const t=new ADe,i=CDe(),r={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++)r.probe.push(new Le);const a=new Le,o=new Bi,s=new Bi;function l(c,d){let h=0,f=0,p=0;for(let F=0;F<9;F++)r.probe[F].set(0,0,0);let m=0,v=0,g=0,_=0,S=0,x=0,A=0,C=0,M=0,I=0,D=0;c.sort(EDe);const E=d===!0?Math.PI:1;for(let F=0,V=c.length;F<V;F++){const G=c[F],W=G.color,Y=G.intensity,Q=G.distance,K=G.shadow&&G.shadow.map?G.shadow.map.texture:null;if(G.isAmbientLight)h+=W.r*Y*E,f+=W.g*Y*E,p+=W.b*Y*E;else if(G.isLightProbe){for(let ae=0;ae<9;ae++)r.probe[ae].addScaledVector(G.sh.coefficients[ae],Y);D++}else if(G.isDirectionalLight){const ae=t.get(G);if(ae.color.copy(G.color).multiplyScalar(G.intensity*E),G.castShadow){const ie=G.shadow,he=i.get(G);he.shadowBias=ie.bias,he.shadowNormalBias=ie.normalBias,he.shadowRadius=ie.radius,he.shadowMapSize=ie.mapSize,r.directionalShadow[m]=he,r.directionalShadowMap[m]=K,r.directionalShadowMatrix[m]=G.shadow.matrix,x++}r.directional[m]=ae,m++}else if(G.isSpotLight){const ae=t.get(G);ae.position.setFromMatrixPosition(G.matrixWorld),ae.color.copy(W).multiplyScalar(Y*E),ae.distance=Q,ae.coneCos=Math.cos(G.angle),ae.penumbraCos=Math.cos(G.angle*(1-G.penumbra)),ae.decay=G.decay,r.spot[g]=ae;const ie=G.shadow;if(G.map&&(r.spotLightMap[M]=G.map,M++,ie.updateMatrices(G),G.castShadow&&I++),r.spotLightMatrix[g]=ie.matrix,G.castShadow){const he=i.get(G);he.shadowBias=ie.bias,he.shadowNormalBias=ie.normalBias,he.shadowRadius=ie.radius,he.shadowMapSize=ie.mapSize,r.spotShadow[g]=he,r.spotShadowMap[g]=K,C++}g++}else if(G.isRectAreaLight){const ae=t.get(G);ae.color.copy(W).multiplyScalar(Y),ae.halfWidth.set(G.width*.5,0,0),ae.halfHeight.set(0,G.height*.5,0),r.rectArea[_]=ae,_++}else if(G.isPointLight){const ae=t.get(G);if(ae.color.copy(G.color).multiplyScalar(G.intensity*E),ae.distance=G.distance,ae.decay=G.decay,G.castShadow){const ie=G.shadow,he=i.get(G);he.shadowBias=ie.bias,he.shadowNormalBias=ie.normalBias,he.shadowRadius=ie.radius,he.shadowMapSize=ie.mapSize,he.shadowCameraNear=ie.camera.near,he.shadowCameraFar=ie.camera.far,r.pointShadow[v]=he,r.pointShadowMap[v]=K,r.pointShadowMatrix[v]=G.shadow.matrix,A++}r.point[v]=ae,v++}else if(G.isHemisphereLight){const ae=t.get(G);ae.skyColor.copy(G.color).multiplyScalar(Y*E),ae.groundColor.copy(G.groundColor).multiplyScalar(Y*E),r.hemi[S]=ae,S++}}_>0&&(e.isWebGL2?n.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Pn.LTC_FLOAT_1,r.rectAreaLTC2=Pn.LTC_FLOAT_2):(r.rectAreaLTC1=Pn.LTC_HALF_1,r.rectAreaLTC2=Pn.LTC_HALF_2):n.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Pn.LTC_FLOAT_1,r.rectAreaLTC2=Pn.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=Pn.LTC_HALF_1,r.rectAreaLTC2=Pn.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=h,r.ambient[1]=f,r.ambient[2]=p;const P=r.hash;(P.directionalLength!==m||P.pointLength!==v||P.spotLength!==g||P.rectAreaLength!==_||P.hemiLength!==S||P.numDirectionalShadows!==x||P.numPointShadows!==A||P.numSpotShadows!==C||P.numSpotMaps!==M||P.numLightProbes!==D)&&(r.directional.length=m,r.spot.length=g,r.rectArea.length=_,r.point.length=v,r.hemi.length=S,r.directionalShadow.length=x,r.directionalShadowMap.length=x,r.pointShadow.length=A,r.pointShadowMap.length=A,r.spotShadow.length=C,r.spotShadowMap.length=C,r.directionalShadowMatrix.length=x,r.pointShadowMatrix.length=A,r.spotLightMatrix.length=C+M-I,r.spotLightMap.length=M,r.numSpotLightShadowsWithMaps=I,r.numLightProbes=D,P.directionalLength=m,P.pointLength=v,P.spotLength=g,P.rectAreaLength=_,P.hemiLength=S,P.numDirectionalShadows=x,P.numPointShadows=A,P.numSpotShadows=C,P.numSpotMaps=M,P.numLightProbes=D,r.version=MDe++)}function u(c,d){let h=0,f=0,p=0,m=0,v=0;const g=d.matrixWorldInverse;for(let _=0,S=c.length;_<S;_++){const x=c[_];if(x.isDirectionalLight){const A=r.directional[h];A.direction.setFromMatrixPosition(x.matrixWorld),a.setFromMatrixPosition(x.target.matrixWorld),A.direction.sub(a),A.direction.transformDirection(g),h++}else if(x.isSpotLight){const A=r.spot[p];A.position.setFromMatrixPosition(x.matrixWorld),A.position.applyMatrix4(g),A.direction.setFromMatrixPosition(x.matrixWorld),a.setFromMatrixPosition(x.target.matrixWorld),A.direction.sub(a),A.direction.transformDirection(g),p++}else if(x.isRectAreaLight){const A=r.rectArea[m];A.position.setFromMatrixPosition(x.matrixWorld),A.position.applyMatrix4(g),s.identity(),o.copy(x.matrixWorld),o.premultiply(g),s.extractRotation(o),A.halfWidth.set(x.width*.5,0,0),A.halfHeight.set(0,x.height*.5,0),A.halfWidth.applyMatrix4(s),A.halfHeight.applyMatrix4(s),m++}else if(x.isPointLight){const A=r.point[f];A.position.setFromMatrixPosition(x.matrixWorld),A.position.applyMatrix4(g),f++}else if(x.isHemisphereLight){const A=r.hemi[v];A.direction.setFromMatrixPosition(x.matrixWorld),A.direction.transformDirection(g),v++}}}return{setup:l,setupView:u,state:r}}function PV(n,e){const t=new PDe(n,e),i=[],r=[];function a(){i.length=0,r.length=0}function o(d){i.push(d)}function s(d){r.push(d)}function l(d){t.setup(i,d)}function u(d){t.setupView(i,d)}return{init:a,state:{lightsArray:i,shadowsArray:r,lights:t},setupLights:l,setupLightsView:u,pushLight:o,pushShadow:s}}function RDe(n,e){let t=new WeakMap;function i(a,o=0){const s=t.get(a);let l;return s===void 0?(l=new PV(n,e),t.set(a,[l])):o>=s.length?(l=new PV(n,e),s.push(l)):l=s[o],l}function r(){t=new WeakMap}return{get:i,dispose:r}}class LDe extends A0{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=mEe,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 IDe extends A0{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 DDe=`void main() {
gl_Position = vec4( position, 1.0 );
}`,NDe=`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 kDe(n,e,t){let i=new fR;const r=new on,a=new on,o=new Er,s=new LDe({depthPacking:gEe}),l=new IDe,u={},c=t.maxTextureSize,d={[Zc]:rl,[rl]:Zc,[aa]:aa},h=new Jc({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new on},radius:{value:4}},vertexShader:DDe,fragmentShader:NDe}),f=h.clone();f.defines.HORIZONTAL_PASS=1;const p=new Qr;p.setAttribute("position",new La(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const m=new fr(p,h),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=_Q;let g=this.type;this.render=function(C,M,I){if(v.enabled===!1||v.autoUpdate===!1&&v.needsUpdate===!1||C.length===0)return;const D=n.getRenderTarget(),E=n.getActiveCubeFace(),P=n.getActiveMipmapLevel(),F=n.state;F.setBlending(_h),F.buffers.color.setClear(1,1,1,1),F.buffers.depth.setTest(!0),F.setScissorTest(!1);const V=g!==Cc&&this.type===Cc,G=g===Cc&&this.type!==Cc;for(let W=0,Y=C.length;W<Y;W++){const Q=C[W],K=Q.shadow;if(K===void 0){console.warn("THREE.WebGLShadowMap:",Q,"has no shadow.");continue}if(K.autoUpdate===!1&&K.needsUpdate===!1)continue;r.copy(K.mapSize);const ae=K.getFrameExtents();if(r.multiply(ae),a.copy(K.mapSize),(r.x>c||r.y>c)&&(r.x>c&&(a.x=Math.floor(c/ae.x),r.x=a.x*ae.x,K.mapSize.x=a.x),r.y>c&&(a.y=Math.floor(c/ae.y),r.y=a.y*ae.y,K.mapSize.y=a.y)),K.map===null||V===!0||G===!0){const he=this.type!==Cc?{minFilter:mo,magFilter:mo}:{};K.map!==null&&K.map.dispose(),K.map=new Hp(r.x,r.y,he),K.map.texture.name=Q.name+".shadowMap",K.camera.updateProjectionMatrix()}n.setRenderTarget(K.map),n.clear();const ie=K.getViewportCount();for(let he=0;he<ie;he++){const Ee=K.getViewport(he);o.set(a.x*Ee.x,a.y*Ee.y,a.x*Ee.z,a.y*Ee.w),F.viewport(o),K.updateMatrices(Q,he),i=K.getFrustum(),x(M,I,K.camera,Q,this.type)}K.isPointLightShadow!==!0&&this.type===Cc&&_(K,I),K.needsUpdate=!1}g=this.type,v.needsUpdate=!1,n.setRenderTarget(D,E,P)};function _(C,M){const I=e.update(m);h.defines.VSM_SAMPLES!==C.blurSamples&&(h.defines.VSM_SAMPLES=C.blurSamples,f.defines.VSM_SAMPLES=C.blurSamples,h.needsUpdate=!0,f.needsUpdate=!0),C.mapPass===null&&(C.mapPass=new Hp(r.x,r.y)),h.uniforms.shadow_pass.value=C.map.texture,h.uniforms.resolution.value=C.mapSize,h.uniforms.radius.value=C.radius,n.setRenderTarget(C.mapPass),n.clear(),n.renderBufferDirect(M,null,I,h,m,null),f.uniforms.shadow_pass.value=C.mapPass.texture,f.uniforms.resolution.value=C.mapSize,f.uniforms.radius.value=C.radius,n.setRenderTarget(C.map),n.clear(),n.renderBufferDirect(M,null,I,f,m,null)}function S(C,M,I,D){let E=null;const P=I.isPointLight===!0?C.customDistanceMaterial:C.customDepthMaterial;if(P!==void 0)E=P;else if(E=I.isPointLight===!0?l:s,n.localClippingEnabled&&M.clipShadows===!0&&Array.isArray(M.clippingPlanes)&&M.clippingPlanes.length!==0||M.displacementMap&&M.displacementScale!==0||M.alphaMap&&M.alphaTest>0||M.map&&M.alphaTest>0){const F=E.uuid,V=M.uuid;let G=u[F];G===void 0&&(G={},u[F]=G);let W=G[V];W===void 0&&(W=E.clone(),G[V]=W,M.addEventListener("dispose",A)),E=W}if(E.visible=M.visible,E.wireframe=M.wireframe,D===Cc?E.side=M.shadowSide!==null?M.shadowSide:M.side:E.side=M.shadowSide!==null?M.shadowSide:d[M.side],E.alphaMap=M.alphaMap,E.alphaTest=M.alphaTest,E.map=M.map,E.clipShadows=M.clipShadows,E.clippingPlanes=M.clippingPlanes,E.clipIntersection=M.clipIntersection,E.displacementMap=M.displacementMap,E.displacementScale=M.displacementScale,E.displacementBias=M.displacementBias,E.wireframeLinewidth=M.wireframeLinewidth,E.linewidth=M.linewidth,I.isPointLight===!0&&E.isMeshDistanceMaterial===!0){const F=n.properties.get(E);F.light=I}return E}function x(C,M,I,D,E){if(C.visible===!1)return;if(C.layers.test(M.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&E===Cc)&&(!C.frustumCulled||i.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,C.matrixWorld);const V=e.update(C),G=C.material;if(Array.isArray(G)){const W=V.groups;for(let Y=0,Q=W.length;Y<Q;Y++){const K=W[Y],ae=G[K.materialIndex];if(ae&&ae.visible){const ie=S(C,ae,D,E);C.onBeforeShadow(n,C,M,I,V,ie,K),n.renderBufferDirect(I,null,V,ie,C,K),C.onAfterShadow(n,C,M,I,V,ie,K)}}}else if(G.visible){const W=S(C,G,D,E);C.onBeforeShadow(n,C,M,I,V,W,null),n.renderBufferDirect(I,null,V,W,C,null),C.onAfterShadow(n,C,M,I,V,W,null)}}const F=C.children;for(let V=0,G=F.length;V<G;V++)x(F[V],M,I,D,E)}function A(C){C.target.removeEventListener("dispose",A);for(const I in u){const D=u[I],E=C.target.uuid;E in D&&(D[E].dispose(),delete D[E])}}}function FDe(n,e,t){const i=t.isWebGL2;function r(){let Be=!1;const pn=new Er;let dn=null;const Un=new Er(0,0,0,0);return{setMask:function(En){dn!==En&&!Be&&(n.colorMask(En,En,En,En),dn=En)},setLocked:function(En){Be=En},setClear:function(En,Tn,ut,Jt,hn){hn===!0&&(En*=Jt,Tn*=Jt,ut*=Jt),pn.set(En,Tn,ut,Jt),Un.equals(pn)===!1&&(n.clearColor(En,Tn,ut,Jt),Un.copy(pn))},reset:function(){Be=!1,dn=null,Un.set(-1,0,0,0)}}}function a(){let Be=!1,pn=null,dn=null,Un=null;return{setTest:function(En){En?ht(n.DEPTH_TEST):Kt(n.DEPTH_TEST)},setMask:function(En){pn!==En&&!Be&&(n.depthMask(En),pn=En)},setFunc:function(En){if(dn!==En){switch(En){case WMe:n.depthFunc(n.NEVER);break;case jMe:n.depthFunc(n.ALWAYS);break;case $Me:n.depthFunc(n.LESS);break;case D8:n.depthFunc(n.LEQUAL);break;case qMe:n.depthFunc(n.EQUAL);break;case XMe:n.depthFunc(n.GEQUAL);break;case YMe:n.depthFunc(n.GREATER);break;case KMe:n.depthFunc(n.NOTEQUAL);break;default:n.depthFunc(n.LEQUAL)}dn=En}},setLocked:function(En){Be=En},setClear:function(En){Un!==En&&(n.clearDepth(En),Un=En)},reset:function(){Be=!1,pn=null,dn=null,Un=null}}}function o(){let Be=!1,pn=null,dn=null,Un=null,En=null,Tn=null,ut=null,Jt=null,hn=null;return{setTest:function(Nn){Be||(Nn?ht(n.STENCIL_TEST):Kt(n.STENCIL_TEST))},setMask:function(Nn){pn!==Nn&&!Be&&(n.stencilMask(Nn),pn=Nn)},setFunc:function(Nn,Re,lt){(dn!==Nn||Un!==Re||En!==lt)&&(n.stencilFunc(Nn,Re,lt),dn=Nn,Un=Re,En=lt)},setOp:function(Nn,Re,lt){(Tn!==Nn||ut!==Re||Jt!==lt)&&(n.stencilOp(Nn,Re,lt),Tn=Nn,ut=Re,Jt=lt)},setLocked:function(Nn){Be=Nn},setClear:function(Nn){hn!==Nn&&(n.clearStencil(Nn),hn=Nn)},reset:function(){Be=!1,pn=null,dn=null,Un=null,En=null,Tn=null,ut=null,Jt=null,hn=null}}}const s=new r,l=new a,u=new o,c=new WeakMap,d=new WeakMap;let h={},f={},p=new WeakMap,m=[],v=null,g=!1,_=null,S=null,x=null,A=null,C=null,M=null,I=null,D=new Jn(0,0,0),E=0,P=!1,F=null,V=null,G=null,W=null,Y=null;const Q=n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let K=!1,ae=0;const ie=n.getParameter(n.VERSION);ie.indexOf("WebGL")!==-1?(ae=parseFloat(/^WebGL (\d)/.exec(ie)[1]),K=ae>=1):ie.indexOf("OpenGL ES")!==-1&&(ae=parseFloat(/^OpenGL ES (\d)/.exec(ie)[1]),K=ae>=2);let he=null,Ee={};const He=n.getParameter(n.SCISSOR_BOX),xe=n.getParameter(n.VIEWPORT),Fe=new Er().fromArray(He),pt=new Er().fromArray(xe);function Ot(Be,pn,dn,Un){const En=new Uint8Array(4),Tn=n.createTexture();n.bindTexture(Be,Tn),n.texParameteri(Be,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(Be,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let ut=0;ut<dn;ut++)i&&(Be===n.TEXTURE_3D||Be===n.TEXTURE_2D_ARRAY)?n.texImage3D(pn,0,n.RGBA,1,1,Un,0,n.RGBA,n.UNSIGNED_BYTE,En):n.texImage2D(pn+ut,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,En);return Tn}const bt={};bt[n.TEXTURE_2D]=Ot(n.TEXTURE_2D,n.TEXTURE_2D,1),bt[n.TEXTURE_CUBE_MAP]=Ot(n.TEXTURE_CUBE_MAP,n.TEXTURE_CUBE_MAP_POSITIVE_X,6),i&&(bt[n.TEXTURE_2D_ARRAY]=Ot(n.TEXTURE_2D_ARRAY,n.TEXTURE_2D_ARRAY,1,1),bt[n.TEXTURE_3D]=Ot(n.TEXTURE_3D,n.TEXTURE_3D,1,1)),s.setClear(0,0,0,1),l.setClear(1),u.setClear(0),ht(n.DEPTH_TEST),l.setFunc(D8),Ct(!1),J(sU),ht(n.CULL_FACE),k(_h);function ht(Be){h[Be]!==!0&&(n.enable(Be),h[Be]=!0)}function Kt(Be){h[Be]!==!1&&(n.disable(Be),h[Be]=!1)}function Tt(Be,pn){return f[Be]!==pn?(n.bindFramebuffer(Be,pn),f[Be]=pn,i&&(Be===n.DRAW_FRAMEBUFFER&&(f[n.FRAMEBUFFER]=pn),Be===n.FRAMEBUFFER&&(f[n.DRAW_FRAMEBUFFER]=pn)),!0):!1}function Ae(Be,pn){let dn=m,Un=!1;if(Be)if(dn=p.get(pn),dn===void 0&&(dn=[],p.set(pn,dn)),Be.isWebGLMultipleRenderTargets){const En=Be.texture;if(dn.length!==En.length||dn[0]!==n.COLOR_ATTACHMENT0){for(let Tn=0,ut=En.length;Tn<ut;Tn++)dn[Tn]=n.COLOR_ATTACHMENT0+Tn;dn.length=En.length,Un=!0}}else dn[0]!==n.COLOR_ATTACHMENT0&&(dn[0]=n.COLOR_ATTACHMENT0,Un=!0);else dn[0]!==n.BACK&&(dn[0]=n.BACK,Un=!0);Un&&(t.isWebGL2?n.drawBuffers(dn):e.get("WEBGL_draw_buffers").drawBuffersWEBGL(dn))}function Lt(Be){return v!==Be?(n.useProgram(Be),v=Be,!0):!1}const vt={[Xd]:n.FUNC_ADD,[LMe]:n.FUNC_SUBTRACT,[IMe]:n.FUNC_REVERSE_SUBTRACT};if(i)vt[cU]=n.MIN,vt[dU]=n.MAX;else{const Be=e.get("EXT_blend_minmax");Be!==null&&(vt[cU]=Be.MIN_EXT,vt[dU]=Be.MAX_EXT)}const Ft={[DMe]:n.ZERO,[bQ]:n.ONE,[NMe]:n.SRC_COLOR,[FC]:n.SRC_ALPHA,[zMe]:n.SRC_ALPHA_SATURATE,[xQ]:n.DST_COLOR,[FMe]:n.DST_ALPHA,[kMe]:n.ONE_MINUS_SRC_COLOR,[OC]:n.ONE_MINUS_SRC_ALPHA,[BMe]:n.ONE_MINUS_DST_COLOR,[OMe]:n.ONE_MINUS_DST_ALPHA,[GMe]:n.CONSTANT_COLOR,[UMe]:n.ONE_MINUS_CONSTANT_COLOR,[VMe]:n.CONSTANT_ALPHA,[HMe]:n.ONE_MINUS_CONSTANT_ALPHA};function k(Be,pn,dn,Un,En,Tn,ut,Jt,hn,Nn){if(Be===_h){g===!0&&(Kt(n.BLEND),g=!1);return}if(g===!1&&(ht(n.BLEND),g=!0),Be!==SQ){if(Be!==_||Nn!==P){if((S!==Xd||C!==Xd)&&(n.blendEquation(n.FUNC_ADD),S=Xd,C=Xd),Nn)switch(Be){case Pp:n.blendFuncSeparate(n.ONE,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case Mo:n.blendFunc(n.ONE,n.ONE);break;case lU:n.blendFuncSeparate(n.ZERO,n.ONE_MINUS_SRC_COLOR,n.ZERO,n.ONE);break;case uU:n.blendFuncSeparate(n.ZERO,n.SRC_COLOR,n.ZERO,n.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",Be);break}else switch(Be){case Pp:n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case Mo:n.blendFunc(n.SRC_ALPHA,n.ONE);break;case lU:n.blendFuncSeparate(n.ZERO,n.ONE_MINUS_SRC_COLOR,n.ZERO,n.ONE);break;case uU:n.blendFunc(n.ZERO,n.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",Be);break}x=null,A=null,M=null,I=null,D.set(0,0,0),E=0,_=Be,P=Nn}return}En=En||pn,Tn=Tn||dn,ut=ut||Un,(pn!==S||En!==C)&&(n.blendEquationSeparate(vt[pn],vt[En]),S=pn,C=En),(dn!==x||Un!==A||Tn!==M||ut!==I)&&(n.blendFuncSeparate(Ft[dn],Ft[Un],Ft[Tn],Ft[ut]),x=dn,A=Un,M=Tn,I=ut),(Jt.equals(D)===!1||hn!==E)&&(n.blendColor(Jt.r,Jt.g,Jt.b,hn),D.copy(Jt),E=hn),_=Be,P=!1}function _t(Be,pn){Be.side===aa?Kt(n.CULL_FACE):ht(n.CULL_FACE);let dn=Be.side===rl;pn&&(dn=!dn),Ct(dn),Be.blending===Pp&&Be.transparent===!1?k(_h):k(Be.blending,Be.blendEquation,Be.blendSrc,Be.blendDst,Be.blendEquationAlpha,Be.blendSrcAlpha,Be.blendDstAlpha,Be.blendColor,Be.blendAlpha,Be.premultipliedAlpha),l.setFunc(Be.depthFunc),l.setTest(Be.depthTest),l.setMask(Be.depthWrite),s.setMask(Be.colorWrite);const Un=Be.stencilWrite;u.setTest(Un),Un&&(u.setMask(Be.stencilWriteMask),u.setFunc(Be.stencilFunc,Be.stencilRef,Be.stencilFuncMask),u.setOp(Be.stencilFail,Be.stencilZFail,Be.stencilZPass)),Ue(Be.polygonOffset,Be.polygonOffsetFactor,Be.polygonOffsetUnits),Be.alphaToCoverage===!0?ht(n.SAMPLE_ALPHA_TO_COVERAGE):Kt(n.SAMPLE_ALPHA_TO_COVERAGE)}function Ct(Be){F!==Be&&(Be?n.frontFace(n.CW):n.frontFace(n.CCW),F=Be)}function J(Be){Be!==EMe?(ht(n.CULL_FACE),Be!==V&&(Be===sU?n.cullFace(n.BACK):Be===PMe?n.cullFace(n.FRONT):n.cullFace(n.FRONT_AND_BACK))):Kt(n.CULL_FACE),V=Be}function ee(Be){Be!==G&&(K&&n.lineWidth(Be),G=Be)}function Ue(Be,pn,dn){Be?(ht(n.POLYGON_OFFSET_FILL),(W!==pn||Y!==dn)&&(n.polygonOffset(pn,dn),W=pn,Y=dn)):Kt(n.POLYGON_OFFSET_FILL)}function xt(Be){Be?ht(n.SCISSOR_TEST):Kt(n.SCISSOR_TEST)}function Bt(Be){Be===void 0&&(Be=n.TEXTURE0+Q-1),he!==Be&&(n.activeTexture(Be),he=Be)}function Ce(Be,pn,dn){dn===void 0&&(he===null?dn=n.TEXTURE0+Q-1:dn=he);let Un=Ee[dn];Un===void 0&&(Un={type:void 0,texture:void 0},Ee[dn]=Un),(Un.type!==Be||Un.texture!==pn)&&(he!==dn&&(n.activeTexture(dn),he=dn),n.bindTexture(Be,pn||bt[Be]),Un.type=Be,Un.texture=pn)}function We(){const Be=Ee[he];Be!==void 0&&Be.type!==void 0&&(n.bindTexture(Be.type,null),Be.type=void 0,Be.texture=void 0)}function $e(){try{n.compressedTexImage2D.apply(n,arguments)}catch(Be){console.error("THREE.WebGLState:",Be)}}function mt(){try{n.compressedTexImage3D.apply(n,arguments)}catch(Be){console.error("THREE.WebGLState:",Be)}}function Yt(){try{n.texSubImage2D.apply(n,arguments)}catch(Be){console.error("THREE.WebGLState:",Be)}}function st(){try{n.texSubImage3D.apply(n,arguments)}catch(Be){console.error("THREE.WebGLState:",Be)}}function it(){try{n.compressedTexSubImage2D.apply(n,arguments)}catch(Be){console.error("THREE.WebGLState:",Be)}}function Vt(){try{n.compressedTexSubImage3D.apply(n,arguments)}catch(Be){console.error("THREE.WebGLState:",Be)}}function Zt(){try{n.texStorage2D.apply(n,arguments)}catch(Be){console.error("THREE.WebGLState:",Be)}}function nn(){try{n.texStorage3D.apply(n,arguments)}catch(Be){console.error("THREE.WebGLState:",Be)}}function cn(){try{n.texImage2D.apply(n,arguments)}catch(Be){console.error("THREE.WebGLState:",Be)}}function an(){try{n.texImage3D.apply(n,arguments)}catch(Be){console.error("THREE.WebGLState:",Be)}}function Ln(Be){Fe.equals(Be)===!1&&(n.scissor(Be.x,Be.y,Be.z,Be.w),Fe.copy(Be))}function je(Be){pt.equals(Be)===!1&&(n.viewport(Be.x,Be.y,Be.z,Be.w),pt.copy(Be))}function Ht(Be,pn){let dn=d.get(pn);dn===void 0&&(dn=new WeakMap,d.set(pn,dn));let Un=dn.get(Be);Un===void 0&&(Un=n.getUniformBlockIndex(pn,Be.name),dn.set(Be,Un))}function wn(Be,pn){const Un=d.get(pn).get(Be);c.get(pn)!==Un&&(n.uniformBlockBinding(pn,Un,Be.__bindingPointIndex),c.set(pn,Un))}function zn(){n.disable(n.BLEND),n.disable(n.CULL_FACE),n.disable(n.DEPTH_TEST),n.disable(n.POLYGON_OFFSET_FILL),n.disable(n.SCISSOR_TEST),n.disable(n.STENCIL_TEST),n.disable(n.SAMPLE_ALPHA_TO_COVERAGE),n.blendEquation(n.FUNC_ADD),n.blendFunc(n.ONE,n.ZERO),n.blendFuncSeparate(n.ONE,n.ZERO,n.ONE,n.ZERO),n.blendColor(0,0,0,0),n.colorMask(!0,!0,!0,!0),n.clearColor(0,0,0,0),n.depthMask(!0),n.depthFunc(n.LESS),n.clearDepth(1),n.stencilMask(4294967295),n.stencilFunc(n.ALWAYS,0,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),n.clearStencil(0),n.cullFace(n.BACK),n.frontFace(n.CCW),n.polygonOffset(0,0),n.activeTexture(n.TEXTURE0),n.bindFramebuffer(n.FRAMEBUFFER,null),i===!0&&(n.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),n.bindFramebuffer(n.READ_FRAMEBUFFER,null)),n.useProgram(null),n.lineWidth(1),n.scissor(0,0,n.canvas.width,n.canvas.height),n.viewport(0,0,n.canvas.width,n.canvas.height),h={},he=null,Ee={},f={},p=new WeakMap,m=[],v=null,g=!1,_=null,S=null,x=null,A=null,C=null,M=null,I=null,D=new Jn(0,0,0),E=0,P=!1,F=null,V=null,G=null,W=null,Y=null,Fe.set(0,0,n.canvas.width,n.canvas.height),pt.set(0,0,n.canvas.width,n.canvas.height),s.reset(),l.reset(),u.reset()}return{buffers:{color:s,depth:l,stencil:u},enable:ht,disable:Kt,bindFramebuffer:Tt,drawBuffers:Ae,useProgram:Lt,setBlending:k,setMaterial:_t,setFlipSided:Ct,setCullFace:J,setLineWidth:ee,setPolygonOffset:Ue,setScissorTest:xt,activeTexture:Bt,bindTexture:Ce,unbindTexture:We,compressedTexImage2D:$e,compressedTexImage3D:mt,texImage2D:cn,texImage3D:an,updateUBOMapping:Ht,uniformBlockBinding:wn,texStorage2D:Zt,texStorage3D:nn,texSubImage2D:Yt,texSubImage3D:st,compressedTexSubImage2D:it,compressedTexSubImage3D:Vt,scissor:Ln,viewport:je,reset:zn}}function ODe(n,e,t,i,r,a,o){const s=r.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 d;const h=new WeakMap;let f=!1;try{f=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch(J){}function p(J,ee){return f?new OffscreenCanvas(J,ee):J9("canvas")}function m(J,ee,Ue,xt){let Bt=1;if((J.width>xt||J.height>xt)&&(Bt=xt/Math.max(J.width,J.height)),Bt<1||ee===!0)if(typeof HTMLImageElement!="undefined"&&J instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&J instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&J instanceof ImageBitmap){const Ce=ee?z8:Math.floor,We=Ce(Bt*J.width),$e=Ce(Bt*J.height);d===void 0&&(d=p(We,$e));const mt=Ue?p(We,$e):d;return mt.width=We,mt.height=$e,mt.getContext("2d").drawImage(J,0,0,We,$e),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+J.width+"x"+J.height+") to ("+We+"x"+$e+")."),mt}else return"data"in J&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+J.width+"x"+J.height+")."),J;return J}function v(J){return WC(J.width)&&WC(J.height)}function g(J){return s?!1:J.wrapS!==us||J.wrapT!==us||J.minFilter!==mo&&J.minFilter!==ao}function _(J,ee){return J.generateMipmaps&&ee&&J.minFilter!==mo&&J.minFilter!==ao}function S(J){n.generateMipmap(J)}function x(J,ee,Ue,xt,Bt=!1){if(s===!1)return ee;if(J!==null){if(n[J]!==void 0)return n[J];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+J+"'")}let Ce=ee;if(ee===n.RED&&(Ue===n.FLOAT&&(Ce=n.R32F),Ue===n.HALF_FLOAT&&(Ce=n.R16F),Ue===n.UNSIGNED_BYTE&&(Ce=n.R8)),ee===n.RED_INTEGER&&(Ue===n.UNSIGNED_BYTE&&(Ce=n.R8UI),Ue===n.UNSIGNED_SHORT&&(Ce=n.R16UI),Ue===n.UNSIGNED_INT&&(Ce=n.R32UI),Ue===n.BYTE&&(Ce=n.R8I),Ue===n.SHORT&&(Ce=n.R16I),Ue===n.INT&&(Ce=n.R32I)),ee===n.RG&&(Ue===n.FLOAT&&(Ce=n.RG32F),Ue===n.HALF_FLOAT&&(Ce=n.RG16F),Ue===n.UNSIGNED_BYTE&&(Ce=n.RG8)),ee===n.RGBA){const We=Bt?k8:Br.getTransfer(xt);Ue===n.FLOAT&&(Ce=n.RGBA32F),Ue===n.HALF_FLOAT&&(Ce=n.RGBA16F),Ue===n.UNSIGNED_BYTE&&(Ce=We===ma?n.SRGB8_ALPHA8:n.RGBA8),Ue===n.UNSIGNED_SHORT_4_4_4_4&&(Ce=n.RGBA4),Ue===n.UNSIGNED_SHORT_5_5_5_1&&(Ce=n.RGB5_A1)}return(Ce===n.R16F||Ce===n.R32F||Ce===n.RG16F||Ce===n.RG32F||Ce===n.RGBA16F||Ce===n.RGBA32F)&&e.get("EXT_color_buffer_float"),Ce}function A(J,ee,Ue){return _(J,Ue)===!0||J.isFramebufferTexture&&J.minFilter!==mo&&J.minFilter!==ao?Math.log2(Math.max(ee.width,ee.height))+1:J.mipmaps!==void 0&&J.mipmaps.length>0?J.mipmaps.length:J.isCompressedTexture&&Array.isArray(J.image)?ee.mipmaps.length:1}function C(J){return J===mo||J===GC||J===w2?n.NEAREST:n.LINEAR}function M(J){const ee=J.target;ee.removeEventListener("dispose",M),D(ee),ee.isVideoTexture&&c.delete(ee)}function I(J){const ee=J.target;ee.removeEventListener("dispose",I),P(ee)}function D(J){const ee=i.get(J);if(ee.__webglInit===void 0)return;const Ue=J.source,xt=h.get(Ue);if(xt){const Bt=xt[ee.__cacheKey];Bt.usedTimes--,Bt.usedTimes===0&&E(J),Object.keys(xt).length===0&&h.delete(Ue)}i.remove(J)}function E(J){const ee=i.get(J);n.deleteTexture(ee.__webglTexture);const Ue=J.source,xt=h.get(Ue);delete xt[ee.__cacheKey],o.memory.textures--}function P(J){const ee=J.texture,Ue=i.get(J),xt=i.get(ee);if(xt.__webglTexture!==void 0&&(n.deleteTexture(xt.__webglTexture),o.memory.textures--),J.depthTexture&&J.depthTexture.dispose(),J.isWebGLCubeRenderTarget)for(let Bt=0;Bt<6;Bt++){if(Array.isArray(Ue.__webglFramebuffer[Bt]))for(let Ce=0;Ce<Ue.__webglFramebuffer[Bt].length;Ce++)n.deleteFramebuffer(Ue.__webglFramebuffer[Bt][Ce]);else n.deleteFramebuffer(Ue.__webglFramebuffer[Bt]);Ue.__webglDepthbuffer&&n.deleteRenderbuffer(Ue.__webglDepthbuffer[Bt])}else{if(Array.isArray(Ue.__webglFramebuffer))for(let Bt=0;Bt<Ue.__webglFramebuffer.length;Bt++)n.deleteFramebuffer(Ue.__webglFramebuffer[Bt]);else n.deleteFramebuffer(Ue.__webglFramebuffer);if(Ue.__webglDepthbuffer&&n.deleteRenderbuffer(Ue.__webglDepthbuffer),Ue.__webglMultisampledFramebuffer&&n.deleteFramebuffer(Ue.__webglMultisampledFramebuffer),Ue.__webglColorRenderbuffer)for(let Bt=0;Bt<Ue.__webglColorRenderbuffer.length;Bt++)Ue.__webglColorRenderbuffer[Bt]&&n.deleteRenderbuffer(Ue.__webglColorRenderbuffer[Bt]);Ue.__webglDepthRenderbuffer&&n.deleteRenderbuffer(Ue.__webglDepthRenderbuffer)}if(J.isWebGLMultipleRenderTargets)for(let Bt=0,Ce=ee.length;Bt<Ce;Bt++){const We=i.get(ee[Bt]);We.__webglTexture&&(n.deleteTexture(We.__webglTexture),o.memory.textures--),i.remove(ee[Bt])}i.remove(ee),i.remove(J)}let F=0;function V(){F=0}function G(){const J=F;return J>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+J+" texture units while this GPU supports only "+r.maxTextures),F+=1,J}function W(J){const ee=[];return ee.push(J.wrapS),ee.push(J.wrapT),ee.push(J.wrapR||0),ee.push(J.magFilter),ee.push(J.minFilter),ee.push(J.anisotropy),ee.push(J.internalFormat),ee.push(J.format),ee.push(J.type),ee.push(J.generateMipmaps),ee.push(J.premultiplyAlpha),ee.push(J.flipY),ee.push(J.unpackAlignment),ee.push(J.colorSpace),ee.join()}function Y(J,ee){const Ue=i.get(J);if(J.isVideoTexture&&_t(J),J.isRenderTargetTexture===!1&&J.version>0&&Ue.__version!==J.version){const xt=J.image;if(xt===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(xt.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Fe(Ue,J,ee);return}}t.bindTexture(n.TEXTURE_2D,Ue.__webglTexture,n.TEXTURE0+ee)}function Q(J,ee){const Ue=i.get(J);if(J.version>0&&Ue.__version!==J.version){Fe(Ue,J,ee);return}t.bindTexture(n.TEXTURE_2D_ARRAY,Ue.__webglTexture,n.TEXTURE0+ee)}function K(J,ee){const Ue=i.get(J);if(J.version>0&&Ue.__version!==J.version){Fe(Ue,J,ee);return}t.bindTexture(n.TEXTURE_3D,Ue.__webglTexture,n.TEXTURE0+ee)}function ae(J,ee){const Ue=i.get(J);if(J.version>0&&Ue.__version!==J.version){pt(Ue,J,ee);return}t.bindTexture(n.TEXTURE_CUBE_MAP,Ue.__webglTexture,n.TEXTURE0+ee)}const ie={[Eo]:n.REPEAT,[us]:n.CLAMP_TO_EDGE,[N8]:n.MIRRORED_REPEAT},he={[mo]:n.NEAREST,[GC]:n.NEAREST_MIPMAP_NEAREST,[w2]:n.NEAREST_MIPMAP_LINEAR,[ao]:n.LINEAR,[v5]:n.LINEAR_MIPMAP_NEAREST,[kc]:n.LINEAR_MIPMAP_LINEAR},Ee={[_Ee]:n.NEVER,[AEe]:n.ALWAYS,[SEe]:n.LESS,[DQ]:n.LEQUAL,[bEe]:n.EQUAL,[TEe]:n.GEQUAL,[xEe]:n.GREATER,[wEe]:n.NOTEQUAL};function He(J,ee,Ue){if(ee.type===Nu&&e.has("OES_texture_float_linear")===!1&&(ee.magFilter===ao||ee.magFilter===v5||ee.magFilter===w2||ee.magFilter===kc||ee.minFilter===ao||ee.minFilter===v5||ee.minFilter===w2||ee.minFilter===kc)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),Ue?(n.texParameteri(J,n.TEXTURE_WRAP_S,ie[ee.wrapS]),n.texParameteri(J,n.TEXTURE_WRAP_T,ie[ee.wrapT]),(J===n.TEXTURE_3D||J===n.TEXTURE_2D_ARRAY)&&n.texParameteri(J,n.TEXTURE_WRAP_R,ie[ee.wrapR]),n.texParameteri(J,n.TEXTURE_MAG_FILTER,he[ee.magFilter]),n.texParameteri(J,n.TEXTURE_MIN_FILTER,he[ee.minFilter])):(n.texParameteri(J,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(J,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(J===n.TEXTURE_3D||J===n.TEXTURE_2D_ARRAY)&&n.texParameteri(J,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(ee.wrapS!==us||ee.wrapT!==us)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(J,n.TEXTURE_MAG_FILTER,C(ee.magFilter)),n.texParameteri(J,n.TEXTURE_MIN_FILTER,C(ee.minFilter)),ee.minFilter!==mo&&ee.minFilter!==ao&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),ee.compareFunction&&(n.texParameteri(J,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(J,n.TEXTURE_COMPARE_FUNC,Ee[ee.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const xt=e.get("EXT_texture_filter_anisotropic");if(ee.magFilter===mo||ee.minFilter!==w2&&ee.minFilter!==kc||ee.type===Nu&&e.has("OES_texture_float_linear")===!1||s===!1&&ee.type===K9&&e.has("OES_texture_half_float_linear")===!1)return;(ee.anisotropy>1||i.get(ee).__currentAnisotropy)&&(n.texParameterf(J,xt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(ee.anisotropy,r.getMaxAnisotropy())),i.get(ee).__currentAnisotropy=ee.anisotropy)}}function xe(J,ee){let Ue=!1;J.__webglInit===void 0&&(J.__webglInit=!0,ee.addEventListener("dispose",M));const xt=ee.source;let Bt=h.get(xt);Bt===void 0&&(Bt={},h.set(xt,Bt));const Ce=W(ee);if(Ce!==J.__cacheKey){Bt[Ce]===void 0&&(Bt[Ce]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,Ue=!0),Bt[Ce].usedTimes++;const We=Bt[J.__cacheKey];We!==void 0&&(Bt[J.__cacheKey].usedTimes--,We.usedTimes===0&&E(ee)),J.__cacheKey=Ce,J.__webglTexture=Bt[Ce].texture}return Ue}function Fe(J,ee,Ue){let xt=n.TEXTURE_2D;(ee.isDataArrayTexture||ee.isCompressedArrayTexture)&&(xt=n.TEXTURE_2D_ARRAY),ee.isData3DTexture&&(xt=n.TEXTURE_3D);const Bt=xe(J,ee),Ce=ee.source;t.bindTexture(xt,J.__webglTexture,n.TEXTURE0+Ue);const We=i.get(Ce);if(Ce.version!==We.__version||Bt===!0){t.activeTexture(n.TEXTURE0+Ue);const $e=Br.getPrimaries(Br.workingColorSpace),mt=ee.colorSpace===_0?null:Br.getPrimaries(ee.colorSpace),Yt=ee.colorSpace===_0||$e===mt?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,ee.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ee.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,ee.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Yt);const st=g(ee)&&v(ee.image)===!1;let it=m(ee.image,st,!1,r.maxTextureSize);it=Ct(ee,it);const Vt=v(it)||s,Zt=a.convert(ee.format,ee.colorSpace);let nn=a.convert(ee.type),cn=x(ee.internalFormat,Zt,nn,ee.colorSpace,ee.isVideoTexture);He(xt,ee,Vt);let an;const Ln=ee.mipmaps,je=s&&ee.isVideoTexture!==!0&&cn!==RQ,Ht=We.__version===void 0||Bt===!0,wn=Ce.dataReady,zn=A(ee,it,Vt);if(ee.isDepthTexture)cn=n.DEPTH_COMPONENT,s?ee.type===Nu?cn=n.DEPTH_COMPONENT32F:ee.type===uh?cn=n.DEPTH_COMPONENT24:ee.type===Rp?cn=n.DEPTH24_STENCIL8:cn=n.DEPTH_COMPONENT16:ee.type===Nu&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),ee.format===Lp&&cn===n.DEPTH_COMPONENT&&ee.type!==oR&&ee.type!==uh&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),ee.type=uh,nn=a.convert(ee.type)),ee.format===Tv&&cn===n.DEPTH_COMPONENT&&(cn=n.DEPTH_STENCIL,ee.type!==Rp&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),ee.type=Rp,nn=a.convert(ee.type))),Ht&&(je?t.texStorage2D(n.TEXTURE_2D,1,cn,it.width,it.height):t.texImage2D(n.TEXTURE_2D,0,cn,it.width,it.height,0,Zt,nn,null));else if(ee.isDataTexture)if(Ln.length>0&&Vt){je&&Ht&&t.texStorage2D(n.TEXTURE_2D,zn,cn,Ln[0].width,Ln[0].height);for(let Be=0,pn=Ln.length;Be<pn;Be++)an=Ln[Be],je?wn&&t.texSubImage2D(n.TEXTURE_2D,Be,0,0,an.width,an.height,Zt,nn,an.data):t.texImage2D(n.TEXTURE_2D,Be,cn,an.width,an.height,0,Zt,nn,an.data);ee.generateMipmaps=!1}else je?(Ht&&t.texStorage2D(n.TEXTURE_2D,zn,cn,it.width,it.height),wn&&t.texSubImage2D(n.TEXTURE_2D,0,0,0,it.width,it.height,Zt,nn,it.data)):t.texImage2D(n.TEXTURE_2D,0,cn,it.width,it.height,0,Zt,nn,it.data);else if(ee.isCompressedTexture)if(ee.isCompressedArrayTexture){je&&Ht&&t.texStorage3D(n.TEXTURE_2D_ARRAY,zn,cn,Ln[0].width,Ln[0].height,it.depth);for(let Be=0,pn=Ln.length;Be<pn;Be++)an=Ln[Be],ee.format!==y0?Zt!==null?je?wn&&t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,Be,0,0,0,an.width,an.height,it.depth,Zt,an.data,0,0):t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,Be,cn,an.width,an.height,it.depth,0,an.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):je?wn&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,Be,0,0,0,an.width,an.height,it.depth,Zt,nn,an.data):t.texImage3D(n.TEXTURE_2D_ARRAY,Be,cn,an.width,an.height,it.depth,0,Zt,nn,an.data)}else{je&&Ht&&t.texStorage2D(n.TEXTURE_2D,zn,cn,Ln[0].width,Ln[0].height);for(let Be=0,pn=Ln.length;Be<pn;Be++)an=Ln[Be],ee.format!==y0?Zt!==null?je?wn&&t.compressedTexSubImage2D(n.TEXTURE_2D,Be,0,0,an.width,an.height,Zt,an.data):t.compressedTexImage2D(n.TEXTURE_2D,Be,cn,an.width,an.height,0,an.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):je?wn&&t.texSubImage2D(n.TEXTURE_2D,Be,0,0,an.width,an.height,Zt,nn,an.data):t.texImage2D(n.TEXTURE_2D,Be,cn,an.width,an.height,0,Zt,nn,an.data)}else if(ee.isDataArrayTexture)je?(Ht&&t.texStorage3D(n.TEXTURE_2D_ARRAY,zn,cn,it.width,it.height,it.depth),wn&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,it.width,it.height,it.depth,Zt,nn,it.data)):t.texImage3D(n.TEXTURE_2D_ARRAY,0,cn,it.width,it.height,it.depth,0,Zt,nn,it.data);else if(ee.isData3DTexture)je?(Ht&&t.texStorage3D(n.TEXTURE_3D,zn,cn,it.width,it.height,it.depth),wn&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,it.width,it.height,it.depth,Zt,nn,it.data)):t.texImage3D(n.TEXTURE_3D,0,cn,it.width,it.height,it.depth,0,Zt,nn,it.data);else if(ee.isFramebufferTexture){if(Ht)if(je)t.texStorage2D(n.TEXTURE_2D,zn,cn,it.width,it.height);else{let Be=it.width,pn=it.height;for(let dn=0;dn<zn;dn++)t.texImage2D(n.TEXTURE_2D,dn,cn,Be,pn,0,Zt,nn,null),Be>>=1,pn>>=1}}else if(Ln.length>0&&Vt){je&&Ht&&t.texStorage2D(n.TEXTURE_2D,zn,cn,Ln[0].width,Ln[0].height);for(let Be=0,pn=Ln.length;Be<pn;Be++)an=Ln[Be],je?wn&&t.texSubImage2D(n.TEXTURE_2D,Be,0,0,Zt,nn,an):t.texImage2D(n.TEXTURE_2D,Be,cn,Zt,nn,an);ee.generateMipmaps=!1}else je?(Ht&&t.texStorage2D(n.TEXTURE_2D,zn,cn,it.width,it.height),wn&&t.texSubImage2D(n.TEXTURE_2D,0,0,0,Zt,nn,it)):t.texImage2D(n.TEXTURE_2D,0,cn,Zt,nn,it);_(ee,Vt)&&S(xt),We.__version=Ce.version,ee.onUpdate&&ee.onUpdate(ee)}J.__version=ee.version}function pt(J,ee,Ue){if(ee.image.length!==6)return;const xt=xe(J,ee),Bt=ee.source;t.bindTexture(n.TEXTURE_CUBE_MAP,J.__webglTexture,n.TEXTURE0+Ue);const Ce=i.get(Bt);if(Bt.version!==Ce.__version||xt===!0){t.activeTexture(n.TEXTURE0+Ue);const We=Br.getPrimaries(Br.workingColorSpace),$e=ee.colorSpace===_0?null:Br.getPrimaries(ee.colorSpace),mt=ee.colorSpace===_0||We===$e?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,ee.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ee.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,ee.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,mt);const Yt=ee.isCompressedTexture||ee.image[0].isCompressedTexture,st=ee.image[0]&&ee.image[0].isDataTexture,it=[];for(let Be=0;Be<6;Be++)!Yt&&!st?it[Be]=m(ee.image[Be],!1,!0,r.maxCubemapSize):it[Be]=st?ee.image[Be].image:ee.image[Be],it[Be]=Ct(ee,it[Be]);const Vt=it[0],Zt=v(Vt)||s,nn=a.convert(ee.format,ee.colorSpace),cn=a.convert(ee.type),an=x(ee.internalFormat,nn,cn,ee.colorSpace),Ln=s&&ee.isVideoTexture!==!0,je=Ce.__version===void 0||xt===!0,Ht=Bt.dataReady;let wn=A(ee,Vt,Zt);He(n.TEXTURE_CUBE_MAP,ee,Zt);let zn;if(Yt){Ln&&je&&t.texStorage2D(n.TEXTURE_CUBE_MAP,wn,an,Vt.width,Vt.height);for(let Be=0;Be<6;Be++){zn=it[Be].mipmaps;for(let pn=0;pn<zn.length;pn++){const dn=zn[pn];ee.format!==y0?nn!==null?Ln?Ht&&t.compressedTexSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Be,pn,0,0,dn.width,dn.height,nn,dn.data):t.compressedTexImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Be,pn,an,dn.width,dn.height,0,dn.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Ln?Ht&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Be,pn,0,0,dn.width,dn.height,nn,cn,dn.data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Be,pn,an,dn.width,dn.height,0,nn,cn,dn.data)}}}else{zn=ee.mipmaps,Ln&&je&&(zn.length>0&&wn++,t.texStorage2D(n.TEXTURE_CUBE_MAP,wn,an,it[0].width,it[0].height));for(let Be=0;Be<6;Be++)if(st){Ln?Ht&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Be,0,0,0,it[Be].width,it[Be].height,nn,cn,it[Be].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Be,0,an,it[Be].width,it[Be].height,0,nn,cn,it[Be].data);for(let pn=0;pn<zn.length;pn++){const Un=zn[pn].image[Be].image;Ln?Ht&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Be,pn+1,0,0,Un.width,Un.height,nn,cn,Un.data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Be,pn+1,an,Un.width,Un.height,0,nn,cn,Un.data)}}else{Ln?Ht&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Be,0,0,0,nn,cn,it[Be]):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Be,0,an,nn,cn,it[Be]);for(let pn=0;pn<zn.length;pn++){const dn=zn[pn];Ln?Ht&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Be,pn+1,0,0,nn,cn,dn.image[Be]):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Be,pn+1,an,nn,cn,dn.image[Be])}}}_(ee,Zt)&&S(n.TEXTURE_CUBE_MAP),Ce.__version=Bt.version,ee.onUpdate&&ee.onUpdate(ee)}J.__version=ee.version}function Ot(J,ee,Ue,xt,Bt,Ce){const We=a.convert(Ue.format,Ue.colorSpace),$e=a.convert(Ue.type),mt=x(Ue.internalFormat,We,$e,Ue.colorSpace);if(!i.get(ee).__hasExternalTextures){const st=Math.max(1,ee.width>>Ce),it=Math.max(1,ee.height>>Ce);Bt===n.TEXTURE_3D||Bt===n.TEXTURE_2D_ARRAY?t.texImage3D(Bt,Ce,mt,st,it,ee.depth,0,We,$e,null):t.texImage2D(Bt,Ce,mt,st,it,0,We,$e,null)}t.bindFramebuffer(n.FRAMEBUFFER,J),k(ee)?l.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,xt,Bt,i.get(Ue).__webglTexture,0,Ft(ee)):(Bt===n.TEXTURE_2D||Bt>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&Bt<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,xt,Bt,i.get(Ue).__webglTexture,Ce),t.bindFramebuffer(n.FRAMEBUFFER,null)}function bt(J,ee,Ue){if(n.bindRenderbuffer(n.RENDERBUFFER,J),ee.depthBuffer&&!ee.stencilBuffer){let xt=s===!0?n.DEPTH_COMPONENT24:n.DEPTH_COMPONENT16;if(Ue||k(ee)){const Bt=ee.depthTexture;Bt&&Bt.isDepthTexture&&(Bt.type===Nu?xt=n.DEPTH_COMPONENT32F:Bt.type===uh&&(xt=n.DEPTH_COMPONENT24));const Ce=Ft(ee);k(ee)?l.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Ce,xt,ee.width,ee.height):n.renderbufferStorageMultisample(n.RENDERBUFFER,Ce,xt,ee.width,ee.height)}else n.renderbufferStorage(n.RENDERBUFFER,xt,ee.width,ee.height);n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,J)}else if(ee.depthBuffer&&ee.stencilBuffer){const xt=Ft(ee);Ue&&k(ee)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,xt,n.DEPTH24_STENCIL8,ee.width,ee.height):k(ee)?l.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,xt,n.DEPTH24_STENCIL8,ee.width,ee.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,ee.width,ee.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,J)}else{const xt=ee.isWebGLMultipleRenderTargets===!0?ee.texture:[ee.texture];for(let Bt=0;Bt<xt.length;Bt++){const Ce=xt[Bt],We=a.convert(Ce.format,Ce.colorSpace),$e=a.convert(Ce.type),mt=x(Ce.internalFormat,We,$e,Ce.colorSpace),Yt=Ft(ee);Ue&&k(ee)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,Yt,mt,ee.width,ee.height):k(ee)?l.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Yt,mt,ee.width,ee.height):n.renderbufferStorage(n.RENDERBUFFER,mt,ee.width,ee.height)}}n.bindRenderbuffer(n.RENDERBUFFER,null)}function ht(J,ee){if(ee&&ee.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(n.FRAMEBUFFER,J),!(ee.depthTexture&&ee.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!i.get(ee.depthTexture).__webglTexture||ee.depthTexture.image.width!==ee.width||ee.depthTexture.image.height!==ee.height)&&(ee.depthTexture.image.width=ee.width,ee.depthTexture.image.height=ee.height,ee.depthTexture.needsUpdate=!0),Y(ee.depthTexture,0);const xt=i.get(ee.depthTexture).__webglTexture,Bt=Ft(ee);if(ee.depthTexture.format===Lp)k(ee)?l.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,xt,0,Bt):n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,xt,0);else if(ee.depthTexture.format===Tv)k(ee)?l.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.TEXTURE_2D,xt,0,Bt):n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.TEXTURE_2D,xt,0);else throw new Error("Unknown depthTexture format")}function Kt(J){const ee=i.get(J),Ue=J.isWebGLCubeRenderTarget===!0;if(J.depthTexture&&!ee.__autoAllocateDepthBuffer){if(Ue)throw new Error("target.depthTexture not supported in Cube render targets");ht(ee.__webglFramebuffer,J)}else if(Ue){ee.__webglDepthbuffer=[];for(let xt=0;xt<6;xt++)t.bindFramebuffer(n.FRAMEBUFFER,ee.__webglFramebuffer[xt]),ee.__webglDepthbuffer[xt]=n.createRenderbuffer(),bt(ee.__webglDepthbuffer[xt],J,!1)}else t.bindFramebuffer(n.FRAMEBUFFER,ee.__webglFramebuffer),ee.__webglDepthbuffer=n.createRenderbuffer(),bt(ee.__webglDepthbuffer,J,!1);t.bindFramebuffer(n.FRAMEBUFFER,null)}function Tt(J,ee,Ue){const xt=i.get(J);ee!==void 0&&Ot(xt.__webglFramebuffer,J,J.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),Ue!==void 0&&Kt(J)}function Ae(J){const ee=J.texture,Ue=i.get(J),xt=i.get(ee);J.addEventListener("dispose",I),J.isWebGLMultipleRenderTargets!==!0&&(xt.__webglTexture===void 0&&(xt.__webglTexture=n.createTexture()),xt.__version=ee.version,o.memory.textures++);const Bt=J.isWebGLCubeRenderTarget===!0,Ce=J.isWebGLMultipleRenderTargets===!0,We=v(J)||s;if(Bt){Ue.__webglFramebuffer=[];for(let $e=0;$e<6;$e++)if(s&&ee.mipmaps&&ee.mipmaps.length>0){Ue.__webglFramebuffer[$e]=[];for(let mt=0;mt<ee.mipmaps.length;mt++)Ue.__webglFramebuffer[$e][mt]=n.createFramebuffer()}else Ue.__webglFramebuffer[$e]=n.createFramebuffer()}else{if(s&&ee.mipmaps&&ee.mipmaps.length>0){Ue.__webglFramebuffer=[];for(let $e=0;$e<ee.mipmaps.length;$e++)Ue.__webglFramebuffer[$e]=n.createFramebuffer()}else Ue.__webglFramebuffer=n.createFramebuffer();if(Ce)if(r.drawBuffers){const $e=J.texture;for(let mt=0,Yt=$e.length;mt<Yt;mt++){const st=i.get($e[mt]);st.__webglTexture===void 0&&(st.__webglTexture=n.createTexture(),o.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(s&&J.samples>0&&k(J)===!1){const $e=Ce?ee:[ee];Ue.__webglMultisampledFramebuffer=n.createFramebuffer(),Ue.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,Ue.__webglMultisampledFramebuffer);for(let mt=0;mt<$e.length;mt++){const Yt=$e[mt];Ue.__webglColorRenderbuffer[mt]=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,Ue.__webglColorRenderbuffer[mt]);const st=a.convert(Yt.format,Yt.colorSpace),it=a.convert(Yt.type),Vt=x(Yt.internalFormat,st,it,Yt.colorSpace,J.isXRRenderTarget===!0),Zt=Ft(J);n.renderbufferStorageMultisample(n.RENDERBUFFER,Zt,Vt,J.width,J.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+mt,n.RENDERBUFFER,Ue.__webglColorRenderbuffer[mt])}n.bindRenderbuffer(n.RENDERBUFFER,null),J.depthBuffer&&(Ue.__webglDepthRenderbuffer=n.createRenderbuffer(),bt(Ue.__webglDepthRenderbuffer,J,!0)),t.bindFramebuffer(n.FRAMEBUFFER,null)}}if(Bt){t.bindTexture(n.TEXTURE_CUBE_MAP,xt.__webglTexture),He(n.TEXTURE_CUBE_MAP,ee,We);for(let $e=0;$e<6;$e++)if(s&&ee.mipmaps&&ee.mipmaps.length>0)for(let mt=0;mt<ee.mipmaps.length;mt++)Ot(Ue.__webglFramebuffer[$e][mt],J,ee,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+$e,mt);else Ot(Ue.__webglFramebuffer[$e],J,ee,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+$e,0);_(ee,We)&&S(n.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(Ce){const $e=J.texture;for(let mt=0,Yt=$e.length;mt<Yt;mt++){const st=$e[mt],it=i.get(st);t.bindTexture(n.TEXTURE_2D,it.__webglTexture),He(n.TEXTURE_2D,st,We),Ot(Ue.__webglFramebuffer,J,st,n.COLOR_ATTACHMENT0+mt,n.TEXTURE_2D,0),_(st,We)&&S(n.TEXTURE_2D)}t.unbindTexture()}else{let $e=n.TEXTURE_2D;if((J.isWebGL3DRenderTarget||J.isWebGLArrayRenderTarget)&&(s?$e=J.isWebGL3DRenderTarget?n.TEXTURE_3D:n.TEXTURE_2D_ARRAY:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),t.bindTexture($e,xt.__webglTexture),He($e,ee,We),s&&ee.mipmaps&&ee.mipmaps.length>0)for(let mt=0;mt<ee.mipmaps.length;mt++)Ot(Ue.__webglFramebuffer[mt],J,ee,n.COLOR_ATTACHMENT0,$e,mt);else Ot(Ue.__webglFramebuffer,J,ee,n.COLOR_ATTACHMENT0,$e,0);_(ee,We)&&S($e),t.unbindTexture()}J.depthBuffer&&Kt(J)}function Lt(J){const ee=v(J)||s,Ue=J.isWebGLMultipleRenderTargets===!0?J.texture:[J.texture];for(let xt=0,Bt=Ue.length;xt<Bt;xt++){const Ce=Ue[xt];if(_(Ce,ee)){const We=J.isWebGLCubeRenderTarget?n.TEXTURE_CUBE_MAP:n.TEXTURE_2D,$e=i.get(Ce).__webglTexture;t.bindTexture(We,$e),S(We),t.unbindTexture()}}}function vt(J){if(s&&J.samples>0&&k(J)===!1){const ee=J.isWebGLMultipleRenderTargets?J.texture:[J.texture],Ue=J.width,xt=J.height;let Bt=n.COLOR_BUFFER_BIT;const Ce=[],We=J.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,$e=i.get(J),mt=J.isWebGLMultipleRenderTargets===!0;if(mt)for(let Yt=0;Yt<ee.length;Yt++)t.bindFramebuffer(n.FRAMEBUFFER,$e.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+Yt,n.RENDERBUFFER,null),t.bindFramebuffer(n.FRAMEBUFFER,$e.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+Yt,n.TEXTURE_2D,null,0);t.bindFramebuffer(n.READ_FRAMEBUFFER,$e.__webglMultisampledFramebuffer),t.bindFramebuffer(n.DRAW_FRAMEBUFFER,$e.__webglFramebuffer);for(let Yt=0;Yt<ee.length;Yt++){Ce.push(n.COLOR_ATTACHMENT0+Yt),J.depthBuffer&&Ce.push(We);const st=$e.__ignoreDepthValues!==void 0?$e.__ignoreDepthValues:!1;if(st===!1&&(J.depthBuffer&&(Bt|=n.DEPTH_BUFFER_BIT),J.stencilBuffer&&(Bt|=n.STENCIL_BUFFER_BIT)),mt&&n.framebufferRenderbuffer(n.READ_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,$e.__webglColorRenderbuffer[Yt]),st===!0&&(n.invalidateFramebuffer(n.READ_FRAMEBUFFER,[We]),n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER,[We])),mt){const it=i.get(ee[Yt]).__webglTexture;n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,it,0)}n.blitFramebuffer(0,0,Ue,xt,0,0,Ue,xt,Bt,n.NEAREST),u&&n.invalidateFramebuffer(n.READ_FRAMEBUFFER,Ce)}if(t.bindFramebuffer(n.READ_FRAMEBUFFER,null),t.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),mt)for(let Yt=0;Yt<ee.length;Yt++){t.bindFramebuffer(n.FRAMEBUFFER,$e.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+Yt,n.RENDERBUFFER,$e.__webglColorRenderbuffer[Yt]);const st=i.get(ee[Yt]).__webglTexture;t.bindFramebuffer(n.FRAMEBUFFER,$e.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+Yt,n.TEXTURE_2D,st,0)}t.bindFramebuffer(n.DRAW_FRAMEBUFFER,$e.__webglMultisampledFramebuffer)}}function Ft(J){return Math.min(r.maxSamples,J.samples)}function k(J){const ee=i.get(J);return s&&J.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&ee.__useRenderToTexture!==!1}function _t(J){const ee=o.render.frame;c.get(J)!==ee&&(c.set(J,ee),J.update())}function Ct(J,ee){const Ue=J.colorSpace,xt=J.format,Bt=J.type;return J.isCompressedTexture===!0||J.isVideoTexture===!0||J.format===HC||Ue!==bo&&Ue!==_0&&(Br.getTransfer(Ue)===ma?s===!1?e.has("EXT_sRGB")===!0&&xt===y0?(J.format=HC,J.minFilter=ao,J.generateMipmaps=!1):ee=kQ.sRGBToLinear(ee):(xt!==y0||Bt!==bh)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Ue)),ee}this.allocateTextureUnit=G,this.resetTextureUnits=V,this.setTexture2D=Y,this.setTexture2DArray=Q,this.setTexture3D=K,this.setTextureCube=ae,this.rebindTextures=Tt,this.setupRenderTarget=Ae,this.updateRenderTargetMipmap=Lt,this.updateMultisampleRenderTarget=vt,this.setupDepthRenderbuffer=Kt,this.setupFrameBufferTexture=Ot,this.useMultisampledRTT=k}function BDe(n,e,t){const i=t.isWebGL2;function r(a,o=_0){let s;const l=Br.getTransfer(o);if(a===bh)return n.UNSIGNED_BYTE;if(a===AQ)return n.UNSIGNED_SHORT_4_4_4_4;if(a===CQ)return n.UNSIGNED_SHORT_5_5_5_1;if(a===oEe)return n.BYTE;if(a===sEe)return n.SHORT;if(a===oR)return n.UNSIGNED_SHORT;if(a===TQ)return n.INT;if(a===uh)return n.UNSIGNED_INT;if(a===Nu)return n.FLOAT;if(a===K9)return i?n.HALF_FLOAT:(s=e.get("OES_texture_half_float"),s!==null?s.HALF_FLOAT_OES:null);if(a===lEe)return n.ALPHA;if(a===y0)return n.RGBA;if(a===uEe)return n.LUMINANCE;if(a===cEe)return n.LUMINANCE_ALPHA;if(a===Lp)return n.DEPTH_COMPONENT;if(a===Tv)return n.DEPTH_STENCIL;if(a===HC)return s=e.get("EXT_sRGB"),s!==null?s.SRGB_ALPHA_EXT:null;if(a===dEe)return n.RED;if(a===MQ)return n.RED_INTEGER;if(a===hEe)return n.RG;if(a===EQ)return n.RG_INTEGER;if(a===PQ)return n.RGBA_INTEGER;if(a===Tw||a===Aw||a===Cw||a===Mw)if(l===ma)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(a===Tw)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(a===Aw)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(a===Cw)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(a===Mw)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(a===Tw)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===Aw)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===Cw)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(a===Mw)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(a===fU||a===pU||a===vU||a===mU)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(a===fU)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(a===pU)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(a===vU)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(a===mU)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(a===RQ)return s=e.get("WEBGL_compressed_texture_etc1"),s!==null?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(a===gU||a===yU)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(a===gU)return l===ma?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(a===yU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(a===_U||a===SU||a===bU||a===xU||a===wU||a===TU||a===AU||a===CU||a===MU||a===EU||a===PU||a===RU||a===LU||a===IU)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(a===_U)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(a===SU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(a===bU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(a===xU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(a===wU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(a===TU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(a===AU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(a===CU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(a===MU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(a===EU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(a===PU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(a===RU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(a===LU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(a===IU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(a===Ew||a===DU||a===NU)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(a===Ew)return l===ma?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(a===DU)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(a===NU)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(a===fEe||a===kU||a===FU||a===OU)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(a===Ew)return s.COMPRESSED_RED_RGTC1_EXT;if(a===kU)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(a===FU)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(a===OU)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return a===Rp?i?n.UNSIGNED_INT_24_8:(s=e.get("WEBGL_depth_texture"),s!==null?s.UNSIGNED_INT_24_8_WEBGL:null):n[a]!==void 0?n[a]:null}return{convert:r}}class zDe extends ss{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Nr extends la{constructor(){super(),this.isGroup=!0,this.type="Group"}}const GDe={type:"move"};class Jw{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Nr,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 Nr,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Le,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Le),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Nr,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Le,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Le),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 i of e.hand.values())this._getHandJoint(t,i)}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,i){let r=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 m of e.hand.values()){const v=t.getJointPose(m,i),g=this._getHandJoint(u,m);v!==null&&(g.matrix.fromArray(v.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=v.radius),g.visible=v!==null}const c=u.joints["index-finger-tip"],d=u.joints["thumb-tip"],h=c.position.distanceTo(d.position),f=.02,p=.005;u.inputState.pinching&&h>f+p?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&h<=f-p&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(a=t.getPose(e.gripSpace,i),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&&(r=t.getPose(e.targetRaySpace,i),r===null&&a!==null&&(r=a),r!==null&&(s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,r.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(r.linearVelocity)):s.hasLinearVelocity=!1,r.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(r.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(GDe)))}return s!==null&&(s.visible=r!==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 i=new Nr;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}const UDe=`
void main() {
gl_Position = vec4( position, 1.0 );
}`,VDe=`
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 HDe{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){const r=new yo,a=e.properties.get(r);a.__webglTexture=t.texture,(t.depthNear!=i.depthNear||t.depthFar!=i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=r}}render(e,t){if(this.texture!==null){if(this.mesh===null){const i=t.cameras[0].viewport,r=new Jc({extensions:{fragDepth:!0},vertexShader:UDe,fragmentShader:VDe,uniforms:{depthColor:{value:this.texture},depthWidth:{value:i.z},depthHeight:{value:i.w}}});this.mesh=new fr(new Al(20,20),r)}e.render(this.mesh,t)}}reset(){this.texture=null,this.mesh=null}}class WDe extends s1{constructor(e,t){super();const i=this;let r=null,a=1,o=null,s="local-floor",l=1,u=null,c=null,d=null,h=null,f=null,p=null;const m=new HDe,v=t.getContextAttributes();let g=null,_=null;const S=[],x=[],A=new on;let C=null;const M=new ss;M.layers.enable(1),M.viewport=new Er;const I=new ss;I.layers.enable(2),I.viewport=new Er;const D=[M,I],E=new zDe;E.layers.enable(1),E.layers.enable(2);let P=null,F=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(xe){let Fe=S[xe];return Fe===void 0&&(Fe=new Jw,S[xe]=Fe),Fe.getTargetRaySpace()},this.getControllerGrip=function(xe){let Fe=S[xe];return Fe===void 0&&(Fe=new Jw,S[xe]=Fe),Fe.getGripSpace()},this.getHand=function(xe){let Fe=S[xe];return Fe===void 0&&(Fe=new Jw,S[xe]=Fe),Fe.getHandSpace()};function V(xe){const Fe=x.indexOf(xe.inputSource);if(Fe===-1)return;const pt=S[Fe];pt!==void 0&&(pt.update(xe.inputSource,xe.frame,u||o),pt.dispatchEvent({type:xe.type,data:xe.inputSource}))}function G(){r.removeEventListener("select",V),r.removeEventListener("selectstart",V),r.removeEventListener("selectend",V),r.removeEventListener("squeeze",V),r.removeEventListener("squeezestart",V),r.removeEventListener("squeezeend",V),r.removeEventListener("end",G),r.removeEventListener("inputsourceschange",W);for(let xe=0;xe<S.length;xe++){const Fe=x[xe];Fe!==null&&(x[xe]=null,S[xe].disconnect(Fe))}P=null,F=null,m.reset(),e.setRenderTarget(g),f=null,h=null,d=null,r=null,_=null,He.stop(),i.isPresenting=!1,e.setPixelRatio(C),e.setSize(A.width,A.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(xe){a=xe,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(xe){s=xe,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||o},this.setReferenceSpace=function(xe){u=xe},this.getBaseLayer=function(){return h!==null?h:f},this.getBinding=function(){return d},this.getFrame=function(){return p},this.getSession=function(){return r},this.setSession=function(xe){return rn(this,null,function*(){if(r=xe,r!==null){if(g=e.getRenderTarget(),r.addEventListener("select",V),r.addEventListener("selectstart",V),r.addEventListener("selectend",V),r.addEventListener("squeeze",V),r.addEventListener("squeezestart",V),r.addEventListener("squeezeend",V),r.addEventListener("end",G),r.addEventListener("inputsourceschange",W),v.xrCompatible!==!0&&(yield t.makeXRCompatible()),C=e.getPixelRatio(),e.getSize(A),r.renderState.layers===void 0||e.capabilities.isWebGL2===!1){const Fe={antialias:r.renderState.layers===void 0?v.antialias:!0,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:a};f=new XRWebGLLayer(r,t,Fe),r.updateRenderState({baseLayer:f}),e.setPixelRatio(1),e.setSize(f.framebufferWidth,f.framebufferHeight,!1),_=new Hp(f.framebufferWidth,f.framebufferHeight,{format:y0,type:bh,colorSpace:e.outputColorSpace,stencilBuffer:v.stencil})}else{let Fe=null,pt=null,Ot=null;v.depth&&(Ot=v.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,Fe=v.stencil?Tv:Lp,pt=v.stencil?Rp:uh);const bt={colorFormat:t.RGBA8,depthFormat:Ot,scaleFactor:a};d=new XRWebGLBinding(r,t),h=d.createProjectionLayer(bt),r.updateRenderState({layers:[h]}),e.setPixelRatio(1),e.setSize(h.textureWidth,h.textureHeight,!1),_=new Hp(h.textureWidth,h.textureHeight,{format:y0,type:bh,depthTexture:new jQ(h.textureWidth,h.textureHeight,pt,void 0,void 0,void 0,void 0,void 0,void 0,Fe),stencilBuffer:v.stencil,colorSpace:e.outputColorSpace,samples:v.antialias?4:0});const ht=e.properties.get(_);ht.__ignoreDepthValues=h.ignoreDepthValues}_.isXRRenderTarget=!0,this.setFoveation(l),u=null,o=yield r.requestReferenceSpace(s),He.setContext(r),He.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}})},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode};function W(xe){for(let Fe=0;Fe<xe.removed.length;Fe++){const pt=xe.removed[Fe],Ot=x.indexOf(pt);Ot>=0&&(x[Ot]=null,S[Ot].disconnect(pt))}for(let Fe=0;Fe<xe.added.length;Fe++){const pt=xe.added[Fe];let Ot=x.indexOf(pt);if(Ot===-1){for(let ht=0;ht<S.length;ht++)if(ht>=x.length){x.push(pt),Ot=ht;break}else if(x[ht]===null){x[ht]=pt,Ot=ht;break}if(Ot===-1)break}const bt=S[Ot];bt&&bt.connect(pt)}}const Y=new Le,Q=new Le;function K(xe,Fe,pt){Y.setFromMatrixPosition(Fe.matrixWorld),Q.setFromMatrixPosition(pt.matrixWorld);const Ot=Y.distanceTo(Q),bt=Fe.projectionMatrix.elements,ht=pt.projectionMatrix.elements,Kt=bt[14]/(bt[10]-1),Tt=bt[14]/(bt[10]+1),Ae=(bt[9]+1)/bt[5],Lt=(bt[9]-1)/bt[5],vt=(bt[8]-1)/bt[0],Ft=(ht[8]+1)/ht[0],k=Kt*vt,_t=Kt*Ft,Ct=Ot/(-vt+Ft),J=Ct*-vt;Fe.matrixWorld.decompose(xe.position,xe.quaternion,xe.scale),xe.translateX(J),xe.translateZ(Ct),xe.matrixWorld.compose(xe.position,xe.quaternion,xe.scale),xe.matrixWorldInverse.copy(xe.matrixWorld).invert();const ee=Kt+Ct,Ue=Tt+Ct,xt=k-J,Bt=_t+(Ot-J),Ce=Ae*Tt/Ue*ee,We=Lt*Tt/Ue*ee;xe.projectionMatrix.makePerspective(xt,Bt,Ce,We,ee,Ue),xe.projectionMatrixInverse.copy(xe.projectionMatrix).invert()}function ae(xe,Fe){Fe===null?xe.matrixWorld.copy(xe.matrix):xe.matrixWorld.multiplyMatrices(Fe.matrixWorld,xe.matrix),xe.matrixWorldInverse.copy(xe.matrixWorld).invert()}this.updateCamera=function(xe){if(r===null)return;m.texture!==null&&(xe.near=m.depthNear,xe.far=m.depthFar),E.near=I.near=M.near=xe.near,E.far=I.far=M.far=xe.far,(P!==E.near||F!==E.far)&&(r.updateRenderState({depthNear:E.near,depthFar:E.far}),P=E.near,F=E.far,M.near=P,M.far=F,I.near=P,I.far=F,M.updateProjectionMatrix(),I.updateProjectionMatrix(),xe.updateProjectionMatrix());const Fe=xe.parent,pt=E.cameras;ae(E,Fe);for(let Ot=0;Ot<pt.length;Ot++)ae(pt[Ot],Fe);pt.length===2?K(E,M,I):E.projectionMatrix.copy(M.projectionMatrix),ie(xe,E,Fe)};function ie(xe,Fe,pt){pt===null?xe.matrix.copy(Fe.matrixWorld):(xe.matrix.copy(pt.matrixWorld),xe.matrix.invert(),xe.matrix.multiply(Fe.matrixWorld)),xe.matrix.decompose(xe.position,xe.quaternion,xe.scale),xe.updateMatrixWorld(!0),xe.projectionMatrix.copy(Fe.projectionMatrix),xe.projectionMatrixInverse.copy(Fe.projectionMatrixInverse),xe.isPerspectiveCamera&&(xe.fov=Cv*2*Math.atan(1/xe.projectionMatrix.elements[5]),xe.zoom=1)}this.getCamera=function(){return E},this.getFoveation=function(){if(!(h===null&&f===null))return l},this.setFoveation=function(xe){l=xe,h!==null&&(h.fixedFoveation=xe),f!==null&&f.fixedFoveation!==void 0&&(f.fixedFoveation=xe)},this.hasDepthSensing=function(){return m.texture!==null};let he=null;function Ee(xe,Fe){if(c=Fe.getViewerPose(u||o),p=Fe,c!==null){const pt=c.views;f!==null&&(e.setRenderTargetFramebuffer(_,f.framebuffer),e.setRenderTarget(_));let Ot=!1;pt.length!==E.cameras.length&&(E.cameras.length=0,Ot=!0);for(let ht=0;ht<pt.length;ht++){const Kt=pt[ht];let Tt=null;if(f!==null)Tt=f.getViewport(Kt);else{const Lt=d.getViewSubImage(h,Kt);Tt=Lt.viewport,ht===0&&(e.setRenderTargetTextures(_,Lt.colorTexture,h.ignoreDepthValues?void 0:Lt.depthStencilTexture),e.setRenderTarget(_))}let Ae=D[ht];Ae===void 0&&(Ae=new ss,Ae.layers.enable(ht),Ae.viewport=new Er,D[ht]=Ae),Ae.matrix.fromArray(Kt.transform.matrix),Ae.matrix.decompose(Ae.position,Ae.quaternion,Ae.scale),Ae.projectionMatrix.fromArray(Kt.projectionMatrix),Ae.projectionMatrixInverse.copy(Ae.projectionMatrix).invert(),Ae.viewport.set(Tt.x,Tt.y,Tt.width,Tt.height),ht===0&&(E.matrix.copy(Ae.matrix),E.matrix.decompose(E.position,E.quaternion,E.scale)),Ot===!0&&E.cameras.push(Ae)}const bt=r.enabledFeatures;if(bt&&bt.includes("depth-sensing")){const ht=d.getDepthInformation(pt[0]);ht&&ht.isValid&&ht.texture&&m.init(e,ht,r.renderState)}}for(let pt=0;pt<S.length;pt++){const Ot=x[pt],bt=S[pt];Ot!==null&&bt!==void 0&&bt.update(Ot,Fe,u||o)}m.render(e,E),he&&he(xe,Fe),Fe.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:Fe}),p=null}const He=new WQ;He.setAnimationLoop(Ee),this.setAnimationLoop=function(xe){he=xe},this.dispose=function(){}}}function jDe(n,e){function t(v,g){v.matrixAutoUpdate===!0&&v.updateMatrix(),g.value.copy(v.matrix)}function i(v,g){g.color.getRGB(v.fogColor.value,UQ(n)),g.isFog?(v.fogNear.value=g.near,v.fogFar.value=g.far):g.isFogExp2&&(v.fogDensity.value=g.density)}function r(v,g,_,S,x){g.isMeshBasicMaterial||g.isMeshLambertMaterial?a(v,g):g.isMeshToonMaterial?(a(v,g),d(v,g)):g.isMeshPhongMaterial?(a(v,g),c(v,g)):g.isMeshStandardMaterial?(a(v,g),h(v,g),g.isMeshPhysicalMaterial&&f(v,g,x)):g.isMeshMatcapMaterial?(a(v,g),p(v,g)):g.isMeshDepthMaterial?a(v,g):g.isMeshDistanceMaterial?(a(v,g),m(v,g)):g.isMeshNormalMaterial?a(v,g):g.isLineBasicMaterial?(o(v,g),g.isLineDashedMaterial&&s(v,g)):g.isPointsMaterial?l(v,g,_,S):g.isSpriteMaterial?u(v,g):g.isShadowMaterial?(v.color.value.copy(g.color),v.opacity.value=g.opacity):g.isShaderMaterial&&(g.uniformsNeedUpdate=!1)}function a(v,g){v.opacity.value=g.opacity,g.color&&v.diffuse.value.copy(g.color),g.emissive&&v.emissive.value.copy(g.emissive).multiplyScalar(g.emissiveIntensity),g.map&&(v.map.value=g.map,t(g.map,v.mapTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,t(g.alphaMap,v.alphaMapTransform)),g.bumpMap&&(v.bumpMap.value=g.bumpMap,t(g.bumpMap,v.bumpMapTransform),v.bumpScale.value=g.bumpScale,g.side===rl&&(v.bumpScale.value*=-1)),g.normalMap&&(v.normalMap.value=g.normalMap,t(g.normalMap,v.normalMapTransform),v.normalScale.value.copy(g.normalScale),g.side===rl&&v.normalScale.value.negate()),g.displacementMap&&(v.displacementMap.value=g.displacementMap,t(g.displacementMap,v.displacementMapTransform),v.displacementScale.value=g.displacementScale,v.displacementBias.value=g.displacementBias),g.emissiveMap&&(v.emissiveMap.value=g.emissiveMap,t(g.emissiveMap,v.emissiveMapTransform)),g.specularMap&&(v.specularMap.value=g.specularMap,t(g.specularMap,v.specularMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest);const _=e.get(g).envMap;if(_&&(v.envMap.value=_,v.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,v.reflectivity.value=g.reflectivity,v.ior.value=g.ior,v.refractionRatio.value=g.refractionRatio),g.lightMap){v.lightMap.value=g.lightMap;const S=n._useLegacyLights===!0?Math.PI:1;v.lightMapIntensity.value=g.lightMapIntensity*S,t(g.lightMap,v.lightMapTransform)}g.aoMap&&(v.aoMap.value=g.aoMap,v.aoMapIntensity.value=g.aoMapIntensity,t(g.aoMap,v.aoMapTransform))}function o(v,g){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,g.map&&(v.map.value=g.map,t(g.map,v.mapTransform))}function s(v,g){v.dashSize.value=g.dashSize,v.totalSize.value=g.dashSize+g.gapSize,v.scale.value=g.scale}function l(v,g,_,S){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,v.size.value=g.size*_,v.scale.value=S*.5,g.map&&(v.map.value=g.map,t(g.map,v.uvTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,t(g.alphaMap,v.alphaMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest)}function u(v,g){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,v.rotation.value=g.rotation,g.map&&(v.map.value=g.map,t(g.map,v.mapTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,t(g.alphaMap,v.alphaMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest)}function c(v,g){v.specular.value.copy(g.specular),v.shininess.value=Math.max(g.shininess,1e-4)}function d(v,g){g.gradientMap&&(v.gradientMap.value=g.gradientMap)}function h(v,g){v.metalness.value=g.metalness,g.metalnessMap&&(v.metalnessMap.value=g.metalnessMap,t(g.metalnessMap,v.metalnessMapTransform)),v.roughness.value=g.roughness,g.roughnessMap&&(v.roughnessMap.value=g.roughnessMap,t(g.roughnessMap,v.roughnessMapTransform)),e.get(g).envMap&&(v.envMapIntensity.value=g.envMapIntensity)}function f(v,g,_){v.ior.value=g.ior,g.sheen>0&&(v.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),v.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(v.sheenColorMap.value=g.sheenColorMap,t(g.sheenColorMap,v.sheenColorMapTransform)),g.sheenRoughnessMap&&(v.sheenRoughnessMap.value=g.sheenRoughnessMap,t(g.sheenRoughnessMap,v.sheenRoughnessMapTransform))),g.clearcoat>0&&(v.clearcoat.value=g.clearcoat,v.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(v.clearcoatMap.value=g.clearcoatMap,t(g.clearcoatMap,v.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(v.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,t(g.clearcoatRoughnessMap,v.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(v.clearcoatNormalMap.value=g.clearcoatNormalMap,t(g.clearcoatNormalMap,v.clearcoatNormalMapTransform),v.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===rl&&v.clearcoatNormalScale.value.negate())),g.iridescence>0&&(v.iridescence.value=g.iridescence,v.iridescenceIOR.value=g.iridescenceIOR,v.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],v.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(v.iridescenceMap.value=g.iridescenceMap,t(g.iridescenceMap,v.iridescenceMapTransform)),g.iridescenceThicknessMap&&(v.iridescenceThicknessMap.value=g.iridescenceThicknessMap,t(g.iridescenceThicknessMap,v.iridescenceThicknessMapTransform))),g.transmission>0&&(v.transmission.value=g.transmission,v.transmissionSamplerMap.value=_.texture,v.transmissionSamplerSize.value.set(_.width,_.height),g.transmissionMap&&(v.transmissionMap.value=g.transmissionMap,t(g.transmissionMap,v.transmissionMapTransform)),v.thickness.value=g.thickness,g.thicknessMap&&(v.thicknessMap.value=g.thicknessMap,t(g.thicknessMap,v.thicknessMapTransform)),v.attenuationDistance.value=g.attenuationDistance,v.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(v.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(v.anisotropyMap.value=g.anisotropyMap,t(g.anisotropyMap,v.anisotropyMapTransform))),v.specularIntensity.value=g.specularIntensity,v.specularColor.value.copy(g.specularColor),g.specularColorMap&&(v.specularColorMap.value=g.specularColorMap,t(g.specularColorMap,v.specularColorMapTransform)),g.specularIntensityMap&&(v.specularIntensityMap.value=g.specularIntensityMap,t(g.specularIntensityMap,v.specularIntensityMapTransform))}function p(v,g){g.matcap&&(v.matcap.value=g.matcap)}function m(v,g){const _=e.get(g).light;v.referencePosition.value.setFromMatrixPosition(_.matrixWorld),v.nearDistance.value=_.shadow.camera.near,v.farDistance.value=_.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function $De(n,e,t,i){let r={},a={},o=[];const s=t.isWebGL2?n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(_,S){const x=S.program;i.uniformBlockBinding(_,x)}function u(_,S){let x=r[_.id];x===void 0&&(p(_),x=c(_),r[_.id]=x,_.addEventListener("dispose",v));const A=S.program;i.updateUBOMapping(_,A);const C=e.render.frame;a[_.id]!==C&&(h(_),a[_.id]=C)}function c(_){const S=d();_.__bindingPointIndex=S;const x=n.createBuffer(),A=_.__size,C=_.usage;return n.bindBuffer(n.UNIFORM_BUFFER,x),n.bufferData(n.UNIFORM_BUFFER,A,C),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,S,x),x}function d(){for(let _=0;_<s;_++)if(o.indexOf(_)===-1)return o.push(_),_;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function h(_){const S=r[_.id],x=_.uniforms,A=_.__cache;n.bindBuffer(n.UNIFORM_BUFFER,S);for(let C=0,M=x.length;C<M;C++){const I=Array.isArray(x[C])?x[C]:[x[C]];for(let D=0,E=I.length;D<E;D++){const P=I[D];if(f(P,C,D,A)===!0){const F=P.__offset,V=Array.isArray(P.value)?P.value:[P.value];let G=0;for(let W=0;W<V.length;W++){const Y=V[W],Q=m(Y);typeof Y=="number"||typeof Y=="boolean"?(P.__data[0]=Y,n.bufferSubData(n.UNIFORM_BUFFER,F+G,P.__data)):Y.isMatrix3?(P.__data[0]=Y.elements[0],P.__data[1]=Y.elements[1],P.__data[2]=Y.elements[2],P.__data[3]=0,P.__data[4]=Y.elements[3],P.__data[5]=Y.elements[4],P.__data[6]=Y.elements[5],P.__data[7]=0,P.__data[8]=Y.elements[6],P.__data[9]=Y.elements[7],P.__data[10]=Y.elements[8],P.__data[11]=0):(Y.toArray(P.__data,G),G+=Q.storage/Float32Array.BYTES_PER_ELEMENT)}n.bufferSubData(n.UNIFORM_BUFFER,F,P.__data)}}}n.bindBuffer(n.UNIFORM_BUFFER,null)}function f(_,S,x,A){const C=_.value,M=S+"_"+x;if(A[M]===void 0)return typeof C=="number"||typeof C=="boolean"?A[M]=C:A[M]=C.clone(),!0;{const I=A[M];if(typeof C=="number"||typeof C=="boolean"){if(I!==C)return A[M]=C,!0}else if(I.equals(C)===!1)return I.copy(C),!0}return!1}function p(_){const S=_.uniforms;let x=0;const A=16;for(let M=0,I=S.length;M<I;M++){const D=Array.isArray(S[M])?S[M]:[S[M]];for(let E=0,P=D.length;E<P;E++){const F=D[E],V=Array.isArray(F.value)?F.value:[F.value];for(let G=0,W=V.length;G<W;G++){const Y=V[G],Q=m(Y),K=x%A;K!==0&&A-K<Q.boundary&&(x+=A-K),F.__data=new Float32Array(Q.storage/Float32Array.BYTES_PER_ELEMENT),F.__offset=x,x+=Q.storage}}}const C=x%A;return C>0&&(x+=A-C),_.__size=x,_.__cache={},this}function m(_){const S={boundary:0,storage:0};return typeof _=="number"||typeof _=="boolean"?(S.boundary=4,S.storage=4):_.isVector2?(S.boundary=8,S.storage=8):_.isVector3||_.isColor?(S.boundary=16,S.storage=12):_.isVector4?(S.boundary=16,S.storage=16):_.isMatrix3?(S.boundary=48,S.storage=48):_.isMatrix4?(S.boundary=64,S.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),S}function v(_){const S=_.target;S.removeEventListener("dispose",v);const x=o.indexOf(S.__bindingPointIndex);o.splice(x,1),n.deleteBuffer(r[S.id]),delete r[S.id],delete a[S.id]}function g(){for(const _ in r)n.deleteBuffer(r[_]);o=[],r={},a={}}return{bind:l,update:u,dispose:g}}class vR{constructor(e={}){const{canvas:t=GEe(),context:i=null,depth:r=!0,stencil:a=!0,alpha:o=!1,antialias:s=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:u=!1,powerPreference:c="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let h;i!==null?h=i.getContextAttributes().alpha:h=o;const f=new Uint32Array(4),p=new Int32Array(4);let m=null,v=null;const g=[],_=[];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=$r,this._useLegacyLights=!1,this.toneMapping=Sh,this.toneMappingExposure=1;const S=this;let x=!1,A=0,C=0,M=null,I=-1,D=null;const E=new Er,P=new Er;let F=null;const V=new Jn(0);let G=0,W=t.width,Y=t.height,Q=1,K=null,ae=null;const ie=new Er(0,0,W,Y),he=new Er(0,0,W,Y);let Ee=!1;const He=new fR;let xe=!1,Fe=!1,pt=null;const Ot=new Bi,bt=new on,ht=new Le,Kt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Tt(){return M===null?Q:1}let Ae=i;function Lt(we,Xe){for(let Pt=0;Pt<we.length;Pt++){const Rt=we[Pt],Et=t.getContext(Rt,Xe);if(Et!==null)return Et}return null}try{const we={alpha:!0,depth:r,stencil:a,antialias:s,premultipliedAlpha:l,preserveDrawingBuffer:u,powerPreference:c,failIfMajorPerformanceCaveat:d};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${rR}`),t.addEventListener("webglcontextlost",zn,!1),t.addEventListener("webglcontextrestored",Be,!1),t.addEventListener("webglcontextcreationerror",pn,!1),Ae===null){const Xe=["webgl2","webgl","experimental-webgl"];if(S.isWebGL1Renderer===!0&&Xe.shift(),Ae=Lt(Xe,we),Ae===null)throw Lt(Xe)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}typeof WebGLRenderingContext!="undefined"&&Ae instanceof WebGLRenderingContext&&console.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."),Ae.getShaderPrecisionFormat===void 0&&(Ae.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(we){throw console.error("THREE.WebGLRenderer: "+we.message),we}let vt,Ft,k,_t,Ct,J,ee,Ue,xt,Bt,Ce,We,$e,mt,Yt,st,it,Vt,Zt,nn,cn,an,Ln,je;function Ht(){vt=new QLe(Ae),Ft=new qLe(Ae,vt,e),vt.init(Ft),an=new BDe(Ae,vt,Ft),k=new FDe(Ae,vt,Ft),_t=new nIe(Ae),Ct=new xDe,J=new ODe(Ae,vt,k,Ct,Ft,an,_t),ee=new YLe(S),Ue=new JLe(S),xt=new cPe(Ae,Ft),Ln=new jLe(Ae,vt,xt,Ft),Bt=new eIe(Ae,xt,_t,Ln),Ce=new oIe(Ae,Bt,xt,_t),Zt=new aIe(Ae,Ft,J),st=new XLe(Ct),We=new bDe(S,ee,Ue,vt,Ft,Ln,st),$e=new jDe(S,Ct),mt=new TDe,Yt=new RDe(vt,Ft),Vt=new WLe(S,ee,Ue,k,Ce,h,l),it=new kDe(S,Ce,Ft),je=new $De(Ae,_t,Ft,k),nn=new $Le(Ae,vt,_t,Ft),cn=new tIe(Ae,vt,_t,Ft),_t.programs=We.programs,S.capabilities=Ft,S.extensions=vt,S.properties=Ct,S.renderLists=mt,S.shadowMap=it,S.state=k,S.info=_t}Ht();const wn=new WDe(S,Ae);this.xr=wn,this.getContext=function(){return Ae},this.getContextAttributes=function(){return Ae.getContextAttributes()},this.forceContextLoss=function(){const we=vt.get("WEBGL_lose_context");we&&we.loseContext()},this.forceContextRestore=function(){const we=vt.get("WEBGL_lose_context");we&&we.restoreContext()},this.getPixelRatio=function(){return Q},this.setPixelRatio=function(we){we!==void 0&&(Q=we,this.setSize(W,Y,!1))},this.getSize=function(we){return we.set(W,Y)},this.setSize=function(we,Xe,Pt=!0){if(wn.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}W=we,Y=Xe,t.width=Math.floor(we*Q),t.height=Math.floor(Xe*Q),Pt===!0&&(t.style.width=we+"px",t.style.height=Xe+"px"),this.setViewport(0,0,we,Xe)},this.getDrawingBufferSize=function(we){return we.set(W*Q,Y*Q).floor()},this.setDrawingBufferSize=function(we,Xe,Pt){W=we,Y=Xe,Q=Pt,t.width=Math.floor(we*Pt),t.height=Math.floor(Xe*Pt),this.setViewport(0,0,we,Xe)},this.getCurrentViewport=function(we){return we.copy(E)},this.getViewport=function(we){return we.copy(ie)},this.setViewport=function(we,Xe,Pt,Rt){we.isVector4?ie.set(we.x,we.y,we.z,we.w):ie.set(we,Xe,Pt,Rt),k.viewport(E.copy(ie).multiplyScalar(Q).floor())},this.getScissor=function(we){return we.copy(he)},this.setScissor=function(we,Xe,Pt,Rt){we.isVector4?he.set(we.x,we.y,we.z,we.w):he.set(we,Xe,Pt,Rt),k.scissor(P.copy(he).multiplyScalar(Q).floor())},this.getScissorTest=function(){return Ee},this.setScissorTest=function(we){k.setScissorTest(Ee=we)},this.setOpaqueSort=function(we){K=we},this.setTransparentSort=function(we){ae=we},this.getClearColor=function(we){return we.copy(Vt.getClearColor())},this.setClearColor=function(){Vt.setClearColor.apply(Vt,arguments)},this.getClearAlpha=function(){return Vt.getClearAlpha()},this.setClearAlpha=function(){Vt.setClearAlpha.apply(Vt,arguments)},this.clear=function(we=!0,Xe=!0,Pt=!0){let Rt=0;if(we){let Et=!1;if(M!==null){const Fn=M.texture.format;Et=Fn===PQ||Fn===EQ||Fn===MQ}if(Et){const Fn=M.texture.type,Qn=Fn===bh||Fn===uh||Fn===oR||Fn===Rp||Fn===AQ||Fn===CQ,ci=Vt.getClearColor(),li=Vt.getClearAlpha(),Z=ci.r,H=ci.g,w=ci.b;Qn?(f[0]=Z,f[1]=H,f[2]=w,f[3]=li,Ae.clearBufferuiv(Ae.COLOR,0,f)):(p[0]=Z,p[1]=H,p[2]=w,p[3]=li,Ae.clearBufferiv(Ae.COLOR,0,p))}else Rt|=Ae.COLOR_BUFFER_BIT}Xe&&(Rt|=Ae.DEPTH_BUFFER_BIT),Pt&&(Rt|=Ae.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),Ae.clear(Rt)},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",zn,!1),t.removeEventListener("webglcontextrestored",Be,!1),t.removeEventListener("webglcontextcreationerror",pn,!1),mt.dispose(),Yt.dispose(),Ct.dispose(),ee.dispose(),Ue.dispose(),Ce.dispose(),Ln.dispose(),je.dispose(),We.dispose(),wn.dispose(),wn.removeEventListener("sessionstart",hn),wn.removeEventListener("sessionend",Nn),pt&&(pt.dispose(),pt=null),Re.stop()};function zn(we){we.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),x=!0}function Be(){console.log("THREE.WebGLRenderer: Context Restored."),x=!1;const we=_t.autoReset,Xe=it.enabled,Pt=it.autoUpdate,Rt=it.needsUpdate,Et=it.type;Ht(),_t.autoReset=we,it.enabled=Xe,it.autoUpdate=Pt,it.needsUpdate=Rt,it.type=Et}function pn(we){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",we.statusMessage)}function dn(we){const Xe=we.target;Xe.removeEventListener("dispose",dn),Un(Xe)}function Un(we){En(we),Ct.remove(we)}function En(we){const Xe=Ct.get(we).programs;Xe!==void 0&&(Xe.forEach(function(Pt){We.releaseProgram(Pt)}),we.isShaderMaterial&&We.releaseShaderCache(we))}this.renderBufferDirect=function(we,Xe,Pt,Rt,Et,Fn){Xe===null&&(Xe=Kt);const Qn=Et.isMesh&&Et.matrixWorld.determinant()<0,ci=ke(we,Xe,Pt,Rt,Et);k.setMaterial(Rt,Qn);let li=Pt.index,Z=1;if(Rt.wireframe===!0){if(li=Bt.getWireframeAttribute(Pt),li===void 0)return;Z=2}const H=Pt.drawRange,w=Pt.attributes.position;let T=H.start*Z,R=(H.start+H.count)*Z;Fn!==null&&(T=Math.max(T,Fn.start*Z),R=Math.min(R,(Fn.start+Fn.count)*Z)),li!==null?(T=Math.max(T,0),R=Math.min(R,li.count)):w!=null&&(T=Math.max(T,0),R=Math.min(R,w.count));const N=R-T;if(N<0||N===1/0)return;Ln.setup(Et,Rt,ci,Pt,li);let z,U=nn;if(li!==null&&(z=xt.get(li),U=cn,U.setIndex(z)),Et.isMesh)Rt.wireframe===!0?(k.setLineWidth(Rt.wireframeLinewidth*Tt()),U.setMode(Ae.LINES)):U.setMode(Ae.TRIANGLES);else if(Et.isLine){let ue=Rt.linewidth;ue===void 0&&(ue=1),k.setLineWidth(ue*Tt()),Et.isLineSegments?U.setMode(Ae.LINES):Et.isLineLoop?U.setMode(Ae.LINE_LOOP):U.setMode(Ae.LINE_STRIP)}else Et.isPoints?U.setMode(Ae.POINTS):Et.isSprite&&U.setMode(Ae.TRIANGLES);if(Et.isBatchedMesh)U.renderMultiDraw(Et._multiDrawStarts,Et._multiDrawCounts,Et._multiDrawCount);else if(Et.isInstancedMesh)U.renderInstances(T,N,Et.count);else if(Pt.isInstancedBufferGeometry){const ue=Pt._maxInstanceCount!==void 0?Pt._maxInstanceCount:1/0,pe=Math.min(Pt.instanceCount,ue);U.renderInstances(T,N,pe)}else U.render(T,N)};function Tn(we,Xe,Pt){we.transparent===!0&&we.side===aa&&we.forceSinglePass===!1?(we.side=rl,we.needsUpdate=!0,ze(we,Xe,Pt),we.side=Zc,we.needsUpdate=!0,ze(we,Xe,Pt),we.side=aa):ze(we,Xe,Pt)}this.compile=function(we,Xe,Pt=null){Pt===null&&(Pt=we),v=Yt.get(Pt),v.init(),_.push(v),Pt.traverseVisible(function(Et){Et.isLight&&Et.layers.test(Xe.layers)&&(v.pushLight(Et),Et.castShadow&&v.pushShadow(Et))}),we!==Pt&&we.traverseVisible(function(Et){Et.isLight&&Et.layers.test(Xe.layers)&&(v.pushLight(Et),Et.castShadow&&v.pushShadow(Et))}),v.setupLights(S._useLegacyLights);const Rt=new Set;return we.traverse(function(Et){const Fn=Et.material;if(Fn)if(Array.isArray(Fn))for(let Qn=0;Qn<Fn.length;Qn++){const ci=Fn[Qn];Tn(ci,Pt,Et),Rt.add(ci)}else Tn(Fn,Pt,Et),Rt.add(Fn)}),_.pop(),v=null,Rt},this.compileAsync=function(we,Xe,Pt=null){const Rt=this.compile(we,Xe,Pt);return new Promise(Et=>{function Fn(){if(Rt.forEach(function(Qn){Ct.get(Qn).currentProgram.isReady()&&Rt.delete(Qn)}),Rt.size===0){Et(we);return}setTimeout(Fn,10)}vt.get("KHR_parallel_shader_compile")!==null?Fn():setTimeout(Fn,10)})};let ut=null;function Jt(we){ut&&ut(we)}function hn(){Re.stop()}function Nn(){Re.start()}const Re=new WQ;Re.setAnimationLoop(Jt),typeof self!="undefined"&&Re.setContext(self),this.setAnimationLoop=function(we){ut=we,wn.setAnimationLoop(we),we===null?Re.stop():Re.start()},wn.addEventListener("sessionstart",hn),wn.addEventListener("sessionend",Nn),this.render=function(we,Xe){if(Xe!==void 0&&Xe.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(x===!0)return;we.matrixWorldAutoUpdate===!0&&we.updateMatrixWorld(),Xe.parent===null&&Xe.matrixWorldAutoUpdate===!0&&Xe.updateMatrixWorld(),wn.enabled===!0&&wn.isPresenting===!0&&(wn.cameraAutoUpdate===!0&&wn.updateCamera(Xe),Xe=wn.getCamera()),we.isScene===!0&&we.onBeforeRender(S,we,Xe,M),v=Yt.get(we,_.length),v.init(),_.push(v),Ot.multiplyMatrices(Xe.projectionMatrix,Xe.matrixWorldInverse),He.setFromProjectionMatrix(Ot),Fe=this.localClippingEnabled,xe=st.init(this.clippingPlanes,Fe),m=mt.get(we,g.length),m.init(),g.push(m),lt(we,Xe,0,S.sortObjects),m.finish(),S.sortObjects===!0&&m.sort(K,ae),this.info.render.frame++,xe===!0&&st.beginShadows();const Pt=v.state.shadowsArray;if(it.render(Pt,we,Xe),xe===!0&&st.endShadows(),this.info.autoReset===!0&&this.info.reset(),(wn.enabled===!1||wn.isPresenting===!1||wn.hasDepthSensing()===!1)&&Vt.render(m,we),v.setupLights(S._useLegacyLights),Xe.isArrayCamera){const Rt=Xe.cameras;for(let Et=0,Fn=Rt.length;Et<Fn;Et++){const Qn=Rt[Et];sn(m,we,Qn,Qn.viewport)}}else sn(m,we,Xe);M!==null&&(J.updateMultisampleRenderTarget(M),J.updateRenderTargetMipmap(M)),we.isScene===!0&&we.onAfterRender(S,we,Xe),Ln.resetDefaultState(),I=-1,D=null,_.pop(),_.length>0?v=_[_.length-1]:v=null,g.pop(),g.length>0?m=g[g.length-1]:m=null};function lt(we,Xe,Pt,Rt){if(we.visible===!1)return;if(we.layers.test(Xe.layers)){if(we.isGroup)Pt=we.renderOrder;else if(we.isLOD)we.autoUpdate===!0&&we.update(Xe);else if(we.isLight)v.pushLight(we),we.castShadow&&v.pushShadow(we);else if(we.isSprite){if(!we.frustumCulled||He.intersectsSprite(we)){Rt&&ht.setFromMatrixPosition(we.matrixWorld).applyMatrix4(Ot);const Qn=Ce.update(we),ci=we.material;ci.visible&&m.push(we,Qn,ci,Pt,ht.z,null)}}else if((we.isMesh||we.isLine||we.isPoints)&&(!we.frustumCulled||He.intersectsObject(we))){const Qn=Ce.update(we),ci=we.material;if(Rt&&(we.boundingSphere!==void 0?(we.boundingSphere===null&&we.computeBoundingSphere(),ht.copy(we.boundingSphere.center)):(Qn.boundingSphere===null&&Qn.computeBoundingSphere(),ht.copy(Qn.boundingSphere.center)),ht.applyMatrix4(we.matrixWorld).applyMatrix4(Ot)),Array.isArray(ci)){const li=Qn.groups;for(let Z=0,H=li.length;Z<H;Z++){const w=li[Z],T=ci[w.materialIndex];T&&T.visible&&m.push(we,Qn,T,Pt,ht.z,w)}}else ci.visible&&m.push(we,Qn,ci,Pt,ht.z,null)}}const Fn=we.children;for(let Qn=0,ci=Fn.length;Qn<ci;Qn++)lt(Fn[Qn],Xe,Pt,Rt)}function sn(we,Xe,Pt,Rt){const Et=we.opaque,Fn=we.transmissive,Qn=we.transparent;v.setupLightsView(Pt),xe===!0&&st.setGlobalState(S.clippingPlanes,Pt),Fn.length>0&&Pi(Et,Fn,Xe,Pt),Rt&&k.viewport(E.copy(Rt)),Et.length>0&&er(Et,Xe,Pt),Fn.length>0&&er(Fn,Xe,Pt),Qn.length>0&&er(Qn,Xe,Pt),k.buffers.depth.setTest(!0),k.buffers.depth.setMask(!0),k.buffers.color.setMask(!0),k.setPolygonOffset(!1)}function Pi(we,Xe,Pt,Rt){if((Pt.isScene===!0?Pt.overrideMaterial:null)!==null)return;const Fn=Ft.isWebGL2;pt===null&&(pt=new Hp(1,1,{generateMipmaps:!0,type:vt.has("EXT_color_buffer_half_float")?K9:bh,minFilter:kc,samples:Fn?4:0})),S.getDrawingBufferSize(bt),Fn?pt.setSize(bt.x,bt.y):pt.setSize(z8(bt.x),z8(bt.y));const Qn=S.getRenderTarget();S.setRenderTarget(pt),S.getClearColor(V),G=S.getClearAlpha(),G<1&&S.setClearColor(16777215,.5),S.clear();const ci=S.toneMapping;S.toneMapping=Sh,er(we,Pt,Rt),J.updateMultisampleRenderTarget(pt),J.updateRenderTargetMipmap(pt);let li=!1;for(let Z=0,H=Xe.length;Z<H;Z++){const w=Xe[Z],T=w.object,R=w.geometry,N=w.material,z=w.group;if(N.side===aa&&T.layers.test(Rt.layers)){const U=N.side;N.side=rl,N.needsUpdate=!0,_e(T,Pt,Rt,R,N,z),N.side=U,N.needsUpdate=!0,li=!0}}li===!0&&(J.updateMultisampleRenderTarget(pt),J.updateRenderTargetMipmap(pt)),S.setRenderTarget(Qn),S.setClearColor(V,G),S.toneMapping=ci}function er(we,Xe,Pt){const Rt=Xe.isScene===!0?Xe.overrideMaterial:null;for(let Et=0,Fn=we.length;Et<Fn;Et++){const Qn=we[Et],ci=Qn.object,li=Qn.geometry,Z=Rt===null?Qn.material:Rt,H=Qn.group;ci.layers.test(Pt.layers)&&_e(ci,Xe,Pt,li,Z,H)}}function _e(we,Xe,Pt,Rt,Et,Fn){we.onBeforeRender(S,Xe,Pt,Rt,Et,Fn),we.modelViewMatrix.multiplyMatrices(Pt.matrixWorldInverse,we.matrixWorld),we.normalMatrix.getNormalMatrix(we.modelViewMatrix),Et.onBeforeRender(S,Xe,Pt,Rt,we,Fn),Et.transparent===!0&&Et.side===aa&&Et.forceSinglePass===!1?(Et.side=rl,Et.needsUpdate=!0,S.renderBufferDirect(Pt,Xe,Rt,Et,we,Fn),Et.side=Zc,Et.needsUpdate=!0,S.renderBufferDirect(Pt,Xe,Rt,Et,we,Fn),Et.side=aa):S.renderBufferDirect(Pt,Xe,Rt,Et,we,Fn),we.onAfterRender(S,Xe,Pt,Rt,Et,Fn)}function ze(we,Xe,Pt){Xe.isScene!==!0&&(Xe=Kt);const Rt=Ct.get(we),Et=v.state.lights,Fn=v.state.shadowsArray,Qn=Et.state.version,ci=We.getParameters(we,Et.state,Fn,Xe,Pt),li=We.getProgramCacheKey(ci);let Z=Rt.programs;Rt.environment=we.isMeshStandardMaterial?Xe.environment:null,Rt.fog=Xe.fog,Rt.envMap=(we.isMeshStandardMaterial?Ue:ee).get(we.envMap||Rt.environment),Z===void 0&&(we.addEventListener("dispose",dn),Z=new Map,Rt.programs=Z);let H=Z.get(li);if(H!==void 0){if(Rt.currentProgram===H&&Rt.lightsStateVersion===Qn)return At(we,ci),H}else ci.uniforms=We.getUniforms(we),we.onBuild(Pt,ci,S),we.onBeforeCompile(ci,S),H=We.acquireProgram(ci,li),Z.set(li,H),Rt.uniforms=ci.uniforms;const w=Rt.uniforms;return(!we.isShaderMaterial&&!we.isRawShaderMaterial||we.clipping===!0)&&(w.clippingPlanes=st.uniform),At(we,ci),Rt.needsLights=en(we),Rt.lightsStateVersion=Qn,Rt.needsLights&&(w.ambientLightColor.value=Et.state.ambient,w.lightProbe.value=Et.state.probe,w.directionalLights.value=Et.state.directional,w.directionalLightShadows.value=Et.state.directionalShadow,w.spotLights.value=Et.state.spot,w.spotLightShadows.value=Et.state.spotShadow,w.rectAreaLights.value=Et.state.rectArea,w.ltc_1.value=Et.state.rectAreaLTC1,w.ltc_2.value=Et.state.rectAreaLTC2,w.pointLights.value=Et.state.point,w.pointLightShadows.value=Et.state.pointShadow,w.hemisphereLights.value=Et.state.hemi,w.directionalShadowMap.value=Et.state.directionalShadowMap,w.directionalShadowMatrix.value=Et.state.directionalShadowMatrix,w.spotShadowMap.value=Et.state.spotShadowMap,w.spotLightMatrix.value=Et.state.spotLightMatrix,w.spotLightMap.value=Et.state.spotLightMap,w.pointShadowMap.value=Et.state.pointShadowMap,w.pointShadowMatrix.value=Et.state.pointShadowMatrix),Rt.currentProgram=H,Rt.uniformsList=null,H}function Qe(we){if(we.uniformsList===null){const Xe=we.currentProgram.getUniforms();we.uniformsList=m5.seqWithValue(Xe.seq,we.uniforms)}return we.uniformsList}function At(we,Xe){const Pt=Ct.get(we);Pt.outputColorSpace=Xe.outputColorSpace,Pt.batching=Xe.batching,Pt.instancing=Xe.instancing,Pt.instancingColor=Xe.instancingColor,Pt.skinning=Xe.skinning,Pt.morphTargets=Xe.morphTargets,Pt.morphNormals=Xe.morphNormals,Pt.morphColors=Xe.morphColors,Pt.morphTargetsCount=Xe.morphTargetsCount,Pt.numClippingPlanes=Xe.numClippingPlanes,Pt.numIntersection=Xe.numClipIntersection,Pt.vertexAlphas=Xe.vertexAlphas,Pt.vertexTangents=Xe.vertexTangents,Pt.toneMapping=Xe.toneMapping}function ke(we,Xe,Pt,Rt,Et){Xe.isScene!==!0&&(Xe=Kt),J.resetTextureUnits();const Fn=Xe.fog,Qn=Rt.isMeshStandardMaterial?Xe.environment:null,ci=M===null?S.outputColorSpace:M.isXRRenderTarget===!0?M.texture.colorSpace:bo,li=(Rt.isMeshStandardMaterial?Ue:ee).get(Rt.envMap||Qn),Z=Rt.vertexColors===!0&&!!Pt.attributes.color&&Pt.attributes.color.itemSize===4,H=!!Pt.attributes.tangent&&(!!Rt.normalMap||Rt.anisotropy>0),w=!!Pt.morphAttributes.position,T=!!Pt.morphAttributes.normal,R=!!Pt.morphAttributes.color;let N=Sh;Rt.toneMapped&&(M===null||M.isXRRenderTarget===!0)&&(N=S.toneMapping);const z=Pt.morphAttributes.position||Pt.morphAttributes.normal||Pt.morphAttributes.color,U=z!==void 0?z.length:0,ue=Ct.get(Rt),pe=v.state.lights;if(xe===!0&&(Fe===!0||we!==D)){const fe=we===D&&Rt.id===I;st.setState(Rt,we,fe)}let de=!1;Rt.version===ue.__version?(ue.needsLights&&ue.lightsStateVersion!==pe.state.version||ue.outputColorSpace!==ci||Et.isBatchedMesh&&ue.batching===!1||!Et.isBatchedMesh&&ue.batching===!0||Et.isInstancedMesh&&ue.instancing===!1||!Et.isInstancedMesh&&ue.instancing===!0||Et.isSkinnedMesh&&ue.skinning===!1||!Et.isSkinnedMesh&&ue.skinning===!0||Et.isInstancedMesh&&ue.instancingColor===!0&&Et.instanceColor===null||Et.isInstancedMesh&&ue.instancingColor===!1&&Et.instanceColor!==null||ue.envMap!==li||Rt.fog===!0&&ue.fog!==Fn||ue.numClippingPlanes!==void 0&&(ue.numClippingPlanes!==st.numPlanes||ue.numIntersection!==st.numIntersection)||ue.vertexAlphas!==Z||ue.vertexTangents!==H||ue.morphTargets!==w||ue.morphNormals!==T||ue.morphColors!==R||ue.toneMapping!==N||Ft.isWebGL2===!0&&ue.morphTargetsCount!==U)&&(de=!0):(de=!0,ue.__version=Rt.version);let se=ue.currentProgram;de===!0&&(se=ze(Rt,Xe,Et));let re=!1,Oe=!1,be=!1;const me=se.getUniforms(),ge=ue.uniforms;if(k.useProgram(se.program)&&(re=!0,Oe=!0,be=!0),Rt.id!==I&&(I=Rt.id,Oe=!0),re||D!==we){me.setValue(Ae,"projectionMatrix",we.projectionMatrix),me.setValue(Ae,"viewMatrix",we.matrixWorldInverse);const fe=me.map.cameraPosition;fe!==void 0&&fe.setValue(Ae,ht.setFromMatrixPosition(we.matrixWorld)),Ft.logarithmicDepthBuffer&&me.setValue(Ae,"logDepthBufFC",2/(Math.log(we.far+1)/Math.LN2)),(Rt.isMeshPhongMaterial||Rt.isMeshToonMaterial||Rt.isMeshLambertMaterial||Rt.isMeshBasicMaterial||Rt.isMeshStandardMaterial||Rt.isShaderMaterial)&&me.setValue(Ae,"isOrthographic",we.isOrthographicCamera===!0),D!==we&&(D=we,Oe=!0,be=!0)}if(Et.isSkinnedMesh){me.setOptional(Ae,Et,"bindMatrix"),me.setOptional(Ae,Et,"bindMatrixInverse");const fe=Et.skeleton;fe&&(Ft.floatVertexTextures?(fe.boneTexture===null&&fe.computeBoneTexture(),me.setValue(Ae,"boneTexture",fe.boneTexture,J)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Et.isBatchedMesh&&(me.setOptional(Ae,Et,"batchingTexture"),me.setValue(Ae,"batchingTexture",Et._matricesTexture,J));const Ze=Pt.morphAttributes;if((Ze.position!==void 0||Ze.normal!==void 0||Ze.color!==void 0&&Ft.isWebGL2===!0)&&Zt.update(Et,Pt,se),(Oe||ue.receiveShadow!==Et.receiveShadow)&&(ue.receiveShadow=Et.receiveShadow,me.setValue(Ae,"receiveShadow",Et.receiveShadow)),Rt.isMeshGouraudMaterial&&Rt.envMap!==null&&(ge.envMap.value=li,ge.flipEnvMap.value=li.isCubeTexture&&li.isRenderTargetTexture===!1?-1:1),Oe&&(me.setValue(Ae,"toneMappingExposure",S.toneMappingExposure),ue.needsLights&&ft(ge,be),Fn&&Rt.fog===!0&&$e.refreshFogUniforms(ge,Fn),$e.refreshMaterialUniforms(ge,Rt,Q,Y,pt),m5.upload(Ae,Qe(ue),ge,J)),Rt.isShaderMaterial&&Rt.uniformsNeedUpdate===!0&&(m5.upload(Ae,Qe(ue),ge,J),Rt.uniformsNeedUpdate=!1),Rt.isSpriteMaterial&&me.setValue(Ae,"center",Et.center),me.setValue(Ae,"modelViewMatrix",Et.modelViewMatrix),me.setValue(Ae,"normalMatrix",Et.normalMatrix),me.setValue(Ae,"modelMatrix",Et.matrixWorld),Rt.isShaderMaterial||Rt.isRawShaderMaterial){const fe=Rt.uniformsGroups;for(let B=0,te=fe.length;B<te;B++)if(Ft.isWebGL2){const oe=fe[B];je.update(oe,se),je.bind(oe,se)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return se}function ft(we,Xe){we.ambientLightColor.needsUpdate=Xe,we.lightProbe.needsUpdate=Xe,we.directionalLights.needsUpdate=Xe,we.directionalLightShadows.needsUpdate=Xe,we.pointLights.needsUpdate=Xe,we.pointLightShadows.needsUpdate=Xe,we.spotLights.needsUpdate=Xe,we.spotLightShadows.needsUpdate=Xe,we.rectAreaLights.needsUpdate=Xe,we.hemisphereLights.needsUpdate=Xe}function en(we){return we.isMeshLambertMaterial||we.isMeshToonMaterial||we.isMeshPhongMaterial||we.isMeshStandardMaterial||we.isShadowMaterial||we.isShaderMaterial&&we.lights===!0}this.getActiveCubeFace=function(){return A},this.getActiveMipmapLevel=function(){return C},this.getRenderTarget=function(){return M},this.setRenderTargetTextures=function(we,Xe,Pt){Ct.get(we.texture).__webglTexture=Xe,Ct.get(we.depthTexture).__webglTexture=Pt;const Rt=Ct.get(we);Rt.__hasExternalTextures=!0,Rt.__hasExternalTextures&&(Rt.__autoAllocateDepthBuffer=Pt===void 0,Rt.__autoAllocateDepthBuffer||vt.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),Rt.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(we,Xe){const Pt=Ct.get(we);Pt.__webglFramebuffer=Xe,Pt.__useDefaultFramebuffer=Xe===void 0},this.setRenderTarget=function(we,Xe=0,Pt=0){M=we,A=Xe,C=Pt;let Rt=!0,Et=null,Fn=!1,Qn=!1;if(we){const li=Ct.get(we);li.__useDefaultFramebuffer!==void 0?(k.bindFramebuffer(Ae.FRAMEBUFFER,null),Rt=!1):li.__webglFramebuffer===void 0?J.setupRenderTarget(we):li.__hasExternalTextures&&J.rebindTextures(we,Ct.get(we.texture).__webglTexture,Ct.get(we.depthTexture).__webglTexture);const Z=we.texture;(Z.isData3DTexture||Z.isDataArrayTexture||Z.isCompressedArrayTexture)&&(Qn=!0);const H=Ct.get(we).__webglFramebuffer;we.isWebGLCubeRenderTarget?(Array.isArray(H[Xe])?Et=H[Xe][Pt]:Et=H[Xe],Fn=!0):Ft.isWebGL2&&we.samples>0&&J.useMultisampledRTT(we)===!1?Et=Ct.get(we).__webglMultisampledFramebuffer:Array.isArray(H)?Et=H[Pt]:Et=H,E.copy(we.viewport),P.copy(we.scissor),F=we.scissorTest}else E.copy(ie).multiplyScalar(Q).floor(),P.copy(he).multiplyScalar(Q).floor(),F=Ee;if(k.bindFramebuffer(Ae.FRAMEBUFFER,Et)&&Ft.drawBuffers&&Rt&&k.drawBuffers(we,Et),k.viewport(E),k.scissor(P),k.setScissorTest(F),Fn){const li=Ct.get(we.texture);Ae.framebufferTexture2D(Ae.FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,Ae.TEXTURE_CUBE_MAP_POSITIVE_X+Xe,li.__webglTexture,Pt)}else if(Qn){const li=Ct.get(we.texture),Z=Xe||0;Ae.framebufferTextureLayer(Ae.FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,li.__webglTexture,Pt||0,Z)}I=-1},this.readRenderTargetPixels=function(we,Xe,Pt,Rt,Et,Fn,Qn){if(!(we&&we.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ci=Ct.get(we).__webglFramebuffer;if(we.isWebGLCubeRenderTarget&&Qn!==void 0&&(ci=ci[Qn]),ci){k.bindFramebuffer(Ae.FRAMEBUFFER,ci);try{const li=we.texture,Z=li.format,H=li.type;if(Z!==y0&&an.convert(Z)!==Ae.getParameter(Ae.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const w=H===K9&&(vt.has("EXT_color_buffer_half_float")||Ft.isWebGL2&&vt.has("EXT_color_buffer_float"));if(H!==bh&&an.convert(H)!==Ae.getParameter(Ae.IMPLEMENTATION_COLOR_READ_TYPE)&&!(H===Nu&&(Ft.isWebGL2||vt.has("OES_texture_float")||vt.has("WEBGL_color_buffer_float")))&&!w){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}Xe>=0&&Xe<=we.width-Rt&&Pt>=0&&Pt<=we.height-Et&&Ae.readPixels(Xe,Pt,Rt,Et,an.convert(Z),an.convert(H),Fn)}finally{const li=M!==null?Ct.get(M).__webglFramebuffer:null;k.bindFramebuffer(Ae.FRAMEBUFFER,li)}}},this.copyFramebufferToTexture=function(we,Xe,Pt=0){const Rt=Math.pow(2,-Pt),Et=Math.floor(Xe.image.width*Rt),Fn=Math.floor(Xe.image.height*Rt);J.setTexture2D(Xe,0),Ae.copyTexSubImage2D(Ae.TEXTURE_2D,Pt,0,0,we.x,we.y,Et,Fn),k.unbindTexture()},this.copyTextureToTexture=function(we,Xe,Pt,Rt=0){const Et=Xe.image.width,Fn=Xe.image.height,Qn=an.convert(Pt.format),ci=an.convert(Pt.type);J.setTexture2D(Pt,0),Ae.pixelStorei(Ae.UNPACK_FLIP_Y_WEBGL,Pt.flipY),Ae.pixelStorei(Ae.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Pt.premultiplyAlpha),Ae.pixelStorei(Ae.UNPACK_ALIGNMENT,Pt.unpackAlignment),Xe.isDataTexture?Ae.texSubImage2D(Ae.TEXTURE_2D,Rt,we.x,we.y,Et,Fn,Qn,ci,Xe.image.data):Xe.isCompressedTexture?Ae.compressedTexSubImage2D(Ae.TEXTURE_2D,Rt,we.x,we.y,Xe.mipmaps[0].width,Xe.mipmaps[0].height,Qn,Xe.mipmaps[0].data):Ae.texSubImage2D(Ae.TEXTURE_2D,Rt,we.x,we.y,Qn,ci,Xe.image),Rt===0&&Pt.generateMipmaps&&Ae.generateMipmap(Ae.TEXTURE_2D),k.unbindTexture()},this.copyTextureToTexture3D=function(we,Xe,Pt,Rt,Et=0){if(S.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Fn=we.max.x-we.min.x+1,Qn=we.max.y-we.min.y+1,ci=we.max.z-we.min.z+1,li=an.convert(Rt.format),Z=an.convert(Rt.type);let H;if(Rt.isData3DTexture)J.setTexture3D(Rt,0),H=Ae.TEXTURE_3D;else if(Rt.isDataArrayTexture||Rt.isCompressedArrayTexture)J.setTexture2DArray(Rt,0),H=Ae.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}Ae.pixelStorei(Ae.UNPACK_FLIP_Y_WEBGL,Rt.flipY),Ae.pixelStorei(Ae.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Rt.premultiplyAlpha),Ae.pixelStorei(Ae.UNPACK_ALIGNMENT,Rt.unpackAlignment);const w=Ae.getParameter(Ae.UNPACK_ROW_LENGTH),T=Ae.getParameter(Ae.UNPACK_IMAGE_HEIGHT),R=Ae.getParameter(Ae.UNPACK_SKIP_PIXELS),N=Ae.getParameter(Ae.UNPACK_SKIP_ROWS),z=Ae.getParameter(Ae.UNPACK_SKIP_IMAGES),U=Pt.isCompressedTexture?Pt.mipmaps[Et]:Pt.image;Ae.pixelStorei(Ae.UNPACK_ROW_LENGTH,U.width),Ae.pixelStorei(Ae.UNPACK_IMAGE_HEIGHT,U.height),Ae.pixelStorei(Ae.UNPACK_SKIP_PIXELS,we.min.x),Ae.pixelStorei(Ae.UNPACK_SKIP_ROWS,we.min.y),Ae.pixelStorei(Ae.UNPACK_SKIP_IMAGES,we.min.z),Pt.isDataTexture||Pt.isData3DTexture?Ae.texSubImage3D(H,Et,Xe.x,Xe.y,Xe.z,Fn,Qn,ci,li,Z,U.data):Pt.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Ae.compressedTexSubImage3D(H,Et,Xe.x,Xe.y,Xe.z,Fn,Qn,ci,li,U.data)):Ae.texSubImage3D(H,Et,Xe.x,Xe.y,Xe.z,Fn,Qn,ci,li,Z,U),Ae.pixelStorei(Ae.UNPACK_ROW_LENGTH,w),Ae.pixelStorei(Ae.UNPACK_IMAGE_HEIGHT,T),Ae.pixelStorei(Ae.UNPACK_SKIP_PIXELS,R),Ae.pixelStorei(Ae.UNPACK_SKIP_ROWS,N),Ae.pixelStorei(Ae.UNPACK_SKIP_IMAGES,z),Et===0&&Rt.generateMipmaps&&Ae.generateMipmap(H),k.unbindTexture()},this.initTexture=function(we){we.isCubeTexture?J.setTextureCube(we,0):we.isData3DTexture?J.setTexture3D(we,0):we.isDataArrayTexture||we.isCompressedArrayTexture?J.setTexture2DArray(we,0):J.setTexture2D(we,0),k.unbindTexture()},this.resetState=function(){A=0,C=0,M=null,k.reset(),Ln.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Fc}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===lR?"display-p3":"srgb",t.unpackColorSpace=Br.workingColorSpace===i7?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===$r?Ip:IQ}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Ip?$r:bo}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 qDe extends vR{}qDe.prototype.isWebGL1Renderer=!0;class mR{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Jn(e),this.near=t,this.far=i}clone(){return new mR(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class ZQ extends la{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 gR{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=VC,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=T0()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return Dp("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,i){e*=this.stride,i*=t.stride;for(let r=0,a=this.stride;r<a;r++)this.array[e+r]=t.array[i+r];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=T0()),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]),i=new this.constructor(t,this.stride);return i.setUsage(this.usage),i}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=T0()),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 xs=new Le;class J0{constructor(e,t,i,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=i,this.normalized=r}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,i=this.data.count;t<i;t++)xs.fromBufferAttribute(this,t),xs.applyMatrix4(e),this.setXYZ(t,xs.x,xs.y,xs.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)xs.fromBufferAttribute(this,t),xs.applyNormalMatrix(e),this.setXYZ(t,xs.x,xs.y,xs.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)xs.fromBufferAttribute(this,t),xs.transformDirection(e),this.setXYZ(t,xs.x,xs.y,xs.z);return this}getComponent(e,t){let i=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(i=q0(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=Vr(i,this.array)),this.data.array[e*this.data.stride+this.offset+t]=i,this}setX(e,t){return this.normalized&&(t=Vr(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Vr(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Vr(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Vr(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=q0(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=q0(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=q0(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=q0(t,this.array)),t}setXY(e,t,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=Vr(t,this.array),i=Vr(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this}setXYZ(e,t,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=Vr(t,this.array),i=Vr(i,this.array),r=Vr(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=r,this}setXYZW(e,t,i,r,a){return e=e*this.data.stride+this.offset,this.normalized&&(t=Vr(t,this.array),i=Vr(i,this.array),r=Vr(r,this.array),a=Vr(a,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=r,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 i=0;i<this.count;i++){const r=i*this.data.stride+this.offset;for(let a=0;a<this.itemSize;a++)t.push(this.data.array[r+a])}return new La(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 J0(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 i=0;i<this.count;i++){const r=i*this.data.stride+this.offset;for(let a=0;a<this.itemSize;a++)t.push(this.data.array[r+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 T2 extends A0{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Jn(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 h2;const og=new Le,f2=new Le,p2=new Le,v2=new on,sg=new on,JQ=new Bi,l4=new Le,lg=new Le,u4=new Le,RV=new on,Qw=new on,LV=new on;class ug extends la{constructor(e=new T2){if(super(),this.isSprite=!0,this.type="Sprite",h2===void 0){h2=new Qr;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),i=new gR(t,5);h2.setIndex([0,1,2,0,2,3]),h2.setAttribute("position",new J0(i,3,0,!1)),h2.setAttribute("uv",new J0(i,2,3,!1))}this.geometry=h2,this.material=e,this.center=new on(.5,.5)}raycast(e,t){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),f2.setFromMatrixScale(this.matrixWorld),JQ.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),p2.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&f2.multiplyScalar(-p2.z);const i=this.material.rotation;let r,a;i!==0&&(a=Math.cos(i),r=Math.sin(i));const o=this.center;c4(l4.set(-.5,-.5,0),p2,o,f2,r,a),c4(lg.set(.5,-.5,0),p2,o,f2,r,a),c4(u4.set(.5,.5,0),p2,o,f2,r,a),RV.set(0,0),Qw.set(1,0),LV.set(1,1);let s=e.ray.intersectTriangle(l4,lg,u4,!1,og);if(s===null&&(c4(lg.set(-.5,.5,0),p2,o,f2,r,a),Qw.set(0,1),s=e.ray.intersectTriangle(l4,u4,lg,!1,og),s===null))return;const l=e.ray.origin.distanceTo(og);l<e.near||l>e.far||t.push({distance:l,point:og.clone(),uv:X0.getInterpolation(og,l4,lg,u4,RV,Qw,LV,new on),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 c4(n,e,t,i,r,a){v2.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(sg.x=a*v2.x-r*v2.y,sg.y=r*v2.x+a*v2.y):sg.copy(v2),n.copy(e),n.x+=sg.x,n.y+=sg.y,n.applyMatrix4(JQ)}const IV=new Le,DV=new Er,NV=new Er,XDe=new Le,kV=new Bi,d4=new Le,eT=new D0,FV=new Bi,tT=new Qv;class YDe extends fr{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=hU,this.bindMatrix=new Bi,this.bindMatrixInverse=new Bi,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new I0),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let i=0;i<t.count;i++)this.getVertexPosition(i,d4),this.boundingBox.expandByPoint(d4)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new D0),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let i=0;i<t.count;i++)this.getVertexPosition(i,d4),this.boundingSphere.expandByPoint(d4)}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 i=this.material,r=this.matrixWorld;i!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),eT.copy(this.boundingSphere),eT.applyMatrix4(r),e.ray.intersectsSphere(eT)!==!1&&(FV.copy(r).invert(),tT.copy(e.ray).applyMatrix4(FV),!(this.boundingBox!==null&&tT.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,tT)))}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 Er,t=this.geometry.attributes.skinWeight;for(let i=0,r=t.count;i<r;i++){e.fromBufferAttribute(t,i);const a=1/e.manhattanLength();a!==1/0?e.multiplyScalar(a):e.set(1,0,0,0),t.setXYZW(i,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===hU?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===aEe?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const i=this.skeleton,r=this.geometry;DV.fromBufferAttribute(r.attributes.skinIndex,e),NV.fromBufferAttribute(r.attributes.skinWeight,e),IV.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let a=0;a<4;a++){const o=NV.getComponent(a);if(o!==0){const s=DV.getComponent(a);kV.multiplyMatrices(i.bones[s].matrixWorld,i.boneInverses[s]),t.addScaledVector(XDe.copy(IV).applyMatrix4(kV),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}class QQ extends la{constructor(){super(),this.isBone=!0,this.type="Bone"}}class KDe extends yo{constructor(e=null,t=1,i=1,r,a,o,s,l,u=mo,c=mo,d,h){super(null,o,s,l,u,c,r,a,d,h),this.isDataTexture=!0,this.image={data:e,width:t,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const OV=new Bi,ZDe=new Bi;class yR{constructor(e=[],t=[]){this.uuid=T0(),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 i=0,r=this.bones.length;i<r;i++)this.boneInverses.push(new Bi)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const i=new Bi;this.bones[e]&&i.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const i=this.bones[e];i&&i.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const i=this.bones[e];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const e=this.bones,t=this.boneInverses,i=this.boneMatrices,r=this.boneTexture;for(let a=0,o=e.length;a<o;a++){const s=e[a]?e[a].matrixWorld:ZDe;OV.multiplyMatrices(s,t[a]),OV.toArray(i,a*16)}r!==null&&(r.needsUpdate=!0)}clone(){return new yR(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 i=new KDe(t,e,e,y0,Nu);return i.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=i,this}getBoneByName(e){for(let t=0,i=this.bones.length;t<i;t++){const r=this.bones[t];if(r.name===e)return r}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let i=0,r=e.bones.length;i<r;i++){const a=e.bones[i];let o=t[a];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",a),o=new QQ),this.bones.push(o),this.boneInverses.push(new Bi().fromArray(e.boneInverses[i]))}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,i=this.boneInverses;for(let r=0,a=t.length;r<a;r++){const o=t[r];e.bones.push(o.uuid);const s=i[r];e.boneInverses.push(s.toArray())}return e}}class $C extends La{constructor(e,t,i,r=1){super(e,t,i),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}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 m2=new Bi,BV=new Bi,h4=[],zV=new I0,JDe=new Bi,cg=new fr,dg=new D0;class QDe extends fr{constructor(e,t,i){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new $C(new Float32Array(i*16),16),this.instanceColor=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let r=0;r<i;r++)this.setMatrixAt(r,JDe)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new I0),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<t;i++)this.getMatrixAt(i,m2),zV.copy(e.boundingBox).applyMatrix4(m2),this.boundingBox.union(zV)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new D0),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<t;i++)this.getMatrixAt(i,m2),dg.copy(e.boundingSphere).applyMatrix4(m2),this.boundingSphere.union(dg)}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 i=this.matrixWorld,r=this.count;if(cg.geometry=this.geometry,cg.material=this.material,cg.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),dg.copy(this.boundingSphere),dg.applyMatrix4(i),e.ray.intersectsSphere(dg)!==!1))for(let a=0;a<r;a++){this.getMatrixAt(a,m2),BV.multiplyMatrices(i,m2),cg.matrixWorld=BV,cg.raycast(e,h4);for(let o=0,s=h4.length;o<s;o++){const l=h4[o];l.instanceId=a,l.object=this,t.push(l)}h4.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new $C(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 ku extends A0{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Jn(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 GV=new Le,UV=new Le,VV=new Bi,nT=new Qv,f4=new D0;let Q9=class extends la{constructor(e=new Qr,t=new ku){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,i=[0];for(let r=1,a=t.count;r<a;r++)GV.fromBufferAttribute(t,r-1),UV.fromBufferAttribute(t,r),i[r]=i[r-1],i[r]+=GV.distanceTo(UV);e.setAttribute("lineDistance",new ga(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const i=this.geometry,r=this.matrixWorld,a=e.params.Line.threshold,o=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),f4.copy(i.boundingSphere),f4.applyMatrix4(r),f4.radius+=a,e.ray.intersectsSphere(f4)===!1)return;VV.copy(r).invert(),nT.copy(e.ray).applyMatrix4(VV);const s=a/((this.scale.x+this.scale.y+this.scale.z)/3),l=s*s,u=new Le,c=new Le,d=new Le,h=new Le,f=this.isLineSegments?2:1,p=i.index,v=i.attributes.position;if(p!==null){const g=Math.max(0,o.start),_=Math.min(p.count,o.start+o.count);for(let S=g,x=_-1;S<x;S+=f){const A=p.getX(S),C=p.getX(S+1);if(u.fromBufferAttribute(v,A),c.fromBufferAttribute(v,C),nT.distanceSqToSegment(u,c,h,d)>l)continue;h.applyMatrix4(this.matrixWorld);const I=e.ray.origin.distanceTo(h);I<e.near||I>e.far||t.push({distance:I,point:d.clone().applyMatrix4(this.matrixWorld),index:S,face:null,faceIndex:null,object:this})}}else{const g=Math.max(0,o.start),_=Math.min(v.count,o.start+o.count);for(let S=g,x=_-1;S<x;S+=f){if(u.fromBufferAttribute(v,S),c.fromBufferAttribute(v,S+1),nT.distanceSqToSegment(u,c,h,d)>l)continue;h.applyMatrix4(this.matrixWorld);const C=e.ray.origin.distanceTo(h);C<e.near||C>e.far||t.push({distance:C,point:d.clone().applyMatrix4(this.matrixWorld),index:S,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=r.length;a<o;a++){const s=r[a].name||String(a);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=a}}}}};const HV=new Le,WV=new Le;class _R extends Q9{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,i=[];for(let r=0,a=t.count;r<a;r+=2)HV.fromBufferAttribute(t,r),WV.fromBufferAttribute(t,r+1),i[r]=r===0?0:i[r-1],i[r+1]=i[r]+HV.distanceTo(WV);e.setAttribute("lineDistance",new ga(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class G8 extends Q9{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class k3 extends A0{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Jn(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 jV=new Bi,qC=new Qv,p4=new D0,v4=new Le;class SR extends la{constructor(e=new Qr,t=new k3){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 i=this.geometry,r=this.matrixWorld,a=e.params.Points.threshold,o=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),p4.copy(i.boundingSphere),p4.applyMatrix4(r),p4.radius+=a,e.ray.intersectsSphere(p4)===!1)return;jV.copy(r).invert(),qC.copy(e.ray).applyMatrix4(jV);const s=a/((this.scale.x+this.scale.y+this.scale.z)/3),l=s*s,u=i.index,d=i.attributes.position;if(u!==null){const h=Math.max(0,o.start),f=Math.min(u.count,o.start+o.count);for(let p=h,m=f;p<m;p++){const v=u.getX(p);v4.fromBufferAttribute(d,v),$V(v4,v,l,r,e,t,this)}}else{const h=Math.max(0,o.start),f=Math.min(d.count,o.start+o.count);for(let p=h,m=f;p<m;p++)v4.fromBufferAttribute(d,p),$V(v4,p,l,r,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=r.length;a<o;a++){const s=r[a].name||String(a);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=a}}}}}function $V(n,e,t,i,r,a,o){const s=qC.distanceSqToPoint(n);if(s<t){const l=new Le;qC.closestPointToPoint(n,l),l.applyMatrix4(i);const u=r.ray.origin.distanceTo(l);if(u<r.near||u>r.far)return;a.push({distance:u,distanceToRay:Math.sqrt(s),point:l,index:e,face:null,object:o})}}class bR extends yo{constructor(e,t,i,r,a,o,s,l,u){super(e,t,i,r,a,o,s,l,u),this.isCanvasTexture=!0,this.needsUpdate=!0}}class ic{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/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 i,r=this.getPoint(0),a=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),a+=i.distanceTo(r),t.push(a),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const a=i.length;let o;t?o=t:o=e*i[a-1];let s=0,l=a-1,u;for(;s<=l;)if(r=Math.floor(s+(l-s)/2),u=i[r]-o,u<0)s=r+1;else if(u>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(a-1);const c=i[r],h=i[r+1]-c,f=(o-c)/h;return(r+f)/(a-1)}getTangent(e,t){let r=e-1e-4,a=e+1e-4;r<0&&(r=0),a>1&&(a=1);const o=this.getPoint(r),s=this.getPoint(a),l=t||(o.isVector2?new on:new Le);return l.copy(s).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new Le,r=[],a=[],o=[],s=new Le,l=new Bi;for(let f=0;f<=e;f++){const p=f/e;r[f]=this.getTangentAt(p,new Le)}a[0]=new Le,o[0]=new Le;let u=Number.MAX_VALUE;const c=Math.abs(r[0].x),d=Math.abs(r[0].y),h=Math.abs(r[0].z);c<=u&&(u=c,i.set(1,0,0)),d<=u&&(u=d,i.set(0,1,0)),h<=u&&i.set(0,0,1),s.crossVectors(r[0],i).normalize(),a[0].crossVectors(r[0],s),o[0].crossVectors(r[0],a[0]);for(let f=1;f<=e;f++){if(a[f]=a[f-1].clone(),o[f]=o[f-1].clone(),s.crossVectors(r[f-1],r[f]),s.length()>Number.EPSILON){s.normalize();const p=Math.acos(so(r[f-1].dot(r[f]),-1,1));a[f].applyMatrix4(l.makeRotationAxis(s,p))}o[f].crossVectors(r[f],a[f])}if(t===!0){let f=Math.acos(so(a[0].dot(a[e]),-1,1));f/=e,r[0].dot(s.crossVectors(a[0],a[e]))>0&&(f=-f);for(let p=1;p<=e;p++)a[p].applyMatrix4(l.makeRotationAxis(r[p],f*p)),o[p].crossVectors(r[p],a[p])}return{tangents:r,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 xR extends ic{constructor(e=0,t=0,i=1,r=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=i,this.yRadius=r,this.aStartAngle=a,this.aEndAngle=o,this.aClockwise=s,this.aRotation=l}getPoint(e,t){const i=t||new on,r=Math.PI*2;let a=this.aEndAngle-this.aStartAngle;const o=Math.abs(a)<Number.EPSILON;for(;a<0;)a+=r;for(;a>r;)a-=r;a<Number.EPSILON&&(o?a=0:a=r),this.aClockwise===!0&&!o&&(a===r?a=-r:a=a-r);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),d=Math.sin(this.aRotation),h=l-this.aX,f=u-this.aY;l=h*c-f*d+this.aX,u=h*d+f*c+this.aY}return i.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 eNe extends xR{constructor(e,t,i,r,a,o){super(e,t,i,i,r,a,o),this.isArcCurve=!0,this.type="ArcCurve"}}function wR(){let n=0,e=0,t=0,i=0;function r(a,o,s,l){n=a,e=s,t=-3*a+3*o-2*s-l,i=2*a-2*o+s+l}return{initCatmullRom:function(a,o,s,l,u){r(o,s,u*(s-a),u*(l-o))},initNonuniformCatmullRom:function(a,o,s,l,u,c,d){let h=(o-a)/u-(s-a)/(u+c)+(s-o)/c,f=(s-o)/c-(l-o)/(c+d)+(l-s)/d;h*=c,f*=c,r(o,s,h,f)},calc:function(a){const o=a*a,s=o*a;return n+e*a+t*o+i*s}}}const m4=new Le,iT=new wR,rT=new wR,aT=new wR;class TR extends ic{constructor(e=[],t=!1,i="centripetal",r=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=i,this.tension=r}getPoint(e,t=new Le){const i=t,r=this.points,a=r.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=r[(s-1)%a]:(m4.subVectors(r[0],r[1]).add(r[0]),u=m4);const d=r[s%a],h=r[(s+1)%a];if(this.closed||s+2<a?c=r[(s+2)%a]:(m4.subVectors(r[a-1],r[a-2]).add(r[a-1]),c=m4),this.curveType==="centripetal"||this.curveType==="chordal"){const f=this.curveType==="chordal"?.5:.25;let p=Math.pow(u.distanceToSquared(d),f),m=Math.pow(d.distanceToSquared(h),f),v=Math.pow(h.distanceToSquared(c),f);m<1e-4&&(m=1),p<1e-4&&(p=m),v<1e-4&&(v=m),iT.initNonuniformCatmullRom(u.x,d.x,h.x,c.x,p,m,v),rT.initNonuniformCatmullRom(u.y,d.y,h.y,c.y,p,m,v),aT.initNonuniformCatmullRom(u.z,d.z,h.z,c.z,p,m,v)}else this.curveType==="catmullrom"&&(iT.initCatmullRom(u.x,d.x,h.x,c.x,this.tension),rT.initCatmullRom(u.y,d.y,h.y,c.y,this.tension),aT.initCatmullRom(u.z,d.z,h.z,c.z,this.tension));return i.set(iT.calc(l),rT.calc(l),aT.calc(l)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const r=e.points[t];this.points.push(r.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,i=this.points.length;t<i;t++){const r=this.points[t];e.points.push(r.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,i=e.points.length;t<i;t++){const r=e.points[t];this.points.push(new Le().fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function qV(n,e,t,i,r){const a=(i-e)*.5,o=(r-t)*.5,s=n*n,l=n*s;return(2*t-2*i+a+o)*l+(-3*t+3*i-2*a-o)*s+a*n+t}function tNe(n,e){const t=1-n;return t*t*e}function nNe(n,e){return 2*(1-n)*n*e}function iNe(n,e){return n*n*e}function i9(n,e,t,i){return tNe(n,e)+nNe(n,t)+iNe(n,i)}function rNe(n,e){const t=1-n;return t*t*t*e}function aNe(n,e){const t=1-n;return 3*t*t*n*e}function oNe(n,e){return 3*(1-n)*n*n*e}function sNe(n,e){return n*n*n*e}function r9(n,e,t,i,r){return rNe(n,e)+aNe(n,t)+oNe(n,i)+sNe(n,r)}class eee extends ic{constructor(e=new on,t=new on,i=new on,r=new on){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=i,this.v3=r}getPoint(e,t=new on){const i=t,r=this.v0,a=this.v1,o=this.v2,s=this.v3;return i.set(r9(e,r.x,a.x,o.x,s.x),r9(e,r.y,a.y,o.y,s.y)),i}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 lNe extends ic{constructor(e=new Le,t=new Le,i=new Le,r=new Le){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=i,this.v3=r}getPoint(e,t=new Le){const i=t,r=this.v0,a=this.v1,o=this.v2,s=this.v3;return i.set(r9(e,r.x,a.x,o.x,s.x),r9(e,r.y,a.y,o.y,s.y),r9(e,r.z,a.z,o.z,s.z)),i}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 tee extends ic{constructor(e=new on,t=new on){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new on){const i=t;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new on){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 uNe extends ic{constructor(e=new Le,t=new Le){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new Le){const i=t;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new Le){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 nee extends ic{constructor(e=new on,t=new on,i=new on){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=i}getPoint(e,t=new on){const i=t,r=this.v0,a=this.v1,o=this.v2;return i.set(i9(e,r.x,a.x,o.x),i9(e,r.y,a.y,o.y)),i}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 iee extends ic{constructor(e=new Le,t=new Le,i=new Le){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=i}getPoint(e,t=new Le){const i=t,r=this.v0,a=this.v1,o=this.v2;return i.set(i9(e,r.x,a.x,o.x),i9(e,r.y,a.y,o.y),i9(e,r.z,a.z,o.z)),i}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 ree extends ic{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new on){const i=t,r=this.points,a=(r.length-1)*e,o=Math.floor(a),s=a-o,l=r[o===0?o:o-1],u=r[o],c=r[o>r.length-2?r.length-1:o+1],d=r[o>r.length-3?r.length-1:o+2];return i.set(qV(s,l.x,u.x,c.x,d.x),qV(s,l.y,u.y,c.y,d.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const r=e.points[t];this.points.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,i=this.points.length;t<i;t++){const r=this.points[t];e.points.push(r.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const r=e.points[t];this.points.push(new on().fromArray(r))}return this}}var U8=Object.freeze({__proto__:null,ArcCurve:eNe,CatmullRomCurve3:TR,CubicBezierCurve:eee,CubicBezierCurve3:lNe,EllipseCurve:xR,LineCurve:tee,LineCurve3:uNe,QuadraticBezierCurve:nee,QuadraticBezierCurve3:iee,SplineCurve:ree});class cNe extends ic{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 i=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new U8[i](t,e))}return this}getPoint(e,t){const i=e*this.getLength(),r=this.getCurveLengths();let a=0;for(;a<r.length;){if(r[a]>=i){const o=r[a]-i,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 i=0,r=this.curves.length;i<r;i++)t+=this.curves[i].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let i;for(let r=0,a=this.curves;r<a.length;r++){const o=a[r],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];i&&i.equals(c)||(t.push(c),i=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,i=e.curves.length;t<i;t++){const r=e.curves[t];this.curves.push(r.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,i=this.curves.length;t<i;t++){const r=this.curves[t];e.curves.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,i=e.curves.length;t<i;t++){const r=e.curves[t];this.curves.push(new U8[r.type]().fromJSON(r))}return this}}class XV extends cNe{constructor(e){super(),this.type="Path",this.currentPoint=new on,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,i=e.length;t<i;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 i=new tee(this.currentPoint.clone(),new on(e,t));return this.curves.push(i),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,i,r){const a=new nee(this.currentPoint.clone(),new on(e,t),new on(i,r));return this.curves.push(a),this.currentPoint.set(i,r),this}bezierCurveTo(e,t,i,r,a,o){const s=new eee(this.currentPoint.clone(),new on(e,t),new on(i,r),new on(a,o));return this.curves.push(s),this.currentPoint.set(a,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),i=new ree(t);return this.curves.push(i),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,i,r,a,o){const s=this.currentPoint.x,l=this.currentPoint.y;return this.absarc(e+s,t+l,i,r,a,o),this}absarc(e,t,i,r,a,o){return this.absellipse(e,t,i,i,r,a,o),this}ellipse(e,t,i,r,a,o,s,l){const u=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+u,t+c,i,r,a,o,s,l),this}absellipse(e,t,i,r,a,o,s,l){const u=new xR(e,t,i,r,a,o,s,l);if(this.curves.length>0){const d=u.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.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 ju extends XV{constructor(e){super(e),this.uuid=T0(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let i=0,r=this.holes.length;i<r;i++)t[i]=this.holes[i].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,i=e.holes.length;t<i;t++){const r=e.holes[t];this.holes.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,i=this.holes.length;t<i;t++){const r=this.holes[t];e.holes.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,i=e.holes.length;t<i;t++){const r=e.holes[t];this.holes.push(new XV().fromJSON(r))}return this}}const dNe={triangulate:function(n,e,t=2){const i=e&&e.length,r=i?e[0]*t:n.length;let a=aee(n,0,r,t,!0);const o=[];if(!a||a.next===a.prev)return o;let s,l,u,c,d,h,f;if(i&&(a=mNe(n,e,a,t)),n.length>80*t){s=u=n[0],l=c=n[1];for(let p=t;p<r;p+=t)d=n[p],h=n[p+1],d<s&&(s=d),h<l&&(l=h),d>u&&(u=d),h>c&&(c=h);f=Math.max(u-s,c-l),f=f!==0?32767/f:0}return e3(a,o,t,s,l,f,0),o}};function aee(n,e,t,i,r){let a,o;if(r===MNe(n,e,t,i)>0)for(a=e;a<t;a+=i)o=YV(a,n[a],n[a+1],o);else for(a=t-i;a>=e;a-=i)o=YV(a,n[a],n[a+1],o);return o&&s7(o,o.next)&&(n3(o),o=o.next),o}function Wp(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(s7(t,t.next)||Pa(t.prev,t,t.next)===0)){if(n3(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function e3(n,e,t,i,r,a,o){if(!n)return;!o&&a&&bNe(n,i,r,a);let s=n,l,u;for(;n.prev!==n.next;){if(l=n.prev,u=n.next,a?fNe(n,i,r,a):hNe(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(u.i/t|0),n3(n),n=u.next,s=u.next;continue}if(n=u,n===s){o?o===1?(n=pNe(Wp(n),e,t),e3(n,e,t,i,r,a,2)):o===2&&vNe(n,e,t,i,r,a):e3(Wp(n),e,t,i,r,a,1);break}}}function hNe(n){const e=n.prev,t=n,i=n.next;if(Pa(e,t,i)>=0)return!1;const r=e.x,a=t.x,o=i.x,s=e.y,l=t.y,u=i.y,c=r<a?r<o?r:o:a<o?a:o,d=s<l?s<u?s:u:l<u?l:u,h=r>a?r>o?r:o:a>o?a:o,f=s>l?s>u?s:u:l>u?l:u;let p=i.next;for(;p!==e;){if(p.x>=c&&p.x<=h&&p.y>=d&&p.y<=f&&F2(r,s,a,l,o,u,p.x,p.y)&&Pa(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function fNe(n,e,t,i){const r=n.prev,a=n,o=n.next;if(Pa(r,a,o)>=0)return!1;const s=r.x,l=a.x,u=o.x,c=r.y,d=a.y,h=o.y,f=s<l?s<u?s:u:l<u?l:u,p=c<d?c<h?c:h:d<h?d:h,m=s>l?s>u?s:u:l>u?l:u,v=c>d?c>h?c:h:d>h?d:h,g=XC(f,p,e,t,i),_=XC(m,v,e,t,i);let S=n.prevZ,x=n.nextZ;for(;S&&S.z>=g&&x&&x.z<=_;){if(S.x>=f&&S.x<=m&&S.y>=p&&S.y<=v&&S!==r&&S!==o&&F2(s,c,l,d,u,h,S.x,S.y)&&Pa(S.prev,S,S.next)>=0||(S=S.prevZ,x.x>=f&&x.x<=m&&x.y>=p&&x.y<=v&&x!==r&&x!==o&&F2(s,c,l,d,u,h,x.x,x.y)&&Pa(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;S&&S.z>=g;){if(S.x>=f&&S.x<=m&&S.y>=p&&S.y<=v&&S!==r&&S!==o&&F2(s,c,l,d,u,h,S.x,S.y)&&Pa(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;x&&x.z<=_;){if(x.x>=f&&x.x<=m&&x.y>=p&&x.y<=v&&x!==r&&x!==o&&F2(s,c,l,d,u,h,x.x,x.y)&&Pa(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function pNe(n,e,t){let i=n;do{const r=i.prev,a=i.next.next;!s7(r,a)&&oee(r,i,i.next,a)&&t3(r,a)&&t3(a,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(a.i/t|0),n3(i),n3(i.next),i=n=a),i=i.next}while(i!==n);return Wp(i)}function vNe(n,e,t,i,r,a){let o=n;do{let s=o.next.next;for(;s!==o.prev;){if(o.i!==s.i&&TNe(o,s)){let l=see(o,s);o=Wp(o,o.next),l=Wp(l,l.next),e3(o,e,t,i,r,a,0),e3(l,e,t,i,r,a,0);return}s=s.next}o=o.next}while(o!==n)}function mNe(n,e,t,i){const r=[];let a,o,s,l,u;for(a=0,o=e.length;a<o;a++)s=e[a]*i,l=a<o-1?e[a+1]*i:n.length,u=aee(n,s,l,i,!1),u===u.next&&(u.steiner=!0),r.push(wNe(u));for(r.sort(gNe),a=0;a<r.length;a++)t=yNe(r[a],t);return t}function gNe(n,e){return n.x-e.x}function yNe(n,e){const t=_Ne(n,e);if(!t)return e;const i=see(t,n);return Wp(i,i.next),Wp(t,t.next)}function _Ne(n,e){let t=e,i=-1/0,r;const a=n.x,o=n.y;do{if(o<=t.y&&o>=t.next.y&&t.next.y!==t.y){const h=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(h<=a&&h>i&&(i=h,r=t.x<t.next.x?t:t.next,h===a))return r}t=t.next}while(t!==e);if(!r)return null;const s=r,l=r.x,u=r.y;let c=1/0,d;t=r;do a>=t.x&&t.x>=l&&a!==t.x&&F2(o<u?a:i,o,l,u,o<u?i:a,o,t.x,t.y)&&(d=Math.abs(o-t.y)/(a-t.x),t3(t,n)&&(d<c||d===c&&(t.x>r.x||t.x===r.x&&SNe(r,t)))&&(r=t,c=d)),t=t.next;while(t!==s);return r}function SNe(n,e){return Pa(n.prev,n,e.prev)<0&&Pa(e.next,n,n.next)<0}function bNe(n,e,t,i){let r=n;do r.z===0&&(r.z=XC(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,xNe(r)}function xNe(n){let e,t,i,r,a,o,s,l,u=1;do{for(t=n,n=null,a=null,o=0;t;){for(o++,i=t,s=0,e=0;e<u&&(s++,i=i.nextZ,!!i);e++);for(l=u;s>0||l>0&&i;)s!==0&&(l===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,s--):(r=i,i=i.nextZ,l--),a?a.nextZ=r:n=r,r.prevZ=a,a=r;t=i}a.nextZ=null,u*=2}while(o>1);return n}function XC(n,e,t,i,r){return n=(n-t)*r|0,e=(e-i)*r|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function wNe(n){let e=n,t=n;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==n);return t}function F2(n,e,t,i,r,a,o,s){return(r-o)*(e-s)>=(n-o)*(a-s)&&(n-o)*(i-s)>=(t-o)*(e-s)&&(t-o)*(a-s)>=(r-o)*(i-s)}function TNe(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!ANe(n,e)&&(t3(n,e)&&t3(e,n)&&CNe(n,e)&&(Pa(n.prev,n,e.prev)||Pa(n,e.prev,e))||s7(n,e)&&Pa(n.prev,n,n.next)>0&&Pa(e.prev,e,e.next)>0)}function Pa(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function s7(n,e){return n.x===e.x&&n.y===e.y}function oee(n,e,t,i){const r=y4(Pa(n,e,t)),a=y4(Pa(n,e,i)),o=y4(Pa(t,i,n)),s=y4(Pa(t,i,e));return!!(r!==a&&o!==s||r===0&&g4(n,t,e)||a===0&&g4(n,i,e)||o===0&&g4(t,n,i)||s===0&&g4(t,e,i))}function g4(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function y4(n){return n>0?1:n<0?-1:0}function ANe(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&oee(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function t3(n,e){return Pa(n.prev,n,n.next)<0?Pa(n,e,n.next)>=0&&Pa(n,n.prev,e)>=0:Pa(n,e,n.prev)<0||Pa(n,n.next,e)<0}function CNe(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,a=(n.y+e.y)/2;do t.y>a!=t.next.y>a&&t.next.y!==t.y&&r<(t.next.x-t.x)*(a-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function see(n,e){const t=new YC(n.i,n.x,n.y),i=new YC(e.i,e.x,e.y),r=n.next,a=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,a.next=i,i.prev=a,i}function YV(n,e,t,i){const r=new YC(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function n3(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function YC(n,e,t){this.i=n,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 MNe(n,e,t,i){let r=0;for(let a=e,o=t-i;a<t;a+=i)r+=(n[o]-n[a])*(n[a+1]+n[o+1]),o=a;return r}class xh{static area(e){const t=e.length;let i=0;for(let r=t-1,a=0;a<t;r=a++)i+=e[r].x*e[a].y-e[a].x*e[r].y;return i*.5}static isClockWise(e){return xh.area(e)<0}static triangulateShape(e,t){const i=[],r=[],a=[];KV(e),ZV(i,e);let o=e.length;t.forEach(KV);for(let l=0;l<t.length;l++)r.push(o),o+=t[l].length,ZV(i,t[l]);const s=dNe.triangulate(i,r);for(let l=0;l<s.length;l+=3)a.push(s.slice(l,l+3));return a}}function KV(n){const e=n.length;e>2&&n[e-1].equals(n[0])&&n.pop()}function ZV(n,e){for(let t=0;t<e.length;t++)n.push(e[t].x),n.push(e[t].y)}class l7 extends Qr{constructor(e=new ju([new on(.5,.5),new on(-.5,.5),new on(-.5,-.5),new on(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const i=this,r=[],a=[];for(let s=0,l=e.length;s<l;s++){const u=e[s];o(u)}this.setAttribute("position",new ga(r,3)),this.setAttribute("uv",new ga(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,d=t.depth!==void 0?t.depth:1;let h=t.bevelEnabled!==void 0?t.bevelEnabled:!0,f=t.bevelThickness!==void 0?t.bevelThickness:.2,p=t.bevelSize!==void 0?t.bevelSize:f-.1,m=t.bevelOffset!==void 0?t.bevelOffset:0,v=t.bevelSegments!==void 0?t.bevelSegments:3;const g=t.extrudePath,_=t.UVGenerator!==void 0?t.UVGenerator:ENe;let S,x=!1,A,C,M,I;g&&(S=g.getSpacedPoints(c),x=!0,h=!1,A=g.computeFrenetFrames(c,!1),C=new Le,M=new Le,I=new Le),h||(v=0,f=0,p=0,m=0);const D=s.extractPoints(u);let E=D.shape;const P=D.holes;if(!xh.isClockWise(E)){E=E.reverse();for(let Ae=0,Lt=P.length;Ae<Lt;Ae++){const vt=P[Ae];xh.isClockWise(vt)&&(P[Ae]=vt.reverse())}}const V=xh.triangulateShape(E,P),G=E;for(let Ae=0,Lt=P.length;Ae<Lt;Ae++){const vt=P[Ae];E=E.concat(vt)}function W(Ae,Lt,vt){return Lt||console.error("THREE.ExtrudeGeometry: vec does not exist"),Ae.clone().addScaledVector(Lt,vt)}const Y=E.length,Q=V.length;function K(Ae,Lt,vt){let Ft,k,_t;const Ct=Ae.x-Lt.x,J=Ae.y-Lt.y,ee=vt.x-Ae.x,Ue=vt.y-Ae.y,xt=Ct*Ct+J*J,Bt=Ct*Ue-J*ee;if(Math.abs(Bt)>Number.EPSILON){const Ce=Math.sqrt(xt),We=Math.sqrt(ee*ee+Ue*Ue),$e=Lt.x-J/Ce,mt=Lt.y+Ct/Ce,Yt=vt.x-Ue/We,st=vt.y+ee/We,it=((Yt-$e)*Ue-(st-mt)*ee)/(Ct*Ue-J*ee);Ft=$e+Ct*it-Ae.x,k=mt+J*it-Ae.y;const Vt=Ft*Ft+k*k;if(Vt<=2)return new on(Ft,k);_t=Math.sqrt(Vt/2)}else{let Ce=!1;Ct>Number.EPSILON?ee>Number.EPSILON&&(Ce=!0):Ct<-Number.EPSILON?ee<-Number.EPSILON&&(Ce=!0):Math.sign(J)===Math.sign(Ue)&&(Ce=!0),Ce?(Ft=-J,k=Ct,_t=Math.sqrt(xt)):(Ft=Ct,k=J,_t=Math.sqrt(xt/2))}return new on(Ft/_t,k/_t)}const ae=[];for(let Ae=0,Lt=G.length,vt=Lt-1,Ft=Ae+1;Ae<Lt;Ae++,vt++,Ft++)vt===Lt&&(vt=0),Ft===Lt&&(Ft=0),ae[Ae]=K(G[Ae],G[vt],G[Ft]);const ie=[];let he,Ee=ae.concat();for(let Ae=0,Lt=P.length;Ae<Lt;Ae++){const vt=P[Ae];he=[];for(let Ft=0,k=vt.length,_t=k-1,Ct=Ft+1;Ft<k;Ft++,_t++,Ct++)_t===k&&(_t=0),Ct===k&&(Ct=0),he[Ft]=K(vt[Ft],vt[_t],vt[Ct]);ie.push(he),Ee=Ee.concat(he)}for(let Ae=0;Ae<v;Ae++){const Lt=Ae/v,vt=f*Math.cos(Lt*Math.PI/2),Ft=p*Math.sin(Lt*Math.PI/2)+m;for(let k=0,_t=G.length;k<_t;k++){const Ct=W(G[k],ae[k],Ft);Ot(Ct.x,Ct.y,-vt)}for(let k=0,_t=P.length;k<_t;k++){const Ct=P[k];he=ie[k];for(let J=0,ee=Ct.length;J<ee;J++){const Ue=W(Ct[J],he[J],Ft);Ot(Ue.x,Ue.y,-vt)}}}const He=p+m;for(let Ae=0;Ae<Y;Ae++){const Lt=h?W(E[Ae],Ee[Ae],He):E[Ae];x?(M.copy(A.normals[0]).multiplyScalar(Lt.x),C.copy(A.binormals[0]).multiplyScalar(Lt.y),I.copy(S[0]).add(M).add(C),Ot(I.x,I.y,I.z)):Ot(Lt.x,Lt.y,0)}for(let Ae=1;Ae<=c;Ae++)for(let Lt=0;Lt<Y;Lt++){const vt=h?W(E[Lt],Ee[Lt],He):E[Lt];x?(M.copy(A.normals[Ae]).multiplyScalar(vt.x),C.copy(A.binormals[Ae]).multiplyScalar(vt.y),I.copy(S[Ae]).add(M).add(C),Ot(I.x,I.y,I.z)):Ot(vt.x,vt.y,d/c*Ae)}for(let Ae=v-1;Ae>=0;Ae--){const Lt=Ae/v,vt=f*Math.cos(Lt*Math.PI/2),Ft=p*Math.sin(Lt*Math.PI/2)+m;for(let k=0,_t=G.length;k<_t;k++){const Ct=W(G[k],ae[k],Ft);Ot(Ct.x,Ct.y,d+vt)}for(let k=0,_t=P.length;k<_t;k++){const Ct=P[k];he=ie[k];for(let J=0,ee=Ct.length;J<ee;J++){const Ue=W(Ct[J],he[J],Ft);x?Ot(Ue.x,Ue.y+S[c-1].y,S[c-1].x+vt):Ot(Ue.x,Ue.y,d+vt)}}}xe(),Fe();function xe(){const Ae=r.length/3;if(h){let Lt=0,vt=Y*Lt;for(let Ft=0;Ft<Q;Ft++){const k=V[Ft];bt(k[2]+vt,k[1]+vt,k[0]+vt)}Lt=c+v*2,vt=Y*Lt;for(let Ft=0;Ft<Q;Ft++){const k=V[Ft];bt(k[0]+vt,k[1]+vt,k[2]+vt)}}else{for(let Lt=0;Lt<Q;Lt++){const vt=V[Lt];bt(vt[2],vt[1],vt[0])}for(let Lt=0;Lt<Q;Lt++){const vt=V[Lt];bt(vt[0]+Y*c,vt[1]+Y*c,vt[2]+Y*c)}}i.addGroup(Ae,r.length/3-Ae,0)}function Fe(){const Ae=r.length/3;let Lt=0;pt(G,Lt),Lt+=G.length;for(let vt=0,Ft=P.length;vt<Ft;vt++){const k=P[vt];pt(k,Lt),Lt+=k.length}i.addGroup(Ae,r.length/3-Ae,1)}function pt(Ae,Lt){let vt=Ae.length;for(;--vt>=0;){const Ft=vt;let k=vt-1;k<0&&(k=Ae.length-1);for(let _t=0,Ct=c+v*2;_t<Ct;_t++){const J=Y*_t,ee=Y*(_t+1),Ue=Lt+Ft+J,xt=Lt+k+J,Bt=Lt+k+ee,Ce=Lt+Ft+ee;ht(Ue,xt,Bt,Ce)}}}function Ot(Ae,Lt,vt){l.push(Ae),l.push(Lt),l.push(vt)}function bt(Ae,Lt,vt){Kt(Ae),Kt(Lt),Kt(vt);const Ft=r.length/3,k=_.generateTopUV(i,r,Ft-3,Ft-2,Ft-1);Tt(k[0]),Tt(k[1]),Tt(k[2])}function ht(Ae,Lt,vt,Ft){Kt(Ae),Kt(Lt),Kt(Ft),Kt(Lt),Kt(vt),Kt(Ft);const k=r.length/3,_t=_.generateSideWallUV(i,r,k-6,k-3,k-2,k-1);Tt(_t[0]),Tt(_t[1]),Tt(_t[3]),Tt(_t[1]),Tt(_t[2]),Tt(_t[3])}function Kt(Ae){r.push(l[Ae*3+0]),r.push(l[Ae*3+1]),r.push(l[Ae*3+2])}function Tt(Ae){a.push(Ae.x),a.push(Ae.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes,i=this.parameters.options;return PNe(t,i,e)}static fromJSON(e,t){const i=[];for(let a=0,o=e.shapes.length;a<o;a++){const s=t[e.shapes[a]];i.push(s)}const r=e.options.extrudePath;return r!==void 0&&(e.options.extrudePath=new U8[r.type]().fromJSON(r)),new l7(i,e.options)}}const ENe={generateTopUV:function(n,e,t,i,r){const a=e[t*3],o=e[t*3+1],s=e[i*3],l=e[i*3+1],u=e[r*3],c=e[r*3+1];return[new on(a,o),new on(s,l),new on(u,c)]},generateSideWallUV:function(n,e,t,i,r,a){const o=e[t*3],s=e[t*3+1],l=e[t*3+2],u=e[i*3],c=e[i*3+1],d=e[i*3+2],h=e[r*3],f=e[r*3+1],p=e[r*3+2],m=e[a*3],v=e[a*3+1],g=e[a*3+2];return Math.abs(s-c)<Math.abs(o-u)?[new on(o,1-l),new on(u,1-d),new on(h,1-p),new on(m,1-g)]:[new on(s,1-l),new on(c,1-d),new on(f,1-p),new on(v,1-g)]}};function PNe(n,e,t){if(t.shapes=[],Array.isArray(n))for(let i=0,r=n.length;i<r;i++){const a=n[i];t.shapes.push(a.uuid)}else t.shapes.push(n.uuid);return t.options=Object.assign({},e),e.extrudePath!==void 0&&(t.options.extrudePath=e.extrudePath.toJSON()),t}class F3 extends Qr{constructor(e=new ju([new on(0,.5),new on(-.5,-.5),new on(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const i=[],r=[],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(i),this.setAttribute("position",new ga(r,3)),this.setAttribute("normal",new ga(a,3)),this.setAttribute("uv",new ga(o,2));function u(c){const d=r.length/3,h=c.extractPoints(t);let f=h.shape;const p=h.holes;xh.isClockWise(f)===!1&&(f=f.reverse());for(let v=0,g=p.length;v<g;v++){const _=p[v];xh.isClockWise(_)===!0&&(p[v]=_.reverse())}const m=xh.triangulateShape(f,p);for(let v=0,g=p.length;v<g;v++){const _=p[v];f=f.concat(_)}for(let v=0,g=f.length;v<g;v++){const _=f[v];r.push(_.x,_.y,0),a.push(0,0,1),o.push(_.x,_.y)}for(let v=0,g=m.length;v<g;v++){const _=m[v],S=_[0]+d,x=_[1]+d,A=_[2]+d;i.push(S,x,A),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 RNe(t,e)}static fromJSON(e,t){const i=[];for(let r=0,a=e.shapes.length;r<a;r++){const o=t[e.shapes[r]];i.push(o)}return new F3(i,e.curveSegments)}}function RNe(n,e){if(e.shapes=[],Array.isArray(n))for(let t=0,i=n.length;t<i;t++){const r=n[t];e.shapes.push(r.uuid)}else e.shapes.push(n.uuid);return e}class u7 extends Qr{constructor(e=new iee(new Le(-1,-1,0),new Le(-1,1,0),new Le(1,1,0)),t=64,i=1,r=8,a=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:i,radialSegments:r,closed:a};const o=e.computeFrenetFrames(t,a);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const s=new Le,l=new Le,u=new on;let c=new Le;const d=[],h=[],f=[],p=[];m(),this.setIndex(p),this.setAttribute("position",new ga(d,3)),this.setAttribute("normal",new ga(h,3)),this.setAttribute("uv",new ga(f,2));function m(){for(let S=0;S<t;S++)v(S);v(a===!1?t:0),_(),g()}function v(S){c=e.getPointAt(S/t,c);const x=o.normals[S],A=o.binormals[S];for(let C=0;C<=r;C++){const M=C/r*Math.PI*2,I=Math.sin(M),D=-Math.cos(M);l.x=D*x.x+I*A.x,l.y=D*x.y+I*A.y,l.z=D*x.z+I*A.z,l.normalize(),h.push(l.x,l.y,l.z),s.x=c.x+i*l.x,s.y=c.y+i*l.y,s.z=c.z+i*l.z,d.push(s.x,s.y,s.z)}}function g(){for(let S=1;S<=t;S++)for(let x=1;x<=r;x++){const A=(r+1)*(S-1)+(x-1),C=(r+1)*S+(x-1),M=(r+1)*S+x,I=(r+1)*(S-1)+x;p.push(A,C,I),p.push(C,M,I)}}function _(){for(let S=0;S<=t;S++)for(let x=0;x<=r;x++)u.x=S/t,u.y=x/r,f.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 u7(new U8[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class LNe extends Qr{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],i=new Set,r=new Le,a=new Le;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 d=l[u],h=d.start,f=d.count;for(let p=h,m=h+f;p<m;p+=3)for(let v=0;v<3;v++){const g=s.getX(p+v),_=s.getX(p+(v+1)%3);r.fromBufferAttribute(o,g),a.fromBufferAttribute(o,_),JV(r,a,i)===!0&&(t.push(r.x,r.y,r.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,d=3*s+(u+1)%3;r.fromBufferAttribute(o,c),a.fromBufferAttribute(o,d),JV(r,a,i)===!0&&(t.push(r.x,r.y,r.z),t.push(a.x,a.y,a.z))}}this.setAttribute("position",new ga(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function JV(n,e,t){const i=`${n.x},${n.y},${n.z}-${e.x},${e.y},${e.z}`,r=`${e.x},${e.y},${e.z}-${n.x},${n.y},${n.z}`;return t.has(i)===!0||t.has(r)===!0?!1:(t.add(i),t.add(r),!0)}class dp extends A0{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Jn(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 Jn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sR,this.normalScale=new on(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 rd extends dp{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 on(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return so(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 Jn(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 Jn(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Jn(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 KC extends A0{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Jn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Jn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sR,this.normalScale=new on(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=aR,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 _4(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function INe(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function DNe(n){function e(r,a){return n[r]-n[a]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function QV(n,e,t){const i=n.length,r=new n.constructor(i);for(let a=0,o=0;o!==i;++a){const s=t[a]*e;for(let l=0;l!==e;++l)r[o++]=n[s+l]}return r}function lee(n,e,t,i){let r=1,a=n[0];for(;a!==void 0&&a[i]===void 0;)a=n[r++];if(a===void 0)return;let o=a[i];if(o!==void 0)if(Array.isArray(o))do o=a[i],o!==void 0&&(e.push(a.time),t.push.apply(t,o)),a=n[r++];while(a!==void 0);else if(o.toArray!==void 0)do o=a[i],o!==void 0&&(e.push(a.time),o.toArray(t,t.length)),a=n[r++];while(a!==void 0);else do o=a[i],o!==void 0&&(e.push(a.time),t.push(o)),a=n[r++];while(a!==void 0)}class O3{constructor(e,t,i,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r!==void 0?r:new t.constructor(i),this.sampleValues=t,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let i=this._cachedIndex,r=t[i],a=t[i-1];e:{t:{let o;n:{i:if(!(e<r)){for(let s=i+2;;){if(r===void 0){if(e<a)break i;return i=t.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===s)break;if(a=r,r=t[++i],e<r)break t}o=t.length;break n}if(!(e>=a)){const s=t[1];e<s&&(i=2,a=s);for(let l=i-2;;){if(a===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===l)break;if(r=a,a=t[--i-1],e>=a)break t}o=i,i=0;break n}break e}for(;i<o;){const s=i+o>>>1;e<t[s]?o=s:i=s+1}if(r=t[i],a=t[i-1],a===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===void 0)return i=t.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,a,r)}return this.interpolate_(i,a,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,i=this.sampleValues,r=this.valueSize,a=e*r;for(let o=0;o!==r;++o)t[o]=i[a+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class NNe extends O3{constructor(e,t,i,r){super(e,t,i,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:BU,endingEnd:BU}}intervalChanged_(e,t,i){const r=this.parameterPositions;let a=e-2,o=e+1,s=r[a],l=r[o];if(s===void 0)switch(this.getSettings_().endingStart){case zU:a=e,s=2*t-i;break;case GU:a=r.length-2,s=t+r[a]-r[a+1];break;default:a=e,s=i}if(l===void 0)switch(this.getSettings_().endingEnd){case zU:o=e,l=2*i-t;break;case GU:o=1,l=i+r[1]-r[0];break;default:o=e-1,l=t}const u=(i-t)*.5,c=this.valueSize;this._weightPrev=u/(t-s),this._weightNext=u/(l-i),this._offsetPrev=a*c,this._offsetNext=o*c}interpolate_(e,t,i,r){const a=this.resultBuffer,o=this.sampleValues,s=this.valueSize,l=e*s,u=l-s,c=this._offsetPrev,d=this._offsetNext,h=this._weightPrev,f=this._weightNext,p=(i-t)/(r-t),m=p*p,v=m*p,g=-h*v+2*h*m-h*p,_=(1+h)*v+(-1.5-2*h)*m+(-.5+h)*p+1,S=(-1-f)*v+(1.5+f)*m+.5*p,x=f*v-f*m;for(let A=0;A!==s;++A)a[A]=g*o[c+A]+_*o[u+A]+S*o[l+A]+x*o[d+A];return a}}class kNe extends O3{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const a=this.resultBuffer,o=this.sampleValues,s=this.valueSize,l=e*s,u=l-s,c=(i-t)/(r-t),d=1-c;for(let h=0;h!==s;++h)a[h]=o[u+h]*d+o[l+h]*c;return a}}class FNe extends O3{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class rc{constructor(e,t,i,r){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=_4(t,this.TimeBufferType),this.values=_4(i,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let i;if(t.toJSON!==this.toJSON)i=t.toJSON(e);else{i={name:e.name,times:_4(e.times,Array),values:_4(e.values,Array)};const r=e.getInterpolation();r!==e.DefaultInterpolation&&(i.interpolation=r)}return i.type=e.ValueTypeName,i}InterpolantFactoryMethodDiscrete(e){return new FNe(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new kNe(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new NNe(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Z9:t=this.InterpolantFactoryMethodDiscrete;break;case Av:t=this.InterpolantFactoryMethodLinear;break;case Pw:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const i="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(i);return console.warn("THREE.KeyframeTrack:",i),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Z9;case this.InterpolantFactoryMethodLinear:return Av;case this.InterpolantFactoryMethodSmooth:return Pw}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let i=0,r=t.length;i!==r;++i)t[i]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let i=0,r=t.length;i!==r;++i)t[i]*=e}return this}trim(e,t){const i=this.times,r=i.length;let a=0,o=r-1;for(;a!==r&&i[a]<e;)++a;for(;o!==-1&&i[o]>t;)--o;if(++o,a!==0||o!==r){a>=o&&(o=Math.max(o,1),a=o-1);const s=this.getValueSize();this.times=i.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 i=this.times,r=this.values,a=i.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=i[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(r!==void 0&&INe(r))for(let s=0,l=r.length;s!==l;++s){const u=r[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(),i=this.getValueSize(),r=this.getInterpolation()===Pw,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(r)l=!0;else{const d=s*i,h=d-i,f=d+i;for(let p=0;p!==i;++p){const m=t[d+p];if(m!==t[h+p]||m!==t[f+p]){l=!0;break}}}if(l){if(s!==o){e[o]=e[s];const d=s*i,h=o*i;for(let f=0;f!==i;++f)t[h+f]=t[d+f]}++o}}if(a>0){e[o]=e[a];for(let s=a*i,l=o*i,u=0;u!==i;++u)t[l+u]=t[s+u];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}rc.prototype.TimeBufferType=Float32Array;rc.prototype.ValueBufferType=Float32Array;rc.prototype.DefaultInterpolation=Av;class nm extends rc{}nm.prototype.ValueTypeName="bool";nm.prototype.ValueBufferType=Array;nm.prototype.DefaultInterpolation=Z9;nm.prototype.InterpolantFactoryMethodLinear=void 0;nm.prototype.InterpolantFactoryMethodSmooth=void 0;class uee extends rc{}uee.prototype.ValueTypeName="color";class Ev extends rc{}Ev.prototype.ValueTypeName="number";class ONe extends O3{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const a=this.resultBuffer,o=this.sampleValues,s=this.valueSize,l=(i-t)/(r-t);let u=e*s;for(let c=u+s;u!==c;u+=4)ru.slerpFlat(a,0,o,u-s,o,u,l);return a}}class jp extends rc{InterpolantFactoryMethodLinear(e){return new ONe(this.times,this.values,this.getValueSize(),e)}}jp.prototype.ValueTypeName="quaternion";jp.prototype.DefaultInterpolation=Av;jp.prototype.InterpolantFactoryMethodSmooth=void 0;class im extends rc{}im.prototype.ValueTypeName="string";im.prototype.ValueBufferType=Array;im.prototype.DefaultInterpolation=Z9;im.prototype.InterpolantFactoryMethodLinear=void 0;im.prototype.InterpolantFactoryMethodSmooth=void 0;class Pv extends rc{}Pv.prototype.ValueTypeName="vector";class BNe{constructor(e,t=-1,i,r=pEe){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=T0(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,s=i.length;o!==s;++o)t.push(GNe(i[o]).scale(r));const a=new this(e.name,e.duration,t,e.blendMode);return a.uuid=e.uuid,a}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let a=0,o=i.length;a!==o;++a)t.push(rc.toJSON(i[a]));return r}static CreateFromMorphTargetSequence(e,t,i,r){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=DNe(l);l=QV(l,1,c),u=QV(u,1,c),!r&&l[0]===0&&(l.push(a),u.push(u[0])),o.push(new Ev(".morphTargetInfluences["+t[s].name+"]",l,u).scale(1/i))}return new this(e,-1,o)}static findByName(e,t){let i=e;if(!Array.isArray(e)){const r=e;i=r.geometry&&r.geometry.animations||r.animations}for(let r=0;r<i.length;r++)if(i[r].name===t)return i[r];return null}static CreateClipsFromMorphTargetSequences(e,t,i){const r={},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 d=c[1];let h=r[d];h||(r[d]=h=[]),h.push(u)}}const o=[];for(const s in r)o.push(this.CreateFromMorphTargetSequence(s,r[s],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(d,h,f,p,m){if(f.length!==0){const v=[],g=[];lee(f,v,g,p),v.length!==0&&m.push(new d(h,v,g))}},r=[],a=e.name||"default",o=e.fps||30,s=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let d=0;d<u.length;d++){const h=u[d].keys;if(!(!h||h.length===0))if(h[0].morphTargets){const f={};let p;for(p=0;p<h.length;p++)if(h[p].morphTargets)for(let m=0;m<h[p].morphTargets.length;m++)f[h[p].morphTargets[m]]=-1;for(const m in f){const v=[],g=[];for(let _=0;_!==h[p].morphTargets.length;++_){const S=h[p];v.push(S.time),g.push(S.morphTarget===m?1:0)}r.push(new Ev(".morphTargetInfluence["+m+"]",v,g))}l=f.length*o}else{const f=".bones["+t[d].name+"]";i(Pv,f+".position",h,"pos",r),i(jp,f+".quaternion",h,"rot",r),i(Pv,f+".scale",h,"scl",r)}}return r.length===0?null:new this(a,l,r,s)}resetDuration(){const e=this.tracks;let t=0;for(let i=0,r=e.length;i!==r;++i){const a=this.tracks[i];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 zNe(n){switch(n.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Ev;case"vector":case"vector2":case"vector3":case"vector4":return Pv;case"color":return uee;case"quaternion":return jp;case"bool":case"boolean":return nm;case"string":return im}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+n)}function GNe(n){if(n.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=zNe(n.type);if(n.times===void 0){const t=[],i=[];lee(n.keys,t,i,"value"),n.times=t,n.values=i}return e.parse!==void 0?e.parse(n):new e(n.name,n.times,n.values,n.interpolation)}const ch={enabled:!1,files:{},add:function(n,e){this.enabled!==!1&&(this.files[n]=e)},get:function(n){if(this.enabled!==!1)return this.files[n]},remove:function(n){delete this.files[n]},clear:function(){this.files={}}};class cee{constructor(e,t,i){const r=this;let a=!1,o=0,s=0,l;const u=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=i,this.itemStart=function(c){s++,a===!1&&r.onStart!==void 0&&r.onStart(c,o,s),a=!0},this.itemEnd=function(c){o++,r.onProgress!==void 0&&r.onProgress(c,o,s),o===s&&(a=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(c){r.onError!==void 0&&r.onError(c)},this.resolveURL=function(c){return l?l(c):c},this.setURLModifier=function(c){return l=c,this},this.addHandler=function(c,d){return u.push(c,d),this},this.removeHandler=function(c){const d=u.indexOf(c);return d!==-1&&u.splice(d,2),this},this.getHandler=function(c){for(let d=0,h=u.length;d<h;d+=2){const f=u[d],p=u[d+1];if(f.global&&(f.lastIndex=0),f.test(c))return p}return null}}}const UNe=new cee;class Vh{constructor(e){this.manager=e!==void 0?e:UNe,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const i=this;return new Promise(function(r,a){i.load(e,r,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}}Vh.DEFAULT_MATERIAL_NAME="__DEFAULT";const Ac={};class VNe extends Error{constructor(e,t){super(e),this.response=t}}class i3 extends Vh{constructor(e){super(e)}load(e,t,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const a=ch.get(e);if(a!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(a),this.manager.itemEnd(e)},0),a;if(Ac[e]!==void 0){Ac[e].push({onLoad:t,onProgress:i,onError:r});return}Ac[e]=[],Ac[e].push({onLoad:t,onProgress:i,onError:r});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=Ac[e],d=u.body.getReader(),h=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),f=h?parseInt(h):0,p=f!==0;let m=0;const v=new ReadableStream({start(g){_();function _(){d.read().then(({done:S,value:x})=>{if(S)g.close();else{m+=x.byteLength;const A=new ProgressEvent("progress",{lengthComputable:p,loaded:m,total:f});for(let C=0,M=c.length;C<M;C++){const I=c[C];I.onProgress&&I.onProgress(A)}g.enqueue(x),_()}})}}});return new Response(v)}else throw new VNe(`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 d=/charset="?([^;"\s]*)"?/i.exec(s),h=d&&d[1]?d[1].toLowerCase():void 0,f=new TextDecoder(h);return u.arrayBuffer().then(p=>f.decode(p))}}}).then(u=>{ch.add(e,u);const c=Ac[e];delete Ac[e];for(let d=0,h=c.length;d<h;d++){const f=c[d];f.onLoad&&f.onLoad(u)}}).catch(u=>{const c=Ac[e];if(c===void 0)throw this.manager.itemError(e),u;delete Ac[e];for(let d=0,h=c.length;d<h;d++){const f=c[d];f.onError&&f.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 HNe extends Vh{constructor(e){super(e)}load(e,t,i,r){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const a=this,o=ch.get(e);if(o!==void 0)return a.manager.itemStart(e),setTimeout(function(){t&&t(o),a.manager.itemEnd(e)},0),o;const s=J9("img");function l(){c(),ch.add(e,this),t&&t(this),a.manager.itemEnd(e)}function u(d){c(),r&&r(d),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 AR extends Vh{constructor(e){super(e)}load(e,t,i,r){const a=new yo,o=new HNe(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)},i,r),a}}class c7 extends la{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Jn(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 oT=new Bi,eH=new Le,tH=new Le;class CR{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new on(512,512),this.map=null,this.mapPass=null,this.matrix=new Bi,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new fR,this._frameExtents=new on(1,1),this._viewportCount=1,this._viewports=[new Er(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,i=this.matrix;eH.setFromMatrixPosition(e.matrixWorld),t.position.copy(eH),tH.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(tH),t.updateMatrixWorld(),oT.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(oT),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(oT)}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 WNe extends CR{constructor(){super(new ss(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,i=Cv*2*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,a=e.distance||t.far;(i!==t.fov||r!==t.aspect||a!==t.far)&&(t.fov=i,t.aspect=r,t.far=a,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class jNe extends c7{constructor(e,t,i=0,r=Math.PI/3,a=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(la.DEFAULT_UP),this.updateMatrix(),this.target=new la,this.distance=i,this.angle=r,this.penumbra=a,this.decay=o,this.map=null,this.shadow=new WNe}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 nH=new Bi,hg=new Le,sT=new Le;class $Ne extends CR{constructor(){super(new ss(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new on(4,2),this._viewportCount=6,this._viewports=[new Er(2,1,1,1),new Er(0,1,1,1),new Er(3,1,1,1),new Er(1,1,1,1),new Er(3,0,1,1),new Er(1,0,1,1)],this._cubeDirections=[new Le(1,0,0),new Le(-1,0,0),new Le(0,0,1),new Le(0,0,-1),new Le(0,1,0),new Le(0,-1,0)],this._cubeUps=[new Le(0,1,0),new Le(0,1,0),new Le(0,1,0),new Le(0,1,0),new Le(0,0,1),new Le(0,0,-1)]}updateMatrices(e,t=0){const i=this.camera,r=this.matrix,a=e.distance||i.far;a!==i.far&&(i.far=a,i.updateProjectionMatrix()),hg.setFromMatrixPosition(e.matrixWorld),i.position.copy(hg),sT.copy(i.position),sT.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(sT),i.updateMatrixWorld(),r.makeTranslation(-hg.x,-hg.y,-hg.z),nH.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(nH)}}class dee extends c7{constructor(e,t,i=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=r,this.shadow=new $Ne}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 qNe extends CR{constructor(){super(new a7(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class V8 extends c7{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(la.DEFAULT_UP),this.updateMatrix(),this.target=new la,this.shadow=new qNe}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class hee extends c7{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class a9{static decodeText(e){if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i<r;i++)t+=String.fromCharCode(e[i]);try{return decodeURIComponent(escape(t))}catch(i){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 XNe extends Qr{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 YNe extends Vh{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,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const a=this,o=ch.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=>{r&&r(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 ch.add(e,u),t&&t(u),a.manager.itemEnd(e),u}).catch(function(u){r&&r(u),ch.remove(e),a.manager.itemError(e),a.manager.itemEnd(e)});ch.add(e,l),a.manager.itemStart(e)}}class KNe{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=iH(),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=iH();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function iH(){return(typeof performance=="undefined"?Date:performance).now()}const MR="\\[\\]\\.:\\/",ZNe=new RegExp("["+MR+"]","g"),ER="[^"+MR+"]",JNe="[^"+MR.replace("\\.","")+"]",QNe=/((?:WC+[\/:])*)/.source.replace("WC",ER),eke=/(WCOD+)?/.source.replace("WCOD",JNe),tke=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",ER),nke=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",ER),ike=new RegExp("^"+QNe+eke+tke+nke+"$"),rke=["material","materials","bones","map"];class ake{constructor(e,t,i){const r=i||Hr.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,a=i.length;r!==a;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class Hr{constructor(e,t,i){this.path=t,this.parsedPath=i||Hr.parseTrackName(t),this.node=Hr.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new Hr.Composite(e,t,i):new Hr(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(ZNe,"")}static parseTrackName(e){const t=ike.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const a=i.nodeName.substring(r+1);rke.indexOf(a)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=a)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=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=i(s.children);if(l)return l}return null},r=i(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const i=this.resolvedProperty;for(let r=0,a=i.length;r!==a;++r)e[t++]=i[r]}_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 i=this.resolvedProperty;for(let r=0,a=i.length;r!==a;++r)i[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const i=this.resolvedProperty;for(let r=0,a=i.length;r!==a;++r)i[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const i=this.resolvedProperty;for(let r=0,a=i.length;r!==a;++r)i[r]=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,i=t.objectName,r=t.propertyName;let a=t.propertyIndex;if(e||(e=Hr.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(i){let u=t.objectIndex;switch(i){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[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[i]}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[r];if(o===void 0){const u=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+u+"."+r+" 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(r==="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=r;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}}Hr.Composite=ake;Hr.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Hr.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Hr.prototype.GetterByBindingType=[Hr.prototype._getValue_direct,Hr.prototype._getValue_array,Hr.prototype._getValue_arrayElement,Hr.prototype._getValue_toArray];Hr.prototype.SetterByBindingTypeAndVersioning=[[Hr.prototype._setValue_direct,Hr.prototype._setValue_direct_setNeedsUpdate,Hr.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Hr.prototype._setValue_array,Hr.prototype._setValue_array_setNeedsUpdate,Hr.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Hr.prototype._setValue_arrayElement,Hr.prototype._setValue_arrayElement_setNeedsUpdate,Hr.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Hr.prototype._setValue_fromArray,Hr.prototype._setValue_fromArray_setNeedsUpdate,Hr.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class ZC extends gR{constructor(e,t,i=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=i}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 oke{constructor(e,t,i=0,r=1/0){this.ray=new Qv(e,t),this.near=i,this.far=r,this.camera=null,this.layers=new dR,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,i=[]){return JC(e,this,i,t),i.sort(rH),i}intersectObjects(e,t=!0,i=[]){for(let r=0,a=e.length;r<a;r++)JC(e[r],this,i,t);return i.sort(rH),i}}function rH(n,e){return n.distance-e.distance}function JC(n,e,t,i){if(n.layers.test(e.layers)&&n.raycast(e,t),i===!0){const r=n.children;for(let a=0,o=r.length;a<o;a++)JC(r[a],e,t,!0)}}class aH{constructor(e=1,t=0,i=0){return this.radius=e,this.phi=t,this.theta=i,this}set(e,t,i){return this.radius=e,this.phi=t,this.theta=i,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,i){return this.radius=Math.sqrt(e*e+t*t+i*i),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,i),this.phi=Math.acos(so(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}const oH=new Le,S4=new Le;class ske{constructor(e=new Le,t=new Le){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){oH.subVectors(e,this.start),S4.subVectors(this.end,this.start);const i=S4.dot(S4);let a=S4.dot(oH)/i;return t&&(a=so(a,0,1)),a}closestPointToPoint(e,t,i){const r=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(r).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 lke extends _R{constructor(e=10,t=10,i=4473924,r=8947848){i=new Jn(i),r=new Jn(r);const a=t/2,o=e/t,s=e/2,l=[],u=[];for(let h=0,f=0,p=-s;h<=t;h++,p+=o){l.push(-s,0,p,s,0,p),l.push(p,0,-s,p,0,s);const m=h===a?i:r;m.toArray(u,f),f+=3,m.toArray(u,f),f+=3,m.toArray(u,f),f+=3,m.toArray(u,f),f+=3}const c=new Qr;c.setAttribute("position",new ga(l,3)),c.setAttribute("color",new ga(u,3));const d=new ku({vertexColors:!0,toneMapped:!1});super(c,d),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class fee extends _R{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new Qr;r.setAttribute("position",new ga(t,3)),r.setAttribute("color",new ga(i,3));const a=new ku({vertexColors:!0,toneMapped:!1});super(r,a),this.type="AxesHelper"}setColors(e,t,i){const r=new Jn,a=this.geometry.attributes.color.array;return r.set(e),r.toArray(a,0),r.toArray(a,3),r.set(t),r.toArray(a,6),r.toArray(a,9),r.set(i),r.toArray(a,12),r.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:rR}}));typeof window!="undefined"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=rR);function uke(n){let e=null,t=!1,i=!1;function r(){!t||i||(n(),e=requestAnimationFrame(r))}function a(){t||(t=!0,r())}function o(){t&&(t=!1,i=!0,cancelAnimationFrame(e))}function s(){!t&&i&&(t=!0,i=!1,r())}return{start:a,pause:o,resume:s,isActive:()=>t}}class d7{constructor(){this.events=new Map}on(e,t){let i=this.events.get(e);i||(i=new Set,this.events.set(e,i)),i.add(t)}off(e,t){const i=this.events.get(e);i&&(t?i.delete(t):this.events.delete(e))}emit(e,...t){const i=this.events.get(e);i&&i.forEach(r=>{r(...t)})}once(e,t){const i=(...r)=>{t(...r),this.off(e,i)};this.on(e,i)}}class cke extends d7{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 dke extends d7{constructor(){super(),this.start=Date.now(),this.current=this.start,this.elapsed=0,this.delta=16,this.clock=new KNe,this.raf=uke(()=>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(),i=this.clock.getElapsedTime();this.emit("tick",t,i)}destroy(){this.pause(),this.off("tick")}pause(){this.raf.pause()}resume(){this.raf.resume()}isActive(){this.raf.isActive()}}function pee(n,e=!1){const t=n[0].index!==null,i=new Set(Object.keys(n[0].attributes)),r=new Set(Object.keys(n[0].morphAttributes)),a={},o={},s=n[0].morphTargetsRelative,l=new Qr;let u=0;for(let c=0;c<n.length;++c){const d=n[c];let h=0;if(t!==(d.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 f in d.attributes){if(!i.has(f))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+'. All geometries must have compatible attributes; make sure "'+f+'" attribute exists among all geometries, or in none of them.'),null;a[f]===void 0&&(a[f]=[]),a[f].push(d.attributes[f]),h++}if(h!==i.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!==d.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(const f in d.morphAttributes){if(!r.has(f))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphAttributes must be consistent throughout all geometries."),null;o[f]===void 0&&(o[f]=[]),o[f].push(d.morphAttributes[f])}if(e){let f;if(t)f=d.index.count;else if(d.attributes.position!==void 0)f=d.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,f,c),u+=f}}if(t){let c=0;const d=[];for(let h=0;h<n.length;++h){const f=n[h].index;for(let p=0;p<f.count;++p)d.push(f.getX(p)+c);c+=n[h].attributes.position.count}l.setIndex(d)}for(const c in a){const d=sH(a[c]);if(!d)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" attribute."),null;l.setAttribute(c,d)}for(const c in o){const d=o[c][0].length;if(d===0)break;l.morphAttributes=l.morphAttributes||{},l.morphAttributes[c]=[];for(let h=0;h<d;++h){const f=[];for(let m=0;m<o[c].length;++m)f.push(o[c][m][h]);const p=sH(f);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 sH(n){let e,t,i,r=-1,a=0;for(let u=0;u<n.length;++u){const c=n[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(i===void 0&&(i=c.normalized),i!==c.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(r===-1&&(r=c.gpuType),r!==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 La(o,t,i);let l=0;for(let u=0;u<n.length;++u){const c=n[u];if(c.isInterleavedBufferAttribute){const d=l/t;for(let h=0,f=c.count;h<f;h++)for(let p=0;p<t;p++){const m=c.getComponent(h,p);s.setComponent(h+d,p,m)}}else o.set(c.array,l);l+=c.count*t}return r!==void 0&&(s.gpuType=r),s}function lH(n,e){if(e===vEe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),n;if(e===UC||e===LQ){let t=n.getIndex();if(t===null){const o=[],s=n.getAttribute("position");if(s!==void 0){for(let l=0;l<s.count;l++)o.push(l);n.setIndex(o),t=n.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),n}const i=t.count-2,r=[];if(e===UC)for(let o=1;o<=i;o++)r.push(t.getX(0)),r.push(t.getX(o)),r.push(t.getX(o+1));else for(let o=0;o<i;o++)o%2===0?(r.push(t.getX(o)),r.push(t.getX(o+1)),r.push(t.getX(o+2))):(r.push(t.getX(o+2)),r.push(t.getX(o+1)),r.push(t.getX(o)));r.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const a=n.clone();return a.setIndex(r),a.clearGroups(),a}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),n}class hke extends Vh{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new gke(t)}),this.register(function(t){return new Cke(t)}),this.register(function(t){return new Mke(t)}),this.register(function(t){return new Eke(t)}),this.register(function(t){return new _ke(t)}),this.register(function(t){return new Ske(t)}),this.register(function(t){return new bke(t)}),this.register(function(t){return new xke(t)}),this.register(function(t){return new mke(t)}),this.register(function(t){return new wke(t)}),this.register(function(t){return new yke(t)}),this.register(function(t){return new Ake(t)}),this.register(function(t){return new Tke(t)}),this.register(function(t){return new pke(t)}),this.register(function(t){return new Pke(t)}),this.register(function(t){return new Rke(t)})}load(e,t,i,r){const a=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const u=a9.extractUrlBase(e);o=a9.resolveURL(u,this.path)}else o=a9.extractUrlBase(e);this.manager.itemStart(e);const s=function(u){r?r(u):console.error(u),a.manager.itemError(e),a.manager.itemEnd(e)},l=new i3(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)}},i,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,i,r){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))===vee){try{o[cr.KHR_BINARY_GLTF]=new Lke(e)}catch(d){r&&r(d);return}a=JSON.parse(o[cr.KHR_BINARY_GLTF].content)}else a=JSON.parse(l.decode(e));else a=e;if(a.asset===void 0||a.asset.version[0]<2){r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const u=new Wke(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 d=this.pluginCallbacks[c](u);d.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),s[d.name]=d,o[d.name]=!0}if(a.extensionsUsed)for(let c=0;c<a.extensionsUsed.length;++c){const d=a.extensionsUsed[c],h=a.extensionsRequired||[];switch(d){case cr.KHR_MATERIALS_UNLIT:o[d]=new vke;break;case cr.KHR_DRACO_MESH_COMPRESSION:o[d]=new Ike(a,this.dracoLoader);break;case cr.KHR_TEXTURE_TRANSFORM:o[d]=new Dke;break;case cr.KHR_MESH_QUANTIZATION:o[d]=new Nke;break;default:h.indexOf(d)>=0&&s[d]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+d+'".')}}u.setExtensions(o),u.setPlugins(s),u.parse(i,r)}parseAsync(e,t){const i=this;return new Promise(function(r,a){i.parse(e,t,r,a)})}}function fke(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const cr={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 pke{constructor(e){this.parser=e,this.name=cr.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,r=t.length;i<r;i++){const a=t[i];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,i="light:"+e;let r=t.cache.get(i);if(r)return r;const a=t.json,l=((a.extensions&&a.extensions[this.name]||{}).lights||[])[e];let u;const c=new Jn(16777215);l.color!==void 0&&c.setRGB(l.color[0],l.color[1],l.color[2],bo);const d=l.range!==void 0?l.range:0;switch(l.type){case"directional":u=new V8(c),u.target.position.set(0,0,-1),u.add(u.target);break;case"point":u=new dee(c),u.distance=d;break;case"spot":u=new jNe(c),u.distance=d,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,$d(u,l),l.intensity!==void 0&&(u.intensity=l.intensity),u.name=t.createUniqueName(l.name||"light_"+e),r=Promise.resolve(u),t.cache.add(i,r),r}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,i=this.parser,a=i.json.nodes[e],s=(a.extensions&&a.extensions[this.name]||{}).light;return s===void 0?null:this._loadLight(s).then(function(l){return i._getNodeRef(t.cache,s,l)})}}class vke{constructor(){this.name=cr.KHR_MATERIALS_UNLIT}getMaterialType(){return Mr}extendParams(e,t,i){const r=[];e.color=new Jn(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],bo),e.opacity=o[3]}a.baseColorTexture!==void 0&&r.push(i.assignTexture(e,"map",a.baseColorTexture,$r))}return Promise.all(r)}}class mke{constructor(e){this.parser=e,this.name=cr.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const a=r.extensions[this.name].emissiveStrength;return a!==void 0&&(t.emissiveIntensity=a),Promise.resolve()}}class gke{constructor(e){this.parser=e,this.name=cr.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:rd}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const a=[],o=r.extensions[this.name];if(o.clearcoatFactor!==void 0&&(t.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&a.push(i.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&a.push(i.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(a.push(i.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const s=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new on(s,s)}return Promise.all(a)}}class yke{constructor(e){this.parser=e,this.name=cr.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:rd}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const a=[],o=r.extensions[this.name];return o.iridescenceFactor!==void 0&&(t.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&a.push(i.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(i.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(a)}}class _ke{constructor(e){this.parser=e,this.name=cr.KHR_MATERIALS_SHEEN}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:rd}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const a=[];t.sheenColor=new Jn(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=r.extensions[this.name];if(o.sheenColorFactor!==void 0){const s=o.sheenColorFactor;t.sheenColor.setRGB(s[0],s[1],s[2],bo)}return o.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&a.push(i.assignTexture(t,"sheenColorMap",o.sheenColorTexture,$r)),o.sheenRoughnessTexture!==void 0&&a.push(i.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(a)}}class Ske{constructor(e){this.parser=e,this.name=cr.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:rd}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const a=[],o=r.extensions[this.name];return o.transmissionFactor!==void 0&&(t.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&a.push(i.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(a)}}class bke{constructor(e){this.parser=e,this.name=cr.KHR_MATERIALS_VOLUME}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:rd}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const a=[],o=r.extensions[this.name];t.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&a.push(i.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const s=o.attenuationColor||[1,1,1];return t.attenuationColor=new Jn().setRGB(s[0],s[1],s[2],bo),Promise.all(a)}}class xke{constructor(e){this.parser=e,this.name=cr.KHR_MATERIALS_IOR}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:rd}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const a=r.extensions[this.name];return t.ior=a.ior!==void 0?a.ior:1.5,Promise.resolve()}}class wke{constructor(e){this.parser=e,this.name=cr.KHR_MATERIALS_SPECULAR}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:rd}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const a=[],o=r.extensions[this.name];t.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&a.push(i.assignTexture(t,"specularIntensityMap",o.specularTexture));const s=o.specularColorFactor||[1,1,1];return t.specularColor=new Jn().setRGB(s[0],s[1],s[2],bo),o.specularColorTexture!==void 0&&a.push(i.assignTexture(t,"specularColorMap",o.specularColorTexture,$r)),Promise.all(a)}}class Tke{constructor(e){this.parser=e,this.name=cr.EXT_MATERIALS_BUMP}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:rd}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const a=[],o=r.extensions[this.name];return t.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&a.push(i.assignTexture(t,"bumpMap",o.bumpTexture)),Promise.all(a)}}class Ake{constructor(e){this.parser=e,this.name=cr.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:rd}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const a=[],o=r.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(i.assignTexture(t,"anisotropyMap",o.anisotropyTexture)),Promise.all(a)}}class Cke{constructor(e){this.parser=e,this.name=cr.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,i=t.json,r=i.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const a=r.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(i.extensionsRequired&&i.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 Mke{constructor(e){this.parser=e,this.name=cr.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,a=r.textures[e];if(!a.extensions||!a.extensions[t])return null;const o=a.extensions[t],s=r.images[o.source];let l=i.textureLoader;if(s.uri){const u=i.options.manager.getHandler(s.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.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 Eke{constructor(e){this.parser=e,this.name=cr.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,a=r.textures[e];if(!a.extensions||!a.extensions[t])return null;const o=a.extensions[t],s=r.images[o.source];let l=i.textureLoader;if(s.uri){const u=i.options.manager.getHandler(s.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.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 Pke{constructor(e){this.name=cr.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const r=i.extensions[this.name],a=this.parser.getDependency("buffer",r.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=r.byteOffset||0,u=r.byteLength||0,c=r.count,d=r.byteStride,h=new Uint8Array(s,l,u);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(c,d,h,r.mode,r.filter).then(function(f){return f.buffer}):o.ready.then(function(){const f=new ArrayBuffer(c*d);return o.decodeGltfBuffer(new Uint8Array(f),c,d,h,r.mode,r.filter),f})})}else return null}}class Rke{constructor(e){this.name=cr.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const r=t.meshes[i.mesh];for(const u of r.primitives)if(u.mode!==l0.TRIANGLES&&u.mode!==l0.TRIANGLE_STRIP&&u.mode!==l0.TRIANGLE_FAN&&u.mode!==void 0)return null;const o=i.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(),d=c.isGroup?c.children:[c],h=u[0].count,f=[];for(const p of d){const m=new Bi,v=new Le,g=new ru,_=new Le(1,1,1),S=new QDe(p.geometry,p.material,h);for(let x=0;x<h;x++)l.TRANSLATION&&v.fromBufferAttribute(l.TRANSLATION,x),l.ROTATION&&g.fromBufferAttribute(l.ROTATION,x),l.SCALE&&_.fromBufferAttribute(l.SCALE,x),S.setMatrixAt(x,m.compose(v,g,_));for(const x in l)if(x==="_COLOR_0"){const A=l[x];S.instanceColor=new $C(A.array,A.itemSize,A.normalized)}else x!=="TRANSLATION"&&x!=="ROTATION"&&x!=="SCALE"&&p.geometry.setAttribute(x,l[x]);la.prototype.copy.call(S,p),this.parser.assignFinalMaterial(S),f.push(S)}return c.isGroup?(c.clear(),c.add(...f),c):f[0]}))}}const vee="glTF",fg=12,uH={JSON:1313821514,BIN:5130562};class Lke{constructor(e){this.name=cr.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,fg),i=new TextDecoder;if(this.header={magic:i.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==vee)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const r=this.header.length-fg,a=new DataView(e,fg);let o=0;for(;o<r;){const s=a.getUint32(o,!0);o+=4;const l=a.getUint32(o,!0);if(o+=4,l===uH.JSON){const u=new Uint8Array(e,fg+o,s);this.content=i.decode(u)}else if(l===uH.BIN){const u=fg+o;this.body=e.slice(u,u+s)}o+=s}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Ike{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=cr.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const i=this.json,r=this.dracoLoader,a=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,s={},l={},u={};for(const c in o){const d=QC[c]||c.toLowerCase();s[d]=o[c]}for(const c in e.attributes){const d=QC[c]||c.toLowerCase();if(o[c]!==void 0){const h=i.accessors[e.attributes[c]],f=ev[h.componentType];u[d]=f.name,l[d]=h.normalized===!0}}return t.getDependency("bufferView",a).then(function(c){return new Promise(function(d,h){r.decodeDracoFile(c,function(f){for(const p in f.attributes){const m=f.attributes[p],v=l[p];v!==void 0&&(m.normalized=v)}d(f)},s,u,bo,h)})})}}class Dke{constructor(){this.name=cr.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 Nke{constructor(){this.name=cr.KHR_MESH_QUANTIZATION}}class mee extends O3{constructor(e,t,i,r){super(e,t,i,r)}copySampleValue_(e){const t=this.resultBuffer,i=this.sampleValues,r=this.valueSize,a=e*r*3+r;for(let o=0;o!==r;o++)t[o]=i[a+o];return t}interpolate_(e,t,i,r){const a=this.resultBuffer,o=this.sampleValues,s=this.valueSize,l=s*2,u=s*3,c=r-t,d=(i-t)/c,h=d*d,f=h*d,p=e*u,m=p-u,v=-2*f+3*h,g=f-h,_=1-v,S=g-h+d;for(let x=0;x!==s;x++){const A=o[m+x+s],C=o[m+x+l]*c,M=o[p+x+s],I=o[p+x]*c;a[x]=_*A+S*C+v*M+g*I}return a}}const kke=new ru;class Fke extends mee{interpolate_(e,t,i,r){const a=super.interpolate_(e,t,i,r);return kke.fromArray(a).normalize().toArray(a),a}}const l0={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},ev={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},cH={9728:mo,9729:ao,9984:GC,9985:v5,9986:w2,9987:kc},dH={33071:us,33648:N8,10497:Eo},lT={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},QC={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"},zd={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Oke={CUBICSPLINE:void 0,LINEAR:Av,STEP:Z9},uT={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Bke(n){return n.DefaultMaterial===void 0&&(n.DefaultMaterial=new dp({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:Zc})),n.DefaultMaterial}function Of(n,e,t){for(const i in t.extensions)n[i]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[i]=t.extensions[i])}function $d(n,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(n.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function zke(n,e,t){let i=!1,r=!1,a=!1;for(let u=0,c=e.length;u<c;u++){const d=e[u];if(d.POSITION!==void 0&&(i=!0),d.NORMAL!==void 0&&(r=!0),d.COLOR_0!==void 0&&(a=!0),i&&r&&a)break}if(!i&&!r&&!a)return Promise.resolve(n);const o=[],s=[],l=[];for(let u=0,c=e.length;u<c;u++){const d=e[u];if(i){const h=d.POSITION!==void 0?t.getDependency("accessor",d.POSITION):n.attributes.position;o.push(h)}if(r){const h=d.NORMAL!==void 0?t.getDependency("accessor",d.NORMAL):n.attributes.normal;s.push(h)}if(a){const h=d.COLOR_0!==void 0?t.getDependency("accessor",d.COLOR_0):n.attributes.color;l.push(h)}}return Promise.all([Promise.all(o),Promise.all(s),Promise.all(l)]).then(function(u){const c=u[0],d=u[1],h=u[2];return i&&(n.morphAttributes.position=c),r&&(n.morphAttributes.normal=d),a&&(n.morphAttributes.color=h),n.morphTargetsRelative=!0,n})}function Gke(n,e){if(n.updateMorphTargets(),e.weights!==void 0)for(let t=0,i=e.weights.length;t<i;t++)n.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(n.morphTargetInfluences.length===t.length){n.morphTargetDictionary={};for(let i=0,r=t.length;i<r;i++)n.morphTargetDictionary[t[i]]=i}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Uke(n){let e;const t=n.extensions&&n.extensions[cr.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+cT(t.attributes):e=n.indices+":"+cT(n.attributes)+":"+n.mode,n.targets!==void 0)for(let i=0,r=n.targets.length;i<r;i++)e+=":"+cT(n.targets[i]);return e}function cT(n){let e="";const t=Object.keys(n).sort();for(let i=0,r=t.length;i<r;i++)e+=t[i]+":"+n[t[i]]+";";return e}function eM(n){switch(n){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 Vke(n){return n.search(/\.jpe?g($|\?)/i)>0||n.search(/^data\:image\/jpeg/)===0?"image/jpeg":n.search(/\.webp($|\?)/i)>0||n.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const Hke=new Bi;class Wke{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new fke,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 i=!1,r=!1,a=-1;typeof navigator!="undefined"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,r=navigator.userAgent.indexOf("Firefox")>-1,a=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap=="undefined"||i||r&&a<98?this.textureLoader=new AR(this.options.manager):this.textureLoader=new YNe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new i3(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 i=this,r=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([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const s={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:i,userData:{}};return Of(a,s,r),$d(s,r),Promise.all(i._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||[],i=this.json.meshes||[];for(let r=0,a=t.length;r<a;r++){const o=t[r].joints;for(let s=0,l=o.length;s<l;s++)e[o[s]].isBone=!0}for(let r=0,a=e.length;r<a;r++){const o=e[r];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(i[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,i){if(e.refs[t]<=1)return i;const r=i.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(i,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i<t.length;i++){const r=e(t[i]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const i=[];for(let r=0;r<t.length;r++){const a=e(t[r]);a&&i.push(a)}return i}getDependency(e,t){const i=e+":"+t;let r=this.cache.get(i);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this._invokeOne(function(a){return a.loadNode&&a.loadNode(t)});break;case"mesh":r=this._invokeOne(function(a){return a.loadMesh&&a.loadMesh(t)});break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne(function(a){return a.loadBufferView&&a.loadBufferView(t)});break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne(function(a){return a.loadMaterial&&a.loadMaterial(t)});break;case"texture":r=this._invokeOne(function(a){return a.loadTexture&&a.loadTexture(t)});break;case"skin":r=this.loadSkin(t);break;case"animation":r=this._invokeOne(function(a){return a.loadAnimation&&a.loadAnimation(t)});break;case"camera":r=this.loadCamera(t);break;default:if(r=this._invokeOne(function(a){return a!=this&&a.getDependency&&a.getDependency(e,t)}),!r)throw new Error("Unknown type: "+e);break}this.cache.add(i,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const i=this,r=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(r.map(function(a,o){return i.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],i=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[cr.KHR_BINARY_GLTF].body);const r=this.options;return new Promise(function(a,o){i.load(a9.resolveURL(t.uri,r.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(i){const r=t.byteLength||0,a=t.byteOffset||0;return i.slice(a,a+r)})}loadAccessor(e){const t=this,i=this.json,r=this.json.accessors[e];if(r.bufferView===void 0&&r.sparse===void 0){const o=lT[r.type],s=ev[r.componentType],l=r.normalized===!0,u=new s(r.count*o);return Promise.resolve(new La(u,o,l))}const a=[];return r.bufferView!==void 0?a.push(this.getDependency("bufferView",r.bufferView)):a.push(null),r.sparse!==void 0&&(a.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),a.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(a).then(function(o){const s=o[0],l=lT[r.type],u=ev[r.componentType],c=u.BYTES_PER_ELEMENT,d=c*l,h=r.byteOffset||0,f=r.bufferView!==void 0?i.bufferViews[r.bufferView].byteStride:void 0,p=r.normalized===!0;let m,v;if(f&&f!==d){const g=Math.floor(h/f),_="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+g+":"+r.count;let S=t.cache.get(_);S||(m=new u(s,g*f,r.count*f/c),S=new gR(m,f/c),t.cache.add(_,S)),v=new J0(S,l,h%f/c,p)}else s===null?m=new u(r.count*l):m=new u(s,h,r.count*l),v=new La(m,l,p);if(r.sparse!==void 0){const g=lT.SCALAR,_=ev[r.sparse.indices.componentType],S=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,A=new _(o[1],S,r.sparse.count*g),C=new u(o[2],x,r.sparse.count*l);s!==null&&(v=new La(v.array.slice(),v.itemSize,v.normalized));for(let M=0,I=A.length;M<I;M++){const D=A[M];if(v.setX(D,C[M*l]),l>=2&&v.setY(D,C[M*l+1]),l>=3&&v.setZ(D,C[M*l+2]),l>=4&&v.setW(D,C[M*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return v})}loadTexture(e){const t=this.json,i=this.options,a=t.textures[e].source,o=t.images[a];let s=this.textureLoader;if(o.uri){const l=i.manager.getHandler(o.uri);l!==null&&(s=l)}return this.loadTextureImage(e,a,s)}loadTextureImage(e,t,i){const r=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,i).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 h=(a.samplers||{})[o.sampler]||{};return c.magFilter=cH[h.magFilter]||ao,c.minFilter=cH[h.minFilter]||kc,c.wrapS=dH[h.wrapS]||Eo,c.wrapT=dH[h.wrapT]||Eo,r.associations.set(c,{textures:e}),c}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,t){const i=this,r=this.json,a=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const o=r.images[e],s=self.URL||self.webkitURL;let l=o.uri||"",u=!1;if(o.bufferView!==void 0)l=i.getDependency("bufferView",o.bufferView).then(function(d){u=!0;const h=new Blob([d],{type:o.mimeType});return l=s.createObjectURL(h),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(d){return new Promise(function(h,f){let p=h;t.isImageBitmapLoader===!0&&(p=function(m){const v=new yo(m);v.needsUpdate=!0,h(v)}),t.load(a9.resolveURL(d,a.path),p,void 0,f)})}).then(function(d){return u===!0&&s.revokeObjectURL(l),d.userData.mimeType=o.mimeType||Vke(o.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),d});return this.sourceCache[e]=c,c}assignTexture(e,t,i,r){const a=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),a.extensions[cr.KHR_TEXTURE_TRANSFORM]){const s=i.extensions!==void 0?i.extensions[cr.KHR_TEXTURE_TRANSFORM]:void 0;if(s){const l=a.associations.get(o);o=a.extensions[cr.KHR_TEXTURE_TRANSFORM].extendTexture(o,s),a.associations.set(o,l)}}return r!==void 0&&(o.colorSpace=r),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const r=t.attributes.tangent===void 0,a=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const s="PointsMaterial:"+i.uuid;let l=this.cache.get(s);l||(l=new k3,A0.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(s,l)),i=l}else if(e.isLine){const s="LineBasicMaterial:"+i.uuid;let l=this.cache.get(s);l||(l=new ku,A0.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(s,l)),i=l}if(r||a||o){let s="ClonedMaterial:"+i.uuid+":";r&&(s+="derivative-tangents:"),a&&(s+="vertex-colors:"),o&&(s+="flat-shading:");let l=this.cache.get(s);l||(l=i.clone(),a&&(l.vertexColors=!0),o&&(l.flatShading=!0),r&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(s,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return dp}loadMaterial(e){const t=this,i=this.json,r=this.extensions,a=i.materials[e];let o;const s={},l=a.extensions||{},u=[];if(l[cr.KHR_MATERIALS_UNLIT]){const d=r[cr.KHR_MATERIALS_UNLIT];o=d.getMaterialType(),u.push(d.extendParams(s,a,t))}else{const d=a.pbrMetallicRoughness||{};if(s.color=new Jn(1,1,1),s.opacity=1,Array.isArray(d.baseColorFactor)){const h=d.baseColorFactor;s.color.setRGB(h[0],h[1],h[2],bo),s.opacity=h[3]}d.baseColorTexture!==void 0&&u.push(t.assignTexture(s,"map",d.baseColorTexture,$r)),s.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,s.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(u.push(t.assignTexture(s,"metalnessMap",d.metallicRoughnessTexture)),u.push(t.assignTexture(s,"roughnessMap",d.metallicRoughnessTexture))),o=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(e,s)})))}a.doubleSided===!0&&(s.side=aa);const c=a.alphaMode||uT.OPAQUE;if(c===uT.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,c===uT.MASK&&(s.alphaTest=a.alphaCutoff!==void 0?a.alphaCutoff:.5)),a.normalTexture!==void 0&&o!==Mr&&(u.push(t.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new on(1,1),a.normalTexture.scale!==void 0)){const d=a.normalTexture.scale;s.normalScale.set(d,d)}if(a.occlusionTexture!==void 0&&o!==Mr&&(u.push(t.assignTexture(s,"aoMap",a.occlusionTexture)),a.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=a.occlusionTexture.strength)),a.emissiveFactor!==void 0&&o!==Mr){const d=a.emissiveFactor;s.emissive=new Jn().setRGB(d[0],d[1],d[2],bo)}return a.emissiveTexture!==void 0&&o!==Mr&&u.push(t.assignTexture(s,"emissiveMap",a.emissiveTexture,$r)),Promise.all(u).then(function(){const d=new o(s);return a.name&&(d.name=a.name),$d(d,a),t.associations.set(d,{materials:e}),a.extensions&&Of(r,d,a),d})}createUniqueName(e){const t=Hr.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,r=this.primitiveCache;function a(s){return i[cr.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(s,t).then(function(l){return hH(l,s,t)})}const o=[];for(let s=0,l=e.length;s<l;s++){const u=e[s],c=Uke(u),d=r[c];if(d)o.push(d.promise);else{let h;u.extensions&&u.extensions[cr.KHR_DRACO_MESH_COMPRESSION]?h=a(u):h=hH(new Qr,u,t),r[c]={primitive:u,promise:h},o.push(h)}}return Promise.all(o)}loadMesh(e){const t=this,i=this.json,r=this.extensions,a=i.meshes[e],o=a.primitives,s=[];for(let l=0,u=o.length;l<u;l++){const c=o[l].material===void 0?Bke(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],d=[];for(let f=0,p=c.length;f<p;f++){const m=c[f],v=o[f];let g;const _=u[f];if(v.mode===l0.TRIANGLES||v.mode===l0.TRIANGLE_STRIP||v.mode===l0.TRIANGLE_FAN||v.mode===void 0)g=a.isSkinnedMesh===!0?new YDe(m,_):new fr(m,_),g.isSkinnedMesh===!0&&g.normalizeSkinWeights(),v.mode===l0.TRIANGLE_STRIP?g.geometry=lH(g.geometry,LQ):v.mode===l0.TRIANGLE_FAN&&(g.geometry=lH(g.geometry,UC));else if(v.mode===l0.LINES)g=new _R(m,_);else if(v.mode===l0.LINE_STRIP)g=new Q9(m,_);else if(v.mode===l0.LINE_LOOP)g=new G8(m,_);else if(v.mode===l0.POINTS)g=new SR(m,_);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+v.mode);Object.keys(g.geometry.morphAttributes).length>0&&Gke(g,a),g.name=t.createUniqueName(a.name||"mesh_"+e),$d(g,a),v.extensions&&Of(r,g,v),t.assignFinalMaterial(g),d.push(g)}for(let f=0,p=d.length;f<p;f++)t.associations.set(d[f],{meshes:e,primitives:f});if(d.length===1)return a.extensions&&Of(r,d[0],a),d[0];const h=new Nr;a.extensions&&Of(r,h,a),t.associations.set(h,{meshes:e});for(let f=0,p=d.length;f<p;f++)h.add(d[f]);return h})}loadCamera(e){let t;const i=this.json.cameras[e],r=i[i.type];if(!r){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return i.type==="perspective"?t=new ss(cR.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):i.type==="orthographic"&&(t=new a7(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),i.name&&(t.name=this.createUniqueName(i.name)),$d(t,i),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],i=[];for(let r=0,a=t.joints.length;r<a;r++)i.push(this._loadNodeShallow(t.joints[r]));return t.inverseBindMatrices!==void 0?i.push(this.getDependency("accessor",t.inverseBindMatrices)):i.push(null),Promise.all(i).then(function(r){const a=r.pop(),o=r,s=[],l=[];for(let u=0,c=o.length;u<c;u++){const d=o[u];if(d){s.push(d);const h=new Bi;a!==null&&h.fromArray(a.array,u*16),l.push(h)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[u])}return new yR(s,l)})}loadAnimation(e){const t=this.json,i=this,r=t.animations[e],a=r.name?r.name:"animation_"+e,o=[],s=[],l=[],u=[],c=[];for(let d=0,h=r.channels.length;d<h;d++){const f=r.channels[d],p=r.samplers[f.sampler],m=f.target,v=m.node,g=r.parameters!==void 0?r.parameters[p.input]:p.input,_=r.parameters!==void 0?r.parameters[p.output]:p.output;m.node!==void 0&&(o.push(this.getDependency("node",v)),s.push(this.getDependency("accessor",g)),l.push(this.getDependency("accessor",_)),u.push(p),c.push(m))}return Promise.all([Promise.all(o),Promise.all(s),Promise.all(l),Promise.all(u),Promise.all(c)]).then(function(d){const h=d[0],f=d[1],p=d[2],m=d[3],v=d[4],g=[];for(let _=0,S=h.length;_<S;_++){const x=h[_],A=f[_],C=p[_],M=m[_],I=v[_];if(x===void 0)continue;x.updateMatrix&&x.updateMatrix();const D=i._createAnimationTracks(x,A,C,M,I);if(D)for(let E=0;E<D.length;E++)g.push(D[E])}return new BNe(a,void 0,g)})}createNodeMesh(e){const t=this.json,i=this,r=t.nodes[e];return r.mesh===void 0?null:i.getDependency("mesh",r.mesh).then(function(a){const o=i._getNodeRef(i.meshCache,r.mesh,a);return r.weights!==void 0&&o.traverse(function(s){if(s.isMesh)for(let l=0,u=r.weights.length;l<u;l++)s.morphTargetInfluences[l]=r.weights[l]}),o})}loadNode(e){const t=this.json,i=this,r=t.nodes[e],a=i._loadNodeShallow(e),o=[],s=r.children||[];for(let u=0,c=s.length;u<c;u++)o.push(i.getDependency("node",s[u]));const l=r.skin===void 0?Promise.resolve(null):i.getDependency("skin",r.skin);return Promise.all([a,Promise.all(o),l]).then(function(u){const c=u[0],d=u[1],h=u[2];h!==null&&c.traverse(function(f){f.isSkinnedMesh&&f.bind(h,Hke)});for(let f=0,p=d.length;f<p;f++)c.add(d[f]);return c})}_loadNodeShallow(e){const t=this.json,i=this.extensions,r=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const a=t.nodes[e],o=a.name?r.createUniqueName(a.name):"",s=[],l=r._invokeOne(function(u){return u.createNodeMesh&&u.createNodeMesh(e)});return l&&s.push(l),a.camera!==void 0&&s.push(r.getDependency("camera",a.camera).then(function(u){return r._getNodeRef(r.cameraCache,a.camera,u)})),r._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 QQ:u.length>1?c=new Nr:u.length===1?c=u[0]:c=new la,c!==u[0])for(let d=0,h=u.length;d<h;d++)c.add(u[d]);if(a.name&&(c.userData.name=a.name,c.name=o),$d(c,a),a.extensions&&Of(i,c,a),a.matrix!==void 0){const d=new Bi;d.fromArray(a.matrix),c.applyMatrix4(d)}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 r.associations.has(c)||r.associations.set(c,{}),r.associations.get(c).nodes=e,c}),this.nodeCache[e]}loadScene(e){const t=this.extensions,i=this.json.scenes[e],r=this,a=new Nr;i.name&&(a.name=r.createUniqueName(i.name)),$d(a,i),i.extensions&&Of(t,a,i);const o=i.nodes||[],s=[];for(let l=0,u=o.length;l<u;l++)s.push(r.getDependency("node",o[l]));return Promise.all(s).then(function(l){for(let c=0,d=l.length;c<d;c++)a.add(l[c]);const u=c=>{const d=new Map;for(const[h,f]of r.associations)(h instanceof A0||h instanceof yo)&&d.set(h,f);return c.traverse(h=>{const f=r.associations.get(h);f!=null&&d.set(h,f)}),d};return r.associations=u(a),a})}_createAnimationTracks(e,t,i,r,a){const o=[],s=e.name?e.name:e.uuid,l=[];zd[a.path]===zd.weights?e.traverse(function(h){h.morphTargetInfluences&&l.push(h.name?h.name:h.uuid)}):l.push(s);let u;switch(zd[a.path]){case zd.weights:u=Ev;break;case zd.rotation:u=jp;break;case zd.position:case zd.scale:u=Pv;break;default:switch(i.itemSize){case 1:u=Ev;break;case 2:case 3:default:u=Pv;break}break}const c=r.interpolation!==void 0?Oke[r.interpolation]:Av,d=this._getArrayFromAccessor(i);for(let h=0,f=l.length;h<f;h++){const p=new u(l[h]+"."+zd[a.path],t.array,d,c);r.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(p),o.push(p)}return o}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const i=eM(t.constructor),r=new Float32Array(t.length);for(let a=0,o=t.length;a<o;a++)r[a]=t[a]*i;t=r}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(i){const r=this instanceof jp?Fke:mee;return new r(this.times,this.values,this.getValueSize()/3,i)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function jke(n,e,t){const i=e.attributes,r=new I0;if(i.POSITION!==void 0){const s=t.json.accessors[i.POSITION],l=s.min,u=s.max;if(l!==void 0&&u!==void 0){if(r.set(new Le(l[0],l[1],l[2]),new Le(u[0],u[1],u[2])),s.normalized){const c=eM(ev[s.componentType]);r.min.multiplyScalar(c),r.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 Le,l=new Le;for(let u=0,c=a.length;u<c;u++){const d=a[u];if(d.POSITION!==void 0){const h=t.json.accessors[d.POSITION],f=h.min,p=h.max;if(f!==void 0&&p!==void 0){if(l.setX(Math.max(Math.abs(f[0]),Math.abs(p[0]))),l.setY(Math.max(Math.abs(f[1]),Math.abs(p[1]))),l.setZ(Math.max(Math.abs(f[2]),Math.abs(p[2]))),h.normalized){const m=eM(ev[h.componentType]);l.multiplyScalar(m)}s.max(l)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}r.expandByVector(s)}n.boundingBox=r;const o=new D0;r.getCenter(o.center),o.radius=r.min.distanceTo(r.max)/2,n.boundingSphere=o}function hH(n,e,t){const i=e.attributes,r=[];function a(o,s){return t.getDependency("accessor",o).then(function(l){n.setAttribute(s,l)})}for(const o in i){const s=QC[o]||o.toLowerCase();s in n.attributes||r.push(a(i[o],s))}if(e.indices!==void 0&&!n.index){const o=t.getDependency("accessor",e.indices).then(function(s){n.setIndex(s)});r.push(o)}return Br.workingColorSpace!==bo&&"COLOR_0"in i&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Br.workingColorSpace}" not supported.`),$d(n,e),jke(n,e,t),Promise.all(r).then(function(){return e.targets!==void 0?zke(n,e.targets,t):n})}const dT=new WeakMap;class $ke extends Vh{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,i,r){const a=new i3(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,r)},i,r)}parse(e,t,i=()=>{}){this.decodeDracoFile(e,t,null,null,$r).catch(i)}decodeDracoFile(e,t,i,r,a=bo,o=()=>{}){const s={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!i,vertexColorSpace:a};return this.decodeGeometry(e,s).then(t).catch(o)}decodeGeometry(e,t){const i=JSON.stringify(t);if(dT.has(e)){const l=dT.get(e);if(l.key===i)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 r;const a=this.workerNextTaskID++,o=e.byteLength,s=this._getWorker(a,o).then(l=>(r=l,new Promise((u,c)=>{r._callbacks[a]={resolve:u,reject:c},r.postMessage({type:"decode",id:a,taskConfig:t,buffer:e},[e])}))).then(l=>this._createGeometry(l.geometry));return s.catch(()=>!0).then(()=>{r&&a&&this._releaseTask(r,a)}),dT.set(e,{key:i,promise:s}),s}_createGeometry(e){const t=new Qr;e.index&&t.setIndex(new La(e.index.array,1));for(let i=0;i<e.attributes.length;i++){const r=e.attributes[i],a=r.name,o=r.array,s=r.itemSize,l=new La(o,s);a==="color"&&(this._assignVertexColorSpace(l,r.vertexColorSpace),l.normalized=!(o instanceof Float32Array)),t.setAttribute(a,l)}return t}_assignVertexColorSpace(e,t){if(t!==$r)return;const i=new Jn;for(let r=0,a=e.count;r<a;r++)i.fromBufferAttribute(e,r).convertSRGBToLinear(),e.setXYZ(r,i.r,i.g,i.b)}_loadLibrary(e,t){const i=new i3(this.manager);return i.setPath(this.decoderPath),i.setResponseType(t),i.setWithCredentials(this.withCredentials),new Promise((r,a)=>{i.load(e,r,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(i=>{const r=i[0];e||(this.decoderConfig.wasmBinary=i[1]);const a=qke.toString(),o=["/* draco decoder */",r,"","/* 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 r=new Worker(this.workerSourceURL);r._callbacks={},r._taskCosts={},r._taskLoad=0,r.postMessage({type:"init",decoderConfig:this.decoderConfig}),r.onmessage=function(a){const o=a.data;switch(o.type){case"decode":r._callbacks[o.id].resolve(o);break;case"error":r._callbacks[o.id].reject(o);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+o.type+'"')}},this.workerPool.push(r)}else this.workerPool.sort(function(r,a){return r._taskLoad>a._taskLoad?-1:1});const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[e]=t,i._taskLoad+=t,i})}_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 qke(){let n,e;onmessage=function(o){const s=o.data;switch(s.type){case"init":n=s.decoderConfig,e=new Promise(function(c){n.onModuleLoaded=function(d){c({draco:d})},DracoDecoderModule(n)});break;case"decode":const l=s.buffer,u=s.taskConfig;e.then(c=>{const d=c.draco,h=new d.Decoder;try{const f=t(d,h,new Int8Array(l),u),p=f.attributes.map(m=>m.array.buffer);f.index&&p.push(f.index.array.buffer),self.postMessage({type:"decode",id:s.id,geometry:f},p)}catch(f){console.error(f),self.postMessage({type:"error",id:s.id,error:f.message})}finally{d.destroy(h)}});break}};function t(o,s,l,u){const c=u.attributeIDs,d=u.attributeTypes;let h,f;const p=s.GetEncodedGeometryType(l);if(p===o.TRIANGULAR_MESH)h=new o.Mesh,f=s.DecodeArrayToMesh(l,l.byteLength,h);else if(p===o.POINT_CLOUD)h=new o.PointCloud,f=s.DecodeArrayToPointCloud(l,l.byteLength,h);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!f.ok()||h.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+f.error_msg());const m={index:null,attributes:[]};for(const v in c){const g=self[d[v]];let _,S;if(u.useUniqueIDs)S=c[v],_=s.GetAttributeByUniqueId(h,S);else{if(S=s.GetAttributeId(h,o[c[v]]),S===-1)continue;_=s.GetAttribute(h,S)}const x=r(o,s,h,v,g,_);v==="color"&&(x.vertexColorSpace=u.vertexColorSpace),m.attributes.push(x)}return p===o.TRIANGULAR_MESH&&(m.index=i(o,s,h)),o.destroy(h),m}function i(o,s,l){const c=l.num_faces()*3,d=c*4,h=o._malloc(d);s.GetTrianglesUInt32Array(l,d,h);const f=new Uint32Array(o.HEAPF32.buffer,h,c).slice();return o._free(h),{array:f,itemSize:1}}function r(o,s,l,u,c,d){const h=d.num_components(),p=l.num_points()*h,m=p*c.BYTES_PER_ELEMENT,v=a(o,c),g=o._malloc(m);s.GetAttributeDataArrayForAllPoints(l,d,v,m,g);const _=new c(o.HEAPF32.buffer,g,p).slice();return o._free(g),{name:u,array:_,itemSize:h}}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 tM={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 Xke=Object.values(tM);class Yke extends d7{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 cee;return e.onProgress=(t,i,r)=>{this.itemsLoaded=i,this.itemsTotal=r,this.emit("onProgress",t,i,r)},e.onError=t=>{this.emit("onError",t)},e}initDefaultLoader(){[{loader:hke,name:"GLTFLoader"},{loader:AR,name:"TextureLoader"}].map(e=>this.addLoader(e.loader,e.name))}initDraco(e){const t=new $ke;t.setDecoderPath(this.dracoPath),t.preload(),e.setDRACOLoader(t)}addLoader(e,t=""){if(e.name&&tM[t]){if(!this.loaders[t]){let r=new e(this.manager),a=t;r instanceof Vh&&(a==="GLTFLoader"&&this.initDraco(r),this.loaders[tM[a]]=r)}}else throw new Error("请配置正确的加载器")}loadItem(e){return new Promise((t,i)=>{if(!this.loaders[e.type])throw new Error(`资源${e.path}没有配置加载器`);this.loaders[e.type].load(e.path,r=>{this.itemsLoaded++,this.emit("onProgress",e.path,this.itemsLoaded,this.itemsTotal),t(tn(wt({},e),{data:r}))},null,r=>{this.emit("onError",r),i(r)})})}loadAll(e){return this.itemsLoaded=0,this.itemsTotal=0,new Promise((t,i)=>{let r=this.matchType(e),a=[];this.itemsTotal=r.length,r.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),i(o)})})}matchType(e){return this.assets=e.map(t=>({type:Xke.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(i=>i.name===e);if(!t)throw new Error(`资源${e}不存在`);return t.data}destroy(){this.off("onProgress"),this.off("onLoad"),this.off("onError"),this.assets=[]}}const gee=n=>{n instanceof Array?n.forEach(gee):(n.map&&n.map.dispose(),n.dispose())},yee=n=>{n.geometry&&n.geometry.dispose(),n.material&&gee(n.material),n.texture&&n.texture.dispose(),n.children&&n.children.forEach(yee)},Kke=n=>{if(n&&n.children)for(;n.children.length;){const e=n.children[0];n.remove(e),yee(e)}};var PR={exports:{}},Zke=function(e,t,i,r){var a=e[0],o=e[1],s=!1;i===void 0&&(i=0),r===void 0&&(r=t.length);for(var l=(r-i)/2,u=0,c=l-1;u<l;c=u++){var d=t[i+u*2+0],h=t[i+u*2+1],f=t[i+c*2+0],p=t[i+c*2+1],m=h>o!=p>o&&a<(f-d)*(o-h)/(p-h)+d;m&&(s=!s)}return s},Jke=function(e,t,i,r){var a=e[0],o=e[1],s=!1;i===void 0&&(i=0),r===void 0&&(r=t.length);for(var l=r-i,u=0,c=l-1;u<l;c=u++){var d=t[u+i][0],h=t[u+i][1],f=t[c+i][0],p=t[c+i][1],m=h>o!=p>o&&a<(f-d)*(o-h)/(p-h)+d;m&&(s=!s)}return s},_ee=Zke,See=Jke;PR.exports=function(e,t,i,r){return t.length>0&&Array.isArray(t[0])?See(e,t,i,r):_ee(e,t,i,r)};PR.exports.nested=See;PR.exports.flat=_ee;function Qke(n=10,e=62){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=[],r;if(e=e||t.length,n)for(r=0;r<n;r++)i[r]=t[0|Math.random()*e];else{var a;for(i[8]=i[13]=i[18]=i[23]="-",i[14]="4",r=0;r<36;r++)i[r]||(a=0|Math.random()*16,i[r]=t[r==19?a&3|8:a])}return i.join("")}const RR=n=>{console.log(n);let e=JSON.parse(n),t=e.features;for(let i=0;i<t.length;i++){const r=t[i];["Polygon"].includes(r.geometry.type)&&(r.geometry.coordinates=[r.geometry.coordinates])}return e};class eFe{constructor({canvas:e,sizes:t,scene:i,camera:r,postprocessing:a=!1,composer:o=null}){this.canvas=e,this.sizes=t,this.scene=i,this.camera=r,this.postprocessing=a,this.composer=o,this.setInstance()}setInstance(){this.instance=new vR({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 fH={type:"change"},hT={type:"start"},pH={type:"end"},b4=new Qv,vH=new jd,tFe=Math.cos(70*cR.DEG2RAD);class bee extends s1{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new Le,this.cursor=new Le,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:X1.ROTATE,MIDDLE:X1.DOLLY,RIGHT:X1.PAN},this.touches={ONE:Y1.ROTATE,TWO:Y1.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(je){je.addEventListener("keydown",Yt),this._domElementKeyEvents=je},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",Yt),this._domElementKeyEvents=null},this.saveState=function(){i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object.zoom},this.reset=function(){i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.zoom=i.zoom0,i.object.updateProjectionMatrix(),i.dispatchEvent(fH),i.update(),a=r.NONE},this.update=function(){const je=new Le,Ht=new ru().setFromUnitVectors(e.up,new Le(0,1,0)),wn=Ht.clone().invert(),zn=new Le,Be=new ru,pn=new Le,dn=2*Math.PI;return function(En=null){const Tn=i.object.position;je.copy(Tn).sub(i.target),je.applyQuaternion(Ht),s.setFromVector3(je),i.autoRotate&&a===r.NONE&&F(E(En)),i.enableDamping?(s.theta+=l.theta*i.dampingFactor,s.phi+=l.phi*i.dampingFactor):(s.theta+=l.theta,s.phi+=l.phi);let ut=i.minAzimuthAngle,Jt=i.maxAzimuthAngle;isFinite(ut)&&isFinite(Jt)&&(ut<-Math.PI?ut+=dn:ut>Math.PI&&(ut-=dn),Jt<-Math.PI?Jt+=dn:Jt>Math.PI&&(Jt-=dn),ut<=Jt?s.theta=Math.max(ut,Math.min(Jt,s.theta)):s.theta=s.theta>(ut+Jt)/2?Math.max(ut,s.theta):Math.min(Jt,s.theta)),s.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,s.phi)),s.makeSafe(),i.enableDamping===!0?i.target.addScaledVector(c,i.dampingFactor):i.target.add(c),i.target.sub(i.cursor),i.target.clampLength(i.minTargetRadius,i.maxTargetRadius),i.target.add(i.cursor),i.zoomToCursor&&C||i.object.isOrthographicCamera?s.radius=ie(s.radius):s.radius=ie(s.radius*u),je.setFromSpherical(s),je.applyQuaternion(wn),Tn.copy(i.target).add(je),i.object.lookAt(i.target),i.enableDamping===!0?(l.theta*=1-i.dampingFactor,l.phi*=1-i.dampingFactor,c.multiplyScalar(1-i.dampingFactor)):(l.set(0,0,0),c.set(0,0,0));let hn=!1;if(i.zoomToCursor&&C){let Nn=null;if(i.object.isPerspectiveCamera){const Re=je.length();Nn=ie(Re*u);const lt=Re-Nn;i.object.position.addScaledVector(x,lt),i.object.updateMatrixWorld()}else if(i.object.isOrthographicCamera){const Re=new Le(A.x,A.y,0);Re.unproject(i.object),i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/u)),i.object.updateProjectionMatrix(),hn=!0;const lt=new Le(A.x,A.y,0);lt.unproject(i.object),i.object.position.sub(lt).add(Re),i.object.updateMatrixWorld(),Nn=je.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),i.zoomToCursor=!1;Nn!==null&&(this.screenSpacePanning?i.target.set(0,0,-1).transformDirection(i.object.matrix).multiplyScalar(Nn).add(i.object.position):(b4.origin.copy(i.object.position),b4.direction.set(0,0,-1).transformDirection(i.object.matrix),Math.abs(i.object.up.dot(b4.direction))<tFe?e.lookAt(i.target):(vH.setFromNormalAndCoplanarPoint(i.object.up,i.target),b4.intersectPlane(vH,i.target))))}else i.object.isOrthographicCamera&&(hn=u!==1,hn&&(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/u)),i.object.updateProjectionMatrix()));return u=1,C=!1,hn||zn.distanceToSquared(i.object.position)>o||8*(1-Be.dot(i.object.quaternion))>o||pn.distanceToSquared(i.target)>0?(i.dispatchEvent(fH),zn.copy(i.object.position),Be.copy(i.object.quaternion),pn.copy(i.target),!0):!1}}(),this.dispose=function(){i.domElement.removeEventListener("contextmenu",Vt),i.domElement.removeEventListener("pointerdown",J),i.domElement.removeEventListener("pointercancel",Ue),i.domElement.removeEventListener("wheel",Ce),i.domElement.removeEventListener("pointermove",ee),i.domElement.removeEventListener("pointerup",Ue),i._domElementKeyEvents!==null&&(i._domElementKeyEvents.removeEventListener("keydown",Yt),i._domElementKeyEvents=null)};const i=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let a=r.NONE;const o=1e-6,s=new aH,l=new aH;let u=1;const c=new Le,d=new on,h=new on,f=new on,p=new on,m=new on,v=new on,g=new on,_=new on,S=new on,x=new Le,A=new on;let C=!1;const M=[],I={};let D=!1;function E(je){return je!==null?2*Math.PI/60*i.autoRotateSpeed*je:2*Math.PI/60/60*i.autoRotateSpeed}function P(je){const Ht=Math.abs(je*.01);return Math.pow(.95,i.zoomSpeed*Ht)}function F(je){l.theta-=je}function V(je){l.phi-=je}const G=function(){const je=new Le;return function(wn,zn){je.setFromMatrixColumn(zn,0),je.multiplyScalar(-wn),c.add(je)}}(),W=function(){const je=new Le;return function(wn,zn){i.screenSpacePanning===!0?je.setFromMatrixColumn(zn,1):(je.setFromMatrixColumn(zn,0),je.crossVectors(i.object.up,je)),je.multiplyScalar(wn),c.add(je)}}(),Y=function(){const je=new Le;return function(wn,zn){const Be=i.domElement;if(i.object.isPerspectiveCamera){const pn=i.object.position;je.copy(pn).sub(i.target);let dn=je.length();dn*=Math.tan(i.object.fov/2*Math.PI/180),G(2*wn*dn/Be.clientHeight,i.object.matrix),W(2*zn*dn/Be.clientHeight,i.object.matrix)}else i.object.isOrthographicCamera?(G(wn*(i.object.right-i.object.left)/i.object.zoom/Be.clientWidth,i.object.matrix),W(zn*(i.object.top-i.object.bottom)/i.object.zoom/Be.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}}();function Q(je){i.object.isPerspectiveCamera||i.object.isOrthographicCamera?u/=je:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function K(je){i.object.isPerspectiveCamera||i.object.isOrthographicCamera?u*=je:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function ae(je,Ht){if(!i.zoomToCursor)return;C=!0;const wn=i.domElement.getBoundingClientRect(),zn=je-wn.left,Be=Ht-wn.top,pn=wn.width,dn=wn.height;A.x=zn/pn*2-1,A.y=-(Be/dn)*2+1,x.set(A.x,A.y,1).unproject(i.object).sub(i.object.position).normalize()}function ie(je){return Math.max(i.minDistance,Math.min(i.maxDistance,je))}function he(je){d.set(je.clientX,je.clientY)}function Ee(je){ae(je.clientX,je.clientX),g.set(je.clientX,je.clientY)}function He(je){p.set(je.clientX,je.clientY)}function xe(je){h.set(je.clientX,je.clientY),f.subVectors(h,d).multiplyScalar(i.rotateSpeed);const Ht=i.domElement;F(2*Math.PI*f.x/Ht.clientHeight),V(2*Math.PI*f.y/Ht.clientHeight),d.copy(h),i.update()}function Fe(je){_.set(je.clientX,je.clientY),S.subVectors(_,g),S.y>0?Q(P(S.y)):S.y<0&&K(P(S.y)),g.copy(_),i.update()}function pt(je){m.set(je.clientX,je.clientY),v.subVectors(m,p).multiplyScalar(i.panSpeed),Y(v.x,v.y),p.copy(m),i.update()}function Ot(je){ae(je.clientX,je.clientY),je.deltaY<0?K(P(je.deltaY)):je.deltaY>0&&Q(P(je.deltaY)),i.update()}function bt(je){let Ht=!1;switch(je.code){case i.keys.UP:je.ctrlKey||je.metaKey||je.shiftKey?V(2*Math.PI*i.rotateSpeed/i.domElement.clientHeight):Y(0,i.keyPanSpeed),Ht=!0;break;case i.keys.BOTTOM:je.ctrlKey||je.metaKey||je.shiftKey?V(-2*Math.PI*i.rotateSpeed/i.domElement.clientHeight):Y(0,-i.keyPanSpeed),Ht=!0;break;case i.keys.LEFT:je.ctrlKey||je.metaKey||je.shiftKey?F(2*Math.PI*i.rotateSpeed/i.domElement.clientHeight):Y(i.keyPanSpeed,0),Ht=!0;break;case i.keys.RIGHT:je.ctrlKey||je.metaKey||je.shiftKey?F(-2*Math.PI*i.rotateSpeed/i.domElement.clientHeight):Y(-i.keyPanSpeed,0),Ht=!0;break}Ht&&(je.preventDefault(),i.update())}function ht(je){if(M.length===1)d.set(je.pageX,je.pageY);else{const Ht=an(je),wn=.5*(je.pageX+Ht.x),zn=.5*(je.pageY+Ht.y);d.set(wn,zn)}}function Kt(je){if(M.length===1)p.set(je.pageX,je.pageY);else{const Ht=an(je),wn=.5*(je.pageX+Ht.x),zn=.5*(je.pageY+Ht.y);p.set(wn,zn)}}function Tt(je){const Ht=an(je),wn=je.pageX-Ht.x,zn=je.pageY-Ht.y,Be=Math.sqrt(wn*wn+zn*zn);g.set(0,Be)}function Ae(je){i.enableZoom&&Tt(je),i.enablePan&&Kt(je)}function Lt(je){i.enableZoom&&Tt(je),i.enableRotate&&ht(je)}function vt(je){if(M.length==1)h.set(je.pageX,je.pageY);else{const wn=an(je),zn=.5*(je.pageX+wn.x),Be=.5*(je.pageY+wn.y);h.set(zn,Be)}f.subVectors(h,d).multiplyScalar(i.rotateSpeed);const Ht=i.domElement;F(2*Math.PI*f.x/Ht.clientHeight),V(2*Math.PI*f.y/Ht.clientHeight),d.copy(h)}function Ft(je){if(M.length===1)m.set(je.pageX,je.pageY);else{const Ht=an(je),wn=.5*(je.pageX+Ht.x),zn=.5*(je.pageY+Ht.y);m.set(wn,zn)}v.subVectors(m,p).multiplyScalar(i.panSpeed),Y(v.x,v.y),p.copy(m)}function k(je){const Ht=an(je),wn=je.pageX-Ht.x,zn=je.pageY-Ht.y,Be=Math.sqrt(wn*wn+zn*zn);_.set(0,Be),S.set(0,Math.pow(_.y/g.y,i.zoomSpeed)),Q(S.y),g.copy(_);const pn=(je.pageX+Ht.x)*.5,dn=(je.pageY+Ht.y)*.5;ae(pn,dn)}function _t(je){i.enableZoom&&k(je),i.enablePan&&Ft(je)}function Ct(je){i.enableZoom&&k(je),i.enableRotate&&vt(je)}function J(je){i.enabled!==!1&&(M.length===0&&(i.domElement.setPointerCapture(je.pointerId),i.domElement.addEventListener("pointermove",ee),i.domElement.addEventListener("pointerup",Ue)),Zt(je),je.pointerType==="touch"?st(je):xt(je))}function ee(je){i.enabled!==!1&&(je.pointerType==="touch"?it(je):Bt(je))}function Ue(je){switch(nn(je),M.length){case 0:i.domElement.releasePointerCapture(je.pointerId),i.domElement.removeEventListener("pointermove",ee),i.domElement.removeEventListener("pointerup",Ue),i.dispatchEvent(pH),a=r.NONE;break;case 1:const Ht=M[0],wn=I[Ht];st({pointerId:Ht,pageX:wn.x,pageY:wn.y});break}}function xt(je){let Ht;switch(je.button){case 0:Ht=i.mouseButtons.LEFT;break;case 1:Ht=i.mouseButtons.MIDDLE;break;case 2:Ht=i.mouseButtons.RIGHT;break;default:Ht=-1}switch(Ht){case X1.DOLLY:if(i.enableZoom===!1)return;Ee(je),a=r.DOLLY;break;case X1.ROTATE:if(je.ctrlKey||je.metaKey||je.shiftKey){if(i.enablePan===!1)return;He(je),a=r.PAN}else{if(i.enableRotate===!1)return;he(je),a=r.ROTATE}break;case X1.PAN:if(je.ctrlKey||je.metaKey||je.shiftKey){if(i.enableRotate===!1)return;he(je),a=r.ROTATE}else{if(i.enablePan===!1)return;He(je),a=r.PAN}break;default:a=r.NONE}a!==r.NONE&&i.dispatchEvent(hT)}function Bt(je){switch(a){case r.ROTATE:if(i.enableRotate===!1)return;xe(je);break;case r.DOLLY:if(i.enableZoom===!1)return;Fe(je);break;case r.PAN:if(i.enablePan===!1)return;pt(je);break}}function Ce(je){i.enabled===!1||i.enableZoom===!1||a!==r.NONE||(je.preventDefault(),i.dispatchEvent(hT),Ot(We(je)),i.dispatchEvent(pH))}function We(je){const Ht=je.deltaMode,wn={clientX:je.clientX,clientY:je.clientY,deltaY:je.deltaY};switch(Ht){case 1:wn.deltaY*=16;break;case 2:wn.deltaY*=100;break}return je.ctrlKey&&!D&&(wn.deltaY*=10),wn}function $e(je){je.key==="Control"&&(D=!0,i.domElement.getRootNode().addEventListener("keyup",mt,{passive:!0,capture:!0}))}function mt(je){je.key==="Control"&&(D=!1,i.domElement.getRootNode().removeEventListener("keyup",mt,{passive:!0,capture:!0}))}function Yt(je){i.enabled===!1||i.enablePan===!1||bt(je)}function st(je){switch(cn(je),M.length){case 1:switch(i.touches.ONE){case Y1.ROTATE:if(i.enableRotate===!1)return;ht(je),a=r.TOUCH_ROTATE;break;case Y1.PAN:if(i.enablePan===!1)return;Kt(je),a=r.TOUCH_PAN;break;default:a=r.NONE}break;case 2:switch(i.touches.TWO){case Y1.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;Ae(je),a=r.TOUCH_DOLLY_PAN;break;case Y1.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Lt(je),a=r.TOUCH_DOLLY_ROTATE;break;default:a=r.NONE}break;default:a=r.NONE}a!==r.NONE&&i.dispatchEvent(hT)}function it(je){switch(cn(je),a){case r.TOUCH_ROTATE:if(i.enableRotate===!1)return;vt(je),i.update();break;case r.TOUCH_PAN:if(i.enablePan===!1)return;Ft(je),i.update();break;case r.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;_t(je),i.update();break;case r.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Ct(je),i.update();break;default:a=r.NONE}}function Vt(je){i.enabled!==!1&&je.preventDefault()}function Zt(je){M.push(je.pointerId)}function nn(je){delete I[je.pointerId];for(let Ht=0;Ht<M.length;Ht++)if(M[Ht]==je.pointerId){M.splice(Ht,1);return}}function cn(je){let Ht=I[je.pointerId];Ht===void 0&&(Ht=new on,I[je.pointerId]=Ht),Ht.set(je.pageX,je.pageY)}function an(je){const Ht=je.pointerId===M[0]?M[1]:M[0];return I[Ht]}i.domElement.addEventListener("contextmenu",Vt),i.domElement.addEventListener("pointerdown",J),i.domElement.addEventListener("pointercancel",Ue),i.domElement.addEventListener("wheel",Ce,{passive:!1}),i.domElement.getRootNode().addEventListener("keydown",$e,{passive:!0,capture:!0}),this.update()}}class nFe{constructor({sizes:e,scene:t,canvas:i},r={isOrthographic:!1}){this.sizes=e,this.scene=t,this.canvas=i,this.options=Object.assign({isOrthographic:!1},r),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 i=120;this.instance=new a7(-i*t,i*t,i,-i,1,1e4)}else this.instance=new ss(45,t,1,1e4);this.setControls()}setControls(){this.controls=new bee(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 iFe{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let i=0;for(let r=0;r<this._n&&r<32;r++){const a=t[r],o=e+a,s=Math.abs(e)<Math.abs(a)?e-(o-a):a-(o-e);s&&(t[i++]=s),e=o}return t[i]=e,this._n=i+1,this}valueOf(){const e=this._partials;let t=this._n,i,r,a,o=0;if(t>0){for(o=e[--t];t>0&&(i=o,r=e[--t],o=i+r,a=r-(o-i),!a););t>0&&(a<0&&e[t-1]<0||a>0&&e[t-1]>0)&&(r=a*2,i=o+r,r==i-o&&(o=i))}return o}}function*rFe(n){for(const e of n)yield*CD(e)}function xee(n){return Array.from(rFe(n))}var fa=1e-6,aFe=1e-12,Sr=Math.PI,Ks=Sr/2,mH=Sr/4,E0=Sr*2,wl=180/Sr,io=Sr/180,Oa=Math.abs,wee=Math.atan,r3=Math.atan2,ja=Math.cos,oFe=Math.exp,sFe=Math.log,$a=Math.sin,lFe=Math.sign||function(n){return n>0?1:n<0?-1:0},h7=Math.sqrt,uFe=Math.tan;function cFe(n){return n>1?0:n<-1?Sr:Math.acos(n)}function a3(n){return n>1?Ks:n<-1?-Ks:Math.asin(n)}function Rg(){}function H8(n,e){n&&yH.hasOwnProperty(n.type)&&yH[n.type](n,e)}var gH={Feature:function(n,e){H8(n.geometry,e)},FeatureCollection:function(n,e){for(var t=n.features,i=-1,r=t.length;++i<r;)H8(t[i].geometry,e)}},yH={Sphere:function(n,e){e.sphere()},Point:function(n,e){n=n.coordinates,e.point(n[0],n[1],n[2])},MultiPoint:function(n,e){for(var t=n.coordinates,i=-1,r=t.length;++i<r;)n=t[i],e.point(n[0],n[1],n[2])},LineString:function(n,e){nM(n.coordinates,e,0)},MultiLineString:function(n,e){for(var t=n.coordinates,i=-1,r=t.length;++i<r;)nM(t[i],e,0)},Polygon:function(n,e){_H(n.coordinates,e)},MultiPolygon:function(n,e){for(var t=n.coordinates,i=-1,r=t.length;++i<r;)_H(t[i],e)},GeometryCollection:function(n,e){for(var t=n.geometries,i=-1,r=t.length;++i<r;)H8(t[i],e)}};function nM(n,e,t){var i=-1,r=n.length-t,a;for(e.lineStart();++i<r;)a=n[i],e.point(a[0],a[1],a[2]);e.lineEnd()}function _H(n,e){var t=-1,i=n.length;for(e.polygonStart();++t<i;)nM(n[t],e,1);e.polygonEnd()}function dFe(n,e){n&&gH.hasOwnProperty(n.type)?gH[n.type](n,e):H8(n,e)}function iM(n){return[r3(n[1],n[0]),a3(n[2])]}function Rv(n){var e=n[0],t=n[1],i=ja(t);return[i*ja(e),i*$a(e),$a(t)]}function x4(n,e){return n[0]*e[0]+n[1]*e[1]+n[2]*e[2]}function W8(n,e){return[n[1]*e[2]-n[2]*e[1],n[2]*e[0]-n[0]*e[2],n[0]*e[1]-n[1]*e[0]]}function fT(n,e){n[0]+=e[0],n[1]+=e[1],n[2]+=e[2]}function w4(n,e){return[n[0]*e,n[1]*e,n[2]*e]}function rM(n){var e=h7(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=e,n[1]/=e,n[2]/=e}function aM(n,e){function t(i,r){return i=n(i,r),e(i[0],i[1])}return n.invert&&e.invert&&(t.invert=function(i,r){return i=e.invert(i,r),i&&n.invert(i[0],i[1])}),t}function oM(n,e){return Oa(n)>Sr&&(n-=Math.round(n/E0)*E0),[n,e]}oM.invert=oM;function Tee(n,e,t){return(n%=E0)?e||t?aM(bH(n),xH(e,t)):bH(n):e||t?xH(e,t):oM}function SH(n){return function(e,t){return e+=n,Oa(e)>Sr&&(e-=Math.round(e/E0)*E0),[e,t]}}function bH(n){var e=SH(n);return e.invert=SH(-n),e}function xH(n,e){var t=ja(n),i=$a(n),r=ja(e),a=$a(e);function o(s,l){var u=ja(l),c=ja(s)*u,d=$a(s)*u,h=$a(l),f=h*t+c*i;return[r3(d*r-f*a,c*t-h*i),a3(f*r+d*a)]}return o.invert=function(s,l){var u=ja(l),c=ja(s)*u,d=$a(s)*u,h=$a(l),f=h*r-d*a;return[r3(d*r+h*a,c*t+f*i),a3(f*t-c*i)]},o}function hFe(n){n=Tee(n[0]*io,n[1]*io,n.length>2?n[2]*io:0);function e(t){return t=n(t[0]*io,t[1]*io),t[0]*=wl,t[1]*=wl,t}return e.invert=function(t){return t=n.invert(t[0]*io,t[1]*io),t[0]*=wl,t[1]*=wl,t},e}function fFe(n,e,t,i,r,a){if(t){var o=ja(e),s=$a(e),l=i*t;r==null?(r=e+i*E0,a=e-l/2):(r=wH(o,r),a=wH(o,a),(i>0?r<a:r>a)&&(r+=i*E0));for(var u,c=r;i>0?c>a:c<a;c-=l)u=iM([o,-s*ja(c),-s*$a(c)]),n.point(u[0],u[1])}}function wH(n,e){e=Rv(e),e[0]-=n,rM(e);var t=cFe(-e[1]);return((-e[2]<0?-t:t)+E0-fa)%E0}function Aee(){var n=[],e;return{point:function(t,i,r){e.push([t,i,r])},lineStart:function(){n.push(e=[])},lineEnd:Rg,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var t=n;return n=[],e=null,t}}}function g5(n,e){return Oa(n[0]-e[0])<fa&&Oa(n[1]-e[1])<fa}function T4(n,e,t,i){this.x=n,this.z=e,this.o=t,this.e=i,this.v=!1,this.n=this.p=null}function Cee(n,e,t,i,r){var a=[],o=[],s,l;if(n.forEach(function(p){if(!((m=p.length-1)<=0)){var m,v=p[0],g=p[m],_;if(g5(v,g)){if(!v[2]&&!g[2]){for(r.lineStart(),s=0;s<m;++s)r.point((v=p[s])[0],v[1]);r.lineEnd();return}g[0]+=2*fa}a.push(_=new T4(v,p,null,!0)),o.push(_.o=new T4(v,null,_,!1)),a.push(_=new T4(g,p,null,!1)),o.push(_.o=new T4(g,null,_,!0))}}),!!a.length){for(o.sort(e),TH(a),TH(o),s=0,l=o.length;s<l;++s)o[s].e=t=!t;for(var u=a[0],c,d;;){for(var h=u,f=!0;h.v;)if((h=h.n)===u)return;c=h.z,r.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(s=0,l=c.length;s<l;++s)r.point((d=c[s])[0],d[1]);else i(h.x,h.n.x,1,r);h=h.n}else{if(f)for(c=h.p.z,s=c.length-1;s>=0;--s)r.point((d=c[s])[0],d[1]);else i(h.x,h.p.x,-1,r);h=h.p}h=h.o,c=h.z,f=!f}while(!h.v);r.lineEnd()}}}function TH(n){if(e=n.length){for(var e,t=0,i=n[0],r;++t<e;)i.n=r=n[t],r.p=i,i=r;i.n=r=n[0],r.p=i}}function pT(n){return Oa(n[0])<=Sr?n[0]:lFe(n[0])*((Oa(n[0])+Sr)%E0-Sr)}function pFe(n,e){var t=pT(e),i=e[1],r=$a(i),a=[$a(t),-ja(t),0],o=0,s=0,l=new iFe;r===1?i=Ks+fa:r===-1&&(i=-Ks-fa);for(var u=0,c=n.length;u<c;++u)if(h=(d=n[u]).length)for(var d,h,f=d[h-1],p=pT(f),m=f[1]/2+mH,v=$a(m),g=ja(m),_=0;_<h;++_,p=x,v=C,g=M,f=S){var S=d[_],x=pT(S),A=S[1]/2+mH,C=$a(A),M=ja(A),I=x-p,D=I>=0?1:-1,E=D*I,P=E>Sr,F=v*C;if(l.add(r3(F*D*$a(E),g*M+F*ja(E))),o+=P?I+D*E0:I,P^p>=t^x>=t){var V=W8(Rv(f),Rv(S));rM(V);var G=W8(a,V);rM(G);var W=(P^I>=0?-1:1)*a3(G[2]);(i>W||i===W&&(V[0]||V[1]))&&(s+=P^I>=0?1:-1)}}return(o<-fa||o<fa&&l<-aFe)^s&1}function Mee(n,e,t,i){return function(r){var a=e(r),o=Aee(),s=e(o),l=!1,u,c,d,h={point:f,lineStart:m,lineEnd:v,polygonStart:function(){h.point=g,h.lineStart=_,h.lineEnd=S,c=[],u=[]},polygonEnd:function(){h.point=f,h.lineStart=m,h.lineEnd=v,c=xee(c);var x=pFe(u,i);c.length?(l||(r.polygonStart(),l=!0),Cee(c,mFe,x,t,r)):x&&(l||(r.polygonStart(),l=!0),r.lineStart(),t(null,null,1,r),r.lineEnd()),l&&(r.polygonEnd(),l=!1),c=u=null},sphere:function(){r.polygonStart(),r.lineStart(),t(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function f(x,A){n(x,A)&&r.point(x,A)}function p(x,A){a.point(x,A)}function m(){h.point=p,a.lineStart()}function v(){h.point=f,a.lineEnd()}function g(x,A){d.push([x,A]),s.point(x,A)}function _(){s.lineStart(),d=[]}function S(){g(d[0][0],d[0][1]),s.lineEnd();var x=s.clean(),A=o.result(),C,M=A.length,I,D,E;if(d.pop(),u.push(d),d=null,!!M){if(x&1){if(D=A[0],(I=D.length-1)>0){for(l||(r.polygonStart(),l=!0),r.lineStart(),C=0;C<I;++C)r.point((E=D[C])[0],E[1]);r.lineEnd()}return}M>1&&x&2&&A.push(A.pop().concat(A.shift())),c.push(A.filter(vFe))}}return h}}function vFe(n){return n.length>1}function mFe(n,e){return((n=n.x)[0]<0?n[1]-Ks-fa:Ks-n[1])-((e=e.x)[0]<0?e[1]-Ks-fa:Ks-e[1])}const AH=Mee(function(){return!0},gFe,_Fe,[-Sr,-Ks]);function gFe(n){var e=NaN,t=NaN,i=NaN,r;return{lineStart:function(){n.lineStart(),r=1},point:function(a,o){var s=a>0?Sr:-Sr,l=Oa(a-e);Oa(l-Sr)<fa?(n.point(e,t=(t+o)/2>0?Ks:-Ks),n.point(i,t),n.lineEnd(),n.lineStart(),n.point(s,t),n.point(a,t),r=0):i!==s&&l>=Sr&&(Oa(e-i)<fa&&(e-=i*fa),Oa(a-s)<fa&&(a-=s*fa),t=yFe(e,t,a,o),n.point(i,t),n.lineEnd(),n.lineStart(),n.point(s,t),r=0),n.point(e=a,t=o),i=s},lineEnd:function(){n.lineEnd(),e=t=NaN},clean:function(){return 2-r}}}function yFe(n,e,t,i){var r,a,o=$a(n-t);return Oa(o)>fa?wee(($a(e)*(a=ja(i))*$a(t)-$a(i)*(r=ja(e))*$a(n))/(r*a*o)):(e+i)/2}function _Fe(n,e,t,i){var r;if(n==null)r=t*Ks,i.point(-Sr,r),i.point(0,r),i.point(Sr,r),i.point(Sr,0),i.point(Sr,-r),i.point(0,-r),i.point(-Sr,-r),i.point(-Sr,0),i.point(-Sr,r);else if(Oa(n[0]-e[0])>fa){var a=n[0]<e[0]?Sr:-Sr;r=t*a/2,i.point(-a,r),i.point(0,r),i.point(a,r)}else i.point(e[0],e[1])}function SFe(n){var e=ja(n),t=2*io,i=e>0,r=Oa(e)>fa;function a(c,d,h,f){fFe(f,n,t,h,c,d)}function o(c,d){return ja(c)*ja(d)>e}function s(c){var d,h,f,p,m;return{lineStart:function(){p=f=!1,m=1},point:function(v,g){var _=[v,g],S,x=o(v,g),A=i?x?0:u(v,g):x?u(v+(v<0?Sr:-Sr),g):0;if(!d&&(p=f=x)&&c.lineStart(),x!==f&&(S=l(d,_),(!S||g5(d,S)||g5(_,S))&&(_[2]=1)),x!==f)m=0,x?(c.lineStart(),S=l(_,d),c.point(S[0],S[1])):(S=l(d,_),c.point(S[0],S[1],2),c.lineEnd()),d=S;else if(r&&d&&i^x){var C;!(A&h)&&(C=l(_,d,!0))&&(m=0,i?(c.lineStart(),c.point(C[0][0],C[0][1]),c.point(C[1][0],C[1][1]),c.lineEnd()):(c.point(C[1][0],C[1][1]),c.lineEnd(),c.lineStart(),c.point(C[0][0],C[0][1],3)))}x&&(!d||!g5(d,_))&&c.point(_[0],_[1]),d=_,f=x,h=A},lineEnd:function(){f&&c.lineEnd(),d=null},clean:function(){return m|(p&&f)<<1}}}function l(c,d,h){var f=Rv(c),p=Rv(d),m=[1,0,0],v=W8(f,p),g=x4(v,v),_=v[0],S=g-_*_;if(!S)return!h&&c;var x=e*g/S,A=-e*_/S,C=W8(m,v),M=w4(m,x),I=w4(v,A);fT(M,I);var D=C,E=x4(M,D),P=x4(D,D),F=E*E-P*(x4(M,M)-1);if(!(F<0)){var V=h7(F),G=w4(D,(-E-V)/P);if(fT(G,M),G=iM(G),!h)return G;var W=c[0],Y=d[0],Q=c[1],K=d[1],ae;Y<W&&(ae=W,W=Y,Y=ae);var ie=Y-W,he=Oa(ie-Sr)<fa,Ee=he||ie<fa;if(!he&&K<Q&&(ae=Q,Q=K,K=ae),Ee?he?Q+K>0^G[1]<(Oa(G[0]-W)<fa?Q:K):Q<=G[1]&&G[1]<=K:ie>Sr^(W<=G[0]&&G[0]<=Y)){var He=w4(D,(-E+V)/P);return fT(He,M),[G,iM(He)]}}}function u(c,d){var h=i?n:Sr-n,f=0;return c<-h?f|=1:c>h&&(f|=2),d<-h?f|=4:d>h&&(f|=8),f}return Mee(o,s,a,i?[0,-n]:[-Sr,n-Sr])}function bFe(n,e,t,i,r,a){var o=n[0],s=n[1],l=e[0],u=e[1],c=0,d=1,h=l-o,f=u-s,p;if(p=t-o,!(!h&&p>0)){if(p/=h,h<0){if(p<c)return;p<d&&(d=p)}else if(h>0){if(p>d)return;p>c&&(c=p)}if(p=r-o,!(!h&&p<0)){if(p/=h,h<0){if(p>d)return;p>c&&(c=p)}else if(h>0){if(p<c)return;p<d&&(d=p)}if(p=i-s,!(!f&&p>0)){if(p/=f,f<0){if(p<c)return;p<d&&(d=p)}else if(f>0){if(p>d)return;p>c&&(c=p)}if(p=a-s,!(!f&&p<0)){if(p/=f,f<0){if(p>d)return;p>c&&(c=p)}else if(f>0){if(p<c)return;p<d&&(d=p)}return c>0&&(n[0]=o+c*h,n[1]=s+c*f),d<1&&(e[0]=o+d*h,e[1]=s+d*f),!0}}}}}var Lg=1e9,A4=-Lg;function xFe(n,e,t,i){function r(u,c){return n<=u&&u<=t&&e<=c&&c<=i}function a(u,c,d,h){var f=0,p=0;if(u==null||(f=o(u,d))!==(p=o(c,d))||l(u,c)<0^d>0)do h.point(f===0||f===3?n:t,f>1?i:e);while((f=(f+d+4)%4)!==p);else h.point(c[0],c[1])}function o(u,c){return Oa(u[0]-n)<fa?c>0?0:3:Oa(u[0]-t)<fa?c>0?2:1:Oa(u[1]-e)<fa?c>0?1:0:c>0?3:2}function s(u,c){return l(u.x,c.x)}function l(u,c){var d=o(u,1),h=o(c,1);return d!==h?d-h:d===0?c[1]-u[1]:d===1?u[0]-c[0]:d===2?u[1]-c[1]:c[0]-u[0]}return function(u){var c=u,d=Aee(),h,f,p,m,v,g,_,S,x,A,C,M={point:I,lineStart:F,lineEnd:V,polygonStart:E,polygonEnd:P};function I(W,Y){r(W,Y)&&c.point(W,Y)}function D(){for(var W=0,Y=0,Q=f.length;Y<Q;++Y)for(var K=f[Y],ae=1,ie=K.length,he=K[0],Ee,He,xe=he[0],Fe=he[1];ae<ie;++ae)Ee=xe,He=Fe,he=K[ae],xe=he[0],Fe=he[1],He<=i?Fe>i&&(xe-Ee)*(i-He)>(Fe-He)*(n-Ee)&&++W:Fe<=i&&(xe-Ee)*(i-He)<(Fe-He)*(n-Ee)&&--W;return W}function E(){c=d,h=[],f=[],C=!0}function P(){var W=D(),Y=C&&W,Q=(h=xee(h)).length;(Y||Q)&&(u.polygonStart(),Y&&(u.lineStart(),a(null,null,1,u),u.lineEnd()),Q&&Cee(h,s,W,a,u),u.polygonEnd()),c=u,h=f=p=null}function F(){M.point=G,f&&f.push(p=[]),A=!0,x=!1,_=S=NaN}function V(){h&&(G(m,v),g&&x&&d.rejoin(),h.push(d.result())),M.point=I,x&&c.lineEnd()}function G(W,Y){var Q=r(W,Y);if(f&&p.push([W,Y]),A)m=W,v=Y,g=Q,A=!1,Q&&(c.lineStart(),c.point(W,Y));else if(Q&&x)c.point(W,Y);else{var K=[_=Math.max(A4,Math.min(Lg,_)),S=Math.max(A4,Math.min(Lg,S))],ae=[W=Math.max(A4,Math.min(Lg,W)),Y=Math.max(A4,Math.min(Lg,Y))];bFe(K,ae,n,e,t,i)?(x||(c.lineStart(),c.point(K[0],K[1])),c.point(ae[0],ae[1]),Q||c.lineEnd(),C=!1):Q&&(c.lineStart(),c.point(W,Y),C=!1)}_=W,S=Y,x=Q}return M}}const CH=n=>n;var Lv=1/0,j8=Lv,o3=-Lv,$8=o3,wFe={point:TFe,lineStart:Rg,lineEnd:Rg,polygonStart:Rg,polygonEnd:Rg,result:function(){var n=[[Lv,j8],[o3,$8]];return o3=$8=-(j8=Lv=1/0),n}};function TFe(n,e){n<Lv&&(Lv=n),n>o3&&(o3=n),e<j8&&(j8=e),e>$8&&($8=e)}const MH=wFe;function LR(n){return function(e){var t=new sM;for(var i in n)t[i]=n[i];return t.stream=e,t}}function sM(){}sM.prototype={constructor:sM,point:function(n,e){this.stream.point(n,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 IR(n,e,t){var i=n.clipExtent&&n.clipExtent();return n.scale(150).translate([0,0]),i!=null&&n.clipExtent(null),dFe(t,n.stream(MH)),e(MH.result()),i!=null&&n.clipExtent(i),n}function Eee(n,e,t){return IR(n,function(i){var r=e[1][0]-e[0][0],a=e[1][1]-e[0][1],o=Math.min(r/(i[1][0]-i[0][0]),a/(i[1][1]-i[0][1])),s=+e[0][0]+(r-o*(i[1][0]+i[0][0]))/2,l=+e[0][1]+(a-o*(i[1][1]+i[0][1]))/2;n.scale(150*o).translate([s,l])},t)}function AFe(n,e,t){return Eee(n,[[0,0],e],t)}function CFe(n,e,t){return IR(n,function(i){var r=+e,a=r/(i[1][0]-i[0][0]),o=(r-a*(i[1][0]+i[0][0]))/2,s=-a*i[0][1];n.scale(150*a).translate([o,s])},t)}function MFe(n,e,t){return IR(n,function(i){var r=+e,a=r/(i[1][1]-i[0][1]),o=-a*i[0][0],s=(r-a*(i[1][1]+i[0][1]))/2;n.scale(150*a).translate([o,s])},t)}var EH=16,EFe=ja(30*io);function PH(n,e){return+e?RFe(n,e):PFe(n)}function PFe(n){return LR({point:function(e,t){e=n(e,t),this.stream.point(e[0],e[1])}})}function RFe(n,e){function t(i,r,a,o,s,l,u,c,d,h,f,p,m,v){var g=u-i,_=c-r,S=g*g+_*_;if(S>4*e&&m--){var x=o+h,A=s+f,C=l+p,M=h7(x*x+A*A+C*C),I=a3(C/=M),D=Oa(Oa(C)-1)<fa||Oa(a-d)<fa?(a+d)/2:r3(A,x),E=n(D,I),P=E[0],F=E[1],V=P-i,G=F-r,W=_*V-g*G;(W*W/S>e||Oa((g*V+_*G)/S-.5)>.3||o*h+s*f+l*p<EFe)&&(t(i,r,a,o,s,l,P,F,D,x/=M,A/=M,C,m,v),v.point(P,F),t(P,F,D,x,A,C,u,c,d,h,f,p,m,v))}}return function(i){var r,a,o,s,l,u,c,d,h,f,p,m,v={point:g,lineStart:_,lineEnd:x,polygonStart:function(){i.polygonStart(),v.lineStart=A},polygonEnd:function(){i.polygonEnd(),v.lineStart=_}};function g(I,D){I=n(I,D),i.point(I[0],I[1])}function _(){d=NaN,v.point=S,i.lineStart()}function S(I,D){var E=Rv([I,D]),P=n(I,D);t(d,h,c,f,p,m,d=P[0],h=P[1],c=I,f=E[0],p=E[1],m=E[2],EH,i),i.point(d,h)}function x(){v.point=g,i.lineEnd()}function A(){_(),v.point=C,v.lineEnd=M}function C(I,D){S(r=I,D),a=d,o=h,s=f,l=p,u=m,v.point=S}function M(){t(d,h,c,f,p,m,a,o,r,s,l,u,EH,i),v.lineEnd=x,x()}return v}}var LFe=LR({point:function(n,e){this.stream.point(n*io,e*io)}});function IFe(n){return LR({point:function(e,t){var i=n(e,t);return this.stream.point(i[0],i[1])}})}function DFe(n,e,t,i,r){function a(o,s){return o*=i,s*=r,[e+n*o,t-n*s]}return a.invert=function(o,s){return[(o-e)/n*i,(t-s)/n*r]},a}function RH(n,e,t,i,r,a){if(!a)return DFe(n,e,t,i,r);var o=ja(a),s=$a(a),l=o*n,u=s*n,c=o/n,d=s/n,h=(s*t-o*e)/n,f=(s*e+o*t)/n;function p(m,v){return m*=i,v*=r,[l*m-u*v+e,t-u*m-l*v]}return p.invert=function(m,v){return[i*(c*m-d*v+h),r*(f-d*m-c*v)]},p}function NFe(n){return kFe(function(){return n})()}function kFe(n){var e,t=150,i=480,r=250,a=0,o=0,s=0,l=0,u=0,c,d=0,h=1,f=1,p=null,m=AH,v=null,g,_,S,x=CH,A=.5,C,M,I,D,E;function P(W){return I(W[0]*io,W[1]*io)}function F(W){return W=I.invert(W[0],W[1]),W&&[W[0]*wl,W[1]*wl]}P.stream=function(W){return D&&E===W?D:D=LFe(IFe(c)(m(C(x(E=W)))))},P.preclip=function(W){return arguments.length?(m=W,p=void 0,G()):m},P.postclip=function(W){return arguments.length?(x=W,v=g=_=S=null,G()):x},P.clipAngle=function(W){return arguments.length?(m=+W?SFe(p=W*io):(p=null,AH),G()):p*wl},P.clipExtent=function(W){return arguments.length?(x=W==null?(v=g=_=S=null,CH):xFe(v=+W[0][0],g=+W[0][1],_=+W[1][0],S=+W[1][1]),G()):v==null?null:[[v,g],[_,S]]},P.scale=function(W){return arguments.length?(t=+W,V()):t},P.translate=function(W){return arguments.length?(i=+W[0],r=+W[1],V()):[i,r]},P.center=function(W){return arguments.length?(a=W[0]%360*io,o=W[1]%360*io,V()):[a*wl,o*wl]},P.rotate=function(W){return arguments.length?(s=W[0]%360*io,l=W[1]%360*io,u=W.length>2?W[2]%360*io:0,V()):[s*wl,l*wl,u*wl]},P.angle=function(W){return arguments.length?(d=W%360*io,V()):d*wl},P.reflectX=function(W){return arguments.length?(h=W?-1:1,V()):h<0},P.reflectY=function(W){return arguments.length?(f=W?-1:1,V()):f<0},P.precision=function(W){return arguments.length?(C=PH(M,A=W*W),G()):h7(A)},P.fitExtent=function(W,Y){return Eee(P,W,Y)},P.fitSize=function(W,Y){return AFe(P,W,Y)},P.fitWidth=function(W,Y){return CFe(P,W,Y)},P.fitHeight=function(W,Y){return MFe(P,W,Y)};function V(){var W=RH(t,0,0,h,f,d).apply(null,e(a,o)),Y=RH(t,i-W[0],r-W[1],h,f,d);return c=Tee(s,l,u),M=aM(e,Y),I=aM(c,M),C=PH(M,A),G()}function G(){return D=E=null,P}return function(){return e=n.apply(this,arguments),P.invert=e.invert&&F,V()}}function DR(n,e){return[n,sFe(uFe((Ks+e)/2))]}DR.invert=function(n,e){return[n,2*wee(oFe(e))-Ks]};function Ic(){return FFe(DR).scale(961/E0)}function FFe(n){var e=NFe(n),t=e.center,i=e.scale,r=e.translate,a=e.clipExtent,o=null,s,l,u;e.scale=function(d){return arguments.length?(i(d),c()):i()},e.translate=function(d){return arguments.length?(r(d),c()):r()},e.center=function(d){return arguments.length?(t(d),c()):t()},e.clipExtent=function(d){return arguments.length?(d==null?o=s=l=u=null:(o=+d[0][0],s=+d[0][1],l=+d[1][0],u=+d[1][1]),c()):o==null?null:[[o,s],[l,u]]};function c(){var d=Sr*i(),h=e(hFe(e.rotate()).invert([0,0]));return a(o==null?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:n===DR?[[Math.max(h[0]-d,o),s],[Math.min(h[0]+d,l),u]]:[[o,Math.max(h[1]-d,s)],[l,Math.min(h[1]+d,u)]])}return c()}class OFe extends d7{constructor(e,t={}){super();let i={isOrthographic:!1};this.config=Object.assign({},i,t),this.canvas=e,this.scene=new ZQ,this.sizes=new cke(this),this.time=new dke(this),this.camera=new nFe(this,{isOrthographic:this.config.isOrthographic}),this.renderer=new eFe(this),this.sizes.on("resize",()=>{this.resize()}),this.time.on("tick",r=>{this.update(r)})}setAxesHelper(e=250){if(!e)return!1;let t=new fee(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(i=>{if(i instanceof fr){i.geometry.dispose();for(const r in i.material){const a=i.material[r];a&&typeof a.dispose=="function"&&a.dispose()}}}),(t=(e=this.canvas)==null?void 0:e.parentNode)==null||t.removeChild(this.canvas)}}class BFe{constructor({material:e,time:t,size:i,diffuseColor:r,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:i,diffuseColor:r,diffuseSpeed:a,diffuseWidth:o}),this.init()}init(){let{material:e,size:t,diffuseColor:i,diffuseSpeed:r,diffuseWidth:a}=this.options,o=t/r;e.onBeforeCompile=s=>{this.pointShader=s,this.callback(s,o),s.uniforms=tn(wt({},s.uniforms),{uTime:{value:0},uSpeed:{value:r},uWidth:{value:a},uColor:{value:new Jn(i)}}),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);
}
`)}}}class zFe{constructor({scene:e,time:t},i){this.scene=e,this.time=t,this.instance=null;let r={position:new Le(0,0,0),gridSize:100,gridDivision:20,gridColor:2635578,shapeSize:1,shapeColor:9345950,pointSize:.2,pointColor:2635578,pointLayout:{row:200,col:200},pointBlending:Pp};this.options=Object.assign({},r,i),this.init()}init(){let e=new Nr;e.name="Grid";let t=this.createGridHelp(),i=this.createShapes(),r=this.createPoint();e.add(t,i,r),e.position.copy(this.options.position),this.instance=e,this.scene.add(e)}createShapes(){let{gridSize:e,gridDivision:t,shapeSize:i,shapeColor:r}=this.options,a=e/t,o=e/2,s=new Mr({color:r,side:aa}),l=[];for(let d=0;d<t+1;d++)for(let h=0;h<t+1;h++){let f=this.createPlus(i);f.translate(-o+d*a,-o+h*a,0),l.push(f)}let u=pee(l),c=new fr(u,s);return c.renderOrder=-1,c.rotateX(-Math.PI/2),c.position.y+=.01,c}createGridHelp(){let{gridSize:e,gridDivision:t,gridColor:i}=this.options;return new lke(e,t,i,i)}createPoint(){let{gridSize:e,pointSize:t,pointColor:i,pointBlending:r,pointLayout:a}=this.options;const o=a.row,s=a.col,l=new Float32Array(o*s*3);for(let h=0;h<o;h++)for(let f=0;f<s;f++){let p=h/(o-1)*e-e/2,m=0,v=f/(s-1)*e-e/2,g=(h*s+f)*3;l[g]=p,l[g+1]=m,l[g+2]=v}var u=new Qr;u.setAttribute("position",new La(l,3));let c=new k3({size:t,sizeAttenuation:!0,color:i,blending:r});return new SR(u,c)}setPointMode(){}createPlus(e=50){let t=e/6/3,i=e/3,r=[new on(-i,-t),new on(-t,-t),new on(-t,-i),new on(t,-i),new on(t,-i),new on(t,-t),new on(i,-t),new on(i,t),new on(t,t),new on(t,i),new on(-t,i),new on(-t,t),new on(-i,t)],a=new ju(r);return new F3(a,24)}}const LH=new Le,GFe=new ru,IH=new Le;class Pee extends la{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 UFe extends Pee{constructor(e){super(e),this.isCSS3DSprite=!0,this.rotation2D=0}copy(e,t){return super.copy(e,t),this.rotation2D=e.rotation2D,this}}const _u=new Bi,VFe=new Bi;class HFe{constructor(e={}){const t=this;let i,r,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:i,height:r}},this.render=function(m,v){const g=v.projectionMatrix.elements[5]*o;v.view&&v.view.enabled?(u.style.transform=`translate( ${-v.view.offsetX*(i/v.view.width)}px, ${-v.view.offsetY*(r/v.view.height)}px )`,u.style.transform+=`scale( ${v.view.fullWidth/v.view.width}, ${v.view.fullHeight/v.view.height} )`):u.style.transform="",m.matrixWorldAutoUpdate===!0&&m.updateMatrixWorld(),v.parent===null&&v.matrixWorldAutoUpdate===!0&&v.updateMatrixWorld();let _,S;v.isOrthographicCamera&&(_=-(v.right+v.left)/2,S=(v.top+v.bottom)/2);const x=v.view&&v.view.enabled?v.view.height/v.view.fullHeight:1,A=v.isOrthographicCamera?`scale( ${x} )scale(`+g+")translate("+d(_)+"px,"+d(S)+"px)"+h(v.matrixWorldInverse):`scale( ${x} )translateZ(`+g+"px)"+h(v.matrixWorldInverse),M=(v.isPerspectiveCamera?"perspective("+g+"px) ":"")+A+"translate("+a+"px,"+o+"px)";s.camera.style!==M&&(c.style.transform=M,s.camera.style=M),p(m,m,v)},this.setSize=function(m,v){i=m,r=v,a=i/2,o=r/2,l.style.width=m+"px",l.style.height=v+"px",u.style.width=m+"px",u.style.height=v+"px",c.style.width=m+"px",c.style.height=v+"px"};function d(m){return Math.abs(m)<1e-10?0:m}function h(m){const v=m.elements;return"matrix3d("+d(v[0])+","+d(-v[1])+","+d(v[2])+","+d(v[3])+","+d(v[4])+","+d(-v[5])+","+d(v[6])+","+d(v[7])+","+d(v[8])+","+d(-v[9])+","+d(v[10])+","+d(v[11])+","+d(v[12])+","+d(-v[13])+","+d(v[14])+","+d(v[15])+")"}function f(m){const v=m.elements;return"translate(-50%,-50%)"+("matrix3d("+d(v[0])+","+d(v[1])+","+d(v[2])+","+d(v[3])+","+d(-v[4])+","+d(-v[5])+","+d(-v[6])+","+d(-v[7])+","+d(v[8])+","+d(v[9])+","+d(v[10])+","+d(v[11])+","+d(v[12])+","+d(v[13])+","+d(v[14])+","+d(v[15])+")")}function p(m,v,g,_){if(m.isCSS3DObject){const S=m.visible===!0&&m.layers.test(g.layers)===!0;if(m.element.style.display=S===!0?"":"none",S===!0){m.onBeforeRender(t,v,g);let x;m.isCSS3DSprite?(_u.copy(g.matrixWorldInverse),_u.transpose(),m.rotation2D!==0&&_u.multiply(VFe.makeRotationZ(m.rotation2D)),m.matrixWorld.decompose(LH,GFe,IH),_u.setPosition(LH),_u.scale(IH),_u.elements[3]=0,_u.elements[7]=0,_u.elements[11]=0,_u.elements[15]=1,x=f(_u)):x=f(m.matrixWorld);const A=m.element,C=s.objects.get(m);if(C===void 0||C.style!==x){A.style.transform=x;const M={style:x};s.objects.set(m,M)}A.parentNode!==c&&c.appendChild(A),m.onAfterRender(t,v,g)}}for(let S=0,x=m.children.length;S<x;S++)p(m.children[S],v,g)}}}class WFe{constructor({scene:e,camera:t,time:i,sizes:r,canvas:a}){this.scene=e,this.camera=t,this.time=i,this.sizes=r,this.canvas=a,this.parent=null;let{width:o,height:s}=this.sizes,l=new HFe;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-"+Qke(),this.canvas.parentNode.appendChild(l.domElement),this.time.on("tick",()=>{this.update()}),this.sizes.on("resize",()=>{this.resize()})}create(e="",t="",i=!1){let r=document.createElement("div");r.innerHTML=e,r.className=t,r.style.visibility="hidden",r.style.position="absolute",t||(r.style.padding="10px",r.style.color="#fff",r.style.fontSize="12px",r.style.textAlign="center",r.style.background="rgba(0,0,0,0.6)",r.style.borderRadius="4px");let a=null;return i?a=new UFe(r):a=new Pee(r),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,i="x",r=Math.PI/2,a="none"){e.element.style.pointerEvents=a,e.scale.set(t,t,t),e.rotation[i]=r}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 DH{constructor({time:e},t){this.time=e,this.options=Object.assign({},{width:10,scale:1,position:new Le(0,0,0),needRotate:!1,rotateSpeed:.001,material:new Mr({transparent:!0,opacity:1,depthTest:!0})},t);let i=new Al(this.options.width,this.options.width),r=new fr(i,this.options.material);r.position.copy(this.options.position),r.scale.set(this.options.scale,this.options.scale,this.options.scale),this.instance=r}setParent(e){e.add(this.instance),this.time.on("tick",()=>{this.update()})}update(){this.options.needRotate&&(this.instance.rotation.z+=this.options.rotateSpeed)}}class q8{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 k3({map:q8.createTexture(),size:20,color:16777215,transparent:!0,opacity:1,depthTest:!1,vertexColors:!0,blending:Mo,sizeAttenuation:!0})},t),this.create()}create(){const{range:e,speed:t,dir:i,material:r,num:a,renderOrder:o}=this.config,s=[],l=[],u=[];for(let d=0;d<a;d++){s.push(Math.random()*e-e/2,Math.random()*e-e/2,Math.random()*e-e/2);let h=i==="up"?1:-1;u.push(Math.random()*h,(.1+Math.random())*h,.1+Math.random()*h);const f=r.color.clone();let p={};f.getHSL(p),f.setHSL(p.h,p.s,p.l*Math.random()),l.push(f.r,f.g,f.b)}const c=new Qr;c.setAttribute("position",new La(new Float32Array(s),3)),c.setAttribute("velocities",new La(new Float32Array(u),3)),c.setAttribute("color",new La(new Float32Array(l),3)),this.instance=new SR(c,r),this.instance.renderOrder=o}static createTexture(){let e=document.createElement("canvas");e.width=1024,e.height=1024;let t=e.getContext("2d"),i=t.createRadialGradient(512,512,0,512,512,512);return i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=i,t.fillRect(0,0,1024,1024),new bR(e)}update(e,t){if(!this.instance)return!1;const{range:i,speed:r,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 d=s.getX(c);s.getY(c);let h=s.getZ(c),f=l.getX(c),p=l.getY(c);l.getZ(c),d+=Math.sin(f*t)*e,h+=r*o,h>i/2&&o===1&&(h=-i/2),h<-i/2&&o==-1&&(h=i/2),s.setX(c,d),s.setZ(c,h),l.setX(c,f),l.setY(c,p)}s.needsUpdate=!0,l.needsUpdate=!0}setParent(e){e.add(this.instance),this.time.on("tick",(t,i)=>{this.enable&&this.update(t,i)})}}class C4{constructor({},e={}){this.mapGroup=new Nr,this.coordinates=[],this.config=Object.assign({position:new Le(0,0,0),geoProjectionCenter:new on(0,0),geoProjectionScale:120,data:"",renderOrder:1,merge:!1,material:new Mr({color:1582651,transparent:!0,opacity:1})},e),this.mapGroup.position.copy(this.config.position);let t=RR(this.config.data);this.create(t)}geoProjection(e){return Ic().center(this.config.geoProjectionCenter).scale(this.config.geoProjectionScale).translate([0,0])(e)}create(e){let{merge:t}=this.config,i=[];if(e.features.forEach(r=>{const a=new la;let{name:o,center:s=[],centroid:l=[]}=r.properties;this.coordinates.push({name:o,center:s,centroid:l}),a.userData.name=o,r.geometry.coordinates.forEach(u=>{u.forEach(c=>{const d=new ju;for(let f=0;f<c.length;f++){if(!c[f][0]||!c[f][1])return!1;const[p,m]=this.geoProjection(c[f]);f===0&&d.moveTo(p,-m),d.lineTo(p,-m)}const h=new F3(d);if(t)i.push(h);else{const f=new fr(h,this.config.material);f.renderOrder=this.config.renderOrder,f.userData.name=o,a.add(f)}})}),t||this.mapGroup.add(a)}),t){let r=pee(i);const a=new fr(r,this.config.material);a.renderOrder=this.config.renderOrder,this.mapGroup.add(a)}}getCoordinates(){return this.coordinates}setParent(e){e.add(this.mapGroup)}}class NH{constructor({assets:e,time:t},i={}){this.mapGroup=new Nr,this.assets=e,this.time=t,this.coordinates=[],this.config=Object.assign({position:new Le(0,0,0),geoProjectionCenter:new on(0,0),geoProjectionScale:120,data:"",renderOrder:1,topFaceMaterial:new Mr({color:1582651,transparent:!0,opacity:1}),sideMaterial:new Mr({color:464171,transparent:!0,opacity:1}),depth:.1},i),this.mapGroup.position.copy(this.config.position);let r=RR(this.config.data);this.create(r)}geoProjection(e){return Ic().center(this.config.geoProjectionCenter).scale(this.config.geoProjectionScale).translate([0,0])(e)}create(e){e.features.forEach(t=>{var u,c,d;const i=new la;let{name:r,center:a=[],centroid:o=[]}=t.properties;this.coordinates.push({name:r,center:a,centroid:o});const s={depth:this.config.depth,bevelEnabled:(u=this.config.bevelEnabled)!=null?u:!0,bevelSegments:(c=this.config.bevelSegments)!=null?c:1,bevelThickness:(d=this.config.bevelThickness)!=null?d:.1};let l=[this.config.topFaceMaterial,this.config.sideMaterial];t.geometry.coordinates.forEach(h=>{h.forEach((f,p)=>{const m=new ju;for(let _=0;_<f.length;_++){if(!f[_][0]||!f[_][1])return!1;const[S,x]=this.geoProjection(f[_]);_===0&&m.moveTo(S,-x),m.lineTo(S,-x)}const v=new l7(m,s),g=new fr(v,l);i.add(g)})}),this.mapGroup.add(i)})}getCoordinates(){return this.coordinates}setParent(e){e.add(this.mapGroup)}}const kH=new I0,M4=new Le;class Ree extends XNe{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],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(i),this.setAttribute("position",new ga(e,3)),this.setAttribute("uv",new ga(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,i=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),i.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 i=new ZC(t,6,1);return this.setAttribute("instanceStart",new J0(i,3,0)),this.setAttribute("instanceEnd",new J0(i,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const i=new ZC(t,6,1);return this.setAttribute("instanceColorStart",new J0(i,3,0)),this.setAttribute("instanceColorEnd",new J0(i,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 LNe(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new I0);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),kH.setFromBufferAttribute(t),this.boundingBox.union(kH))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new D0),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const i=this.boundingSphere.center;this.boundingBox.getCenter(i);let r=0;for(let a=0,o=e.count;a<o;a++)M4.fromBufferAttribute(e,a),r=Math.max(r,i.distanceToSquared(M4)),M4.fromBufferAttribute(t,a),r=Math.max(r,i.distanceToSquared(M4));this.boundingSphere.radius=Math.sqrt(r),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)}}Pn.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new on(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};qs.line={uniforms:hR.merge([Pn.common,Pn.fog,Pn.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 Lee extends Jc{constructor(e){super({type:"LineMaterial",uniforms:hR.clone(qs.line.uniforms),vertexShader:qs.line.vertexShader,fragmentShader:qs.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 FH=new Le,OH=new Le,ko=new Er,Fo=new Er,Su=new Er,vT=new Le,mT=new Bi,Bo=new ske,BH=new Le,E4=new I0,P4=new D0,bu=new Er;let Fu,Np;function zH(n,e,t){return bu.set(0,0,-e,1).applyMatrix4(n.projectionMatrix),bu.multiplyScalar(1/bu.w),bu.x=Np/t.width,bu.y=Np/t.height,bu.applyMatrix4(n.projectionMatrixInverse),bu.multiplyScalar(1/bu.w),Math.abs(Math.max(bu.x,bu.y))}function jFe(n,e){const t=n.matrixWorld,i=n.geometry,r=i.attributes.instanceStart,a=i.attributes.instanceEnd,o=Math.min(i.instanceCount,r.count);for(let s=0,l=o;s<l;s++){Bo.start.fromBufferAttribute(r,s),Bo.end.fromBufferAttribute(a,s),Bo.applyMatrix4(t);const u=new Le,c=new Le;Fu.distanceSqToSegment(Bo.start,Bo.end,c,u),c.distanceTo(u)<Np*.5&&e.push({point:c,pointOnLine:u,distance:Fu.origin.distanceTo(c),object:n,face:null,faceIndex:s,uv:null,uv1:null})}}function $Fe(n,e,t){const i=e.projectionMatrix,a=n.material.resolution,o=n.matrixWorld,s=n.geometry,l=s.attributes.instanceStart,u=s.attributes.instanceEnd,c=Math.min(s.instanceCount,l.count),d=-e.near;Fu.at(1,Su),Su.w=1,Su.applyMatrix4(e.matrixWorldInverse),Su.applyMatrix4(i),Su.multiplyScalar(1/Su.w),Su.x*=a.x/2,Su.y*=a.y/2,Su.z=0,vT.copy(Su),mT.multiplyMatrices(e.matrixWorldInverse,o);for(let h=0,f=c;h<f;h++){if(ko.fromBufferAttribute(l,h),Fo.fromBufferAttribute(u,h),ko.w=1,Fo.w=1,ko.applyMatrix4(mT),Fo.applyMatrix4(mT),ko.z>d&&Fo.z>d)continue;if(ko.z>d){const S=ko.z-Fo.z,x=(ko.z-d)/S;ko.lerp(Fo,x)}else if(Fo.z>d){const S=Fo.z-ko.z,x=(Fo.z-d)/S;Fo.lerp(ko,x)}ko.applyMatrix4(i),Fo.applyMatrix4(i),ko.multiplyScalar(1/ko.w),Fo.multiplyScalar(1/Fo.w),ko.x*=a.x/2,ko.y*=a.y/2,Fo.x*=a.x/2,Fo.y*=a.y/2,Bo.start.copy(ko),Bo.start.z=0,Bo.end.copy(Fo),Bo.end.z=0;const m=Bo.closestPointToPointParameter(vT,!0);Bo.at(m,BH);const v=cR.lerp(ko.z,Fo.z,m),g=v>=-1&&v<=1,_=vT.distanceTo(BH)<Np*.5;if(g&&_){Bo.start.fromBufferAttribute(l,h),Bo.end.fromBufferAttribute(u,h),Bo.start.applyMatrix4(o),Bo.end.applyMatrix4(o);const S=new Le,x=new Le;Fu.distanceSqToSegment(Bo.start,Bo.end,x,S),t.push({point:x,pointOnLine:S,distance:Fu.origin.distanceTo(x),object:n,face:null,faceIndex:h,uv:null,uv1:null})}}}class qFe extends fr{constructor(e=new Ree,t=new Lee({color:Math.random()*16777215})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,i=e.attributes.instanceEnd,r=new Float32Array(2*t.count);for(let o=0,s=0,l=t.count;o<l;o++,s+=2)FH.fromBufferAttribute(t,o),OH.fromBufferAttribute(i,o),r[s]=s===0?0:r[s-1],r[s+1]=r[s]+FH.distanceTo(OH);const a=new ZC(r,2,1);return e.setAttribute("instanceDistanceStart",new J0(a,1,0)),e.setAttribute("instanceDistanceEnd",new J0(a,1,1)),this}raycast(e,t){const i=this.material.worldUnits,r=e.camera;r===null&&!i&&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;Fu=e.ray;const o=this.matrixWorld,s=this.geometry,l=this.material;Np=l.linewidth+a,s.boundingSphere===null&&s.computeBoundingSphere(),P4.copy(s.boundingSphere).applyMatrix4(o);let u;if(i)u=Np*.5;else{const d=Math.max(r.near,P4.distanceToPoint(Fu.origin));u=zH(r,d,l.resolution)}if(P4.radius+=u,Fu.intersectsSphere(P4)===!1)return;s.boundingBox===null&&s.computeBoundingBox(),E4.copy(s.boundingBox).applyMatrix4(o);let c;if(i)c=Np*.5;else{const d=Math.max(r.near,E4.distanceToPoint(Fu.origin));c=zH(r,d,l.resolution)}E4.expandByScalar(c),Fu.intersectsBox(E4)!==!1&&(i?jFe(this,t):$Fe(this,r,t))}}class Iee extends Ree{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const t=e.length-3,i=new Float32Array(2*t);for(let r=0;r<t;r+=3)i[2*r]=e[r],i[2*r+1]=e[r+1],i[2*r+2]=e[r+2],i[2*r+3]=e[r+3],i[2*r+4]=e[r+4],i[2*r+5]=e[r+5];return super.setPositions(i),this}setColors(e){const t=e.length-3,i=new Float32Array(2*t);for(let r=0;r<t;r+=3)i[2*r]=e[r],i[2*r+1]=e[r+1],i[2*r+2]=e[r+2],i[2*r+3]=e[r+3],i[2*r+4]=e[r+4],i[2*r+5]=e[r+5];return super.setColors(i),this}fromLine(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}}class XFe extends qFe{constructor(e=new Iee,t=new Lee({color:Math.random()*16777215})){super(e,t),this.isLine2=!0,this.type="Line2"}}class R4{constructor({},e={}){this.config=Object.assign({visibelProvince:"",geoProjectionCenter:[0,0],geoProjectionScale:120,position:new Le(0,0,0),data:"",material:new ku({color:16777215}),type:"LineLoop",renderOrder:1,tubeRadius:.2},e);let t=RR(this.config.data),i=this.create(t);this.lineGroup=i,this.lineGroup.position.copy(this.config.position)}geoProjection(e){return Ic().center(this.config.geoProjectionCenter).scale(this.config.geoProjectionScale).translate([0,0])(e)}create(e){const{type:t,visibelProvince:i}=this.config;let r=e.features,a=new Nr;for(let o=0;o<r.length;o++){const s=r[o];let l=new Nr;l.name="meshLineGroup"+o,s.properties.name!==i&&(s.geometry.coordinates.forEach(u=>{const c=[];let d=null;t==="Line2"?(u[0].forEach(h=>{const[f,p]=this.geoProjection(h);c.push(f,-p,0)}),d=this.createLine2(c)):t==="Line3"?(u[0].forEach(h=>{const[f,p]=this.geoProjection(h);c.push(new Le(f,-p,0))}),d=this.createLine3(c)):u[0].forEach(h=>{const[f,p]=this.geoProjection(h);c.push(new Le(f,-p,0)),d=this.createLine(c)}),l.add(d)}),a.add(l))}return a}createLine3(e){const t=this.config.tubeRadius,i=256*10,r=4,a=!1,{material:o,renderOrder:s}=this.config,l=new TR(e),u=new u7(l,i,t,r,a),c=new fr(u,o);return c.name="mapLine3",c.renderOrder=s,c}createLine2(e){const{material:t,renderOrder:i}=this.config,r=new Iee;r.setPositions(e);let a=new XFe(r,t);return a.name="mapLine2",a.renderOrder=i,a.computeLineDistances(),a}createLine(e){const{material:t,renderOrder:i,type:r}=this.config,a=new Qr;a.setFromPoints(e);let o=new G8(a,t);return o.renderOrder=i,o.name="mapLine",o}setParent(e){e.add(this.lineGroup)}}class L4{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:i,dir:r,size:a}=this.config,o={x:1,y:2,z:3};e.onBeforeCompile=s=>{this.shader=s,s.uniforms=tn(wt({},s.uniforms),{uColor1:{value:new Jn(t)},uColor2:{value:new Jn(i)},uDir:{value:o[r]},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 YFe="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=",KFe=[{name:"邛溪镇",center:[102.63374746802602,32.82576351047847],centroid:[102.63374746802602,32.82576351047847]},{name:"刷经寺镇",center:[102.61668800740293,31.972581499870266],centroid:[102.61668800740293,31.972581499870266]},{name:"安曲镇",center:[102.33517275101616,32.71285091143605],centroid:[102.33517275101616,32.71285091143605]},{name:"龙日镇",center:[102.40041964577492,32.42345274031332],centroid:[102.40041964577492,32.42345274031332]},{name:"江茸乡",center:[102.26876480621743,32.352965999818025],centroid:[102.26876480621743,32.352965999818025]},{name:"查尔玛乡",center:[102.05164640151992,32.45423049990481],centroid:[102.05164640151992,32.45423049990481]},{name:"瓦切镇",center:[102.68497870490992,33.13952250013054],centroid:[102.68497870490992,33.13952250013054]},{name:"阿木乡",center:[102.83552513473182,32.7263610000727],centroid:[102.83552513473182,32.7263610000727]},{name:"麦洼乡",center:[102.940261,33.118079],centroid:[102.940261,33.118079]},{name:"色地镇",center:[103.14352108676084,33.04086199974242],centroid:[103.14352108676084,33.04086199974242]},{name:"壤口乡",center:[102.51205063384711,32.23458652276696],centroid:[102.51205063384711,32.23458652276696]}],GH=[{name:"色地镇",enName:"sedi",center:[103.14352108676084,33.04086199974242],centroid:[103.14352108676084,33.04086199974242],value:1199},{name:"瓦切镇",enName:"waqie",center:[102.68497870490992,33.13952250013054],centroid:[102.68497870490992,33.13952250013054],value:991},{name:"刷经寺镇",enName:"shuajingsi",center:[102.61668800740293,31.972581499870266],centroid:[102.61668800740293,31.972581499870266],value:986},{name:"邛溪镇",enName:"qiongxi",center:[102.63374746802602,32.82576351047847],centroid:[102.63374746802602,32.82576351047847],value:896},{name:"阿木乡",enName:"amu",center:[102.83552513473182,32.7263610000727],centroid:[102.83552513473182,32.7263610000727],value:892},{name:"安曲镇",enName:"anqu",center:[102.33517275101616,32.71285091143605],centroid:[102.33517275101616,32.71285091143605],value:885},{name:"查尔玛乡",enName:"chaerma",center:[102.05164640151992,32.45423049990481],centroid:[102.05164640151992,32.45423049990481],value:729},{name:"龙日镇",enName:"longri",center:[102.40041964577492,32.42345274031332],centroid:[102.40041964577492,32.42345274031332],value:645},{name:"麦洼乡",enName:"maiwa",center:[102.940261,33.118079],centroid:[102.940261,33.118079],value:559},{name:"江茸乡",enName:"jiangrong",center:[102.26876480621743,32.352965999818025],centroid:[102.26876480621743,32.352965999818025],value:514},{name:"壤口乡",enName:"rangkou",center:[102.51205063384711,32.23458652276696],centroid:[102.51205063384711,32.23458652276696],value:0}],ZFe=[{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}],JFe=[{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 UH=class{constructor(e,t){Ni(this,"target");Ni(this,"name");Ni(this,"intersected");Ni(this,"wasIntersected",!1);Ni(this,"wasIntersectedOnMouseDown",!1);Ni(this,"distance");this.target=e,this.name=t,this.intersected=!1,this.distance=0}},Gs=class{constructor(n,e=null){Ni(this,"type");Ni(this,"cancelBubble");Ni(this,"originalEvent");Ni(this,"coords",new on(0,0));Ni(this,"distance",0);Ni(this,"intersected",!1);Ni(this,"wasIntersected",!1);Ni(this,"wasIntersectedOnMouseDown",!1);this.cancelBubble=!1,this.type=n,this.originalEvent=e}stopPropagation(){this.cancelBubble=!0}},QFe=class{constructor(n,e,t,i){Ni(this,"renderer");Ni(this,"camera");Ni(this,"domElement");Ni(this,"bindEventsOnBodyElement");Ni(this,"autoAdd");Ni(this,"scene");Ni(this,"mouse");Ni(this,"supportsPointerEvents");Ni(this,"interactiveObjects");Ni(this,"closestObject");Ni(this,"raycaster");Ni(this,"treatTouchEventsAsMouseEvents");Ni(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)});Ni(this,"add",(n,e=[])=>{if(n&&!this.interactiveObjects.find(t=>t.target===n))if(e.length>0)e.forEach(t=>{let i=n.getObjectByName(t);if(i){let r=new UH(i,t);this.interactiveObjects.push(r)}});else{let t=new UH(n,n.name);this.interactiveObjects.push(t)}});Ni(this,"remove",(n,e=[])=>{!n||(e.length>0?e.forEach(t=>{let i=n.getObjectByName(t);i&&(this.interactiveObjects=this.interactiveObjects.filter(r=>r.target!==i))}):this.interactiveObjects=this.interactiveObjects.filter(t=>t.target!==n))});Ni(this,"update",()=>{var i;this.raycaster.setFromCamera(this.mouse,this.camera),this.interactiveObjects.forEach(r=>{r.target&&this.checkIntersection(r)}),this.interactiveObjects.sort(function(r,a){return r.distance-a.distance});let n=(i=this.interactiveObjects.find(r=>r.intersected))!=null?i:null;if(n!=this.closestObject){if(this.closestObject){let r=new Gs("mouseout");this.dispatch(this.closestObject,r)}if(n){let r=new Gs("mouseover");this.dispatch(n,r)}this.closestObject=n}let e;this.interactiveObjects.forEach(r=>{!r.intersected&&r.wasIntersected&&(e||(e=new Gs("mouseleave")),this.dispatch(r,e))});let t;this.interactiveObjects.forEach(r=>{r.intersected&&!r.wasIntersected&&(t||(t=new Gs("mouseenter")),this.dispatch(r,t))})});Ni(this,"checkIntersection",n=>{let e=this.raycaster.intersectObjects([n.target],!0);if(n.wasIntersected=n.intersected,e.length>0){let t=e[0].distance;e.forEach(i=>{i.distance<t&&(t=i.distance)}),n.intersected=!0,n.distance=t}else n.intersected=!1});Ni(this,"onDocumentMouseMove",n=>{this.mapPositionToPoint(this.mouse,n.clientX,n.clientY);let e=new Gs("mousemove",n);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});Ni(this,"onDocumentPointerMove",n=>{this.mapPositionToPoint(this.mouse,n.clientX,n.clientY);let e=new Gs("pointermove",n);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});Ni(this,"onTouchMove",n=>{n.touches.length>0&&this.mapPositionToPoint(this.mouse,n.touches[0].clientX,n.touches[0].clientY);let e=new Gs(this.treatTouchEventsAsMouseEvents?"mousemove":"touchmove",n);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});Ni(this,"onMouseClick",n=>{this.update();let e=new Gs("click",n);this.interactiveObjects.forEach(t=>{t.intersected&&this.dispatch(t,e)})});Ni(this,"onMouseDown",n=>{this.mapPositionToPoint(this.mouse,n.clientX,n.clientY),this.update();let e=new Gs("mousedown",n);this.interactiveObjects.forEach(t=>{t.intersected?(t.wasIntersectedOnMouseDown=!0,this.dispatch(t,e)):t.wasIntersectedOnMouseDown=!1})});Ni(this,"onPointerDown",n=>{this.mapPositionToPoint(this.mouse,n.clientX,n.clientY),this.update();let e=new Gs("pointerdown",n);this.interactiveObjects.forEach(t=>{t.intersected&&this.dispatch(t,e)})});Ni(this,"onTouchStart",n=>{n.touches.length>0&&this.mapPositionToPoint(this.mouse,n.touches[0].clientX,n.touches[0].clientY),this.update();let e=new Gs(this.treatTouchEventsAsMouseEvents?"mousedown":"touchstart",n);this.interactiveObjects.forEach(t=>{t.intersected&&this.dispatch(t,e)})});Ni(this,"onMouseUp",n=>{let e=new Gs("mouseup",n);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});Ni(this,"onPointerUp",n=>{let e=new Gs("pointerup",n);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});Ni(this,"onTouchEnd",n=>{n.touches.length>0&&this.mapPositionToPoint(this.mouse,n.touches[0].clientX,n.touches[0].clientY),this.update();let e=new Gs(this.treatTouchEventsAsMouseEvents?"mouseup":"touchend",n);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});Ni(this,"dispatch",(n,e)=>{n.target&&!e.cancelBubble&&(e.coords=this.mouse,e.distance=n.distance,e.intersected=n.intersected,e.wasIntersected=n.wasIntersected,e.wasIntersectedOnMouseDown=n.wasIntersectedOnMouseDown,n.target.dispatchEvent(e))});Ni(this,"mapPositionToPoint",(n,e,t)=>{let i=this.renderer.domElement.getBoundingClientRect();n.x=(e-i.left)/i.width*2-1,n.y=-((t-i.top)/i.height)*2+1});this.renderer=n,this.camera=e,this.domElement=t,this.bindEventsOnBodyElement=i&&typeof i.bindEventsOnBodyElement<"u"?i.bindEventsOnBodyElement:!0,this.scene=i&&typeof i.scene<"u"?i.scene:null,this.scene&&(this.scene.onBeforeRender=()=>{this.autoAdd&&this.scene!==null&&this.scene.traverse(r=>{this.add(r),r.addEventListener("removed",a=>{this.remove(a.target)})}),this.update()}),this.autoAdd=i&&typeof i.autoAdd<"u"?i.autoAdd:!1,this.autoAdd&&this.scene===null&&console.error("Attention: Options.scene needs to be set when using options.autoAdd"),this.mouse=new on(-1,1),this.supportsPointerEvents=!!window.PointerEvent,this.interactiveObjects=[],this.closestObject=null,this.raycaster=new oke,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 O2=256,eOe="https://map.shuxitech.com/vt/lyrs=s&hl=zh-CN&x={x}&y={y}&z={z}",Ig={west:101.852492,south:31.851389,east:103.347518,north:33.319796};function VH(n,e,t){const i=xd(2,t),r=Math.sin(e*Math.PI/180);return{x:(n+180)/360*i,y:(.5-Math.log((1+r)/(1-r))/(4*Math.PI))*i}}function HH(n,e,t){const i=xd(2,t),r=n/i*360-180,a=Math.PI-2*Math.PI*e/i,o=180/Math.PI*Math.atan(.5*(Math.exp(a)-Math.exp(-a)));return[r,o]}function tOe(n,e){const t=VH(n.west,n.north,e),i=VH(n.east,n.south,e),r=Math.floor(t.x),a=Math.floor(i.x),o=Math.floor(t.y),s=Math.floor(i.y);return{zoom:e,minX:r,maxX:a,minY:o,maxY:s,cols:a-r+1,rows:s-o+1}}function nOe(n,e){const[t,i]=HH(n.minX,n.minY,n.zoom),[r,a]=HH(n.maxX+1,n.maxY+1,n.zoom),[o]=e([t,Ig.south]),[s]=e([r,Ig.south]),[,l]=e([Ig.west,i]),[,u]=e([Ig.west,a]);return{left:o,right:s,bottom:-u,top:-l}}function iOe(n,e){const{width:t,height:i}=e;n.save(),n.globalCompositeOperation="multiply",n.fillStyle="rgba(5, 24, 34, 0.22)",n.fillRect(0,0,t,i),n.globalCompositeOperation="screen";const r=n.createRadialGradient(t*.5,i*.48,t*.1,t*.5,i*.5,t*.72);r.addColorStop(0,"rgba(80, 230, 255, 0.16)"),r.addColorStop(1,"rgba(0, 18, 36, 0.03)"),n.fillStyle=r,n.fillRect(0,0,t,i),n.restore()}function rOe(n,e){const t=n.createLinearGradient(0,0,e.width,e.height);t.addColorStop(0,"#061927"),t.addColorStop(.5,"#0b2c3c"),t.addColorStop(1,"#07131f"),n.fillStyle=t,n.fillRect(0,0,e.width,e.height)}function aOe(n){return new Promise(e=>{const t=new Image;t.crossOrigin="anonymous",t.onload=()=>e(t),t.onerror=()=>e(null),t.src=n})}function oOe(n,e,t){return eOe.replace("{x}",n).replace("{y}",e).replace("{z}",t)}function sOe(n,e,t,i){return rn(this,null,function*(){const r=[];n.save(),n.filter="brightness(0.92) contrast(1.22) saturate(1.06)";for(let a=i.minX;a<=i.maxX;a+=1)for(let o=i.minY;o<=i.maxY;o+=1)r.push(aOe(oOe(a,o,i.zoom)).then(s=>{s&&(n.drawImage(s,(a-i.minX)*O2,(o-i.minY)*O2,O2,O2),t.needsUpdate=!0)}));yield Promise.allSettled(r),n.restore(),iOe(n,e),t.needsUpdate=!0})}function lOe({geoProjectionCenter:n,geoProjectionScale:e,zoom:t=11}={}){const i=tOe(Ig,t),r=document.createElement("canvas");r.width=i.cols*O2,r.height=i.rows*O2;const a=r.getContext("2d");rOe(a,r);const o=new bR(r);o.colorSpace=$r,o.wrapS=us,o.wrapT=us,o.minFilter=ao,o.magFilter=ao,o.needsUpdate=!0;const s=Ic().center(n).scale(e).translate([0,0]),l=nOe(i,s);return sOe(a,r,o,i).catch(u=>{console.warn("load satellite tiles failed:",u)}),{texture:o,uvBounds:l}}function WH(n,e){const t=e.right-e.left,i=e.top-e.bottom;n.mapGroup.traverse(r=>{var s,l;const a=(l=(s=r.geometry)==null?void 0:s.attributes)==null?void 0:l.position;if(!r.isMesh||!a)return;const o=new Float32Array(a.count*2);for(let u=0;u<a.count;u+=1){const c=a.getX(u),d=a.getY(u);o[u*2]=(c-e.left)/t,o[u*2+1]=(d-e.bottom)/i}r.geometry.setAttribute("uv",new La(o,2)),r.geometry.attributes.uv.needsUpdate=!0})}const lr={west:101.852492,south:31.851389,east:103.347518,north:33.319796},qd={width:2400,height:2400},uOe=12;function cOe(n){return String(n).replace(/'/g,"''")}function As(n,e){return`${n} = '${cOe(e)}'`}const jH=[{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((n,e)=>tn(wt({},n),{key:`grassland-type-${e+1}`,cqlFilter:As("grass_min_type",n.name),rankingPropertyName:["area_code","acreage"],rankingTownCodeKeys:["area_code"],rankingAreaKeys:["acreage"]})),$H=[{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(n=>tn(wt({},n),{selectable:!1})),o9={1:"一级",2:"二级",3:"三级",4:"四级",5:"五级",6:"六级",7:"七级",8:"八级"},Dee=[{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(n=>tn(wt({},n),{key:`grassland-level-${n.level}`,cqlFilter:`grassland_level IN ('${n.level}','${n.name}','${o9[n.level]}草原','${o9[n.level]}草地')`,rankingPropertyName:["area_code","acreage"],rankingTownCodeKeys:["area_code"],rankingAreaKeys:["acreage"],level:void 0})),dOe=Dee.map(n=>{const e=n.key.replace("grassland-level-",""),t=n.name.replace("草原","湿地");return tn(wt({},n),{key:`wetland-level-${e}`,name:t,cqlFilter:`grassland_level IN ('${e}','${t}','${n.name}','${o9[e]}湿地','${o9[e]}草原','${o9[e]}草地')`})}),hOe=[{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"}],Iv=[{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"]}],y5=[{key:"national-park",name:"若尔盖国家公园",color:"#8AE611",defaultLayerKey:"national-park-zoning"},{key:"restoration",name:"生态修复工程",color:"#33A3DC",defaultLayerKey:"restoration-projects"},{key:"engineering-analysis",name:"工程分析",color:"#24F6C4",defaultLayerKey:"engineering-analysis-projects"}],Nee=[{key:"yak-industry-chain",name:"牦牛产业链",color:"#24F6C4",defaultLayerKey:"yak-industry-points"}],_5={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:As("gjgyl_bhdj","1")},{key:"woodland-protection-level-2",name:"国家二级公益林",fillColor:"#2BD17E",strokeColor:"#2BD17E",cqlFilter:As("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:As("dlmc","灌木林地")},{key:"woodland-type-arbor",name:"乔木林地",fillColor:"#0DA368",strokeColor:"#0DA368",cqlFilter:As("dlmc","乔木林地")},{key:"woodland-type-swamp",name:"灌丛沼泽",fillColor:"#23C7B7",strokeColor:"#23C7B7",cqlFilter:As("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:As("zl_dj","2")},{key:"woodland-quality-3",name:"三级质量",fillColor:"#2BD17E",strokeColor:"#2BD17E",cqlFilter:As("zl_dj","3")},{key:"woodland-quality-4",name:"四级质量",fillColor:"#23C7B7",strokeColor:"#23C7B7",cqlFilter:As("zl_dj","4")},{key:"woodland-quality-5",name:"五级质量",fillColor:"#B7D96B",strokeColor:"#B7D96B",cqlFilter:As("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:As("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:hOe},{key:"grassland-level",name:"草原级",layerName:"ne:t_grassland_result_level_caodi",opacity:.82,legends:Dee},{key:"grassland-type",name:"草原类型",layerName:"ne:t_grassland_result_grass_min_type_caodi",opacity:.82,legends:jH},{key:"grassland-yield",name:"草地产草量/生产力",layerName:"ne:t_grassland_result_yield_caodi",opacity:.82,legends:$H},{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:dOe},{key:"wetland-type",name:"湿地类型",layerName:"ne:t_grassland_result_grass_min_type_shidi",opacity:.82,legends:jH},{key:"wetland-yield",name:"湿地产草量/生产力",layerName:"ne:t_grassland_result_yield_shidi",opacity:.82,legends:$H}]},kee={"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:As("project_category","草地修复"),match:{field:"project_category",value:"草地修复"}},{key:"restoration-wetland",name:"湿地修复",fillColor:"#42C6DF",strokeColor:"#9CF7FF",cqlFilter:As("project_category","湿地修复"),match:{field:"project_category",value:"湿地修复"}},{key:"restoration-woodland",name:"林地修复",fillColor:"#1FB579",strokeColor:"#57F2A6",cqlFilter:As("project_category","林地修复"),match:{field:"project_category",value:"林地修复"}},{key:"restoration-linear",name:"线性设施",fillColor:"#F5C84B",strokeColor:"#FFE289",cqlFilter:As("feature_role","线性设施"),match:{field:"feature_role",value:"线性设施"}}]}],"engineering-analysis":[{key:"engineering-analysis-projects",name:"工程分析项目库",sourceType:"geojson",dataPath:"datas/ecological-protection/ecological_restoration_projects.geojson",opacity:.82,mapView:{targetLngLat:[102.58,32.72],distanceScale:.78,targetLocalZ:.72,duration:.85},legends:[{key:"analysis-project-grassland",name:"草地修复",fillColor:"#70D44B",strokeColor:"#B7FF6D",match:{field:"project_category",value:"草地修复"},selectable:!1},{key:"analysis-project-wetland",name:"湿地修复",fillColor:"#42C6DF",strokeColor:"#9CF7FF",match:{field:"project_category",value:"湿地修复"},selectable:!1},{key:"analysis-project-woodland",name:"林地修复",fillColor:"#1FB579",strokeColor:"#57F2A6",match:{field:"project_category",value:"林地修复"},selectable:!1},{key:"analysis-project-linear",name:"线性设施",fillColor:"#F5C84B",strokeColor:"#FFE289",match:{field:"feature_role",value:"线性设施"},selectable:!1}]}]},Fee={色地乡:[103.14352108676084,33.04086199974242],色地镇:[103.14352108676084,33.04086199974242],瓦切乡:[102.68497870490992,33.13952250013054],瓦切镇:[102.68497870490992,33.13952250013054],刷经寺镇:[102.61668800740293,31.972581499870266],邛溪镇:[102.63374746802602,32.82576351047847],阿木乡:[102.83552513473182,32.7263610000727],安曲乡:[102.33517275101616,32.71285091143605],安曲镇:[102.33517275101616,32.71285091143605],查尔玛乡:[102.05164640151992,32.45423049990481],龙日乡:[102.40041964577492,32.42345274031332],龙日镇:[102.40041964577492,32.42345274031332],麦洼乡:[102.940261,33.118079],江茸乡:[102.26876480621743,32.352965999818025],壤口乡:[102.51205063384711,32.23458652276696]},fOe=[{name:"色地乡",count:11704},{name:"麦洼乡",count:5283},{name:"壤口乡",count:6109},{name:"阿木乡",count:8928},{name:"瓦切镇",count:8892},{name:"查尔玛乡",count:6868},{name:"江茸乡",count:5158},{name:"龙日镇",count:6994},{name:"安曲镇",count:9325},{name:"刷经寺镇",count:500},{name:"邛溪镇",count:9334}],pOe=[{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}];function vOe(n,e,t,i){const r=Fee[n.name];return{type:"Feature",properties:{id:`${t}-${e+1}`,name:n.name,town:n.name,count:n.count,value:n.count,devices:n.devices,metricLabel:i},geometry:{type:"Point",coordinates:r}}}function qH(n,e,t){return{type:"FeatureCollection",features:n.filter(i=>Fee[i.name]).map((i,r)=>vOe(i,r,e,t))}}const mOe={"yak-industry-chain":[{key:"yak-distribution-layer",name:"牦牛分布",sourceType:"geojson",geojsonData:qH(fOe,"yak-distribution-layer","牦牛数量"),opacity:.94,mapView:{targetLngLat:[102.58,32.72],distanceScale:.82,targetLocalZ:.76,duration:.85},legends:[{key:"yak-distribution-all",name:"牦牛分布",fillColor:"#24F6C4",strokeColor:"#B7FFF2",selectable:!1}]},{key:"yak-recognition-layer",name:"识别数据",sourceType:"geojson",geojsonData:qH(pOe,"yak-recognition-layer","识别数量"),opacity:.94,mapView:{targetLngLat:[102.58,32.72],distanceScale:.82,targetLocalZ:.76,duration:.85},legends:[{key:"yak-recognition-all",name:"识别数据",fillColor:"#32DCFF",strokeColor:"#B8F7FF",selectable:!1}]},{key:"yak-industry-points",name:"牦牛产业点位",sourceType:"geojson",dataPath:"datas/yak-industry-chain/yak_industry_points.geojson",opacity:.96,mapView:{targetLngLat:[102.48,32.69],distanceScale:.82,targetLocalZ:.76,duration:.85},legends:[{key:"yak-industry-family-pasture",name:"家庭生态牧场",fillColor:"#24F6C4",strokeColor:"#B7FFF2",match:{field:"stageKey",value:"family-pasture"}},{key:"yak-industry-artificial-grassland",name:"人工草地",fillColor:"#7EE269",strokeColor:"#D6FF8D",match:{field:"stageKey",value:"artificial-grassland"}},{key:"yak-industry-scale-breeding",name:"规模化养殖基地",fillColor:"#32DCFF",strokeColor:"#B8F7FF",match:{field:"stageKey",value:"scale-breeding"}},{key:"yak-industry-forage-storage",name:"防灾减灾",fillColor:"#FFE06B",strokeColor:"#FFF2A0",match:{field:"stageKey",value:"forage-storage"}},{key:"yak-industry-slaughter-processing",name:"屠宰与加工",fillColor:"#FF9A62",strokeColor:"#FFD0A8",match:{field:"stageKey",value:"slaughter-processing"}},{key:"yak-industry-social-service",name:"社会化服务",fillColor:"#9EA7FF",strokeColor:"#DFE3FF",match:{field:"stageKey",value:"social-service"}}]}]},gOe=wt(wt(wt({},_5),kee),mOe),yOe=[...Iv,...y5,...Nee];function XH(n){return yOe.find(e=>e.key===n)||Iv[0]}function f7(n){return gOe[n]||[]}function B3(n,e){const t=f7(n);return t.find(i=>i.key===e)||t[0]}const _Oe=12e3;function SOe(n,e={}){const t=new URLSearchParams;Object.entries(e).forEach(([r,a])=>{a!=null&&a!==""&&t.append(r,a)});const i=t.toString();return i?`${n}${n.includes("?")?"&":"?"}${i}`:n}function su(t){return rn(this,arguments,function*(n,e={}){const u=e,{params:i,timeout:r=_Oe}=u,a=AD(u,["params","timeout"]),o=new AbortController;let s=!1;const l=window.setTimeout(()=>{s=!0,o.abort()},r);try{const c=yield fetch(SOe(n,i),tn(wt({credentials:"include"},a),{signal:o.signal,headers:wt({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,c.status===401&&RD(),h}const d=yield c.json();if((d==null?void 0:d.code)===401||(d==null?void 0:d.code)==="401"){const h=new Error((d==null?void 0:d.msg)||"用户未登录或授权已过期。");throw h.code="HTTP_401",h.status=401,RD(),h}return d}catch(c){if(o.signal.aborted||(c==null?void 0:c.name)==="AbortError"||/aborted/i.test((c==null?void 0:c.message)||"")){const h=new Error(s?"服务响应超时,请稍后再试。":"请求已取消,请重新发送。");throw h.code=s?"REQUEST_TIMEOUT":"REQUEST_ABORTED",h}throw c}finally{window.clearTimeout(l)}})}function ki(n){return(n==null?void 0:n.data)!==void 0?n.data:(n==null?void 0:n.result)!==void 0?n.result:n}const NR="/geoserver/ne/wms",bOe={}.VITE_GEOSERVER_WFS_URL||NR.replace(/\/wms$/i,"/wfs");function kR(n,e){const t=new URLSearchParams;return Object.entries(e).forEach(([i,r])=>{r!=null&&r!==""&&t.append(i,r)}),`${n}${n.includes("?")?"&":"?"}${t.toString()}`}function YH(n,e={}){const t=e.bounds||lr,i=e.size||qd;return kR(e.url||NR,{service:"WMS",version:"1.1.1",request:"GetMap",layers:n.layerName,styles:n.styles||"",format:"image/png",transparent:!0,tiled:!0,srs:"EPSG:4326",bbox:[t.west,t.south,t.east,t.north].join(","),width:i.width,height:i.height,CQL_FILTER:e.cqlFilter||n.cqlFilter,_:Date.now()})}function xOe(n,e,t={}){var a,o;const i=t.bounds||lr,r=t.size||qd;return kR(t.url||NR,{service:"WMS",version:"1.1.1",request:"GetFeatureInfo",layers:n.layerName,query_layers:n.layerName,styles:n.styles||"",info_format:"application/json",feature_count:5,srs:"EPSG:4326",bbox:[i.west,i.south,i.east,i.north].join(","),width:r.width,height:r.height,x:Math.round(e.x),y:Math.round(e.y),buffer:(o=(a=t.buffer)!=null?a:n.queryBuffer)!=null?o:8,CQL_FILTER:t.cqlFilter||n.cqlFilter})}function KH(i,r){return rn(this,arguments,function*(n,e,t={}){const a=xOe(n,e,t);return su(a,{credentials:"include"})})}function wOe(n,e={}){return kR(e.url||bOe,{service:"WFS",version:e.version||"1.0.0",request:"GetFeature",typeName:n,outputFormat:"json",propertyName:Array.isArray(e.propertyName)?e.propertyName.join(","):e.propertyName,CQL_FILTER:e.cqlFilter,maxFeatures:e.maxFeatures||2e5})}function s3(t){return rn(this,arguments,function*(n,e={}){const i=wOe(n,e);return su(i,{credentials:"include",timeout:e.timeout||2e4})})}function ZH(n){var i;const e=(i=n==null?void 0:n.features)==null?void 0:i[0];if(!e)return null;const t=e.properties||{};return{id:e.id||t.gid||t.objectid||t.OBJECTID,properties:t,feature:e}}const TOe=new Le(0,22.8,18.8),AOe=new Le(0,0,0),COe=new Le(-7.2,24.2,31.2);function JH(n){return n.sort((e,t)=>t.value-e.value),n}function g2(n){return String(n||"").replace(/\s+/g,"").trim().replace("色地乡","色地镇").replace("瓦切乡","瓦切镇").replace("安曲乡","安曲镇").replace("龙日乡","龙日镇")}function Jr(n,e=0){const t=Number(n);return Number.isFinite(t)?t:e}function Us(n){return String(n!=null?n:"").replace(/[&<>"']/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[e])}function QH(n){return(n==null?void 0:n.scope)==="village"||(n==null?void 0:n.labelMode)==="village"}function eW(n){return(n==null?void 0:n.scope)==="trade-flow"||(n==null?void 0:n.labelMode)==="trade-flow"}function tW(n){return!!(n!=null&&n.hideTownNames||(n==null?void 0:n.showTownNames)===!1)}function I4(n){return!!(n!=null&&n.hideMapLabels||(n==null?void 0:n.showMapLabels)===!1)}function MOe(n){return(n==null?void 0:n.displayMode)==="callout"||(n==null?void 0:n.labelMode)==="callout"}function D4(n){return["wkt-api","geojson","wfs"].includes(n==null?void 0:n.sourceType)}function nW(n){return n?/^https?:\/\//.test(n)||n.startsWith("/")?n:`./${n}`:""}function iW(n){if(!n)return null;if(typeof n=="string")try{return JSON.parse(n)}catch(e){return console.warn("地图 GeoJSON 解析失败",e),null}return n}function rW(n){return n!=null&&n.coordinates?n.type==="Polygon"?[n.coordinates]:n.type==="MultiPolygon"?n.coordinates:[]:[]}class EOe extends OFe{constructor(e,t,i={}){var r,a,o,s;super(e),this.geoProjectionCenter=[102.6305459723107,32.72169252326339],this.geoProjectionScale=650,this.tradeGeoProjectionCenter=[104,36],this.tradeGeoProjectionScale=11.4,this.tradeNationalDepth=.24,this.depth=.5,this.mapFocusLabelInfo={name:"红原县",enName:"HONGYUAN COUNTY",center:[102.6305459723107,32.08]},this.clicked=!1,this.scene.fog=new mR(466735,1,50),this.scene.background=new Jn(466735),this.camera.instance.position.copy(COe),this.camera.instance.near=1,this.camera.instance.far=1e4,this.camera.instance.updateProjectionMatrix(),this.defaultMapCameraPosition=TOe.clone(),this.defaultMapTarget=AOe.clone(),this.camera.controls.target.copy(this.defaultMapTarget),this.camera.controls.update(),this.activeMapViewTweens=[],this.interactionManager=new QFe(this.renderer.instance,this.camera.instance,this.canvas),this.assets=t,this.callbacks=i,this.topicLayerLoadId=0,this.visibleTopicLayers=[],this.mapAnimationComplete=!1,this.showTownRankingBars=!1,this.showTownRankingPointMarkers=!1,this.currentTownRanking=null,this.villageRankingGroup=null,this.villageRankingLabels=[],this.tradeFlowGroup=null,this.tradeFlowMeshGroup=null,this.tradeFlowLabelGroup=null,this.tradeFlowLabels=[],this.tradeFlowMaterials=[],this.tradeFlowPulseSprites=[],this.isTradeNationalMapActive=!1,this.selectedFeatureGroup=null,this.selectedVectorFeatures=[],this.analysisBoundaryFeature=null,this.analysisMatchedFeatures=[],this.boundaryDrawingEnabled=!1,this.boundaryDrawPoints=[],this.lastBoundaryDrawPoint=null,this.currentVectorFeatures=[],this.hongyuanBoundaryPolygons=[],this.townMetaByName=new Map(GH.map(l=>[g2(l.name),l])),this.handleCanvasBoundaryPointerDown=this.handleCanvasBoundaryPointerDown.bind(this),this.handleCanvasBoundaryDoubleClick=this.handleCanvasBoundaryDoubleClick.bind(this),(a=(r=this.canvas)==null?void 0:r.addEventListener)==null||a.call(r,"pointerdown",this.handleCanvasBoundaryPointerDown,!0),(s=(o=this.canvas)==null?void 0:o.addEventListener)==null||s.call(o,"dblclick",this.handleCanvasBoundaryDoubleClick,!0),this.initEnvironment(),this.init()}init(){this.labelGroup=new Nr,this.label3d=new WFe(this),this.labelGroup.rotation.x=-Math.PI/2,this.scene.add(this.labelGroup),this.flyLineFocusGroup=new Nr,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=ka.timeline({onComplete:()=>{if(this.mapAnimationComplete=!0,this.applyLayerMapView(this.currentTopicLayer,{force:!0}),this.setTradeNationalMapVisible(!1),I4(this.currentTownRanking)){this.hideAllMapStatisticLabels();return}this.updateVillageRankingLabels(this.currentTownRanking),this.updateTradeFlowLayer(this.currentTownRanking),this.updateInfoPointStats()}});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:()=>{if(this.flyLineGroup.visible=!0,this.scatterGroup.visible=!0,this.InfoPointGroup.visible=!I4(this.currentTownRanking)&&this.showTownRankingPointMarkers&&this.hasTownRankingRows(),this.setTradeNationalMapVisible(!1),I4(this.currentTownRanking)){this.hideAllMapStatisticLabels();return}this.updateVillageRankingLabels(this.currentTownRanking),this.updateTradeFlowLayer(this.currentTownRanking),this.updateInfoPointStats()}},"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((i,r)=>{let a=i.element.querySelector(".other-label");e.to(a,{duration:1,delay:.1*r,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 i,r;this.flyLineFocusGroup.visible=!0,(r=(i=this.callbacks).onPlayComplete)==null||r.call(i)}},"focusMapOpacity"),this.showTownRankingBars&&(this.allBar.map((i,r)=>{e.to(i.scale,{duration:1,delay:.1*r,x:1,y:1,z:1,ease:"circ.out"},"bar")}),this.allBarMaterial.map((i,r)=>{e.to(i,{duration:1,delay:.1*r,opacity:1,ease:"circ.out"},"bar")}));const t=this;this.allProvinceLabel.map((i,r)=>{let a=i.element.querySelector(".provinces-label-wrap"),o=i.element.querySelector(".number .value"),s={progress:0};e.to(a,{duration:1,delay:.2*r,translateY:0,opacity:1,ease:"circ.out"},"bar"),e.to(s,{duration:1,delay:.2*r,progress:1,onStart:()=>{s.progress=0},onUpdate:l},"bar");function l(){var c,d;const u=Jr((d=(c=i.userData)==null?void 0:c.targetValue)!=null?d:o.dataset.targetValue);o.innerText=t.formatMapRankingValue(u*s.progress)}}),this.showTownRankingBars&&this.allGuangquan.map((i,r)=>{e.to(i.children[0].scale,{duration:1,delay:.1*r,x:1,y:1,z:1,ease:"circ.out"},"bar"),e.to(i.children[1].scale,{duration:1,delay:.1*r,x:1,y:1,z:1,ease:"circ.out"},"bar")})}initEnvironment(){let e=new hee(13171711,4.2);this.scene.add(e);let t=new V8(14679295,5.8);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:"#1fd6df",intensity:680,distance:1e4,x:-9,y:3,z:-3}),this.createPointLight({color:"#2af0c6",intensity:260,distance:1e4,x:0,y:2,z:5})}createPointLight(e){const t=new dee(1924702,e.intensity,e.distance);t.position.set(e.x,e.y,e.z),this.scene.add(t)}createMap(){let e=new Nr,t=new Nr;this.mapGroup=e,this.focusMapGroup=t;let{china:i,chinaTopLine:r}=this.createChina(),{map:a,mapTop:o,mapLine:s}=this.createProvince();i.setParent(e),r.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:"#0d3349",lineColor:"#39c7ef"},t=this.assets.instance.getResource("china"),i=new KC({color:new Jn(e.chinaBgMaterialColor),transparent:!0,opacity:.72}),r=new C4(this,{data:t,geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,merge:!0,material:i,renderOrder:2}),a=new ku({color:e.lineColor,transparent:!0,opacity:.58}),o=new R4(this,{data:t,geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,material:a,renderOrder:3});return o.lineGroup.position.z+=.01,{china:r,chinaTopLine:o}}createTradeNationalMap(){var d;if(this.tradeNationalMapGroup)return!0;let e=null;try{e=this.assets.instance.getResource("chinaMap")}catch(h){return console.warn("牦牛交易全国地图资源未加载",h),!1}const t=iW(e);if(!e||!((d=t==null?void 0:t.features)!=null&&d.length))return!1;const i=new Nr;i.name="trade-national-map",i.visible=!1,i.rotation.x=-Math.PI/2,i.position.set(0,.04,0);const r=new Mr({color:403001,transparent:!0,opacity:.14,side:aa,depthWrite:!1,fog:!1});new C4(this,{data:e,geoProjectionCenter:this.tradeGeoProjectionCenter,geoProjectionScale:this.tradeGeoProjectionScale,position:new Le(.05,-.05,-.03),material:r,renderOrder:17}).setParent(i);const{topMaterial:o,sideMaterial:s}=this.createTradeNationalMaterials(),l=new NH(this,{data:e,geoProjectionCenter:this.tradeGeoProjectionCenter,geoProjectionScale:this.tradeGeoProjectionScale,position:new Le(0,0,0),depth:this.tradeNationalDepth,topFaceMaterial:o,sideMaterial:s,renderOrder:20,bevelThickness:.024,bevelSegments:1});l.mapGroup.traverse(h=>{h.isMesh&&(h.renderOrder=20)}),l.setParent(i);const u=new ku({color:4777983,transparent:!0,opacity:.52,fog:!1,depthTest:!1}),c=new R4(this,{data:e,geoProjectionCenter:this.tradeGeoProjectionCenter,geoProjectionScale:this.tradeGeoProjectionScale,material:u,renderOrder:21});return c.lineGroup.position.z+=this.tradeNationalDepth+.055,c.setParent(i),this.scene.add(i),this.tradeNationalMapGroup=i,this.createTradeNationalLabels(t),!0}createTradeNationalMaterials(){const e=new dp({color:16777215,transparent:!0,opacity:.54,roughness:.84,metalness:.08,side:aa,fog:!1});new L4(e,{uColor1:827317,uColor2:403515,size:6.8,dir:"x"});const t=this.assets.instance.getResource("side").clone();t.wrapS=Eo,t.wrapT=Eo,t.repeat.set(1,1.2),t.needsUpdate=!0;const i=new dp({color:1485501,map:t,transparent:!0,opacity:.58,roughness:.78,metalness:.04,side:aa,fog:!1});return new L4(i,{uColor1:1354174,uColor2:134940,size:Math.max(this.tradeNationalDepth,.1),dir:"y"}),this.time.on("tick",()=>{t.offset.y+=.004}),{topMaterial:e,sideMaterial:i}}createTradeNationalLabels(e){this.tradeNationalLabelGroup=new Nr,this.tradeNationalLabelGroup.name="trade-national-label",this.tradeNationalLabelGroup.rotation.x=-Math.PI/2,this.tradeNationalLabelGroup.visible=!1,this.scene.add(this.tradeNationalLabelGroup),this.tradeNationalLabels=[];const t=new Set(["四川","青海","甘肃","陕西","重庆","云南","西藏","新疆"]);(e.features||[]).forEach(i=>{var l;const r=((l=i.properties)==null?void 0:l.name)||"",a=this.normalizeTradeProvinceName(r);if(!t.has(a))return;const o=this.getFeatureCenterLngLat(i);if(!o)return;const s=this.label3d.create("","trade-national-label",!0);s.init(`<div class="trade-national-name">${Us(a)}</div>`,this.getTradeLocalPoint(o.lng,o.lat,.82)),this.label3d.setLabelStyle(s,.012,"x"),s.setParent(this.tradeNationalLabelGroup),s.visible=!0,this.tradeNationalLabels.push(s)})}normalizeTradeProvinceName(e=""){return String(e).replace(/省|市|自治区|壮族|回族|维吾尔|特别行政区/g,"").trim()}getFeatureCenterLngLat(e){var a,o,s;const t=((a=e==null?void 0:e.properties)==null?void 0:a.cp)||((o=e==null?void 0:e.properties)==null?void 0:o.centroid)||((s=e==null?void 0:e.properties)==null?void 0:s.center);if(Array.isArray(t)&&Number.isFinite(Number(t[0]))&&Number.isFinite(Number(t[1])))return{lng:Number(t[0]),lat:Number(t[1])};const i=this.getGeometryCoordinateList(e==null?void 0:e.geometry);if(!i.length)return null;const r=i.reduce((l,u)=>({minLng:Math.min(l.minLng,Number(u[0])),maxLng:Math.max(l.maxLng,Number(u[0])),minLat:Math.min(l.minLat,Number(u[1])),maxLat:Math.max(l.maxLat,Number(u[1]))}),{minLng:1/0,maxLng:-1/0,minLat:1/0,maxLat:-1/0});return{lng:(r.minLng+r.maxLng)/2,lat:(r.minLat+r.maxLat)/2}}createProvince(){let e=this.assets.instance.getResource("mapJson");this.mapJsonData=e;const t=lOe({geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,zoom:uOe});this.enhanceTexture(t.texture);let[i,r]=this.createProvinceMaterial();this.focusMapTopMaterial=i,this.focusMapSideMaterial=r;let a=new NH(this,{geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,position:new Le(0,0,.11),data:e,depth:this.depth,topFaceMaterial:i,sideMaterial:r,renderOrder:9}),o=new dp({color:16777215,map:t.texture,transparent:!0,opacity:.94,roughness:.82});new L4(o,{uColor1:1629410,uColor2:757673}),this.defaultMaterial=o,this.defaultLightMaterial=this.defaultMaterial.clone(),this.defaultLightMaterial.color=new Jn("rgba(128,244,255,1)"),this.defaultLightMaterial.opacity=.9;let s=new C4(this,{geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,position:new Le(0,0,this.depth+.22),data:e,material:o,renderOrder:8});WH(s,t.uvBounds),s.mapGroup.children.map(u=>{u.children.map(c=>{c.type==="Mesh"&&this.eventElement.push(c)})}),this.mapLineMaterial=new ku({color:12254463,opacity:0,transparent:!0,fog:!1});let l=new R4(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;this.initHongyuanBoundaryPolygons();const e=document.createElement("canvas");e.width=qd.width,e.height=qd.height;const t=e.getContext("2d");t.clearRect(0,0,e.width,e.height);const i=new bR(e);i.colorSpace=$r,i.wrapS=us,i.wrapT=us,i.minFilter=ao,i.magFilter=ao,this.enhanceTexture(i),i.needsUpdate=!0;const r=new Mr({map:i,transparent:!0,opacity:0,depthWrite:!1,side:aa,fog:!1}),a=this.createLayerUvBounds(),o=new C4(this,{geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,position:new Le(0,0,this.depth+.255),data:this.mapJsonData,material:r,renderOrder:18});WH(o,a),o.setParent(this.focusMapGroup),this.topicLayerUvBounds=a,this.topicLayerCanvas=e,this.topicLayerContext=t,this.topicLayerTexture=i,this.topicLayerMaterial=r,this.topicLayerMap=o}initHongyuanBoundaryPolygons(){var t,i,r,a,o;if((t=this.hongyuanBoundaryPolygons)!=null&&t.length)return;const e=iW((r=(i=this.assets)==null?void 0:i.instance)==null?void 0:r.getResource("mapStroke"));this.hongyuanBoundaryPolygons=rW((o=(a=e==null?void 0:e.features)==null?void 0:a[0])==null?void 0:o.geometry)}createSelectedFeatureGroup(){var e;this.selectedFeatureGroup||(this.selectedFeatureGroup=new Nr,this.selectedFeatureGroup.name="selected-feature-highlight",this.selectedFeatureGroup.position.z=this.depth+.31,(e=this.focusMapGroup)==null||e.add(this.selectedFeatureGroup))}createLayerUvBounds(){const e=Ic().center(this.geoProjectionCenter).scale(this.geoProjectionScale).translate([0,0]),[t]=e([lr.west,lr.south]),[i]=e([lr.east,lr.south]),[,r]=e([lr.west,lr.north]),[,a]=e([lr.west,lr.south]);return{left:t,right:i,bottom:-a,top:-r}}setTopicLayer(e){var r,a;if(!e||!this.topicLayerContext||!this.topicLayerTexture)return;this.currentTopicLayer=e,this.visibleTopicLayers=[e],this.clearSelectedFeature(),this.applyLayerMapView(e);const t=++this.topicLayerLoadId;if(this.currentVectorFeatures=[],this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=0,(a=(r=this.callbacks).onLayerStatus)==null||a.call(r,{type:"loading",text:`正在加载 ${e.name}`}),D4(e)){this.loadVectorTopicLayer(e,t);return}const i=new Image;i.crossOrigin="anonymous",i.onload=()=>{var o,s,l;t===this.topicLayerLoadId&&(this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerContext.drawImage(i,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 图层已加载"}))},i.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 图层加载失败"}))},i.src=YH(e)}setTopicLayers(e=[],t=e[0]){var o,s,l,u;if(!this.topicLayerContext||!this.topicLayerTexture)return;const i=e.filter(Boolean);if(!i.length){this.topicLayerLoadId+=1,this.visibleTopicLayers=[],this.currentTopicLayer=null,this.currentVectorFeatures=[],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(i.length===1){this.setTopicLayer(wt(wt({},i[0]),(t==null?void 0:t.key)===i[0].key?t:{}));return}this.currentTopicLayer=t||i[i.length-1],this.visibleTopicLayers=i,this.clearSelectedFeature(),this.applyLayerMapView(this.currentTopicLayer);const r=++this.topicLayerLoadId;this.currentVectorFeatures=[],this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=0,(u=(l=this.callbacks).onLayerStatus)==null||u.call(l,{type:"loading",text:`正在加载 ${i.length} 个林地图层`});const a=i.filter(c=>!D4(c));Promise.all(a.map(c=>this.loadTopicLayerImage(c))).then(c=>{var h,f;if(r!==this.topicLayerLoadId)return;const d=c.filter(Boolean);this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),d.forEach(({image:p,layer:m},v)=>{var _,S;this.topicLayerContext.save();const g=v===d.length-1?Math.max(.78,(_=m.opacity)!=null?_:.9):Math.min(.52,(S=m.opacity)!=null?S:.52);this.topicLayerContext.globalAlpha=Math.min(1,Math.max(.28,g)),this.topicLayerContext.drawImage(p,0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerContext.restore()}),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=d.length?1:0,(f=(h=this.callbacks).onLayerStatus)==null||f.call(h,{type:d.length?"success":"error",text:d.length?`已加载 ${d.length} 个林地图层`:"林地图层加载失败"})})}loadTopicLayerImage(e){return new Promise(t=>{const i=new Image;i.crossOrigin="anonymous",i.onload=()=>t({image:i,layer:e}),i.onerror=()=>t(null),i.src=YH(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 i=(e==null?void 0:e.mapView)||(e!=null&&e.cameraPosition?{cameraPosition:e.cameraPosition}:null),r=i?this.getLayerMapViewTarget(i):this.defaultMapTarget.clone(),a=i?this.getLayerMapViewCameraPosition(i,r):this.defaultMapCameraPosition.clone(),o=i&&Number.isFinite(i.duration)?i.duration:.75;this.animateMapCamera(a,r,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 i=Number.isFinite(e==null?void 0:e.distanceScale)?e.distanceScale:1,r=this.defaultMapCameraPosition.clone().sub(this.defaultMapTarget).multiplyScalar(i),a=t.clone().add(r);return e!=null&&e.cameraOffset&&a.add(this.toVector3(e.cameraOffset,new Le(0,0,0))),a}lngLatToWorldPoint(e,t=0){const i=Array.isArray(e)?e:[e==null?void 0:e.lng,e==null?void 0:e.lat],r=Number(i==null?void 0:i[0]),a=Number(i==null?void 0:i[1]);if(!Number.isFinite(r)||!Number.isFinite(a))return this.defaultMapTarget.clone();const[o,s]=this.geoProjection([r,a]),l=new Le(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 Le(o,s,l):t.clone()}const i=Number(e==null?void 0:e.x),r=Number(e==null?void 0:e.y),a=Number(e==null?void 0:e.z);return[i,r,a].every(Number.isFinite)?new Le(i,r,a):t.clone()}animateMapCamera(e,t,i=.75){this.activeMapViewTweens.forEach(o=>{var s;return(s=o==null?void 0:o.kill)==null?void 0:s.call(o)}),this.activeMapViewTweens=[];const r=this.camera.controls,a=()=>r.update();this.activeMapViewTweens.push(ka.to(this.camera.instance.position,{duration:i,x:e.x,y:e.y,z:e.z,ease:"power2.out",onUpdate:a}),ka.to(r.target,{duration:i,x:t.x,y:t.y,z:t.z,ease:"power2.out",onUpdate:a}))}focusTownByName(e,t={}){var o,s,l;const i=this.townMetaByName.get(g2(e));if(!(i!=null&&i.center))return!1;const r=this.lngLatToWorldPoint(i.center,(o=t.targetLocalZ)!=null?o:.82),a=this.getLayerMapViewCameraPosition({distanceScale:(s=t.distanceScale)!=null?s:.82,cameraOffset:t.cameraOffset||{x:0,y:1.2,z:0}},r);return this.animateMapCamera(a,r,(l=t.duration)!=null?l:.75),!0}loadVectorTopicLayer(e,t){return rn(this,null,function*(){var i,r,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=(i=e.opacity)!=null?i:.9,(a=(r=this.callbacks).onLayerStatus)==null||a.call(r,{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 rn(this,null,function*(){var i;if(e.sourceType==="geojson"){if(((i=e.geojsonData)==null?void 0:i.type)==="FeatureCollection")return e.geojsonData;const r=yield fetch(nW(e.dataPath),{credentials:"include"});if(!r.ok)throw new Error(`HTTP ${r.status}`);return yield r.json()}if(e.sourceType==="wfs"){const r=yield s3(e.layerName,{cqlFilter:e.cqlFilter,maxFeatures:e.maxFeatures||1200,timeout:e.timeout||18e3});return(r==null?void 0:r.type)==="FeatureCollection"?r:{type:"FeatureCollection",features:(r==null?void 0:r.features)||[]}}let t=[];try{const r=yield fetch(e.apiUrl,{credentials:"include"});if(!r.ok)throw new Error(`HTTP ${r.status}`);const a=yield r.json();t=Array.isArray(a==null?void 0:a.data)?a.data:[]}catch(r){const a=yield fetch(nW(e.fallbackPath),{credentials:"include"});if(!a.ok)throw r;const o=yield a.json();t=Array.isArray(o==null?void 0:o.rows)?o.rows:[]}return{type:"FeatureCollection",features:t.map(r=>({type:"Feature",properties:{id:r.id,type:r.type,totalAcreage:r.totalAcreage,cdAcreage:r.cdAcreage,sdAcreage:r.sdAcreage,cdScl:r.cdScl,sdScl:r.sdScl},geometry:this.parseWktGeometry(r.wkt)})).filter(r=>r.geometry)}})}drawVectorTopicLayer(e,t){const i=this.topicLayerContext;i.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),i.save(),i.lineJoin="round",i.lineCap="round",this.clipVectorLayerContext(i,e),this.getVisibleVectorFeatures(e,t).sort((o,s)=>{var c,d;const l=this.getGeometryDrawRank((c=o.geometry)==null?void 0:c.type),u=this.getGeometryDrawRank((d=s.geometry)==null?void 0:d.type);return l-u}).forEach(o=>{const s=this.getVectorFeatureStyle(e,o);this.drawVectorFeature(i,o.geometry,s)}),this.drawSelectedVectorOverlay(i),i.restore()}drawSelectedVectorOverlay(e){const t=this.selectedVectorFeatures||[],i=this.analysisMatchedFeatures||[],r=this.analysisBoundaryFeature,a=this.boundaryDrawPoints||[];if(!t.length&&!i.length&&!r&&!a.length)return;const o={fill:"#FFE15A",stroke:"#24F6C4",polygonAlpha:.24,lineAlpha:.98,lineWidth:12,pointRadius:11,glow:!0,halo:!0},s={fill:"#FFF06A",stroke:"#FFFDF2",polygonAlpha:.46,lineAlpha:1,lineWidth:5,pointRadius:6.5,glow:!1,halo:!1};if(e.save(),t.forEach(l=>{var c;const u=(l==null?void 0:l.geometry)||((c=l==null?void 0:l.feature)==null?void 0:c.geometry);this.drawVectorFeature(e,u,o),this.drawVectorFeature(e,u,s)}),i.forEach(l=>{var c;const u=(l==null?void 0:l.geometry)||((c=l==null?void 0:l.feature)==null?void 0:c.geometry);this.drawVectorFeature(e,u,{fill:"#FF8A3D",stroke:"#FFE15A",polygonAlpha:.28,lineAlpha:.98,lineWidth:5,pointRadius:6,glow:!0})}),r!=null&&r.geometry&&this.drawVectorFeature(e,r.geometry,{fill:"#24F6C4",stroke:"#FFFFFF",polygonAlpha:.18,lineAlpha:1,lineWidth:4,pointRadius:6,glow:!0}),a.length){const l=a.map(c=>[c.lng,c.lat]),u={type:"LineString",coordinates:this.boundaryDrawingEnabled?l:[...l,l[0]].filter(Boolean)};this.drawVectorFeature(e,u,{fill:"#24F6C4",stroke:"#24F6C4",polygonAlpha:.12,lineAlpha:1,lineWidth:4,pointRadius:6,glow:!0}),l.forEach(c=>{this.drawVectorFeature(e,{type:"Point",coordinates:c},{fill:"#FFFFFF",stroke:"#24F6C4",polygonAlpha:.2,lineAlpha:1,lineWidth:3,pointRadius:5.5,glow:!0})})}e.restore()}redrawVectorTopicLayer(){!this.topicLayerContext||!this.topicLayerTexture||!this.currentTopicLayer||!D4(this.currentTopicLayer)||(this.drawVectorTopicLayer(this.currentTopicLayer,this.currentVectorFeatures||[]),this.topicLayerTexture.needsUpdate=!0)}getVisibleVectorFeatures(e,t){const i=e==null?void 0:e.activeLegend,r=i==null?void 0:i.match;if(r!=null&&r.field)return(t||[]).filter(s=>{var l,u;return String((u=(l=s==null?void 0:s.properties)==null?void 0:l[r.field])!=null?u:"")===String(r.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 d,h;return String((h=(d=c==null?void 0:c.properties)==null?void 0:d[s])!=null?h:"")===u})}return[...t||[]]}clipVectorLayerContext(e,t){this.clipContextToHongyuanBoundary(e);const i=this.getLayerClipBounds(t);if(!i)return;const r=this.lngLatToLayerCanvasPoint([i.west,i.north]),a=this.lngLatToLayerCanvasPoint([i.east,i.south]),o=Math.min(r.x,a.x),s=Math.min(r.y,a.y),l=Math.abs(a.x-r.x),u=Math.abs(a.y-r.y);!l||!u||(e.beginPath(),e.rect(o,s,l,u),e.clip())}clipContextToHongyuanBoundary(e){const t=this.hongyuanBoundaryPolygons||[];t.length&&(e.beginPath(),t.forEach(i=>{i.forEach(r=>{r.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.clip("evenodd"))}shouldClipLayerToHongyuanBoundary(e=this.currentTopicLayer){const t=String((e==null?void 0:e.key)||"");return!!(e!=null&&e.clipToHongyuanBoundary||t==="national-park-zoning"||t.startsWith("yak-"))}shouldClipLayerToLayerBounds(e=this.currentTopicLayer){return!!(e!=null&&e.clipBounds&&(e==null?void 0:e.key)==="national-park-zoning")}isLngLatInHongyuanBoundary(e){const t=this.hongyuanBoundaryPolygons||[];return t.length?t.some(i=>this.isLngLatInPolygon(e,i)):!0}isLngLatInLayerClipBounds(e,t=this.currentTopicLayer){const i=this.getLayerClipBounds(t);return i?e.lng>=i.west&&e.lng<=i.east&&e.lat>=i.south&&e.lat<=i.north:!0}getLayerClipBounds(e){const t=e==null?void 0:e.clipBounds;if(!t)return null;const i=Math.max(Number(t.west),lr.west),r=Math.max(Number(t.south),lr.south),a=Math.min(Number(t.east),lr.east),o=Math.min(Number(t.north),lr.north);return![i,r,a,o].every(Number.isFinite)||i>=a||r>=o?null:{west:i,south:r,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 i=t.properties||{},a=(e.legends||[]).find(d=>{var f;const h=d.match;return h?String((f=i[h.field])!=null?f:"")===String(h.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(e==null?void 0:e.key)==="yak-epidemic-village-boundary"?{fill:a.fillColor||"#24F6C4",stroke:a.strokeColor||"#FFF06A",polygonAlpha:.16,lineAlpha:1,lineWidth:5,pointRadius:4.5,glow:!0}:(e==null?void 0:e.key)==="yak-industry-points"?{fill:a.fillColor||"#24F6C4",stroke:a.strokeColor||a.fillColor||"#B7FFF2",polygonAlpha:.36,lineAlpha:.82,lineWidth:1.6,pointRadius:this.getVectorPointRadius(e,t),glow:!0,halo:!0}:{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:s?this.getVectorPointRadius(e,t):4.5,glow:!0}}getVectorPointRadius(e,t){var r,a;const i=Number(((r=t==null?void 0:t.properties)==null?void 0:r.count)||((a=t==null?void 0:t.properties)==null?void 0:a.value)||0);return(e==null?void 0:e.key)==="yak-recognition-layer"?Math.max(3.8,Math.min(8.6,3.6+Math.sqrt(i)/68)):(e==null?void 0:e.key)==="yak-industry-points"?4.8:4.5}drawVectorFeature(e,t,i){if(t!=null&&t.coordinates){if(t.type==="Polygon"){this.drawPolygonPath(e,t.coordinates,i);return}if(t.type==="MultiPolygon"){t.coordinates.forEach(r=>this.drawPolygonPath(e,r,i));return}if(t.type==="LineString"){this.drawLinePath(e,t.coordinates,i);return}if(t.type==="MultiLineString"){t.coordinates.forEach(r=>this.drawLinePath(e,r,i));return}t.type==="Point"&&this.drawPointPath(e,t.coordinates,i)}}drawPolygonPath(e,t,i){Array.isArray(t==null?void 0:t[0])&&(e.save(),e.beginPath(),t.forEach(r=>{r.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(i.fill,i.polygonAlpha),e.strokeStyle=this.hexToRgba(i.stroke,i.lineAlpha),e.lineWidth=i.lineWidth,i.glow&&(e.shadowColor=i.stroke,e.shadowBlur=14),e.fill("evenodd"),e.stroke(),e.restore())}drawLinePath(e,t,i){!Array.isArray(t)||t.length<2||(e.save(),e.beginPath(),t.forEach((r,a)=>{const o=this.lngLatToLayerCanvasPoint(r);a===0?e.moveTo(o.x,o.y):e.lineTo(o.x,o.y)}),e.strokeStyle=this.hexToRgba(i.stroke,i.lineAlpha),e.lineWidth=i.lineWidth,e.shadowColor=i.stroke,e.shadowBlur=12,e.stroke(),e.restore())}drawPointPath(e,t,i){var a;const r=this.lngLatToLayerCanvasPoint(t);e.save(),i.halo&&(e.beginPath(),e.arc(r.x,r.y,i.pointRadius*2.35,0,Math.PI*2),e.fillStyle=this.hexToRgba(i.fill,.18),e.shadowColor=i.fill,e.shadowBlur=18,e.fill()),e.beginPath(),e.arc(r.x,r.y,i.pointRadius,0,Math.PI*2),e.fillStyle=this.hexToRgba(i.fill,.96),e.shadowColor=i.stroke,e.shadowBlur=i.halo?8:12,e.fill(),i.lineWidth&&(e.lineWidth=i.lineWidth,e.strokeStyle=this.hexToRgba(i.stroke,(a=i.lineAlpha)!=null?a:.9),e.stroke()),e.restore()}lngLatToLayerCanvasPoint(e){const t=Number(e==null?void 0:e[0]),i=Number(e==null?void 0:e[1]);return{x:(t-lr.west)/(lr.east-lr.west)*this.topicLayerCanvas.width,y:(lr.north-i)/(lr.north-lr.south)*this.topicLayerCanvas.height}}hexToRgba(e,t=1){const i=String(e||"#30DCFF").replace("#",""),r=i.length===3?i.split("").map(u=>u+u).join(""):i,a=Number.parseInt(r,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 i=t.match(/^([A-Z]+)(?:\s+[A-Z]+)?\s*\(/i),r=(o=i==null?void 0:i[1])==null?void 0:o.toUpperCase();if(!r)return null;const a=t.slice(t.indexOf("("));return r==="POLYGON"?{type:"Polygon",coordinates:this.parseWktPolygonBody(a)}:r==="MULTIPOLYGON"?{type:"MultiPolygon",coordinates:this.parseWktMultiPolygonBody(a)}:r==="POINT"?{type:"Point",coordinates:this.parseWktPoint(a)}:r==="MULTIPOINT"?{type:"MultiPoint",coordinates:this.getWktChildGroups(a).map(s=>this.parseWktPoint(s)).filter(Boolean)}:r==="LINESTRING"?{type:"LineString",coordinates:this.parseWktRing(a)}:r==="MULTILINESTRING"?{type:"MultiLineString",coordinates:this.getWktChildGroups(a).map(s=>this.parseWktRing(s)).filter(s=>s.length)}: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(),i=t.startsWith("(")&&t.endsWith(")")?t.slice(1,-1):t,r=[];let a=0,o=-1;for(let s=0;s<i.length;s+=1){const l=i[s];l==="("?(a===0&&(o=s),a+=1):l===")"&&(a-=1,a===0&&o>=0&&(r.push(i.slice(o,s+1)),o=-1))}return r.length?r:[i]}parseWktRing(e){return String(e||"").replace(/^\(+|\)+$/g,"").split(",").map(i=>i.trim().split(/\s+/).slice(0,2).map(Number)).filter(([i,r])=>Number.isFinite(i)&&Number.isFinite(r))}parseWktPoint(e){const t=String(e||"").replace(/^\(+|\)+$/g,"").trim().split(/\s+/).slice(0,2).map(Number);return t.length>=2&&Number.isFinite(t[0])&&Number.isFinite(t[1])?[t[0],t[1]]:null}createProvinceMaterial(){let e=new KC({color:16777215,transparent:!0,opacity:0,fog:!1,side:aa});e.onBeforeCompile=r=>{r.uniforms=tn(wt({},r.uniforms),{uColor1:{value:new Jn(2152676)},uColor2:{value:new Jn(475482)}}),r.vertexShader=r.vertexShader.replace("void main() {",`
attribute float alpha;
varying vec3 vPosition;
varying float vAlpha;
void main() {
vAlpha = alpha;
vPosition = position;
`),r.fragmentShader=r.fragmentShader.replace("void main() {",`
varying vec3 vPosition;
varying float vAlpha;
uniform vec3 uColor1;
uniform vec3 uColor2;
void main() {
`),r.fragmentShader=r.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 * vec3(1.18), outgoingLight * gradient, 0.32);
float topAlpha = 0.92;
if(vPosition.z>0.3){
diffuseColor.a *= topAlpha;
}
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
`)};let t=this.assets.instance.getResource("side");t.wrapS=Eo,t.wrapT=Eo,t.repeat.set(1,1.8),t.offset.y+=.065;let i=new dp({color:2148829,map:t,fog:!1,opacity:0,side:aa,roughness:.58,metalness:.08});return this.time.on("tick",()=>{t.offset.y+=.005}),i.onBeforeCompile=r=>{r.uniforms=tn(wt({},r.uniforms),{uColor1:{value:new Jn(1629410)},uColor2:{value:new Jn(205365)}}),r.vertexShader=r.vertexShader.replace("void main() {",`
attribute float alpha;
varying vec3 vPosition;
varying float vAlpha;
void main() {
vAlpha = alpha;
vPosition = position;
`),r.fragmentShader=r.fragmentShader.replace("void main() {",`
varying vec3 vPosition;
varying float vAlpha;
uniform vec3 uColor1;
uniform vec3 uColor2;
void main() {
`),r.fragmentShader=r.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*vec3(1.12);
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
`)},[e,i]}getDefaultTownRanking(){return{title:"乡镇统计加载中",unit:"",rows:GH.map(e=>({name:e.name,value:0,unit:""}))}}getTownRankingMeta(e=this.currentTownRanking){var r,a;const t=this.getDefaultTownRanking(),i=MOe(e);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)||"",hideTownNames:tW(e),hideMapLabels:I4(e),calloutMode:i,showBars:(r=e==null?void 0:e.showBars)!=null?r:!1,showPointMarkers:(a=e==null?void 0:e.showPointMarkers)!=null?a:i}}getTownRankingRows(e=this.currentTownRanking,t=7,i=!0){var l;const r=this.getDefaultTownRanking(),a=(l=e==null?void 0:e.rows)!=null&&l.length?e.rows:i?r.rows:[],o=this.getTownRankingMeta(e),s=a.map(u=>{const c=this.townMetaByName.get(g2(u.name));return c?tn(wt(wt({},c),u),{name:c.name,enName:c.enName,center:c.center,centroid:c.centroid,value:Jr(u.value),unit:u.unit||o.unit,metricTitle:o.title}):null}).filter(Boolean).sort((u,c)=>c.value-u.value).map((u,c)=>tn(wt({},u),{rank:c+1}));return Number.isFinite(t)?s.slice(0,t):s}getVillageRankingRows(e=this.currentTownRanking){const t=this.getTownRankingMeta(e);return((e==null?void 0:e.rows)||[]).map((i,r)=>{var u,c,d,h,f,p,m,v;const a=Jr((u=i.lng)!=null?u:i.longitude,NaN),o=Jr((c=i.lat)!=null?c:i.latitude,NaN);if(!Number.isFinite(a)||!Number.isFinite(o))return null;const s=Jr((d=i.displayValue)!=null?d:i.value),l=Jr((p=(f=(h=i.rawValue)!=null?h:i.earTagCount)!=null?f:i.ear_tag_count)!=null?p:i.value);return tn(wt({},i),{key:i.key||`${i.town||""}-${i.village||i.name||r}`,name:i.name||i.village||`村${r+1}`,town:i.town||"",lng:a,lat:o,value:s,rawValue:l,recordCount:Jr((m=i.recordCount)!=null?m:i.record_count,0),imageRate:Jr((v=i.imageRate)!=null?v:i.image_rate,0),unit:i.displayUnit||i.unit||t.unit,metricTitle:t.title,metricLabel:i.metricLabel||t.metricLabel||""})}).filter(Boolean).sort((i,r)=>r.rawValue-i.rawValue).map((i,r)=>tn(wt({},i),{rank:r+1}))}getVillageRankingHtml(e,t){const i=t.hideTownNames?"":`<span>${Us(e.town||"红原县")}</span>`;return e.displayMode==="park-village"||t.displayMode==="park-village"?`<div class="epidemic-village-card is-park-village ${e.rank>8?"is-small":""}">
<div class="village-card-head">
<strong>${Us(e.name)}</strong>
${i}
</div>
<div class="village-card-body">
<span class="metric">${Us(e.metricLabel||t.metricLabel||"")}</span>
<span class="number">${this.formatMapRankingValue(e.value)}</span>
<span class="unit">${Us(e.unit||t.unit||"")}</span>
</div>
</div>`:`<div class="epidemic-village-card ${e.rank>8?"is-small":""}">
<div class="village-card-head">
<strong>${Us(e.name)}</strong>
${i}
</div>
<div class="village-card-body">
<span class="metric">${Us(e.metricLabel||"防疫")}</span>
<span class="number">${this.formatMapRankingValue(e.value)}</span>
<span class="unit">${Us(e.unit||t.unit||"")}</span>
</div>
<div class="village-card-foot">
<span>台账 ${this.formatMapCompactValue(e.recordCount)}条</span>
<span>耳标 ${this.formatMapCompactValue(e.rawValue)}头</span>
</div>
</div>`}ensureVillageRankingGroup(){this.villageRankingGroup||(this.villageRankingGroup=new Nr,this.villageRankingGroup.rotation.x=-Math.PI/2,this.villageRankingGroup.visible=!1,this.scene.add(this.villageRankingGroup),this.villageRankingLabels=[])}hideVillageRankingLabels(){var e;this.villageRankingGroup&&(this.villageRankingGroup.visible=!1),(e=this.villageRankingLabels)==null||e.forEach(t=>{t.visible=!1})}hideAllMapStatisticLabels(){var e,t,i,r;this.updateTownNameLabelStats(null),this.setTownNameLabelsVisible(!1),this.hideVillageRankingLabels(),this.hideTradeFlowLayer(),this.clearInfoPointStats(),(e=this.allProvinceLabel)==null||e.forEach(a=>{a.visible=!1}),(t=this.allBar)==null||t.forEach(a=>{a.visible=!1,a.scale.set(1,1,0)}),(i=this.allBarMaterial)==null||i.forEach(a=>{a.opacity=0}),(r=this.allGuangquan)==null||r.forEach(a=>{a.visible=!1})}setTownNameLabelsVisible(e=!0){var t;(t=this.townNameLabels)==null||t.forEach(i=>{i.visible=e})}updateVillageRankingLabels(e=this.currentTownRanking){if(this.ensureVillageRankingGroup(),!QH(e)){this.hideVillageRankingLabels();return}const t=this.getVillageRankingRows(e),i=this.getTownRankingMeta(e);if(!t.length){this.hideVillageRankingLabels();return}this.villageRankingGroup.visible=this.mapAnimationComplete,t.forEach((r,a)=>{let o=this.villageRankingLabels[a];o||(o=this.label3d.create("","epidemic-village-label",!0),this.label3d.setLabelStyle(o,.0135,"x"),o.setParent(this.villageRankingGroup),this.villageRankingLabels.push(o));const[s,l]=this.geoProjection([r.lng,r.lat]),u=(a%3-1)*.06,c=Math.floor(a/3)%2*.04;o.init(this.getVillageRankingHtml(r,i),new Le(s+u,-l+c,this.depth+1.55+Math.min(a,6)*.015)),o.visible=!0,o.userData=wt({},r)}),this.villageRankingLabels.slice(t.length).forEach(r=>{r.visible=!1})}ensureTradeFlowGroup(){this.tradeFlowGroup||(this.tradeFlowGroup=new Nr,this.tradeFlowGroup.name="yak-trade-flow",this.tradeFlowGroup.visible=!1,this.tradeFlowMeshGroup=new Nr,this.tradeFlowMeshGroup.name="yak-trade-flow-mesh",this.tradeFlowMeshGroup.rotation.x=-Math.PI/2,this.tradeFlowLabelGroup=new Nr,this.tradeFlowLabelGroup.name="yak-trade-flow-label",this.tradeFlowLabelGroup.rotation.x=-Math.PI/2,this.tradeFlowGroup.add(this.tradeFlowMeshGroup,this.tradeFlowLabelGroup),this.scene.add(this.tradeFlowGroup))}hideTradeFlowLayer(){var e,t;this.tradeFlowGroup&&(this.tradeFlowGroup.visible=!1),(e=this.tradeFlowLabels)==null||e.forEach(i=>{i.visible=!1}),(t=this.tradeFlowPulseSprites)==null||t.forEach(i=>{i.visible=!1})}clearTradeFlowLayer(){this.tradeFlowMeshGroup&&(this.tradeFlowMeshGroup.children.forEach(e=>{var t;(t=e.traverse)==null||t.call(e,i=>this.disposeObject3D(i))}),this.tradeFlowMeshGroup.clear(),this.tradeFlowMaterials=[],this.tradeFlowPulseSprites=[])}getTradeFlowSource(e=this.currentTownRanking){var a,o,s,l;const t=(e==null?void 0:e.source)||{},i=Jr((a=t.lng)!=null?a:t.longitude,NaN),r=Jr((o=t.lat)!=null?o:t.latitude,NaN);return!Number.isFinite(i)||!Number.isFinite(r)?null:{name:t.name||"红原牦牛交易市场",lng:i,lat:r,total:Jr((l=(s=t.total)!=null?s:t.headCount)!=null?l:t.value,NaN)}}getTradeFlowRows(e=this.currentTownRanking){const t=this.getTownRankingMeta(e);return((e==null?void 0:e.rows)||[]).map((i,r)=>{var h,f,p,m,v,g;const a=Jr((h=i.lng)!=null?h:i.longitude,NaN),o=Jr((f=i.lat)!=null?f:i.latitude,NaN),s=Jr((v=(m=(p=i.headCount)!=null?p:i.head_count)!=null?m:i.rawValue)!=null?v:i.value),l=i.displayName||i.display_name||i.name,u=i.mapTownName||i.map_town_name||i.town||i.startTown||i.start_town||l,c=this.townMetaByName.get(g2(u)),d=Number.isFinite(a)&&Number.isFinite(o)?{lng:a,lat:o}:c!=null&&c.center?{lng:c.center[0],lat:c.center[1]}:null;return!d||!Number.isFinite(s)?null:tn(wt(wt({},i),c),{key:i.key||`${(c==null?void 0:c.name)||l||u||"trade-source"}-${r}`,name:l||u||(c==null?void 0:c.name)||`来源${r+1}`,townName:(c==null?void 0:c.name)||u,lng:d.lng,lat:d.lat,labelSide:i.labelSide||i.label_side||this.getTradeSourceLabelSide(c,r),value:s,headCount:s,recordCount:Jr((g=i.recordCount)!=null?g:i.record_count,0),unit:i.unit||t.unit||"头"})}).filter(Boolean).sort((i,r)=>r.value-i.value).map((i,r)=>tn(wt({},i),{rank:r+1}))}getTradeMarketHtml(e,t){const i=Number.isFinite(e.total)?e.total:t.reduce((r,a)=>r+Jr(a.value),0);return`<div class="trade-market-card">
<div class="market-title">${Us(e.name)}</div>
<div class="market-total"><span>${this.formatMapIntegerValue(i)}</span><em>头</em></div>
</div>`}getTradeFlowDisplayName(e=""){const t=String(e||"").replace(/^.*红原县/,"").replace(/\s+/g,"");return t.length>7?`${t.slice(0,7)}…`:t||"来源区域"}getTradeFlowLabelHtml(e){return`<div class="trade-flow-card${e.labelSide?` is-${String(e.labelSide).replace(/[^a-z0-9-]/gi,"")}`:""}">
<div class="flow-head"><span>${String(e.rank).padStart(2,"0")}</span><strong>${Us(this.getTradeFlowDisplayName(e.name))}</strong></div>
<div class="flow-body"><em>${this.formatMapIntegerValue(e.value)}</em><b>${Us(e.unit||"头")}</b></div>
</div>`}getTradeFlowLabelOffset(e,t){return{left:new Le(-.96,.14+t%2*.14,0),right:new Le(.92,.12-t%2*.12,0),top:new Le(-.34+t%2*.58,.58,0),bottom:new Le(-.32+t%2*.56,-.56,0),"top-left":new Le(-.9,.56,0),"top-right":new Le(.84,.56,0),"bottom-left":new Le(-.9,-.52,0),"bottom-right":new Le(.84,-.52,0)}[e.labelSide]||[new Le(-.96,.26,0),new Le(.92,.14,0),new Le(-.86,-.34,0),new Le(.86,-.32,0)][t%4]}getTradeSourceLabelSide(e,t=0){var a,o;const i=Number((a=e==null?void 0:e.center)==null?void 0:a[0]),r=Number((o=e==null?void 0:e.center)==null?void 0:o[1]);return Number.isFinite(i)&&i<this.geoProjectionCenter[0]-.16?t%2?"top-left":"left":Number.isFinite(i)&&i>this.geoProjectionCenter[0]+.22?t%2?"bottom-right":"right":Number.isFinite(r)&&r>this.geoProjectionCenter[1]+.24?t%2?"top-right":"top":Number.isFinite(r)&&r<this.geoProjectionCenter[1]-.28?t%2?"bottom-left":"bottom":["right","left","top","bottom"][t%4]}getTradeLocalPoint(e,t,i=0){const[r,a]=this.geoProjection([e,t]);return new Le(r,-a,this.depth+i)}getTradeFlowPoint(e,t=0){return this.getTradeLocalPoint(e.lng,e.lat,t)}getLocalTradeFlowCurve(e,t,i){const r=this.getTradeFlowPoint(e,.76),a=this.getTradeLocalPoint(t.lng,t.lat,.86),o=r.clone().lerp(a,.5),s=r.distanceTo(a);o.z+=Math.max(.32,Math.min(.82,s*.22+i*.012));const l=new Le(-(a.y-r.y),a.x-r.x,0);return l.lengthSq()>0&&(l.normalize().multiplyScalar((i%2===0?1:-1)*Math.min(.18,.05+s*.02)),o.add(l)),new TR([r,o,a])}tradeGeoProjection(e){return Ic().center(this.tradeGeoProjectionCenter).scale(this.tradeGeoProjectionScale).translate([0,0])(e)}setTradeNationalMapVisible(e){const t=!!e;if(!(!t&&!this.isTradeNationalMapActive&&!this.tradeNationalMapGroup&&!this.tradeFlowGroup)){if(t&&!this.createTradeNationalMap()){this.isTradeNationalMapActive=!1;return}this.isTradeNationalMapActive=t,this.tradeNationalMapGroup&&(this.tradeNationalMapGroup.visible=t&&this.mapAnimationComplete),this.tradeNationalLabelGroup&&(this.tradeNationalLabelGroup.visible=t&&this.mapAnimationComplete),this.mapGroup&&(this.mapGroup.visible=!t),this.labelGroup&&(this.labelGroup.visible=!t),this.flyLineGroup&&(this.flyLineGroup.visible=!t&&this.mapAnimationComplete),this.flyLineFocusGroup&&(this.flyLineFocusGroup.visible=!t&&this.mapAnimationComplete),this.scatterGroup&&(this.scatterGroup.visible=!t&&this.mapAnimationComplete),this.topicLayerMaterial&&t&&(this.topicLayerMaterial.opacity=0),t&&this.mapAnimationComplete?this.animateMapCamera(new Le(0,11.4,16.2),new Le(0,-.05,0),.65):!t&&this.mapAnimationComplete&&this.applyLayerMapView(this.currentTopicLayer,{force:!0})}}createTradeSourceMarker(e,t,i,r){const a=new Jn(t%3===1?16766828:t%3===2?2617536:3202303),o=this.getTradeFlowPoint(e,.72);if(r){const p=this.getLocalTradeFlowCurve(e,r,t),m=new Mr({color:a,transparent:!0,opacity:.42,depthWrite:!1,depthTest:!1,fog:!1,blending:Mo}),v=.012+Math.min(.012,Jr(e.value)/Math.max(i,1)*.01),g=new fr(new u7(p,48,v,8,!1),m);g.renderOrder=31,this.tradeFlowMeshGroup.add(g),this.tradeFlowMaterials.push(m);const _=new T2({map:this.assets.instance.getResource("point"),color:a,transparent:!0,opacity:.92,depthWrite:!1,depthTest:!1,fog:!1,blending:Mo}),S=new ug(_),x=.12+Math.min(.08,Jr(e.value)/Math.max(i,1)*.06);S.renderOrder=36,S.scale.set(x,x,x),S.userData={curve:p,phase:t*.13%1,speed:.16+Math.min(.16,Jr(e.value)/Math.max(i,1)*.12)},S.position.copy(p.getPointAt(S.userData.phase)),this.tradeFlowPulseSprites.push(S),this.tradeFlowMeshGroup.add(S)}const s=new T2({map:this.assets.instance.getResource("point"),color:a,transparent:!0,opacity:.95,depthWrite:!1,depthTest:!1,fog:!1,blending:Mo}),l=new ug(s),u=.22+Math.min(.34,Jr(e.value)/Math.max(i,1)*.28);l.renderOrder=34,l.scale.set(u,u,u),l.position.copy(o),this.tradeFlowMeshGroup.add(l);const c=this.assets.instance.getResource("guangquan1"),d=new Mr({map:c,alphaMap:c,color:a,transparent:!0,opacity:.52,depthWrite:!1,depthTest:!1,fog:!1,blending:Mo,side:aa}),h=.38+Math.min(.36,Jr(e.value)/Math.max(i,1)*.28),f=new fr(new Al(h,h),d);f.renderOrder=29,f.position.copy(this.getTradeFlowPoint(e,.5)),this.tradeFlowMeshGroup.add(f)}createTradeMarketMarker(e){const t=this.assets.instance.getResource("point"),i=this.assets.instance.getResource("guangquan1"),r=this.getTradeLocalPoint(e.lng,e.lat,.82),a=new T2({map:t,color:16773997,transparent:!0,opacity:1,depthWrite:!1,depthTest:!1,fog:!1,blending:Mo}),o=new ug(a);o.renderOrder=35,o.scale.set(.34,.34,.34),o.position.copy(r),this.tradeFlowMeshGroup.add(o);const s=new Mr({map:i,alphaMap:i,color:16773997,transparent:!0,opacity:.72,depthWrite:!1,depthTest:!1,fog:!1,blending:Mo,side:aa}),l=new fr(new Al(.58,.58),s);l.renderOrder=29,l.position.copy(this.getTradeLocalPoint(e.lng,e.lat,.58)),this.tradeFlowMeshGroup.add(l)}disposeObject3D(e){var t,i,r,a;(i=(t=e.geometry)==null?void 0:t.dispose)==null||i.call(t),Array.isArray(e.material)?e.material.forEach(o=>{var s;return(s=o==null?void 0:o.dispose)==null?void 0:s.call(o)}):(a=(r=e.material)==null?void 0:r.dispose)==null||a.call(r)}updateTradeFlowPulses(e=.016){var t,i;!((t=this.tradeFlowGroup)!=null&&t.visible)||!((i=this.tradeFlowPulseSprites)!=null&&i.length)||this.tradeFlowPulseSprites.forEach(r=>{var s;const a=(s=r.userData)==null?void 0:s.curve;if(!a)return;const o=(Jr(r.userData.phase)+Jr(r.userData.speed,.16)*e)%1;r.userData.phase=o,r.position.copy(a.getPointAt(o))})}updateTradeFlowLayer(e=this.currentTownRanking){if(!eW(e)){this.hideTradeFlowLayer();return}this.ensureTradeFlowGroup();const t=this.getTradeFlowSource(e),i=this.getTradeFlowRows(e);if(!t||!i.length){this.clearTradeFlowLayer(),this.hideTradeFlowLayer();return}this.clearTradeFlowLayer(),this.tradeFlowGroup.visible=this.mapAnimationComplete,this.createTradeMarketMarker(t);const r=Math.max(...i.map(s=>s.value),1);i.forEach((s,l)=>{this.createTradeSourceMarker(s,l,r,t)});const a=i.length+1;for(let s=this.tradeFlowLabels.length;s<a;s+=1){const l=this.label3d.create("",s===0?"trade-market-label":"trade-flow-label",!0);this.label3d.setLabelStyle(l,s===0?.014:.0125,"x"),l.setParent(this.tradeFlowLabelGroup),this.tradeFlowLabels.push(l)}const o=this.tradeFlowLabels[0];o.element.className="trade-market-label",o.init(this.getTradeMarketHtml(t,i),this.getTradeLocalPoint(t.lng,t.lat,1.46).add(new Le(.52,-.98,0))),o.visible=!0,o.userData=tn(wt({},t),{rows:i.length}),i.forEach((s,l)=>{const u=this.tradeFlowLabels[l+1];u.element.className="trade-flow-label",u.init(this.getTradeFlowLabelHtml(s),this.getTradeFlowPoint(s,.92+Math.min(l,5)*.035).add(this.getTradeFlowLabelOffset(s,l))),u.visible=!0,u.userData=wt({},s)}),this.tradeFlowLabels.slice(a).forEach(s=>{s.visible=!1})}hasTownRankingRows(e=this.currentTownRanking){return this.getTownRankingRows(e,Number.POSITIVE_INFINITY,!1).length>0}formatMapRankingValue(e){const t=Jr(e);return Math.abs(t)>=100?String(Math.round(t)):Math.abs(t)>=10?String(Number(t.toFixed(1))):String(Number(t.toFixed(2)))}formatMapCompactValue(e){const t=Jr(e);return Math.abs(t)>=1e4?`${Number((t/1e4).toFixed(Math.abs(t)>=1e5?1:2))}万`:Math.abs(t)>=1e3?`${Number((t/1e3).toFixed(1))}千`:this.formatMapRankingValue(t)}formatMapIntegerValue(e){const t=Jr(e);return Math.round(t).toLocaleString("zh-CN")}getBarHeight(e,t){return t?Math.max(2.8*.12,2.8*(Jr(e)/t)):2.8*.25}createBarGeometry(e){const i=new em(.06999999999999999,.06999999999999999,e);return i.translate(0,0,e/2),i}getProvinceLabelHtml(e,t,i){return`<div class="provinces-label ${t>4?"yellow":""}">
<div class="provinces-label-wrap">
<div class="label-main">
<div class="label-title">${i.title}</div>
<div class="number"><span class="value" data-target-value="${e.value}">${this.formatMapRankingValue(e.value)}</span><span class="unit">${e.unit||i.unit}</span></div>
<div class="name">${e.name}</div>
</div>
<div class="no">${t+1}</div>
</div>
</div>`}updateBarItem(e,t,i,r,a=!0){var u,c;const o=this.getBarHeight(t.value,r),[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=tn(wt({},t),{targetValue:t.value,geoHeight:o}),e.children.forEach(d=>{var h,f,p,m;(f=(h=d.geometry)==null?void 0:h.dispose)==null||f.call(h),Array.isArray(d.material)?d.material.forEach(v=>{var g;return(g=v==null?void 0:v.dispose)==null?void 0:g.call(v)}):(m=(p=d.material)==null?void 0:p.dispose)==null||m.call(p)}),e.clear(),e.add(...this.createHUIGUANG(o,i>3?16776948:7863285)),a?ka.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,i,r,a,o=!0){var p;const s=Jr((p=e.userData)==null?void 0:p.targetValue,t.value);e.visible=!0,e.userData=tn(wt({},t),{targetValue:t.value}),e.position.copy(r);const l=e.element.querySelector(".label-title"),u=e.element.querySelector(".number .value"),c=e.element.querySelector(".number .unit"),d=e.element.querySelector(".name"),h=e.element.querySelector(".no");!l||!u||!c||!d||!h?e.element.innerHTML=this.getProvinceLabelHtml(t,i,a):(l.innerText=a.title,u.dataset.targetValue=String(t.value),u.innerText=this.formatMapRankingValue(t.value),c.innerText=t.unit||a.unit,d.innerText=t.name,h.innerText=i+1);const f=e.element.querySelector(".provinces-label-wrap");if(this.mapAnimationComplete&&(f.style.opacity="1",f.style.transform="translate(50%, 0)"),o&&this.mapAnimationComplete){const m=e.element.querySelector(".number .value"),g={value:s};ka.to(g,{value:t.value,duration:.45,ease:"power2.out",onUpdate:()=>{m.innerText=this.formatMapRankingValue(g.value)},onComplete:()=>{m.dataset.previousValue=String(t.value),m.innerText=this.formatMapRankingValue(t.value)}})}}clearTownNameLabelStat(e){const t=e.element.querySelector(".town-stat-label"),i=e.element.querySelector(".town-stat-value"),r=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"),i&&(i.innerText=""),r&&(r.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),i=this.getTownRankingMeta(e),r=new Map(t.map(o=>[g2(o.name),o]));this.townNameLabels.forEach(o=>{var m,v;const s=((m=o.userData)==null?void 0:m.townName)||((v=o.userData)==null?void 0:v.name),l=r.get(g2(s));if(!l){this.clearTownNameLabelStat(o);return}const u=o.element.querySelector(".town-stat-label"),c=o.element.querySelector(".town-name"),d=o.element.querySelector(".town-stat-value"),h=o.element.querySelector(".town-stat-unit"),f=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||i.metricLabel||""),d&&(d.innerText=this.formatMapRankingValue(l.value)),h&&(h.innerText=l.unit||i.unit||""),f&&(f.innerText=l.rank?`第${l.rank}名`:""),o.userData=tn(wt(wt({},o.userData),l),{townName:s,targetValue:l.value})})}getInfoPointHtml(e,t=this.getTownRankingMeta()){const i=String(e.metricLabel||t.metricLabel||t.title||"统计指标").replace(/排行$/,""),r=Number(e.rank),a=Number.isFinite(r)?String(r).padStart(2,"0"):"--";return`<div class="info-point-wrap ${r<=3?"is-prime":""}">
<div class="info-point-wrap-inner">
<div class="info-point-head">
<span class="rank">${a}</span>
<strong>${Us(e.name||"红原县")}</strong>
</div>
<div class="info-point-metric">${Us(i)}</div>
<div class="info-point-value">
<span>${this.formatMapRankingValue(e.value)}</span>
<em>${Us(e.unit||t.unit||"")}</em>
</div>
</div>
</div>`}updateInfoPointStats(){var o,s;if(!((o=this.infoPointSprites)!=null&&o.length)||!((s=this.infoLabelElement)!=null&&s.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=this.getTownRankingMeta(),i=e.slice(0,this.infoPointSprites.length),r=Math.max(...i.map(l=>l.value),1);this.infoPointSprites.forEach((l,u)=>{const c=i[u],d=this.infoLabelElement[u];if(!c){l.visible=!1,l.scale.set(0,0,0),d&&(d.visible=!1);return}const[h,f]=this.geoProjection(c.centroid||c.center),p=[h,-f,this.depth+.72];l.userData=tn(wt(wt({},l.userData),c),{position:p,value:c.value,unit:c.unit||t.unit,rank:c.rank,metricTitle:t.title,index:u}),l.position.set(...p),l.visible=this.showTownRankingPointMarkers;const m=.78+c.value/r*.44;if(l.scale.set(m,m,m),d){const v=(u%2===0?.22:-.18)+(u===0?.12:0),g=u%3===0?.08:-.04;d.position.set(h+v,-f+g,this.depth+1.88+Math.min(u,4)*.03),d.userData=tn(wt({},c),{index:u}),d.element.innerHTML=this.getInfoPointHtml(c,t)}});const a=this.infoLabelElement[this.infoPointIndex];a&&this.showTownRankingPointMarkers&&this.mapAnimationComplete&&(a.visible=!0),this.showTownRankingPointMarkers&&this.mapAnimationComplete&&!this.infoPointLabelTime&&this.createInfoPointLabelLoop()}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(i=>{i.visible=!1}),(t=this.infoPointSprites)==null||t.forEach(i=>{i.visible=!1,i.scale.set(0,0,0)})}createBar(){const e=this.getTownRankingRows();this.getTownRankingMeta();const t=new Nr;this.barGroup=t;const i=Math.max(...e.map(r=>r.value),1);this.allBar=[],this.allBarMaterial=[],this.allGuangquan=[],this.allProvinceLabel=[],e.map((r,a)=>{const o=this.getBarHeight(r.value,i),s=new Mr({color:16777215,transparent:!0,opacity:0,depthTest:!1,fog:!1});new L4(s,{uColor1:a>3?16506760:5291006,uColor2:a>3?16776948:7863285,size:o,dir:"y"});const l=new fr(this.createBarGeometry(o),s);l.renderOrder=5;const[u,c]=this.geoProjection(r.centroid);l.position.set(u,-c,this.depth+.45),l.scale.set(1,1,0),l.userData=tn(wt({},r),{targetValue:r.value,geoHeight:o});const d=this.createQuan(new Le(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(d)}),this.scene.add(t),this.updateTownNameLabelStats(this.currentTownRanking)}setTownRanking(e){var a,o,s,l,u,c,d,h,f,p,m,v,g,_,S,x;this.currentTownRanking=e;const t=this.getTownRankingMeta(e);if(this.showTownRankingBars=!!t.showBars,this.showTownRankingPointMarkers=!!t.showPointMarkers,t.hideMapLabels){this.hideAllMapStatisticLabels(),this.mapGroup&&(this.mapGroup.visible=!0),this.labelGroup&&(this.labelGroup.visible=!0),this.flyLineGroup&&(this.flyLineGroup.visible=this.mapAnimationComplete),this.flyLineFocusGroup&&(this.flyLineFocusGroup.visible=this.mapAnimationComplete),this.scatterGroup&&(this.scatterGroup.visible=this.mapAnimationComplete);return}if(eW(e)){this.setTradeNationalMapVisible(!1),this.updateTownNameLabelStats(null),this.setTownNameLabelsVisible(!1),this.hideVillageRankingLabels(),this.clearInfoPointStats(),this.mapGroup&&(this.mapGroup.visible=!0),this.labelGroup&&(this.labelGroup.visible=!1),this.flyLineGroup&&(this.flyLineGroup.visible=!1),this.flyLineFocusGroup&&(this.flyLineFocusGroup.visible=!1),this.scatterGroup&&(this.scatterGroup.visible=!1),(a=this.allBar)!=null&&a.length&&(this.allBar.forEach(A=>{A.visible=!1,A.scale.set(1,1,0)}),(o=this.allBarMaterial)==null||o.forEach(A=>{A.opacity=0}),(s=this.allProvinceLabel)==null||s.forEach(A=>{A.visible=!1}),(l=this.allGuangquan)==null||l.forEach(A=>{A.visible=!1})),this.updateTradeFlowLayer(e);return}if(this.setTradeNationalMapVisible(!1),this.hideTradeFlowLayer(),this.mapGroup&&(this.mapGroup.visible=!0),this.labelGroup&&(this.labelGroup.visible=!0),this.flyLineGroup&&(this.flyLineGroup.visible=this.mapAnimationComplete),this.flyLineFocusGroup&&(this.flyLineFocusGroup.visible=this.mapAnimationComplete),this.scatterGroup&&(this.scatterGroup.visible=this.mapAnimationComplete),QH(e)){this.updateTownNameLabelStats(null),this.setTownNameLabelsVisible(!tW(e)),this.clearInfoPointStats(),this.updateVillageRankingLabels(e),(u=this.allBar)!=null&&u.length&&(this.allBar.forEach(A=>{A.visible=!1,A.scale.set(1,1,0)}),(c=this.allBarMaterial)==null||c.forEach(A=>{A.opacity=0}),(d=this.allProvinceLabel)==null||d.forEach(A=>{A.visible=!1}),(h=this.allGuangquan)==null||h.forEach(A=>{A.visible=!1}));return}if(this.setTownNameLabelsVisible(!t.calloutMode&&!t.hideTownNames),this.hideVillageRankingLabels(),t.calloutMode?this.updateTownNameLabelStats(null):this.updateTownNameLabelStats(e),!((f=this.allBar)!=null&&f.length))return;if(!this.showTownRankingBars){this.allBar.forEach(A=>{A.visible=!1,A.scale.set(1,1,0)}),(p=this.allBarMaterial)==null||p.forEach(A=>{A.opacity=0}),(m=this.allProvinceLabel)==null||m.forEach(A=>{A.visible=!1}),(v=this.allGuangquan)==null||v.forEach(A=>{A.visible=!1}),this.showTownRankingPointMarkers?(this.InfoPointGroup&&(this.InfoPointGroup.visible=this.mapAnimationComplete&&this.hasTownRankingRows(e)),this.updateInfoPointStats()):this.clearInfoPointStats();return}const i=this.getTownRankingRows(e,7,!1);if(!i.length){this.allBar.forEach(A=>{A.visible=!1,A.scale.set(1,1,0)}),(g=this.allProvinceLabel)==null||g.forEach(A=>{A.visible=!1}),(_=this.allGuangquan)==null||_.forEach(A=>{A.visible=!1}),this.clearInfoPointStats();return}this.InfoPointGroup&&(this.InfoPointGroup.visible=this.showTownRankingPointMarkers&&this.mapAnimationComplete),(S=this.infoPointSprites)==null||S.forEach(A=>{A.visible=this.showTownRankingPointMarkers});const r=Math.max(...i.map(A=>A.value),1);this.allBar.forEach((A,C)=>{const M=C<i.length;A.visible=M,M||A.scale.set(1,1,0)}),(x=this.allProvinceLabel)==null||x.forEach(A=>{A.visible=!1}),this.allGuangquan.forEach((A,C)=>{A.visible=C<i.length}),i.forEach((A,C)=>{const M=this.allBar[C],I=this.allGuangquan[C];if(!M)return;const{x:D,y:E}=this.updateBarItem(M,A,C,r,this.mapAnimationComplete);I&&(I.visible=!0,I.position.set(0,0,0),I.children.forEach(P=>{P.position.set(D,this.depth+.44,E),this.mapAnimationComplete&&P.scale.set(1,1,1)}))}),this.updateInfoPointStats()}createEvent(){let e=[];const t=r=>{r.traverse(a=>{a.isMesh&&(a.material=this.defaultMaterial)})},i=r=>{r.traverse(a=>{a.isMesh&&(a.material=this.defaultLightMaterial)})};this.eventElement.map(r=>{this.interactionManager.add(r),r.addEventListener("mousedown",a=>{this.handleMapClick(a)}),r.addEventListener("mouseover",a=>{e.includes(a.target.parent)||e.push(a.target.parent),document.body.style.cursor="pointer",i(a.target.parent)}),r.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 i=new Al(.35,e);i.translate(0,e/2,0);const r=this.assets.instance.getResource("huiguang");r.colorSpace=$r,r.wrapS=Eo,r.wrapT=Eo;let a=new Mr({color:t,map:r,transparent:!0,opacity:.4,depthWrite:!1,side:aa,blending:Mo}),o=new fr(i,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 i=this.assets.instance.getResource("guangquan1"),r=this.assets.instance.getResource("guangquan2");let a=new Al(.5,.5),o=new Mr({color:16777215,map:i,alphaMap:i,opacity:1,transparent:!0,depthTest:!1,fog:!1,blending:Mo}),s=new Mr({color:16777215,map:r,alphaMap:r,opacity:1,transparent:!0,depthTest:!1,fog:!1,blending:Mo}),l=new fr(a,o),u=new fr(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 Nr,this.quanGroup.add(l,u),this.scene.add(this.quanGroup),this.time.on("tick",()=>{l.rotation.z+=.05}),this.quanGroup}createDiffuse(){let e=new Al(200,200),t=new Mr({color:0,depthWrite:!1,transparent:!0,blending:SQ});t.blendEquation=Xd,t.blendSrc=xQ,t.blendDst=bQ,new BFe({material:t,time:this.time,size:60,diffuseSpeed:8,diffuseColor:7442830,diffuseWidth:2,callback:r=>{setTimeout(()=>{ka.to(r.uniforms.uTime,{value:4,repeat:-1,duration:6,ease:"power1.easeIn"})},3)}});let i=new fr(e,t);i.renderOrder=3,i.rotation.x=-Math.PI/2,i.position.set(0,.21,0),this.scene.add(i)}createGrid(){new zFe(this,{gridSize:54,gridDivision:24,gridColor:1990543,shapeSize:.55,shapeColor:3309487,pointSize:.085,pointColor:1993891,pointBlending:Mo})}createBottomBg(){let e=new Al(24,24);const t=this.assets.instance.getResource("ocean");t.colorSpace=$r,t.wrapS=Eo,t.wrapT=Eo,t.repeat.set(1,1);let i=new Mr({map:t,opacity:.92,fog:!1}),r=new fr(e,i);r.rotation.x=-Math.PI/2,r.position.set(0,-.7,0),this.scene.add(r)}createChinaBlurLine(){let e=new Al(154,154);const t=this.assets.instance.getResource("chinaBlurLine");t.colorSpace=$r,t.wrapS=Eo,t.wrapT=Eo,t.generateMipmaps=!1,t.minFilter=mo,t.repeat.set(1,1);let i=new Mr({color:4162253,alphaMap:t,transparent:!0,opacity:.62}),r=new fr(e,i);r.rotateX(-Math.PI/2),r.position.set(-19.3,-.5,-19.7),this.scene.add(r)}createLabel(){let e=this,t=this.labelGroup,i=this.label3d,r=[],a=[];KFe.map(u=>{if(u.hide==!0)return!1;let c=s(u,i,t);r.push(c),a.push(c)});let o=l(wt({},this.mapFocusLabelInfo),i,t);r.push(o),this.otherLabel=r,this.townNameLabels=a;function s(u,c,d){let h=c.create("",`china-label ${u.blur?" blur":""}`,!0);const[f,p]=e.geoProjection(u.center);return h.init(`<div class="other-label town-stat-label">
<div class="town-name-row"><img class="label-icon" src="${YFe}"><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 Le(f,-p,e.depth+.85)),c.setLabelStyle(h,.018,"x"),h.setParent(d),h.userData=tn(wt({},u),{townName:u.name}),h}function l(u,c,d){let h=c.create("","map-label",!0);const[f,p]=e.geoProjection(u.center);return h.init(`<div class="other-label"><span>${u.name}</span><span>${u.enName}</span></div>`,new Le(f,-p,.4)),c.setLabelStyle(h,.015,"x"),h.setParent(d),h}}createRotateBorder(){let e=13.2,t=this.assets.instance.getResource("rotationBorder1"),i=this.assets.instance.getResource("rotationBorder2"),r=new DH(this,{width:e*1.178,needRotate:!0,rotateSpeed:.001,material:new Mr({map:t,color:4763647,transparent:!0,opacity:.26,side:aa,depthWrite:!1,blending:Mo}),position:new Le(0,.31,0)});r.instance.rotation.x=-Math.PI/2,r.instance.renderOrder=6,r.instance.scale.set(0,0,0),r.setParent(this.scene);let a=new DH(this,{width:e*1.116,needRotate:!0,rotateSpeed:-.004,material:new Mr({map:i,color:4763647,transparent:!0,opacity:.5,side:aa,depthWrite:!1,blending:Mo}),position:new Le(0,.33,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=r.instance,this.rotateBorder2=a.instance}createFlyLine(){this.flyLineGroup=new Nr,this.flyLineGroup.visible=!1,this.scene.add(this.flyLineGroup)}createFocus(){this.flyLineFocusGroup.clear()}createParticles(){this.particles=new q8(this,{num:10,range:30,dir:"up",speed:.05,material:new k3({map:q8.createTexture(),size:1,color:61166,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1,vertexColors:!0,blending:Mo,sizeAttenuation:!0})}),this.particleGroup=new Nr,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 Nr,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 T2({map:e,color:16776948,fog:!1,transparent:!0,depthTest:!1});let i=JH(ZFe),r=i[0].value;i.map(a=>{const o=new ug(t);o.renderOrder=23;let s=.1+a.value/r*.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 Nr,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 i=this.assets.instance.getResource("point");let r=[16776948,7863285],a=JH(JFe),o=a[0].value;a.map((l,u)=>{const c=new T2({map:i,color:r[u%r.length],fog:!1,transparent:!0,depthTest:!1}),d=new ug(c);d.renderOrder=23;let h=.7+l.value/o*.4;d.scale.set(h,h,h);let[f,p]=this.geoProjection([l.lng,l.lat]),m=[f,-p,this.depth+.7];d.position.set(...m),d.userData.position=[...m],d.userData={position:[f,-p,this.depth+.7],name:l.name,value:l.value,level:l.level,index:u},this.InfoPointGroup.add(d);let v=s(l,t,this.InfoPointGroup,u);this.infoLabelElement.push(v),this.infoPointSprites.push(d),this.interactionManager.add(d),d.addEventListener("mousedown",g=>{if(this.clicked||!this.InfoPointGroup.visible)return!1;this.clicked=!0,this.infoPointIndex=g.target.userData.index,this.infoLabelElement.map(_=>{_.visible=!1}),v.visible=!0,this.createInfoPointLabelLoop()}),d.addEventListener("mouseup",g=>{this.clicked=!1}),d.addEventListener("mouseover",g=>{document.body.style.cursor="pointer"}),d.addEventListener("mouseout",g=>{document.body.style.cursor="default"})});function s(l,u,c,d){let h=u.create("","info-point",!0);const[f,p]=e.geoProjection([l.lng,l.lat]);return h.init(e.getInfoPointHtml(tn(wt({},l),{value:0,rank:d+1,unit:""}),e.getTownRankingMeta()),new Le(f,-p,e.depth+1.9)),u.setLabelStyle(h,.015,"x"),h.setParent(c),h.visible=!1,h}}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=Eo,t.repeat.set(2,1);let i=new R4(this,{geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,position:new Le(0,0,this.depth+.24),data:e,material:new Mr({color:2868444,map:t,alphaMap:t,fog:!1,transparent:!0,opacity:1,blending:Mo}),type:"Line3",renderOrder:22,tubeRadius:.03});this.focusMapGroup.add(i.lineGroup),this.time.on("tick",()=>{t.offset.x+=.005})}handleMapClick(e){return rn(this,null,function*(){var a,o,s,l,u,c,d,h,f,p,m,v,g,_,S,x,A,C,M,I,D,E,P,F,V,G,W,Y,Q,K,ae,ie,he,Ee,He,xe,Fe,pt,Ot;if(!this.currentTopicLayer)return;const t=this.getScreenPointFromEvent(e),i=this.getLngLatFromEvent(e);if(!i){this.clearSelectedFeature(),(o=(a=this.callbacks).onFeatureInfo)==null||o.call(a,{feature:null});return}if(this.boundaryDrawingEnabled){const bt=((s=e==null?void 0:e.data)==null?void 0:s.originalEvent)||(e==null?void 0:e.originalEvent)||e;if(bt!=null&&bt.__analysisBoundaryHandled)return;this.addBoundaryDrawPoint(i);return}if(this.shouldClipLayerToHongyuanBoundary(this.currentTopicLayer)&&!this.isLngLatInHongyuanBoundary(i)){this.clearSelectedFeature(),(u=(l=this.callbacks).onFeatureInfo)==null||u.call(l,{feature:null}),(d=(c=this.callbacks).onLayerStatus)==null||d.call(c,{type:"success",text:"当前点击位置不在红原县边界内"});return}if(this.shouldClipLayerToLayerBounds(this.currentTopicLayer)&&!this.isLngLatInLayerClipBounds(i,this.currentTopicLayer)){this.clearSelectedFeature(),(f=(h=this.callbacks).onFeatureInfo)==null||f.call(h,{feature:null}),(m=(p=this.callbacks).onLayerStatus)==null||m.call(p,{type:"success",text:"当前点击位置不在图层显示范围内"});return}if(D4(this.currentTopicLayer)){const bt=this.pickVectorFeatureAtPoint(i,t),ht=(bt==null?void 0:bt.feature)||bt;let Kt=(bt==null?void 0:bt.screen)||t;ht?(this.shouldClipLayerToHongyuanBoundary(this.currentTopicLayer)?(this.clearSelectedGeometryGroup(),this.setSelectedVectorFeatures([ht])):this.showSelectedFeature(ht),((v=this.currentTopicLayer)==null?void 0:v.key)==="yak-industry-points"&&(this.setSelectedVectorFeatures([ht]),Kt=this.getPointFeatureScreenPoint(ht)||Kt),(A=(x=this.callbacks).onFeatureInfo)==null||A.call(x,{feature:{id:((g=ht.properties)==null?void 0:g.id)||((_=ht.properties)==null?void 0:_.feature_id)||((S=ht.properties)==null?void 0:S.project_name),properties:ht.properties||{},feature:ht,layer:this.currentTopicLayer,lngLat:i},screen:Kt}),(M=(C=this.callbacks).onLayerStatus)==null||M.call(C,{type:"success",text:"真实矢量要素已选中"})):(this.clearSelectedFeature(),(D=(I=this.callbacks).onFeatureInfo)==null||D.call(I,{feature:null}),(P=(E=this.callbacks).onLayerStatus)==null||P.call(E,{type:"success",text:"当前点击位置无生态保护要素"}));return}const r=this.lngLatToWmsPixel(i);(V=(F=this.callbacks).onFeatureInfo)==null||V.call(F,{feature:null}),(W=(G=this.callbacks).onFeatureLoading)==null||W.call(G,!0);try{const bt=yield KH(this.currentTopicLayer,r,{size:qd,buffer:10}),ht=ZH(bt),Kt=ht?null:yield this.queryFallbackFeatureInfo(i),Tt=ht||(Kt==null?void 0:Kt.feature);if(Tt){const Ae=yield this.enrichFeatureInfo(Tt,r,i);this.showSelectedFeature(Ae.feature||Ae),(Q=(Y=this.callbacks).onFeatureInfo)==null||Q.call(Y,{feature:tn(wt({},Ae),{layer:(Kt==null?void 0:Kt.layer)||this.currentTopicLayer,lngLat:i}),screen:t})}else this.clearSelectedFeature(),(ae=(K=this.callbacks).onFeatureInfo)==null||ae.call(K,{feature:null});Tt||(he=(ie=this.callbacks).onLayerStatus)==null||he.call(ie,{type:"success",text:"当前点击位置无图斑"})}catch(bt){this.clearSelectedFeature(),(He=(Ee=this.callbacks).onFeatureInfo)==null||He.call(Ee,{feature:null}),(Fe=(xe=this.callbacks).onLayerStatus)==null||Fe.call(xe,{type:"error",text:"图斑信息查询失败"})}finally{(Ot=(pt=this.callbacks).onFeatureLoading)==null||Ot.call(pt,!1)}})}handleCanvasBoundaryPointerDown(e){var i,r;if(!this.boundaryDrawingEnabled)return;const t=this.getLngLatFromCanvasEvent(e);t&&this.addBoundaryDrawPoint(t)&&(e.__analysisBoundaryHandled=!0),(i=e.preventDefault)==null||i.call(e),(r=e.stopPropagation)==null||r.call(e)}handleCanvasBoundaryDoubleClick(e){var i,r;if(!this.boundaryDrawingEnabled)return;const t=this.getLngLatFromCanvasEvent(e);(this.boundaryDrawPoints||[]).length<3&&t&&this.addBoundaryDrawPoint(t),(this.boundaryDrawPoints||[]).length>=3&&(this.finishBoundaryDrawing(),e.__analysisBoundaryHandled=!0),(i=e.preventDefault)==null||i.call(e),(r=e.stopPropagation)==null||r.call(e)}getLngLatFromCanvasEvent(e){var h,f,p;if(!((h=this.camera)!=null&&h.instance)||!this.focusMapGroup||!this.canvas)return null;const t=this.canvas.getBoundingClientRect();if(!t.width||!t.height)return null;const i=(f=this.interactionManager)==null?void 0:f.raycaster;if(!(i!=null&&i.setFromCamera))return null;const r={x:(e.clientX-t.left)/t.width*2-1,y:-((e.clientY-t.top)/t.height)*2+1};i.setFromCamera(r,this.camera.instance);const o=((p=i.intersectObjects(this.eventElement||[],!0)[0])==null?void 0:p.point)||this.getRayMapPlaneIntersection(i.ray);if(!o)return null;const s=this.focusMapGroup.worldToLocal(o.clone()),u=Ic().center(this.geoProjectionCenter).scale(this.geoProjectionScale).translate([0,0]).invert([s.x,-s.y]);if(!u)return null;const c=Number(u[0]),d=Number(u[1]);return!Number.isFinite(c)||!Number.isFinite(d)?null:c<lr.west-.03||c>lr.east+.03||d<lr.south-.03||d>lr.north+.03?this.getFallbackLngLatFromPointer(e,t):{lng:c,lat:d}}getFallbackLngLatFromPointer(e,t=(r=>(r=(i=>(i=this.canvas)==null?void 0:i.getBoundingClientRect)())==null?void 0:r.call(i))()){if(!(t!=null&&t.width)||!(t!=null&&t.height))return null;const a=Math.min(1,Math.max(0,(e.clientX-t.left)/t.width)),o=Math.min(1,Math.max(0,(e.clientY-t.top)/t.height)),s=lr.west+(lr.east-lr.west)*a,l=lr.north-(lr.north-lr.south)*o;return{lng:s,lat:l}}getRayMapPlaneIntersection(e){if(!(e!=null&&e.origin)||!(e!=null&&e.direction)||!this.focusMapGroup)return null;const t=this.focusMapGroup.worldToLocal(e.origin.clone()),r=this.focusMapGroup.worldToLocal(e.origin.clone().add(e.direction.clone())).sub(t),a=this.depth+.22;if(Math.abs(r.z)<1e-8)return null;const o=(a-t.z)/r.z;if(!Number.isFinite(o)||o<0)return null;const s=t.add(r.multiplyScalar(o));return this.focusMapGroup.localToWorld(s)}enrichFeatureInfo(e,t,i){return rn(this,null,function*(){const r=this.getLayerTopicKey(this.currentTopicLayer);if(!["grassland","woodland"].includes(r))return e;const o=(_5[r]||[]).find(d=>d.key===`${r}-distribution`),s=(this.visibleTopicLayers||[]).filter(d=>this.getLayerTopicKey(d)===r).slice(0,5),l=[o,this.currentTopicLayer,...s].filter(d=>d==null?void 0:d.layerName).filter((d,h,f)=>f.findIndex(p=>this.getLayerQueryKey(p)===this.getLayerQueryKey(d))===h);if(!l.length)return e;const u=yield Promise.allSettled([...l.filter(d=>this.getLayerQueryKey(d)!==this.getLayerQueryKey(this.currentTopicLayer)).map(d=>rn(this,null,function*(){const h=yield KH(d,t,{size:qd,buffer:10}),f=ZH(h);return f?{layer:d,feature:f,source:"wms"}:null})),...l.map(d=>rn(this,null,function*(){const h=yield this.queryLayerFeatureByPoint(d,i);return h?{layer:d,feature:h,source:"wfs"}:null}))]),c=wt({},e.properties||{});return u.forEach(d=>{var h,f;d.status!=="fulfilled"||!((f=(h=d.value)==null?void 0:h.feature)!=null&&f.properties)||this.mergeBusinessProperties(c,d.value.feature.properties,d.value.layer)}),tn(wt({},e),{properties:c,relatedFeatures:u.filter(d=>{var h;return d.status==="fulfilled"&&((h=d.value)==null?void 0:h.feature)}).map(d=>d.value),feature:tn(wt({},e.feature||{}),{properties:c})})})}queryFallbackFeatureInfo(e){return rn(this,null,function*(){const t=this.getLayerTopicKey(this.currentTopicLayer);if(!["grassland","woodland"].includes(t))return null;const r=[(_5[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 r){const o=yield this.queryLayerFeatureByPoint(a,e,{requireContainment:!0});if(o)return{layer:a,feature:o}}return null})}queryLayerFeatureByPoint(r,a){return rn(this,arguments,function*(e,t,i={}){var p,m,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,d=t.lat+o,h=yield s3(e.layerName,{cqlFilter:`BBOX(${s},${l},${u},${c},${d})`,maxFeatures:8,timeout:12e3}),f=this.pickFeatureAtPoint((h==null?void 0:h.features)||[],t,i);return f?{id:f.id||((p=f.properties)==null?void 0:p.gid)||((m=f.properties)==null?void 0:m.objectid)||((v=f.properties)==null?void 0:v.OBJECTID),properties:f.properties||{},feature:f}:null})}pickFeatureAtPoint(e,t,i={}){var a;if(!Array.isArray(e)||!e.length)return null;const r=e.filter(o=>this.isLngLatInGeometry(t,o.geometry)).sort((o,s)=>this.getGeometryAreaScore(o.geometry)-this.getGeometryAreaScore(s.geometry));return r.length?r[0]:i.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(i=>this.isLngLatInPolygon(e,i)):!1}isLngLatInPolygon(e,t=[]){return!t.length||!this.isLngLatInRing(e,t[0])?!1:!t.slice(1).some(r=>this.isLngLatInRing(e,r))}isLngLatInRing(e,t=[]){if(t.length<3)return!1;let i=!1;const r=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]),d=Number(l==null?void 0:l[1]),h=Number(u==null?void 0:u[0]),f=Number(u==null?void 0:u[1]);if(this.isPointOnSegment(r,a,c,d,h,f))return!0;d>a!=f>a&&r<(h-c)*(a-d)/(f-d)+c&&(i=!i)}return i}isPointOnSegment(e,t,i,r,a,o){const s=(e-i)*(o-r)-(t-r)*(a-i);return Math.abs(s)>1e-10?!1:(e-i)*(e-a)+(t-r)*(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,i)=>t+this.getLngLatPolygonAreaScore(i),0):Number.POSITIVE_INFINITY:Number.POSITIVE_INFINITY}getLngLatPolygonAreaScore(e=[]){const t=e[0]||[];if(t.length<3)return Number.POSITIVE_INFINITY;let i=0;for(let r=0;r<t.length;r++){const a=t[r],o=t[(r+1)%t.length];i+=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(i)}getGeometryDistanceScore(e,t){const i=this.getGeometryLngLatBounds(e);if(!i)return Number.POSITIVE_INFINITY;const r=(i.minLng+i.maxLng)/2,a=(i.minLat+i.maxLat)/2;return Math.hypot(r-t.lng,a-t.lat)}getGeometryLngLatBounds(e){const t=this.getGeometryCoordinateList(e);return t.length?t.reduce((i,r)=>({minLng:Math.min(i.minLng,Number((r==null?void 0:r[0])||0)),minLat:Math.min(i.minLat,Number((r==null?void 0:r[1])||0)),maxLng:Math.max(i.maxLng,Number((r==null?void 0:r[0])||0)),maxLat:Math.max(i.maxLat,Number((r==null?void 0:r[1])||0))}),{minLng:Number.POSITIVE_INFINITY,minLat:Number.POSITIVE_INFINITY,maxLng:Number.NEGATIVE_INFINITY,maxLat:Number.NEGATIVE_INFINITY}):null}getGeometryCoordinateList(e){const t=[],i=r=>{if(Array.isArray(r)){if(typeof r[0]=="number"&&typeof r[1]=="number"){t.push(r);return}r.forEach(i)}};return i(e==null?void 0:e.coordinates),t}pickVectorFeatureAtPoint(e,t){var o;const i=this.currentVectorFeatures||[];if(((o=this.currentTopicLayer)==null?void 0:o.key)==="yak-industry-points"){const s=this.pickPointFeatureAtScreenPoint(i,t);if(s)return s}const r=i.filter(s=>this.isLngLatInGeometry(e,s.geometry)).sort((s,l)=>this.getGeometryAreaScore(s.geometry)-this.getGeometryAreaScore(l.geometry));if(r.length)return r[0];const a=i.find(s=>this.isPointOrLineNearLngLat(s.geometry,e));return a||null}pickPointFeatureAtScreenPoint(e,t){var a;if(!t||!((a=this.camera)!=null&&a.instance)||!this.focusMapGroup||!this.canvas)return null;const r=(e||[]).filter(o=>{var s;return((s=o==null?void 0:o.geometry)==null?void 0:s.type)==="Point"}).map(o=>{const s=this.getPointFeatureScreenPoint(o);return s?{feature:o,screen:s,distance:Math.hypot(s.x-t.x,s.y-t.y)}:null}).filter(Boolean).sort((o,s)=>o.distance-s.distance)[0];return(r==null?void 0:r.distance)<=22?{feature:r.feature,screen:r.screen}:null}getPointFeatureScreenPoint(e){var i,r;const t=(e==null?void 0:e.geometry)||((i=e==null?void 0:e.feature)==null?void 0:i.geometry);return(t==null?void 0:t.type)!=="Point"?null:((r=this.currentTopicLayer)==null?void 0:r.key)==="yak-industry-points"?this.lngLatToLayerScreenPoint(t.coordinates,this.depth+.255):this.lngLatToScreenPoint(t.coordinates,this.depth+.32)}lngLatToLayerScreenPoint(e,t=0){const i=this.topicLayerUvBounds;if(!i)return this.lngLatToScreenPoint(e,t);const r=this.lngLatToLayerCanvasPoint(e),a=this.topicLayerCanvas;if(!(a!=null&&a.width)||!(a!=null&&a.height))return this.lngLatToScreenPoint(e,t);const o=i.left+r.x/a.width*(i.right-i.left),s=i.bottom+(a.height-r.y)/a.height*(i.top-i.bottom);return this.localMapPointToScreenPoint(new Le(o,s,Number(t)||0))}lngLatToScreenPoint(e,t=0){const i=Number(e==null?void 0:e[0]),r=Number(e==null?void 0:e[1]);if(!Number.isFinite(i)||!Number.isFinite(r))return null;const a=this.lngLatToWorldPoint([i,r],t);return this.worldPointToScreenPoint(a)}localMapPointToScreenPoint(e){const t=this.focusMapGroup?this.focusMapGroup.localToWorld(e):e;return this.worldPointToScreenPoint(t)}worldPointToScreenPoint(e){var r;if(!((r=this.camera)!=null&&r.instance)||!this.canvas||!e)return null;const t=this.canvas.getBoundingClientRect();if(!t.width||!t.height)return null;const i=e.clone().project(this.camera.instance);return!Number.isFinite(i.x)||!Number.isFinite(i.y)?null:{x:t.left+(i.x+1)/2*t.width,y:t.top+(1-i.y)/2*t.height}}focusProject(e){var h,f,p,m;const t=String(e||"").trim();if(!t)return!1;const i=(this.currentVectorFeatures||[]).filter(v=>{var g;return String(((g=v==null?void 0:v.properties)==null?void 0:g.project_name)||"").trim()===t});if(!i.length)return(f=(h=this.callbacks).onLayerStatus)==null||f.call(h,{type:"success",text:"当前项目图斑尚未加载"}),!1;const r=this.getFeatureListLngLatBounds(i);if(!r)return!1;const a=this.getProjectHighlightFeatures(i);a.length?(this.showSelectedFeatures(a),this.setSelectedVectorFeatures(a)):this.clearSelectedFeature();const o=[(r.minLng+r.maxLng)/2,(r.minLat+r.maxLat)/2],s=Math.max(r.maxLng-r.minLng,r.maxLat-r.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),d=u.clone().add(c);return this.animateMapCamera(d,u,.75),(m=(p=this.callbacks).onLayerStatus)==null||m.call(p,{type:"success",text:"已定位项目"}),!0}setBoundaryDrawing(e){var t,i,r,a;this.boundaryDrawingEnabled=!!e,this.boundaryDrawingEnabled?(this.boundaryDrawPoints=[],this.lastBoundaryDrawPoint=null,this.analysisBoundaryFeature=null,this.analysisMatchedFeatures=[],this.clearSelectedFeature(),(i=(t=this.callbacks).onLayerStatus)==null||i.call(t,{type:"success",text:"请在地图上依次点击绘制分析边界"})):(a=(r=this.callbacks).onLayerStatus)==null||a.call(r,{type:"success",text:"已退出边界绘制"}),this.redrawVectorTopicLayer()}addBoundaryDrawPoint(e){var a,o,s,l;if(!Number.isFinite(e==null?void 0:e.lng)||!Number.isFinite(e==null?void 0:e.lat))return!1;const t=Date.now(),i=this.lastBoundaryDrawPoint;return i&&t-i.time<350&&Math.hypot(e.lng-i.lng,e.lat-i.lat)<8e-4?!1:(this.lastBoundaryDrawPoint={lng:e.lng,lat:e.lat,time:t},this.boundaryDrawPoints=[...this.boundaryDrawPoints||[],{lng:e.lng,lat:e.lat}],(o=(a=this.callbacks).onDrawBoundary)==null||o.call(a,{status:"drawing",points:this.boundaryDrawPoints,pointCount:this.boundaryDrawPoints.length}),(l=(s=this.callbacks).onLayerStatus)==null||l.call(s,{type:"success",text:`已添加边界点 ${this.boundaryDrawPoints.length} 个`}),this.redrawVectorTopicLayer(),!0)}undoBoundaryPoint(){var e,t,i;return(e=this.boundaryDrawPoints)!=null&&e.length?(this.boundaryDrawPoints=this.boundaryDrawPoints.slice(0,-1),(i=(t=this.callbacks).onDrawBoundary)==null||i.call(t,{status:"drawing",points:this.boundaryDrawPoints,pointCount:this.boundaryDrawPoints.length}),this.redrawVectorTopicLayer(),!0):!1}finishBoundaryDrawing(){var o,s,l,u,c,d;const e=this.boundaryDrawPoints||[];if(e.length<3)return(s=(o=this.callbacks).onLayerStatus)==null||s.call(o,{type:"error",text:"至少需要 3 个点才能形成分析边界"}),null;const t=e.map(h=>[h.lng,h.lat]),i=t[0],r=t[t.length-1];(i[0]!==r[0]||i[1]!==r[1])&&t.push([...i]);const a={type:"Feature",properties:{source:"draw",pointCount:e.length},geometry:{type:"Polygon",coordinates:[t]}};return this.boundaryDrawingEnabled=!1,this.boundaryDrawPoints=[],this.lastBoundaryDrawPoint=null,this.analysisBoundaryFeature=a,(u=(l=this.callbacks).onDrawBoundary)==null||u.call(l,{status:"complete",feature:a,points:e,pointCount:e.length}),(d=(c=this.callbacks).onLayerStatus)==null||d.call(c,{type:"success",text:"分析边界已生成"}),this.focusAnalysisGeometry(a.geometry),this.redrawVectorTopicLayer(),a}clearAnalysisBoundary(){var e,t;return this.boundaryDrawingEnabled=!1,this.boundaryDrawPoints=[],this.lastBoundaryDrawPoint=null,this.analysisBoundaryFeature=null,this.analysisMatchedFeatures=[],this.redrawVectorTopicLayer(),(t=(e=this.callbacks).onDrawBoundary)==null||t.call(e,{status:"clear",points:[],pointCount:0}),!0}showAnalysisResult(e={}){var a;const t=Object.prototype.hasOwnProperty.call(e,"boundary")||Object.prototype.hasOwnProperty.call(e,"boundaryFeature")||Object.prototype.hasOwnProperty.call(e,"feature"),i=e.boundary||e.boundaryFeature||e.feature||null,r=Array.isArray(e.matches)?e.matches:[];return t&&(this.analysisBoundaryFeature=(i==null?void 0:i.type)==="Feature"?i:i!=null&&i.geometry?{type:"Feature",properties:i.properties||{},geometry:i.geometry}:null),this.analysisMatchedFeatures=r.map(o=>(o==null?void 0:o.feature)||o).filter(o=>o==null?void 0:o.geometry),!t&&this.analysisMatchedFeatures.length?this.focusAnalysisFeatures(this.analysisMatchedFeatures):(a=this.analysisBoundaryFeature)!=null&&a.geometry&&this.focusAnalysisGeometry(this.analysisBoundaryFeature.geometry),this.redrawVectorTopicLayer(),!0}focusAnalysisFeatures(e=[]){const t=this.getFeatureListLngLatBounds(e);if(!t)return!1;const i=[(t.minLng+t.maxLng)/2,(t.minLat+t.maxLat)/2];return this.flyToLngLat(i,{span:Math.max(t.maxLng-t.minLng,t.maxLat-t.minLat),statusText:"已定位命中项目"})}focusAnalysisGeometry(e){const t=this.getGeometryLngLatBounds(e);if(!t)return!1;const i=[(t.minLng+t.maxLng)/2,(t.minLat+t.maxLat)/2];return this.flyToLngLat(i,{span:Math.max(t.maxLng-t.minLng,t.maxLat-t.minLat),statusText:"已定位分析边界"})}focusPasture(e={}){var r,a;const i=[...this.normalizePastureGrasslandRows(e==null?void 0:e.grasslands),...this.normalizePastureGrasslandRows(e==null?void 0:e.wkt)].map((o,s)=>{const l=this.normalizePastureGrasslandGeometry(o);if(!l)return null;const u=this.normalizePastureGrasslandProperties(o);return{type:"Feature",properties:tn(wt({},u),{id:u.id||u.gid||`${(e==null?void 0:e.name)||"pasture"}-${s}`,pasture_name:(e==null?void 0:e.name)||u.pastureName||u.name}),geometry:l}}).filter(Boolean);if(i.length){const o=this.getFeatureListLngLatBounds(i);if(!o)return!1;this.showSelectedFeatures(i,{mode:"pasture"}),this.setSelectedVectorFeatures(i);const s=[(o.minLng+o.maxLng)/2,(o.minLat+o.maxLat)/2];return this.flyToLngLat(s,{span:Math.max(o.maxLng-o.minLng,o.maxLat-o.minLat),statusText:"已定位具体草场"}),!0}return(a=(r=this.callbacks).onLayerStatus)==null||a.call(r,{type:"warning",text:"当前牧户暂无可定位数据"}),!1}normalizePastureGrasslandRows(e){return e?typeof e=="string"?[e]:Array.isArray(e)?e:(e==null?void 0:e.type)==="FeatureCollection"&&Array.isArray(e.features)?e.features:(e==null?void 0:e.type)==="Feature"||this.isGeoJsonGeometry(e)?[e]:Array.isArray(e==null?void 0:e.rows)?e.rows:Array.isArray(e==null?void 0:e.data)?e.data:e!=null&&e.data?this.normalizePastureGrasslandRows(e.data):Array.isArray(e==null?void 0:e.list)?e.list:Array.isArray(e==null?void 0:e.features)?e.features:e!=null&&e.wkt||e!=null&&e.geo||e!=null&&e.geom||e!=null&&e.geometryWkt||e!=null&&e.geometry_wkt||e!=null&&e.shape||e!=null&&e.location||e!=null&&e.geometry?[e]:[]:[]}normalizePastureGrasslandGeometry(e){var t;return typeof e=="string"?this.parseGeometryText(e):(e==null?void 0:e.type)==="Feature"?this.normalizePastureGrasslandGeometry(e.geometry):this.isGeoJsonGeometry(e)?e:typeof(e==null?void 0:e.geometry)=="string"?this.parseGeometryText(e.geometry):((t=e==null?void 0:e.geometry)==null?void 0:t.type)==="Feature"?this.normalizePastureGrasslandGeometry(e.geometry.geometry):this.isGeoJsonGeometry(e==null?void 0:e.geometry)?e.geometry:this.parseGeometryText((e==null?void 0:e.wkt)||(e==null?void 0:e.geo)||(e==null?void 0:e.geom)||(e==null?void 0:e.geometryWkt)||(e==null?void 0:e.geometry_wkt)||(e==null?void 0:e.shape)||(e==null?void 0:e.location))}normalizePastureGrasslandProperties(e){return!e||typeof e!="object"||Array.isArray(e)?{wkt:e}:e.type==="Feature"?e.properties||{}:e}parseGeometryText(e){const t=String(e||"").trim();if(!t)return null;if(t.startsWith("{")||t.startsWith("["))try{const i=JSON.parse(t);if((i==null?void 0:i.type)==="Feature")return this.normalizePastureGrasslandGeometry(i);if(this.isGeoJsonGeometry(i))return i}catch(i){return null}return this.parseWktGeometry(t)}isGeoJsonGeometry(e){return!!(e&&["Polygon","MultiPolygon","LineString","MultiLineString","Point"].includes(e.type)&&e.coordinates)}flyToLngLat(e,t={}){var d,h;const i=Array.isArray(e)?e:[e==null?void 0:e.lng,e==null?void 0:e.lat],r=Number(i==null?void 0:i[0]),a=Number(i==null?void 0:i[1]);if(!Number.isFinite(r)||!Number.isFinite(a))return!1;const o=Number(t.span),s=Number.isFinite(o)?Math.max(.2,Math.min(.55,o*1.25)):.32,l=this.lngLatToWorldPoint([r,a],.72),u=this.defaultMapCameraPosition.clone().sub(this.defaultMapTarget).multiplyScalar(s),c=l.clone().add(u);return this.animateMapCamera(c,l,t.duration||.75),(h=(d=this.callbacks).onLayerStatus)==null||h.call(d,{type:"success",text:t.statusText||"已定位"}),!0}getProjectHighlightFeatures(e){const t=e.filter(r=>{var o;const a=String(((o=r==null?void 0:r.geometry)==null?void 0:o.type)||"");return a.includes("Polygon")||a.includes("LineString")}),i=t.filter(r=>{var a;return((a=r==null?void 0:r.properties)==null?void 0:a.feature_role)==="工程范围"});return i.length?i:t}getFeatureListLngLatBounds(e){return e.reduce((t,i)=>{const r=this.getGeometryLngLatBounds(i.geometry);return r?t?{minLng:Math.min(t.minLng,r.minLng),minLat:Math.min(t.minLat,r.minLat),maxLng:Math.max(t.maxLng,r.maxLng),maxLat:Math.max(t.maxLat,r.maxLat)}:wt({},r):t},null)}isPointOrLineNearLngLat(e,t){return e!=null&&e.coordinates?e.type==="Point"?this.getCoordinateDistance(e.coordinates,[t.lng,t.lat])<=.02:e.type==="LineString"?this.isCoordinateNearLine(e.coordinates,t,.004):e.type==="MultiLineString"?e.coordinates.some(i=>this.isCoordinateNearLine(i,t,.004)):!1:!1}isCoordinateNearLine(e,t,i){if(!Array.isArray(e)||e.length<2)return!1;const r=[t.lng,t.lat];for(let a=1;a<e.length;a+=1)if(this.getCoordinateSegmentDistance(r,e[a-1],e[a])<=i)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,i){const r=Number(t==null?void 0:t[0]),a=Number(t==null?void 0:t[1]),o=Number(i==null?void 0:i[0])-r,s=Number(i==null?void 0:i[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]-r)*o+(e[1]-a)*s)/(o*o+s*s)));return this.getCoordinateDistance(e,[r+l*o,a+l*s])}getLayerTopicKey(e){const t=e==null?void 0:e.layerName,i=e==null?void 0:e.key,r=Object.entries(wt(wt({},_5),kee)).find(([,a])=>a.some(o=>o.key===i||o.layerName===t));return(r==null?void 0:r[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,i){const r=(i==null?void 0:i.key)||"";if(Object.entries(t||{}).forEach(([a,o])=>{o==null||o===""||(e[a]===void 0||e[a]===null||e[a]==="")&&(e[a]=o)}),r==="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(r==="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(r==="grassland-type"||r==="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(r==="grassland-yield"||r==="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(r==="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 i;const t=((i=e==null?void 0:e.data)==null?void 0:i.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 i=(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(!i)return null;const r=this.focusMapGroup.worldToLocal(i.clone()),o=Ic().center(this.geoProjectionCenter).scale(this.geoProjectionScale).translate([0,0]).invert([r.x,-r.y]);return o?{lng:o[0],lat:o[1]}:null}lngLatToWmsPixel({lng:e,lat:t}){const i=(e-lr.west)/(lr.east-lr.west)*qd.width,r=(lr.north-t)/(lr.north-lr.south)*qd.height;return{x:i,y:r}}showSelectedFeature(e,t={}){var r;const i=(e==null?void 0:e.geometry)||((r=e==null?void 0:e.feature)==null?void 0:r.geometry);this.clearSelectedFeature(),this.createSelectedFeatureGroup(),this.addSelectedGeometry(i,t),this.selectedFeatureGroup.children.length||this.clearSelectedFeature()}showSelectedFeatures(e=[],t={}){this.clearSelectedFeature(),this.createSelectedFeatureGroup(),e.forEach(i=>{var a;const r=(i==null?void 0:i.geometry)||((a=i==null?void 0:i.feature)==null?void 0:a.geometry);this.addSelectedGeometry(r,t)}),this.selectedFeatureGroup.children.length||this.clearSelectedFeature()}setSelectedVectorFeatures(e=[]){this.selectedVectorFeatures=[...e],this.redrawVectorTopicLayer()}getSelectedFeatureStyle(e={}){const t=e.mode==="pasture";return{fillColor:t?16765773:16769370,fillOpacity:t?.42:.5,lineColor:16777215,lineOpacity:.98,glowColor:t?2357712:2422468,glowOpacity:t?.92:.96,renderOrderBase:t?42:35,boundary:t,boundaryColor:16773226,boundaryGlowColor:2422468,boundaryWidth:.018,boundaryGlowWidth:.06,boundaryOpacity:.95,boundaryGlowOpacity:.42}}addSelectedGeometry(e,t={}){if(!(e!=null&&e.coordinates)||!this.selectedFeatureGroup)return;const i=this.getSelectedFeatureStyle(t),r=this.getDisplayFeaturePolygons(e),a=new Mr({color:i.fillColor,transparent:!0,opacity:i.fillOpacity,side:aa,depthWrite:!1,fog:!1}),o=new ku({color:i.lineColor,transparent:!0,opacity:i.lineOpacity,linewidth:2,depthTest:!1,depthWrite:!1,fog:!1}),s=new ku({color:i.glowColor,transparent:!0,opacity:i.glowOpacity,linewidth:3,depthTest:!1,depthWrite:!1,fog:!1}),l=i.boundary?new Mr({color:i.boundaryColor,transparent:!0,opacity:i.boundaryOpacity,side:aa,depthTest:!1,depthWrite:!1,fog:!1}):null,u=i.boundary?new Mr({color:i.boundaryGlowColor,transparent:!0,opacity:i.boundaryGlowOpacity,side:aa,depthTest:!1,depthWrite:!1,fog:!1,blending:Mo}):null;r.length&&r.forEach(d=>{const h=this.createProjectedShape(d);if(!h)return;const f=new F3(h),p=new fr(f,a);p.renderOrder=i.renderOrderBase,this.selectedFeatureGroup.add(p),d.forEach(m=>{const v=this.createProjectedRingPoints(m);if(v.length<3)return;i.boundary&&(this.addSelectedBoundaryBand(v,u,i.boundaryGlowWidth,i.renderOrderBase+1,!0),this.addSelectedBoundaryBand(v,l,i.boundaryWidth,i.renderOrderBase+4,!0));const g=new Qr().setFromPoints(v),_=new G8(g,o);_.renderOrder=i.renderOrderBase+5,this.selectedFeatureGroup.add(_);const S=new Qr().setFromPoints(v),x=new G8(S,s);x.renderOrder=i.renderOrderBase+3,x.scale.set(1.004,1.004,1),this.selectedFeatureGroup.add(x)})});const c=this.normalizeFeatureLineStrings(e);c.length&&c.forEach(d=>{const h=this.createProjectedRingPoints(d);if(h.length<2)return;i.boundary&&(this.addSelectedBoundaryBand(h,u,i.boundaryGlowWidth,i.renderOrderBase+1,!1),this.addSelectedBoundaryBand(h,l,i.boundaryWidth,i.renderOrderBase+4,!1));const f=new Qr().setFromPoints(h),p=new Q9(f,s);p.renderOrder=i.renderOrderBase+3,p.scale.set(1.004,1.004,1),this.selectedFeatureGroup.add(p);const m=new Qr().setFromPoints(h),v=new Q9(m,o);v.renderOrder=i.renderOrderBase+5,this.selectedFeatureGroup.add(v)})}addSelectedBoundaryBand(e,t,i,r,a=!0){if(!t||!this.selectedFeatureGroup)return;const o=this.createPathBandGeometry(e,i,a);if(!o)return;const s=new fr(o,t);s.renderOrder=r,this.selectedFeatureGroup.add(s)}createPathBandGeometry(e,t,i=!0){const r=this.normalizePathBandPoints(e,i);if(r.length<(i?3:2))return null;const a=Math.max(Number(t)||0,0)/2;if(!a)return null;const o=[],s=i?r.length:r.length-1;for(let u=0;u<s;u+=1){const c=r[u],d=r[(u+1)%r.length],h=d.x-c.x,f=d.y-c.y,p=Math.hypot(h,f);if(!p)continue;const m=-f/p*a,v=h/p*a,g=[c.x+m,c.y+v,.006],_=[c.x-m,c.y-v,.006],S=[d.x+m,d.y+v,.006],x=[d.x-m,d.y-v,.006];o.push(...g,..._,...S,...S,..._,...x)}if(!o.length)return null;const l=new Qr;return l.setAttribute("position",new ga(o,3)),l.computeVertexNormals(),l}normalizePathBandPoints(e,t){const i=(e||[]).filter(r=>Number.isFinite(r==null?void 0:r.x)&&Number.isFinite(r==null?void 0:r.y)).map(r=>r.clone());if(t&&i.length>2){const r=i[0],a=i[i.length-1];r.distanceToSquared(a)<1e-10&&i.pop()}return i}clearSelectedFeature(){var t;const e=!!((t=this.selectedVectorFeatures)!=null&&t.length);this.selectedVectorFeatures=[],e&&this.redrawVectorTopicLayer(),this.clearSelectedGeometryGroup()}clearSelectedGeometryGroup(){var t,i;if(!this.selectedFeatureGroup)return;const e=new Set;for(;this.selectedFeatureGroup.children.length;){const r=this.selectedFeatureGroup.children.pop();(i=(t=r.geometry)==null?void 0:t.dispose)==null||i.call(t),Array.isArray(r.material)?r.material.forEach(a=>e.add(a)):e.add(r.material)}e.forEach(r=>{var a;return(a=r==null?void 0:r.dispose)==null?void 0:a.call(r)})}normalizeFeaturePolygons(e){return rW(e)}normalizeFeatureLineStrings(e){return e!=null&&e.coordinates?e.type==="LineString"?[e.coordinates]:e.type==="MultiLineString"?e.coordinates:[]:[]}getDisplayFeaturePolygons(e){const t=this.normalizeFeaturePolygons(e),i=this.getLayerClipBounds(this.currentTopicLayer);return i?t.map(r=>{const a=this.clipRingToBounds(r==null?void 0:r[0],i);if(a.length<3)return null;const o=r.slice(1).map(s=>this.clipRingToBounds(s,i)).filter(s=>s.length>=3);return[a,...o]}).filter(Boolean):t}clipRingToBounds(e=[],t){let i=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=i;i=[],o.length&&o.forEach((s,l)=>{const u=o[(l+o.length-1)%o.length],c=a.inside(s),d=a.inside(u);c?(d||i.push(a.intersect(u,s)),i.push(s)):d&&i.push(a.intersect(u,s))})}),i}getLngLatLineIntersection(e,t,i,r){const a=i==="lng"?0:1,o=i==="lng"?1:0,s=t[a]-e[a];if(!s)return[...e];const l=(r-e[a])/s,u=[...e];return u[a]=r,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 i=new ju;return this.createProjectedRingPoints(t).forEach((a,o)=>{o===0?i.moveTo(a.x,a.y):i.lineTo(a.x,a.y)}),e.slice(1).forEach(a=>{const o=this.createProjectedRingPoints(a);if(o.length<3)return;const s=new ju;o.forEach((l,u)=>{u===0?s.moveTo(l.x,l.y):s.lineTo(l.x,l.y)}),i.holes.push(s)}),i}createProjectedRingPoints(e){if(!Array.isArray(e))return[];const t=[];return e.forEach(i=>{if(!Array.isArray(i)||i.length<2)return;const r=Number(i[0]),a=Number(i[1]);if(!Number.isFinite(r)||!Number.isFinite(a))return;const[o,s]=this.geoProjection([r,a]);t.push(new Le(o,-s,0))}),t}enhanceTexture(e){var i,r,a;const t=(r=(i=this.renderer)==null?void 0:i.instance)==null?void 0:r.capabilities;e.anisotropy=((a=t==null?void 0:t.getMaxAnisotropy)==null?void 0:a.call(t))||1,e.needsUpdate=!0}geoProjection(e){return Ic().center(this.geoProjectionCenter).scale(this.geoProjectionScale).translate([0,0])(e)}update(e){super.update(e),this.updateTradeFlowPulses(e),this.interactionManager&&this.interactionManager.update()}destroy(){var e,t,i,r;this.callbacks={},(t=(e=this.canvas)==null?void 0:e.removeEventListener)==null||t.call(e,"pointerdown",this.handleCanvasBoundaryPointerDown,!0),(r=(i=this.canvas)==null?void 0:i.removeEventListener)==null||r.call(i,"dblclick",this.handleCanvasBoundaryDoubleClick,!0),this.clearTradeFlowLayer(),this.clearSelectedFeature(),super.destroy(),this.label3d&&this.label3d.destroy()}}const POe={class:"map"},rm={__name:"map",props:{activeLayer:{type:Object,default:null},mapRanking:{type:Object,default:null}},emits:["feature-loading","feature-info","layer-status","draw-boundary","scene-mounted"],setup(n,{expose:e,emit:t}){const i=n,r=t,a=Wt(null),o=vg(null);let s=null,l=null,u=null,c=null;dl(()=>{r("scene-mounted")}),Bl(()=>{C()});function d(P){o.value||!a.value||(o.value=new EOe(a.value,P,{onFeatureLoading:F=>r("feature-loading",F),onFeatureInfo:F=>r("feature-info",F),onLayerStatus:F=>r("layer-status",F),onDrawBoundary:F=>r("draw-boundary",F)}),o.value.time.pause(),o.value.setTopicLayers(i.activeLayer?[i.activeLayer]:[]),o.value.setTownRanking(i.mapRanking),I(),M())}function h(){return rn(this,null,function*(){o.value&&(o.value.time.resume(),o.value.animateTl.timeScale(1),o.value.animateTl.play())})}function f(){var P,F;(F=(P=o.value)==null?void 0:P.clearSelectedFeature)==null||F.call(P)}function p(P){var F,V;(V=(F=o.value)==null?void 0:F.focusProject)==null||V.call(F,P)}function m(P){var F,V;(V=(F=o.value)==null?void 0:F.focusPasture)==null||V.call(F,P)}function v(P,F){var V,G;return(G=(V=o.value)==null?void 0:V.focusTownByName)==null?void 0:G.call(V,P,F)}function g(P){var F,V;(V=(F=o.value)==null?void 0:F.setBoundaryDrawing)==null||V.call(F,P)}function _(){var P,F;return(F=(P=o.value)==null?void 0:P.finishBoundaryDrawing)==null?void 0:F.call(P)}function S(){var P,F;(F=(P=o.value)==null?void 0:P.undoBoundaryPoint)==null||F.call(P)}function x(){var P,F;(F=(P=o.value)==null?void 0:P.clearAnalysisBoundary)==null||F.call(P)}function A(P){var F,V;(V=(F=o.value)==null?void 0:F.showAnalysisResult)==null||V.call(F,P)}function C(){var P,F;E(),(F=(P=o.value)==null?void 0:P.destroy)==null||F.call(P),o.value=null}function M(){l&&window.cancelAnimationFrame(l),l=window.requestAnimationFrame(()=>{var P,F,V,G,W;l=null,(V=(F=(P=o.value)==null?void 0:P.sizes)==null?void 0:F.init)==null||V.call(F),(W=(G=o.value)==null?void 0:G.resize)==null||W.call(G)}),u&&window.clearTimeout(u),u=window.setTimeout(()=>{var P,F,V,G,W;u=null,(V=(F=(P=o.value)==null?void 0:P.sizes)==null?void 0:F.init)==null||V.call(F),(W=(G=o.value)==null?void 0:G.resize)==null||W.call(G)},180)}function I(){var F;E();const P=(F=a.value)==null?void 0:F.parentNode;P&&window.ResizeObserver&&(s=new ResizeObserver(()=>M()),s.observe(P)),c=window.setInterval(D,1e3),Qs(M)}function D(){var Q;if(!o.value||!a.value)return;const P=a.value.parentNode,F=(P==null?void 0:P.offsetWidth)||window.innerWidth||1,V=(P==null?void 0:P.offsetHeight)||window.innerHeight||1,G=((Q=o.value.sizes)==null?void 0:Q.pixelRatio)||1,W=Math.floor(F*G),Y=Math.floor(V*G);(a.value.width!==W||a.value.height!==Y)&&M()}function E(){s&&(s.disconnect(),s=null),l&&(window.cancelAnimationFrame(l),l=null),u&&(window.clearTimeout(u),u=null),c&&(window.clearInterval(c),c=null)}return qa(()=>i.activeLayer,P=>{o.value&&o.value.setTopicLayers(P?[P]:[])},{deep:!0}),qa(()=>i.mapRanking,P=>{o.value&&o.value.setTownRanking(P)},{deep:!0}),e({loadMap:d,play:h,clearSelectedFeature:f,focusProject:p,focusPasture:m,focusTown:v,setBoundaryDrawing:g,finishBoundaryDrawing:_,undoBoundaryPoint:S,clearAnalysisBoundary:x,showAnalysisResult:A,destroyMap:C,canvasMap:o}),(P,F)=>(Te(),Pe("div",POe,[O("canvas",{ref_key:"canvasRef",ref:a},null,512)]))}};const ROe={key:0,class:"business-stat-empty"},LOe={class:"business-stat-rank"},IOe={class:"business-stat-main"},DOe={class:"business-stat-name"},NOe={class:"business-stat-bar"},kOe={class:"business-stat-value"},FOe={key:0},aW={__name:"BusinessStatList",props:{rows:{type:Array,default:()=>[]},compact:{type:Boolean,default:!1}},setup(n){const e=n,t=Ye(()=>{const r=e.rows.map(a=>Number(a.value)).filter(a=>!Number.isNaN(a));return Math.max(...r,1)});function i(r){const a=Number(r.value);return Number.isNaN(a)?36:Math.max(8,Math.round(a/t.value*100))}return(r,a)=>(Te(),Pe("div",{class:Xn(["business-stat-list",{"is-compact":n.compact,"is-dense":n.rows.length>10}])},[n.rows.length?Dn("",!0):(Te(),Pe("div",ROe,"暂无业务统计数据")),(Te(!0),Pe(bn,null,Bn(n.rows,(o,s)=>(Te(),Pe("div",{key:o.key||o.name,class:"business-stat-row"},[O("div",LOe,De(s+1),1),O("div",IOe,[O("div",DOe,De(o.name),1),O("div",NOe,[O("span",{style:Ji({width:`${i(o)}%`})},null,4)])]),O("div",kOe,[O("strong",null,De(o.value),1),O("em",null,De(o.unit),1),o.extra?(Te(),Pe("span",FOe,De(o.extra),1)):Dn("",!0)])]))),128))],2))}},OOe=""+new URL("ring2-a1b91808-balabala-1782919616283.png",import.meta.url).href,BOe=""+new URL("ring3-fe0f60d7-balabala-1782919616283.png",import.meta.url).href,zOe=""+new URL("ring4-f2e324d6-balabala-1782919616283.png",import.meta.url).href;const GOe={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 tn(wt({},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 Nr,{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(n=>n.value).reduce((n,e)=>n+e,0),this.init()},beforeUnmount(){clearInterval(this.timer),this.destroy()},methods:{init(){this.scene=new ZQ,this.initCamera(),this.initRenderer(),this.initLight(),this.initAxes(),this.initControls(),this.createPlane({url:OOe,width:5,position:new Le(0,0,-.01),color:"#00ffff"}),this.createPlane({url:BOe,width:6.5,position:new Le(0,0,-.02),color:"#00ffff"}),this.createPlane({url:zOe,width:5.5,position:new Le(0,0,-.03),animate:!0,color:"#00ffff"}),this.createPie(),this.loop()},createPlane(n){let e={url:"texture/ring1.png",width:5.5,z:0,position:new Le(0,0,0),animate:!1,color:null},t=Object.assign(e,n);const i=new Al(t.width,t.width),r=new Mr({map:this.getTexture(t.url),transparent:!0,side:aa,depthTest:!1});t.color&&(r.color=new Jn(t.color));const a=new fr(i,r);a.position.copy(t.position),a.rotation.x=-1*Math.PI/2,t.animate&&ka.to(a.rotation,{z:2*Math.PI,repeat:-1,ease:"none",duration:3}),this.scene.add(a)},getTexture(n){const e=new AR().load(n);return e.wrapS=e.wrapT=Eo,e},createPie(){let n=0,e=0;for(var t=0;t<this.data.length;t++){let i=this.data[t].value/this.count;t==0?n=0:n=e+1e-4,e=e+2*Math.PI*i-1e-4;let r=this.addRing({startAngle:n,endAngle:e,color:new Jn(this.colors[t%this.colors.length])});r.name="ring"+t,this.pieGroup.add(r)}this.scene.add(this.pieGroup),this.chooseRing(this.activeIndex,!0),this.timer=setInterval(()=>{this.loopChange()},this.delay)},loopChange(){let n=this.activeIndex+1;n>=this.data.length&&(n=0,this.loopComplete&&this.loopComplete()),this.chooseRing(n)},chooseRing(n=0,e=!1){let t=n-1<0?this.data.length-1:n-1,i=this.pieGroup.children[t];this.prevMesh=i,this.activeIndex=n;let r=this.pieGroup.children[n];e||(ka.to(i.scale,{z:1}),ka.to(i.material,{opacity:this.opacity})),ka.to(r.scale,{z:2}),ka.to(r.material,{opacity:.8})},addRing(n={}){let e={innerRadius:1.5,outerRadius:2,thickness:.5,startAngle:0,endAngle:Math.PI/2,color:65535,segments:120},t=Object.assign(e,n),i=new ju;i.arc(0,0,t.outerRadius,t.startAngle,t.endAngle);let r=i.getPoints(t.segments),a=new ju;a.arc(0,0,t.innerRadius,t.endAngle,t.startAngle,!0);let o=a.getPoints(t.segments),s=new ju(r.concat(o));const l={steps:1,depth:t.thickness,bevelEnabled:!0,bevelThickness:0,bevelSize:0,bevelOffset:0,bevelSegments:0},u=new l7(s,l);let c=new KC({color:t.color,transparent:!0,opacity:this.opacity,side:aa});const d=new fr(u,c.clone());return d.renderOrder=10,d.rotation.x=-1*Math.PI/2,d},initCamera(){var n=this.width/this.height;this.camera=new ss(30,n,.1,1500),this.camera.position.set(6.023813305272227,4.838542633695233,6.111272698256137),this.camera.lookAt(0,0,0)},initRenderer(){this.renderer=new vR({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 n=new V8(16777215,2);n.position.set(200,300,200);let e=new V8(16777215,2);e.position.set(-200,-300,-200);let t=new hee(16777215,2);this.scene.add(n),this.scene.add(e),this.scene.add(t)},initAxes(){this.axes=new fee(0),this.scene.add(this.axes)},initControls(){this.controls=new bee(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 n=this.width/this.height;this.camera.aspect=n,this.camera.updateProjectionMatrix(),this.renderer.setSize(this.width,this.height),this.renderer.setPixelRatio(window.devicePixelRatio)},destroy(){this.prevMesh&&(ka.set(this.prevMesh.scale,{z:1}),ka.set(this.prevMesh.material,{opacity:this.opacity})),this.stop(),window.removeEventListener("resize",()=>{this.resize()}),this.renderer&&(Kke(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)}}},UOe={class:"three-pie-wrap"},VOe={class:"three-pie",ref:"pieDom"},HOe={class:"three-pie-slot"};function WOe(n,e,t,i,r,a){return Te(),Pe("div",UOe,[O("div",VOe,null,512),O("div",HOe,[av(n.$slots,"default",{data:a.currentData})])])}const Oee=c_(GOe,[["render",WOe]]);const jOe={key:0,class:"business-panel-empty"},$Oe={key:2,class:"business-metrics"},qOe={key:3,class:"business-icon-metrics"},XOe={class:"business-icon-metric-copy"},YOe={key:0},KOe={key:4,class:"business-spotlight"},ZOe={class:"business-spotlight-main"},JOe={class:"business-spotlight-side"},QOe={key:0},eBe={key:1,class:"business-panel-empty"},tBe={key:0,class:"business-ring-visual"},nBe={class:"business-ring-inner"},iBe={key:1,class:"business-donut-visual"},rBe={class:"business-three-pie-center"},aBe={class:"business-donut-legend"},oBe={key:1,class:"business-panel-empty"},sBe={key:6,class:"business-structure"},lBe={class:"business-structure-overview"},uBe={class:"business-structure-band"},cBe=["title"],dBe={class:"business-structure-list"},hBe={key:1,class:"business-panel-empty"},fBe={key:7,class:"business-capacity"},pBe={class:"business-capacity-head"},vBe={class:"business-capacity-band"},mBe=["title"],gBe={class:"business-capacity-list"},yBe={key:0,class:"business-capacity-town"},_Be={key:1,class:"business-panel-empty"},SBe={class:"business-bar-name"},bBe={class:"business-bar-track"},xBe={key:0},wBe={key:1},TBe={key:0,class:"business-column-unit"},ABe={key:0},CBe={class:"business-column-track"},MBe={key:10,class:"business-project-table"},EBe={class:"business-project-search"},PBe=["placeholder"],RBe={class:"business-project-frame"},LBe=["onClick","onKeydown"],IBe=["title"],DBe={key:0},NBe={key:0},kBe={key:1},FBe={key:0,class:"business-project-empty"},OBe={class:"business-table-head"},BBe={class:"business-table-body"},zBe={class:"business-table-name"},GBe={class:"business-table-value"},UBe={key:0},VBe={class:"business-stack-legend"},HBe={class:"business-stack-chart"},WBe={class:"business-stack-track"},jBe={key:0,class:"business-column-unit business-peak-unit"},$Be={key:0},qBe={key:14,class:"business-line"},XBe={viewBox:"0 0 320 86",preserveAspectRatio:"none","aria-hidden":"true"},YBe=["points"],KBe=["points"],ZBe=["cx","cy"],JBe=["cx","cy","onMouseenter"],QBe=["onMouseenter"],eze={key:0},tze={key:0},nze={class:"business-split-band"},ize={class:"business-split-list"},oW=3e3,Cl={__name:"BusinessPanelRenderer",props:{panel:{type:Object,default:()=>({rows:[]})},compact:{type:Boolean,default:!1}},emits:["row-select"],setup(n,{emit:e}){const t=n,i=e,r=["#24f6c4","#32dcff","#ffe06b","#7ee269","#ff9a62","#9ea7ff"],a=Ye(()=>{var Re;return((Re=t.panel)==null?void 0:Re.type)||"rank"}),o=Ye(()=>{var Re;return(((Re=t.panel)==null?void 0:Re.rows)||[]).filter(lt=>lt==null?void 0:lt.name)}),s=Ye(()=>o.value.map(Re=>tn(wt({},Re),{value:k(Re)})).filter(Re=>Re.value>0)),l=Ye(()=>o.value.map(Re=>k(Re)).filter(Re=>Re>0)),u=Ye(()=>Math.max(...l.value,1)),c=Ye(()=>l.value.reduce((Re,lt)=>Re+lt,0)),d=Ye(()=>o.value.filter(Re=>k(Re)>0)),h=Ye(()=>o.value.filter(Re=>k(Re)>0)),f=Ye(()=>h.value),p=Ye(()=>a.value!=="column"?"":xt()),m=Ye(()=>a.value!=="peak"?"":xt()),v=Ye(()=>o.value.filter(Re=>k(Re)>0)),g=Ye(()=>{var Re;return h.value.slice(0,((Re=t.panel)==null?void 0:Re.limit)||8)}),_=Ye(()=>{var Re;return((Re=t.panel)==null?void 0:Re.segments)||[]}),S=Ye(()=>o.value.filter(Re=>_t(Re)>0)),x=Wt(""),A=Wt(null),C=[{key:"name",label:"项目名称",field:"name",width:"45%",className:"business-project-col-name"},{key:"year",label:"年份",field:"year",width:"13%",fallback:"未知",align:"right",className:"business-project-col-year"},{key:"category",label:"类型",field:"category",width:"20%",className:"business-project-col-category"},{key:"scale",label:"规模",field:"value",width:"22%",align:"right",strong:!0,unitField:"unit",className:"business-project-col-scale"}],M=Ye(()=>{var lt;return(Array.isArray((lt=t.panel)==null?void 0:lt.columns)&&t.panel.columns.length?t.panel.columns:C).map((sn,Pi)=>({key:sn.key||sn.field||`column-${Pi}`,label:sn.label||sn.title||sn.name||"",field:sn.field||sn.dataIndex||sn.key,fields:sn.fields||[],width:sn.width,align:sn.align,strong:!!sn.strong,unit:sn.unit,unitField:sn.unitField,fallback:sn.fallback,format:sn.format,className:sn.className}))}),I=Ye(()=>{var Re;return((Re=t.panel)==null?void 0:Re.searchPlaceholder)||"搜索项目"}),D=Ye(()=>{var Re;return((Re=t.panel)==null?void 0:Re.emptyText)||"无匹配项目"}),E=Ye(()=>{var lt;const Re=Array.isArray((lt=t.panel)==null?void 0:lt.searchKeys)?t.panel.searchKeys:[];return Re.length?Re:[...M.value.flatMap(sn=>[sn.field,...sn.fields||[]]),"projectName","category","year","measure","townships","metric"].filter(Boolean)}),P=Ye(()=>{const Re=$e(x.value);return Re?o.value.filter(lt=>$e(mt(lt)).includes(Re)):o.value}),F=Ye(()=>o.value.find(Re=>["forage-total","wetland-yield-total"].includes(Re.key))||o.value[0]),V=Ye(()=>o.value.filter(Re=>["forage-edible","forage-unavailable","wetland-yield-edible","wetland-yield-unavailable"].includes(Re.key))),G=Ye(()=>o.value.find(Re=>["forage-top-town","wetland-yield-top-town"].includes(Re.key))),W=Wt(0),Y=Wt(null);let Q=null;const K=Ye(()=>{var Re,lt;return`${((Re=t.panel)==null?void 0:Re.key)||((lt=t.panel)==null?void 0:lt.title)||"pie"}-${s.value.map(sn=>`${sn.name}:${sn.value}`).join("|")}`}),ae=Ye(()=>{const Re=ie.value;return Re?W.value%Re:0}),ie=Ye(()=>{var Re;return a.value==="structure"?v.value.length:a.value==="donut"?s.value.length:a.value==="bar"&&((Re=t.panel)==null?void 0:Re.variant)==="capacity"?V.value.length:a.value==="bar"||a.value==="column"?h.value.length:a.value==="table"?f.value.length:a.value==="line"?h.value.length:a.value==="split"?d.value.length:0}),he=Ye(()=>s.value[ae.value]||s.value[0]);Ye(()=>v.value[ae.value]||v.value[0]);const Ee=Ye(()=>o.value[0]),He=Ye(()=>o.value.slice(0,4).map((Re,lt)=>tn(wt({},Re),{icon:Tn(Re,lt)}))),xe=Ye(()=>v.value.map((Re,lt)=>tn(wt({},Re),{displayIndex:lt}))),Fe=Ye(()=>{var Re;return a.value!=="donut"?"standard":((Re=t.panel)==null?void 0:Re.variant)==="ring"?"ring":"three"}),pt=Ye(()=>{if(!s.value.length)return{};const Re=c.value||1;let lt=-90;return{"--ring-gradient":`conic-gradient(${s.value.map((Pi,er)=>{const _e=k(Pi)/Re*360,ze=lt,Qe=lt+_e;return lt=Qe,`${En(er)} ${ze}deg ${Qe}deg`}).join(", ")})`,"--ring-active-color":En(ae.value)}});dl(()=>{ut()}),Bl(()=>{Jt()}),qa(()=>{var Re;return[(Re=t.panel)==null?void 0:Re.key,o.value.length]},()=>{W.value=0,Y.value=null,x.value="",A.value=null,ut()});const Ot=Ye(()=>{const Re=h.value,lt=320,sn=66,Pi=10,er=Re.length>1?lt/(Re.length-1):lt,_e=Re.map(ke=>k(ke)).filter(ke=>ke>0),ze=_e.length?Math.min(..._e):0,Qe=_e.length?Math.max(..._e):1,At=Math.max(Qe-ze,Qe*.08,1);return Re.map((ke,ft)=>{const en=k(ke);return{x:Math.round(ft*er),y:Math.round(Pi+sn-(en-ze)/At*sn),item:ke}})}),bt=Ye(()=>Ot.value.map(Re=>`${Re.x},${Re.y}`).join(" ")),ht=Ye(()=>Ot.value.length?`0,86 ${bt.value} 320,86`:""),Kt=Ye(()=>h.value),Tt=Ye(()=>({gridTemplateColumns:`repeat(${Math.max(Kt.value.length,1)}, minmax(0, 1fr))`})),Ae=Ye(()=>Number.isInteger(Y.value)?Ot.value[Y.value]:null),Lt=Ye(()=>Ot.value.length?Number.isInteger(Y.value)?Y.value:ae.value:0),vt=Ye(()=>Ae.value?Ae.value:Ot.value[Lt.value]||Ot.value[0]),Ft=Ye(()=>{const Re=vt.value;if(!Re)return{};const lt=Re.x/320*100,sn=Re.y/86*100,Pi=Re.y<42;return{left:`${Math.min(84,Math.max(16,lt))}%`,top:`${sn}%`,transform:Pi?"translate(-50%, 10px)":"translate(-50%, calc(-100% - 8px))"}});function k(Re){const lt=Number(Re==null?void 0:Re.value);if(!Number.isNaN(lt)&&lt>0)return lt;const sn=Number(Re==null?void 0:Re.percent);return Number.isNaN(sn)?0:sn}function _t(Re){const lt=(Re==null?void 0:Re.segments)||(Re==null?void 0:Re.values)||{};return _.value.reduce((sn,Pi)=>sn+(Number(lt[Pi.key])||0),0)}function Ct(Re){const lt=_t(Re),sn=(Re==null?void 0:Re.segments)||(Re==null?void 0:Re.values)||{};return lt?_.value.map(Pi=>{const er=Number(sn[Pi.key])||0;return tn(wt({},Pi),{value:er,percent:Math.max(er>0?3:0,er/lt*100)})}):[]}function J(Re){const lt=Number(Re);return Number.isNaN(lt)?"--":Number.isInteger(lt)?`${lt}`:`${Number(lt.toFixed(2))}`}function ee(Re){return(Re==null?void 0:Re.displayValue)!==void 0&&(Re==null?void 0:Re.displayValue)!==null&&(Re==null?void 0:Re.displayValue)!==""?Re.displayValue:(Re==null?void 0:Re.value)===void 0||(Re==null?void 0:Re.value)===null||(Re==null?void 0:Re.value)===""?"--":J(Re.value)}function Ue(Re){var Pi;const lt=(Re==null?void 0:Re.displayUnit)||(Re==null?void 0:Re.unit)||"";if(!lt)return"";const sn=String((Pi=ee(Re))!=null?Pi:"");return sn&&sn.endsWith(String(lt))?"":lt}function xt(){const Re=[...new Set(h.value.map(lt=>(lt==null?void 0:lt.displayUnit)||(lt==null?void 0:lt.unit)).filter(Boolean))];return Re.length===1?Re[0]:""}function Bt(Re){const lt=Ue(Re);return lt?p.value===lt?"":lt:""}function Ce(Re){const lt=Ue(Re);return lt?m.value===lt?"":lt:""}function We(Re){const lt=String(Re||"").trim();if(!lt)return"";const sn=lt.match(/^(.+)(镇|乡|村)$/);return sn?`${sn[1]}
${sn[2]}`:lt}function $e(Re){return String(Re||"").trim().toLowerCase()}function mt(Re){const lt=E.value.map(sn=>Yt(Re,{field:sn})).filter(sn=>sn!=null);return[Re==null?void 0:Re.searchText,...lt].filter(Boolean).join(" ")}function Yt(Re,lt){const sn=[lt==null?void 0:lt.field,...(lt==null?void 0:lt.fields)||[]].filter(Boolean);for(const Pi of sn){const er=String(Pi).split(".").reduce((_e,ze)=>_e==null?void 0:_e[ze],Re);if(er!=null&&er!=="")return er}}function st(Re,lt){const sn=Yt(Re,lt);return sn==null||sn===""?(lt==null?void 0:lt.fallback)||"--":(lt==null?void 0:lt.format)==="number"?J(sn):(lt==null?void 0:lt.format)==="displayValue"?ee({value:sn}):String(sn)}function it(Re,lt){return lt!=null&&lt.unitField&&(Re!=null&&Re[lt.unitField])?Re[lt.unitField]:(lt==null?void 0:lt.unit)||""}function Vt(Re){return{"business-project-name":(Re==null?void 0:Re.key)==="name","business-project-locate":(Re==null?void 0:Re.key)==="locate","is-right":(Re==null?void 0:Re.align)==="right","is-center":(Re==null?void 0:Re.align)==="center","is-strong":Re==null?void 0:Re.strong}}function Zt(Re){(Re==null?void 0:Re.canLocate)!==!1&&(A.value=(Re==null?void 0:Re.key)||(Re==null?void 0:Re.name)||null,i("row-select",Re))}function nn(Re){const lt=Number(Re==null?void 0:Re.scaleValue);if(!Number.isNaN(lt)&&lt>0)return Math.max(8,Math.min(100,Math.round(lt)));const sn=k(Re);return sn?Math.max(8,Math.round(sn/u.value*100)):8}function cn(Re,lt){const sn=nn(Re),Pi=Math.max(.14,Math.min(.46,sn/180));return{"--heat-color":En(lt),"--heat-bg":an(En(lt),Pi)}}function an(Re,lt=.2){const sn=String(Re||"").replace("#","");if(sn.length!==6)return`rgba(48, 220, 255, ${lt})`;const Pi=parseInt(sn,16),er=Pi>>16&255,_e=Pi>>8&255,ze=Pi&255;return`rgba(${er}, ${_e}, ${ze}, ${lt})`}function Ln(Re){const lt=Ot.value.length;if(!lt)return;const sn=Re.currentTarget.getBoundingClientRect(),Pi=sn.width?(Re.clientX-sn.left)/sn.width:0,er=Math.min(lt-1,Math.max(0,Math.round(Pi*(lt-1))));Y.value=er}function je(Re){const lt=k(Re);return!c.value||!lt?0:Math.max(6,lt/c.value*100)}function Ht(Re){const lt=k(Re);return!c.value||!lt?0:Math.max(2,lt/c.value*100)}function wn(Re){if(!Re)return"--";if(Re.extra)return Re.extra;const lt=k(Re);return!c.value||!lt?"--":`${J(lt/c.value*100)}%`}function zn(){const Re=k(F.value);return Re>0?Re:V.value.reduce((lt,sn)=>lt+k(sn),0)}function Be(Re){const lt=zn(),sn=k(Re);return!lt||!sn?0:Math.max(6,sn/lt*100)}function pn(Re){const lt=zn(),sn=k(Re);return!lt||!sn?"--":`${J(sn/lt*100)}%`}function dn(Re,lt){return["forage-edible","wetland-yield-edible"].includes(Re==null?void 0:Re.key)?"#24f6c4":["forage-unavailable","wetland-yield-unavailable"].includes(Re==null?void 0:Re.key)?"#ffe06b":En(lt)}function Un(Re){const lt=k(Re),sn=Number(Re==null?void 0:Re.count)||c.value;return!lt||!sn?"0%":`${J(lt/sn*100)}%`}function En(Re){return r[Re%r.length]}function Tn(Re,lt){if(Re!=null&&Re.icon)return String(Re.icon).replace(/[^a-z0-9-]/gi,"");const sn=String((Re==null?void 0:Re.name)||"");return sn.includes("退化率")||sn.includes("利用率")||sn.includes("占比")?"rate":sn.includes("重度")||sn.includes("退化")?"risk":sn.includes("可食")||sn.includes("供给")?"leaf":sn.includes("不可")?"stack":sn.includes("产量")||sn.includes("鲜草")?"yield":sn.includes("乡镇")?"town":sn.includes("面积")?"area":["yield","leaf","rate","risk"][lt%4]}function ut(){Jt();const Re=ie.value;Re<2||(Q=window.setInterval(()=>{W.value=(W.value+1)%Re},oW))}function Jt(){Q&&(window.clearInterval(Q),Q=null)}function hn(Re){return`linear-gradient(90deg, rgba(36, 246, 196, 0.18), ${En(Re)})`}function Nn(Re){return`linear-gradient(180deg, ${En(Re)}, rgba(50, 220, 255, 0.12))`}return(Re,lt)=>{var sn,Pi,er,_e,ze,Qe,At;return Te(),Pe("div",{class:Xn(["business-panel",[`is-${a.value}`,`is-${Fe.value}`,{"is-compact":n.compact}]])},[o.value.length?a.value==="rank"?(Te(),Uo(aW,{key:1,rows:o.value,compact:""},null,8,["rows"])):a.value==="metric"?(Te(),Pe("div",$Oe,[(Te(!0),Pe(bn,null,Bn(o.value.slice(0,4),ke=>(Te(),Pe("div",{key:ke.key||ke.name,class:"business-metric-item"},[O("span",null,De(ke.name),1),O("strong",null,De(ee(ke)),1),O("em",null,De(ke.unit),1)]))),128))])):a.value==="iconMetric"?(Te(),Pe("div",qOe,[(Te(!0),Pe(bn,null,Bn(He.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:Xn(["business-icon-metric-item",`is-tone-${ft%r.length}`])},[O("i",{class:Xn(["business-icon-metric-mark",`is-${ke.icon}`])},[...lt[2]||(lt[2]=[O("span",null,null,-1)])],2),O("div",XOe,[O("span",null,De(ke.name),1),O("strong",null,[kr(De(ee(ke)),1),ke.unit?(Te(),Pe("em",YOe,De(ke.unit),1)):Dn("",!0)])])],2))),128))])):a.value==="spotlight"?(Te(),Pe("div",KOe,[Ee.value?(Te(),Pe(bn,{key:0},[O("div",ZOe,[O("span",null,De(Ee.value.name),1),O("strong",null,[kr(De(ee(Ee.value)),1),O("em",null,De(Ee.value.unit),1)]),O("small",null,De(Ee.value.extra||((sn=n.panel)==null?void 0:sn.note)||"核心业务指标"),1)]),O("div",JOe,[(Te(!0),Pe(bn,null,Bn(o.value.slice(1,4),(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:"business-spotlight-chip"},[O("i",{style:Ji({borderColor:En(ft+1)})},null,4),O("span",null,De(ke.name),1),O("strong",null,[kr(De(ee(ke)),1),O("em",null,De(ke.unit),1)]),ke.extra?(Te(),Pe("small",QOe,De(ke.extra),1)):Dn("",!0)]))),128))])],64)):(Te(),Pe("div",eBe,"暂无业务统计数据"))])):a.value==="donut"?(Te(),Pe("div",{key:5,class:Xn(["business-donut",[`is-variant-${Fe.value}`,{"is-dense":s.value.length>5}]])},[s.value.length?(Te(),Pe(bn,{key:0},[Fe.value==="ring"?(Te(),Pe("div",tBe,[O("div",{class:"business-ring-core",style:Ji(pt.value)},[lt[3]||(lt[3]=O("div",{class:"business-ring-orbit"},null,-1)),O("div",nBe,[O("strong",null,De(Un(he.value)),1),O("span",null,De(((Pi=he.value)==null?void 0:Pi.name)||"结构占比"),1)])],4)])):(Te(),Pe("div",iBe,[(Te(),Uo(Oee,{key:K.value,data:s.value,delay:oW,colors:r,opacity:.62,class:"business-three-pie"},{default:mi(({data:ke})=>[O("div",rBe,[O("strong",null,De(Un(ke)),1),O("span",null,De((ke==null?void 0:ke.name)||"结构占比"),1)])]),_:1},8,["data"]))])),O("div",aBe,[(Te(!0),Pe(bn,null,Bn(s.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:Xn(["business-donut-row",{"is-active":ft===ae.value}])},[O("i",{style:Ji({borderColor:En(ft)})},null,4),O("span",null,De(ke.name),1),O("strong",null,De(ee(ke)),1),O("em",null,De(ke.unit),1)],2))),128))])],64)):(Te(),Pe("div",oBe,"暂无业务统计数据"))],2)):a.value==="structure"?(Te(),Pe("div",sBe,[v.value.length?(Te(),Pe(bn,{key:0},[O("div",lBe,[O("div",uBe,[(Te(!0),Pe(bn,null,Bn(v.value,(ke,ft)=>(Te(),Pe("i",{key:ke.key||ke.name,class:Xn({"is-active":ft===ae.value}),style:Ji({width:`${Ht(ke)}%`,background:En(ft),color:En(ft)}),title:`${ke.name}:${ee(ke)}${ke.unit||""} ${wn(ke)}`},null,14,cBe))),128))])]),O("div",dBe,[(Te(!0),Pe(bn,null,Bn(xe.value,ke=>(Te(),Pe("div",{key:ke.key||ke.name,class:Xn(["business-structure-row",{"is-active":ke.displayIndex===ae.value}])},[O("i",{style:Ji({background:En(ke.displayIndex),color:En(ke.displayIndex)})},null,4),O("span",null,De(ke.name),1),O("strong",null,[kr(De(ee(ke)),1),O("em",null,De(ke.unit),1)]),O("small",null,De(wn(ke)),1)],2))),128))])],64)):(Te(),Pe("div",hBe,"暂无业务统计数据"))])):a.value==="bar"&&((er=n.panel)==null?void 0:er.variant)==="capacity"?(Te(),Pe("div",fBe,[F.value?(Te(),Pe(bn,{key:0},[O("div",pBe,[O("span",null,De(F.value.name),1),O("strong",null,[kr(De(ee(F.value)),1),O("em",null,De(F.value.unit),1)])]),O("div",vBe,[(Te(!0),Pe(bn,null,Bn(V.value,(ke,ft)=>(Te(),Pe("i",{key:ke.key||ke.name,class:Xn({"is-active":ft===ae.value}),style:Ji({width:`${Be(ke)}%`,background:dn(ke,ft),color:dn(ke,ft)}),title:`${ke.name}:${ee(ke)}${ke.unit||""} ${pn(ke)}`},null,14,mBe))),128))]),O("div",gBe,[(Te(!0),Pe(bn,null,Bn(V.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:Xn(["business-capacity-row",{"is-active":ft===ae.value}])},[O("i",{style:Ji({background:dn(ke,ft),color:dn(ke,ft)})},null,4),O("span",null,De(ke.name),1),O("strong",null,[kr(De(ee(ke)),1),O("em",null,De(ke.unit),1)]),O("small",null,De(pn(ke)),1)],2))),128))]),G.value?(Te(),Pe("div",yBe,[O("span",null,De(G.value.name),1),O("strong",null,[kr(De(ee(G.value)),1),O("em",null,De(G.value.unit),1)])])):Dn("",!0)],64)):(Te(),Pe("div",_Be,"暂无业务统计数据"))])):a.value==="bar"?(Te(),Pe("div",{key:8,class:Xn(["business-bars",{"is-dense":h.value.length>=5,"is-long":h.value.length>10,"is-single":((_e=n.panel)==null?void 0:_e.span)===1,"is-distribution":((ze=n.panel)==null?void 0:ze.variant)==="distribution","is-capacity":((Qe=n.panel)==null?void 0:Qe.variant)==="capacity"}])},[(Te(!0),Pe(bn,null,Bn(h.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:Xn(["business-bar-row",{"is-active":ft===ae.value}])},[O("span",SBe,De(ke.name),1),O("div",bBe,[O("i",{style:Ji({width:`${nn(ke)}%`,background:hn(ft)})},null,4)]),O("strong",null,[kr(De(ee(ke))+" ",1),ke.unit?(Te(),Pe("em",xBe,De(ke.unit),1)):Dn("",!0),ke.extra?(Te(),Pe("small",wBe,De(ke.extra),1)):Dn("",!0)])],2))),128))],2)):a.value==="column"?(Te(),Pe("div",{key:9,class:Xn(["business-columns",[`is-variant-${((At=n.panel)==null?void 0:At.variant)||"solid"}`,{"is-dense":h.value.length>6}]])},[p.value?(Te(),Pe("small",TBe,"单位:"+De(p.value),1)):Dn("",!0),(Te(!0),Pe(bn,null,Bn(h.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:Xn(["business-column-item",{"is-active":ft===ae.value}])},[O("strong",null,[kr(De(ee(ke)),1),Bt(ke)?(Te(),Pe("em",ABe,De(Bt(ke)),1)):Dn("",!0)]),O("div",CBe,[O("i",{style:Ji({height:`${nn(ke)}%`,background:Nn(ft),"--column-load-delay":`${ft*.075}s`})},null,4)]),O("span",null,De(We(ke.name)),1)],2))),128))],2)):a.value==="projectTable"?(Te(),Pe("div",MBe,[O("div",EBe,[to(O("input",{"onUpdate:modelValue":lt[0]||(lt[0]=ke=>x.value=ke),type:"search",placeholder:I.value},null,8,PBe),[[Kf,x.value]])]),O("div",RBe,[O("table",null,[O("colgroup",null,[(Te(!0),Pe(bn,null,Bn(M.value,ke=>(Te(),Pe("col",{key:ke.key,class:Xn(ke.className),style:Ji({width:ke.width||void 0})},null,6))),128))]),O("thead",null,[O("tr",null,[(Te(!0),Pe(bn,null,Bn(M.value,ke=>(Te(),Pe("th",{key:ke.key,class:Xn(Vt(ke))},De(ke.label),3))),128))])]),O("tbody",null,[(Te(!0),Pe(bn,null,Bn(P.value,ke=>(Te(),Pe("tr",{key:ke.key||ke.name,class:Xn({"is-active":A.value===(ke.key||ke.name)}),tabindex:"0",onClick:ft=>Zt(ke),onKeydown:[V2(Ws(ft=>Zt(ke),["prevent"]),["enter"]),V2(Ws(ft=>Zt(ke),["prevent"]),["space"])]},[(Te(!0),Pe(bn,null,Bn(M.value,ft=>(Te(),Pe("td",{key:ft.key,class:Xn(Vt(ft)),title:st(ke,ft)},[ft.strong?(Te(),Pe("strong",DBe,[kr(De(st(ke,ft)),1),it(ke,ft)?(Te(),Pe("em",NBe,De(it(ke,ft)),1)):Dn("",!0)])):(Te(),Pe("span",kBe,De(st(ke,ft)),1))],10,IBe))),128))],42,LBe))),128))])]),P.value.length?Dn("",!0):(Te(),Pe("div",FBe,De(D.value),1))])])):a.value==="table"?(Te(),Pe("div",{key:11,class:Xn(["business-table",{"is-dense":f.value.length>8}])},[O("div",OBe,[(Te(),Pe(bn,null,Bn(2,ke=>O("div",{key:ke,class:"business-table-head-group"},[...lt[4]||(lt[4]=[O("span",null,"乡镇",-1),O("span",null,"亩产",-1)])])),64))]),O("div",BBe,[(Te(!0),Pe(bn,null,Bn(f.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:Xn(["business-table-row",{"is-active":ft===ae.value}])},[O("span",zBe,De(ke.name),1),O("div",GBe,[O("strong",null,[kr(De(ee(ke)),1),ke.unit?(Te(),Pe("em",UBe,De(ke.unit),1)):Dn("",!0)]),O("i",null,[O("b",{style:Ji({width:`${nn(ke)}%`,background:hn(ft)})},null,4)])])],2))),128))])],2)):a.value==="stackColumn"?(Te(),Pe("div",{key:12,class:Xn(["business-stack-columns",{"is-dense":S.value.length>6}])},[O("div",VBe,[(Te(!0),Pe(bn,null,Bn(_.value,(ke,ft)=>(Te(),Pe("span",{key:ke.key||ke.name},[O("i",{style:Ji({background:En(ft)})},null,4),kr(De(ke.name),1)]))),128))]),O("div",HBe,[(Te(!0),Pe(bn,null,Bn(S.value,ke=>(Te(),Pe("div",{key:ke.key||ke.name,class:"business-stack-item"},[O("div",WBe,[(Te(!0),Pe(bn,null,Bn(Ct(ke),(ft,en)=>(Te(),Pe("i",{key:ft.key||ft.name,style:Ji({height:`${ft.percent}%`,background:En(en)})},null,4))),128))]),O("span",null,De(We(ke.name)),1)]))),128))])],2)):a.value==="peak"?(Te(),Pe("div",{key:13,class:Xn(["business-peaks",{"is-dense":h.value.length>5}])},[m.value?(Te(),Pe("small",jBe,"单位:"+De(m.value),1)):Dn("",!0),(Te(!0),Pe(bn,null,Bn(h.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:"business-peak-item",style:Ji({"--peak-height":`${nn(ke)}%`,"--peak-color":En(ft)})},[O("strong",null,[kr(De(ee(ke)),1),Ce(ke)?(Te(),Pe("em",$Be,De(Ce(ke)),1)):Dn("",!0)]),lt[5]||(lt[5]=O("div",{class:"business-peak-stage"},[O("i")],-1)),O("span",null,De(We(ke.name)),1)],4))),128))],2)):a.value==="line"?(Te(),Pe("div",qBe,[O("div",{class:"business-line-chart",onMousemove:Ln,onMouseleave:lt[1]||(lt[1]=ke=>Y.value=null)},[(Te(),Pe("svg",XBe,[lt[6]||(lt[6]=O("path",{class:"business-line-grid",d:"M0 18H320M0 44H320M0 70H320"},null,-1)),O("polyline",{class:"business-line-area",points:ht.value},null,8,YBe),O("polyline",{class:"business-line-stroke",points:bt.value},null,8,KBe),(Te(!0),Pe(bn,null,Bn(Ot.value,(ke,ft)=>(Te(),Pe("circle",{key:ft,cx:ke.x,cy:ke.y,r:"3",class:Xn(["business-line-dot",{"is-active":ft===Lt.value}])},null,10,ZBe))),128)),(Te(!0),Pe(bn,null,Bn(Ot.value,(ke,ft)=>(Te(),Pe("circle",{key:`hit-${ft}`,cx:ke.x,cy:ke.y,r:"13",class:"business-line-hit",onMouseenter:en=>Y.value=ft},null,40,JBe))),128))])),O("div",{class:"business-line-hover-zones",style:Ji(Tt.value)},[(Te(!0),Pe(bn,null,Bn(Ot.value,(ke,ft)=>(Te(),Pe("i",{key:`zone-${ft}`,onMouseenter:en=>Y.value=ft},null,40,QBe))),128))],4),vt.value?(Te(),Pe("div",{key:0,class:"business-line-tooltip",style:Ji(Ft.value)},[O("span",null,De(vt.value.item.name),1),O("strong",null,[kr(De(ee(vt.value.item)),1),vt.value.item.unit?(Te(),Pe("em",eze,De(vt.value.item.unit),1)):Dn("",!0)])],4)):Dn("",!0)],32),O("div",{class:"business-line-labels",style:Ji(Tt.value)},[(Te(!0),Pe(bn,null,Bn(Kt.value,ke=>(Te(),Pe("span",{key:ke.key||ke.name},De(We(ke.name)),1))),128))],4)])):a.value==="heat"?(Te(),Pe("div",{key:15,class:Xn(["business-heat",{"is-dense":g.value.length>6}])},[(Te(!0),Pe(bn,null,Bn(g.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:"business-heat-cell",style:Ji(cn(ke,ft))},[lt[7]||(lt[7]=O("i",null,null,-1)),O("span",null,De(ke.name),1),O("strong",null,[kr(De(ee(ke)),1),ke.unit?(Te(),Pe("em",tze,De(ke.unit),1)):Dn("",!0)])],4))),128))],2)):a.value==="split"?(Te(),Pe("div",{key:16,class:Xn(["business-split",{"is-dense":d.value.length>10}])},[O("div",nze,[(Te(!0),Pe(bn,null,Bn(d.value,(ke,ft)=>(Te(),Pe("i",{key:ke.key||ke.name,style:Ji({width:`${je(ke)}%`,background:En(ft)})},null,4))),128))]),O("div",ize,[(Te(!0),Pe(bn,null,Bn(d.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:"business-split-row"},[O("span",null,[O("i",{style:Ji({background:En(ft)})},null,4),kr(De(ke.name),1)]),O("strong",null,De(ee(ke))+De(ke.unit),1)]))),128))])],2)):(Te(),Uo(aW,{key:17,rows:o.value,compact:""},null,8,["rows"])):(Te(),Pe("div",jOe,"暂无业务统计数据"))],2)}}},sW="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAD0SURBVHgB7dEBDcAgEACxZ/5NTgkg40JaC137mgesf57wDSlCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTEHKbcBaYZyb5dAAAAAElFTkSuQmCC",rze=""+new URL("pathLine2-d4134d4b-balabala-1782919616283.png",import.meta.url).href,aze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADzSURBVHgB7dEBDcAwDMCw9vw5f4MRTTYF73/NC3bnBd+QIiRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSMwBQCIExogIrTYAAAAASUVORK5CYII=",oze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMxSURBVHgB7dZBDcJQFADBB/kCuHAgAQckHAA3Tf27aIXsjIjNXv7bfgyQdB0gSwAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgbN2erwGaHACECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCErfv7M0CTA4AwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYCw9fj+BmhyABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABB2Amb1BS2MWc5zAAAAAElFTkSuQmCC",sze=""+new URL("ocean-bg-8c848b8f-balabala-1782919616283.png",import.meta.url).href,lze=""+new URL("rotationBorder1-2ce8e0ef-balabala-1782919616283.png",import.meta.url).href,uze=""+new URL("rotationBorder2-7496b968-balabala-1782919616283.png",import.meta.url).href,cze=""+new URL("chinaBlurLine-1a2cbc0f-balabala-1782919616283.png",import.meta.url).href,dze="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==",hze="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==",fze=""+new URL("huiguang-3c5dfda5-balabala-1782919616283.png",import.meta.url).href,pze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFPSURBVHgB7ddhbcMwEAXglyEoBEPoGARCIYTBymBhMAgrhDFoIZTBIATC21lxtGhdYieOW7u6T7L6x5HvfPXJBpRSSj0jko2MGqWTJL7tQMkkgSN/tSiRBG5cNQadjB1KI0GfeOsDJXHVmFKjFBLseSaRM0rg2q3PAbn7c8Cn2Dn5HnwJ7p3hWuSI/QHvFiRi5xrkhv+3W59P5ITz7danRi4YdsCn5NGOGdZufRo8kgSwi6zGIPoe9oI4bzIM4tkkjngExh3wqaoYrBRTkRbbslW5bzuWnTswnRorVFiB/dPVII1rVVWvWGjxX4t9qzRIZy9rpD34vH2+zrnIaN03dtj3+zXw27TPYvrvUxcXsMH8ZjRu7pw0z2JOt9sh+MU7GJCUwdZG1ejcwg03LP8oqa9RItvew9i325P7Tf6yY3/1GdbcQymllFJKKaUy9gO4eI9ILG1riwAAAABJRU5ErkJggg==",vze="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",mze="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==",gze="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=",yze=""+new URL("focus_bg-b6803e2d-balabala-1782919616283.png",import.meta.url).href,_ze="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=",Sze=""+new URL("focus_move_bg-cf41417a-balabala-1782919616283.png",import.meta.url).href;class am{constructor(e={}){this.options=wt({includeChinaMap:!1},e),this.ready=null,this.init()}init(){this.instance=new Yke,this.instance.addLoader(i3,"FileLoader");let e="./",t=[{type:"Texture",name:"flyline",path:sW},{type:"Texture",name:"pathLine",path:sW},{type:"Texture",name:"pathLine2",path:aze},{type:"Texture",name:"pathLine3",path:rze},{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:fze},{type:"Texture",name:"rotationBorder1",path:lze},{type:"Texture",name:"rotationBorder2",path:uze},{type:"Texture",name:"guangquan1",path:dze},{type:"Texture",name:"guangquan2",path:hze},{type:"Texture",name:"chinaBlurLine",path:cze},{type:"Texture",name:"ocean",path:sze},{type:"Texture",name:"side",path:oze},{type:"Texture",name:"arrow",path:pze},{type:"Texture",name:"point",path:vze},{type:"Texture",name:"focusArrows",path:mze},{type:"Texture",name:"focusBar",path:gze},{type:"Texture",name:"focusBg",path:yze},{type:"Texture",name:"focusMidQuan",path:_ze},{type:"Texture",name:"focusMoveBg",path:Sze}];this.options.includeChinaMap&&t.push({type:"File",name:"chinaMap",path:e+"assets/json/中华人民共和国.json"}),this.ready=this.instance.loadAll(t)}}const bze="/jsyApi",xze=["邛溪镇","刷经寺镇","安曲镇","龙日镇","江茸乡","查尔玛乡","瓦切镇","阿木乡","麦洼乡","色地镇"];function wze(n){return/^https?:\/\//.test(n)?n:`${bze}${n.startsWith("/")?n:`/${n}`}`}function Tze(n){if((n==null?void 0:n.success)===!1||(n==null?void 0:n.code)!==void 0&&![0,200,"0","200"].includes(n.code)){const t=new Error((n==null?void 0:n.msg)||(n==null?void 0:n.message)||"视频监控接口请求失败");throw t.code=n==null?void 0:n.code,t}return ki(n)}function Ru(n,e,t=""){for(const i of e)if((n==null?void 0:n[i])!==void 0&&(n==null?void 0:n[i])!==null&&(n==null?void 0:n[i])!=="")return n[i];return t}function Aze(n=""){const e=String(n);return xze.find(i=>e.includes(i.replace(/[镇乡]$/,"")))||"红原县"}function Cze(n=""){const e=String(n);return e.includes("养殖")?"养殖基地":e.includes("饲草")?"饲草基地":e.includes("种草")||e.includes("牧草")?"牧草基地":e.includes("虫情")?"虫情监测":e.includes("机场")?"机场周边":"重点点位"}function Mze(n,e){const t=Ru(n,["hdPlayUrl","playUrl","url"]),i=String(t).match(/\/(\d+)(?:\.hd)?\.live/i);return i?i[1].padStart(2,"0"):String(e+1).padStart(2,"0")}function Eze(){return new Date().toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",hour12:!1})}function Pze(n,e,t,i){const r=Ru(n,["name","title","deviceName"],`视频监控${e+1}`),a=Ru(n,["hdPlayUrl","hd_play_url","url"]),o=Ru(n,["playUrl","play_url"],a),s=Ru(n,["token","accessToken","access_token"]),l=!!(s&&(a||o)),u=t?Math.round(i/t*100):0;return{key:Ru(n,["id","number","deviceSerial"],`${r}-${e}`),title:r,town:Aze(r),scene:Cze(r),device:Ru(n,["number","deviceSerial","serialNumber"],`CAM-${String(e+1).padStart(3,"0")}`),channel:Mze(n,e),cameraCount:t,status:l?"直播中":"离线",onlineRate:u,updateTime:Eze(),operator:l?"萤石云 · 在线预览":"监控参数待同步",progress:l?100:0,image:Ru(n,["img","image","cover","snapshot"]),playUrl:o,hdPlayUrl:a,token:s,source:n}}function Rze(){return rn(this,arguments,function*(n={}){const e=yield su(wze("/api/home/monitorings"),{params:n,timeout:18e3}).then(Tze),t=Array.isArray(e)?e:(e==null?void 0:e.rows)||(e==null?void 0:e.list)||[],i=t.filter(r=>Ru(r,["token","accessToken","access_token"])&&Ru(r,["hdPlayUrl","playUrl","url"])).length;return t.map((r,a)=>Pze(r,a,t.length,i))})}const Lze="/openApi",p7={513233100:"邛溪镇",513233101:"刷经寺镇",513233103:"安曲镇",513233105:"龙日镇",513233202:"江茸乡",513233203:"查尔玛乡",513233204:"瓦切镇",513233205:"阿木乡",513233207:"麦洼乡",513233208:"色地镇"},Ize=Object.values(p7).map(Dv);function Bee(n){return/^https?:\/\//.test(n)?n:`${Lze}${n.startsWith("/")?n:`/${n}`}`}function Yd(n,e){return su(Bee(n),{method:"POST",body:e?JSON.stringify(e):void 0,headers:{"Content-Type":"application/json"}})}function Dr(n,e){return su(Bee(n),{params:e})}function oi(n,e){for(const t of e)if((n==null?void 0:n[t])!==void 0&&(n==null?void 0:n[t])!==null&&(n==null?void 0:n[t])!=="")return n[t]}function cl(n){if(n==null||n==="")return;const e=Number(n);return Number.isNaN(e)?void 0:e}function Ri(n){const e=cl(n);if(e!==void 0)return Number.isInteger(e)?e:Number(e.toFixed(2))}function al(n,e){const t=cl(n),i=cl(e);if(!(t===void 0||i===void 0||i===0))return t/i*100}function N4(n,e,t="占比"){var r;const i=Ri((r=oi(n,["areaPercent","area_percent","percent"]))!=null?r:al(oi(n,["areaWanMu","value"]),e));return i===void 0?"":`${t} ${i}%`}function xu(n,e=""){const t=Ri(oi(n,["areaPercent","area_percent","percent"]));return t===void 0?"":`${e}${t}%`}function Dze(n,e=0){const t=oi(n,["name","title","label","zh","itemName","item_name"])||`指标${e+1}`,i=Ri(oi(n,["value","num","count","area","acreage","total"])),r=oi(n,["unit","unitName","unit_name"])||"";return{key:oi(n,["id","key","code"])||`${t}-${e}`,name:t,value:i,unit:r,source:n}}function Nze(n){return(Array.isArray(n)?n:(n==null?void 0:n.rows)||(n==null?void 0:n.list)||[]).map(Dze).filter(t=>t.name)}function kze(n){const e=(n==null?void 0:n.core)||(n==null?void 0:n.summary)||n||{},t=((n==null?void 0:n.typeDistribution)||(n==null?void 0:n.typeStats)||[])[0]||{},i=((n==null?void 0:n.ecologicalPosition)||[])[0]||{};return[{key:"woodland-area",name:"林地总面积",value:Ri(oi(e,["totalAreaWanMu","total_area_wan_mu","areaWanMu","area_wan_mu"])),unit:"万亩"},{key:"woodland-main-type-rate",name:`${oi(t,["name"])||"主导类型"}占比`,value:Ri(oi(t,["areaPercent","area_percent","percent"])),unit:"%"},{key:"woodland-ecology-area",name:"生态重点区面积",value:Ri(oi(i,["areaWanMu","value"])),unit:"万亩"}]}function Fze(n){const e=(n==null?void 0:n.overview)||(n==null?void 0:n.summary)||n||{};return[{key:"grassland-total-area",name:"草地总面积",value:Ri(oi(e,["totalAreaWanMu","total_area_wan_mu","totalArea","total_area","areaWanMu"])),unit:oi(e,["areaUnit","area_unit"])||"万亩"},{key:"basic-grassland-area",name:"基本草原",value:Ri(oi(e,["basicAreaWanMu","basic_area_wan_mu","basicArea","basic_area"])),unit:oi(e,["areaUnit","area_unit"])||"万亩"},{key:"general-grassland-area",name:"一般草原",value:Ri(oi(e,["generalAreaWanMu","general_area_wan_mu","generalArea","general_area"])),unit:oi(e,["areaUnit","area_unit"])||"万亩"}]}function hp(n,e){const r=({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 tn(wt(wt({},a),n[o]||{}),{name:((s=n[o])==null?void 0:s.name)||a.name,unit:((l=n[o])==null?void 0:l.unit)||a.unit})});return r.length?r:n}function Oze(n){return rn(this,null,function*(){let e;for(const t of n)try{return yield t()}catch(i){e=i}throw e||new Error("No request configured")})}function ra(n=[],e={}){const{nameKeys:t=["name","townName","typeName"],valueKeys:i=["areaWanMu","value","totalAreaWanMu","basicAreaWanMu"],unit:r="万亩",max:a=Number.POSITIVE_INFINITY,extra:o}=e,s=n.map((l,u)=>{const c=Ri(oi(l,i)),d={key:oi(l,["key","code","townCode"])||`${oi(l,t)||u}-${u}`,name:oi(l,t)||`第${u+1}项`,value:c,unit:r,percent:Ri(oi(l,["percent","areaPercent","basicRatio","generalRatio"])),source:l};return o?tn(wt({},d),{extra:o(l)}):d}).sort((l,u)=>(Number(u.value)||0)-(Number(l.value)||0));return Number.isFinite(a)?s.slice(0,a):s}function k4(n=[],e={}){const{nameKeys:t=["name"],valueKeys:i=["value"],unit:r,max:a=Number.POSITIVE_INFINITY,extra:o}=e;return ra(n,{nameKeys:t,valueKeys:i,unit:r,max:a,extra:o})}function Bze(n=[],e={}){const{nameKeys:t=["grassMinType","name"],valueKeys:i=["acreage"],unit:r="万亩",max:a=Number.POSITIVE_INFINITY}=e,o=n.map((s,l)=>{const u=oi(s,i),c=Ri(r==="万亩"?cl(u)/1e4:u),d=oi(s,t)||`第${l+1}项`;return{key:oi(s,["key","code"])||`${d}-${l}`,name:d,value:c,unit:r,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 rr(n,e,t,i="rank",r={}){return wt({key:n,title:e,type:i,rows:t||[]},r)}function X8(n=[],e=[],t={}){const{unit:i="万吨",max:r=Number.POSITIVE_INFINITY,showMuYieldExtra:a=!0}=t,o=new Map(e.map(s=>[s.areaName,s]));return ra(n,{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:i,max:r,extra:s=>{const l=o.get(s.areaName),u=Ri(oi(l,["yield","value"])),c=oi(l,["unit"])||"斤";return a&&u!==void 0?`亩产 ${u} ${c}`:""}})}function Dv(n){return String(n||"").replace(/\s+/g,"").trim()}function l3(n=[]){const e=new Map(Ize.map((t,i)=>[t,i]));return[...n].sort((t,i)=>{const r=e.get(Dv(t==null?void 0:t.name)),a=e.get(Dv(i==null?void 0:i.name));return r!==void 0&&a!==void 0?r-a:r!==void 0?-1:a!==void 0?1:0})}function zee(n){const e=String(n||"");return{用于畜牧业生产的人工草地:"人工草地","对调节气候、涵养水源、保持水土、防风固沙具有特殊作用的草原":"生态调节草原",国家重点保护野生动植物生存环境的草原:"野生动植物栖息草原","草原科研、教学实验基地":"科研教学草原"}[e]||e}function Y8(n){return zee(n).replace(/\s+/g,"").replace(/类$/,"")}function K8(n){const e=String(n||""),t=e.match(/level-([1-8])/);if(t)return t[1];const i=e.match(/([1-8])\s*级/);if(i)return i[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 Gee(n){return K8(n==null?void 0:n.key)||K8(n==null?void 0:n.name)}function v7(n=[],e={}){const{nameKeys:t=["name","townName","areaName"],valueKeys:i=["areaWanMu","value","totalAreaWanMu","yield"],unit:r="万亩"}=e;return n.map((a,o)=>{const s=Dv(oi(a,t)),l=Ri(oi(a,i));return!s||l===void 0?null:{key:oi(a,["key","code","townCode"])||`${s}-${o}`,name:s,value:l,unit:oi(a,["unit"])||r,source:a}}).filter(Boolean).sort((a,o)=>(Number(o.value)||0)-(Number(a.value)||0))}function lM(n=[],e={}){const{nameKeys:t=["townName","name","areaName"],valueKeys:i=["areaWanMu","value","totalAreaWanMu","yield"],unit:r="万亩"}=e,a=new Map;return n.forEach(o=>{const s=Dv(oi(o,t)),l=cl(oi(o,i));if(!s||l===void 0)return;const u=a.get(s)||{key:oi(o,["townCode","code"])||s,name:s,value:0,unit:oi(o,["unit"])||r,source:[]};u.value+=l,u.source.push(o),a.set(s,u)}),Array.from(a.values()).map(o=>tn(wt({},o),{value:Ri(o.value)})).sort((o,s)=>(Number(s.value)||0)-(Number(o.value)||0))}function $u({topicKey:n,layerKey:e,title:t,unit:i="万亩",rows:r=[],note:a="",metricLabel:o=""}){const s=r.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)=>tn(wt({},l),{unit:l.unit||i,rank:u+1}));return{status:s.length?"success":"empty",topicKey:n,layerKey:e,title:t,unit:i,metricLabel:o,note:a,rows:s}}function F4(o){return rn(this,arguments,function*({topicKey:n,layerKey:e,layerName:t,title:i,cqlFilter:r="",unit:a="万亩"}){const s=yield s3(t,{propertyName:["xiang","acreage"],cqlFilter:r,maxFeatures:2e5}),l=new Map;return((s==null?void 0:s.features)||[]).forEach(u=>{const c=u.properties||{},d=String(c.xiang||""),h=p7[d],f=cl(c.acreage);if(!h||f===void 0)return;const p=l.get(h)||{key:d,name:h,value:0,unit:a};p.value+=f/1e4,l.set(h,p)}),$u({topicKey:n,layerKey:e,title:i,unit:a,rows:Array.from(l.values()).map(u=>tn(wt({},u),{value:Ri(u.value)})),note:"按 GeoServer 图斑属性汇总到乡镇"})})}function zze(n,e,t="林地面积排行"){return rn(this,null,function*(){const i=ki(yield Yd("/woodland/distribution"));return $u({topicKey:n,layerKey:e,title:t,unit:"万亩",rows:v7((i==null?void 0:i.areaDistribution)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],unit:"万亩"})})})}function lW(n,e,t,i){return rn(this,null,function*(){const r=ki(yield Dr("/basic_grassland/overview"));return $u({topicKey:n,layerKey:e,title:i,unit:"万亩",rows:v7((r==null?void 0:r.townStats)||[],{nameKeys:["name"],valueKeys:[t],unit:"万亩"})})})}function Gze(n={},e=[],t=[]){const i=oi(n,t);if(i)return Dv(i);const r=e.map(o=>oi(n,[o])).find(o=>o!==void 0),a=String(r||"").slice(0,9);return p7[a]||""}function Uze(n,e,t,i){return rn(this,null,function*(){const r=(i==null?void 0:i.rankingTownCodeKeys)||(t==null?void 0:t.rankingTownCodeKeys)||["area_code","xiang","town_code"],a=(i==null?void 0:i.rankingTownNameKeys)||(t==null?void 0:t.rankingTownNameKeys)||["town_name","area_name","xiang_name"],o=(i==null?void 0:i.rankingAreaKeys)||(t==null?void 0:t.rankingAreaKeys)||["acreage","area_mu","area"],s=(i==null?void 0:i.rankingPropertyName)||[...r,...a,...o],l=yield s3(t.layerName,{propertyName:s,cqlFilter:i.cqlFilter,maxFeatures:2e5,timeout:25e3}),u=new Map;return((l==null?void 0:l.features)||[]).forEach(c=>{const d=c.properties||{},h=Gze(d,r,a),f=cl(oi(d,o));if(!h||f===void 0)return;const p=u.get(h)||{key:h,name:h,value:0,unit:"万亩"};p.value+=f/1e4,u.set(h,p)}),$u({topicKey:n,layerKey:e,title:`${i.name}面积排行`,unit:"万亩",metricLabel:i.name,rows:Array.from(u.values()).map(c=>tn(wt({},c),{value:Ri(c.value),metricLabel:i.name})),note:"按选中图例过滤 GeoServer 图斑并汇总到乡镇"})})}function Vze(n,e,t){return rn(this,null,function*(){const i=ki(yield Dr("/basic_grassland/overview"));return $u({topicKey:n,layerKey:e,title:`${t.name}面积排行`,unit:"万亩",metricLabel:t.name,rows:v7((i==null?void 0:i.townStats)||[],{nameKeys:["name"],valueKeys:[t.rankingValueKey],unit:"万亩"}).map(r=>tn(wt({},r),{metricLabel:t.name}))})})}function m7(n,e,t,i,r={}){const a=A2(i||[],r).map(o=>tn(wt({},o),{metricLabel:t.name}));return $u({topicKey:n,layerKey:e,title:`${t.name}面积排行`,unit:"万亩",metricLabel:t.name,rows:a})}function Hze(n,e,t){return rn(this,null,function*(){const i=Gee(t);if(!i)return null;const r=ki(yield Dr("/grassland_grassland_level/distribution"));return m7(n,e,t,r,{nameKeys:["areaName","area_name","name"],valueKeys:["acreage","areaWanMu","value"],filter:a=>K8(oi(a,["level","name"]))===i})})}function Wze(n,e,t){return rn(this,null,function*(){const i=Y8(t.name);if(!i)return null;const[r,a]=yield Promise.all([na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_grass_type/distribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_grass_type/minTypeAreaDistribution"))}))]);return m7(n,e,t,[...r||[],...a||[]],{nameKeys:["areaName","area_name","name"],valueKeys:["acreage","areaWanMu","value"],filter:o=>{const s=oi(o,["grassMinType","grass_min_type","grassType","grass_type","name"]);return Y8(s)===i}})})}function jze(n,e,t){return rn(this,null,function*(){const i=Gee(t);if(!i)return null;const r=ki(yield Dr("/wetland_grassland_level/distribution"));return m7(n,e,t,r,{nameKeys:["areaName","area_name","name"],valueKeys:["acreage","areaWanMu","value"],filter:a=>K8(oi(a,["level","name"]))===i})})}function $ze(n,e,t){return rn(this,null,function*(){const i=Y8(t.name);if(!i)return null;const[r,a]=yield Promise.all([na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grass_type_copy/distribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grass_type_copy/minTypeAreaDistribution"))}))]);return m7(n,e,t,[...r||[],...a||[]],{nameKeys:["areaName","area_name","name"],valueKeys:["acreage","areaWanMu","value"],filter:o=>{const s=oi(o,["grassMinType","grass_min_type","grassType","grass_type","name"]);return Y8(s)===i}})})}function qze(n,e,t){return rn(this,null,function*(){if(!(t!=null&&t.key))return null;const i=B3(n,e);return i?n==="grassland"&&e==="basic-grassland"&&t.rankingValueKey?Vze(n,e,t):n==="grassland"&&e==="grassland-level"?Hze(n,e,t):n==="grassland"&&e==="grassland-type"?Wze(n,e,t):n==="wetland"&&e==="wetland-level"?jze(n,e,t):n==="wetland"&&e==="wetland-type"?$ze(n,e,t):t.cqlFilter&&i.layerName?Uze(n,e,i,t):null:null})}function O4(n,e,t,i,r="万吨"){return rn(this,null,function*(){const a=ki(yield Dr(t)),o=oi(a==null?void 0:a[0],["unit"])||r;return $u({topicKey:n,layerKey:e,title:i,unit:o,rows:v7(a||[],{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:o})})})}function rs(n=[],e=5){return n.slice(0,e)}function s9(n=[],e={}){var c,d;const{limit:t=5,minPercent:i=1,otherName:r="其他类型"}=e,a=n.filter(h=>(h==null?void 0:h.name)&&Number(h.value)>0).sort((h,f)=>(Number(f.value)||0)-(Number(h.value)||0)),o=a.reduce((h,f)=>h+(Number(f.value)||0),0);if(!o||a.length<=t)return a;const s=[],l=[];if(a.forEach((h,f)=>{const p=al(h.value,o);f<t-1&&(p===void 0||p>=i)?s.push(h):l.push(h)}),!l.length)return s;const u=l.reduce((h,f)=>h+(Number(f.value)||0),0);return[...s,{key:`${r}-${l.length}`,name:r,value:Ri(u),unit:((c=l[0])==null?void 0:c.unit)||((d=a[0])==null?void 0:d.unit)||"万亩",extra:`${Ri(al(u,o))}%`}]}function $p(n=[]){return n.reduce((e,t)=>e+(Number(t.value)||0),0)}function p0(n=[],e=$p(n),t=""){return n.map(i=>{const r=Ri(al(i.value,e));return tn(wt({},i),{extra:r===void 0?i.extra:`${t}${r}%`})})}function uW(n){return Array.isArray(n==null?void 0:n.rows)&&n.rows.length>0}function n0(n=[],e=[],t=4){const i=[],r=new Set,a=s=>{!s||r.has(s.key)||(r.add(s.key),i.push(s))},o=[...n,...e];return o.filter(uW).forEach(a),o.filter(s=>s&&!uW(s)).forEach(a),i.slice(0,t)}function Xze(n,e,t={}){return n&&wt(tn(wt({},n),{type:e}),t)}function ha(n=[]){const e=["bar","line","donut","column","structure","heat","peak","split"],t={bar:["heat","peak","column","structure"],line:["bar","column","heat"],donut:["structure","split","bar"],column:["peak","heat","bar","line"],structure:["split","donut","bar"],heat:["bar","column","structure"],peak:["column","bar","line"],split:["structure","donut","bar"]},i=new Set;return n.map(r=>{if(!(r!=null&&r.type)||["projectTable","iconMetric","metric","spotlight","rank","table","stackColumn"].includes(r.type))return r;if(!i.has(r.type))return i.add(r.type),r;const a=(t[r.type]||e).find(o=>!i.has(o))||r.type;return i.add(a),Xze(r,a,{variant:a===r.type?r.variant:void 0})})}function cW(n=[],e={}){const{headCount:t=4,headName:i="重点区域",tailName:r="其他区域"}=e,a=n.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 d,h;return{key:u,name:u,value:Ri(c.reduce((f,p)=>f+(Number(p.value)||0),0)),unit:((d=c[0])==null?void 0:d.unit)||((h=a[0])==null?void 0:h.unit)||"万亩",extra:`${c.length}项`}};return[l(i,o),s.length?l(r,s):null].filter(u=>u&&Number(u.value)>0)}function tv(n,e,t){var s,l,u,c;if(!t)return n;const i={grassland:"grassland-distribution",wetland:"wetland-distribution",woodland:"woodland-distribution"}[e],r=((s=n==null?void 0:n.layerPanels)==null?void 0:s[t])||((l=n==null?void 0:n.layerPanels)==null?void 0:l[i]);if(!r)return n;const a=(u=r.leftPanels)!=null&&u.length?r.leftPanels:n.leftPanels,o=(c=r.rightPanels)!=null&&c.length?r.rightPanels:n.rightPanels;return tn(wt({},n),{activeLayerKey:t||i,leftPanels:a,rightPanels:o,left:(a==null?void 0:a[0])||n.left,right:(o==null?void 0:o[0])||n.right})}function Uee(n,e=["areaWanMu","value","acreage","areaMu"]){for(const t of e){const i=oi(n,[t]),r=cl(i);if(r===void 0)continue;const a=String(t).toLowerCase(),o=String(oi(n,["unit","areaUnit","area_unit"])||"");return a.includes("wanmu")||o==="万亩"?r:a.includes("mu")||o==="亩"?r/1e4:r}}function A2(n=[],e={}){const{nameKeys:t=["name","areaName","townName"],valueKeys:i=["areaWanMu","value","acreage","areaMu"],nameTransform:r=l=>l,filter:a,extra:o}=e,s=new Map;return n.forEach(l=>{if(a&&!a(l))return;const u=oi(l,t),c=r(u,l),d=Uee(l,i);if(!c||d===void 0)return;const h=s.get(c)||{key:oi(l,["key","code","townCode"])||c,name:c,value:0,unit:"万亩",source:[]};h.value+=d,h.source.push(l),s.set(c,h)}),Array.from(s.values()).map(l=>{const u=tn(wt({},l),{value:Ri(l.value)});return o?tn(wt({},u),{extra:o(u)}):u}).filter(l=>Number(l.value)>0).sort((l,u)=>(Number(u.value)||0)-(Number(l.value)||0))}function dW(n){return String(n||"").replace(/草原/g,"湿地")}function Yze(n={},e=[]){var s;const t=(n==null?void 0:n.unit)||oi(e==null?void 0:e[0],["unit"])||"万吨",i=(s=cl(n==null?void 0:n.xc))!=null?s:$p(e),r=cl(n==null?void 0:n.edibleXc),a=i!==void 0&&r!==void 0?Math.max(i-r,0):void 0,o=e[0];return[{key:"wetland-yield-total",name:"鲜草总产",value:Ri(i),unit:t,scaleValue:100},{key:"wetland-yield-edible",name:"可食鲜草",value:Ri(r),unit:t,scaleValue:Ri(al(r,i))},{key:"wetland-yield-unavailable",name:"不可食鲜草",value:Ri(a),unit:t,scaleValue:Ri(al(a,i))},{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:Ri(al(o==null?void 0:o.value,i))}].filter(l=>l.value!==void 0)}function Vee({yieldSummary:n,townAreaRows:e,typeRows:t,levelRows:i,yieldRows:r,minTypeRows:a,muYieldRows:o,edibleYieldRows:s,edibleMuRows:l,typeTownRows:u,levelTownRows:c,minTownRows:d}){const h=rr("wetland-town-area","湿地面积分布",l3(e),"line",{span:1,variant:"distribution"}),f=rr("wetland-type","湿地类型结构",t,"donut",{span:1}),p=rr("wetland-level-proportion","湿地级占比",p0(i),"donut",{span:1}),m=rr("wetland-min-type","湿地优势小类",rs(a,6),"bar",{span:1}),v=rr("wetland-yield-capacity","湿地产能结构",Yze(n,r),"bar",{span:1,variant:"capacity"}),g=rr("wetland-yield","湿地生产力分布",l3(r),"line",{span:1}),_=rr("wetland-edible-yield","可食鲜草产量",rs(s,6),"column",{span:1,variant:"slim"}),S=rr("wetland-mu-yield","湿地亩产效率",rs(o,6),"bar",{span:1}),x=rr("wetland-level","湿地级别面积",i,"column",{span:1}),A=rr("wetland-level-town","1级湿地分布",rs(c,6),"bar",{span:1,variant:"distribution"}),C=rr("wetland-type-town","湿地类型乡镇分布",rs(u,6),"bar",{span:1,variant:"distribution"}),M=rr("wetland-edible-mu","可食鲜草亩产",rs(l,6),"bar",{span:1}),I=rr("wetland-min-town","优势小类乡镇分布",rs(d,6),"bar",{span:1,variant:"distribution"}),D=ha([h,f,p,m]),E=ha([_,g,S,v]);return{leftPanels:D,rightPanels:E,left:D[0],right:E[0],layerPanels:Kze({townAreaPanel:h,typePanel:f,yieldCapacityPanel:v,yieldPanel:g,levelPanel:x,levelTownPanel:A,muYieldPanel:S,levelStructurePanel:p,typeTownPanel:C,minTypePanel:m,edibleYieldPanel:_,edibleMuPanel:M,minTownPanel:I})}}function Kze(n={}){const{townAreaPanel:e,typePanel:t,yieldCapacityPanel:i,yieldPanel:r,levelPanel:a,levelTownPanel:o,muYieldPanel:s,levelStructurePanel:l,typeTownPanel:u,minTypePanel:c,edibleYieldPanel:d,edibleMuPanel:h,minTownPanel:f}=n;return{"wetland-distribution":{leftPanels:ha([e,t,l,c].filter(Boolean)),rightPanels:ha([d,r,s,i].filter(Boolean))},"wetland-level":{leftPanels:ha([l,a,o,t].filter(Boolean)),rightPanels:ha([d,r,s,i].filter(Boolean))},"wetland-type":{leftPanels:ha([t,u,c,f].filter(Boolean)),rightPanels:ha([d,r,h,i].filter(Boolean))},"wetland-yield":{leftPanels:ha([e,t,l,c].filter(Boolean)),rightPanels:ha([d,r,s,i].filter(Boolean))}}}function Zze(n={}){const{leftPanels:e=[],rightPanels:t=[]}=n,i={leftPanels:ha(e.filter(Boolean)),rightPanels:ha(t.filter(Boolean))};return{"grassland-distribution":i,"basic-grassland":i,"grassland-level":i,"grassland-type":i,"grassland-yield":i,"grassland-health":i}}function Hee({townRows:n=[],typeRows:e=[],scaleRows:t=[],protectionRows:i=[],ownershipRows:r=[],qualityRows:a=[],originRows:o=[],ageRows:s=[],canopyRows:l=[],forestTypeRows:u=[],manageLevelRows:c=[],regionRows:d=[],ownerRows:h=[],typeTownRows:f=[],qualityLevelRows:p=[],townConcentrationRows:m=cW(n,{headCount:4,headName:"前四乡镇",tailName:"其他乡镇"}),typeConcentrationRows:v=cW(e,{headCount:2,headName:"主要类型",tailName:"其他类型"})}){const g=rr("woodland-town","林地面积分布",l3(n),"line",{span:1,variant:"distribution"}),_=rr("woodland-type","林地类型结构",e,"donut",{span:1}),S=rr("woodland-protection","公益林保护等级",p0(i),"structure",{span:1}),x=rr("woodland-ownership","林地权属结构",p0(r),"structure",{span:1}),A=rr("woodland-quality","优势树种面积",rs(a,6),"bar",{span:1}),C=rr("woodland-origin","林地起源结构",p0(o),"structure",{span:1}),M=rr("woodland-age","林龄组结构",rs(s,6),"column",{span:1}),I=rr("woodland-canopy","郁闭度结构",rs(l,6),"column",{span:1}),D=rr("woodland-area-scale","林地图斑规模",t,"column",{span:1}),E=rr("woodland-forest-type","森林类别结构",rs(u,6),"bar",{span:1}),P=rr("woodland-manage-level","管护等级分布",rs(c,6),"bar",{span:1}),F=rr("woodland-public-rank","公益林面积排行",rs(d,6),"bar",{span:1,variant:"distribution"}),V=rr("woodland-owner-rank","权属单位排行",rs(h,6),"bar",{span:1}),G=rr("woodland-type-town","乡镇类型构成",rs(f,6),"bar",{span:1,variant:"distribution"}),W=rr("woodland-quality-level","林地质量等级",p0(p),"donut",{span:1}),Y=rr("woodland-town-concentration","林地集中度",p0(m),"structure",{span:1}),Q=rr("woodland-type-concentration","类型集中度",p0(v),"structure",{span:1}),K=ha(n0([g,_,S,x],[D,V,E,A])),ae=ha(n0([A,C,M,I],[D,V,E,F,Y,Q]));return{leftPanels:K,rightPanels:ae,left:K[0],right:ae[0],layerPanels:Jze({townPanel:g,typePanel:_,scalePanel:D,protectionPanel:S,ownershipPanel:x,qualityPanel:A,originPanel:C,agePanel:M,canopyPanel:I,forestTypePanel:E,manageLevelPanel:P,regionPanel:F,ownerPanel:V,typeTownPanel:G,qualityLevelPanel:W,townConcentrationPanel:Y,typeConcentrationPanel:Q})}}function Jze(n={}){const{townPanel:e,typePanel:t,scalePanel:i,protectionPanel:r,ownershipPanel:a,qualityPanel:o,originPanel:s,agePanel:l,canopyPanel:u,forestTypePanel:c,manageLevelPanel:d,regionPanel:h,ownerPanel:f,typeTownPanel:p,qualityLevelPanel:m,townConcentrationPanel:v,typeConcentrationPanel:g}=n;return{"woodland-distribution":{leftPanels:ha(n0([e,t,r,a],[i,c,f])),rightPanels:ha(n0([o,s,l,u],[i,f,h,v,g,m]))},"woodland-protection":{leftPanels:ha(n0([r,c,d,e],[t,a,i])),rightPanels:ha(n0([h,o,s,a],[f,t,i]))},"woodland-type":{leftPanels:ha(n0([t,e,p,i],[r,a,c])),rightPanels:ha(n0([o,s,r,a],[l,u,f,g]))},"woodland-quality":{leftPanels:ha(n0([o,s,l,u],[m,i,t])),rightPanels:ha(n0([e,t,r,a],[c,f,i]))},"woodland-ownership":{leftPanels:ha(n0([a,f,e,t],[i,r,o])),rightPanels:ha(n0([r,o,s,i],[c,l,u]))}}}function Qze(n){const e=String(n||"").trim();return e.includes("未")&&e.includes("退")?"未退化":e.includes("轻")?"轻度退化":e.includes("中")?"中度退化":e.includes("重")?"重度退化":e||"未分级"}function eGe(){return rn(this,null,function*(){const n=yield s3("ne:t_grassland_result_caodi",{propertyName:["area_code","degradation_level","acreage"],maxFeatures:2e5,timeout:25e3}),e=new Map,t=new Map;((n==null?void 0:n.features)||[]).forEach(o=>{const s=o.properties||{},l=Qze(s.degradation_level),u=cl(s.acreage);if(!l||u===void 0)return;const c=u/1e4;if(e.set(l,(e.get(l)||0)+c),l==="未退化")return;const d=String(s.area_code||"").slice(0,9),h=p7[d];h&&t.set(h,(t.get(h)||0)+c)});const i=["未退化","轻度退化","中度退化","重度退化","未分级"],r=Array.from(e.entries()).map(([o,s])=>({key:o,name:o,value:Ri(s),unit:"万亩"})).filter(o=>Number(o.value)>0).sort((o,s)=>{const l=i.indexOf(o.name),u=i.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:Ri(s),unit:"万亩"})).filter(o=>Number(o.value)>0).sort((o,s)=>(Number(s.value)||0)-(Number(o.value)||0));return{levelRows:p0(r),townRows:a}})}function Wee(n=[],e={},t=[],i=[]){var o;const r=nGe(t).find(s=>s.key==="degraded-rate"),a=(o=cl(e==null?void 0:e.xc))!=null?o:$p(i);return[n[0],n[1],{key:"grassland-yield-total",name:"鲜草产量",value:Ri(a),unit:(e==null?void 0:e.unit)||"万吨"},r].filter(s=>(s==null?void 0:s.value)!==void 0)}function tGe(n=[]){const e=$p(n);return n.filter(t=>t.name&&t.name!=="未退化"&&Number(t.value)>0).map(t=>tn(wt({},t),{extra:Ri(al(t.value,e))?`${Ri(al(t.value,e))}%`:""}))}function jee(n={},e=[]){var s;const t=(n==null?void 0:n.unit)||oi(e==null?void 0:e[0],["unit"])||"万吨",i=(s=cl(n==null?void 0:n.xc))!=null?s:$p(e),r=cl(n==null?void 0:n.edibleXc),a=i!==void 0&&r!==void 0?Math.max(i-r,0):void 0,o=e.find(l=>Number(l.value)>0);return[{key:"forage-total",name:"鲜草总产",value:Ri(i),unit:t,scaleValue:100},{key:"forage-edible",name:"可食鲜草",value:Ri(r),unit:t,scaleValue:Ri(al(r,i))},{key:"forage-unavailable",name:"不可食鲜草",value:Ri(a),unit:t,scaleValue:Ri(al(a,i))},{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:Ri(al(o==null?void 0:o.value,i))}].filter(l=>l.value!==void 0)}function $ee(){return{levelRows:p0([{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 nGe(n=[]){const e=$p(n),t=n.filter(o=>o.name&&o.name!=="未退化"),i=$p(t),r=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:Ri(i),unit:"万亩",icon:"area"},{key:"degraded-rate",name:"退化率",value:Ri(al(i,e)),unit:"%",icon:"rate"},{key:"medium-heavy-area",name:"中重度",value:Ri(r),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 hW(n,e){if(n==="grassland"){const t=hp([{key:"grassland-area",name:"草地总面积",value:756.43,unit:"万亩"},{key:"basic-grassland",name:"基本草原",value:637.13,unit:"万亩"},{key:"general-grassland",name:"一般草原",value:119.31,unit:"万亩"}],n),i=ra([{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"]}),r=ra([{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=s9([{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=ra([{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=$ee().levelRows,u=p0([{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=p0([{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:"万亩"}]),d=jee({xc:297.29,edibleXc:192.26,unit:"万吨"},r),h=ra([{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:"万吨"}),f=Xee({core:t,townRows:i,grassTypeRows:a,grassLevelRows:u,healthRows:c,productivityRows:o,edibleYieldRows:h,forageRows:d,degradationRows:l}),p=tn(wt({status:"fallback"},f),{top:Wee(t,{xc:297.29,unit:"万吨"},l,r)});return tv(p,n,e)}if(n==="wetland"){const t=hp([{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:"万亩"}],n),i=s9([{name:"高寒草甸类",value:190.32,unit:"万亩"},{name:"山地草甸类",value:49.48,unit:"万亩"},{name:"低地草甸类",value:3.21,unit:"万亩"}],{limit:4,minPercent:1,otherName:"其他湿地类型"}),r=[{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=ra([{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((f,p)=>p.value-f.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=ra([{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=ra([{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:"斤"}),d=Vee({core:t,yieldSummary:{xc:108.84,edibleXc:1.65,unit:"万吨"},townAreaRows:s,typeRows:i,levelRows:r,yieldRows:a,minTypeRows:l,muYieldRows:o,edibleYieldRows:u,edibleMuRows:c,typeTownRows:s,levelTownRows:s,minTownRows:s}),h=wt({status:"fallback",core:t,top:[t[0],t[1],t[2]]},d);return tv(h,n,e)}if(n==="woodland"){const t=hp([{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:"%"}],n),i=ra([{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:d=>`占比 ${Ri(d.percent)}%`}),r=s9([{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=Hee({townRows:i,typeRows:r,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=wt({status:"fallback",core:t,top:[t[0],t[1],t[2]]},u);return tv(c,n,e)}return{status:"empty",core:hp([],n),leftPanels:[],rightPanels:[],left:{title:"业务统计",rows:[]},right:{title:"业务统计",rows:[]}}}function qee(n=[],e=["name"]){const t=new Map;return n.forEach(i=>{const r=oi(i,e);!r||t.has(r)||t.set(r,i)}),Array.from(t.values())}function na(n,e=[]){return n().catch(()=>e)}function gT(n=[],e={}){const{nameKeys:t=["name","health","level"],valueKeys:i=["value","acreage","areaWanMu"],unit:r="万亩",nameTransform:a=l=>l,max:o=Number.POSITIVE_INFINITY}=e,s=ra(n||[],{nameKeys:t,valueKeys:i,unit:r}).map(l=>tn(wt({},l),{name:a(l.name)}));return p0(s).filter(l=>Number(l.value)>0).slice(0,o)}function iGe(n){const e=String(n||"");return/^\d+$/.test(e)?`${e}级草原`:e.includes("级")?e.replace(/草地/g,"草原"):e}function rGe(n){const e=String(n||"");return{healthy:"健康",subhealthy:"亚健康",unhealthy:"不健康"}[e]||e}function Xee({core:n,townRows:e,grassTypeRows:t,grassLevelRows:i,healthRows:r,productivityRows:a,edibleYieldRows:o,forageRows:s,degradationRows:l}){const u=rr("grassland-town","草地面积分布",l3(e),"line",{span:1}),c=rr("grassland-productivity-town","草地生产力分布",l3(a),"line",{span:1}),d=rr("grassland-type-proportion","草原类占比",t,"donut",{span:1}),h=rr("grassland-edible-yield","可食鲜草产量分布",rs(o,10),"column",{span:1,variant:"slim"}),f=rr("grassland-degradation","草地退化统计",tGe(l),"structure",{span:1}),p=rr("grassland-health-proportion","草地健康占比",r,"donut",{span:1}),m=rr("grassland-level-proportion","草原级占比",i,"donut",{span:1}),v=rr("grassland-forage-capacity","饲草供给",s,"bar",{span:1,variant:"capacity"}),g=ha([u,d,f,m]),_=ha([h,c,p,v]);return{core:n,leftPanels:g,rightPanels:_,left:g[0],right:_[0],layerPanels:Zze({leftPanels:g,rightPanels:_})}}function aGe(n,e={}){const t=Nze(n),i=qee(e.typeRows||[],["name"]),r=e.yieldRows||[],a=e.levelRows||[],o=e.minTypeRows||[],s=e.edibleRows||[],l=e.edibleMuRows||[],u=e.typeDistributionRows||[],c=e.levelDistributionRows||[],d=e.minTypeDistributionRows||[],h=e.yieldSummary||{},f=s9(k4(i,{nameKeys:["name"],valueKeys:["value"],unit:"万亩"}),{limit:4,minPercent:1,otherName:"其他湿地类型"}),p=X8(r,e.muYieldRows||[],{showMuYieldExtra:!1}),m=k4(e.muYieldRows||[],{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:"斤",max:5}),v=k4(a,{nameKeys:["name"],valueKeys:["value"],unit:"万亩"}).map(F=>tn(wt({},F),{name:dW(F.name)})),g=Bze(o),_=X8(s,l,{showMuYieldExtra:!1}),S=k4(l,{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:oi(l==null?void 0:l[0],["unit"])||"斤",max:5}),x=A2(u,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"]}),A=A2(u,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"],extra:F=>{var V;return`${((V=F.source)==null?void 0:V.length)||0}类`}}),C=A2(c,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"]}),M=A2(c,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"],filter:F=>dW(oi(F,["level","name"])).startsWith("1级")}),I=A2(d,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"],extra:F=>{var V;return`${((V=F.source)==null?void 0:V.filter(G=>Uee(G,["acreage","areaWanMu","value"])>0).length)||0}型`}}),D=hp(t,"wetland"),E=v.find(F=>/^1级/.test(F.name))||v[0],P=Vee({yieldSummary:h,townAreaRows:x,typeRows:f,levelRows:v,yieldRows:p,minTypeRows:g,muYieldRows:m,edibleYieldRows:_,edibleMuRows:S,typeTownRows:A,levelTownRows:M.length?M:C,minTownRows:I});return wt({core:D,top:[D[0],D[1],{key:"wetland-level-1-area",name:"1级湿地面积",value:E==null?void 0:E.value,unit:(E==null?void 0:E.unit)||"万亩"}].filter(Boolean)},P)}function S5(n,e){return rn(this,null,function*(){var t;try{if(n==="woodland"){const[i,r,a,o,s]=yield Promise.all([Yd("/woodland/distribution").then(ki),na(()=>rn(this,null,function*(){return ki(yield Yd("/woodland/types"))}),{}),na(()=>rn(this,null,function*(){return ki(yield Yd("/woodland/protection"))}),{}),na(()=>rn(this,null,function*(){return ki(yield Yd("/woodland/quality"))}),{}),na(()=>rn(this,null,function*(){return ki(yield Yd("/woodland/ownership"))}),{})]),l=hp(kze(i),n),u=oi((i==null?void 0:i.core)||(i==null?void 0:i.summary)||{},["totalAreaWanMu","total_area_wan_mu","areaWanMu","area_wan_mu"]),c=oi((a==null?void 0:a.summary)||{},["publicAreaWanMu","public_area_wan_mu"]),d=[l[0],{key:"woodland-public-area",name:"公益林面积",value:Ri(c),unit:"万亩"},{key:"woodland-public-rate",name:"公益林占比",value:Ri((t=oi((a==null?void 0:a.summary)||{},["publicAreaPercent","public_area_percent"]))!=null?t:al(c,u)),unit:"%"}].filter(Boolean),h=ra((i==null?void 0:i.areaDistribution)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:V=>N4(V,u)}),f=s9(ra((r==null?void 0:r.typeStats)||(i==null?void 0:i.typeDistribution)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:xu}),{limit:4,minPercent:1,otherName:"其他林地"}),p=ra((i==null?void 0:i.patchScale)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:V=>N4(V,u)}),m=ra((a==null?void 0:a.protectionLevels)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:xu}),v=ra((o==null?void 0:o.speciesRanks)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],max:6,extra:xu}),g=ra((s==null?void 0:s.ownerRanks)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],max:6,extra:V=>N4(V,u)}),_=ra((s==null?void 0:s.landOwnerships)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:xu}),S=ra((a==null?void 0:a.forestTypes)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],max:6,extra:xu}),x=ra((a==null?void 0:a.manageLevels)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],max:6,extra:xu}),A=ra((a==null?void 0:a.regionRanks)||[],{nameKeys:["regionName","name","townName"],valueKeys:["areaWanMu","value"],max:6,extra:V=>N4(V,c)}),C=ra((o==null?void 0:o.origins)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:xu}),M=ra((o==null?void 0:o.ageGroups)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:xu}),I=ra((o==null?void 0:o.canopyLevels)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:V=>{const G=Ri(oi(V,["avgCanopy","avg_canopy"]));return G!==void 0?`均值 ${G}`:xu(V)}}),D=ra((o==null?void 0:o.qualityLevels)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:xu}),E=lM((r==null?void 0:r.townComposition)||[],{nameKeys:["townName","name"],valueKeys:["areaWanMu","value"]}).slice(0,6),P=Hee({townRows:h,typeRows:f,scaleRows:p,protectionRows:m,ownershipRows:_,qualityRows:v,originRows:C,ageRows:M,canopyRows:I,forestTypeRows:S,manageLevelRows:x,regionRows:A,ownerRows:g,typeTownRows:E,qualityLevelRows:D}),F=wt({status:"success",core:l,top:d},P);return tv(F,n,e)}if(n==="grassland"){const[i,r,a,o,s,l,u,c,d]=yield Promise.all([Dr("/basic_grassland/overview").then(ki),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_yield/yieldProportion"))}),{}),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_yield/distribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_yield/muYieldDistribution"))})),na(()=>rn(this,null,function*(){return eGe()}),$ee()),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_grass_type/areaProportion"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_grassland_level/areaProportion"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_health/proportion"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_yield/edibleXcDistribution"))}))]),h=s.levelRows||[],f=hp(Fze(i),n),p=X8(a||[],o||[],{showMuYieldExtra:!1}),m=ra(o||[],{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:oi(o==null?void 0:o[0],["unit"])||"斤"}),v=ra((i==null?void 0:i.townStats)||[],{nameKeys:["name"],valueKeys:["totalAreaWanMu"]}),g=gT(qee(l||[],["name"]),{nameKeys:["name"],valueKeys:["value","areaWanMu","acreage"],unit:"万亩",nameTransform:zee}),_=gT(u||[],{nameKeys:["name","level"],valueKeys:["value","areaWanMu","acreage"],unit:"万亩",nameTransform:iGe}),S=gT(c||[],{nameKeys:["health","name"],valueKeys:["acreage","value","areaWanMu"],unit:"万亩",nameTransform:rGe}),x=X8(d||[],[],{showMuYieldExtra:!1}),A=Xee({core:f,townRows:v,grassTypeRows:g,grassLevelRows:_,healthRows:S,productivityRows:m,edibleYieldRows:x,forageRows:jee(r,p),degradationRows:h}),C=tn(wt({status:"success"},A),{top:Wee(f,r,h,p)});return tv(C,n,e)}if(n==="wetland"){const[i,r,a,o,s,l,u,c,d,h,f,p]=yield Promise.all([Oze([()=>rn(this,null,function*(){return ki(yield Dr("/index/dataItem",{group:"wetland"}))}),()=>rn(this,null,function*(){return ki(yield Dr("/index/dataItem",{group:"wetland_grassland_level"}))})]),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grass_type_copy/areaProportion"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_yield/distribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_yield/muYieldDistribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grassland_level/areaProportion"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grass_type_copy/minTypeAreaProportion"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_yield/edibleXcDistribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_yield/edibleXcMuDistribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grass_type_copy/distribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grassland_level/distribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grass_type_copy/minTypeAreaDistribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_yield/yieldProportion"))}),{})]),m=aGe(i,{typeRows:r,yieldRows:a,muYieldRows:o,levelRows:s,minTypeRows:l,edibleRows:u,edibleMuRows:c,typeDistributionRows:d,levelDistributionRows:h,minTypeDistributionRows:f,yieldSummary:p}),v=tn(wt({status:"success"},m),{left:m.leftPanels[0],right:m.rightPanels[0]});return tv(v,n,e)}return hW(n,e)}catch(i){return tn(wt({},hW(n,e)),{status:"error",error:i})}})}function oGe(n,e,t=null){return rn(this,null,function*(){try{const i=yield qze(n,e,t);return i||(n==="woodland"?e==="woodland-protection"?yield F4({topicKey:n,layerKey:e,layerName:"ne:t_woodland_2023",title:"公益林面积排行",cqlFilter:"gjgyl_bhdj IN ('1','2')"}).catch(()=>rn(this,null,function*(){const r=ki(yield Yd("/woodland/protection")),a=lM((r==null?void 0:r.regionRanks)||[],{nameKeys:["townName"],valueKeys:["areaWanMu"],unit:"万亩"});return $u({topicKey:n,layerKey:e,title:"公益林面积排行",unit:"万亩",rows:a,note:"按公益林村级榜单汇总到乡镇"})})):e==="woodland-type"?yield F4({topicKey:n,layerKey:e,layerName:"ne:t_woodland_2023",title:"林地类型面积排行"}).catch(()=>rn(this,null,function*(){const r=ki(yield Yd("/woodland/types")),a=lM((r==null?void 0:r.townComposition)||[],{nameKeys:["townName"],valueKeys:["areaWanMu"],unit:"万亩"});return $u({topicKey:n,layerKey:e,title:"林地类型面积排行",unit:"万亩",rows:a,note:"按林地类型组成汇总到乡镇"})})):e==="woodland-quality"?yield F4({topicKey:n,layerKey:e,layerName:"ne:t_woodland_2023",title:"林地质量面积排行",cqlFilter:"zl_dj IS NOT NULL"}):e==="woodland-ownership"?yield F4({topicKey:n,layerKey:e,layerName:"ne:t_woodland_2023",title:"林地权属面积排行",cqlFilter:"ld_qs IS NOT NULL"}):yield zze(n,e,"林地面积排行"):n==="grassland"?e==="basic-grassland"?yield lW(n,e,"basicAreaWanMu","基本草原面积排行"):e==="grassland-level"?yield O4(n,e,"/grassland_yield/muYieldDistribution","草地亩产排行","斤"):yield lW(n,e,"totalAreaWanMu","草地面积排行"):n==="wetland"?e==="wetland-level"?yield O4(n,e,"/wetland_yield/muYieldDistribution","湿地亩产排行","斤"):e==="wetland-type"?yield O4(n,e,"/wetland_yield/edibleXcDistribution","可食鲜草产量排行","万吨"):yield O4(n,e,"/wetland_yield/distribution","湿地生产力排行","万吨"):$u({topicKey:n,layerKey:e,title:"乡镇统计排行",rows:[]}))}catch(i){return{status:"error",topicKey:n,layerKey:e,title:"乡镇统计排行",unit:"",rows:[],error:i}}})}const FR="AlibabaPuHuiTi, Microsoft YaHei, Arial, sans-serif";function yT(n,e={}){return wt({trigger:"item",backgroundColor:"rgba(5, 31, 51, 0.96)",borderColor:"rgba(0, 210, 255, 0.54)",borderWidth:1,padding:[7,10],textStyle:{color:"#e7fbff",fontFamily:FR,fontSize:12,lineHeight:18},extraCssText:"box-shadow:0 0 18px rgba(0,210,255,.2);",formatter:n},e)}function _T(n={}){var t,i,r;const e=wt({textStyle:wt({fontFamily:FR,color:"rgba(225, 249, 255, 0.78)"},n.textStyle||{}),animation:(t=n.animation)!=null?t:!0,animationDuration:(i=n.animationDuration)!=null?i:900,animationDurationUpdate:(r=n.animationDurationUpdate)!=null?r:700,animationEasing:n.animationEasing||"cubicOut"},n);return uM(e),e}function uM(n){if(!n||typeof n!="object")return;["textStyle","axisLabel","nameTextStyle","label","axisName"].forEach(t=>{!n[t]||typeof n[t]!="object"||(n[t]=sGe(n[t]))}),Object.keys(n).forEach(t=>{const i=n[t];if(!(!i||typeof i!="object")&&!(t==="color"||t==="itemStyle"||t==="areaStyle"||t==="lineStyle")){if(Array.isArray(i)){i.forEach(uM);return}uM(i)}})}function sGe(n){const e=wt({fontFamily:n.fontFamily||FR},n);return typeof e.fontSize=="number"&&e.fontSize<10&&(e.fontSize=10),e}const Vu={herdsmanCount:129,grasslandArea:7568515,wetArea:2429693,yakCount:10965,projectCount:17,baseCount:12},z3=[{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}],lGe=[{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}],uGe=[{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}],OR=[{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}],u3=OR.reduce((n,e)=>n+e.count,0),cGe=1824,BR=-3672,cM=u3+cGe+BR;function dGe(n,e){const t=n.map(r=>tn(wt({},r),{count:Math.round(e*r.ratio/100)})),i=e-t.reduce((r,a)=>r+a.count,0);return i&&t[1]&&(t[1].count+=i),t}dGe([{name:"成年母牛",ratio:47},{name:"其他成年牛",ratio:22},{name:"幼畜",ratio:16},{name:"育成牛",ratio:11},{name:"公牛",ratio:4}],cM);const zR=[{label:"屠宰出栏",value:1706,yoy:6},{label:"活畜交易",value:1043,yoy:-3},{label:"外运销售",value:624,yoy:12},{label:"其他出栏",value:299,yoy:-9}],Yee=[{name:"饲草储备库",value:7,capacity:10500,unit:"座"},{name:"加工企业",value:7,capacity:13e3,unit:"家"},{name:"工程数量",value:Vu.projectCount,capacity:17,unit:"个"},{name:"基地数量",value:Vu.baseCount,capacity:12,unit:"个"}],Kee=1716,Kd=u3+Kee+BR,hGe={色地镇:"色地乡",瓦切镇:"瓦切乡",安曲镇:"安曲乡",龙日镇:"龙日乡"};function dM(n){return hGe[n]||n}const hM=OR.map(({name:n,count:e})=>({name:n,count:e})).sort((n,e)=>e.count-n.count),Lc=vGe([{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:"专家共识模型"}],Kd),fW=zR.map((n,e)=>tn(wt({},n),{color:["#ff8f6b","#30dcff","#ffd76c","#7aa7ff"][e%4]})),ST=[{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}],Hs=[{key:"2026",label:"2026年底",shortLabel:"2026",months:7,stock:781236,births:44763,outflow:21684,correction:-21735,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:-60552,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:-94400,structure:{adultCow:46,otherAdult:22,calf:17,yearling:11,bull:4}}],pW=[{name:"繁殖补充",value:86},{name:"出栏周转",value:62},{name:"死亡淘汰",value:48},{name:"母牛基础",value:91},{name:"幼畜存活",value:73}];function Zee(n){return Hs.find(e=>e.key===n)||Hs[1]}function fGe(n){var r,a,o,s,l;const e=(n==null?void 0:n.structure)||{},t=[{key:"adultCow",name:"成年母牛",ratio:(r=e.adultCow)!=null?r: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=>tn(wt({},u),{count:Math.round(n.stock*u.ratio/100),source:"预测模型"})),i=n.stock-t.reduce((u,c)=>u+c.count,0);return i&&t[1]&&(t[1].count+=i),t}function pGe(n){const e=n.stock/u3,t=hM.map((r,a)=>tn(wt({},r),{forecast:Math.round(r.count*e+(a%3-1)*n.months*18)})),i=n.stock-t.reduce((r,a)=>r+a.forecast,0);if(i){const r=t.reduce((a,o)=>o.count>a.count?o:a,t[0]);r.forecast+=i}return t.map(r=>tn(wt({},r),{change:r.forecast-r.count})).sort((r,a)=>a.forecast-r.forecast)}function Jee(n){const e=n.months+1,t=Array.from({length:e},(o,s)=>s===0?"2026-06":s===n.months?n.label:`+${s}月`),i=t.map((o,s)=>{const l=s/n.months,u=Math.sin(s/2.6)*Math.sin(Math.PI*l)*Math.min(360,n.months*18);return Math.round(Kd+(n.stock-Kd)*l+u)}),r=t.map((o,s)=>Math.round(n.births/n.months*s)),a=t.map((o,s)=>Math.round(n.outflow/n.months*s));return{labels:t,stock:i,births:r,outflow:a}}function vGe(n,e){const t=n.map(r=>tn(wt({},r),{count:Math.round(e*r.ratio/100)})),i=e-t.reduce((r,a)=>r+a.count,0);return i&&t[1]&&(t[1].count+=i),t}function mGe(n){const e=new Map;return n.forEach(t=>{const i=dM(t.name),r=e.get(i)||{name:i,count:0};r.count+=Number(t.count||0),e.set(i,r)}),[...e.values()].sort((t,i)=>i.count-t.count)}const Qc=(n,e=2)=>{const t=xd(10,e);return Math.round((Number(n)||0)*t)/t},Qee=(n,e)=>n.reduce((t,i)=>t+(Number(i[e])||0),0),vW=n=>Qc((Number(n)||0)/1e4,2),gGe=Qee(zR,"value"),g7=Qee(z3,"yakCount"),GR=Qc(Vu.grasslandArea/1e4,2),yGe=Qc(Vu.wetArea/1e4,2),_Ge=177.92,SGe=Qc(g7/Math.max(GR,1),1),bGe=108.84,xGe=159.33,wGe=[{key:"yak-count",zh:"牦牛数量",name:"牦牛数量",value:g7,unit:"头",decimals:0},{key:"grassland-area",zh:"草地面积",name:"草地面积",value:GR,unit:"万亩",decimals:2},{key:"wetland-area",zh:"湿地面积",name:"湿地面积",value:yGe,unit:"万亩",decimals:2},{key:"woodland-area",zh:"林地面积",name:"林地面积",value:_Ge,unit:"万亩",decimals:2}];lGe.map(n=>{const e=z3.find(r=>r.zoneName===n.zoneName)||{},t=vW(n.grasslandArea),i=vW(n.wetArea);return{key:n.zoneName,name:n.zoneName,grasslandArea:t,wetlandArea:i,yakCount:e.yakCount||0,resourceTotal:Qc(t+i,2),density:Qc((e.yakCount||0)/Math.max(t+i,1),1)}}).sort((n,e)=>e.yakCount-n.yakCount);z3.map(n=>({key:n.zoneName,name:n.zoneName,value:n.yakCount,unit:"头",percent:Qc(n.yakCount/Math.max(g7,1)*100,1)})).sort((n,e)=>e.value-n.value);const mW=zR.map(n=>({key:n.label,name:n.label,value:n.value,unit:"头",yoy:n.yoy,percent:Qc(n.value/Math.max(gGe,1)*100,1)})),TGe=Math.max(...Yee.map(n=>Number(n.value)||0),1);Yee.map(n=>{const e=n.name.includes("储备")||n.name.includes("加工")?`${Number(n.capacity||0).toLocaleString("zh-CN")}吨`:"已接入";return{key:n.name,name:n.name,value:n.value,unit:n.unit,capacity:n.capacity,capacityNote:e,percent:Qc((Number(n.value)||0)/TGe*100,1)}});var aj,oj;(aj=mW[0])!=null&&aj.value,(oj=mW[1])!=null&&oj.value,Vu.baseCount+Vu.projectCount;const B4=""+new URL("live-scene-1-786cdd0a-balabala-1782919616283.png",import.meta.url).href;const AGe={class:"home-dashboard"},CGe={class:"home-layer-tools"},MGe={class:"home-layer-tree-panel"},EGe={class:"home-layer-tree-list"},PGe=["onClick"],RGe={key:0,class:"home-layer-tree-children"},LGe=["onClick"],IGe={class:"home-layer-tree-legend"},DGe=["disabled","title","onClick"],NGe={class:"home-layer-legend-name"},kGe={key:0,class:"home-layer-legend-check"},FGe={key:1,class:"home-layer-tree-empty"},OGe={class:"home-left home-side-stack"},BGe={class:"home-right home-side-stack"},zGe={key:0,class:"home-video-monitor"},GGe=["disabled"],UGe={key:0,class:"home-video-scan"},VGe={key:1,class:"home-video-play"},HGe={key:2,class:"home-video-loading"},WGe={key:3,class:"home-video-error"},jGe={class:"home-video-point-name"},$Ge=["disabled"],gW=186,qGe={__name:"index",emits:["module-stats","loading-progress","map-ready"],setup(n,{emit:e}){const t=e,i=Wt(null),r=Wt(null),a=Wt({}),o=new Map;let s=null,l=!1,u=null,c=null,d=!1,h=0;const f=Wt(0),p=Wt([]),m=Wt(0),v=Wt(!1),g=Wt(!1),_=Wt(""),S=`home-video-player-${Math.random().toString(36).slice(2)}`,x=["#30dcff","#27f0c0","#ffd76c","#7aa7ff","#ff8f6b","#a6f06d"],A=gW,C=A,M=Zee("2028"),I=Jee(M),D=[...Iv.map(({key:ut,name:Jt,color:hn})=>({key:ut,name:Jt.replace("资源",""),color:hn})),...Nee.map(({key:ut,name:Jt,color:hn})=>({key:ut,name:"牦牛",color:hn}))],E=Wt(""),P=Wt(""),F=Wt(""),V=Wt(""),G=Ye(()=>pn(E.value)),W=Ye(()=>D.map(ut=>tn(wt({},ut),{layers:pn(ut.key)}))),Y=Ye(()=>F.value&&G.value.find(ut=>ut.key===F.value)||null),Q=Ye(()=>{var ut;return((ut=Y.value)==null?void 0:ut.legends)||[]}),K=Ye(()=>Q.value.filter(En).length>1),ae=Ye(()=>Q.value.length===1),ie=Ye(()=>{var ut;return(((ut=Y.value)==null?void 0:ut.legends)||[]).find(Jt=>Jt.key===V.value)||null}),he=Ye(()=>{var Jt;const ut=Y.value;return ut?(Jt=ie.value)!=null&&Jt.cqlFilter?tn(wt({},ut),{cqlFilter:ie.value.cqlFilter,activeLegend:ie.value,name:ie.value.name||ut.name}):ut:null}),Ee=Ye(()=>nn(Lc.length)),He=Ye(()=>nn(Hs.length)),xe=Ye(()=>nn(I.labels.length)),Fe=[{key:"fallback-video-1",title:"色地镇牧场入口监控",town:"色地镇",scene:"牧道卡口",device:"HY-CAM-018",channel:"01",cameraCount:6,status:"直播中",onlineRate:98,updateTime:"12:18",operator:"智能巡检 · 重点区域",progress:86,image:B4,playUrl:"",hdPlayUrl:"",token:""},{key:"fallback-video-2",title:"瓦切镇草场巡护监控",town:"瓦切镇",scene:"草场巡护",device:"HY-CAM-026",channel:"02",cameraCount:4,status:"直播中",onlineRate:96,updateTime:"12:16",operator:"远程巡护 · 轮巡中",progress:74,image:B4,playUrl:"",hdPlayUrl:"",token:""},{key:"fallback-video-3",title:"邛溪镇核心区监控",town:"邛溪镇",scene:"核心牧区",device:"HY-CAM-031",channel:"03",cameraCount:5,status:"直播中",onlineRate:97,updateTime:"12:14",operator:"视频联动 · 在线",progress:91,image:B4,playUrl:"",hdPlayUrl:"",token:""}],pt=Ye(()=>{const ut=p.value.length;return ut?v.value?m.value%ut:(f.value+m.value)%ut:0}),Ot=Ye(()=>p.value[pt.value]||Fe[0]),bt=Ye(()=>[an("grassland","grassland-town"),an("grassland","grassland-type-proportion"),an("wetland","wetland-yield"),an("woodland","woodland-type")].filter(Boolean).map((ut,Jt)=>Ln(ut,`forest-grass-wet-${Jt}`))),ht=Ye(()=>[{key:"home-video-monitor",title:"视频监控",type:"video",height:C,live:Ot.value},{key:"yak-structure",title:"畜群结构占比",height:A,option:Kt.value},{key:"yak-three-year-forecast",title:"未来三年牦牛预测",height:A,option:Tt.value},{key:"yak-forecast-trend",title:"未来存栏趋势",height:A,option:Ae.value}]),Kt=Ye(()=>_T({animation:!0,animationDuration:900,animationDurationUpdate:700,animationEasing:"cubicOut",color:x,tooltip:yT(ut=>`${ut.name}<br/>占比:${ut.percent}%<br/>估算数量:${Ht(ut.value)}头`),legend:{orient:"vertical",right:0,top:"middle",itemWidth:8,itemHeight:8,itemGap:5,formatter(ut){const Jt=Lc.find(hn=>hn.name===ut);return Jt?`${ut} ${wn(Jt.count)}头`:ut},textStyle:{color:"rgba(222, 250, 255, 0.78)",fontSize:10}},series:[{name:"畜群结构",type:"pie",selectedMode:"single",selectedOffset:8,radius:["36%","62%"],center:["30%","54%"],avoidLabelOverlap:!0,label:{color:"#fff",fontSize:10,formatter:"{d}%"},labelLine:{length:7,length2:4,lineStyle:{color:"rgba(223, 250, 255, 0.35)"}},itemStyle:{borderColor:"rgba(3, 18, 31, 0.92)",borderWidth:3},emphasis:{scale:!0,scaleSize:8,itemStyle:{shadowBlur:16,shadowColor:"rgba(48, 220, 255, 0.58)"}},data:Lc.map((ut,Jt)=>({name:ut.name,value:ut.count,selected:Jt===Ee.value}))}]})),Tt=Ye(()=>_T({animation:!0,animationDuration:1100,animationDurationUpdate:900,animationEasing:"cubicOut",color:["#30dcff"],tooltip:tn(wt({},yT()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(ut){const Jt=Hs[ut[0].dataIndex];return`${Jt.label}<br/>预测存栏:${Ht(Jt.stock)}头`}}),grid:{left:42,right:18,top:16,bottom:24},xAxis:{type:"category",data:Hs.map(ut=>ut.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",min(ut){return Math.max(0,Math.floor(ut.min/1e4)*1e4)},axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10,formatter:wn},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}}},series:[{name:"预测存栏",type:"bar",barWidth:24,data:Hs.map((ut,Jt)=>({value:ut.stock,itemStyle:{borderRadius:[9,9,1,1],color:new po(0,0,0,1,[{offset:0,color:Jt===He.value?"#ffd76c":"#30dcff"},{offset:.72,color:Jt===He.value?"rgba(255, 215, 108, 0.7)":"rgba(48, 220, 255, 0.62)"},{offset:1,color:Jt===He.value?"rgba(255, 215, 108, 0.1)":"rgba(48, 220, 255, 0.08)"}]),shadowBlur:Jt===He.value?16:8,shadowColor:Jt===He.value?"rgba(255, 215, 108, 0.56)":"rgba(48, 220, 255, 0.28)"}})),itemStyle:{borderRadius:[9,9,1,1],color:new po(0,0,0,1,[{offset:0,color:"#30dcff"},{offset:.72,color:"rgba(48, 220, 255, 0.62)"},{offset:1,color:"rgba(48, 220, 255, 0.08)"}])},label:{show:!0,position:"top",color:"#ffffff",fontSize:10,formatter:({value:ut})=>wn(ut)}}]})),Ae=Ye(()=>_T({animation:!0,animationDuration:1200,animationDurationUpdate:900,animationEasing:"cubicOut",color:["#30dcff","#ffd76c","#ff8f6b"],tooltip:tn(wt({},yT()),{trigger:"axis"}),legend:{top:2,right:2,itemWidth:10,itemHeight:7,itemGap:7,textStyle:{color:"rgba(222, 250, 255, 0.76)",fontSize:10}},grid:{left:42,right:32,top:30,bottom:24},xAxis:{type:"category",boundaryGap:!1,data:I.labels,axisLabel:{color:"rgba(223, 250, 255, 0.62)",fontSize:10,interval:4},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:wn},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}}},{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.48)",fontSize:10,formatter:wn},splitLine:{show:!1}}],series:[je("预测存栏",I.stock,"#30dcff",0,!0,xe.value),je("繁殖补充",I.births,"#ffd76c",1,!1,xe.value),je("出栏扣减",I.outflow,"#ff8f6b",1,!1,xe.value)]}));dl(()=>{t("module-stats",{moduleKey:"home",items:wGe}),cn(),J(),Lt(),k()}),Bl(()=>{var ut,Jt;l=!0,We(),_t(),o.clear(),(Jt=(ut=i.value)==null?void 0:ut.destroyMap)==null||Jt.call(ut)}),qa(pt,()=>{if(!v.value&&!g.value&&!c){_.value="";return}We({resetError:!0})}),qa(F,()=>{V.value=""});function Lt(){var Jt,hn,Nn;s=new am,t("loading-progress",{progress:0}),(hn=(Jt=s.instance)==null?void 0:Jt.on)==null||hn.call(Jt,"onProgress",(Re,lt,sn)=>{t("loading-progress",{progress:Math.floor(lt/(sn||1)*100),path:Re,itemsLoaded:lt,itemsTotal:sn})});const ut=(Re=0)=>rn(this,null,function*(){var sn,Pi;if(l)return;yield Qs();const lt=i.value;if((sn=lt==null?void 0:lt.loadMap)==null||sn.call(lt,s),lt!=null&&lt.canvasMap){t("loading-progress",{progress:100}),t("map-ready"),(Pi=lt.play)==null||Pi.call(lt);return}if(Re<24){window.setTimeout(()=>ut(Re+1),120);return}t("map-ready")});(Nn=s.ready)==null||Nn.then(ut).catch(()=>{t("map-ready")})}function vt(ut,Jt){ut&&(Jt?o.set(ut,Jt):o.delete(ut))}function Ft(ut){r.value=ut||null}function k(){_t(),u=window.setInterval(Ct,2600),window.setTimeout(Ct,800)}function _t(){u&&(window.clearInterval(u),u=null)}function Ct(){l||(f.value+=1,st(),it(),Vt())}function J(){return rn(this,null,function*(){try{const ut=yield Rze();if(l)return;p.value=ut.length?ut:Fe}catch(ut){if(l)return;p.value=Fe,_.value="监控接口暂不可用",window.setTimeout(()=>{_.value==="监控接口暂不可用"&&(_.value="")},2400)}})}function ee(ut){const Jt=(ut==null?void 0:ut.image)||B4;return v.value?void 0:{backgroundImage:`linear-gradient(180deg, rgba(0, 16, 26, 0.08), rgba(0, 16, 26, 0.32)), url(${Jt})`}}function Ue(){Bt(-1)}function xt(){Bt(1)}function Bt(ut){const Jt=p.value.length;if(!Jt)return;We({resetError:!0});const hn=pt.value;m.value=(hn+ut+Jt)%Jt,f.value=0}function Ce(){return rn(this,null,function*(){var Nn,Re;const ut=Ot.value;if(!(ut!=null&&ut.hdPlayUrl)||!(ut!=null&&ut.token)){_.value="无效的监控参数";return}if(v.value||g.value)return;m.value=pt.value,f.value=0,c&&We({resetError:!0}),_.value="",g.value=!0,yield Qs();const Jt=++h;let hn=null;try{const lt=(Re=(Nn=r.value)==null?void 0:Nn.getBoundingClientRect)==null?void 0:Re.call(Nn),sn=Math.max(300,Math.floor((lt==null?void 0:lt.width)||340)),Pi=Math.max(80,Math.floor((lt==null?void 0:lt.height)||92));if(hn=new FCe.EZUIKitPlayer({id:S,accessToken:ut.token,url:ut.hdPlayUrl,audio:0,width:sn,height:Pi,themeData:Yt(),handleError(er){Jt===h&&(console.warn("EZUIKit player error",er),_.value="视频加载失败",g.value=!1,v.value=!1,h+=1,c=null,d=!1,mt())},handleSuccess(){Jt===h&&(_.value="",d=!0,g.value=!1)},fullScreenChangeCallBack(){}}),Jt!==h){$e(hn),mt();return}c=hn,v.value=!0}catch(lt){console.warn("EZUIKit init error",lt),_.value="视频加载失败",We()}})}function We(ut={}){const{clearElement:Jt=!0,resetError:hn=!1}=ut,Nn=c,Re=d;c=null,d=!1,h+=1,Re&&$e(Nn),Jt&&mt(),v.value=!1,g.value=!1,hn&&(_.value="")}function $e(ut){if(!(!ut||typeof ut.stop!="function"))try{const Jt=ut.stop();Jt&&typeof Jt.catch=="function"&&Jt.catch(()=>{})}catch(Jt){console.warn("EZUIKit stop error",Jt)}}function mt(){if(typeof document=="undefined")return;const ut=document.getElementById(S);ut&&ut.replaceChildren()}function Yt(){return{header:{color:"#1890ff",activeColor:"#ffffff",backgroundColor:"#000000",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,memo:"顶部设备序列号",isrender:0},{iconId:"deviceName",part:"left",defaultActive:0,memo:"顶部设备名称",isrender:0},{iconId:"cloudRec",part:"right",defaultActive:0,memo:"云存储",isrender:0},{iconId:"rec",part:"right",defaultActive:0,memo:"SD卡回放",isrender:0}]},footer:{color:"#ffffff",activeColor:"#1890ff",backgroundColor:"#00000021",btnList:[{iconId:"play",part:"left",defaultActive:1,memo:"播放",isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,memo:"截屏按钮",isrender:0},{iconId:"sound",part:"left",defaultActive:0,memo:"声音按钮",isrender:1},{iconId:"pantile",part:"left",defaultActive:0,memo:"云台控制按钮",isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,memo:"录制按钮",isrender:0},{iconId:"zoom",part:"left",defaultActive:0,memo:"电子放大",isrender:1},{iconId:"hd",part:"right",defaultActive:0,memo:"清晰度切换按钮",isrender:1},{iconId:"expend",part:"right",defaultActive:0,memo:"全局全屏按钮",isrender:1}]}}}function st(){const ut=o.get("yak-structure");Zt(ut,"畜群结构",Ee.value)}function it(){const ut=o.get("yak-three-year-forecast");Zt(ut,"预测存栏",He.value)}function Vt(){const ut=o.get("yak-forecast-trend");Zt(ut,"预测存栏",xe.value)}function Zt(ut,Jt,hn){const Nn=typeof(ut==null?void 0:ut.dispatchAction)=="function"?ut:ut==null?void 0:ut.chart;!Nn||hn<0||(Nn.dispatchAction({type:"downplay",seriesName:Jt}),Nn.dispatchAction({type:"hideTip"}),Nn.dispatchAction({type:"highlight",seriesName:Jt,dataIndex:hn}),Nn.dispatchAction({type:"showTip",seriesName:Jt,dataIndex:hn}))}function nn(ut){return ut?f.value%ut:0}function cn(){return rn(this,null,function*(){const[ut,Jt,hn]=yield Promise.all([S5("grassland","grassland-distribution"),S5("wetland","wetland-distribution"),S5("woodland","woodland-distribution")]);l||(a.value={grassland:ut,wetland:Jt,woodland:hn})})}function an(ut,Jt){const hn=a.value[ut];return[...(hn==null?void 0:hn.leftPanels)||[],...(hn==null?void 0:hn.rightPanels)||[]].find(Re=>(Re==null?void 0:Re.key)===Jt)}function Ln(ut,Jt){const Nn={"wetland-yield":{type:"column",variant:"slim"},"woodland-type":{type:"structure",variant:void 0}}[ut.key]||{};return tn(wt(wt({},ut),Nn),{key:`home-${Jt}-${ut.key}`,height:gW})}function je(ut,Jt,hn,Nn=0,Re=!1,lt=-1){return{name:ut,type:"line",yAxisIndex:Nn,smooth:!0,symbolSize:5,data:Jt.map((sn,Pi)=>({value:sn,symbolSize:Pi===lt?10:5,itemStyle:{color:Pi===lt?"#ffffff":hn},label:{show:Pi===lt,position:"top",color:hn,fontSize:10,formatter:({value:er})=>wn(er)}})),lineStyle:{width:2.4,color:hn},itemStyle:{color:hn},areaStyle:Re?{color:new po(0,0,0,1,[{offset:0,color:`${hn}44`},{offset:1,color:`${hn}05`}])}:void 0}}function Ht(ut){const Jt=Number(ut);return Number.isFinite(Jt)?Jt.toLocaleString("zh-CN",{maximumFractionDigits:Number.isInteger(Jt)?0:2}):"--"}function wn(ut){const Jt=Number(ut);return Number.isFinite(Jt)?Math.abs(Jt)>=1e4?`${(Jt/1e4).toFixed(Math.abs(Jt)>=1e5?0:1)}万`:Math.round(Jt).toLocaleString("zh-CN"):"--"}function zn(ut){E.value=ut,F.value="",V.value=""}function Be(ut){if(P.value===ut){P.value="";return}P.value=ut,E.value!==ut&&zn(ut)}function pn(ut){const Jt=f7(ut);return ut!=="yak-industry-chain"?Jt:Jt.filter(hn=>["yak-distribution-layer","yak-recognition-layer"].includes(hn.key))}function dn(ut){F.value=F.value===ut?"":ut}function Un(ut){Tn(ut)&&(V.value=V.value===ut.key?"":ut.key)}function En(ut){return(ut==null?void 0:ut.selectable)===!1?!1:!!(ut!=null&&ut.key&&(ut.cqlFilter||ut.rankingValueKey))}function Tn(ut){return K.value&&En(ut)}return(ut,Jt)=>(Te(),Pe("div",AGe,[gn(rm,{ref_key:"mapSceneRef",ref:i,class:"home-map-scene","active-layer":he.value},null,8,["active-layer"]),Jt[3]||(Jt[3]=O("div",{class:"home-map-scrim"},null,-1)),O("div",CGe,[gn(Mi,{title:"图层控制",width:248,height:430},{default:mi(()=>[O("div",MGe,[O("div",EGe,[(Te(!0),Pe(bn,null,Bn(W.value,hn=>(Te(),Pe("div",{key:hn.key,class:Xn(["home-layer-tree-group",{"is-open":hn.key===P.value}])},[O("button",{class:Xn(["home-layer-tree-parent",{"is-active":hn.key===E.value}]),type:"button",onClick:Nn=>Be(hn.key)},[O("span",null,De(hn.name),1),Jt[0]||(Jt[0]=O("i",null,null,-1))],10,PGe),hn.key===P.value?(Te(),Pe("div",RGe,[(Te(!0),Pe(bn,null,Bn(hn.layers,Nn=>(Te(),Pe("button",{key:Nn.key,class:Xn(["home-layer-tree-child",{"is-active":Nn.key===F.value}]),type:"button",onClick:Re=>dn(Nn.key)},[O("span",null,De(Nn.name),1),Jt[1]||(Jt[1]=O("i",null,null,-1))],10,LGe))),128))])):Dn("",!0)],2))),128))]),O("div",IGe,[Jt[2]||(Jt[2]=O("div",{class:"home-layer-tree-title"},"图例",-1)),Q.value.length?(Te(),Pe("div",{key:0,class:Xn(["home-layer-legend-grid",{"is-single":ae.value}])},[(Te(!0),Pe(bn,null,Bn(Q.value,hn=>(Te(),Pe("button",{key:hn.key||hn.name,class:Xn(["home-layer-legend-row",{"is-selected":Tn(hn)&&hn.key===V.value,"is-checkable":Tn(hn),"is-disabled":!Tn(hn)}]),type:"button",disabled:!Tn(hn),title:hn.name,onClick:Nn=>Un(hn)},[O("span",{class:"home-layer-legend-swatch",style:Ji({backgroundColor:hn.fillColor,borderColor:hn.strokeColor||hn.fillColor})},null,4),O("span",NGe,De(hn.name),1),Tn(hn)?(Te(),Pe("i",kGe)):Dn("",!0)],10,DGe))),128))],2)):(Te(),Pe("div",FGe,"选择图层后显示图例"))])])]),_:1})]),O("div",OGe,[(Te(!0),Pe(bn,null,Bn(bt.value,hn=>(Te(),Uo(Mi,{key:hn.key,class:"home-card left-card",title:hn.title,width:398,height:hn.height},{default:mi(()=>[gn(Cl,{panel:hn,compact:""},null,8,["panel"])]),_:2},1032,["title","height"]))),128))]),O("div",BGe,[(Te(!0),Pe(bn,null,Bn(ht.value,hn=>(Te(),Uo(Mi,{key:hn.key,class:Xn(["home-card","right-card",{"home-video-card":hn.type==="video"}]),title:hn.title,width:398,height:hn.height},{default:mi(()=>[hn.type==="video"?(Te(),Pe("div",zGe,[O("button",{class:"home-video-nav home-video-prev",type:"button","aria-label":"上一路监控",disabled:p.value.length<=1,onClick:Ue},"‹",8,GGe),(Te(),Pe("div",{key:hn.live.key,ref_for:!0,ref:Ft,class:Xn(["home-video-screen",{"is-playing":v.value,"is-loading":g.value}]),style:Ji(ee(hn.live)),onClick:Ce},[O("div",{id:S,class:"home-video-player"}),v.value?Dn("",!0):(Te(),Pe("div",UGe)),!v.value&&hn.live.hdPlayUrl?(Te(),Pe("div",VGe)):Dn("",!0),g.value?(Te(),Pe("div",HGe,"加载中")):Dn("",!0),_.value?(Te(),Pe("div",WGe,De(_.value),1)):Dn("",!0),O("div",jGe,De(hn.live.title),1)],6)),O("button",{class:"home-video-nav home-video-next",type:"button","aria-label":"下一路监控",disabled:p.value.length<=1,onClick:xt},"›",8,$Ge)])):hn.option?(Te(),Uo(Tr(Ua),{key:1,ref_for:!0,ref:Nn=>vt(hn.key,Nn),class:"home-chart",option:hn.option,autoresize:!0},null,8,["option"])):(Te(),Uo(Cl,{key:2,panel:hn,compact:""},null,8,["panel"]))]),_:2},1032,["class","title","height"]))),128))])]))}};const XGe={class:"topic-switcher"},YGe={class:"topic-switcher-menu"},KGe=["onPointerup","onClick"],ZGe={class:"topic-title"},JGe={key:0},y7={__name:"TopicSwitcher",props:{modelValue:{type:String,required:!0},topics:{type:Array,default:()=>Iv}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e;let r="",a=0;const o=Ye(()=>{var l;return(l=t.topics)!=null&&l.length?t.topics:Iv});function s(l,u){var d,h;(h=(d=l.currentTarget)==null?void 0:d.blur)==null||h.call(d);const c=Date.now();l.type==="click"&&r===u&&c-a<450||(l.type==="pointerup"&&(r=u,a=c),i("update:modelValue",u))}return(l,u)=>(Te(),Pe("div",XGe,[u[0]||(u[0]=O("div",{class:"topic-switcher-arrow"},[O("img",{src:M5,alt:""}),O("img",{src:E5,alt:""})],-1)),O("div",YGe,[(Te(!0),Pe(bn,null,Bn(o.value,c=>(Te(),Pe("button",{key:c.key,class:Xn(["topic-switcher-item",{"is-active":c.key===n.modelValue}]),style:Ji({"--topic-color":c.color,"--topic-item-width":c.width?`${c.width}px`:void 0}),type:"button",onPointerup:d=>s(d,c.key),onClick:d=>s(d,c.key)},[O("span",{class:Xn(["topic-name",{"has-sub-name":c.subName}])},[O("span",ZGe,De(c.name),1),c.subName?(Te(),Pe("small",JGe,De(c.subName),1)):Dn("",!0)],2)],46,KGe))),128))]),u[1]||(u[1]=O("div",{class:"topic-switcher-arrow is-reverse"},[O("img",{src:M5,alt:""}),O("img",{src:E5,alt:""})],-1))]))}};const QGe={class:"layer-panel"},eUe={class:"layer-panel-list"},tUe=["onClick"],nUe={key:0,class:"layer-panel-empty"},iUe={class:"layer-panel-legend"},rUe=["disabled","title","onClick"],aUe={class:"legend-name"},oUe={key:0,class:"legend-check"},sUe={key:1,class:"layer-panel-empty is-legend"},UR={__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},layers:{type:Array,default:null}},emits:["update:modelValue","update:selectedLegendKey"],setup(n,{emit:e}){const t=n,i=e,r=Ye(()=>Array.isArray(t.layers)?t.layers:f7(t.topicKey)),a=Ye(()=>t.legends.filter(c).length>1),o=Ye(()=>t.legends.length===1),s=Ye(()=>t.height?t.height:430);function l(h,f){var p,m;(m=(p=h.currentTarget)==null?void 0:p.blur)==null||m.call(p),i("update:modelValue",t.modelValue===f?"":f)}function u(h,f){var p,m;(m=(p=h.currentTarget)==null?void 0:p.blur)==null||m.call(p),d(f)&&i("update:selectedLegendKey",t.selectedLegendKey===f.key?"":f.key)}function c(h){return(h==null?void 0:h.selectable)===!1?!1:!!(h!=null&&h.key&&(h.cqlFilter||h.rankingValueKey))}function d(h){return a.value&&c(h)}return(h,f)=>(Te(),Uo(Mi,{title:"图层控制",width:n.width,height:s.value},{default:mi(()=>[O("div",QGe,[O("div",eUe,[(Te(!0),Pe(bn,null,Bn(r.value,p=>(Te(),Pe("button",{key:p.key,class:Xn(["layer-panel-item",{"is-active":p.key===n.modelValue,"is-checked":p.key===n.modelValue}]),type:"button",onMousedown:f[0]||(f[0]=Ws(()=>{},["prevent"])),onClick:m=>l(m,p.key)},[O("span",null,De(p.name),1),f[2]||(f[2]=O("i",null,null,-1))],42,tUe))),128)),r.value.length?Dn("",!0):(Te(),Pe("div",nUe,"暂无图层配置"))]),O("div",iUe,[f[3]||(f[3]=O("div",{class:"layer-panel-section-title"},"图例",-1)),n.legends.length?(Te(),Pe("div",{key:0,class:Xn(["layer-panel-legend-grid",{"is-single":o.value}])},[(Te(!0),Pe(bn,null,Bn(n.legends,p=>(Te(),Pe("button",{key:p.key||p.name,class:Xn(["layer-panel-legend-row",{"is-selected":d(p)&&p.key===n.selectedLegendKey,"is-checkable":d(p),"is-disabled":!d(p)}]),type:"button",disabled:!d(p),title:p.name,onMousedown:f[1]||(f[1]=Ws(()=>{},["prevent"])),onClick:m=>u(m,p)},[O("span",{class:"legend-swatch",style:Ji({backgroundColor:p.fillColor,borderColor:p.strokeColor||p.fillColor})},null,4),O("span",aUe,De(p.name),1),d(p)?(Te(),Pe("i",oUe)):Dn("",!0)],42,rUe))),128))],2)):(Te(),Pe("div",sUe,"暂无图例"))])])]),_:1},8,["width","height"]))}};const lUe={class:"feature-info"},uUe={key:0,class:"feature-info-state"},cUe={key:1,class:"feature-info-state"},dUe={key:2,class:"feature-info-state"},hUe={key:0,class:"feature-table"},fUe=["title"],pUe={key:1,class:"feature-info-state is-inline"},ete={__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(n){const e=n,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"],"图斑面积"]],i=[[["investigator"],"调查人"],[["survey_time","dc_rq","sjnf","delimitation_year"],"调查时间"],[["adjust_opinion_name"],"调整意见"],[["adjust_reason"],"调整原因"]],r={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"],"土层厚度"],...i],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"],"草地经营权"],...i],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"],"土层厚度"],...i],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"]),d=new Set(["xb_xc_yield","xb_gc_yield","grass_yield","gc_yield","xc_yield","yield","output","remark1","remark2","remark3","remark4","remark5","remarks"]),h=Ye(()=>{var ie;return((ie=e.feature)==null?void 0:ie.properties)||{}}),f=Ye(()=>{var ie,he,Ee;return((he=(ie=e.feature)==null?void 0:ie.feature)==null?void 0:he.geometry)||((Ee=e.feature)==null?void 0:Ee.geometry)||null}),p=Ye(()=>{var Fe,pt,Ot,bt,ht;const ie=String(((Fe=e.feature)==null?void 0:Fe.id)||"").toLowerCase(),he=String(((Ot=(pt=e.feature)==null?void 0:pt.layer)==null?void 0:Ot.key)||"").toLowerCase(),Ee=String(((ht=(bt=e.feature)==null?void 0:bt.layer)==null?void 0:ht.layerName)||"").toLowerCase(),He=`${he} ${Ee}`,xe=h.value;return He.includes("national-park")||He.includes("restoration")||xe.project_name||xe.project_category||xe.totalAcreage?"ecological":xe.dlmc||ie.includes("woodland")||ie.includes("t_woodland")||He.includes("woodland")?"woodland":He.includes("wetland")||He.includes("shidi")||ie.includes("shidi")||xe.land_type==="shidi"||xe.land_type==="湿地"||xe.land_type===2?"wetland":He.includes("grassland")||He.includes("caodi")||xe.grassland_category_name||xe.basic_type_name||ie.includes("caodi")||xe.land_type==="caodi"||xe.land_type===1?"grassland":"woodland"}),m=Ye(()=>{const ie=[],he=new Set;return(r[p.value]||r.woodland).forEach(([He,xe])=>{const Fe=S(h.value,He,xe,he);Fe&&!ie.some(pt=>pt.label===Fe.label)&&(ie.push(Fe),he.add(Fe.sourceKey))}),ie.some(He=>He.label==="图斑面积")||_(ie,he,"图斑面积",W(f.value),"geometry-area"),Object.entries(h.value).forEach(([He,xe])=>{if(he.has(He)||V(He,xe))return;const Fe=A(He,xe);x(Fe)&&(ie.some(pt=>pt.value===Fe||pt.label===(l[He]||ae(He)))||(ie.push({key:`fallback-${He}`,sourceKey:He,label:l[He]||ae(He),value:Fe}),he.add(He)))}),ie}),v=Ye(()=>m.value.map((ie,he)=>tn(wt({},ie),{displayOrder:g(ie,he)})).sort((ie,he)=>ie.displayOrder-he.displayOrder));function g(ie,he){const Ee=(ie==null?void 0:ie.label)||"",He=String((ie==null?void 0:ie.sourceKey)||"").toLowerCase();return["所在乡镇","所在村","所在区域","图斑编号","图斑面积","小班面积","图斑地类面积","地类名称","湿地类型"].includes(Ee)?he:["基本草原类型","草原类型","草原类","草原型","湿地草地型","草原级别","湿地级别","退化等级","功能类别","保护等级","森林类别","林种","质量等级","优势树种","起源","龄组"].includes(Ee)?100+he:Ee.includes("产量")||Ee.includes("亩产")||Ee.includes("植被")||Ee.includes("优势草种")||Ee.includes("优势度")||Ee.includes("海拔")||Ee.includes("地貌")||Ee.includes("坡")||Ee.includes("土壤")||Ee.includes("郁闭度")||Ee.includes("树高")||Ee.includes("蓄积")||Ee.includes("生物量")||Ee.includes("碳储量")?200+he:Ee.includes("权属")||Ee.includes("所有权")||Ee.includes("使用权")||Ee.includes("经营权")||Ee.includes("调查")||Ee.includes("调整")||Ee.includes("划区")||Ee.includes("单位")||He.includes("owner")||He.includes("qsdw")||He.includes("zldw")?300+he:150+he}function _(ie,he,Ee,He,xe){!x(He)||ie.some(Fe=>Fe.label===Ee||Fe.value===He)||(ie.push({key:`static-${xe}`,sourceKey:xe,label:Ee,value:He}),he.add(xe))}function S(ie,he,Ee,He=new Set){for(const xe of he)if(!(He.has(xe)||F(xe))&&x(ie==null?void 0:ie[xe])){const Fe=A(xe,ie[xe]);if(!x(Fe))continue;return{key:`${Ee}-${xe}`,sourceKey:xe,label:Ee,value:Fe}}return null}function x(ie){return ie!=null&&ie!==""&&ie!==" "&&ie!=="null"&&ie!=="undefined"}function A(ie,he){var xe;if(!x(he))return"";if((xe=o[ie])!=null&&xe[String(he)])return o[ie][String(he)];if(["xiang","xzqdm","town_code","area_code"].includes(ie))return C(he);if(["cun","village_code"].includes(ie)&&M(he))return"";if(["grassland_level","level"].includes(ie)&&I(he))return p.value==="wetland"?`${Number(he)}级湿地`:`${Number(he)}级草原`;if(s.has(ie)&&M(he)||G(ie,he))return"";if(E(ie))return P(he);if(typeof he=="number"||/^-?\d+(\.\d+)?$/.test(String(he))){const Fe=Number(he);if(Fe===0&&c.has(ie))return"";const pt=Number.isInteger(Fe)?`${Fe}`:`${Number(Fe.toFixed(2))}`;return["xbmj","tbdlmj","geomj","area_square_meter"].includes(ie)?`${D(Fe/666.6667)} 亩`:["acreage","mj","area_mu"].includes(ie)?`${pt} 亩`:["length_meter"].includes(ie)?`${pt} 米`:["totalAcreage","cdAcreage","sdAcreage"].includes(ie)?`${pt} 万亩`:["cdScl","sdScl"].includes(ie)?`${pt} 万吨`:["areaWanMu","area_wan_mu"].includes(ie)?`${pt} 万亩`:["xc_yield","xb_xc_yield","gc_yield","xb_gc_yield","edible_xc_yield","grass_yield"].includes(ie)?`${pt} 斤`:["mu_yield","xc_mu_yield","gc_mu_yield","xb_xc_mu_yield","xb_gc_mu_yield","edible_xc_mu_yield"].includes(ie)?`${pt} 斤`:["vegetation_cover","lbmjbl","yu_bi_du"].includes(ie)?`${pt}%`:["elevation","tu_ceng_hd","pingjun_sg"].includes(ie)?`${pt} 米`:["po_du","slope"].includes(ie)?`${pt}°`:pt}const He=String(he);return p.value==="wetland"&&["grassland_level","level"].includes(ie)?He.replace(/草原/g,"湿地"):He}function C(ie){const he=String(ie||"").trim();if(!he)return"";if(a[he])return a[he];const Ee=he.replace(/\D/g,"");if(a[Ee])return a[Ee];for(let He=Math.min(12,Ee.length);He>=6;He--){const xe=Ee.slice(0,He);if(a[xe])return a[xe]}return M(he)?"":he}function M(ie){return/^[0-9A-Za-z_-]{1,12}$/.test(String(ie).trim())}function I(ie){return/^-?\d+(\.\d+)?$/.test(String(ie).trim())}function D(ie){return Number.isInteger(ie)?`${ie}`:`${Number(ie.toFixed(2))}`}function E(ie){return["survey_time","dc_rq","create_time","update_time"].includes(String(ie))}function P(ie){const he=String(ie);return/^\d{4}-\d{2}-\d{2}/.test(he)?he.slice(0,10):he}function F(ie){const he=String(ie).toLowerCase();return["geom","wkt","geometry","the_geom","raw_properties"].includes(he)||["bsm","ysdm","gid","id","objectid","object_id","fid","key_uid"].includes(he)||["shape_leng","shape_length","length","perimeter"].includes(he)?!0:["xzqdm","area_code","town_code","patch_no","land_number"].includes(he)?!1:["di_lei","qykz","stqw","lyfq","tbybh","patch_code"].includes(he)||he.endsWith("_code")||he.endsWith("dm")||he.endsWith("_id")||["create_by","create_time","update_by","update_time"].includes(he)?!0:he.includes("geom")||he.includes("boundary")||he.includes("wkb")}function V(ie,he){var He;if(F(ie)||!x(he))return!0;const Ee=String(ie).toLowerCase();return!!(d.has(Ee)||Ee.includes("number")||Ee.includes("patch_no")||!u.has(ie)||M(he)&&!((He=o[ie])!=null&&He[String(he)])&&!["xiang","xzqdm","town_code","area_code","cun","land_type","grassland_level","level","gjgyl_bhdj","bh_dj","ld_qs","qsxz","tdsyqs","zl_dj"].includes(ie))}function G(ie,he){var Ee;return!M(he)||(Ee=o[ie])!=null&&Ee[String(he)]?!1:["resource_type","grassland category","functional_category","aspect","soil_depth","soil texture","cdsyq","cdsyq2","cdjjq"].includes(ie)}function W(ie){const he=Y(ie);if(!he)return"";const Ee=he/666.6667;return Ee>=1e4?`${D(Ee/1e4)} 万亩`:`${D(Ee)} 亩`}function Y(ie){return ie!=null&&ie.coordinates?ie.type==="Polygon"?Q(ie.coordinates):ie.type==="MultiPolygon"?ie.coordinates.reduce((he,Ee)=>he+Q(Ee),0):0:0}function Q(ie=[]){if(!ie.length)return 0;const[he,...Ee]=ie,He=Math.abs(K(he)),xe=Ee.reduce((Fe,pt)=>Fe+Math.abs(K(pt)),0);return Math.max(0,He-xe)}function K(ie=[]){if(ie.length<3)return 0;const he=ie.reduce((Fe,pt)=>Fe+Number((pt==null?void 0:pt[1])||0),0)/ie.length,Ee=111320,He=Ee*Math.cos(he*Math.PI/180);let xe=0;for(let Fe=0;Fe<ie.length;Fe++){const pt=ie[Fe],Ot=ie[(Fe+1)%ie.length],bt=Number((pt==null?void 0:pt[0])||0)*He,ht=Number((pt==null?void 0:pt[1])||0)*Ee,Kt=Number((Ot==null?void 0:Ot[0])||0)*He,Tt=Number((Ot==null?void 0:Ot[1])||0)*Ee;xe+=bt*Tt-Kt*ht}return xe/2}function ae(ie){return String(ie).replace(/_/g," ").replace(/\b\w/g,he=>he.toUpperCase())}return(ie,he)=>(Te(),Uo(Mi,{title:"图斑详情",width:n.width,height:n.height},{default:mi(()=>[O("div",lUe,[n.loading?(Te(),Pe("div",uUe,"正在查询图斑信息")):n.empty?(Te(),Pe("div",cUe,"当前点击位置未查询到图斑")):n.feature?(Te(),Pe(bn,{key:3},[v.value.length?(Te(),Pe("div",hUe,[(Te(!0),Pe(bn,null,Bn(v.value,Ee=>(Te(),Pe("div",{key:Ee.key,class:"feature-row"},[O("span",null,De(Ee.label),1),O("strong",{title:Ee.value},De(Ee.value),9,fUe)]))),128))])):(Te(),Pe("div",pUe,"当前图斑暂无可展示的业务字段"))],64)):(Te(),Pe("div",dUe,"点击地图图层查看图斑/要素信息"))])]),_:1},8,["width","height"]))}};const vUe={class:"forest-grass-wet"},mUe={class:"forest-grass-wet-ui",id:"forest-grass-wet-ui"},gUe={class:"fgw-left"},yUe={class:"fgw-side-stack is-left"},_Ue={class:"fgw-right"},SUe={class:"fgw-side-stack is-right"},bUe={class:"fgw-map-layer-tools"},xUe={class:"fgw-bottom-topic"},wUe={key:0,class:"loading"},TUe={class:"loading-progress"},AUe={class:"value"},CUe={__name:"index",props:{showLoading:{type:Boolean,default:!0}},emits:["topic-stats"],setup(n,{emit:e}){const t=n,i=e,r=Wt(null),a=Wt(Iv[0].key),o=Wt(""),s=Wt([]),l=Wt("idle"),u=Wt(!1),c=Wt({title:"业务统计",rows:[]}),d=Wt({title:"业务统计",rows:[]}),h=Wt([]),f=Wt([]),p=Wt({}),m=Wt(null),v=Wt(""),g=Wt(null),_=Wt(!1),S=Wt(!1),x=Wt(null),A=Wt(0),C=Wt(t.showLoading),M=Wt({type:"idle",text:"等待 GeoServer 图层加载"});let I=null,D=!1,E=0,P=0;const F=new Set(["grassland-distribution","wetland-distribution","woodland-distribution","woodland-protection","woodland-type","woodland-quality","woodland-ownership"]);Ye(()=>XH(a.value));const V=Ye(()=>o.value?B3(a.value,o.value):null),G=Ye(()=>{var J;return(((J=V.value)==null?void 0:J.legends)||[]).find(ee=>ee.key===v.value)||null}),W=Ye(()=>{var ee;const J=V.value;return!J||!((ee=G.value)!=null&&ee.cqlFilter)?J:tn(wt({},J),{cqlFilter:G.value.cqlFilter,activeLegend:G.value,name:G.value.name||J.name})}),Y=Ye(()=>190),Q=Ye(()=>12),K=Ye(()=>Y.value*2+Q.value),ae=Ye(()=>!!x.value),ie=Ye(()=>{if(S.value||_.value||!g.value)return 186;const J=Kt(g.value);return Math.min(480,Math.max(300,86+Math.min(J,12)*34))}),he=Ye(()=>{if(!x.value)return{};const J=460,ee=ie.value,Ue=24,xt=Ee(x.value),Bt=xt.x>1420?-J-28:28,Ce=Math.min(Math.max(xt.x+Bt,Ue),1920-J-Ue),We=Math.min(Math.max(xt.y-ee-72,188),1080-ee-132);return{left:`${Ce}px`,top:`${We}px`,right:"auto",bottom:"auto"}});function Ee(J){const ee=document.querySelector(".forest-grass-wet"),Ue=ee==null?void 0:ee.getBoundingClientRect();return!(Ue!=null&&Ue.width)||!(Ue!=null&&Ue.height)?J:{x:(J.x-Ue.left)/Ue.width*1920,y:(J.y-Ue.top)/Ue.height*1080}}dl(()=>{document.addEventListener("pointerdown",_t,!0),He(),xe(a.value,""),Tt(a.value,"")}),Bl(()=>{D=!0,document.removeEventListener("pointerdown",_t,!0)}),qa(a,J=>{v.value="",o.value="",k(),xe(J,""),Tt(J,"",null)}),qa(o,()=>{v.value="",k(),M.value={type:o.value?"loading":"idle",text:o.value?"正在加载 GeoServer 图层":"等待 GeoServer 图层加载"},xe(a.value,o.value),Tt(a.value,o.value,null)}),qa(v,()=>{k(),Tt(a.value,o.value,G.value)});function He(){var xt;I=new am;let J=!1;const ee={progress:0};I.instance.on("onProgress",(Bt,Ce,We)=>{const $e=Math.floor(Ce/We*100);ka.to(ee,{progress:$e,onUpdate:()=>{A.value=Math.floor(ee.progress)}})});const Ue=()=>rn(this,null,function*(){var Bt,Ce;D||J||(J=!0,(Bt=r.value)==null||Bt.loadMap(I),yield Ct(),yield Qs(),(Ce=r.value)==null||Ce.play())});I.instance.on("onLoad",Ue),(xt=I.ready)==null||xt.then(Ue).catch(()=>{D||(M.value={type:"error",text:"地图资源加载失败"})})}function xe(Ue){return rn(this,arguments,function*(J,ee=o.value){const xt=`${J}:${ee||""}`,Bt=p.value[xt];if(Bt){Fe(Bt,J);return}const Ce=++P;u.value=!0,l.value="loading";const We=yield S5(J,ee);D||Ce!==P||J===a.value&&(ee||"")===(o.value||"")&&(p.value=tn(wt({},p.value),{[xt]:We}),Fe(We,J))})}function Fe(J,ee){var xt,Bt,Ce;const Ue=pt(J);s.value=Ue.core||[],c.value=Ue.left||{title:"业务统计",rows:[]},d.value=Ue.right||{title:"业务统计",rows:[]},h.value=(xt=Ue.leftPanels)!=null&&xt.length?Ue.leftPanels:[c.value],f.value=(Bt=Ue.rightPanels)!=null&&Bt.length?Ue.rightPanels:[d.value],l.value=Ue.status,u.value=!1,i("topic-stats",{topicKey:ee,topicName:XH(ee).name,items:((Ce=Ue.top)!=null&&Ce.length?Ue.top:Ue.core||[]).slice(0,4)})}function pt(J){return J||{}}function Ot(J,ee){return`${a.value}-${ee}-${(J==null?void 0:J.key)||(J==null?void 0:J.title)||"panel"}`}function bt(J){var Ue;const ee=((Ue=J==null?void 0:J.rows)==null?void 0:Ue.length)||0;return(J==null?void 0:J.span)===1?!1:(J==null?void 0:J.span)===2?!0:(J==null?void 0:J.type)==="spotlight"||(J==null?void 0:J.type)==="metric"||(J==null?void 0:J.type)==="column"&&ee<=5?!1:(J==null?void 0:J.type)==="rank"&&ee>4||(J==null?void 0:J.type)==="split"&&ee>4||(J==null?void 0:J.type)==="donut"&&ee>5||(J==null?void 0:J.type)==="structure"&&ee>4||(J==null?void 0:J.type)==="bar"&&ee>4||(J==null?void 0:J.type)==="line"&&ee>6}function ht(J){return bt(J)?K.value:Y.value}function Kt(J){var Bt;const ee=(J==null?void 0:J.properties)||{},Ue=Object.keys(ee).filter(Ce=>{const We=ee[Ce];if(We==null||We==="")return!1;const $e=Ce.toLowerCase();return!(["geom","wkt","geometry","the_geom","shape_leng","shape_length","length","perimeter"].includes($e)||["gid","id","objectid","object_id","fid","key_uid","bsm","ysdm"].includes($e))}),xt=!!((Bt=J==null?void 0:J.feature)!=null&&Bt.geometry||J!=null&&J.geometry);return Ue.length+(xt?1:0)}function Tt(xt,Bt){return rn(this,arguments,function*(J,ee,Ue=G.value){const Ce=++E;if(!ee||!Ae(ee,Ue)){m.value=Lt(J,ee);return}const We=yield oGe(J,ee,Ue);D||Ce!==E||J!==a.value||ee!==o.value||((Ue==null?void 0:Ue.key)||"")===v.value&&(m.value=We)})}function Ae(J,ee=null){return!!(ee!=null&&ee.key)||F.has(J)}function Lt(J,ee){return{status:"disabled",topicKey:J,layerKey:ee,title:"",unit:"",rows:[]}}function vt(J){var Ue,xt;const ee=(xt=(Ue=J==null?void 0:J.feature)!=null?Ue:J)!=null?xt:null;if(!ee){k();return}g.value=ee,_.value=!1,J!=null&&J.screen&&(x.value=J.screen)}function Ft(J){M.value=J}function k(){var J,ee;g.value=null,_.value=!1,x.value=null,(ee=(J=r.value)==null?void 0:J.clearSelectedFeature)==null||ee.call(J)}function _t(J){if(!ae.value)return;const ee=document.querySelector(".fgw-map-feature-info"),Ue=J.target;ee&&Ue instanceof Node&&ee.contains(Ue)||k()}function Ct(){return C.value?new Promise(J=>{ka.to(".forest-grass-wet .loading",{opacity:0,duration:.8,delay:.2,onComplete:()=>{C.value=!1,J()}})}):Promise.resolve()}return(J,ee)=>{var Ue;return Te(),Pe("div",vUe,[gn(rm,{ref_key:"mapSceneRef",ref:r,"active-layer":W.value,"map-ranking":m.value,onFeatureLoading:ee[0]||(ee[0]=xt=>S.value=xt),onFeatureInfo:vt,onLayerStatus:Ft},null,8,["active-layer","map-ranking"]),O("div",mUe,[O("div",gUe,[O("div",yUe,[(Te(!0),Pe(bn,null,Bn(h.value,xt=>(Te(),Uo(Mi,{key:Ot(xt,"left"),class:Xn(["fgw-side-card left-card",{"is-double":bt(xt)}]),title:xt.title,width:398,height:ht(xt)},{default:mi(()=>[gn(Cl,{panel:xt,compact:""},null,8,["panel"])]),_:2},1032,["class","title","height"]))),128))])]),O("div",_Ue,[O("div",SUe,[(Te(!0),Pe(bn,null,Bn(f.value,xt=>(Te(),Uo(Mi,{key:Ot(xt,"right"),class:Xn(["fgw-side-card right-card",{"is-double":bt(xt)}]),title:xt.title,width:398,height:ht(xt)},{default:mi(()=>[gn(Cl,{panel:xt,compact:""},null,8,["panel"])]),_:2},1032,["class","title","height"]))),128))])]),O("div",bUe,[gn(UR,{modelValue:o.value,"onUpdate:modelValue":ee[1]||(ee[1]=xt=>o.value=xt),"selected-legend-key":v.value,"onUpdate:selectedLegendKey":ee[2]||(ee[2]=xt=>v.value=xt),"topic-key":a.value,legends:((Ue=W.value)==null?void 0:Ue.legends)||[],width:248,height:430},null,8,["modelValue","selected-legend-key","topic-key","legends"])]),ae.value?(Te(),Pe("div",{key:0,class:"fgw-map-feature-info",style:Ji(he.value)},[gn(ete,{feature:g.value,empty:_.value,loading:S.value,width:460,height:ie.value},null,8,["feature","empty","loading","height"])],4)):Dn("",!0),O("div",xUe,[gn(y7,{modelValue:a.value,"onUpdate:modelValue":ee[3]||(ee[3]=xt=>a.value=xt)},null,8,["modelValue"])])]),C.value?(Te(),Pe("div",wUe,[ee[5]||(ee[5]=pp('<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)),O("div",TUe,[O("span",AUe,De(A.value),1),ee[4]||(ee[4]=O("span",{class:"unit"},"%",-1))])])):Dn("",!0)])}}};function MUe(n){n("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),n("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),n("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var e=1;e<=60;++e)n("EPSG:"+(32600+e),"+proj=utm +zone="+e+" +datum=WGS84 +units=m"),n("EPSG:"+(32700+e),"+proj=utm +zone="+e+" +south +datum=WGS84 +units=m");n("EPSG:5041","+title=WGS 84 / UPS North (E,N) +proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),n("EPSG:5042","+title=WGS 84 / UPS South (E,N) +proj=stere +lat_0=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),n.WGS84=n["EPSG:4326"],n["EPSG:3785"]=n["EPSG:3857"],n.GOOGLE=n["EPSG:3857"],n["EPSG:900913"]=n["EPSG:3857"],n["EPSG:102113"]=n["EPSG:3857"]}var qp=1,Xp=2,nv=3,EUe=4,fM=5,yW=6378137,PUe=6356752314e-3,_W=.0066943799901413165,l9=484813681109536e-20,yn=Math.PI/2,RUe=.16666666666666666,LUe=.04722222222222222,IUe=.022156084656084655,Rn=1e-10,Da=.017453292519943295,Zs=57.29577951308232,Fr=Math.PI/4,c3=Math.PI*2,Wa=3.14159265359,fl={};fl.greenwich=0;fl.lisbon=-9.131906111111;fl.paris=2.337229166667;fl.bogota=-74.080916666667;fl.madrid=-3.687938888889;fl.rome=12.452333333333;fl.bern=7.439583333333;fl.jakarta=106.807719444444;fl.ferro=-17.666666666667;fl.brussels=4.367975;fl.stockholm=18.058277777778;fl.athens=23.7163375;fl.oslo=10.722916666667;const DUe={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var SW=/[\s_\-\/\(\)]/g;function Fh(n,e){if(n[e])return n[e];for(var t=Object.keys(n),i=e.toLowerCase().replace(SW,""),r=-1,a,o;++r<t.length;)if(a=t[r],o=a.toLowerCase().replace(SW,""),o===i)return n[a]}function pM(n){var e={},t=n.split("+").map(function(s){return s.trim()}).filter(function(s){return s}).reduce(function(s,l){var u=l.split("=");return u.push(!0),s[u[0].toLowerCase()]=u[1],s},{}),i,r,a,o={proj:"projName",datum:"datumCode",rf:function(s){e.rf=parseFloat(s)},lat_0:function(s){e.lat0=s*Da},lat_1:function(s){e.lat1=s*Da},lat_2:function(s){e.lat2=s*Da},lat_ts:function(s){e.lat_ts=s*Da},lon_0:function(s){e.long0=s*Da},lon_1:function(s){e.long1=s*Da},lon_2:function(s){e.long2=s*Da},alpha:function(s){e.alpha=parseFloat(s)*Da},gamma:function(s){e.rectified_grid_angle=parseFloat(s)*Da},lonc:function(s){e.longc=s*Da},x_0:function(s){e.x0=parseFloat(s)},y_0:function(s){e.y0=parseFloat(s)},k_0:function(s){e.k0=parseFloat(s)},k:function(s){e.k0=parseFloat(s)},a:function(s){e.a=parseFloat(s)},b:function(s){e.b=parseFloat(s)},r:function(s){e.a=e.b=parseFloat(s)},r_a:function(){e.R_A=!0},zone:function(s){e.zone=parseInt(s,10)},south:function(){e.utmSouth=!0},towgs84:function(s){e.datum_params=s.split(",").map(function(l){return parseFloat(l)})},to_meter:function(s){e.to_meter=parseFloat(s)},units:function(s){e.units=s;var l=Fh(DUe,s);l&&(e.to_meter=l.to_meter)},from_greenwich:function(s){e.from_greenwich=s*Da},pm:function(s){var l=Fh(fl,s);e.from_greenwich=(l||parseFloat(s))*Da},nadgrids:function(s){s==="@null"?e.datumCode="none":e.nadgrids=s},axis:function(s){var l="ewnsud";s.length===3&&l.indexOf(s.substr(0,1))!==-1&&l.indexOf(s.substr(1,1))!==-1&&l.indexOf(s.substr(2,1))!==-1&&(e.axis=s)},approx:function(){e.approx=!0},over:function(){e.over=!0}};for(i in t)r=t[i],i in o?(a=o[i],typeof a=="function"?a(r):e[a]=r):e[i]=r;return typeof e.datumCode=="string"&&e.datumCode!=="WGS84"&&(e.datumCode=e.datumCode.toLowerCase()),e.projStr=n,e}class tte{static getId(e){const t=e.find(i=>Array.isArray(i)&&i[0]==="ID");return t&&t.length>=3?{authority:t[1],code:parseInt(t[2],10)}:null}static convertUnit(e,t="unit"){if(!e||e.length<3)return{type:t,name:"unknown",conversion_factor:null};const i=e[1],r=parseFloat(e[2])||null,a=e.find(s=>Array.isArray(s)&&s[0]==="ID"),o=a?{authority:a[1],code:parseInt(a[2],10)}:null;return{type:t,name:i,conversion_factor:r,id:o}}static convertAxis(e){const t=e[1]||"Unknown";let i;const r=t.match(/^\((.)\)$/);if(r){const u=r[1].toUpperCase();if(u==="E")i="east";else if(u==="N")i="north";else if(u==="U")i="up";else if(e[2])i=e[2];else throw new Error(`Unknown axis abbreviation: ${u}`)}else i=e[2]||"unknown";const a=e.find(u=>Array.isArray(u)&&u[0]==="ORDER"),o=a?parseInt(a[1],10):null,s=e.find(u=>Array.isArray(u)&&(u[0]==="LENGTHUNIT"||u[0]==="ANGLEUNIT"||u[0]==="SCALEUNIT")),l=this.convertUnit(s);return{name:t,direction:i,unit:l,order:o}}static extractAxes(e){return e.filter(t=>Array.isArray(t)&&t[0]==="AXIS").map(t=>this.convertAxis(t)).sort((t,i)=>(t.order||0)-(i.order||0))}static convert(e,t={}){switch(e[0]){case"PROJCRS":t.type="ProjectedCRS",t.name=e[1],t.base_crs=e.find(h=>Array.isArray(h)&&h[0]==="BASEGEOGCRS")?this.convert(e.find(h=>Array.isArray(h)&&h[0]==="BASEGEOGCRS")):null,t.conversion=e.find(h=>Array.isArray(h)&&h[0]==="CONVERSION")?this.convert(e.find(h=>Array.isArray(h)&&h[0]==="CONVERSION")):null;const i=e.find(h=>Array.isArray(h)&&h[0]==="CS");i&&(t.coordinate_system={type:i[1],axis:this.extractAxes(e)});const r=e.find(h=>Array.isArray(h)&&h[0]==="LENGTHUNIT");if(r){const h=this.convertUnit(r);t.coordinate_system.unit=h}t.id=this.getId(e);break;case"BASEGEOGCRS":case"GEOGCRS":case"GEODCRS":t.type=e[0]==="GEODCRS"?"GeodeticCRS":"GeographicCRS",t.name=e[1];const a=e.find(h=>Array.isArray(h)&&(h[0]==="DATUM"||h[0]==="ENSEMBLE"));if(a){const h=this.convert(a);a[0]==="ENSEMBLE"?t.datum_ensemble=h:t.datum=h;const f=e.find(p=>Array.isArray(p)&&p[0]==="PRIMEM");f&&f[1]!=="Greenwich"&&(h.prime_meridian={name:f[1],longitude:parseFloat(f[2])})}t.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(e)},t.id=this.getId(e);break;case"DATUM":t.type="GeodeticReferenceFrame",t.name=e[1],t.ellipsoid=e.find(h=>Array.isArray(h)&&h[0]==="ELLIPSOID")?this.convert(e.find(h=>Array.isArray(h)&&h[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":t.type="DatumEnsemble",t.name=e[1],t.members=e.filter(h=>Array.isArray(h)&&h[0]==="MEMBER").map(h=>({type:"DatumEnsembleMember",name:h[1],id:this.getId(h)}));const o=e.find(h=>Array.isArray(h)&&h[0]==="ENSEMBLEACCURACY");o&&(t.accuracy=parseFloat(o[1]));const s=e.find(h=>Array.isArray(h)&&h[0]==="ELLIPSOID");s&&(t.ellipsoid=this.convert(s)),t.id=this.getId(e);break;case"ELLIPSOID":t.type="Ellipsoid",t.name=e[1],t.semi_major_axis=parseFloat(e[2]),t.inverse_flattening=parseFloat(e[3]),e.find(h=>Array.isArray(h)&&h[0]==="LENGTHUNIT")&&this.convert(e.find(h=>Array.isArray(h)&&h[0]==="LENGTHUNIT"),t);break;case"CONVERSION":t.type="Conversion",t.name=e[1],t.method=e.find(h=>Array.isArray(h)&&h[0]==="METHOD")?this.convert(e.find(h=>Array.isArray(h)&&h[0]==="METHOD")):null,t.parameters=e.filter(h=>Array.isArray(h)&&h[0]==="PARAMETER").map(h=>this.convert(h));break;case"METHOD":t.type="Method",t.name=e[1],t.id=this.getId(e);break;case"PARAMETER":t.type="Parameter",t.name=e[1],t.value=parseFloat(e[2]),t.unit=this.convertUnit(e.find(h=>Array.isArray(h)&&(h[0]==="LENGTHUNIT"||h[0]==="ANGLEUNIT"||h[0]==="SCALEUNIT"))),t.id=this.getId(e);break;case"BOUNDCRS":t.type="BoundCRS";const l=e.find(h=>Array.isArray(h)&&h[0]==="SOURCECRS");if(l){const h=l.find(f=>Array.isArray(f));t.source_crs=h?this.convert(h):null}const u=e.find(h=>Array.isArray(h)&&h[0]==="TARGETCRS");if(u){const h=u.find(f=>Array.isArray(f));t.target_crs=h?this.convert(h):null}const c=e.find(h=>Array.isArray(h)&&h[0]==="ABRIDGEDTRANSFORMATION");c?t.transformation=this.convert(c):t.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(t.type="Transformation",t.name=e[1],t.method=e.find(h=>Array.isArray(h)&&h[0]==="METHOD")?this.convert(e.find(h=>Array.isArray(h)&&h[0]==="METHOD")):null,t.parameters=e.filter(h=>Array.isArray(h)&&(h[0]==="PARAMETER"||h[0]==="PARAMETERFILE")).map(h=>{if(h[0]==="PARAMETER")return this.convert(h);if(h[0]==="PARAMETERFILE")return{name:h[1],value:h[2],id:{authority:"EPSG",code:8656}}}),t.parameters.length===7){const h=t.parameters[6];h.name==="Scale difference"&&(h.value=Math.round((h.value-1)*1e12)/1e6)}t.id=this.getId(e);break;case"AXIS":t.coordinate_system||(t.coordinate_system={type:"unspecified",axis:[]}),t.coordinate_system.axis.push(this.convertAxis(e));break;case"LENGTHUNIT":const d=this.convertUnit(e,"LinearUnit");t.coordinate_system&&t.coordinate_system.axis&&t.coordinate_system.axis.forEach(h=>{h.unit||(h.unit=d)}),d.conversion_factor&&d.conversion_factor!==1&&t.semi_major_axis&&(t.semi_major_axis={value:t.semi_major_axis,unit:d});break;default:t.keyword=e[0];break}return t}}class NUe extends tte{static convert(e,t={}){return super.convert(e,t),t.coordinate_system&&t.coordinate_system.subtype==="Cartesian"&&delete t.coordinate_system,t.usage&&delete t.usage,t}}class kUe extends tte{static convert(e,t={}){super.convert(e,t);const i=e.find(a=>Array.isArray(a)&&a[0]==="CS");i&&(t.coordinate_system={subtype:i[1],axis:this.extractAxes(e)});const r=e.find(a=>Array.isArray(a)&&a[0]==="USAGE");if(r){const a=r.find(l=>Array.isArray(l)&&l[0]==="SCOPE"),o=r.find(l=>Array.isArray(l)&&l[0]==="AREA"),s=r.find(l=>Array.isArray(l)&&l[0]==="BBOX");t.usage={},a&&(t.usage.scope=a[1]),o&&(t.usage.area=o[1]),s&&(t.usage.bbox=s.slice(1))}return t}}function FUe(n){return n.find(e=>Array.isArray(e)&&e[0]==="USAGE")?"2019":(n.find(e=>Array.isArray(e)&&e[0]==="CS")||n[0]==="BOUNDCRS"||n[0]==="PROJCRS"||n[0]==="GEOGCRS","2015")}function OUe(n){return(FUe(n)==="2019"?kUe:NUe).convert(n)}function BUe(n){const e=n.toUpperCase();return e.includes("PROJCRS")||e.includes("GEOGCRS")||e.includes("BOUNDCRS")||e.includes("VERTCRS")||e.includes("LENGTHUNIT")||e.includes("ANGLEUNIT")||e.includes("SCALEUNIT")?"WKT2":(e.includes("PROJCS")||e.includes("GEOGCS")||e.includes("LOCAL_CS")||e.includes("VERT_CS")||e.includes("UNIT"),"WKT1")}var d3=1,nte=2,ite=3,Z8=4,rte=5,VR=-1,zUe=/\s/,GUe=/[A-Za-z]/,UUe=/[A-Za-z84_]/,_7=/[,\]]/,ate=/[\d\.E\-\+]/;function ad(n){if(typeof n!="string")throw new Error("not a string");this.text=n.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=d3}ad.prototype.readCharicter=function(){var n=this.text[this.place++];if(this.state!==Z8)for(;zUe.test(n);){if(this.place>=this.text.length)return;n=this.text[this.place++]}switch(this.state){case d3:return this.neutral(n);case nte:return this.keyword(n);case Z8:return this.quoted(n);case rte:return this.afterquote(n);case ite:return this.number(n);case VR:return}};ad.prototype.afterquote=function(n){if(n==='"'){this.word+='"',this.state=Z8;return}if(_7.test(n)){this.word=this.word.trim(),this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in afterquote yet, index '+this.place)};ad.prototype.afterItem=function(n){if(n===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=d3;return}if(n==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=d3,this.currentObject=this.stack.pop(),this.currentObject||(this.state=VR);return}};ad.prototype.number=function(n){if(ate.test(n)){this.word+=n;return}if(_7.test(n)){this.word=parseFloat(this.word),this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in number yet, index '+this.place)};ad.prototype.quoted=function(n){if(n==='"'){this.state=rte;return}this.word+=n};ad.prototype.keyword=function(n){if(UUe.test(n)){this.word+=n;return}if(n==="["){var e=[];e.push(this.word),this.level++,this.root===null?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,this.state=d3;return}if(_7.test(n)){this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in keyword yet, index '+this.place)};ad.prototype.neutral=function(n){if(GUe.test(n)){this.word=n,this.state=nte;return}if(n==='"'){this.word="",this.state=Z8;return}if(ate.test(n)){this.word=n,this.state=ite;return}if(_7.test(n)){this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in neutral yet, index '+this.place)};ad.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===VR)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function VUe(n){var e=new ad(n);return e.output()}function bT(n,e,t){Array.isArray(e)&&(t.unshift(e),e=null);var i=e?{}:n,r=t.reduce(function(a,o){return B2(o,a),a},i);e&&(n[e]=r)}function B2(n,e){if(!Array.isArray(n)){e[n]=!0;return}var t=n.shift();if(t==="PARAMETER"&&(t=n.shift()),n.length===1){if(Array.isArray(n[0])){e[t]={},B2(n[0],e[t]);return}e[t]=n[0];return}if(!n.length){e[t]=!0;return}if(t==="TOWGS84"){e[t]=n;return}if(t==="AXIS"){t in e||(e[t]=[]),e[t].push(n);return}Array.isArray(t)||(e[t]={});var i;switch(t){case"UNIT":case"PRIMEM":case"VERT_DATUM":e[t]={name:n[0].toLowerCase(),convert:n[1]},n.length===3&&B2(n[2],e[t]);return;case"SPHEROID":case"ELLIPSOID":e[t]={name:n[0],a:n[1],rf:n[2]},n.length===4&&B2(n[3],e[t]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":n[0]=["name",n[0]],bT(e,t,n);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":n[0]=["name",n[0]],bT(e,t,n),e[t].type=t;return;default:for(i=-1;++i<n.length;)if(!Array.isArray(n[i]))return B2(n,e[t]);return bT(e,t,n)}}var HUe=.017453292519943295;function i0(n){return n*HUe}function ote(n){const e=(n.projName||"").toLowerCase().replace(/_/g," ");n.long0===void 0&&n.longc!==void 0&&(n.long0=n.longc),!n.lat_ts&&n.lat1&&(e==="stereographic south pole"||e==="polar stereographic (variant b)")?(n.lat0=i0(n.lat1>0?90:-90),n.lat_ts=n.lat1,delete n.lat1):!n.lat_ts&&n.lat0&&(e==="polar stereographic"||e==="polar stereographic (variant a)")&&(n.lat_ts=n.lat0,n.lat0=i0(n.lat0>0?90:-90),delete n.lat1)}function bW(n){let e={units:null,to_meter:void 0};return typeof n=="string"?(e.units=n.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.units==="meter"&&(e.to_meter=1)):n&&n.name&&(e.units=n.name.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.to_meter=n.conversion_factor),e}function xW(n){return typeof n=="object"?n.value*n.unit.conversion_factor:n}function wW(n,e){n.ellipsoid.radius?(e.a=n.ellipsoid.radius,e.rf=0):(e.a=xW(n.ellipsoid.semi_major_axis),n.ellipsoid.inverse_flattening!==void 0?e.rf=n.ellipsoid.inverse_flattening:n.ellipsoid.semi_major_axis!==void 0&&n.ellipsoid.semi_minor_axis!==void 0&&(e.rf=e.a/(e.a-xW(n.ellipsoid.semi_minor_axis))))}function J8(n,e={}){return!n||typeof n!="object"?n:n.type==="BoundCRS"?(J8(n.source_crs,e),n.transformation&&(n.transformation.method&&n.transformation.method.name==="NTv2"?e.nadgrids=n.transformation.parameters[0].value:e.datum_params=n.transformation.parameters.map(t=>t.value)),e):(Object.keys(n).forEach(t=>{const i=n[t];if(i!==null)switch(t){case"name":if(e.srsCode)break;e.name=i,e.srsCode=i;break;case"type":i==="GeographicCRS"?e.projName="longlat":i==="GeodeticCRS"?n.coordinate_system&&n.coordinate_system.subtype==="Cartesian"?e.projName="geocent":e.projName="longlat":i==="ProjectedCRS"&&n.conversion&&n.conversion.method&&(e.projName=n.conversion.method.name);break;case"datum":case"datum_ensemble":i.ellipsoid&&(e.ellps=i.ellipsoid.name,wW(i,e)),i.prime_meridian&&(e.from_greenwich=i.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":e.ellps=i.name,wW(i,e);break;case"prime_meridian":e.long0=(i.longitude||0)*Math.PI/180;break;case"coordinate_system":if(i.axis){const r={east:"e",north:"n",west:"w",south:"s",up:"u",down:"d",geocentricx:"e",geocentricy:"n",geocentricz:"u"},a=i.axis.map(o=>r[o.direction.toLowerCase()]);if(a.every(Boolean)&&(e.axis=a.join(""),e.axis.length===2&&(e.axis+="u")),i.unit){const{units:o,to_meter:s}=bW(i.unit);e.units=o,e.to_meter=s}else if(i.axis[0]&&i.axis[0].unit){const{units:o,to_meter:s}=bW(i.axis[0].unit);e.units=o,e.to_meter=s}}break;case"id":i.authority&&i.code&&(e.title=i.authority+":"+i.code);break;case"conversion":i.method&&i.method.name&&(e.projName=i.method.name),i.parameters&&i.parameters.forEach(r=>{const a=r.name.toLowerCase().replace(/\s+/g,"_"),o=r.value;r.unit&&r.unit.conversion_factor?e[a]=o*r.unit.conversion_factor:r.unit==="degree"?e[a]=o*Math.PI/180:e[a]=o});break;case"unit":i.name&&(e.units=i.name.toLowerCase(),e.units==="metre"&&(e.units="meter")),i.conversion_factor&&(e.to_meter=i.conversion_factor);break;case"base_crs":J8(i,e),e.datumCode=i.id?i.id.authority+"_"+i.id.code:i.name;break}}),e.latitude_of_false_origin!==void 0&&(e.lat0=e.latitude_of_false_origin),e.longitude_of_false_origin!==void 0&&(e.long0=e.longitude_of_false_origin),e.latitude_of_standard_parallel!==void 0&&(e.lat0=e.latitude_of_standard_parallel,e.lat1=e.latitude_of_standard_parallel),e.latitude_of_1st_standard_parallel!==void 0&&(e.lat1=e.latitude_of_1st_standard_parallel),e.latitude_of_2nd_standard_parallel!==void 0&&(e.lat2=e.latitude_of_2nd_standard_parallel),e.latitude_of_projection_centre!==void 0&&(e.lat0=e.latitude_of_projection_centre),e.longitude_of_projection_centre!==void 0&&(e.longc=e.longitude_of_projection_centre),e.easting_at_false_origin!==void 0&&(e.x0=e.easting_at_false_origin),e.northing_at_false_origin!==void 0&&(e.y0=e.northing_at_false_origin),e.latitude_of_natural_origin!==void 0&&(e.lat0=e.latitude_of_natural_origin),e.longitude_of_natural_origin!==void 0&&(e.long0=e.longitude_of_natural_origin),e.longitude_of_origin!==void 0&&(e.long0=e.longitude_of_origin),e.false_easting!==void 0&&(e.x0=e.false_easting),e.easting_at_projection_centre&&(e.x0=e.easting_at_projection_centre),e.false_northing!==void 0&&(e.y0=e.false_northing),e.northing_at_projection_centre&&(e.y0=e.northing_at_projection_centre),e.standard_parallel_1!==void 0&&(e.lat1=e.standard_parallel_1),e.standard_parallel_2!==void 0&&(e.lat2=e.standard_parallel_2),e.scale_factor_at_natural_origin!==void 0&&(e.k0=e.scale_factor_at_natural_origin),e.scale_factor_at_projection_centre!==void 0&&(e.k0=e.scale_factor_at_projection_centre),e.scale_factor_on_pseudo_standard_parallel!==void 0&&(e.k0=e.scale_factor_on_pseudo_standard_parallel),e.azimuth!==void 0&&(e.alpha=e.azimuth),e.azimuth_at_projection_centre!==void 0&&(e.alpha=e.azimuth_at_projection_centre),e.angle_from_rectified_to_skew_grid&&(e.rectified_grid_angle=e.angle_from_rectified_to_skew_grid),ote(e),e)}var WUe=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function jUe(n,e){var t=e[0],i=e[1];!(t in n)&&i in n&&(n[t]=n[i],e.length===3&&(n[t]=e[2](n[t])))}function ste(n){for(var e=Object.keys(n),t=0,i=e.length;t<i;++t){var r=e[t];WUe.indexOf(r)!==-1&&$Ue(n[r]),typeof n[r]=="object"&&ste(n[r])}}function $Ue(n){if(n.AUTHORITY){var e=Object.keys(n.AUTHORITY)[0];e&&e in n.AUTHORITY&&(n.title=e+":"+n.AUTHORITY[e])}if(n.type==="GEOGCS"?n.projName="longlat":n.type==="LOCAL_CS"?(n.projName="identity",n.local=!0):typeof n.PROJECTION=="object"?n.projName=Object.keys(n.PROJECTION)[0]:n.projName=n.PROJECTION,n.AXIS){for(var t="",i=0,r=n.AXIS.length;i<r;++i){var a=[n.AXIS[i][0].toLowerCase(),n.AXIS[i][1].toLowerCase()];a[0].indexOf("north")!==-1||(a[0]==="y"||a[0]==="lat")&&a[1]==="north"?t+="n":a[0].indexOf("south")!==-1||(a[0]==="y"||a[0]==="lat")&&a[1]==="south"?t+="s":a[0].indexOf("east")!==-1||(a[0]==="x"||a[0]==="lon")&&a[1]==="east"?t+="e":(a[0].indexOf("west")!==-1||(a[0]==="x"||a[0]==="lon")&&a[1]==="west")&&(t+="w")}t.length===2&&(t+="u"),t.length===3&&(n.axis=t)}n.UNIT&&(n.units=n.UNIT.name.toLowerCase(),n.units==="metre"&&(n.units="meter"),n.UNIT.convert&&(n.type==="GEOGCS"?n.DATUM&&n.DATUM.SPHEROID&&(n.to_meter=n.UNIT.convert*n.DATUM.SPHEROID.a):n.to_meter=n.UNIT.convert));var o=n.GEOGCS;n.type==="GEOGCS"&&(o=n),o&&(o.PRIMEM&&o.PRIMEM.convert&&(n.from_greenwich=i0(o.PRIMEM.convert)),o.DATUM?n.datumCode=o.DATUM.name.toLowerCase():n.datumCode=o.name.toLowerCase(),n.datumCode.slice(0,2)==="d_"&&(n.datumCode=n.datumCode.slice(2)),n.datumCode==="new_zealand_1949"&&(n.datumCode="nzgd49"),(n.datumCode==="wgs_1984"||n.datumCode==="world_geodetic_system_1984")&&(n.PROJECTION==="Mercator_Auxiliary_Sphere"&&(n.sphere=!0),n.datumCode="wgs84"),n.datumCode==="belge_1972"&&(n.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(n.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),n.ellps.toLowerCase().slice(0,13)==="international"&&(n.ellps="intl"),n.a=o.DATUM.SPHEROID.a,n.rf=parseFloat(o.DATUM.SPHEROID.rf)),o.DATUM&&o.DATUM.TOWGS84&&(n.datum_params=o.DATUM.TOWGS84),~n.datumCode.indexOf("osgb_1936")&&(n.datumCode="osgb36"),~n.datumCode.indexOf("osni_1952")&&(n.datumCode="osni52"),(~n.datumCode.indexOf("tm65")||~n.datumCode.indexOf("geodetic_datum_of_1965"))&&(n.datumCode="ire65"),n.datumCode==="ch1903+"&&(n.datumCode="ch1903"),~n.datumCode.indexOf("israel")&&(n.datumCode="isr93")),n.b&&!isFinite(n.b)&&(n.b=n.a),n.rectified_grid_angle&&(n.rectified_grid_angle=i0(n.rectified_grid_angle));function s(c){var d=n.to_meter||1;return c*d}var l=function(c){return jUe(n,c)},u=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",i0],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",i0],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",i0],["lat0","latitude_of_origin",i0],["lat0","standard_parallel_1",i0],["lat1","standard_parallel_1",i0],["lat2","standard_parallel_2",i0],["azimuth","Azimuth"],["alpha","azimuth",i0],["srsCode","name"]];u.forEach(l),ote(n)}function Q8(n){if(typeof n=="object")return J8(n);const e=BUe(n);var t=VUe(n);if(e==="WKT2"){const a=OUe(t);return J8(a)}var i=t[0],r={};return B2(t,r),ste(r),r[i]}function zo(n){var e=this;if(arguments.length===2){var t=arguments[1];typeof t=="string"?t.charAt(0)==="+"?zo[n]=pM(arguments[1]):zo[n]=Q8(arguments[1]):t&&typeof t=="object"&&!("projName"in t)?zo[n]=Q8(arguments[1]):(zo[n]=t,t||delete zo[n])}else if(arguments.length===1){if(Array.isArray(n))return n.map(function(i){return Array.isArray(i)?zo.apply(e,i):zo(i)});if(typeof n=="string"){if(n in zo)return zo[n]}else"EPSG"in n?zo["EPSG:"+n.EPSG]=n:"ESRI"in n?zo["ESRI:"+n.ESRI]=n:"IAU2000"in n?zo["IAU2000:"+n.IAU2000]=n:console.log(n);return}}MUe(zo);function qUe(n){return typeof n=="string"}function XUe(n){return n in zo}function YUe(n){return n.indexOf("+")!==0&&n.indexOf("[")!==-1||typeof n=="object"&&!("srsCode"in n)}var TW=["3857","900913","3785","102113"];function KUe(n){if(n.title)return n.title.toLowerCase().indexOf("epsg:")===0&&TW.indexOf(n.title.substr(5))>-1;var e=Fh(n,"authority");if(e){var t=Fh(e,"epsg");return t&&TW.indexOf(t)>-1}}function ZUe(n){var e=Fh(n,"extension");if(e)return Fh(e,"proj4")}function JUe(n){return n[0]==="+"}function QUe(n){let e;if(qUe(n))if(XUe(n))e=zo[n];else if(YUe(n)){e=Q8(n);var t=ZUe(e);t&&(e=pM(t))}else JUe(n)&&(e=pM(n));else"projName"in n?e=n:e=Q8(n);return e&&KUe(e)?zo["EPSG:3857"]:e}function AW(n,e){n=n||{};var t,i;if(!e)return n;for(i in e)t=e[i],t!==void 0&&(n[i]=t);return n}function ec(n,e,t){var i=n*e;return t/Math.sqrt(1-i*i)}function G3(n){return n<0?-1:1}function kn(n,e){return e||Math.abs(n)<=Wa?n:n-G3(n)*c3}function tu(n,e,t){var i=n*t,r=.5*n;return i=Math.pow((1-i)/(1+i),r),Math.tan(.5*(yn-e))/i}function h3(n,e){for(var t=.5*n,i,r,a=yn-2*Math.atan(e),o=0;o<=15;o++)if(i=n*Math.sin(a),r=yn-2*Math.atan(e*Math.pow((1-i)/(1+i),t))-a,a+=r,Math.abs(r)<=1e-10)return a;return-9999}function eVe(){var n=this.b/this.a;this.es=1-n*n,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=ec(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function tVe(n){var e=n.x,t=n.y;if(t*Zs>90&&t*Zs<-90&&e*Zs>180&&e*Zs<-180)return null;var i,r;if(Math.abs(Math.abs(t)-yn)<=Rn)return null;if(this.sphere)i=this.x0+this.a*this.k0*kn(e-this.long0,this.over),r=this.y0+this.a*this.k0*Math.log(Math.tan(Fr+.5*t));else{var a=Math.sin(t),o=tu(this.e,t,a);i=this.x0+this.a*this.k0*kn(e-this.long0,this.over),r=this.y0-this.a*this.k0*Math.log(o)}return n.x=i,n.y=r,n}function nVe(n){var e=n.x-this.x0,t=n.y-this.y0,i,r;if(this.sphere)r=yn-2*Math.atan(Math.exp(-t/(this.a*this.k0)));else{var a=Math.exp(-t/(this.a*this.k0));if(r=h3(this.e,a),r===-9999)return null}return i=kn(this.long0+e/(this.a*this.k0),this.over),n.x=i,n.y=r,n}var iVe=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];const rVe={init:eVe,forward:tVe,inverse:nVe,names:iVe};function aVe(){}function CW(n){return n}var lte=["longlat","identity"];const oVe={init:aVe,forward:CW,inverse:CW,names:lte};var sVe=[rVe,oVe],Xf={},z2=[];function ute(n,e){var t=z2.length;return n.names?(z2[t]=n,n.names.forEach(function(i){Xf[i.toLowerCase()]=t}),this):(console.log(e),!0)}function cte(n){return n.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function lVe(n){if(!n)return!1;var e=n.toLowerCase();if(typeof Xf[e]!="undefined"&&z2[Xf[e]]||(e=cte(e),e in Xf&&z2[Xf[e]]))return z2[Xf[e]]}function uVe(){sVe.forEach(ute)}const cVe={start:uVe,add:ute,get:lVe};var dte={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},andrae:{a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},clrk80:{a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const dVe=dte.WGS84;function hVe(n,e,t,i){var r=n*n,a=e*e,o=(r-a)/r,s=0;i?(n*=1-o*(RUe+o*(LUe+o*IUe)),r=n*n,o=0):s=Math.sqrt(o);var l=(r-a)/a;return{es:o,e:s,ep2:l}}function fVe(n,e,t,i,r){if(!n){var a=Fh(dte,i);a||(a=dVe),n=a.a,e=a.b,t=a.rf}return t&&!e&&(e=(1-1/t)*n),(t===0||Math.abs(n-e)<Rn)&&(r=!0,e=n),{a:n,b:e,rf:t,sphere:r}}var b5={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.005693,-0.044698,0.044285,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-0.395026,0.330772,-1.876073,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243648,-1.158828,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,6.681627,-31.611492,-19.848161,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-0.008393,0.000749,-0.010276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,0.02579,0.00965,0.01166,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"0.06155,-0.01087,-0.04019,0.039492,0.032722,0.032898,-0.009994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.309248,0.324822,0.497299,5.689063"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"372.87,149.23,585.29"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"},EPSG_10328:{towgs84:"0,0,0"},EPSG_9782:{towgs84:"0,0,0"},EPSG_9777:{towgs84:"0,0,0"},EPSG_10690:{towgs84:"0,0,0"},EPSG_10639:{towgs84:"0,0,0"},EPSG_10739:{towgs84:"0,0,0"},EPSG_7686:{towgs84:"0,0,0"},EPSG_8900:{towgs84:"0,0,0"},EPSG_5886:{towgs84:"0,0,0"},EPSG_7683:{towgs84:"0,0,0"},EPSG_6668:{towgs84:"0,0,0"},EPSG_20046:{towgs84:"0,0,0"},EPSG_10299:{towgs84:"0,0,0"},EPSG_10310:{towgs84:"0,0,0"},EPSG_10475:{towgs84:"0,0,0"},EPSG_4742:{towgs84:"0,0,0"},EPSG_10671:{towgs84:"0,0,0"},EPSG_10762:{towgs84:"0,0,0"},EPSG_10725:{towgs84:"0,0,0"},EPSG_10791:{towgs84:"0,0,0"},EPSG_10800:{towgs84:"0,0,0"},EPSG_10305:{towgs84:"0,0,0"},EPSG_10941:{towgs84:"0,0,0"},EPSG_10968:{towgs84:"0,0,0"},EPSG_10875:{towgs84:"0,0,0"},EPSG_6318:{towgs84:"0,0,0"},EPSG_10910:{towgs84:"0,0,0"}};for(var pVe in b5){var xT=b5[pVe];xT.datumName&&(b5[xT.datumName]=xT)}function vVe(n,e,t,i,r,a,o){var s={};return s.datum_type=fM,e&&(s.datum_type=EUe,s.datum_params=e.map(parseFloat),(s.datum_params[0]!==0||s.datum_params[1]!==0||s.datum_params[2]!==0)&&(s.datum_type=qp),s.datum_params.length>3&&(s.datum_params[3]!==0||s.datum_params[4]!==0||s.datum_params[5]!==0||s.datum_params[6]!==0)&&(s.datum_type=Xp,s.datum_params[3]*=l9,s.datum_params[4]*=l9,s.datum_params[5]*=l9,s.datum_params[6]=s.datum_params[6]/1e6+1)),o&&(s.datum_type=nv,s.grids=o),s.a=t,s.b=i,s.es=r,s.ep2=a,s}var HR={};function mVe(n,e,t){return e instanceof ArrayBuffer?gVe(n,e,t):{ready:yVe(n,e)}}function gVe(n,e,t){var i=!0;t!==void 0&&t.includeErrorFields===!1&&(i=!1);var r=new DataView(e),a=bVe(r),o=xVe(r,a),s=wVe(r,o,a,i),l={header:o,subgrids:s};return HR[n]=l,l}function yVe(n,e){return rn(this,null,function*(){for(var t=[],i=yield e.getImageCount(),r=i-1;r>=0;r--){var a=yield e.getImage(r),o=yield a.readRasters(),s=o,l=[a.getWidth(),a.getHeight()],u=a.getBoundingBox().map(MW),c=typeof a.fileDirectory.getValue=="function"?a.fileDirectory.getValue("ModelPixelScale"):a.fileDirectory.ModelPixelScale,d=[c[0],c[1]].map(MW),h=u[0]+(l[0]-1)*d[0],f=u[3]-(l[1]-1)*d[1],p=s[0],m=s[1],v=[];for(let S=l[1]-1;S>=0;S--)for(let x=l[0]-1;x>=0;x--){var g=S*l[0]+x;v.push([-dh(m[g]),dh(p[g])])}t.push({del:d,lim:l,ll:[-h,f],cvs:v})}var _={header:{nSubgrids:i},subgrids:t};return HR[n]=_,_})}function _Ve(n){if(n===void 0)return null;var e=n.split(",");return e.map(SVe)}function SVe(n){if(n.length===0)return null;var e=n[0]==="@";return e&&(n=n.slice(1)),n==="null"?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:n,mandatory:!e,grid:HR[n]||null,isNull:!1}}function MW(n){return n*Math.PI/180}function dh(n){return n/3600*Math.PI/180}function bVe(n){var e=n.getInt32(8,!1);return e===11?!1:(e=n.getInt32(8,!0),e!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function xVe(n,e){return{nFields:n.getInt32(8,e),nSubgridFields:n.getInt32(24,e),nSubgrids:n.getInt32(40,e),shiftType:vM(n,56,56+8).trim(),fromSemiMajorAxis:n.getFloat64(120,e),fromSemiMinorAxis:n.getFloat64(136,e),toSemiMajorAxis:n.getFloat64(152,e),toSemiMinorAxis:n.getFloat64(168,e)}}function vM(n,e,t){return String.fromCharCode.apply(null,new Uint8Array(n.buffer.slice(e,t)))}function wVe(n,e,t,i){for(var r=176,a=[],o=0;o<e.nSubgrids;o++){var s=AVe(n,r,t),l=CVe(n,r,s,t,i),u=Math.round(1+(s.upperLongitude-s.lowerLongitude)/s.longitudeInterval),c=Math.round(1+(s.upperLatitude-s.lowerLatitude)/s.latitudeInterval);a.push({ll:[dh(s.lowerLongitude),dh(s.lowerLatitude)],del:[dh(s.longitudeInterval),dh(s.latitudeInterval)],lim:[u,c],count:s.gridNodeCount,cvs:TVe(l)});var d=16;i===!1&&(d=8),r+=176+s.gridNodeCount*d}return a}function TVe(n){return n.map(function(e){return[dh(e.longitudeShift),dh(e.latitudeShift)]})}function AVe(n,e,t){return{name:vM(n,e+8,e+16).trim(),parent:vM(n,e+24,e+24+8).trim(),lowerLatitude:n.getFloat64(e+72,t),upperLatitude:n.getFloat64(e+88,t),lowerLongitude:n.getFloat64(e+104,t),upperLongitude:n.getFloat64(e+120,t),latitudeInterval:n.getFloat64(e+136,t),longitudeInterval:n.getFloat64(e+152,t),gridNodeCount:n.getInt32(e+168,t)}}function CVe(n,e,t,i,r){var a=e+176,o=16;r===!1&&(o=8);for(var s=[],l=0;l<t.gridNodeCount;l++){var u={latitudeShift:n.getFloat32(a+l*o,i),longitudeShift:n.getFloat32(a+l*o+4,i)};r!==!1&&(u.latitudeAccuracy=n.getFloat32(a+l*o+8,i),u.longitudeAccuracy=n.getFloat32(a+l*o+12,i)),s.push(u)}return s}function C0(n,e){if(!(this instanceof C0))return new C0(n);this.forward=null,this.inverse=null,this.init=null,this.name,this.axis,this.names=null,this.title,e=e||function(u){if(u)throw u};var t=QUe(n);if(typeof t!="object"){e("Could not parse to valid json: "+n);return}var i=C0.projections.get(t.projName);if(!i){e("Could not get projection name from: "+n);return}if(t.datumCode&&t.datumCode!=="none"){var r=Fh(b5,t.datumCode);r&&(t.datum_params=t.datum_params||(r.towgs84?r.towgs84.split(","):null),t.ellps=r.ellipse,t.datumName=r.datumName?r.datumName:t.datumCode)}t.k0=t.k0||1,t.axis=t.axis||"enu",t.ellps=t.ellps||"wgs84",t.lat1=t.lat1||t.lat0;var a=fVe(t.a,t.b,t.rf,t.ellps,t.sphere),o=hVe(a.a,a.b,a.rf,t.R_A),s=_Ve(t.nadgrids),l=t.datum||vVe(t.datumCode,t.datum_params,a.a,a.b,o.es,o.ep2,s);AW(this,t),AW(this,i),this.a=a.a,this.b=a.b,this.rf=a.rf,this.sphere=a.sphere,this.es=o.es,this.e=o.e,this.ep2=o.ep2,this.datum=l,"init"in this&&typeof this.init=="function"&&this.init(),e(null,this)}C0.projections=cVe;C0.projections.start();function MVe(n,e){return n.datum_type!==e.datum_type||n.a!==e.a||Math.abs(n.es-e.es)>5e-11?!1:n.datum_type===qp?n.datum_params[0]===e.datum_params[0]&&n.datum_params[1]===e.datum_params[1]&&n.datum_params[2]===e.datum_params[2]:n.datum_type===Xp?n.datum_params[0]===e.datum_params[0]&&n.datum_params[1]===e.datum_params[1]&&n.datum_params[2]===e.datum_params[2]&&n.datum_params[3]===e.datum_params[3]&&n.datum_params[4]===e.datum_params[4]&&n.datum_params[5]===e.datum_params[5]&&n.datum_params[6]===e.datum_params[6]:!0}function hte(n,e,t){var i=n.x,r=n.y,a=n.z?n.z:0,o,s,l,u;if(r<-yn&&r>-1.001*yn)r=-yn;else if(r>yn&&r<1.001*yn)r=yn;else{if(r<-yn)return{x:-1/0,y:-1/0,z:n.z};if(r>yn)return{x:1/0,y:1/0,z:n.z}}return i>Math.PI&&(i-=2*Math.PI),s=Math.sin(r),u=Math.cos(r),l=s*s,o=t/Math.sqrt(1-e*l),{x:(o+a)*u*Math.cos(i),y:(o+a)*u*Math.sin(i),z:(o*(1-e)+a)*s}}function fte(n,e,t,i){var r=1e-12,a=r*r,o=30,s,l,u,c,d,h,f,p,m,v,g,_,S,x=n.x,A=n.y,C=n.z?n.z:0,M,I,D;if(s=Math.sqrt(x*x+A*A),l=Math.sqrt(x*x+A*A+C*C),s/t<r){if(M=0,l/t<r)return I=yn,D=-i,{x:n.x,y:n.y,z:n.z}}else M=Math.atan2(A,x);u=C/l,c=s/l,d=1/Math.sqrt(1-e*(2-e)*c*c),p=c*(1-e)*d,m=u*d,S=0;do S++,f=t/Math.sqrt(1-e*m*m),D=s*p+C*m-f*(1-e*m*m),h=e*f/(f+D),d=1/Math.sqrt(1-h*(2-h)*c*c),v=c*(1-h)*d,g=u*d,_=g*p-v*m,p=v,m=g;while(_*_>a&&S<o);return I=Math.atan(g/Math.abs(v)),{x:M,y:I,z:D}}function EVe(n,e,t){if(e===qp)return{x:n.x+t[0],y:n.y+t[1],z:n.z+t[2]};if(e===Xp){var i=t[0],r=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6];return{x:u*(n.x-l*n.y+s*n.z)+i,y:u*(l*n.x+n.y-o*n.z)+r,z:u*(-s*n.x+o*n.y+n.z)+a}}}function PVe(n,e,t){if(e===qp)return{x:n.x-t[0],y:n.y-t[1],z:n.z-t[2]};if(e===Xp){var i=t[0],r=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=(n.x-i)/u,d=(n.y-r)/u,h=(n.z-a)/u;return{x:c+l*d-s*h,y:-l*c+d+o*h,z:s*c-o*d+h}}}function z4(n){return n===qp||n===Xp}function RVe(n,e,t){if(MVe(n,e)||n.datum_type===fM||e.datum_type===fM)return t;var i=n.a,r=n.es;if(n.datum_type===nv){var a=EW(n,!1,t);if(a!==0)return;i=yW,r=_W}var o=e.a,s=e.b,l=e.es;if(e.datum_type===nv&&(o=yW,s=PUe,l=_W),r===l&&i===o&&!z4(n.datum_type)&&!z4(e.datum_type))return t;if(t=hte(t,r,i),z4(n.datum_type)&&(t=EVe(t,n.datum_type,n.datum_params)),z4(e.datum_type)&&(t=PVe(t,e.datum_type,e.datum_params)),t=fte(t,l,o,s),e.datum_type===nv){var u=EW(e,!0,t);if(u!==0)return}return t}function EW(n,e,t){if(n.grids===null||n.grids.length===0)return console.log("Grid shift grids not found"),-1;var i={x:-t.x,y:t.y},r={x:Number.NaN,y:Number.NaN},a=[];e:for(var o=0;o<n.grids.length;o++){var s=n.grids[o];if(a.push(s.name),s.isNull){r=i;break}if(s.grid===null){if(s.mandatory)return console.log("Unable to find mandatory grid '"+s.name+"'"),-1;continue}for(var l=s.grid.subgrids,u=0,c=l.length;u<c;u++){var d=l[u],h=(Math.abs(d.del[1])+Math.abs(d.del[0]))/1e4,f=d.ll[0]-h,p=d.ll[1]-h,m=d.ll[0]+(d.lim[0]-1)*d.del[0]+h,v=d.ll[1]+(d.lim[1]-1)*d.del[1]+h;if(!(p>i.y||f>i.x||v<i.y||m<i.x)&&(r=LVe(i,e,d),!isNaN(r.x)))break e}}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-i.x*Zs+" "+i.y*Zs+" tried: '"+a+"'"),-1):(t.x=-r.x,t.y=r.y,0)}function LVe(n,e,t){var i={x:Number.NaN,y:Number.NaN};if(isNaN(n.x))return i;var r={x:n.x,y:n.y};r.x-=t.ll[0],r.y-=t.ll[1],r.x=kn(r.x-Math.PI)+Math.PI;var a=PW(r,t);if(e){if(isNaN(a.x))return i;a.x=r.x-a.x,a.y=r.y-a.y;var o=9,s=1e-12,l,u;do{if(u=PW(a,t),isNaN(u.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:r.x-(u.x+a.x),y:r.y-(u.y+a.y)},a.x+=l.x,a.y+=l.y}while(o--&&Math.abs(l.x)>s&&Math.abs(l.y)>s);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),i;i.x=kn(a.x+t.ll[0]),i.y=a.y+t.ll[1]}else isNaN(a.x)||(i.x=n.x+a.x,i.y=n.y+a.y);return i}function PW(n,e){var t={x:n.x/e.del[0],y:n.y/e.del[1]},i={x:Math.floor(t.x),y:Math.floor(t.y)},r={x:t.x-1*i.x,y:t.y-1*i.y},a={x:Number.NaN,y:Number.NaN},o;if(i.x<0||i.x>=e.lim[0]||i.y<0||i.y>=e.lim[1])return a;o=i.y*e.lim[0]+i.x;var s={x:e.cvs[o][0],y:e.cvs[o][1]};o++;var l={x:e.cvs[o][0],y:e.cvs[o][1]};o+=e.lim[0];var u={x:e.cvs[o][0],y:e.cvs[o][1]};o--;var c={x:e.cvs[o][0],y:e.cvs[o][1]},d=r.x*r.y,h=r.x*(1-r.y),f=(1-r.x)*(1-r.y),p=(1-r.x)*r.y;return a.x=f*s.x+h*l.x+p*c.x+d*u.x,a.y=f*s.y+h*l.y+p*c.y+d*u.y,a}var Yf=["x","y","z"];function IVe(n,e){const t={};for(let i=0,r=n.axis.length;i<r;i++){if(i===2&&e.z===void 0)continue;let a=e[Yf[i]];switch(n.axis[i]){case"e":t.x=a;break;case"w":t.x=-a;break;case"n":t.y=a;break;case"s":t.y=-a;break;case"u":t.z=a;break;case"d":t.z=-a;break;default:return null}}return t}function DVe(n,e){const t={};for(let i=0,r=n.axis.length;i<r;i++)if(!(i===2&&e.z===void 0))switch(n.axis[i]){case"e":t[Yf[i]]=e.x;break;case"w":t[Yf[i]]=-e.x;break;case"n":t[Yf[i]]=e.y;break;case"s":t[Yf[i]]=-e.y;break;case"u":t[Yf[i]]=e.z;break;case"d":t[Yf[i]]=-e.z;break;default:return null}return t}function WR(n){var e={x:n[0],y:n[1]};return n.length>2&&(e.z=n[2]),n.length>3&&(e.m=n[3]),e}function NVe(n){RW(n.x),RW(n.y)}function RW(n){if(typeof Number.isFinite=="function"){if(Number.isFinite(n))return;throw new TypeError("coordinates must be finite numbers")}if(typeof n!="number"||n!==n||!isFinite(n))throw new TypeError("coordinates must be finite numbers")}function kVe(n,e){return(n.datum.datum_type===qp||n.datum.datum_type===Xp||n.datum.datum_type===nv)&&e.datumCode!=="WGS84"||(e.datum.datum_type===qp||e.datum.datum_type===Xp||e.datum.datum_type===nv)&&n.datumCode!=="WGS84"}function e_(n,e,t,i){var r,a=t.z!==void 0;if(NVe(t),n.datum&&e.datum&&kVe(n,e)&&(r=new C0("WGS84"),t=e_(n,r,t,i),n=r),i&&n.axis!=="enu"&&(t=IVe(n,t)),n.projName==="longlat")t={x:t.x*Da,y:t.y*Da,z:t.z||0};else if(n.to_meter&&(t={x:t.x*n.to_meter,y:t.y*n.to_meter,z:t.z||0}),t=n.inverse(t),!t)return;if(n.from_greenwich&&(t.x+=n.from_greenwich),t=RVe(n.datum,e.datum,t),!!t)return t=t,e.from_greenwich&&(t={x:t.x-e.from_greenwich,y:t.y,z:t.z||0}),e.projName==="longlat"?t={x:t.x*Zs,y:t.y*Zs,z:t.z||0}:(t=e.forward(t),e.to_meter&&(t={x:t.x/e.to_meter,y:t.y/e.to_meter,z:t.z||0})),i&&e.axis!=="enu"?DVe(e,t):(t&&!a&&e.projName!=="geocent"&&delete t.z,t)}function FVe(n,e,t,i){var r;return Array.isArray(t)?r=WR(t):r={x:t.x,y:t.y,z:t.z,m:t.m},e_(n,e,r,i)}var LW=C0("WGS84");function wT(n,e,t,i){var r,a,o;return Array.isArray(t)?(r=e_(n,e,WR(t),i)||{x:NaN,y:NaN},t.length>2?(a=typeof n.name!="undefined"&&n.name==="geocent"||typeof e.name!="undefined"&&e.name==="geocent",a?typeof r.z=="number"?[r.x,r.y,r.z].concat(t.slice(3)):[r.x,r.y,t[2]].concat(t.slice(3)):i&&typeof r.z=="number"?[r.x,r.y,r.z].concat(t.slice(3)):[r.x,r.y].concat(t.slice(2))):[r.x,r.y]):(r=e_(n,e,{x:t.x,y:t.y,z:t.z,m:t.m},i)||{x:NaN,y:NaN},o=Object.keys(t),o.length===2||(a=typeof n.name!="undefined"&&n.name==="geocent"||typeof e.name!="undefined"&&e.name==="geocent",o.forEach(function(s){s==="x"||s==="y"||s==="z"&&(a||i)||(r[s]=t[s])})),r)}function G4(n){return n instanceof C0?n:typeof n=="object"&&"oProj"in n?n.oProj:C0(n)}function OVe(n,e,t){var i,r,a=!1,o;return typeof e=="undefined"?(r=G4(n),i=LW,a=!0):(typeof e.x!="undefined"||Array.isArray(e))&&(t=e,r=G4(n),i=LW,a=!0),i||(i=G4(n)),r||(r=G4(e)),t?wT(i,r,t):(o={forward:function(s,l){return wT(i,r,s,l)},inverse:function(s,l){return wT(r,i,s,l)}},a&&(o.oProj=r),o)}var IW=6,pte="AJSAJS",vte="AFAFAF",G2=65,Vs=73,r0=79,Dg=86,Ng=90;const BVe={forward:mte,inverse:zVe,toPoint:gte};function mte(n,e){return e=e||5,VVe(GVe({lat:n[1],lon:n[0]}),e)}function zVe(n){var e=jR(_te(n.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]}function gte(n){var e=jR(_te(n.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function TT(n){return n*(Math.PI/180)}function DW(n){return 180*(n/Math.PI)}function GVe(n){var e=n.lat,t=n.lon,i=6378137,r=.00669438,a=.9996,o,s,l,u,c,d,h,f=TT(e),p=TT(t),m,v;v=Math.floor((t+180)/6)+1,t===180&&(v=60),e>=56&&e<64&&t>=3&&t<12&&(v=32),e>=72&&e<84&&(t>=0&&t<9?v=31:t>=9&&t<21?v=33:t>=21&&t<33?v=35:t>=33&&t<42&&(v=37)),o=(v-1)*6-180+3,m=TT(o),s=r/(1-r),l=i/Math.sqrt(1-r*Math.sin(f)*Math.sin(f)),u=Math.tan(f)*Math.tan(f),c=s*Math.cos(f)*Math.cos(f),d=Math.cos(f)*(p-m),h=i*((1-r/4-3*r*r/64-5*r*r*r/256)*f-(3*r/8+3*r*r/32+45*r*r*r/1024)*Math.sin(2*f)+(15*r*r/256+45*r*r*r/1024)*Math.sin(4*f)-35*r*r*r/3072*Math.sin(6*f));var g=a*l*(d+(1-u+c)*d*d*d/6+(5-18*u+u*u+72*c-58*s)*d*d*d*d*d/120)+5e5,_=a*(h+l*Math.tan(f)*(d*d/2+(5-u+9*c+4*c*c)*d*d*d*d/24+(61-58*u+u*u+600*c-330*s)*d*d*d*d*d*d/720));return e<0&&(_+=1e7),{northing:Math.round(_),easting:Math.round(g),zoneNumber:v,zoneLetter:UVe(e)}}function jR(n){var e=n.northing,t=n.easting,i=n.zoneLetter,r=n.zoneNumber;if(r<0||r>60)return null;var a=.9996,o=6378137,s=.00669438,l,u=(1-Math.sqrt(1-s))/(1+Math.sqrt(1-s)),c,d,h,f,p,m,v,g,_,S=t-5e5,x=e;i<"N"&&(x-=1e7),v=(r-1)*6-180+3,l=s/(1-s),m=x/a,g=m/(o*(1-s/4-3*s*s/64-5*s*s*s/256)),_=g+(3*u/2-27*u*u*u/32)*Math.sin(2*g)+(21*u*u/16-55*u*u*u*u/32)*Math.sin(4*g)+151*u*u*u/96*Math.sin(6*g),c=o/Math.sqrt(1-s*Math.sin(_)*Math.sin(_)),d=Math.tan(_)*Math.tan(_),h=l*Math.cos(_)*Math.cos(_),f=o*(1-s)/Math.pow(1-s*Math.sin(_)*Math.sin(_),1.5),p=S/(c*a);var A=_-c*Math.tan(_)/f*(p*p/2-(5+3*d+10*h-4*h*h-9*l)*p*p*p*p/24+(61+90*d+298*h+45*d*d-252*l-3*h*h)*p*p*p*p*p*p/720);A=DW(A);var C=(p-(1+2*d+h)*p*p*p/6+(5-2*h+28*d-3*h*h+8*l+24*d*d)*p*p*p*p*p/120)/Math.cos(_);C=v+DW(C);var M;if(n.accuracy){var I=jR({northing:n.northing+n.accuracy,easting:n.easting+n.accuracy,zoneLetter:n.zoneLetter,zoneNumber:n.zoneNumber});M={top:I.lat,right:I.lon,bottom:A,left:C}}else M={lat:A,lon:C};return M}function UVe(n){var e="Z";return 84>=n&&n>=72?e="X":72>n&&n>=64?e="W":64>n&&n>=56?e="V":56>n&&n>=48?e="U":48>n&&n>=40?e="T":40>n&&n>=32?e="S":32>n&&n>=24?e="R":24>n&&n>=16?e="Q":16>n&&n>=8?e="P":8>n&&n>=0?e="N":0>n&&n>=-8?e="M":-8>n&&n>=-16?e="L":-16>n&&n>=-24?e="K":-24>n&&n>=-32?e="J":-32>n&&n>=-40?e="H":-40>n&&n>=-48?e="G":-48>n&&n>=-56?e="F":-56>n&&n>=-64?e="E":-64>n&&n>=-72?e="D":-72>n&&n>=-80&&(e="C"),e}function VVe(n,e){var t="00000"+n.easting,i="00000"+n.northing;return n.zoneNumber+n.zoneLetter+HVe(n.easting,n.northing,n.zoneNumber)+t.substr(t.length-5,e)+i.substr(i.length-5,e)}function HVe(n,e,t){var i=yte(t),r=Math.floor(n/1e5),a=Math.floor(e/1e5)%20;return WVe(r,a,i)}function yte(n){var e=n%IW;return e===0&&(e=IW),e}function WVe(n,e,t){var i=t-1,r=pte.charCodeAt(i),a=vte.charCodeAt(i),o=r+n-1,s=a+e,l=!1;o>Ng&&(o=o-Ng+G2-1,l=!0),(o===Vs||r<Vs&&o>Vs||(o>Vs||r<Vs)&&l)&&o++,(o===r0||r<r0&&o>r0||(o>r0||r<r0)&&l)&&(o++,o===Vs&&o++),o>Ng&&(o=o-Ng+G2-1),s>Dg?(s=s-Dg+G2-1,l=!0):l=!1,(s===Vs||a<Vs&&s>Vs||(s>Vs||a<Vs)&&l)&&s++,(s===r0||a<r0&&s>r0||(s>r0||a<r0)&&l)&&(s++,s===Vs&&s++),s>Dg&&(s=s-Dg+G2-1);var u=String.fromCharCode(o)+String.fromCharCode(s);return u}function _te(n){if(n&&n.length===0)throw"MGRSPoint coverting from nothing";for(var e=n.length,t=null,i="",r,a=0;!/[A-Z]/.test(r=n.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+n;i+=r,a++}var o=parseInt(i,10);if(a===0||a+3>e)throw"MGRSPoint bad conversion from: "+n;var s=n.charAt(a++);if(s<="A"||s==="B"||s==="Y"||s>="Z"||s==="I"||s==="O")throw"MGRSPoint zone letter "+s+" not handled: "+n;t=n.substring(a,a+=2);for(var l=yte(o),u=jVe(t.charAt(0),l),c=$Ve(t.charAt(1),l);c<qVe(s);)c+=2e6;var d=e-a;if(d%2!==0)throw`MGRSPoint has to have an even number
of digits after the zone letter and two 100km letters - front
half for easting meters, second half for
northing meters`+n;var h=d/2,f=0,p=0,m,v,g,_,S;return h>0&&(m=1e5/Math.pow(10,h),v=n.substring(a,a+h),f=parseFloat(v)*m,g=n.substring(a+h),p=parseFloat(g)*m),_=f+u,S=p+c,{easting:_,northing:S,zoneLetter:s,zoneNumber:o,accuracy:m}}function jVe(n,e){for(var t=pte.charCodeAt(e-1),i=1e5,r=!1;t!==n.charCodeAt(0);){if(t++,t===Vs&&t++,t===r0&&t++,t>Ng){if(r)throw"Bad character: "+n;t=G2,r=!0}i+=1e5}return i}function $Ve(n,e){if(n>"V")throw"MGRSPoint given invalid Northing "+n;for(var t=vte.charCodeAt(e-1),i=0,r=!1;t!==n.charCodeAt(0);){if(t++,t===Vs&&t++,t===r0&&t++,t>Dg){if(r)throw"Bad character: "+n;t=G2,r=!0}i+=1e5}return i}function qVe(n){var e;switch(n){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+n}function Nv(n,e,t){if(!(this instanceof Nv))return new Nv(n,e,t);if(Array.isArray(n))this.x=n[0],this.y=n[1],this.z=n[2]||0;else if(typeof n=="object")this.x=n.x,this.y=n.y,this.z=n.z||0;else if(typeof n=="string"&&typeof e=="undefined"){var i=n.split(",");this.x=parseFloat(i[0]),this.y=parseFloat(i[1]),this.z=parseFloat(i[2])||0}else this.x=n,this.y=e,this.z=t||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Nv.fromMGRS=function(n){return new Nv(gte(n))};Nv.prototype.toMGRS=function(n){return mte([this.x,this.y],n)};var XVe=1,YVe=.25,NW=.046875,kW=.01953125,FW=.01068115234375,KVe=.75,ZVe=.46875,JVe=.013020833333333334,QVe=.007120768229166667,eHe=.3645833333333333,tHe=.005696614583333333,nHe=.3076171875;function $R(n){var e=[];e[0]=XVe-n*(YVe+n*(NW+n*(kW+n*FW))),e[1]=n*(KVe-n*(NW+n*(kW+n*FW)));var t=n*n;return e[2]=t*(ZVe-n*(JVe+n*QVe)),t*=n,e[3]=t*(eHe-n*tHe),e[4]=t*n*nHe,e}function om(n,e,t,i){return t*=e,e*=e,i[0]*n-t*(i[1]+e*(i[2]+e*(i[3]+e*i[4])))}var iHe=20;function qR(n,e,t){for(var i=1/(1-e),r=n,a=iHe;a;--a){var o=Math.sin(r),s=1-e*o*o;if(s=(om(r,o,Math.cos(r),t)-n)*(s*Math.sqrt(s))*i,r-=s,Math.abs(s)<Rn)return r}return r}function rHe(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=$R(this.es),this.ml0=om(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function aHe(n){var e=n.x,t=n.y,i=kn(e-this.long0,this.over),r,a,o,s=Math.sin(t),l=Math.cos(t);if(this.es){var c=l*i,d=Math.pow(c,2),h=this.ep2*Math.pow(l,2),f=Math.pow(h,2),p=Math.abs(l)>Rn?Math.tan(t):0,m=Math.pow(p,2),v=Math.pow(m,2);r=1-this.es*Math.pow(s,2),c=c/Math.sqrt(r);var g=om(t,s,l,this.en);a=this.a*(this.k0*c*(1+d/6*(1-m+h+d/20*(5-18*m+v+14*h-58*m*h+d/42*(61+179*v-v*m-479*m)))))+this.x0,o=this.a*(this.k0*(g-this.ml0+s*i*c/2*(1+d/12*(5-m+9*h+4*f+d/30*(61+v-58*m+270*h-330*m*h+d/56*(1385+543*v-v*m-3111*m))))))+this.y0}else{var u=l*Math.sin(i);if(Math.abs(Math.abs(u)-1)<Rn)return 93;if(a=.5*this.a*this.k0*Math.log((1+u)/(1-u))+this.x0,o=l*Math.cos(i)/Math.sqrt(1-Math.pow(u,2)),u=Math.abs(o),u>=1){if(u-1>Rn)return 93;o=0}else o=Math.acos(o);t<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return n.x=a,n.y=o,n}function oHe(n){var e,t,i,r,a=(n.x-this.x0)*(1/this.a),o=(n.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+o/this.k0,t=qR(e,this.es,this.en),Math.abs(t)<yn){var d=Math.sin(t),h=Math.cos(t),f=Math.abs(h)>Rn?Math.tan(t):0,p=this.ep2*Math.pow(h,2),m=Math.pow(p,2),v=Math.pow(f,2),g=Math.pow(v,2);e=1-this.es*Math.pow(d,2);var _=a*Math.sqrt(e)/this.k0,S=Math.pow(_,2);e=e*f,i=t-e*S/(1-this.es)*.5*(1-S/12*(5+3*v-9*p*v+p-4*m-S/30*(61+90*v-252*p*v+45*g+46*p-S/56*(1385+3633*v+4095*g+1574*g*v)))),r=kn(this.long0+_*(1-S/6*(1+2*v+p-S/20*(5+28*v+24*g+8*p*v+6*p-S/42*(61+662*v+1320*g+720*g*v))))/h,this.over)}else i=yn*G3(o),r=0;else{var s=Math.exp(a/this.k0),l=.5*(s-1/s),u=this.lat0+o/this.k0,c=Math.cos(u);e=Math.sqrt((1-Math.pow(c,2))/(1+Math.pow(l,2))),i=Math.asin(e),o<0&&(i=-i),l===0&&c===0?r=0:r=kn(Math.atan2(l,c)+this.long0,this.over)}return n.x=r,n.y=i,n}var sHe=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const x5={init:rHe,forward:aHe,inverse:oHe,names:sHe};function Ste(n){var e=Math.exp(n);return e=(e-1/e)/2,e}function Ys(n,e){n=Math.abs(n),e=Math.abs(e);var t=Math.max(n,e),i=Math.min(n,e)/(t||1);return t*Math.sqrt(1+Math.pow(i,2))}function lHe(n){var e=1+n,t=e-1;return t===0?n:n*Math.log(e)/t}function uHe(n){var e=Math.abs(n);return e=lHe(e*(1+e/(Ys(1,e)+1))),n<0?-e:e}function XR(n,e){for(var t=2*Math.cos(2*e),i=n.length-1,r=n[i],a=0,o;--i>=0;)o=-a+t*r+n[i],a=r,r=o;return e+o*Math.sin(2*e)}function cHe(n,e){for(var t=2*Math.cos(e),i=n.length-1,r=n[i],a=0,o;--i>=0;)o=-a+t*r+n[i],a=r,r=o;return Math.sin(e)*o}function dHe(n){var e=Math.exp(n);return e=(e+1/e)/2,e}function bte(n,e,t){for(var i=Math.sin(e),r=Math.cos(e),a=Ste(t),o=dHe(t),s=2*r*o,l=-2*i*a,u=n.length-1,c=n[u],d=0,h=0,f=0,p,m;--u>=0;)p=h,m=d,h=c,d=f,c=-p+s*h-l*d+n[u],f=-m+l*h+s*d;return s=i*o,l=r*a,[s*c-l*f,s*f+l*c]}function hHe(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(x5.init.apply(this),this.forward=x5.forward,this.inverse=x5.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var n=this.es/(1+Math.sqrt(1-this.es)),e=n/(2-n),t=e;this.cgb[0]=e*(2+e*(-2/3+e*(-2+e*(116/45+e*(26/45+e*(-2854/675)))))),this.cbg[0]=e*(-2+e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))),t=t*e,this.cgb[1]=t*(7/3+e*(-8/5+e*(-227/45+e*(2704/315+e*(2323/945))))),this.cbg[1]=t*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),t=t*e,this.cgb[2]=t*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=t*(-26/15+e*(34/21+e*(8/5+e*(-12686/2835)))),t=t*e,this.cgb[3]=t*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=t*(1237/630+e*(-12/5+e*(-24832/14175))),t=t*e,this.cgb[4]=t*(4174/315+e*(-144838/6237)),this.cbg[4]=t*(-734/315+e*(109598/31185)),t=t*e,this.cgb[5]=t*(601676/22275),this.cbg[5]=t*(444337/155925),t=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+t*(1/4+t*(1/64+t/256))),this.utg[0]=e*(-.5+e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=t*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=t*(13/48+e*(-3/5+e*(557/1440+e*(281/630+e*(-1983433/1935360))))),t=t*e,this.utg[2]=t*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=t*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),t=t*e,this.utg[3]=t*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=t*(49561/161280+e*(-179/168+e*(6601661/7257600))),t=t*e,this.utg[4]=t*(-4583/161280+e*(108847/3991680)),this.gtu[4]=t*(34729/80640+e*(-3418889/1995840)),t=t*e,this.utg[5]=t*(-20648693/638668800),this.gtu[5]=t*(212378941/319334400);var i=XR(this.cbg,this.lat0);this.Zb=-this.Qn*(i+cHe(this.gtu,2*i))}function fHe(n){var e=kn(n.x-this.long0,this.over),t=n.y;t=XR(this.cbg,t);var i=Math.sin(t),r=Math.cos(t),a=Math.sin(e),o=Math.cos(e);t=Math.atan2(i,o*r),e=Math.atan2(a*r,Ys(i,r*o)),e=uHe(Math.tan(e));var s=bte(this.gtu,2*t,2*e);t=t+s[0],e=e+s[1];var l,u;return Math.abs(e)<=2.623395162778?(l=this.a*(this.Qn*e)+this.x0,u=this.a*(this.Qn*t+this.Zb)+this.y0):(l=1/0,u=1/0),n.x=l,n.y=u,n}function pHe(n){var e=(n.x-this.x0)*(1/this.a),t=(n.y-this.y0)*(1/this.a);t=(t-this.Zb)/this.Qn,e=e/this.Qn;var i,r;if(Math.abs(e)<=2.623395162778){var a=bte(this.utg,2*t,2*e);t=t+a[0],e=e+a[1],e=Math.atan(Ste(e));var o=Math.sin(t),s=Math.cos(t),l=Math.sin(e),u=Math.cos(e);t=Math.atan2(o*u,Ys(l,u*s)),e=Math.atan2(l,u*s),i=kn(e+this.long0,this.over),r=XR(this.cgb,t)}else i=1/0,r=1/0;return n.x=i,n.y=r,n}var vHe=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const w5={init:hHe,forward:fHe,inverse:pHe,names:vHe};function mHe(n,e){if(n===void 0){if(n=Math.floor((kn(e)+Math.PI)*30/Math.PI)+1,n<0)return 0;if(n>60)return 60}return n}var gHe="etmerc";function yHe(){var n=mHe(this.zone,this.long0);if(n===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(n)-183)*Da,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,w5.init.apply(this),this.forward=w5.forward,this.inverse=w5.inverse}var _He=["Universal Transverse Mercator System","utm"];const SHe={init:yHe,names:_He,dependsOn:gHe};function YR(n,e){return Math.pow((1-n)/(1+n),e)}var bHe=20;function xHe(){var n=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*n*n),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(n/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+Fr)/(Math.pow(Math.tan(.5*this.lat0+Fr),this.C)*YR(this.e*n,this.ratexp))}function wHe(n){var e=n.x,t=n.y;return n.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*t+Fr),this.C)*YR(this.e*Math.sin(t),this.ratexp))-yn,n.x=this.C*e,n}function THe(n){for(var e=1e-14,t=n.x/this.C,i=n.y,r=Math.pow(Math.tan(.5*i+Fr)/this.K,1/this.C),a=bHe;a>0&&(i=2*Math.atan(r*YR(this.e*Math.sin(n.y),-.5*this.e))-yn,!(Math.abs(i-n.y)<e));--a)n.y=i;return a?(n.x=t,n.y=i,n):null}var AHe=["gauss"];const KR={init:xHe,forward:wHe,inverse:THe,names:AHe};function CHe(){KR.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function MHe(n){var e,t,i,r;return n.x=kn(n.x-this.long0,this.over),KR.forward.apply(this,[n]),e=Math.sin(n.y),t=Math.cos(n.y),i=Math.cos(n.x),r=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*t*i),n.x=r*t*Math.sin(n.x),n.y=r*(this.cosc0*e-this.sinc0*t*i),n.x=this.a*n.x+this.x0,n.y=this.a*n.y+this.y0,n}function EHe(n){var e,t,i,r,a;if(n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,n.x/=this.k0,n.y/=this.k0,a=Ys(n.x,n.y)){var o=2*Math.atan2(a,this.R2);e=Math.sin(o),t=Math.cos(o),r=Math.asin(t*this.sinc0+n.y*e*this.cosc0/a),i=Math.atan2(n.x*e,a*this.cosc0*t-n.y*this.sinc0*e)}else r=this.phic0,i=0;return n.x=i,n.y=r,KR.inverse.apply(this,[n]),n.x=kn(n.x+this.long0,this.over),n}var PHe=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const RHe={init:CHe,forward:MHe,inverse:EHe,names:PHe};function ZR(n,e,t){return e*=t,Math.tan(.5*(yn+n))*Math.pow((1-e)/(1+e),.5*t)}function LHe(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Rn&&(this.k0=.5*(1+G3(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=Rn&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Rn&&Math.abs(Math.cos(this.lat_ts))>Rn&&(this.k0=.5*this.cons*ec(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/tu(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=ec(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(ZR(this.lat0,this.sinlat0,this.e))-yn,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function IHe(n){var e=n.x,t=n.y,i=Math.sin(t),r=Math.cos(t),a,o,s,l,u,c,d=kn(e-this.long0,this.over);return Math.abs(Math.abs(e-this.long0)-Math.PI)<=Rn&&Math.abs(t+this.lat0)<=Rn?(n.x=NaN,n.y=NaN,n):this.sphere?(a=2*this.k0/(1+this.sinlat0*i+this.coslat0*r*Math.cos(d)),n.x=this.a*a*r*Math.sin(d)+this.x0,n.y=this.a*a*(this.coslat0*i-this.sinlat0*r*Math.cos(d))+this.y0,n):(o=2*Math.atan(ZR(t,i,this.e))-yn,l=Math.cos(o),s=Math.sin(o),Math.abs(this.coslat0)<=Rn?(u=tu(this.e,t*this.con,this.con*i),c=2*this.a*this.k0*u/this.cons,n.x=this.x0+c*Math.sin(e-this.long0),n.y=this.y0-this.con*c*Math.cos(e-this.long0),n):(Math.abs(this.sinlat0)<Rn?(a=2*this.a*this.k0/(1+l*Math.cos(d)),n.y=a*s):(a=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*s+this.cosX0*l*Math.cos(d))),n.y=a*(this.cosX0*s-this.sinX0*l*Math.cos(d))+this.y0),n.x=a*l*Math.sin(d)+this.x0,n))}function DHe(n){n.x-=this.x0,n.y-=this.y0;var e,t,i,r,a,o=Math.sqrt(n.x*n.x+n.y*n.y);if(this.sphere){var s=2*Math.atan(o/(2*this.a*this.k0));return e=this.long0,t=this.lat0,o<=Rn?(n.x=e,n.y=t,n):(t=Math.asin(Math.cos(s)*this.sinlat0+n.y*Math.sin(s)*this.coslat0/o),Math.abs(this.coslat0)<Rn?this.lat0>0?e=kn(this.long0+Math.atan2(n.x,-1*n.y),this.over):e=kn(this.long0+Math.atan2(n.x,n.y),this.over):e=kn(this.long0+Math.atan2(n.x*Math.sin(s),o*this.coslat0*Math.cos(s)-n.y*this.sinlat0*Math.sin(s)),this.over),n.x=e,n.y=t,n)}else if(Math.abs(this.coslat0)<=Rn){if(o<=Rn)return t=this.lat0,e=this.long0,n.x=e,n.y=t,n;n.x*=this.con,n.y*=this.con,i=o*this.cons/(2*this.a*this.k0),t=this.con*h3(this.e,i),e=this.con*kn(this.con*this.long0+Math.atan2(n.x,-1*n.y),this.over)}else r=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o<=Rn?a=this.X0:(a=Math.asin(Math.cos(r)*this.sinX0+n.y*Math.sin(r)*this.cosX0/o),e=kn(this.long0+Math.atan2(n.x*Math.sin(r),o*this.cosX0*Math.cos(r)-n.y*this.sinX0*Math.sin(r)),this.over)),t=-1*h3(this.e,Math.tan(.5*(yn+a)));return n.x=e,n.y=t,n}var NHe=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const kHe={init:LHe,forward:IHe,inverse:DHe,names:NHe,ssfn_:ZR};function FHe(){var n=this.lat0;this.lambda0=this.long0;var e=Math.sin(n),t=this.a,i=this.rf,r=1/i,a=2*r-Math.pow(r,2),o=this.e=Math.sqrt(a);this.R=this.k0*t*Math.sqrt(1-a)/(1-a*Math.pow(e,2)),this.alpha=Math.sqrt(1+a/(1-a)*Math.pow(Math.cos(n),4)),this.b0=Math.asin(e/this.alpha);var s=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+n/2)),u=Math.log((1+o*e)/(1-o*e));this.K=s-this.alpha*l+this.alpha*o/2*u}function OHe(n){var e=Math.log(Math.tan(Math.PI/4-n.y/2)),t=this.e/2*Math.log((1+this.e*Math.sin(n.y))/(1-this.e*Math.sin(n.y))),i=-this.alpha*(e+t)+this.K,r=2*(Math.atan(Math.exp(i))-Math.PI/4),a=this.alpha*(n.x-this.lambda0),o=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(a))),s=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(a));return n.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,n.x=this.R*o+this.x0,n}function BHe(n){for(var e=n.x-this.x0,t=n.y-this.y0,i=e/this.R,r=2*(Math.atan(Math.exp(t/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(i)),o=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(r))),s=this.lambda0+o/this.alpha,l=0,u=a,c=-1e3,d=0;Math.abs(u-c)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),c=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return n.x=s,n.y=u,n}var zHe=["somerc"];const GHe={init:FHe,forward:OHe,inverse:BHe,names:zHe};var C2=1e-7;function UHe(n){var e=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],t=typeof n.projName=="object"?Object.keys(n.projName)[0]:n.projName;return"no_uoff"in n||"no_off"in n||e.indexOf(t)!==-1||e.indexOf(cte(t))!==-1}function VHe(){var n,e,t,i,r,a,o,s,l,u,c=0,d,h=0,f=0,p=0,m=0,v=0,g=0;this.no_off=UHe(this),this.no_rot="no_rot"in this;var _=!1;"alpha"in this&&(_=!0);var S=!1;if("rectified_grid_angle"in this&&(S=!0),_&&(g=this.alpha),S&&(c=this.rectified_grid_angle,_||(g=0,_=!0)),_||S)h=this.longc;else if(f=this.long1,m=this.lat1,p=this.long2,v=this.lat2,Math.abs(m-v)<=C2||(n=Math.abs(m))<=C2||Math.abs(n-yn)<=C2||Math.abs(Math.abs(this.lat0)-yn)<=C2||Math.abs(Math.abs(v)-yn)<=C2)throw new Error;var x=1-this.es;e=Math.sqrt(x),Math.abs(this.lat0)>Rn?(s=Math.sin(this.lat0),t=Math.cos(this.lat0),n=1-this.es*s*s,this.B=t*t,this.B=Math.sqrt(1+this.es*this.B*this.B/x),this.A=this.B*this.k0*e/n,i=this.B*e/(t*Math.sqrt(n)),r=i*i-1,r<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=i,this.E*=Math.pow(tu(this.e,this.lat0,s),this.B)):(this.B=1/e,this.A=this.k0,this.E=i=r=1),_||S?(_?(d=Math.asin(Math.sin(g)/i),S||(c=g)):(d=c,g=Math.asin(i*Math.sin(d))),this.lam0=h-Math.asin(.5*(r-1/r)*Math.tan(d))/this.B):(a=Math.pow(tu(this.e,m,Math.sin(m)),this.B),o=Math.pow(tu(this.e,v,Math.sin(v)),this.B),r=this.E/a,l=(o-a)/(o+a),u=this.E*this.E,u=(u-o*a)/(u+o*a),n=f-p,n<-Math.PI?p-=c3:n>Math.PI&&(p+=c3),this.lam0=kn(.5*(f+p)-Math.atan(u*Math.tan(.5*this.B*(f-p))/l)/this.B,this.over),d=Math.atan(2*Math.sin(this.B*kn(f-this.lam0,this.over))/(r-1/r)),c=g=Math.asin(i*Math.sin(d))),this.singam=Math.sin(d),this.cosgam=Math.cos(d),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(i*i-1)/Math.cos(g))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*d,this.v_pole_n=this.ArB*Math.log(Math.tan(Fr-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(Fr+r))}function HHe(n){var e={},t,i,r,a,o,s,l,u;if(n.x=n.x-this.lam0,Math.abs(Math.abs(n.y)-yn)>Rn){if(o=this.E/Math.pow(tu(this.e,n.y,Math.sin(n.y)),this.B),s=1/o,t=.5*(o-s),i=.5*(o+s),a=Math.sin(this.B*n.x),r=(t*this.singam-a*this.cosgam)/i,Math.abs(Math.abs(r)-1)<Rn)throw new Error;u=.5*this.ArB*Math.log((1-r)/(1+r)),s=Math.cos(this.B*n.x),Math.abs(s)<C2?l=this.A*n.x:l=this.ArB*Math.atan2(t*this.cosgam+a*this.singam,s)}else u=n.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*n.y;return this.no_rot?(e.x=l,e.y=u):(l-=this.u_0,e.x=u*this.cosrot+l*this.sinrot,e.y=l*this.cosrot-u*this.sinrot),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function WHe(n){var e,t,i,r,a,o,s,l={};if(n.x=(n.x-this.x0)*(1/this.a),n.y=(n.y-this.y0)*(1/this.a),this.no_rot?(t=n.y,e=n.x):(t=n.x*this.cosrot-n.y*this.sinrot,e=n.y*this.cosrot+n.x*this.sinrot+this.u_0),i=Math.exp(-this.BrA*t),r=.5*(i-1/i),a=.5*(i+1/i),o=Math.sin(this.BrA*e),s=(o*this.cosgam+r*this.singam)/a,Math.abs(Math.abs(s)-1)<Rn)l.x=0,l.y=s<0?-yn:yn;else{if(l.y=this.E/Math.sqrt((1+s)/(1-s)),l.y=h3(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(r*this.cosgam-o*this.singam,Math.cos(this.BrA*e))}return l.x+=this.lam0,l}var jHe=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const $He={init:VHe,forward:HHe,inverse:WHe,names:jHe};function qHe(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<Rn)){var n=this.b/this.a;this.e=Math.sqrt(1-n*n);var e=Math.sin(this.lat1),t=Math.cos(this.lat1),i=ec(this.e,e,t),r=tu(this.e,this.lat1,e),a=Math.sin(this.lat2),o=Math.cos(this.lat2),s=ec(this.e,a,o),l=tu(this.e,this.lat2,a),u=Math.abs(Math.abs(this.lat0)-yn)<Rn?0:tu(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>Rn?this.ns=Math.log(i/s)/Math.log(r/l):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=i/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function XHe(n){var e=n.x,t=n.y;Math.abs(2*Math.abs(t)-Math.PI)<=Rn&&(t=G3(t)*(yn-2*Rn));var i=Math.abs(Math.abs(t)-yn),r,a;if(i>Rn)r=tu(this.e,t,Math.sin(t)),a=this.a*this.f0*Math.pow(r,this.ns);else{if(i=t*this.ns,i<=0)return null;a=0}var o=this.ns*kn(e-this.long0,this.over);return n.x=this.k0*(a*Math.sin(o))+this.x0,n.y=this.k0*(this.rh-a*Math.cos(o))+this.y0,n}function YHe(n){var e,t,i,r,a,o=(n.x-this.x0)/this.k0,s=this.rh-(n.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(o*o+s*s),t=1):(e=-Math.sqrt(o*o+s*s),t=-1);var l=0;if(e!==0&&(l=Math.atan2(t*o,t*s)),e!==0||this.ns>0){if(t=1/this.ns,i=Math.pow(e/(this.a*this.f0),t),r=h3(this.e,i),r===-9999)return null}else r=-yn;return a=kn(l/this.ns+this.long0,this.over),n.x=a,n.y=r,n}var KHe=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const ZHe={init:qHe,forward:XHe,inverse:YHe,names:KHe};function JHe(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function QHe(n){var e,t,i,r,a,o,s,l=n.x,u=n.y,c=kn(l-this.long0,this.over);return e=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),t=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/e)-this.s45),i=-c*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(t)+Math.sin(this.ad)*Math.cos(t)*Math.cos(i)),a=Math.asin(Math.cos(t)*Math.sin(i)/Math.cos(r)),o=this.n*a,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),n.y=s*Math.cos(o)/1,n.x=s*Math.sin(o)/1,this.czech||(n.y*=-1,n.x*=-1),n}function eWe(n){var e,t,i,r,a,o,s,l,u=n.x;n.x=n.y,n.y=u,this.czech||(n.y*=-1,n.x*=-1),o=Math.sqrt(n.x*n.x+n.y*n.y),a=Math.atan2(n.y,n.x),r=a/Math.sin(this.s0),i=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(i)-Math.sin(this.ad)*Math.cos(i)*Math.cos(r)),t=Math.asin(Math.cos(i)*Math.sin(r)/Math.cos(e)),n.x=this.long0-t/this.alfa,s=e,l=0;var c=0;do n.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(s))/(1-this.e*Math.sin(s)),this.e/2))-this.s45),Math.abs(s-n.y)<1e-10&&(l=1),s=n.y,c+=1;while(l===0&&c<15);return c>=15?null:n}var tWe=["Krovak","Krovak Modified","Krovak (North Orientated)","Krovak Modified (North Orientated)","krovak"];const nWe={init:JHe,forward:QHe,inverse:eWe,names:tWe};function Ps(n,e,t,i,r){return n*r-e*Math.sin(2*r)+t*Math.sin(4*r)-i*Math.sin(6*r)}function U3(n){return 1-.25*n*(1+n/16*(3+1.25*n))}function V3(n){return .375*n*(1+.25*n*(1+.46875*n))}function H3(n){return .05859375*n*n*(1+.75*n)}function W3(n){return n*n*n*(35/3072)}function JR(n,e,t){var i=e*t;return n/Math.sqrt(1-i*i)}function Hh(n){return Math.abs(n)<yn?n:n-G3(n)*Math.PI}function t_(n,e,t,i,r){var a,o;a=n/e;for(var s=0;s<15;s++)if(o=(n-(e*a-t*Math.sin(2*a)+i*Math.sin(4*a)-r*Math.sin(6*a)))/(e-2*t*Math.cos(2*a)+4*i*Math.cos(4*a)-6*r*Math.cos(6*a)),a+=o,Math.abs(o)<=1e-10)return a;return NaN}function iWe(){this.sphere||(this.e0=U3(this.es),this.e1=V3(this.es),this.e2=H3(this.es),this.e3=W3(this.es),this.ml0=this.a*Ps(this.e0,this.e1,this.e2,this.e3,this.lat0))}function rWe(n){var e,t,i=n.x,r=n.y;if(i=kn(i-this.long0,this.over),this.sphere)e=this.a*Math.asin(Math.cos(r)*Math.sin(i)),t=this.a*(Math.atan2(Math.tan(r),Math.cos(i))-this.lat0);else{var a=Math.sin(r),o=Math.cos(r),s=JR(this.a,this.e,a),l=Math.tan(r)*Math.tan(r),u=i*Math.cos(r),c=u*u,d=this.es*o*o/(1-this.es),h=this.a*Ps(this.e0,this.e1,this.e2,this.e3,r);e=s*u*(1-c*l*(1/6-(8-l+8*d)*c/120)),t=h-this.ml0+s*a/o*c*(.5+(5-l+6*d)*c/24)}return n.x=e+this.x0,n.y=t+this.y0,n}function aWe(n){n.x-=this.x0,n.y-=this.y0;var e=n.x/this.a,t=n.y/this.a,i,r;if(this.sphere){var a=t+this.lat0;i=Math.asin(Math.sin(a)*Math.cos(e)),r=Math.atan2(Math.tan(e),Math.cos(a))}else{var o=this.ml0/this.a+t,s=t_(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-yn)<=Rn)return n.x=this.long0,n.y=yn,t<0&&(n.y*=-1),n;var l=JR(this.a,this.e,Math.sin(s)),u=l*l*l/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(s),2),d=e*this.a/l,h=d*d;i=s-l*Math.tan(s)/u*d*d*(.5-(1+3*c)*d*d/24),r=d*(1-h*(c/3+(1+3*c)*c*h/15))/Math.cos(s)}return n.x=kn(r+this.long0,this.over),n.y=Hh(i),n}var oWe=["Cassini","Cassini_Soldner","cass"];const sWe={init:iWe,forward:rWe,inverse:aWe,names:oWe};function qu(n,e){var t;return n>1e-7?(t=n*e,(1-n*n)*(e/(1-t*t)-.5/n*Math.log((1-t)/(1+t)))):2*e}var lWe=.3333333333333333,uWe=.17222222222222222,cWe=.10257936507936508,dWe=.06388888888888888,hWe=.0664021164021164,fWe=.016415012942191543;function xte(n){var e,t=[];return t[0]=n*lWe,e=n*n,t[0]+=e*uWe,t[1]=e*dWe,e*=n,t[0]+=e*cWe,t[1]+=e*hWe,t[2]=e*fWe,t}function wte(n,e){var t=n+n;return n+e[0]*Math.sin(t)+e[1]*Math.sin(t+t)+e[2]*Math.sin(t+t+t)}var mM=1,gM=2,yM=3,T5=4;function pWe(){var n=Math.abs(this.lat0);if(Math.abs(n-yn)<Rn?this.mode=this.lat0<0?mM:gM:Math.abs(n)<Rn?this.mode=yM:this.mode=T5,this.es>0){var e;switch(this.qp=qu(this.e,1),this.mmf=.5/(1-this.es),this.apa=xte(this.es),this.mode){case gM:this.dd=1;break;case mM:this.dd=1;break;case yM:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case T5:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=qu(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===T5&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function vWe(n){var e,t,i,r,a,o,s,l,u,c,d=n.x,h=n.y;if(d=kn(d-this.long0,this.over),this.sphere){if(a=Math.sin(h),c=Math.cos(h),i=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t=this.mode===this.EQUIT?1+c*i:1+this.sinph0*a+this.cosph0*c*i,t<=Rn)return null;t=Math.sqrt(2/t),e=t*c*Math.sin(d),t*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*c*i}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(i=-i),Math.abs(h+this.lat0)<Rn)return null;t=Fr-h*.5,t=2*(this.mode===this.S_POLE?Math.cos(t):Math.sin(t)),e=t*Math.sin(d),t*=i}}else{switch(s=0,l=0,u=0,i=Math.cos(d),r=Math.sin(d),a=Math.sin(h),o=qu(this.e,a),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(s=o/this.qp,l=Math.sqrt(1-s*s)),this.mode){case this.OBLIQ:u=1+this.sinb1*s+this.cosb1*l*i;break;case this.EQUIT:u=1+l*i;break;case this.N_POLE:u=yn+h,o=this.qp-o;break;case this.S_POLE:u=h-yn,o=this.qp+o;break}if(Math.abs(u)<Rn)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:u=Math.sqrt(2/u),this.mode===this.OBLIQ?t=this.ymf*u*(this.cosb1*s-this.sinb1*l*i):t=(u=Math.sqrt(2/(1+l*i)))*s*this.ymf,e=this.xmf*u*l*r;break;case this.N_POLE:case this.S_POLE:o>=0?(e=(u=Math.sqrt(o))*r,t=i*(this.mode===this.S_POLE?u:-u)):e=t=0;break}}return n.x=this.a*e+this.x0,n.y=this.a*t+this.y0,n}function mWe(n){n.x-=this.x0,n.y-=this.y0;var e=n.x/this.a,t=n.y/this.a,i,r,a,o,s,l,u;if(this.sphere){var c=0,d,h=0;if(d=Math.sqrt(e*e+t*t),r=d*.5,r>1)return null;switch(r=2*Math.asin(r),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(h=Math.sin(r),c=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(d)<=Rn?0:Math.asin(t*h/d),e*=h,t=c*d;break;case this.OBLIQ:r=Math.abs(d)<=Rn?this.lat0:Math.asin(c*this.sinph0+t*h*this.cosph0/d),e*=h*this.cosph0,t=(c-Math.sin(r)*this.sinph0)*d;break;case this.N_POLE:t=-t,r=yn-r;break;case this.S_POLE:r-=yn;break}i=t===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(e,t)}else{if(u=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e/=this.dd,t*=this.dd,l=Math.sqrt(e*e+t*t),l<Rn)return n.x=this.long0,n.y=this.lat0,n;o=2*Math.asin(.5*l/this.rq),a=Math.cos(o),e*=o=Math.sin(o),this.mode===this.OBLIQ?(u=a*this.sinb1+t*o*this.cosb1/l,s=this.qp*u,t=l*this.cosb1*a-t*this.sinb1*o):(u=t*o/l,s=this.qp*u,t=l*a)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(t=-t),s=e*e+t*t,!s)return n.x=this.long0,n.y=this.lat0,n;u=1-s/this.qp,this.mode===this.S_POLE&&(u=-u)}i=Math.atan2(e,t),r=wte(Math.asin(u),this.apa)}return n.x=kn(this.long0+i,this.over),n.y=r,n}var gWe=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const yWe={init:pWe,forward:vWe,inverse:mWe,names:gWe,S_POLE:mM,N_POLE:gM,EQUIT:yM,OBLIQ:T5};function Oh(n){return Math.abs(n)>1&&(n=n>1?1:-1),Math.asin(n)}function _We(){Math.abs(this.lat1+this.lat2)<Rn||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=ec(this.e3,this.sin_po,this.cos_po),this.qs1=qu(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=ec(this.e3,this.sin_po,this.cos_po),this.qs2=qu(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=qu(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>Rn?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function SWe(n){var e=n.x,t=n.y;this.sin_phi=Math.sin(t),this.cos_phi=Math.cos(t);var i=qu(this.e3,this.sin_phi),r=this.a*Math.sqrt(this.c-this.ns0*i)/this.ns0,a=this.ns0*kn(e-this.long0,this.over),o=r*Math.sin(a)+this.x0,s=this.rh-r*Math.cos(a)+this.y0;return n.x=o,n.y=s,n}function bWe(n){var e,t,i,r,a,o;return n.x-=this.x0,n.y=this.rh-n.y+this.y0,this.ns0>=0?(e=Math.sqrt(n.x*n.x+n.y*n.y),i=1):(e=-Math.sqrt(n.x*n.x+n.y*n.y),i=-1),r=0,e!==0&&(r=Math.atan2(i*n.x,i*n.y)),i=e*this.ns0/this.a,this.sphere?o=Math.asin((this.c-i*i)/(2*this.ns0)):(t=(this.c-i*i)/this.ns0,o=this.phi1z(this.e3,t)),a=kn(r/this.ns0+this.long0,this.over),n.x=a,n.y=o,n}function xWe(n,e){var t,i,r,a,o,s=Oh(.5*e);if(n<Rn)return s;for(var l=n*n,u=1;u<=25;u++)if(t=Math.sin(s),i=Math.cos(s),r=n*t,a=1-r*r,o=.5*a*a/i*(e/(1-l)-t/a+.5/n*Math.log((1-r)/(1+r))),s=s+o,Math.abs(o)<=1e-7)return s;return null}var wWe=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];const TWe={init:_We,forward:SWe,inverse:bWe,names:wWe,phi1z:xWe};function AWe(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function CWe(n){var e,t,i,r,a,o,s,l,u=n.x,c=n.y;return i=kn(u-this.long0,this.over),e=Math.sin(c),t=Math.cos(c),r=Math.cos(i),o=this.sin_p14*e+this.cos_p14*t*r,a=1,o>0||Math.abs(o)<=Rn?(s=this.x0+this.a*a*t*Math.sin(i)/o,l=this.y0+this.a*a*(this.cos_p14*e-this.sin_p14*t*r)/o):(s=this.x0+this.infinity_dist*t*Math.sin(i),l=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*t*r)),n.x=s,n.y=l,n}function MWe(n){var e,t,i,r,a,o;return n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,n.x/=this.k0,n.y/=this.k0,(e=Math.sqrt(n.x*n.x+n.y*n.y))?(r=Math.atan2(e,this.rc),t=Math.sin(r),i=Math.cos(r),o=Oh(i*this.sin_p14+n.y*t*this.cos_p14/e),a=Math.atan2(n.x*t,e*this.cos_p14*i-n.y*this.sin_p14*t),a=kn(this.long0+a,this.over)):(o=this.phic0,a=0),n.x=a,n.y=o,n}var EWe=["gnom"];const PWe={init:AWe,forward:CWe,inverse:MWe,names:EWe};function RWe(n,e){var t=1-(1-n*n)/(2*n)*Math.log((1-n)/(1+n));if(Math.abs(Math.abs(e)-t)<1e-6)return e<0?-1*yn:yn;for(var i=Math.asin(.5*e),r,a,o,s,l=0;l<30;l++)if(a=Math.sin(i),o=Math.cos(i),s=n*a,r=Math.pow(1-s*s,2)/(2*o)*(e/(1-n*n)-a/(1-s*s)+.5/n*Math.log((1-s)/(1+s))),i+=r,Math.abs(r)<=1e-10)return i;return NaN}function LWe(){this.sphere||(this.k0=ec(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function IWe(n){var e=n.x,t=n.y,i,r,a=kn(e-this.long0,this.over);if(this.sphere)i=this.x0+this.a*a*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(t)/Math.cos(this.lat_ts);else{var o=qu(this.e,Math.sin(t));i=this.x0+this.a*this.k0*a,r=this.y0+this.a*o*.5/this.k0}return n.x=i,n.y=r,n}function DWe(n){n.x-=this.x0,n.y-=this.y0;var e,t;return this.sphere?(e=kn(this.long0+n.x/this.a/Math.cos(this.lat_ts),this.over),t=Math.asin(n.y/this.a*Math.cos(this.lat_ts))):(t=RWe(this.e,2*n.y*this.k0/this.a),e=kn(this.long0+n.x/(this.a*this.k0),this.over)),n.x=e,n.y=t,n}var NWe=["cea"];const kWe={init:LWe,forward:IWe,inverse:DWe,names:NWe};function FWe(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function OWe(n){var e=n.x,t=n.y,i=kn(e-this.long0,this.over),r=Hh(t-this.lat0);return n.x=this.x0+this.a*i*this.rc,n.y=this.y0+this.a*r,n}function BWe(n){var e=n.x,t=n.y;return n.x=kn(this.long0+(e-this.x0)/(this.a*this.rc),this.over),n.y=Hh(this.lat0+(t-this.y0)/this.a),n}var zWe=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const GWe={init:FWe,forward:OWe,inverse:BWe,names:zWe};var OW=20;function UWe(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=U3(this.es),this.e1=V3(this.es),this.e2=H3(this.es),this.e3=W3(this.es),this.ml0=this.a*Ps(this.e0,this.e1,this.e2,this.e3,this.lat0)}function VWe(n){var e=n.x,t=n.y,i,r,a,o=kn(e-this.long0,this.over);if(a=o*Math.sin(t),this.sphere)Math.abs(t)<=Rn?(i=this.a*o,r=-1*this.a*this.lat0):(i=this.a*Math.sin(a)/Math.tan(t),r=this.a*(Hh(t-this.lat0)+(1-Math.cos(a))/Math.tan(t)));else if(Math.abs(t)<=Rn)i=this.a*o,r=-1*this.ml0;else{var s=JR(this.a,this.e,Math.sin(t))/Math.tan(t);i=s*Math.sin(a),r=this.a*Ps(this.e0,this.e1,this.e2,this.e3,t)-this.ml0+s*(1-Math.cos(a))}return n.x=i+this.x0,n.y=r+this.y0,n}function HWe(n){var e,t,i,r,a,o,s,l,u;if(i=n.x-this.x0,r=n.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=Rn)e=kn(i/this.a+this.long0,this.over),t=0;else{o=this.lat0+r/this.a,s=i*i/this.a/this.a+o*o,l=o;var c;for(a=OW;a;--a)if(c=Math.tan(l),u=-1*(o*(l*c+1)-l-.5*(l*l+s)*c)/((l-o)/c-1),l+=u,Math.abs(u)<=Rn){t=l;break}e=kn(this.long0+Math.asin(i*Math.tan(l)/this.a)/Math.sin(t),this.over)}else if(Math.abs(r+this.ml0)<=Rn)t=0,e=kn(this.long0+i/this.a,this.over);else{o=(this.ml0+r)/this.a,s=i*i/this.a/this.a+o*o,l=o;var d,h,f,p,m;for(a=OW;a;--a)if(m=this.e*Math.sin(l),d=Math.sqrt(1-m*m)*Math.tan(l),h=this.a*Ps(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),p=h/this.a,u=(o*(d*p+1)-p-.5*d*(p*p+s))/(this.es*Math.sin(2*l)*(p*p+s-2*o*p)/(4*d)+(o-p)*(d*f-2/Math.sin(2*l))-f),l-=u,Math.abs(u)<=Rn){t=l;break}d=Math.sqrt(1-this.es*Math.pow(Math.sin(t),2))*Math.tan(t),e=kn(this.long0+Math.asin(i*d/this.a)/Math.sin(t),this.over)}return n.x=e,n.y=t,n}var WWe=["Polyconic","American_Polyconic","poly"];const jWe={init:UWe,forward:VWe,inverse:HWe,names:WWe};function $We(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function qWe(n){var e,t=n.x,i=n.y,r=i-this.lat0,a=t-this.long0,o=r/l9*1e-5,s=a,l=1,u=0;for(e=1;e<=10;e++)l=l*o,u=u+this.A[e]*l;var c=u,d=s,h=1,f=0,p,m,v=0,g=0;for(e=1;e<=6;e++)p=h*c-f*d,m=f*c+h*d,h=p,f=m,v=v+this.B_re[e]*h-this.B_im[e]*f,g=g+this.B_im[e]*h+this.B_re[e]*f;return n.x=g*this.a+this.x0,n.y=v*this.a+this.y0,n}function XWe(n){var e,t=n.x,i=n.y,r=t-this.x0,a=i-this.y0,o=a/this.a,s=r/this.a,l=1,u=0,c,d,h=0,f=0;for(e=1;e<=6;e++)c=l*o-u*s,d=u*o+l*s,l=c,u=d,h=h+this.C_re[e]*l-this.C_im[e]*u,f=f+this.C_im[e]*l+this.C_re[e]*u;for(var p=0;p<this.iterations;p++){var m=h,v=f,g,_,S=o,x=s;for(e=2;e<=6;e++)g=m*h-v*f,_=v*h+m*f,m=g,v=_,S=S+(e-1)*(this.B_re[e]*m-this.B_im[e]*v),x=x+(e-1)*(this.B_im[e]*m+this.B_re[e]*v);m=1,v=0;var A=this.B_re[1],C=this.B_im[1];for(e=2;e<=6;e++)g=m*h-v*f,_=v*h+m*f,m=g,v=_,A=A+e*(this.B_re[e]*m-this.B_im[e]*v),C=C+e*(this.B_im[e]*m+this.B_re[e]*v);var M=A*A+C*C;h=(S*A+x*C)/M,f=(x*A-S*C)/M}var I=h,D=f,E=1,P=0;for(e=1;e<=9;e++)E=E*I,P=P+this.D[e]*E;var F=this.lat0+P*l9*1e5,V=this.long0+D;return n.x=V,n.y=F,n}var YWe=["New_Zealand_Map_Grid","nzmg"];const KWe={init:$We,forward:qWe,inverse:XWe,names:YWe};function ZWe(){}function JWe(n){var e=n.x,t=n.y,i=kn(e-this.long0,this.over),r=this.x0+this.a*i,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+t/2.5))*1.25;return n.x=r,n.y=a,n}function QWe(n){n.x-=this.x0,n.y-=this.y0;var e=kn(this.long0+n.x/this.a,this.over),t=2.5*(Math.atan(Math.exp(.8*n.y/this.a))-Math.PI/4);return n.x=e,n.y=t,n}var eje=["Miller_Cylindrical","mill"];const tje={init:ZWe,forward:JWe,inverse:QWe,names:eje};var nje=20;function ije(){this.long0=this.long0||0,this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=$R(this.es)}function Tte(n){var e,t,i=n.x,r=n.y;if(i=kn(i-this.long0,this.over),this.sphere){if(!this.m)r=this.n!==1?Math.asin(this.n*Math.sin(r)):r;else for(var a=this.n*Math.sin(r),o=nje;o;--o){var s=(this.m*r+Math.sin(r)-a)/(this.m+Math.cos(r));if(r-=s,Math.abs(s)<Rn)break}e=this.a*this.C_x*i*(this.m+Math.cos(r)),t=this.a*this.C_y*r}else{var l=Math.sin(r),u=Math.cos(r);t=this.a*om(r,l,u,this.en),e=this.a*i*u/Math.sqrt(1-this.es*l*l)}return n.x=e,n.y=t,n}function Ate(n){var e,t,i,r;return n.x-=this.x0,i=n.x/this.a,n.y-=this.y0,e=n.y/this.a,this.sphere?(e/=this.C_y,i=i/(this.C_x*(this.m+Math.cos(e))),this.m?e=Oh((this.m*e+Math.sin(e))/this.n):this.n!==1&&(e=Oh(Math.sin(e)/this.n)),i=kn(i+this.long0,this.over),e=Hh(e)):(e=qR(n.y/this.a,this.es,this.en),r=Math.abs(e),r<yn?(r=Math.sin(e),t=this.long0+n.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(e)),i=kn(t,this.over)):r-Rn<yn&&(i=this.long0)),n.x=i,n.y=e,n}var rje=["Sinusoidal","sinu"];const aje={init:ije,forward:Tte,inverse:Ate,names:rje};function oje(){this.sphere=!0,this.b=this.a,this.m=1,this.n=2.5707963267948966,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)}var sje=Tte,lje=Ate,uje=["Eckert_VI","eck6"];const cje={init:oje,forward:sje,inverse:lje,names:uje};function dje(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0}function hje(n){for(var e=n.x,t=n.y,i=kn(e-this.long0,this.over),r=t,a=Math.PI*Math.sin(t);;){var o=-(r+Math.sin(r)-a)/(1+Math.cos(r));if(r+=o,Math.abs(o)<Rn)break}r/=2,Math.PI/2-Math.abs(t)<Rn&&(i=0);var s=.900316316158*this.a*i*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return n.x=s,n.y=l,n}function fje(n){var e,t;n.x-=this.x0,n.y-=this.y0,t=n.y/(1.4142135623731*this.a),Math.abs(t)>.999999999999&&(t=.999999999999),e=Math.asin(t);var i=kn(this.long0+n.x/(.900316316158*this.a*Math.cos(e)),this.over);i<-Math.PI&&(i=-Math.PI),i>Math.PI&&(i=Math.PI),t=(2*e+Math.sin(2*e))/Math.PI,Math.abs(t)>1&&(t=1);var r=Math.asin(t);return n.x=i,n.y=r,n}var pje=["Mollweide","moll"];const vje={init:dje,forward:hje,inverse:fje,names:pje};function mje(){Math.abs(this.lat1+this.lat2)<Rn||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=U3(this.es),this.e1=V3(this.es),this.e2=H3(this.es),this.e3=W3(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=ec(this.e,this.sin_phi,this.cos_phi),this.ml1=Ps(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<Rn?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=ec(this.e,this.sin_phi,this.cos_phi),this.ml2=Ps(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Ps(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function gje(n){var e=n.x,t=n.y,i;if(this.sphere)i=this.a*(this.g-t);else{var r=Ps(this.e0,this.e1,this.e2,this.e3,t);i=this.a*(this.g-r)}var a=this.ns*kn(e-this.long0,this.over),o=this.x0+i*Math.sin(a),s=this.y0+this.rh-i*Math.cos(a);return n.x=o,n.y=s,n}function yje(n){n.x-=this.x0,n.y=this.rh-n.y+this.y0;var e,t,i,r;this.ns>=0?(t=Math.sqrt(n.x*n.x+n.y*n.y),e=1):(t=-Math.sqrt(n.x*n.x+n.y*n.y),e=-1);var a=0;if(t!==0&&(a=Math.atan2(e*n.x,e*n.y)),this.sphere)return r=kn(this.long0+a/this.ns,this.over),i=Hh(this.g-t/this.a),n.x=r,n.y=i,n;var o=this.g-t/this.a;return i=t_(o,this.e0,this.e1,this.e2,this.e3),r=kn(this.long0+a/this.ns,this.over),n.x=r,n.y=i,n}var _je=["Equidistant_Conic","eqdc"];const Sje={init:mje,forward:gje,inverse:yje,names:_je};function bje(){this.R=this.a}function xje(n){var e=n.x,t=n.y,i=kn(e-this.long0,this.over),r,a;Math.abs(t)<=Rn&&(r=this.x0+this.R*i,a=this.y0);var o=Oh(2*Math.abs(t/Math.PI));(Math.abs(i)<=Rn||Math.abs(Math.abs(t)-yn)<=Rn)&&(r=this.x0,t>=0?a=this.y0+Math.PI*this.R*Math.tan(.5*o):a=this.y0+Math.PI*this.R*-Math.tan(.5*o));var s=.5*Math.abs(Math.PI/i-i/Math.PI),l=s*s,u=Math.sin(o),c=Math.cos(o),d=c/(u+c-1),h=d*d,f=d*(2/u-1),p=f*f,m=Math.PI*this.R*(s*(d-p)+Math.sqrt(l*(d-p)*(d-p)-(p+l)*(h-p)))/(p+l);i<0&&(m=-m),r=this.x0+m;var v=l+d;return m=Math.PI*this.R*(f*v-s*Math.sqrt((p+l)*(l+1)-v*v))/(p+l),t>=0?a=this.y0+m:a=this.y0-m,n.x=r,n.y=a,n}function wje(n){var e,t,i,r,a,o,s,l,u,c,d,h,f;return n.x-=this.x0,n.y-=this.y0,d=Math.PI*this.R,i=n.x/d,r=n.y/d,a=i*i+r*r,o=-Math.abs(r)*(1+a),s=o-2*r*r+i*i,l=-2*o+1+2*r*r+a*a,f=r*r/l+(2*s*s*s/l/l/l-9*o*s/l/l)/27,u=(o-s*s/3/l)/l,c=2*Math.sqrt(-u/3),d=3*f/u/c,Math.abs(d)>1&&(d>=0?d=1:d=-1),h=Math.acos(d)/3,n.y>=0?t=(-c*Math.cos(h+Math.PI/3)-s/3/l)*Math.PI:t=-(-c*Math.cos(h+Math.PI/3)-s/3/l)*Math.PI,Math.abs(i)<Rn?e=this.long0:e=kn(this.long0+Math.PI*(a-1+Math.sqrt(1+2*(i*i-r*r)+a*a))/2/i,this.over),n.x=e,n.y=t,n}var Tje=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];const Aje={init:bje,forward:xje,inverse:wje,names:Tje};function Cje(n,e,t,i,r,a){const o=i-e,s=Math.atan((1-a)*Math.tan(n)),l=Math.atan((1-a)*Math.tan(t)),u=Math.sin(s),c=Math.cos(s),d=Math.sin(l),h=Math.cos(l);let f=o,p,m=100,v,g,_,S,x,A,C,M,I,D,E,P,F,V;do{if(v=Math.sin(f),g=Math.cos(f),_=Math.sqrt(h*v*(h*v)+(c*d-u*h*g)*(c*d-u*h*g)),_===0)return{azi1:0,s12:0};S=u*d+c*h*g,x=Math.atan2(_,S),A=c*h*v/_,C=1-A*A,M=C!==0?S-2*u*d/C:0,I=a/16*C*(4+a*(4-3*C)),p=f,f=o+(1-I)*a*A*(x+I*_*(M+I*S*(-1+2*M*M)))}while(Math.abs(f-p)>1e-12&&--m>0);return m===0?{azi1:NaN,s12:NaN}:(D=C*(r*r-r*(1-a)*(r*(1-a)))/(r*(1-a)*(r*(1-a))),E=1+D/16384*(4096+D*(-768+D*(320-175*D))),P=D/1024*(256+D*(-128+D*(74-47*D))),F=P*_*(M+P/4*(S*(-1+2*M*M)-P/6*M*(-3+4*_*_)*(-3+4*M*M))),V=r*(1-a)*E*(x-F),{azi1:Math.atan2(h*v,c*d-u*h*g),s12:V})}function Mje(n,e,t,i,r,a){const o=Math.atan((1-a)*Math.tan(n)),s=Math.sin(o),l=Math.cos(o),u=Math.sin(t),c=Math.cos(t),d=Math.atan2(s,l*c),h=l*u,f=1-h*h,p=f*(r*r-r*(1-a)*(r*(1-a)))/(r*(1-a)*(r*(1-a))),m=1+p/16384*(4096+p*(-768+p*(320-175*p))),v=p/1024*(256+p*(-128+p*(74-47*p)));let g=i/(r*(1-a)*m),_,S=100,x,A,C,M;do x=Math.cos(2*d+g),A=Math.sin(g),C=Math.cos(g),M=v*A*(x+v/4*(C*(-1+2*x*x)-v/6*x*(-3+4*A*A)*(-3+4*x*x))),_=g,g=i/(r*(1-a)*m)+M;while(Math.abs(g-_)>1e-12&&--S>0);if(S===0)return{lat2:NaN,lon2:NaN};const I=s*A-l*C*c,D=Math.atan2(s*C+l*A*c,(1-a)*Math.sqrt(h*h+I*I)),E=Math.atan2(A*u,l*C-s*A*c),P=a/16*f*(4+a*(4-3*f)),F=E-(1-P)*a*h*(g+P*A*(x+P*C*(-1+2*x*x))),V=e+F;return{lat2:D,lon2:V}}function Eje(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))}function Pje(n){var e=n.x,t=n.y,i=Math.sin(n.y),r=Math.cos(n.y),a=kn(e-this.long0,this.over),o,s,l,u,c,d,h,f,p,m,v;return this.sphere?Math.abs(this.sin_p12-1)<=Rn?(n.x=this.x0+this.a*(yn-t)*Math.sin(a),n.y=this.y0-this.a*(yn-t)*Math.cos(a),n):Math.abs(this.sin_p12+1)<=Rn?(n.x=this.x0+this.a*(yn+t)*Math.sin(a),n.y=this.y0+this.a*(yn+t)*Math.cos(a),n):(p=this.sin_p12*i+this.cos_p12*r*Math.cos(a),h=Math.acos(p),f=h?h/Math.sin(h):1,n.x=this.x0+this.a*f*r*Math.sin(a),n.y=this.y0+this.a*f*(this.cos_p12*i-this.sin_p12*r*Math.cos(a)),n):(o=U3(this.es),s=V3(this.es),l=H3(this.es),u=W3(this.es),Math.abs(this.sin_p12-1)<=Rn?(c=this.a*Ps(o,s,l,u,yn),d=this.a*Ps(o,s,l,u,t),n.x=this.x0+(c-d)*Math.sin(a),n.y=this.y0-(c-d)*Math.cos(a),n):Math.abs(this.sin_p12+1)<=Rn?(c=this.a*Ps(o,s,l,u,yn),d=this.a*Ps(o,s,l,u,t),n.x=this.x0+(c+d)*Math.sin(a),n.y=this.y0+(c+d)*Math.cos(a),n):Math.abs(e)<Rn&&Math.abs(t-this.lat0)<Rn?(n.x=n.y=0,n):(m=Cje(this.lat0,this.long0,t,e,this.a,this.f),v=m.azi1,n.x=m.s12*Math.sin(v),n.y=m.s12*Math.cos(v),n))}function Rje(n){n.x-=this.x0,n.y-=this.y0;var e,t,i,r,a,o,s,l,u,c,d,h,f,p,m,v;return this.sphere?(e=Math.sqrt(n.x*n.x+n.y*n.y),e>2*yn*this.a?void 0:(t=e/this.a,i=Math.sin(t),r=Math.cos(t),a=this.long0,Math.abs(e)<=Rn?o=this.lat0:(o=Oh(r*this.sin_p12+n.y*i*this.cos_p12/e),s=Math.abs(this.lat0)-yn,Math.abs(s)<=Rn?this.lat0>=0?a=kn(this.long0+Math.atan2(n.x,-n.y),this.over):a=kn(this.long0-Math.atan2(-n.x,n.y),this.over):a=kn(this.long0+Math.atan2(n.x*i,e*this.cos_p12*r-n.y*this.sin_p12*i),this.over)),n.x=a,n.y=o,n)):(l=U3(this.es),u=V3(this.es),c=H3(this.es),d=W3(this.es),Math.abs(this.sin_p12-1)<=Rn?(h=this.a*Ps(l,u,c,d,yn),e=Math.sqrt(n.x*n.x+n.y*n.y),f=h-e,o=t_(f/this.a,l,u,c,d),a=kn(this.long0+Math.atan2(n.x,-1*n.y),this.over),n.x=a,n.y=o,n):Math.abs(this.sin_p12+1)<=Rn?(h=this.a*Ps(l,u,c,d,yn),e=Math.sqrt(n.x*n.x+n.y*n.y),f=e-h,o=t_(f/this.a,l,u,c,d),a=kn(this.long0+Math.atan2(n.x,n.y),this.over),n.x=a,n.y=o,n):(p=Math.atan2(n.x,n.y),m=Math.sqrt(n.x*n.x+n.y*n.y),v=Mje(this.lat0,this.long0,p,m,this.a,this.f),n.x=v.lon2,n.y=v.lat2,n))}var Lje=["Azimuthal_Equidistant","aeqd"];const Ije={init:Eje,forward:Pje,inverse:Rje,names:Lje};function Dje(){this.sin_p14=Math.sin(this.lat0||0),this.cos_p14=Math.cos(this.lat0||0)}function Nje(n){var e,t,i,r,a,o,s,l,u=n.x,c=n.y;return i=kn(u-(this.long0||0),this.over),e=Math.sin(c),t=Math.cos(c),r=Math.cos(i),o=this.sin_p14*e+this.cos_p14*t*r,a=1,(o>0||Math.abs(o)<=Rn)&&(s=this.a*a*t*Math.sin(i),l=(this.y0||0)+this.a*a*(this.cos_p14*e-this.sin_p14*t*r)),n.x=s,n.y=l,n}function kje(n){var e,t,i,r,a,o,s,l,u;return n.x-=this.x0||0,n.y-=this.y0||0,e=Math.sqrt(n.x*n.x+n.y*n.y),t=Oh(e/this.a),i=Math.sin(t),r=Math.cos(t),l=this.long0||0,u=this.lat0||0,o=l,Math.abs(e)<=Rn?(s=u,n.x=o,n.y=s,n):(s=Oh(r*this.sin_p14+n.y*i*this.cos_p14/e),a=Math.abs(u)-yn,Math.abs(a)<=Rn?(u>=0?o=kn(l+Math.atan2(n.x,-n.y),this.over):o=kn(l-Math.atan2(-n.x,n.y),this.over),n.x=o,n.y=s,n):(o=kn(l+Math.atan2(n.x*i,e*this.cos_p14*r-n.y*this.sin_p14*i),this.over),n.x=o,n.y=s,n))}var Fje=["ortho"];const Oje={init:Dje,forward:Nje,inverse:kje,names:Fje};var Ca={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Or={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Bje(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=yn-Fr/2?this.face=Ca.TOP:this.lat0<=-(yn-Fr/2)?this.face=Ca.BOTTOM:Math.abs(this.long0)<=Fr?this.face=Ca.FRONT:Math.abs(this.long0)<=yn+Fr?this.face=this.long0>0?Ca.RIGHT:Ca.LEFT:this.face=Ca.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function zje(n){var e={x:0,y:0},t,i,r,a,o,s,l={value:0};if(n.x-=this.long0,this.es!==0?t=Math.atan(this.one_minus_f_squared*Math.tan(n.y)):t=n.y,i=n.x,this.face===Ca.TOP)a=yn-t,i>=Fr&&i<=yn+Fr?(l.value=Or.AREA_0,r=i-yn):i>yn+Fr||i<=-(yn+Fr)?(l.value=Or.AREA_1,r=i>0?i-Wa:i+Wa):i>-(yn+Fr)&&i<=-Fr?(l.value=Or.AREA_2,r=i+yn):(l.value=Or.AREA_3,r=i);else if(this.face===Ca.BOTTOM)a=yn+t,i>=Fr&&i<=yn+Fr?(l.value=Or.AREA_0,r=-i+yn):i<Fr&&i>=-Fr?(l.value=Or.AREA_1,r=-i):i<-Fr&&i>=-(yn+Fr)?(l.value=Or.AREA_2,r=-i-yn):(l.value=Or.AREA_3,r=i>0?-i+Wa:-i-Wa);else{var u,c,d,h,f,p,m;this.face===Ca.RIGHT?i=iv(i,+yn):this.face===Ca.BACK?i=iv(i,+Wa):this.face===Ca.LEFT&&(i=iv(i,-yn)),h=Math.sin(t),f=Math.cos(t),p=Math.sin(i),m=Math.cos(i),u=f*m,c=f*p,d=h,this.face===Ca.FRONT?(a=Math.acos(u),r=U4(a,d,c,l)):this.face===Ca.RIGHT?(a=Math.acos(c),r=U4(a,d,-u,l)):this.face===Ca.BACK?(a=Math.acos(-u),r=U4(a,d,-c,l)):this.face===Ca.LEFT?(a=Math.acos(-c),r=U4(a,d,u,l)):(a=r=0,l.value=Or.AREA_0)}return s=Math.atan(12/Wa*(r+Math.acos(Math.sin(r)*Math.cos(Fr))-yn)),o=Math.sqrt((1-Math.cos(a))/(Math.cos(s)*Math.cos(s))/(1-Math.cos(Math.atan(1/Math.cos(r))))),l.value===Or.AREA_1?s+=yn:l.value===Or.AREA_2?s+=Wa:l.value===Or.AREA_3&&(s+=1.5*Wa),e.x=o*Math.cos(s),e.y=o*Math.sin(s),e.x=e.x*this.a+this.x0,e.y=e.y*this.a+this.y0,n.x=e.x,n.y=e.y,n}function Gje(n){var e={lam:0,phi:0},t,i,r,a,o,s,l,u,c,d={value:0};if(n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,i=Math.atan(Math.sqrt(n.x*n.x+n.y*n.y)),t=Math.atan2(n.y,n.x),n.x>=0&&n.x>=Math.abs(n.y)?d.value=Or.AREA_0:n.y>=0&&n.y>=Math.abs(n.x)?(d.value=Or.AREA_1,t-=yn):n.x<0&&-n.x>=Math.abs(n.y)?(d.value=Or.AREA_2,t=t<0?t+Wa:t-Wa):(d.value=Or.AREA_3,t+=yn),c=Wa/12*Math.tan(t),o=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),s=Math.atan(o),r=Math.cos(t),a=Math.tan(i),l=1-r*r*a*a*(1-Math.cos(Math.atan(1/Math.cos(s)))),l<-1?l=-1:l>1&&(l=1),this.face===Ca.TOP)u=Math.acos(l),e.phi=yn-u,d.value===Or.AREA_0?e.lam=s+yn:d.value===Or.AREA_1?e.lam=s<0?s+Wa:s-Wa:d.value===Or.AREA_2?e.lam=s-yn:e.lam=s;else if(this.face===Ca.BOTTOM)u=Math.acos(l),e.phi=u-yn,d.value===Or.AREA_0?e.lam=-s+yn:d.value===Or.AREA_1?e.lam=-s:d.value===Or.AREA_2?e.lam=-s-yn:e.lam=s<0?-s-Wa:-s+Wa;else{var h,f,p;h=l,c=h*h,c>=1?p=0:p=Math.sqrt(1-c)*Math.sin(s),c+=p*p,c>=1?f=0:f=Math.sqrt(1-c),d.value===Or.AREA_1?(c=f,f=-p,p=c):d.value===Or.AREA_2?(f=-f,p=-p):d.value===Or.AREA_3&&(c=f,f=p,p=-c),this.face===Ca.RIGHT?(c=h,h=-f,f=c):this.face===Ca.BACK?(h=-h,f=-f):this.face===Ca.LEFT&&(c=h,h=f,f=-c),e.phi=Math.acos(-p)-yn,e.lam=Math.atan2(f,h),this.face===Ca.RIGHT?e.lam=iv(e.lam,-yn):this.face===Ca.BACK?e.lam=iv(e.lam,-Wa):this.face===Ca.LEFT&&(e.lam=iv(e.lam,+yn))}if(this.es!==0){var m,v,g;m=e.phi<0?1:0,v=Math.tan(e.phi),g=this.b/Math.sqrt(v*v+this.one_minus_f_squared),e.phi=Math.atan(Math.sqrt(this.a*this.a-g*g)/(this.one_minus_f*g)),m&&(e.phi=-e.phi)}return e.lam+=this.long0,n.x=e.lam,n.y=e.phi,n}function U4(n,e,t,i){var r;return n<Rn?(i.value=Or.AREA_0,r=0):(r=Math.atan2(e,t),Math.abs(r)<=Fr?i.value=Or.AREA_0:r>Fr&&r<=yn+Fr?(i.value=Or.AREA_1,r-=yn):r>yn+Fr||r<=-(yn+Fr)?(i.value=Or.AREA_2,r=r>=0?r-Wa:r+Wa):(i.value=Or.AREA_3,r+=yn)),r}function iv(n,e){var t=n+e;return t<-Wa?t+=c3:t>+Wa&&(t-=c3),t}var Uje=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const Vje={init:Bje,forward:zje,inverse:Gje,names:Uje};var _M=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],kg=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Cte=.8487,Mte=1.3523,Ete=Zs/5,Hje=1/Ete,U2=18,n_=function(n,e){return n[0]+e*(n[1]+e*(n[2]+e*n[3]))},Wje=function(n,e){return n[1]+e*(2*n[2]+e*3*n[3])};function jje(n,e,t,i){for(var r=e;i;--i){var a=n(r);if(r-=a,Math.abs(a)<t)break}return r}function $je(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function qje(n){var e=kn(n.x-this.long0,this.over),t=Math.abs(n.y),i=Math.floor(t*Ete);i<0?i=0:i>=U2&&(i=U2-1),t=Zs*(t-Hje*i);var r={x:n_(_M[i],t)*e,y:n_(kg[i],t)};return n.y<0&&(r.y=-r.y),r.x=r.x*this.a*Cte+this.x0,r.y=r.y*this.a*Mte+this.y0,r}function Xje(n){var e={x:(n.x-this.x0)/(this.a*Cte),y:Math.abs(n.y-this.y0)/(this.a*Mte)};if(e.y>=1)e.x/=_M[U2][0],e.y=n.y<0?-yn:yn;else{var t=Math.floor(e.y*U2);for(t<0?t=0:t>=U2&&(t=U2-1);;)if(kg[t][0]>e.y)--t;else if(kg[t+1][0]<=e.y)++t;else break;var i=kg[t],r=5*(e.y-i[0])/(kg[t+1][0]-i[0]);r=jje(function(a){return(n_(i,a)-e.y)/Wje(i,a)},r,Rn,100),e.x/=n_(_M[t],r),e.y=(5*t+r)*Da,n.y<0&&(e.y=-e.y)}return e.x=kn(e.x+this.long0,this.over),e}var Yje=["Robinson","robin"];const Kje={init:$je,forward:qje,inverse:Xje,names:Yje};function Zje(){this.name="geocent"}function Jje(n){var e=hte(n,this.es,this.a);return e}function Qje(n){var e=fte(n,this.es,this.a,this.b);return e}var e$e=["Geocentric","geocentric","geocent","Geocent"];const t$e={init:Zje,forward:Jje,inverse:Qje,names:e$e};var as={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},pg={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function n$e(){if(Object.keys(pg).forEach(function(t){if(typeof this[t]=="undefined")this[t]=pg[t].def;else{if(pg[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);pg[t].num&&(this[t]=parseFloat(this[t]))}pg[t].degrees&&(this[t]=this[t]*Da)}.bind(this)),Math.abs(Math.abs(this.lat0)-yn)<Rn?this.mode=this.lat0<0?as.S_POLE:as.N_POLE:Math.abs(this.lat0)<Rn?this.mode=as.EQUIT:(this.mode=as.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var n=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(n),this.sw=Math.sin(n)}function i$e(n){n.x-=this.long0;var e=Math.sin(n.y),t=Math.cos(n.y),i=Math.cos(n.x),r,a;switch(this.mode){case as.OBLIQ:a=this.sinph0*e+this.cosph0*t*i;break;case as.EQUIT:a=t*i;break;case as.S_POLE:a=-e;break;case as.N_POLE:a=e;break}switch(a=this.pn1/(this.p-a),r=a*t*Math.sin(n.x),this.mode){case as.OBLIQ:a*=this.cosph0*e-this.sinph0*t*i;break;case as.EQUIT:a*=e;break;case as.N_POLE:a*=-(t*i);break;case as.S_POLE:a*=t*i;break}var o,s;return o=a*this.cg+r*this.sg,s=1/(o*this.sw*this.h1+this.cw),r=(r*this.cg-a*this.sg)*this.cw*s,a=o*s,n.x=r*this.a,n.y=a*this.a,n}function r$e(n){n.x/=this.a,n.y/=this.a;var e={x:n.x,y:n.y},t,i,r;r=1/(this.pn1-n.y*this.sw),t=this.pn1*n.x*r,i=this.pn1*n.y*this.cw*r,n.x=t*this.cg+i*this.sg,n.y=i*this.cg-t*this.sg;var a=Ys(n.x,n.y);if(Math.abs(a)<Rn)e.x=0,e.y=n.y;else{var o,s;switch(s=1-a*a*this.pfact,s=(this.p-Math.sqrt(s))/(this.pn1/a+a/this.pn1),o=Math.sqrt(1-s*s),this.mode){case as.OBLIQ:e.y=Math.asin(o*this.sinph0+n.y*s*this.cosph0/a),n.y=(o-this.sinph0*Math.sin(e.y))*a,n.x*=s*this.cosph0;break;case as.EQUIT:e.y=Math.asin(n.y*s/a),n.y=o*a,n.x*=s;break;case as.N_POLE:e.y=Math.asin(o),n.y=-n.y;break;case as.S_POLE:e.y=-Math.asin(o);break}e.x=Math.atan2(n.x,n.y)}return n.x=e.x+this.long0,n.y=e.y,n}var a$e=["Tilted_Perspective","tpers"];const o$e={init:n$e,forward:i$e,inverse:r$e,names:a$e};function s$e(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var n=1-this.es,e=1/n;this.radius_p=Math.sqrt(n),this.radius_p2=n,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function l$e(n){var e=n.x,t=n.y,i,r,a,o;if(e=e-this.long0,this.shape==="ellipse"){t=Math.atan(this.radius_p2*Math.tan(t));var s=this.radius_p/Ys(this.radius_p*Math.cos(t),Math.sin(t));if(r=s*Math.cos(e)*Math.cos(t),a=s*Math.sin(e)*Math.cos(t),o=s*Math.sin(t),(this.radius_g-r)*r-a*a-o*o*this.radius_p_inv2<0)return n.x=Number.NaN,n.y=Number.NaN,n;i=this.radius_g-r,this.flip_axis?(n.x=this.radius_g_1*Math.atan(a/Ys(o,i)),n.y=this.radius_g_1*Math.atan(o/i)):(n.x=this.radius_g_1*Math.atan(a/i),n.y=this.radius_g_1*Math.atan(o/Ys(a,i)))}else this.shape==="sphere"&&(i=Math.cos(t),r=Math.cos(e)*i,a=Math.sin(e)*i,o=Math.sin(t),i=this.radius_g-r,this.flip_axis?(n.x=this.radius_g_1*Math.atan(a/Ys(o,i)),n.y=this.radius_g_1*Math.atan(o/i)):(n.x=this.radius_g_1*Math.atan(a/i),n.y=this.radius_g_1*Math.atan(o/Ys(a,i))));return n.x=n.x*this.a,n.y=n.y*this.a,n}function u$e(n){var e=-1,t=0,i=0,r,a,o,s;if(n.x=n.x/this.a,n.y=n.y/this.a,this.shape==="ellipse"){this.flip_axis?(i=Math.tan(n.y/this.radius_g_1),t=Math.tan(n.x/this.radius_g_1)*Ys(1,i)):(t=Math.tan(n.x/this.radius_g_1),i=Math.tan(n.y/this.radius_g_1)*Ys(1,t));var l=i/this.radius_p;if(r=t*t+l*l+e*e,a=2*this.radius_g*e,o=a*a-4*r*this.C,o<0)return n.x=Number.NaN,n.y=Number.NaN,n;s=(-a-Math.sqrt(o))/(2*r),e=this.radius_g+s*e,t*=s,i*=s,n.x=Math.atan2(t,e),n.y=Math.atan(i*Math.cos(n.x)/e),n.y=Math.atan(this.radius_p_inv2*Math.tan(n.y))}else if(this.shape==="sphere"){if(this.flip_axis?(i=Math.tan(n.y/this.radius_g_1),t=Math.tan(n.x/this.radius_g_1)*Math.sqrt(1+i*i)):(t=Math.tan(n.x/this.radius_g_1),i=Math.tan(n.y/this.radius_g_1)*Math.sqrt(1+t*t)),r=t*t+i*i+e*e,a=2*this.radius_g*e,o=a*a-4*r*this.C,o<0)return n.x=Number.NaN,n.y=Number.NaN,n;s=(-a-Math.sqrt(o))/(2*r),e=this.radius_g+s*e,t*=s,i*=s,n.x=Math.atan2(t,e),n.y=Math.atan(i*Math.cos(n.x)/e)}return n.x=n.x+this.long0,n}var c$e=["Geostationary Satellite View","Geostationary_Satellite","geos"];const d$e={init:s$e,forward:l$e,inverse:u$e,names:c$e};var u9=1.340264,c9=-.081106,d9=893e-6,h9=.003796,i_=Math.sqrt(3)/2;function h$e(){this.long0=this.long0!==void 0?this.long0:0,this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.es!==0&&(this.apa=xte(this.es),this.qp=qu(this.e,1),this.rqda=Math.sqrt(.5*this.qp))}function f$e(n){var e=kn(n.x-this.long0,this.over),t=n.y,i=Math.sin(t);this.es!==0&&(i=qu(this.e,i)/this.qp);var r=Math.asin(i_*i),a=r*r,o=a*a*a;return n.x=e*Math.cos(r)/(i_*(u9+3*c9*a+o*(7*d9+9*h9*a))),n.y=r*(u9+c9*a+o*(d9+h9*a)),this.es!==0&&(n.x*=this.rqda,n.y*=this.rqda),n.x=this.a*n.x+this.x0,n.y=this.a*n.y+this.y0,n}function p$e(n){n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,this.es!==0&&(n.x/=this.rqda,n.y/=this.rqda);var e=1e-9,t=12,i=n.y,r,a,o,s,l,u;for(u=0;u<t&&(r=i*i,a=r*r*r,o=i*(u9+c9*r+a*(d9+h9*r))-n.y,s=u9+3*c9*r+a*(7*d9+9*h9*r),i-=l=o/s,!(Math.abs(l)<e));++u);return r=i*i,a=r*r*r,n.x=i_*n.x*(u9+3*c9*r+a*(7*d9+9*h9*r))/Math.cos(i),n.y=Math.asin(Math.sin(i)/i_),this.es!==0&&(n.y=wte(n.y,this.apa)),n.x=kn(n.x+this.long0,this.over),n}var v$e=["eqearth","Equal Earth","Equal_Earth"];const m$e={init:h$e,forward:f$e,inverse:p$e,names:v$e};var f3=1e-10;function g$e(){var n;if(this.phi1=this.lat1,Math.abs(this.phi1)<f3)throw new Error;this.es?(this.en=$R(this.es),this.m1=om(this.phi1,this.am1=Math.sin(this.phi1),n=Math.cos(this.phi1),this.en),this.am1=n/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=_$e,this.forward=y$e):(Math.abs(this.phi1)+f3>=yn?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=b$e,this.forward=S$e)}function y$e(n){var e=kn(n.x-(this.long0||0),this.over),t=n.y,i,r,a;return i=this.am1+this.m1-om(t,r=Math.sin(t),a=Math.cos(t),this.en),r=a*e/(i*Math.sqrt(1-this.es*r*r)),n.x=i*Math.sin(r),n.y=this.am1-i*Math.cos(r),n.x=this.a*n.x+(this.x0||0),n.y=this.a*n.y+(this.y0||0),n}function _$e(n){n.x=(n.x-(this.x0||0))/this.a,n.y=(n.y-(this.y0||0))/this.a;var e,t,i,r;if(t=Ys(n.x,n.y=this.am1-n.y),r=qR(this.am1+this.m1-t,this.es,this.en),(e=Math.abs(r))<yn)e=Math.sin(r),i=t*Math.atan2(n.x,n.y)*Math.sqrt(1-this.es*e*e)/Math.cos(r);else if(Math.abs(e-yn)<=f3)i=0;else throw new Error;return n.x=kn(i+(this.long0||0),this.over),n.y=Hh(r),n}function S$e(n){var e=kn(n.x-(this.long0||0),this.over),t=n.y,i,r;return r=this.cphi1+this.phi1-t,Math.abs(r)>f3?(n.x=r*Math.sin(i=e*Math.cos(t)/r),n.y=this.cphi1-r*Math.cos(i)):n.x=n.y=0,n.x=this.a*n.x+(this.x0||0),n.y=this.a*n.y+(this.y0||0),n}function b$e(n){n.x=(n.x-(this.x0||0))/this.a,n.y=(n.y-(this.y0||0))/this.a;var e,t,i=Ys(n.x,n.y=this.cphi1-n.y);if(t=this.cphi1+this.phi1-i,Math.abs(t)>yn)throw new Error;return Math.abs(Math.abs(t)-yn)<=f3?e=0:e=i*Math.atan2(n.x,n.y)/Math.cos(t),n.x=kn(e+(this.long0||0),this.over),n.y=Hh(t),n}var x$e=["bonne","Bonne (Werner lat_1=90)"];const w$e={init:g$e,names:x$e},BW={OBLIQUE:{forward:E$e,inverse:R$e},TRANSVERSE:{forward:P$e,inverse:L$e}},r_={ROTATE:{o_alpha:"oAlpha",o_lon_c:"oLongC",o_lat_c:"oLatC"},NEW_POLE:{o_lat_p:"oLatP",o_lon_p:"oLongP"},NEW_EQUATOR:{o_lon_1:"oLong1",o_lat_1:"oLat1",o_lon_2:"oLong2",o_lat_2:"oLat2"}};function T$e(){if(this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.title=this.title||"General Oblique Transformation",this.isIdentity=lte.includes(this.o_proj),!this.o_proj)throw new Error("Missing parameter: o_proj");if(this.o_proj==="ob_tran")throw new Error("Invalid value for o_proj: "+this.o_proj);const n=this.projStr.replace("+proj=ob_tran","").replace("+o_proj=","+proj=").trim(),e=C0(n);if(!e)throw new Error("Invalid parameter: o_proj. Unknown projection "+this.o_proj);e.long0=0,this.obliqueProjection=e;let t;const i=Object.keys(r_),r=s=>{if(typeof this[s]=="undefined")return;const l=parseFloat(this[s])*Da;if(isNaN(l))throw new Error("Invalid value for "+s+": "+this[s]);return l};for(let s=0;s<i.length;s++){const l=i[s],u=r_[l],c=Object.entries(u);if(c.some(([h])=>typeof this[h]!="undefined")){t=u;for(let h=0;h<c.length;h++){const[f,p]=c[h],m=r(f);if(typeof m=="undefined")throw new Error("Missing parameter: "+f+".");this[p]=m}break}}if(!t)throw new Error("No valid parameters provided for ob_tran projection.");const{lamp:a,phip:o}=M$e(this,t);this.lamp=a,Math.abs(o)>Rn?(this.cphip=Math.cos(o),this.sphip=Math.sin(o),this.projectionType=BW.OBLIQUE):this.projectionType=BW.TRANSVERSE}function A$e(n){return this.projectionType.forward(this,n)}function C$e(n){return this.projectionType.inverse(this,n)}function M$e(n,e){let t,i;if(e===r_.ROTATE){let r=n.oLongC,a=n.oLatC,o=n.oAlpha;if(Math.abs(Math.abs(a)-yn)<=Rn)throw new Error("Invalid value for o_lat_c: "+n.o_lat_c+" should be < 90°");i=r+Math.atan2(-1*Math.cos(o),-1*Math.sin(o)*Math.sin(a)),t=Math.asin(Math.cos(a)*Math.sin(o))}else if(e===r_.NEW_POLE)i=n.oLongP,t=n.oLatP;else{let r=n.oLong1,a=n.oLat1,o=n.oLong2,s=n.oLat2,l=Math.abs(a);if(Math.abs(a)>yn-Rn)throw new Error("Invalid value for o_lat_1: "+n.o_lat_1+" should be < 90°");if(Math.abs(s)>yn-Rn)throw new Error("Invalid value for o_lat_2: "+n.o_lat_2+" should be < 90°");if(Math.abs(a-s)<Rn)throw new Error("Invalid value for o_lat_1 and o_lat_2: o_lat_1 should be different from o_lat_2");if(l<Rn)throw new Error("Invalid value for o_lat_1: o_lat_1 should be different from zero");i=Math.atan2(Math.cos(a)*Math.sin(s)*Math.cos(r)-Math.sin(a)*Math.cos(s)*Math.cos(o),Math.sin(a)*Math.cos(s)*Math.sin(o)-Math.cos(a)*Math.sin(s)*Math.sin(r)),t=Math.atan(-1*Math.cos(i-r)/Math.tan(a))}return{lamp:i,phip:t}}function E$e(n,e){let{x:t,y:i}=e;t=kn(t-n.long0,n.over);const r=Math.cos(t),a=Math.sin(i),o=Math.cos(i);e.x=kn(Math.atan2(o*Math.sin(t),n.sphip*o*r+n.cphip*a)+n.lamp),e.y=Math.asin(n.sphip*a-n.cphip*o*r);const s=n.obliqueProjection.forward(e);return n.isIdentity&&(s.x*=Zs,s.y*=Zs),s}function P$e(n,e){let{x:t,y:i}=e;t=kn(t-n.long0,n.over);const r=Math.cos(i),a=Math.cos(t);e.x=kn(Math.atan2(r*Math.sin(t),Math.sin(i))+n.lamp),e.y=Math.asin(-1*r*a);const o=n.obliqueProjection.forward(e);return n.isIdentity&&(o.x*=Zs,o.y*=Zs),o}function R$e(n,e){n.isIdentity&&(e.x*=Da,e.y*=Da);const t=n.obliqueProjection.inverse(e);let{x:i,y:r}=t;if(i<Number.MAX_VALUE){i-=n.lamp;const a=Math.cos(i),o=Math.sin(r),s=Math.cos(r);e.x=Math.atan2(s*Math.sin(i),n.sphip*s*a-n.cphip*o),e.y=Math.asin(n.sphip*o+n.cphip*s*a)}return e.x=kn(e.x+n.long0),e}function L$e(n,e){n.isIdentity&&(e.x*=Da,e.y*=Da);const t=n.obliqueProjection.inverse(e);let{x:i,y:r}=t;if(i<Number.MAX_VALUE){const a=Math.cos(r);i-=n.lamp,e.x=Math.atan2(a*Math.sin(i),-1*Math.sin(r)),e.y=Math.asin(a*Math.cos(i))}return e.x=kn(e.x+n.long0),e}var I$e=["General Oblique Transformation","General_Oblique_Transformation","ob_tran"];const D$e={init:T$e,forward:A$e,inverse:C$e,names:I$e};function N$e(n){n.Proj.projections.add(x5),n.Proj.projections.add(w5),n.Proj.projections.add(SHe),n.Proj.projections.add(RHe),n.Proj.projections.add(kHe),n.Proj.projections.add(GHe),n.Proj.projections.add($He),n.Proj.projections.add(ZHe),n.Proj.projections.add(nWe),n.Proj.projections.add(sWe),n.Proj.projections.add(yWe),n.Proj.projections.add(TWe),n.Proj.projections.add(PWe),n.Proj.projections.add(kWe),n.Proj.projections.add(GWe),n.Proj.projections.add(jWe),n.Proj.projections.add(KWe),n.Proj.projections.add(tje),n.Proj.projections.add(aje),n.Proj.projections.add(cje),n.Proj.projections.add(vje),n.Proj.projections.add(Sje),n.Proj.projections.add(Aje),n.Proj.projections.add(Ije),n.Proj.projections.add(Oje),n.Proj.projections.add(Vje),n.Proj.projections.add(Kje),n.Proj.projections.add(t$e),n.Proj.projections.add(o$e),n.Proj.projections.add(d$e),n.Proj.projections.add(m$e),n.Proj.projections.add(w$e),n.Proj.projections.add(D$e)}const S7=Object.assign(OVe,{defaultDatum:"WGS84",Proj:C0,WGS84:new C0("WGS84"),Point:Nv,toPoint:WR,defs:zo,nadgrid:mVe,transform:FVe,mgrs:BVe,version:"__VERSION__"});N$e(S7);try{let n=()=>new DecompressionStream("deflate-raw"),e=t=>new Response(t);n(),Pte=t=>e(e(t).body.pipeThrough(n())).arrayBuffer().then(i=>new Uint8Array(i))}catch(n){}var Pte,zW=new TextDecoder,AT=n=>{throw Error("but-unzip~"+n)};function*k$e(n,e=Pte){let t=n.length-21,i=t-65536,r=new DataView(n.buffer,n.byteOffset),a=l=>r.getUint16(l+t,1),o=l=>r.getUint32(l+t,1),s=(l,u)=>n.subarray(t+=l,t+=u);for(;t>i&&(t=n.lastIndexOf(80,t-1))+1&&(n[t+1]-75||n[t+2]-5||n[t+3]-6););for(t<0&&AT(2),i=a(10),i-a(8)&&AT(3),t=o(16);i--;){let l=a(10),u=a(28),c=a(30),d=a(32),h=o(20),f=o(42),p=zW.decode(s(46,u)),m=zW.decode(s(c,d)),v=t,g;t=f,g=s(30+a(26)+a(28),h),yield{filename:p,comment:m,read:()=>l-8?l?AT(1):g:e(g)},t=v}}const F$e=/.+\.(shp|dbf|json|prj|cpg)$/i,O$e=n=>rn(void 0,null,function*(){const e={},t=[];for(const a of k$e(n))F$e.test(a.filename)&&t.push(Promise.resolve(a.read()).then(o=>e[a.filename]=o));yield Promise.all(t);const i={},r=new TextDecoder;for(const[a,o]of Object.entries(e))a.slice(-3).toLowerCase()==="shp"||a.slice(-3).toLowerCase()==="dbf"?i[a]=new DataView(o.buffer,o.byteOffset,o.byteLength):i[a]=r.decode(o);return i}),B$e=globalThis.URL,z$e=(n,e)=>{if(!e)return n;const t=new B$e(n);return t.pathname=`${t.pathname}.${e}`,t.href};function p3(n,e){return rn(this,null,function*(){const t=z$e(n,e),i=e==="prj"||e==="cpg";try{const r=yield fetch(t);if(r.status>399)throw new Error(r.statusText);if(i)return r.text();const a=yield r.arrayBuffer();return new DataView(a)}catch(r){if(i||e==="dbf")return!1;throw r}})}function G$e(n){let e=0,t=1;const i=n.length;let r,a;const o=[n[0][0],n[0][1],n[0][0],n[0][1]];for(;t<i;)r=a||n[0],a=n[t],e+=(a[0]-r[0])*(a[1]+r[1]),t++,a[0]<o[0]&&(o[0]=a[0]),a[1]<o[1]&&(o[1]=a[1]),a[0]>o[2]&&(o[2]=a[0]),a[1]>o[3]&&(o[3]=a[1]);return{ring:n,clockWise:e>0,bbox:o,children:[]}}function GW(n,e){return!(n.bbox[0]>e.bbox[0]||n.bbox[1]>e.bbox[1]||n.bbox[2]<e.bbox[2]||n.bbox[3]<e.bbox[3])}function Rte(n,e=!1){const t=[],i=[];for(const o of n){const s=G$e(o);s.clockWise!==e?t.push(s):i.push(s)}const r=[];for(const o of i){let s;for(const l of t)GW(l,o)&&(s?GW(s,l)&&(s=l):s=l);s?s.children.push(o.ring):r.push(o)}if(e)return{outers:t,orphens:r};if(r.length&&!e){const o=Rte(n,!0);if(o.orphens.length===0){const s=[];for(const l of o.outers)s.push([l.ring.toReversed()].concat(l.children.map(u=>u.toReversed())));return s}}const a=[];for(const o of t)a.push([o.ring].concat(o.children));return a}Ka.prototype.parsePoint=function(n){return{type:"Point",coordinates:this.parseCoord(n,0)}};Ka.prototype.parseZPoint=function(n){const e=this.parsePoint(n);return e.coordinates.push(n.getFloat64(16,!0)),e};Ka.prototype.parsePointArray=function(n,e,t){const i=[];let r=0;for(;r<t;)i.push(this.parseCoord(n,e)),e+=16,r++;return i};Ka.prototype.parseZPointArray=function(n,e,t,i){let r=0;for(;r<t;)i[r].push(n.getFloat64(e,!0)),r++,e+=8;return i};Ka.prototype.parseArrayGroup=function(n,e,t,i,r){const a=[];let o=0,s,l=0,u;for(;o<i;)o++,t+=4,s=l,o===i?l=r:l=n.getInt32(t,!0),u=l-s,u&&(a.push(this.parsePointArray(n,e,u)),e+=u<<4);return a};Ka.prototype.parseZArrayGroup=function(n,e,t,i){let r=0;for(;r<t;)i[r]=this.parseZPointArray(n,e,i[r].length,i[r]),e+=i[r].length<<3,r++;return i};Ka.prototype.parseMultiPoint=function(n){const e={},t=n.getInt32(32,!0);if(!t)return null;const i=this.parseCoord(n,0),r=this.parseCoord(n,16);e.bbox=[i[0],i[1],r[0],r[1]];const a=36;return t===1?(e.type="Point",e.coordinates=this.parseCoord(n,a)):(e.type="MultiPoint",e.coordinates=this.parsePointArray(n,a,t)),e};Ka.prototype.parseZMultiPoint=function(n){const e=this.parseMultiPoint(n);if(!e)return null;let t;if(e.type==="Point")return e.coordinates.push(n.getFloat64(72,!0)),e;t=e.coordinates.length;const i=52+(t<<4);return e.coordinates=this.parseZPointArray(n,i,t,e.coordinates),e};Ka.prototype.parsePolyline=function(n){const e={},t=n.getInt32(32,!0);if(!t)return null;const i=this.parseCoord(n,0),r=this.parseCoord(n,16);e.bbox=[i[0],i[1],r[0],r[1]];const a=n.getInt32(36,!0);let o,s;return t===1?(e.type="LineString",o=44,e.coordinates=this.parsePointArray(n,o,a)):(e.type="MultiLineString",o=40+(t<<2),s=40,e.coordinates=this.parseArrayGroup(n,o,s,t,a)),e};Ka.prototype.parseZPolyline=function(n){const e=this.parsePolyline(n);if(!e)return null;const t=e.coordinates.length;let i;return e.type==="LineString"?(i=60+(t<<4),e.coordinates=this.parseZPointArray(n,i,t,e.coordinates),e):(i=56+(e.coordinates.reduce(function(a,o){return a+o.length},0)<<4)+(t<<2),e.coordinates=this.parseZArrayGroup(n,i,t,e.coordinates),e)};Ka.prototype.polyFuncs=function(n){return n&&(n.type==="LineString"?(n.type="Polygon",n.coordinates=[n.coordinates],n):(n.coordinates=Rte(n.coordinates),n.coordinates.length===1?(n.type="Polygon",n.coordinates=n.coordinates[0],n):(n.type="MultiPolygon",n)))};Ka.prototype.parsePolygon=function(n){return this.polyFuncs(this.parsePolyline(n))};Ka.prototype.parseZPolygon=function(n){return this.polyFuncs(this.parseZPolyline(n))};const UW={1:"parsePoint",3:"parsePolyline",5:"parsePolygon",8:"parseMultiPoint",11:"parseZPoint",13:"parseZPolyline",15:"parseZPolygon",18:"parseZMultiPoint"};function U$e(n){return n?function(e,t){const i=[e.getFloat64(t,!0),e.getFloat64(t+8,!0)];return n.inverse(i)}:function(e,t){return[e.getFloat64(t,!0),e.getFloat64(t+8,!0)]}}function Ka(n,e){if(!(this instanceof Ka))return new Ka(n,e);this.buffer=n,this.headers=this.parseHeader(),this.shpFuncs(e),this.rows=this.getRows()}Ka.prototype.shpFuncs=function(n){let e=this.headers.shpCode;if(e>20&&(e-=20),!(e in UW))throw new Error(`I don't know shp type "${e}"`);this.parseFunc=this[UW[e]],this.parseCoord=U$e(n)};Ka.prototype.getShpCode=function(){return this.parseHeader().shpCode};Ka.prototype.parseHeader=function(){const n=this.buffer;return{length:n.getInt32(24)<<1,version:n.getInt32(28,!0),shpCode:n.getInt32(32,!0),bbox:[n.getFloat64(36,!0),n.getFloat64(44,!0),n.getFloat64(52,!0),n.getFloat64(60,!0)]}};Ka.prototype.getRows=function(){let n=100;const e=this.buffer.byteLength-8,t=[];let i;for(;n<=e&&(i=this.getRow(n),!!i);)n+=8,n+=i.len,i.type?t.push(this.parseFunc(i.data)):t.push(null);return t};Ka.prototype.getRow=function(n){const e=this.buffer.getInt32(n),t=this.buffer.getInt32(n+4)<<1;if(t===0)return{id:e,len:t,type:0};if(!(n+t+8>this.buffer.byteLength))return{id:e,len:t,data:new DataView(this.buffer.buffer,this.buffer.byteOffset+n+12,t-4),type:this.buffer.getInt32(n+8,!0)}};function QR(n,e){return new Ka(n,e).rows}var V$e=/^(?:ANSI\s)?(\d+)$/m;function Lte(n,e){if(!n)return i;try{new TextDecoder(n.trim())}catch(r){var t=V$e.exec(n);return t&&!e?Lte("windows-"+t[1],!0):(n=void 0,i)}return i;function i(r){var a=new TextDecoder(n||void 0),o=a.decode(r,{stream:!0})+a.decode();return o.replace(/\0/g,"").trim()}}function H$e(n){var e={};return e.lastUpdated=new Date(n.getUint8(1)+1900,n.getUint8(2),n.getUint8(3)),e.records=n.getUint32(4,!0),e.headerLen=n.getUint16(8,!0),e.recLen=n.getUint16(10,!0),e}function W$e(n,e,t){for(var i=[],r=32;r<e&&(i.push({name:t(new Uint8Array(n.buffer.slice(n.byteOffset+r,n.byteOffset+r+11))),dataType:String.fromCharCode(n.getUint8(r+11)),len:n.getUint8(r+16),decimal:n.getUint8(r+17)}),n.getUint8(r+32)!==13);)r+=32;return i}function j$e(n,e,t,i,r){const a=new Uint8Array(n.buffer.slice(n.byteOffset+e,n.byteOffset+e+t));var o=r(a);switch(i){case"N":case"F":case"O":return parseFloat(o,10);case"D":return new Date(o.slice(0,4),parseInt(o.slice(4,6),10)-1,o.slice(6,8));case"L":return o.toLowerCase()==="y"||o.toLowerCase()==="t";default:return o}}function $$e(n,e,t,i){for(var r={},a=0,o=t.length,s,l;a<o;)l=t[a],s=j$e(n,e,l.len,l.dataType,i),e+=l.len,typeof s!="undefined"&&(r[l.name]=s),a++;return r}function eL(n,e){for(var t=Lte(e),i=H$e(n),r=W$e(n,i.headerLen-1,t),a=(r.length+1<<5)+2,o=i.recLen,s=i.records,l=[];s;)l.push($$e(n,a,r,t)),a+=o,s--;return l}const q$e=globalThis.URL,X$e=n=>{if(!n)throw new Error("forgot to pass buffer");if(kv(n))return new Uint8Array(n);if(kv(n.buffer))return n.BYTES_PER_ELEMENT===1?n:new Uint8Array(n.buffer,n.byteOffset,n.byteLength);throw new Error("invalid buffer like object")},Y$e=new TextDecoder,Ite=n=>{if(n){if(typeof n=="string")return n;if(kv(n)||ArrayBuffer.isView(n)||tL(n))return Y$e.decode(n)}},Dte=n=>{if(!n)throw new Error("forgot to pass buffer");if(tL(n))return n;if(kv(n))return new DataView(n);if(kv(n.buffer))return new DataView(n.buffer,n.byteOffset,n.byteLength);throw new Error("invalid buffer like object")};function kv(n){return n instanceof globalThis.ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]"}function tL(n){return n instanceof globalThis.DataView||Object.prototype.toString.call(n)==="[object DataView]"}const nL=function([n,e]){const t={};t.type="FeatureCollection",t.features=[];let i=0;const r=n.length;for(e||(e=[]);i<r;)t.features.push({type:"Feature",geometry:n[i],properties:e[i]||{}}),i++;return t},Nte=function(n,e){return rn(this,null,function*(){let t;n=X$e(n);const i=yield O$e(n),r=[];e=e||[];for(t in i)t.indexOf("__MACOSX")===-1&&(t.slice(-4).toLowerCase()===".shp"?(r.push(t.slice(0,-4)),i[t.slice(0,-3)+t.slice(-3).toLowerCase()]=i[t]):t.slice(-4).toLowerCase()===".prj"?i[t.slice(0,-3)+t.slice(-3).toLowerCase()]=S7(i[t]):t.slice(-5).toLowerCase()===".json"||e.indexOf(t.split(".").pop())>-1?r.push(t.slice(0,-3)+t.slice(-3).toLowerCase()):(t.slice(-4).toLowerCase()===".dbf"||t.slice(-4).toLowerCase()===".cpg")&&(i[t.slice(0,-3)+t.slice(-3).toLowerCase()]=i[t]));if(!r.length)throw new Error("no layers founds");const a=r.map(function(o){let s,l;const u=o.lastIndexOf(".");return u>-1&&o.slice(u).indexOf("json")>-1?(s=JSON.parse(i[o]),s.fileName=o.slice(0,u)):e.indexOf(o.slice(u+1))>-1?(s=i[o],s.fileName=o):(i[o+".dbf"]&&(l=eL(i[o+".dbf"],i[o+".cpg"])),s=nL([QR(i[o+".shp"],i[o+".prj"]),l]),s.fileName=o),s});return a.length===1?a[0]:a})};function K$e(n,e){return rn(this,null,function*(){const t=yield p3(n);return Nte(t,e)})}const Z$e=n=>rn(void 0,null,function*(){const e=yield Promise.all([p3(n,"shp"),p3(n,"prj")]);let t=!1;try{e[1]&&(t=S7(e[1]))}catch(i){t=!1}return QR(e[0],t)}),J$e=n=>rn(void 0,null,function*(){const[e,t]=yield Promise.all([p3(n,"dbf"),p3(n,"cpg")]);if(e)return eL(e,t)}),VW=(n,e)=>{var i;return new q$e(n,(i=globalThis==null?void 0:globalThis.document)==null?void 0:i.location).pathname.slice(-4).toLowerCase()===e},Q$e=({shp:n,dbf:e,cpg:t,prj:i})=>{const r=[tqe(n,i)];return e&&r.push(nqe(e,t)),nL(r)},eqe=function(n,e){return rn(this,null,function*(){if(typeof n!="string"){if(kv(n)||ArrayBuffer.isView(n)||tL(n))return Nte(n);if(n.shp)return Q$e(n);throw new TypeError("must be a string, some sort of Buffer, or an object with at least a .shp property")}if(VW(n,".zip"))return K$e(n,e);VW(n,".shp")&&(n=n.slice(0,-4));const t=yield Promise.all([Z$e(n),J$e(n)]);return nL(t)})},tqe=function(n,e){if(n=Dte(n),e=Ite(e),typeof e=="string")try{e=S7(e)}catch(t){e=!1}return QR(n,e)},nqe=function(n,e){return n=Dte(n),e=Ite(e),eL(n,e)};const iqe={class:"engineering-analysis-panel"},rqe={class:"analysis-card analysis-workbench"},aqe={class:"analysis-card-head"},oqe={key:0},sqe=["disabled"],lqe=["disabled"],uqe={key:1,class:"analysis-drawing-stage"},cqe={class:"analysis-point-count"},dqe=["disabled"],hqe=["disabled"],fqe={key:2,class:"analysis-boundary-bar"},pqe={class:"analysis-card analysis-result"},vqe={class:"analysis-card-head"},mqe={key:0},gqe={key:0,class:"analysis-empty"},yqe={class:"analysis-conclusion-head"},_qe={class:"analysis-conclusion-tags"},Sqe={key:0,class:"analysis-empty is-success"},bqe={key:1,class:"analysis-project-list"},xqe=["onPointerup"],wqe={class:"analysis-project-name"},Tqe={class:"analysis-project-meta"},Aqe={__name:"EngineeringAnalysisPanel",props:{drawingPointCount:{type:Number,default:0}},emits:["drawing-change","finish-drawing","undo-point","clear-boundary","analysis-result","focus-project"],setup(n,{expose:e,emit:t}){const i=n,r=t,a=Wt(!1),o=Wt(null),s=Wt([]),l=Wt([]),u=Wt(""),c=Wt("idle"),d=Wt([]);let h=null;const f=Ye(()=>{var mt;const Ce=l.value.length,We=s.value.length,$e=s.value.reduce((Yt,st)=>Yt+Number(st.overlapAreaWanMu||0),0);return{boundaryAreaWanMu:Ft((mt=o.value)==null?void 0:mt.geometry),featureCount:Ce,projectCount:We,overlapAreaWanMu:$e}}),p=Ye(()=>u.value?u.value:c.value==="loading"?"项目库加载中":c.value==="error"?"项目库加载失败":""),m=Ye(()=>o.value?s.value.length?"已发现建设记录":"未发现建设记录":"未分析"),v=Ye(()=>a.value&&i.drawingPointCount>=3),g=Ye(()=>{if(!o.value)return{levelClass:"",verdict:"",summary:"",tags:[],advice:""};if(!s.value.length)return{levelClass:"is-clear",verdict:"未发现建设记录",summary:"该边界范围暂未与项目库中的已建设工程形成空间叠加。",tags:[`分析范围 ${J(f.value.boundaryAreaWanMu)} 万亩`,"项目库未命中"],advice:"可进入新增工程选址论证,仍需结合保护红线、审批台账和现场踏勘复核。"};const Ce=Ue(s.value),We=xt(s.value),$e=[...s.value].sort((st,it)=>Number(it.overlapAreaWanMu||0)-Number(st.overlapAreaWanMu||0))[0],mt=ee(f.value.overlapAreaWanMu),Yt=s.value.length>=6||f.value.overlapAreaWanMu>=1?"存在建设叠加":"存在局部叠加";return{levelClass:s.value.length>=6?"is-heavy":"is-hit",verdict:Yt,summary:`该边界命中 ${s.value.length} 个历史项目,叠加约 ${mt} 亩,项目类型以${Ce.name}为主,年份集中在 ${We}。`,tags:[`主类型 ${Ce.name}`,`年份 ${We}`,`最大叠加 ${ee($e==null?void 0:$e.overlapAreaWanMu)} 亩`],advice:`重点复核“${Bt($e==null?void 0:$e.projectName)}”(${($e==null?void 0:$e.year)||"未知"},${($e==null?void 0:$e.category)||"未知类型"})与拟建范围的重合边界。`}});dl(()=>{F().catch(()=>{})});function _(Ce){return rn(this,null,function*(){var $e;const We=($e=Ce.target.files)==null?void 0:$e[0];if(Ce.target.value="",!!We){u.value="";try{const mt=yield S(We);a.value&&(a.value=!1,r("drawing-change",!1)),r("clear-boundary"),yield P(mt)}catch(mt){u.value="边界文件解析失败"}}})}function S(Ce){return rn(this,null,function*(){const We=String(Ce.name||"").toLowerCase();if(We.endsWith(".json")||We.endsWith(".geojson"))return x(JSON.parse(yield Ce.text()));if(We.endsWith(".zip")){const $e=yield eqe(yield Ce.arrayBuffer());return x($e)}throw new Error("unsupported file")})}function x(Ce){const We=G(Ce).filter($e=>xe($e==null?void 0:$e.geometry));if(We.length)return W(We);throw new Error("no polygon")}function A(){a.value||(u.value="",a.value=!0,o.value=null,s.value=[],l.value=[],r("analysis-result",{boundary:null,matches:[],rows:[],summary:f.value}),r("drawing-change",!0))}function C(){a.value&&(a.value=!1,r("clear-boundary"),r("analysis-result",{boundary:null,matches:[],rows:[],summary:f.value}))}function M(){v.value&&r("finish-drawing")}function I(){r("undo-point")}function D(){a.value=!1,o.value=null,s.value=[],l.value=[],u.value="",r("clear-boundary"),r("analysis-result",{boundary:null,matches:[],rows:[],summary:f.value})}function E(Ce){Ce!=null&&Ce.geometry&&(a.value=!1,P(Ce))}function P(Ce){return rn(this,null,function*(){o.value=Ce,l.value=[],s.value=[];let We=[];try{const $e=yield F();We=Y(Ce,$e),l.value=We,s.value=Q(We)}catch($e){u.value="项目库加载失败"}r("analysis-result",{boundary:Ce,matches:We,rows:s.value,summary:f.value})})}function F(){return rn(this,null,function*(){return d.value.length?d.value:h||(c.value="loading",h=fetch(V("datas/ecological-protection/ecological_restoration_projects.geojson"),{credentials:"include"}).then(We=>{if(!We.ok)throw new Error(`HTTP ${We.status}`);return We.json()}).then(We=>{const $e=G(We).filter(mt=>{var Yt;return(Yt=mt==null?void 0:mt.geometry)==null?void 0:Yt.coordinates}).map((mt,Yt)=>tn(wt({},mt),{properties:tn(wt({},mt.properties||{}),{source_index:Yt})}));return d.value=$e,c.value="success",$e}).catch(We=>{throw c.value="error",h=null,We}),h)})}function V(Ce){return Ce?/^https?:\/\//.test(Ce)||Ce.startsWith("/")?Ce:`./${Ce}`:""}function G(Ce){return Ce?Array.isArray(Ce)?Ce.flatMap(We=>G(We)):Ce.type==="FeatureCollection"?(Ce.features||[]).filter(Boolean):Ce.type==="Feature"?Ce.geometry?[Ce]:[]:Fe(Ce)?[{type:"Feature",properties:{},geometry:Ce}]:typeof Ce=="object"?Object.values(Ce).flatMap(We=>G(We)):[]:[]}function W(Ce){const We=Ce.flatMap($e=>$e.geometry.type==="Polygon"?[$e.geometry.coordinates]:$e.geometry.coordinates);return We.length===1?{type:"Feature",properties:Ce[0].properties||{},geometry:{type:"Polygon",coordinates:We[0]}}:{type:"Feature",properties:{sourceFeatureCount:Ce.length},geometry:{type:"MultiPolygon",coordinates:We}}}function Y(Ce,We=d.value){const $e=Ae(Ce.geometry);return We.filter(mt=>K(mt.geometry,Ce.geometry,$e)).map(mt=>({feature:mt,properties:mt.properties||{},overlapAreaWanMu:Ee(mt,Ce.geometry)}))}function Q(Ce){const We=new Map;return Ce.forEach($e=>{const mt=$e.properties||{},Yt=mt.project_name||mt.projectName||"未命名项目",st=We.get(Yt)||{key:Yt,projectName:Yt,category:mt.project_category||"未知类型",year:mt.year||"未知",featureCount:0,overlapAreaWanMu:0,features:[],sourceIndex:Number(mt.source_index||0)};st.featureCount+=1,st.overlapAreaWanMu+=Number($e.overlapAreaWanMu||0),st.features.push($e.feature),We.set(Yt,st)}),[...We.values()].map($e=>tn(wt({},$e),{overlapAreaWanMu:Number($e.overlapAreaWanMu.toFixed(4))}))}function K(Ce,We,$e){if(!Lt(Ae(Ce),$e))return!1;const mt=He(We);return mt.length?xe(Ce)?ae(Ce,mt):(Ce==null?void 0:Ce.type)==="Point"?pt(Ce.coordinates,mt):(Ce==null?void 0:Ce.type)==="MultiPoint"?Ce.coordinates.some(Yt=>pt(Yt,mt)):(Ce==null?void 0:Ce.type)==="LineString"?ie(Ce.coordinates,mt):(Ce==null?void 0:Ce.type)==="MultiLineString"?Ce.coordinates.some(Yt=>ie(Yt,mt)):!1:!1}function ae(Ce,We){const $e=He(Ce);return $e.length?$e.some(mt=>mt.some(Yt=>pt(Yt,We)))||We.some(mt=>mt.some(Yt=>pt(Yt,$e)))||$e.some(mt=>We.some(Yt=>bt(mt,Yt))):!1}function ie(Ce=[],We){return!Array.isArray(Ce)||!Ce.length?!1:Ce.some($e=>pt($e,We))?!0:We.some($e=>he(Ce,$e))}function he(Ce,We){for(let $e=1;$e<Ce.length;$e+=1)for(let mt=1;mt<We.length;mt+=1)if(ht(Ce[$e-1],Ce[$e],We[mt-1],We[mt]))return!0;return!1}function Ee(Ce,We){const $e=Ce==null?void 0:Ce.geometry,mt=He($e),Yt=He(We),st=vt(Ce),it=Ft(We);if(!mt.length||!Yt.length)return 0;const Vt=mt.reduce((cn,an)=>cn+an.filter(Ln=>pt(Ln,Yt)).length,0),Zt=mt.reduce((cn,an)=>cn+an.length,0);return Vt?Number((st*Math.max(.08,Math.min(1,Vt/Math.max(Zt,1)))).toFixed(4)):Yt.reduce((cn,an)=>cn+an.filter(Ln=>pt(Ln,mt)).length,0)?Number(Math.min(st,it).toFixed(4)):mt.some(cn=>Yt.some(an=>bt(cn,an)))?Number((Math.min(st,it)*.12).toFixed(4)):0}function He(Ce){var We;return(Ce==null?void 0:Ce.type)==="Polygon"?[((We=Ce.coordinates)==null?void 0:We[0])||[]]:(Ce==null?void 0:Ce.type)==="MultiPolygon"?Ce.coordinates.map($e=>($e==null?void 0:$e[0])||[]).filter($e=>$e.length):[]}function xe(Ce){return(Ce==null?void 0:Ce.type)==="Polygon"||(Ce==null?void 0:Ce.type)==="MultiPolygon"}function Fe(Ce){return["Polygon","MultiPolygon","LineString","MultiLineString","Point","MultiPoint"].includes(Ce==null?void 0:Ce.type)}function pt(Ce,We){return We.some($e=>Ot(Ce,$e))}function Ot(Ce,We){var st,it,Vt,Zt;let $e=!1;const mt=Number(Ce==null?void 0:Ce[0]),Yt=Number(Ce==null?void 0:Ce[1]);for(let nn=0,cn=We.length-1;nn<We.length;cn=nn++){const an=Number((st=We[nn])==null?void 0:st[0]),Ln=Number((it=We[nn])==null?void 0:it[1]),je=Number((Vt=We[cn])==null?void 0:Vt[0]),Ht=Number((Zt=We[cn])==null?void 0:Zt[1]);Ln>Yt!=Ht>Yt&&mt<(je-an)*(Yt-Ln)/(Ht-Ln)+an&&($e=!$e)}return $e}function bt(Ce,We){for(let $e=1;$e<Ce.length;$e+=1)for(let mt=1;mt<We.length;mt+=1)if(ht(Ce[$e-1],Ce[$e],We[mt-1],We[mt]))return!0;return!1}function ht(Ce,We,$e,mt){if(!Kt(Ce,We,$e,mt))return!1;const Yt=(nn,cn,an)=>(Number(cn[0])-Number(nn[0]))*(Number(an[1])-Number(nn[1]))-(Number(cn[1])-Number(nn[1]))*(Number(an[0])-Number(nn[0])),st=Yt(Ce,We,$e),it=Yt(Ce,We,mt),Vt=Yt($e,mt,Ce),Zt=Yt($e,mt,We);return st===0&&Tt($e,Ce,We)||it===0&&Tt(mt,Ce,We)||Vt===0&&Tt(Ce,$e,mt)||Zt===0&&Tt(We,$e,mt)?!0:(st>0&&it<0||st<0&&it>0)&&(Vt>0&&Zt<0||Vt<0&&Zt>0)}function Kt(Ce,We,$e,mt){const Yt=Ct([Ce,We]),st=Ct([$e,mt]);return Lt(Yt,st)}function Tt(Ce,We,$e){const mt=Number(Ce==null?void 0:Ce[0]),Yt=Number(Ce==null?void 0:Ce[1]),st=Number(We==null?void 0:We[0]),it=Number(We==null?void 0:We[1]),Vt=Number($e==null?void 0:$e[0]),Zt=Number($e==null?void 0:$e[1]),nn=(mt-st)*(Zt-it)-(Yt-it)*(Vt-st);return Math.abs(nn)>1e-10?!1:mt>=Math.min(st,Vt)-1e-10&&mt<=Math.max(st,Vt)+1e-10&&Yt>=Math.min(it,Zt)-1e-10&&Yt<=Math.max(it,Zt)+1e-10}function Ae(Ce){const We=[];return _t(Ce==null?void 0:Ce.coordinates,We),We.length?We.reduce(($e,mt)=>({minLng:Math.min($e.minLng,Number(mt[0])),minLat:Math.min($e.minLat,Number(mt[1])),maxLng:Math.max($e.maxLng,Number(mt[0])),maxLat:Math.max($e.maxLat,Number(mt[1]))}),{minLng:Number.POSITIVE_INFINITY,minLat:Number.POSITIVE_INFINITY,maxLng:Number.NEGATIVE_INFINITY,maxLat:Number.NEGATIVE_INFINITY}):null}function Lt(Ce,We){return!Ce||!We?!1:!(Ce.maxLng<We.minLng||Ce.minLng>We.maxLng||Ce.maxLat<We.minLat||Ce.minLat>We.maxLat)}function vt(Ce){return Ft(Ce==null?void 0:Ce.geometry)}function Ft(Ce){return(Ce==null?void 0:Ce.type)==="Polygon"?k(Ce.coordinates):(Ce==null?void 0:Ce.type)==="MultiPolygon"?Ce.coordinates.reduce((We,$e)=>We+k($e),0):0}function k(Ce=[]){const We=Ce[0]||[];if(We.length<3)return 0;const $e=We.reduce((it,Vt)=>it+Number(Vt[1]||0),0)/We.length,mt=111320*Math.cos($e*Math.PI/180),Yt=110540;let st=0;for(let it=0;it<We.length;it+=1){const Vt=We[it],Zt=We[(it+1)%We.length],nn=Number(Vt[0]||0)*mt,cn=Number(Vt[1]||0)*Yt,an=Number(Zt[0]||0)*mt,Ln=Number(Zt[1]||0)*Yt;st+=nn*Ln-an*cn}return Math.abs(st)/2/666.6666667/1e4}function _t(Ce,We){if(Array.isArray(Ce)){if(typeof Ce[0]=="number"&&typeof Ce[1]=="number"){We.push(Ce);return}Ce.forEach($e=>_t($e,We))}}function Ct(Ce){return Ce.reduce((We,$e)=>({minLng:Math.min(We.minLng,Number($e==null?void 0:$e[0])),minLat:Math.min(We.minLat,Number($e==null?void 0:$e[1])),maxLng:Math.max(We.maxLng,Number($e==null?void 0:$e[0])),maxLat:Math.max(We.maxLat,Number($e==null?void 0:$e[1]))}),{minLng:Number.POSITIVE_INFINITY,minLat:Number.POSITIVE_INFINITY,maxLng:Number.NEGATIVE_INFINITY,maxLat:Number.NEGATIVE_INFINITY})}function J(Ce){const We=Number(Ce||0);return Number.isFinite(We)?Number(We.toFixed(We>=10?2:4)).toString():"0"}function ee(Ce){const We=Number(Ce||0)*1e4;return Number.isFinite(We)?We>=1e3?Number(We.toFixed(0)).toLocaleString("zh-CN"):We>=10?Number(We.toFixed(1)).toLocaleString("zh-CN"):Number(We.toFixed(2)).toString():"0"}function Ue(Ce=[]){const We=new Map;return Ce.forEach($e=>{const mt=$e.category||"未知类型",Yt=We.get(mt)||{name:mt,count:0,area:0};Yt.count+=1,Yt.area+=Number($e.overlapAreaWanMu||0),We.set(mt,Yt)}),[...We.values()].sort(($e,mt)=>mt.area-$e.area||mt.count-$e.count)[0]||{name:"未知类型",count:0,area:0}}function xt(Ce=[]){const We=Ce.map(Yt=>Number(Yt.year)).filter(Yt=>Number.isFinite(Yt));if(!We.length)return"未知年份";const $e=Math.min(...We),mt=Math.max(...We);return $e===mt?`${$e} 年`:`${$e}-${mt} 年`}function Bt(Ce,We=18){const $e=String(Ce||"未命名项目");return $e.length>We?`${$e.slice(0,We)}...`:$e}return e({applyDrawnBoundary:E}),(Ce,We)=>(Te(),Pe("div",iqe,[O("div",rqe,[O("div",aqe,[We[0]||(We[0]=O("span",null,"工程分析",-1)),p.value?(Te(),Pe("strong",oqe,De(p.value),1)):Dn("",!0)]),a.value?Dn("",!0):(Te(),Pe("div",{key:0,class:Xn(["analysis-operation",{"has-boundary":o.value}])},[O("label",{class:Xn(["analysis-entry is-upload",{"is-disabled":a.value}])},[O("input",{type:"file",accept:".zip,.json,.geojson",disabled:a.value,onChange:_},null,40,sqe),O("span",null,De(o.value?"更换边界":"上传边界"),1),We[1]||(We[1]=O("strong",null,"SHP / GeoJSON",-1))],2),O("button",{type:"button",class:"analysis-entry is-draw",disabled:a.value,onPointerup:Ws(A,["stop","prevent"])},[O("span",null,De(o.value?"重新绘制":"在线绘制"),1),We[2]||(We[2]=O("strong",null,"地图圈定",-1))],40,lqe)],2)),a.value?(Te(),Pe("div",uqe,[O("div",cqe,[We[3]||(We[3]=O("span",null,"已落点",-1)),O("strong",null,De(n.drawingPointCount),1),We[4]||(We[4]=O("em",null,"点",-1)),We[5]||(We[5]=O("small",null,"至少 3 点",-1))]),O("button",{type:"button",class:"analysis-control is-primary",disabled:!v.value,onPointerup:Ws(M,["stop","prevent"])}," 完成分析 ",40,dqe),O("button",{type:"button",class:"analysis-control",disabled:!n.drawingPointCount,onPointerup:Ws(I,["stop","prevent"])},"撤销",40,hqe),O("button",{type:"button",class:"analysis-control is-danger",onPointerup:Ws(C,["stop","prevent"])},"删除图形",32)])):o.value?(Te(),Pe("div",fqe,[We[6]||(We[6]=O("span",null,"边界已加载",-1)),O("strong",null,De(s.value.length?`命中 ${s.value.length} 项`:m.value),1),O("button",{type:"button",onPointerup:Ws(D,["stop","prevent"])},"删除图形",32)])):Dn("",!0)]),O("div",pqe,[O("div",vqe,[We[7]||(We[7]=O("span",null,"建设记录核查",-1)),o.value?(Te(),Pe("strong",mqe,De(m.value),1)):Dn("",!0)]),o.value?(Te(),Pe(bn,{key:1},[O("div",{class:Xn(["analysis-conclusion",g.value.levelClass])},[O("div",yqe,[We[8]||(We[8]=O("span",null,"分析结论",-1)),O("strong",null,De(g.value.verdict),1)]),O("p",null,De(g.value.summary),1),O("div",_qe,[(Te(!0),Pe(bn,null,Bn(g.value.tags,$e=>(Te(),Pe("span",{key:$e},De($e),1))),128))]),O("small",null,De(g.value.advice),1)],2),s.value.length?(Te(),Pe("div",bqe,[(Te(!0),Pe(bn,null,Bn(s.value,$e=>(Te(),Pe("button",{key:$e.key,type:"button",class:"analysis-project-row",onPointerup:Ws(mt=>Ce.$emit("focus-project",$e),["stop","prevent"])},[O("span",wqe,De($e.projectName),1),O("div",Tqe,[O("strong",null,De($e.year),1),O("em",null,De($e.category),1),O("small",null,"叠加 "+De(ee($e.overlapAreaWanMu))+" 亩",1)]),O("b",null,De($e.featureCount)+" 个要素",1)],40,xqe))),128))])):(Te(),Pe("div",Sqe,"该边界范围内暂未匹配到已建设项目"))],64)):(Te(),Pe("div",gqe))])]))}},Cqe=c_(Aqe,[["__scopeId","data-v-04b20a7e"]]),hh=(n,e)=>n.reduce((t,i)=>t+Number(i[e]||0),0),oo=(n,e=2)=>Number(Number(n||0).toFixed(e)),Y0={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}]},HW=[{key:"national-park",label:"若尔盖国家公园",bottomLabel:"若尔盖国家公园"},{key:"restoration",label:"生态修复工程",bottomLabel:"生态修复工程"},{key:"engineering-analysis",label:"工程分析",bottomLabel:"工程分析"}],d0=[{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:"色永村"}],Js={name:"若尔盖国家公园红原区域",totalAreaWanMu:161.31,grasslandAreaWanMu:94.25,wetlandAreaWanMu:33.47,woodlandAreaWanMu:null,woodlandDataStatus:"待接入",vegetationCoverage:oo(hh(d0,"cover")/d0.length,1),townCount:d0.length,villageCount:d0.reduce((n,e)=>n+String(e.villages||"").split("、").filter(Boolean).length,0),householdCount:3023,ecologyJobCount:hh(d0,"ecologyJobs"),yakCount:hh(d0,"yakCount"),livestockCount:hh(d0,"livestockCount")};Js.otherProtectedAreaWanMu=oo(Js.totalAreaWanMu-Js.grasslandAreaWanMu-Js.wetlandAreaWanMu,2);d0.map(n=>({key:n.name,name:n.name,value:oo(n.grasslandAreaWanMu+n.wetlandAreaWanMu,2),unit:"万亩",extra:`草地 ${n.grasslandAreaWanMu} / 湿地 ${n.wetlandAreaWanMu}`}));d0.map(n=>({key:`${n.name}-town`,name:n.name,value:oo(n.grasslandAreaWanMu+n.wetlandAreaWanMu,2),unit:"万亩",extra:n.villages}));const Mqe=[{key:"core-protection",name:"核心保护区",value:67.36,unit:"万亩"},{key:"general-control",name:"一般控制区",value:93.95,unit:"万亩"}],Eqe=43.66,Pqe=oo(Eqe*(192.26/297.29),2),Rqe={麦洼乡:[{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}]},Lqe=hh(d0,"livestockCount")||hh(d0,"yakCount")||1,a_=d0.map(n=>tn(wt({},n),{householdCount:Math.round(Js.householdCount*Number(n.livestockCount||n.yakCount||0)/Lqe),edibleGrasslandWanTon:oo(Number(n.grasslandAreaWanMu||0)/Math.max(Js.grasslandAreaWanMu,1)*Pqe,2)})),WW=Js.householdCount-hh(a_,"householdCount");WW&&a_[0]&&(a_[0].householdCount+=WW);const iL=(n,e=hh(n,"value"))=>n.map(t=>tn(wt({},t),{extra:t.extra||`占比 ${oo(Number(t.value||0)/Math.max(e,1)*100,1)}%`})),Iqe=iL([{key:"park-scope-grassland",name:"草地",value:Js.grasslandAreaWanMu,unit:"万亩"},{key:"park-scope-wetland",name:"湿地",value:Js.wetlandAreaWanMu,unit:"万亩"},{key:"park-scope-other",name:"其他保护范围",value:Js.otherProtectedAreaWanMu,unit:"万亩"}]),sm=({sourceKey:n,weightKey:e,unit:t="万亩",decimals:i=2,sortByValue:r=!0})=>{const a=a_.flatMap(s=>(Rqe[s.name]||[]).map(u=>({key:`${s.name}-${u.name}-${n}`,name:u.name,town:s.name,value:oo(Number(s[n]||0)*Number(u[e]||0),i),unit:t}))).filter(s=>Number(s.value)>0),o=r?a.sort((s,l)=>Number(l.value||0)-Number(s.value||0)):a;return iL(o)},Dqe=sm({sourceKey:"wetlandAreaWanMu",weightKey:"wetland",sortByValue:!1}),Nqe=sm({sourceKey:"grasslandAreaWanMu",weightKey:"grassland"}),kqe=sm({sourceKey:"householdCount",weightKey:"household",unit:"户",decimals:0}),kte=sm({sourceKey:"yakCount",weightKey:"yak",unit:"头",decimals:0}),Fqe={洞拉村:[102.82,33.22],滚塘村:[102.9,33.23],让里村:[102.99,33.23],茸塔玛村:[103.08,33.2],唐日村:[102.5,33.11],德香村:[102.63,33.12],日干村:[102.72,33.08],色永村:[103.12,33.04]},Oqe=kte.map(n=>{const e=Fqe[n.name];return e?tn(wt({},n),{lng:e[0],lat:e[1],value:n.value,rawValue:n.value,metricLabel:"牦牛数量",displayUnit:n.unit,displayMode:"park-village"}):null}).filter(Boolean),Bqe=sm({sourceKey:"edibleGrasslandWanTon",weightKey:"edible",unit:"万吨"}),zqe=sm({sourceKey:"wetlandAreaWanMu",weightKey:"woodland"}),Gqe=[{zh:"国家公园面积",value:Js.totalAreaWanMu,unit:"万亩",decimals:2},{zh:"草地面积",value:Js.grasslandAreaWanMu,unit:"万亩",decimals:2},{zh:"湿地面积",value:Js.wetlandAreaWanMu,unit:"万亩",decimals:2},{zh:"牦牛数量",value:Js.yakCount,unit:"头",decimals:0}],Uqe=[{zh:"修复项目",value:Y0.kpi.projectCount,unit:"个",decimals:0},{zh:"治理面积",value:Y0.kpi.areaWanMu,unit:"万亩",decimals:2},{zh:"工程长度",value:Y0.kpi.lengthKm,unit:"公里",decimals:2},{zh:"涉及乡镇",value:Y0.kpi.townshipCount,unit:"个",decimals:0}];function Vqe(n){return n==="engineering-analysis"?[]:(n==="restoration"?Uqe:Gqe).map((t,i)=>wt({icon:i%2===0?"xiaoshoujine":"zongxiaoliang",en:""},t))}const Hqe={left:[{key:"park-resource-scope",title:"显示范围资源占比",type:"donut",rows:Iqe},{key:"park-wetland-village",title:"湿地分布村级对比",type:"line",rows:Dqe.slice(0,8)},{key:"park-woodland-village",title:"林地分布村级排行",type:"heat",rows:zqe.slice(0,8)},{key:"park-grassland-village",title:"草地分布村级排行",type:"peak",rows:Nqe.slice(0,8)}],right:[{key:"park-household-village",title:"牧户分布村级排行",type:"column",variant:"pin",rows:kqe.slice(0,8)},{key:"park-yak-village",title:"牦牛分布村级排行",type:"bar",variant:"distribution",rows:kte.slice(0,8)},{key:"park-edible-grass-village",title:"可食草地资源分布",type:"split",rows:Bqe.slice(0,8)},{key:"park-zoning-ledger",title:"核心区和一般区分区面积",type:"structure",rows:iL(Mqe)}]},Fte=(Y0.townships||[]).filter(n=>/[乡镇]$/.test(String(n.name||""))).slice(0,8),Ote=(Y0.projects||[]).map((n,e)=>{const t=Number(n.areaWanMu)>0,i=Number(n.lengthKm)>0,r=t?{value:oo(n.areaWanMu,2),unit:"万亩",metric:"治理面积"}:i?{value:oo(n.lengthKm,2),unit:"公里",metric:"工程长度"}:{value:n.subjectFeatureCount||0,unit:"个",metric:"主体要素"},a=(n.measureTypes||[]).join("、"),o=(n.townships||[]).join("、");return{key:n.id||n.projectName,index:e+1,name:n.projectName,projectName:n.projectName,category:n.projectCategory,year:n.year||"未知",areaWanMu:oo(n.areaWanMu,4),lengthKm:oo(n.lengthKm,2),measure:a,townships:o,subjectFeatureCount:n.subjectFeatureCount||0,value:r.value,unit:r.unit,metric:r.metric,extra:[n.year||"未知",a].filter(Boolean).join(" / "),searchText:[n.projectName,n.projectCategory,n.year,a,o].filter(Boolean).join(" ")}});Ote.map((n,e)=>{const t=e%6,i=Math.floor(e/6),r=102.42+t*.045,a=32.55+i*.035,o=.018+Math.min(.024,Number(n.areaWanMu||0)/1200);return{type:"Feature",properties:{project_name:n.projectName,project_category:n.category,year:n.year,areaWanMu:n.areaWanMu,lengthKm:n.lengthKm,townships:n.townships,measure:n.measure},geometry:{type:"Polygon",coordinates:[[[r,a],[r+o,a+o*.22],[r+o*.82,a+o],[r-o*.16,a+o*.72],[r,a]]]}}});const Wqe={left:[{key:"restoration-year-area",title:"治理面积分布",type:"line",rows:(Y0.years||[]).map(n=>({key:n.name,name:`${n.name}`,value:oo(n.areaWanMu,2),unit:"万亩",extra:`${n.projectCount||0}个项目`}))},{key:"restoration-town-area",title:"乡镇治理面积分布",type:"bar",variant:"distribution",rows:Fte.map(n=>({key:n.name,name:n.name,value:oo(n.areaWanMu,2),unit:"万亩",extra:`${oo(n.lengthKm,2)}公里`}))},{key:"restoration-category",title:"修复类型占比",type:"donut",rows:(Y0.categories||[]).map(n=>({key:n.name,name:n.name,value:oo(n.areaWanMu||n.lengthKm||n.subjectFeatureCount,2),unit:n.areaWanMu?"万亩":n.lengthKm?"公里":"个",extra:`${n.subjectFeatureCount}个图斑`}))},{key:"restoration-year-length",title:"年度工程长度",type:"column",variant:"slim",rows:(Y0.years||[]).filter(n=>Number(n.lengthKm)>0).map(n=>({key:n.name,name:`${n.name}`,value:oo(n.lengthKm,2),unit:"公里",extra:`${n.projectCount||0}个项目`}))}],right:[{key:"restoration-measure-area",title:"修复措施统计",type:"structure",rows:(Y0.measures||[]).slice(0,8).map(n=>({key:n.name,name:n.name,value:oo(n.areaWanMu||n.lengthKm||n.subjectFeatureCount,2),unit:n.areaWanMu?"万亩":n.lengthKm?"公里":"个",extra:`${n.projectCount}个项目`}))},{key:"restoration-year-project",title:"年度项目数量",type:"column",variant:"slim",rows:(Y0.years||[]).map(n=>({key:n.name,name:`${n.name}`,value:n.projectCount,unit:"个",extra:`${oo(n.areaWanMu,2)}万亩`}))},{key:"restoration-projects",title:"重点项目库",type:"projectTable",span:2,rows:Ote}]},jqe={left:[],right:[]};function $qe(n){return n==="restoration"?{status:"success",title:"乡镇治理排行",metricLabel:"治理面积",unit:"万亩",rows:Fte.map(e=>({name:e.name,value:oo(e.areaWanMu,2),unit:"万亩"}))}:n==="engineering-analysis"?{status:"success",title:"工程分析",metricLabel:"",unit:"",rows:[]}:{status:"success",title:"国家公园覆盖村",scope:"village",labelMode:"village",hideTownNames:!1,displayMode:"park-village",metricLabel:"牦牛数量",unit:"头",rows:Oqe}}const qqe={class:"forest-grass-wet ecological-protection"},Xqe={class:"forest-grass-wet-ui ecological-protection-ui"},Yqe={key:0,class:"fgw-left"},Kqe={class:"fgw-side-stack is-left"},Zqe={key:1,class:"fgw-right"},Jqe={class:"fgw-side-stack is-right"},Qqe={class:"fgw-bottom-topic ecological-bottom-topic"},eXe={key:0,class:"loading"},tXe={class:"loading-progress"},nXe={class:"value"},jW=190,iXe=12,rXe={__name:"index",props:{activeView:{type:String,default:"national-park"},showLoading:{type:Boolean,default:!0}},emits:["module-stats","view-change"],setup(n,{emit:e}){const t=n,i=e,r=Wt(null),a=Wt(null),o=Wt(""),s=Wt(""),l=Wt(null),u=Wt(!1),c=Wt(!1),d=Wt(null),h=Wt(0),f=Wt(t.showLoading),p=Wt(null),m=Wt(0),v=Wt({type:"idle",text:"等待生态保护图层加载"});let g=null,_=!1;const S=Ye(()=>["national-park","restoration","engineering-analysis"].includes(t.activeView)?t.activeView:"national-park"),x=Ye(()=>S.value==="engineering-analysis"),A=Ye(()=>o.value?B3(S.value,o.value):null),C=Ye(()=>{var k;return(((k=A.value)==null?void 0:k.legends)||[]).find(_t=>_t.key===s.value)||null}),M=Ye(()=>{const k=A.value;return!k||!C.value?k:tn(wt({},k),{cqlFilter:C.value.cqlFilter||k.cqlFilter,activeLegend:C.value,name:C.value.name||k.name})}),I=Ye(()=>S.value==="restoration"?Wqe:S.value==="engineering-analysis"?jqe:Hqe),D=Ye(()=>I.value.left||[]),E=Ye(()=>I.value.right||[]),P=jW*2+iXe,F=Ye(()=>!!d.value),V=Ye(()=>{if(c.value||u.value||!l.value)return 186;const k=Ee(l.value);return Math.min(480,Math.max(300,86+Math.min(k,12)*34))}),G=Ye(()=>{if(!d.value)return{};const k=460,_t=V.value,Ct=24,J=K(d.value),ee=J.x>1420?-k-28:28,Ue=Math.min(Math.max(J.x+ee,Ct),1920-k-Ct),xt=Math.min(Math.max(J.y-_t-72,188),1080-_t-132);return{left:`${Ue}px`,top:`${xt}px`,right:"auto",bottom:"auto"}});dl(()=>{document.addEventListener("pointerdown",vt,!0),Q(),W(S.value)}),Bl(()=>{_=!0,document.removeEventListener("pointerdown",vt,!0)}),qa(S,k=>{W(k)}),qa(o,()=>{s.value="",Lt()}),qa(s,()=>{Lt()});function W(k){var J,ee,Ue,xt,Bt;const _t=y5.find(Ce=>Ce.key===k)||y5[0],Ct=f7(k);s.value="",o.value=_t.defaultLayerKey||((J=Ct[0])==null?void 0:J.key)||"",p.value=$qe(k),m.value=0,(Ue=(ee=r.value)==null?void 0:ee.setBoundaryDrawing)==null||Ue.call(ee,!1),k!=="engineering-analysis"&&((Bt=(xt=r.value)==null?void 0:xt.clearAnalysisBoundary)==null||Bt.call(xt)),Lt(),i("module-stats",{moduleKey:"ecological-protection",viewKey:k,items:Vqe(k)})}function Y(k){i("view-change",["national-park","restoration","engineering-analysis"].includes(k)?k:"national-park")}function Q(){var J;g=new am;let k=!1;const _t={progress:0};g.instance.on("onProgress",(ee,Ue,xt)=>{const Bt=Math.floor(Ue/xt*100);ka.to(_t,{progress:Bt,onUpdate:()=>{h.value=Math.floor(_t.progress)}})});const Ct=()=>rn(this,null,function*(){var ee,Ue;_||k||(k=!0,(ee=r.value)==null||ee.loadMap(g),yield Ft(),yield Qs(),(Ue=r.value)==null||Ue.play())});g.instance.on("onLoad",Ct),(J=g.ready)==null||J.then(Ct).catch(()=>{_||(v.value={type:"error",text:"地图资源加载失败"})})}function K(k){const _t=document.querySelector(".ecological-protection"),Ct=_t==null?void 0:_t.getBoundingClientRect();return!(Ct!=null&&Ct.width)||!(Ct!=null&&Ct.height)?k:{x:(k.x-Ct.left)/Ct.width*1920,y:(k.y-Ct.top)/Ct.height*1080}}function ae(k,_t){return`${S.value}-${_t}-${(k==null?void 0:k.key)||(k==null?void 0:k.title)||"panel"}`}function ie(k){return(k==null?void 0:k.span)===2}function he(k){return ie(k)?P:jW}function Ee(k){const _t=(k==null?void 0:k.properties)||{};return Object.keys(_t).filter(Ct=>{const J=_t[Ct];return J==null||J===""?!1:!["geom","wkt","geometry","the_geom","raw_properties"].includes(String(Ct).toLowerCase())}).length}function He(k){var Ct,J;const _t=(J=(Ct=k==null?void 0:k.feature)!=null?Ct:k)!=null?J:null;if(!_t){Lt();return}l.value=_t,u.value=!1,k!=null&&k.screen&&(d.value=k.screen)}function xe(k){v.value=k}function Fe(k,_t){var J,ee;if(S.value!=="restoration"||(k==null?void 0:k.key)!=="restoration-projects")return;const Ct=(_t==null?void 0:_t.projectName)||(_t==null?void 0:_t.name);Ct&&(Lt(),(ee=(J=r.value)==null?void 0:J.focusProject)==null||ee.call(J,Ct))}function pt(k){var _t,Ct;Lt(),m.value=0,(Ct=(_t=r.value)==null?void 0:_t.setBoundaryDrawing)==null||Ct.call(_t,k)}function Ot(){var k,_t;(_t=(k=r.value)==null?void 0:k.finishBoundaryDrawing)==null||_t.call(k)}function bt(){var k,_t;(_t=(k=r.value)==null?void 0:k.undoBoundaryPoint)==null||_t.call(k)}function ht(){var k,_t;m.value=0,(_t=(k=r.value)==null?void 0:k.clearAnalysisBoundary)==null||_t.call(k)}function Kt(k={}){var _t,Ct,J;m.value=k.pointCount||((_t=k.points)==null?void 0:_t.length)||0,k.status==="complete"&&k.feature&&(m.value=0,(J=(Ct=a.value)==null?void 0:Ct.applyDrawnBoundary)==null||J.call(Ct,k.feature)),k.status==="clear"&&(m.value=0)}function Tt(k={}){var _t,Ct;(Ct=(_t=r.value)==null?void 0:_t.showAnalysisResult)==null||Ct.call(_t,{boundary:k.boundary,matches:k.matches}),S.value}function Ae(k){var Ct,J;const _t=((k==null?void 0:k.features)||[]).filter(Boolean);(J=(Ct=r.value)==null?void 0:Ct.showAnalysisResult)==null||J.call(Ct,{matches:_t})}function Lt(){var k,_t;l.value=null,u.value=!1,d.value=null,(_t=(k=r.value)==null?void 0:k.clearSelectedFeature)==null||_t.call(k)}function vt(k){if(!F.value)return;const _t=document.querySelector(".fgw-map-feature-info"),Ct=k.target;_t&&Ct instanceof Node&&_t.contains(Ct)||Lt()}function Ft(){return f.value?new Promise(k=>{ka.to(".ecological-protection .loading",{opacity:0,duration:.8,delay:.2,onComplete:()=>{f.value=!1,k()}})}):Promise.resolve()}return(k,_t)=>{var Ct;return Te(),Pe("div",qqe,[gn(rm,{ref_key:"mapSceneRef",ref:r,"active-layer":M.value,"map-ranking":p.value,onFeatureLoading:_t[0]||(_t[0]=J=>c.value=J),onFeatureInfo:He,onLayerStatus:xe,onDrawBoundary:Kt},null,8,["active-layer","map-ranking"]),O("div",Xqe,[x.value?Dn("",!0):(Te(),Pe("div",Yqe,[O("div",Kqe,[(Te(!0),Pe(bn,null,Bn(D.value,J=>(Te(),Uo(Mi,{key:ae(J,"left"),class:Xn(["fgw-side-card left-card",{"is-double":ie(J)}]),title:J.title,width:398,height:he(J)},{default:mi(()=>[gn(Cl,{panel:J,compact:"",onRowSelect:ee=>Fe(J,ee)},null,8,["panel","onRowSelect"])]),_:2},1032,["class","title","height"]))),128))])])),x.value?Dn("",!0):(Te(),Pe("div",Zqe,[O("div",Jqe,[(Te(!0),Pe(bn,null,Bn(E.value,J=>(Te(),Uo(Mi,{key:ae(J,"right"),class:Xn(["fgw-side-card right-card",{"is-double":ie(J)}]),title:J.title,width:398,height:he(J)},{default:mi(()=>[gn(Cl,{panel:J,compact:"",onRowSelect:ee=>Fe(J,ee)},null,8,["panel","onRowSelect"])]),_:2},1032,["class","title","height"]))),128))])])),x.value?(Te(),Uo(Cqe,{key:2,ref_key:"engineeringAnalysisRef",ref:a,"drawing-point-count":m.value,onDrawingChange:pt,onFinishDrawing:Ot,onUndoPoint:bt,onClearBoundary:ht,onAnalysisResult:Tt,onFocusProject:Ae},null,8,["drawing-point-count"])):Dn("",!0),O("div",{class:Xn(["fgw-map-layer-tools",{"is-analysis":x.value}])},[gn(UR,{modelValue:o.value,"onUpdate:modelValue":_t[1]||(_t[1]=J=>o.value=J),"selected-legend-key":s.value,"onUpdate:selectedLegendKey":_t[2]||(_t[2]=J=>s.value=J),"topic-key":S.value,legends:((Ct=M.value)==null?void 0:Ct.legends)||[],width:248,height:430},null,8,["modelValue","selected-legend-key","topic-key","legends"])],2),F.value?(Te(),Pe("div",{key:3,class:"fgw-map-feature-info",style:Ji(G.value)},[gn(ete,{feature:l.value,empty:u.value,loading:c.value,width:460,height:V.value},null,8,["feature","empty","loading","height"])],4)):Dn("",!0),O("div",Qqe,[gn(y7,{"model-value":S.value,topics:Tr(y5),"onUpdate:modelValue":Y},null,8,["model-value","topics"])])]),f.value?(Te(),Pe("div",eXe,[_t[4]||(_t[4]=pp('<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)),O("div",tXe,[O("span",nXe,De(h.value),1),_t[3]||(_t[3]=O("span",{class:"unit"},"%",-1))])])):Dn("",!0)])}}},SM=sXe("/jsyApi"),aXe="/openApi";function oXe(n,e){return/^https?:\/\//.test(e)?e:`${n}${e.startsWith("/")?e:`/${e}`}`}function sXe(n){const e=String(n||"/jsyApi").replace(/\/+$/,"");return e.endsWith("/api")?e:`${e}/api`}function lXe(n){if((n==null?void 0:n.success)===!1||(n==null?void 0:n.code)!==void 0&&![0,200,"0","200"].includes(n.code)){const t=new Error((n==null?void 0:n.msg)||(n==null?void 0:n.message)||"接口请求失败");throw t.code=n==null?void 0:n.code,t}return ki(n)}function o_(n,e,t,i={}){return su(oXe(n,e),{params:t,timeout:i.timeout||16e3}).then(lXe)}function uXe(n){return Array.isArray(n)?n:Array.isArray(n==null?void 0:n.rows)?n.rows:Array.isArray(n==null?void 0:n.list)?n.list:Array.isArray(n==null?void 0:n.data)?n.data:[]}function cXe(n){return Array.isArray(n)?n.length>0:!n||typeof n!="object"?n!=null&&n!=="":["areaRange","area_range","acreage","grasslandArea","grassland_area","area","yakNumber","yak_number","number","yakCount","yak_count","livestockCount","livestock_count","bearingCapacity","bearing_capacity","capacity","theoryCapacity","livestockCapacity","livestock_capacity","carryingCapacity","actualCapacity","overloadRate","overload_rate","rate","level","conclusion","advice","balanceAdvice","balance_advice"].some(t=>n[t]!==void 0&&n[t]!==null&&n[t]!=="")}function dXe(){return rn(this,arguments,function*({areaCode:n,pasturesId:e}={}){const t={areaCode:n,pasturesId:e},i=[()=>o_(SM,"/ai/livestockBalance",t,{timeout:18e3}),()=>o_(aXe,"/ai/balance/advice",t,{timeout:18e3})];let r;for(const a of i)try{const o=yield a();if(cXe(o))return o}catch(o){r=o}throw r||new Error("草畜平衡接口不可用")})}function hXe(n){return rn(this,null,function*(){const e=[()=>o_(SM,"/area/children",{areaCode:n},{timeout:12e3}),()=>o_(SM,"/map/areaCode",{areaCode:n},{timeout:12e3})];let t,i=!1;for(const r of e)try{const a=uXe(yield r());if(a.length)return a;i=!0}catch(a){t=a}if(i)return[];throw t||new Error("区划接口不可用")})}const Bte="/jsyApi";function zte(n,e){return/^https?:\/\//.test(e)?e:`${n}${e.startsWith("/")?e:`/${e}`}`}function Gte(n){if((n==null?void 0:n.success)===!1||(n==null?void 0:n.code)!==void 0&&![0,200,"0","200"].includes(n.code)){const t=new Error((n==null?void 0:n.msg)||(n==null?void 0:n.message)||"接口请求失败");throw t.code=n==null?void 0:n.code,t}return ki(n)}function b7(n,e,t={}){return su(zte(Bte,n),{params:e,timeout:t.timeout||12e3}).then(Gte)}function x7(n,e,t={}){return su(zte(Bte,n),{method:"POST",params:e,timeout:t.timeout||12e3}).then(Gte)}function fXe(){return x7("/api/dataItem?group=pastures").then(ed)}function pXe(){return x7("/api/muhu/distribution").then(ed)}function vXe(){return x7("/api/muhu/age").then(ed)}function mXe(){return x7("/api/muhu/upline_rate").then(ed)}function ed(n){return Array.isArray(n)?n:Array.isArray(n==null?void 0:n.rows)?n.rows:Array.isArray(n==null?void 0:n.list)?n.list:Array.isArray(n==null?void 0:n.data)?n.data:n!=null&&n.data?ed(n.data):n!=null&&n.result?ed(n.result):[]}function Ute(n="",e=1,t=80){return b7("/api/home/muhu_list",{query:n,page:e,pageSize:t}).then(ed)}function bM(n){return b7("/api/home/grasslandByPastureId",{id:n}).then(ed)}function gXe(n){return b7("/api/pasturesDetails",{id:n}).then(e=>(e==null?void 0:e.data)||e||{})}function Vte(){return b7("/api/pasturesList").then(ed)}function yXe(){return rn(this,null,function*(){const[n,e,t,i,r,a]=yield Promise.allSettled([fXe(),pXe(),vXe(),mXe(),Vte(),Ute("",1,300)]),o=r.status==="fulfilled"?r.value:[],s=a.status==="fulfilled"?a.value:[],l=XW(s)?s:XW(o)?o:s.length?s:o,u=_Xe(l,o,s);return{core:n.status==="fulfilled"?n.value:[],distribution:e.status==="fulfilled"?e.value:[],age:t.status==="fulfilled"?t.value:[],online:i.status==="fulfilled"?i.value:[],list:u}})}function _Xe(n=[],...e){const t=new Map;return e.flat().forEach(i=>{qW(i).forEach(r=>{const a=t.get(r)||{};t.set(r,$W(a,i))})}),(Array.isArray(n)?n:[]).map(i=>{const r=qW(i).map(a=>t.get(a)).find(Boolean);return r?$W(i,r):i})}function $W(n={},e={}){const t=wt({},n);return Object.entries(e||{}).forEach(([i,r])=>{(t[i]===void 0||t[i]===null||t[i]==="")&&(t[i]=r)}),t}function qW(n={}){return[n.id,n.pastureId,n.pasturesId,n.pastures_id,n.muhuId,n.muhu_id,n.name,n.pasturesName,n.pastures_name,n.muhuName,n.muhu_name,n.pastureName,n.pasture_name].map(e=>String(e||"").trim()).filter(Boolean)}function XW(n=[]){return(Array.isArray(n)?n:[]).some(e=>{var r,a,o,s,l,u;const t=(l=(s=(o=(a=(r=e==null?void 0:e.grasslandArea)!=null?r:e==null?void 0:e.grassland_area)!=null?a:e==null?void 0:e.acreage)!=null?o:e==null?void 0:e.area)!=null?s:e==null?void 0:e.areaRange)!=null?l:e==null?void 0:e.area_range;if(typeof t=="number")return t>0;const i=Number((u=String(t!=null?t:"").replace(/,/g,"").match(/-?\d+(?:\.\d+)?/))==null?void 0:u[0]);return Number.isFinite(i)&&i>0})}const SXe=(n,e=2)=>{const t=xd(10,e);return Math.round((Number(n)||0)*t)/t},xM=n=>SXe((Number(n)||0)/1e4,2),Hte=[{key:"pasture-total",name:"牧户数量",value:9110,unit:"户",icon:"town"},{key:"avg-yak-per-household",name:"户均牦牛头数",value:52,unit:"头",icon:"yield"},{key:"avg-grassland-area",name:"户均草地面积",value:1131,unit:"亩",icon:"area"},{key:"joint-household-count",name:"联户数量",value:237,unit:"户",icon:"town"},{key:"poverty-monitor-count",name:"防反贫监测户",value:122,unit:"户",icon:"town"},{key:"average-income",name:"人均收入",value:19679,unit:"元/年",icon:"rate"}],Wte=Hte,jte=Hte.map(n=>tn(wt({},n),{zh:n.name,decimals:0})),rL=[{areaCode:"513233100",areaName:"邛溪镇",number:1452,year:2024},{areaCode:"513233104",areaName:"刷经寺镇",number:1500,year:2024},{areaCode:"513233101",areaName:"安曲镇",number:76,year:2024},{areaCode:"513233103",areaName:"龙日镇",number:828,year:2024},{areaCode:"513233204",areaName:"江茸乡",number:902,year:2024},{areaCode:"513233205",areaName:"查尔玛乡",number:450,year:2024},{areaCode:"513233102",areaName:"瓦切镇",number:602,year:2024},{areaCode:"513233203",areaName:"阿木乡",number:300,year:2024},{areaCode:"513233202",areaName:"麦洼乡",number:1204,year:2024},{areaCode:"513233105",areaName:"色地乡",number:2638,year:2024}].map(n=>tn(wt({},n),{key:n.areaCode,name:n.areaName,value:n.number,unit:"户"})),$te=[{areaCode:"513233103",areaName:"龙日镇",uplineRate:4,year:2024},{areaCode:"513233202",areaName:"麦洼乡",uplineRate:52,year:2024},{areaCode:"513233101",areaName:"安曲镇",uplineRate:22,year:2024},{areaCode:"513233100",areaName:"邛溪镇",uplineRate:23,year:2024},{areaCode:"513233105",areaName:"色地乡",uplineRate:8,year:2024},{areaCode:"513233203",areaName:"阿木乡",uplineRate:12,year:2024},{areaCode:"513233204",areaName:"江茸乡",uplineRate:14,year:2024},{areaCode:"513233104",areaName:"刷经寺镇",uplineRate:9,year:2024}].map(n=>tn(wt({},n),{key:n.areaCode,name:n.areaName,value:n.uplineRate,unit:"%",extra:`${n.uplineRate}%`})),qte=[{areaName:"全县",ageRange:"0-20",sex:"男",number:340,value:340,year:2024},{areaName:"全县",ageRange:"0-20",sex:"女",number:348,value:348,year:2024},{areaName:"全县",ageRange:"21-40",sex:"男",number:1700,value:1700,year:2024},{areaName:"全县",ageRange:"21-40",sex:"女",number:2040,value:2040,year:2024},{areaName:"全县",ageRange:"41-60",sex:"男",number:2040,value:2040,year:2024},{areaName:"全县",ageRange:"41-60",sex:"女",number:2104,value:2104,year:2024},{areaName:"全县",ageRange:"61-80",sex:"男",number:680,value:680,year:2024},{areaName:"全县",ageRange:"61-80",sex:"女",number:580,value:580,year:2024},{areaName:"全县",ageRange:"81-100",sex:"男",number:60,value:60,year:2024},{areaName:"全县",ageRange:"81-100",sex:"女",number:60,value:60,year:2024}],Xte=(n,e,t,i)=>Array.from(n.reduce((r,a)=>{const o=a[e]||"未标注",s=r.get(o)||{key:o,name:o,value:0,unit:i};return s.value+=Number(a[t])||0,r.set(o,s),r},new Map).values()),bXe=Xte(qte,"ageRange","value","人"),Yte=[{key:"male",name:"男",value:4820,unit:"人"},{key:"female",name:"女",value:5132,unit:"人"}],kp=[{name:"更洼尔",areaName:"瓦切乡",acreage:4704.87,summerAcreage:2267.26,winterAcreage:2437.61,year:2024},{name:"涉尔丹",areaName:"麦洼乡",acreage:1426.53,summerAcreage:687.82,winterAcreage:738.71,year:2024},{name:"热布丹",areaName:"查尔玛乡",acreage:2176.09,summerAcreage:1049.37,winterAcreage:1126.72,year:2024},{name:"王西卓玛",areaName:"阿木乡",acreage:4126.13,summerAcreage:1989.59,winterAcreage:2136.54,year:2024},{name:"阿尔",areaName:"色地乡",acreage:1249.48,summerAcreage:602.25,winterAcreage:647.23,year:2024},{name:"尕让吉",areaName:"邛溪镇",acreage:3688.72,summerAcreage:1778.56,winterAcreage:1910.16,year:2024},{name:"华尔甲",areaName:"安曲镇",acreage:2956.44,summerAcreage:1425.01,winterAcreage:1531.43,year:2024},{name:"泽让措",areaName:"江茸乡",acreage:3448.36,summerAcreage:1662.61,winterAcreage:1785.75,year:2024},{name:"扎西让布",areaName:"龙日镇",acreage:2689.1,summerAcreage:1296.15,winterAcreage:1392.95,year:2024},{name:"格桑卓玛",areaName:"刷经寺镇",acreage:3187.64,summerAcreage:1536.84,winterAcreage:1650.8,year:2024}].map(n=>tn(wt({},n),{township:n.areaName,grasslandArea:n.acreage,value:n.acreage,unit:"亩",canLocate:!1,locateText:"--",searchText:`${n.name} ${n.areaName}`})),xXe=Xte(kp,"township","grasslandArea","亩").map(n=>tn(wt({},n),{value:xM(n.value),unit:"万亩"})),wXe=Array.from(kp.reduce((n,e)=>{const t=e.township||"未填写",i=n.get(t)||{key:`${t}-season`,name:t,values:{summer:0,winter:0}};return i.values.summer+=Number(e.summerAcreage)||0,i.values.winter+=Number(e.winterAcreage)||0,n.set(t,i),n},new Map).values()).map(n=>tn(wt({},n),{values:{summer:xM(n.values.summer),winter:xM(n.values.winter)},unit:"万亩"})),TXe=rL.map(n=>({name:n.name,value:n.value,unit:"户"})),CT={topStats:jte,coreRows:Wte,townRows:rL,ageRows:qte,genderRows:Yte,onlineRows:$te,list:kp},Yp={grasslandCapacityPerMu:.047,yakToSheepUnit:4.8},AXe={key:"county-513233",type:"county",name:"红原县",areaCode:"513233"},V4=[{key:"healthy",label:"草畜平衡",shortLabel:"平衡",range:"≤ 0%",description:"承载力覆盖实际载畜量,当前放牧压力处于合理区间。",actions:["保持当前载畜水平与轮牧节奏","定期复测草地生产力和载畜量","关注极端天气对牧草生长的影响"]},{key:"watch",label:"轻度超载",shortLabel:"关注",range:"0% - 10%",description:"已出现轻度超载迹象,建议提前介入调控。",actions:["适度压减超载畜群规模","延长冬春舍饲补饲周期","增加人工草场补饲供应"]},{key:"warning",label:"中度超载",shortLabel:"预警",range:"10% - 20%",description:"超载较明显,草地退化风险上升,应启动主动调控。",actions:["压减载畜量至理论承载力以内","推行划区轮牧与阶段性休牧","扩大优质人工饲草供给"]},{key:"danger",label:"严重超载",shortLabel:"高压",range:"> 20%",description:"超载压力较高,建议纳入重点管控和生态修复范围。",actions:["强制压减载畜量并实施禁牧休牧","对退化草地实施生态修复","建立重点区域长效监测与考核机制"]}],a0={areaRange:["areaRange","area_range","acreage","grasslandArea","area"],yakNumber:["yakNumber","yak_number","number","yakCount","livestockCount"],bearingCapacity:["bearingCapacity","bearing_capacity","capacity","theoryCapacity"],livestockCapacity:["livestockCapacity","livestock_capacity","carryingCapacity","actualCapacity"],overloadRate:["overloadRate","overload_rate","rate"],level:["level","conclusion"],advice:["advice","balanceAdvice","balance_advice","balanceAdivce","balance_adivce"],year:["year"],areaName:["areaName","area_name","name"],pasturesName:["pasturesName","pastures_name","pastureName","muhuName","name"]},CXe=["grasslandArea","grassland_area","acreage","areaRange","area_range","area","cdAcreage","cd_acreage","totalAcreage","total_acreage","grasslandAcreage","grassland_acreage","pastureArea","pasture_area"],aL={邛溪镇:"513233100",刷经寺镇:"513233101",安曲镇:"513233103",龙日镇:"513233105",江茸乡:"513233202",查尔玛乡:"513233203",瓦切镇:"513233204",瓦切乡:"513233204",阿木乡:"513233205",麦洼乡:"513233207",色地乡:"513233208",色地镇:"513233208",壤口乡:"513233209"},v0=(n,e=2)=>{const t=xd(10,e);return Math.round((Number(n)||0)*t)/t},MXe={色地乡:1.38,麦洼乡:1.26,壤口乡:.92,阿木乡:1.12,瓦切镇:1.2,查尔玛乡:1.04,江茸乡:.88,龙日镇:1.16,安曲镇:1.28,刷经寺镇:.78,邛溪镇:1.08};function jr(n,e=null){if(n==null||n==="")return e;const t=typeof n=="string"?n.replace(/,/g,"").replace(/%/g,"").trim():n,i=Number(t);return Number.isFinite(i)?i:e}function no(n={},e=[],t=void 0){for(const i of e){const r=n==null?void 0:n[i];if(r!=null&&r!=="")return r}return t}function Kte(n,e={}){var i;const t=jr(n);return t===null?"--":t.toLocaleString("zh-CN",{maximumFractionDigits:(i=e.maximumFractionDigits)!=null?i:Number.isInteger(t)?0:2})}function MT(n){const e=jr(n);return e===null?"--":`${Kte(e)}%`}function j3(n){const e=jr(n);return e===null||e<=0?V4[0]:e<=10?V4[1]:e<=20?V4[2]:V4[3]}function wM(n){return Math.round((Number(n)||0)*Yp.yakToSheepUnit)}function TM(n){return Math.round((Number(n)||0)*Yp.grasslandCapacityPerMu)}function w7({key:n,type:e,name:t,areaCode:i,pasturesId:r,areaRange:a,yakNumber:o,location:s,township:l,hasBoundary:u=!1,boundaryCount:c=0,grasslands:d=[],source:h,pressureFactor:f=1}){const p=TM(a),m=Math.round(wM(o)*f),v=p?v0((m-p)/p*100,1):0,g=j3(v);return{key:n,type:e,name:t,areaCode:i,pasturesId:r,areaRange:v0(a,0),yakNumber:v0(o,0),bearingCapacity:p,livestockCapacity:m,overloadRate:v,level:g.label,advice:g.actions.join(";"),year:"2026",location:s,township:l,hasBoundary:!!u,boundaryCount:Number(c)||0,grasslands:d,source:h}}const $3=z3.map((n,e)=>w7({key:`town-${n.zoneName}`,type:"town",name:n.zoneName,areaCode:aL[n.zoneName],areaRange:n.grasslandArea,yakNumber:n.yakCount,location:null,pressureFactor:MXe[n.zoneName]||1,index:e})),EXe=$3.reduce((n,e)=>n+e.areaRange,0),PXe=$3.reduce((n,e)=>n+e.yakNumber,0),A5=$3.reduce((n,e)=>n+e.bearingCapacity,0),Zte=$3.reduce((n,e)=>n+e.livestockCapacity,0),Jte=A5?v0((Zte-A5)/A5*100,1):0,YW=j3(Jte),RXe=tn(wt({},AXe),{areaRange:EXe,yakNumber:PXe,bearingCapacity:A5,livestockCapacity:Zte,overloadRate:Jte,level:YW.label,advice:YW.actions.join(";"),year:"2026"}),LXe=C5(kp.map(n=>w7({key:n.id||n.key||n.name,type:"pasture",name:n.name,areaCode:aL[n.township],pasturesId:n.id,areaRange:n.grasslandArea,yakNumber:n.yakCount,location:n.location,township:n.township,hasBoundary:n.hasBoundary||n.canLocate||fp(n),source:n}))),KW=[RXe,...$3,...LXe];function IXe(n={},e={}){var S,x,A,C,M,I,D,E,P,F,V,G,W;const t=no(n,a0.areaRange),i=no(n,a0.yakNumber),r=no(n,a0.bearingCapacity),a=no(n,a0.livestockCapacity),o=jr(no(n,a0.overloadRate)),s=jr(e.yakNumber),l=kXe(n,a,s),u=jr(t,(S=e.areaRange)!=null?S:0),c=l!==null&&i===(n==null?void 0:n.yak_number)?jr(no(n,["number","yakCount","yak_count","livestockCount","livestock_count"]),s!=null?s:Math.round(l/Yp.yakToSheepUnit)):jr(i,(x=e.yakNumber)!=null?x:0),d=jr(e.bearingCapacity),h=jr(e.livestockCapacity),f=t!=null&&t!=="",p=i!=null&&i!=="",m=(M=(C=(A=jr(a))!=null?A:l)!=null?C:p?wM(c):h)!=null?M:wM(c),v=(E=(D=(I=jr(r))!=null?I:FXe(m,o))!=null?D:f?TM(u):d)!=null?E:TM(u),g=o!==null?v0(o,1):v?v0((m-v)/v*100,1):0,_=j3(g);return tn(wt(wt({},e),n),{key:e.key||n.key||n.id||n.areaCode||n.pasturesId||e.name,type:e.type||n.type||(n.pasturesId?"pasture":"town"),name:no(n,[...a0.pasturesName,...a0.areaName],e.name||"核算对象"),areaCode:n.areaCode||n.area_code||e.areaCode,pasturesId:n.pasturesId||n.pastures_id||e.pasturesId,areaRange:u,yakNumber:c,bearingCapacity:v,livestockCapacity:m,overloadRate:g,level:no(n,a0.level,_.label),advice:no(n,a0.advice,e.advice||_.actions.join(";")),year:no(n,a0.year,e.year||"当前年度"),hasBoundary:!!((V=(F=(P=n.hasBoundary)!=null?P:n.has_boundary)!=null?F:n.canLocate)!=null?V:e.hasBoundary),boundaryCount:jr((G=n.boundaryCount)!=null?G:n.boundary_count,(W=e.boundaryCount)!=null?W:0),grasslands:Array.isArray(n.grasslands)?n.grasslands:e.grasslands,source:n.raw||n.source||e.source})}function ZW(n=[],e=new Map){return(Array.isArray(n)?n:[]).map((t,i)=>NXe(t,i,e)).filter(Boolean).sort(Qte)}function C5(n=[]){return[...Array.isArray(n)?n:[]].sort(Qte)}function Qte(n,e){const t=s_(n)?1:0,i=s_(e)?1:0;if(t!==i)return i-t;const r=l_(n),a=l_(e),o=r>0?1:0,s=a>0?1:0;return o!==s?s-o:r!==a?a-r:String((n==null?void 0:n.name)||"").localeCompare(String((e==null?void 0:e.name)||""),"zh-CN")}function s_(n={}){return n!=null&&n.hasBoundary||n!=null&&n.has_boundary||n!=null&&n.canLocate||n!=null&&n.hasGeometry||n!=null&&n.has_geometry||(Number(n==null?void 0:n.boundaryCount)||Number(n==null?void 0:n.boundary_count)||0)>0||Array.isArray(n==null?void 0:n.boundaryList)&&n.boundaryList.length||Array.isArray(n==null?void 0:n.geometryList)&&n.geometryList.length||Array.isArray(n==null?void 0:n.features)&&n.features.length||Array.isArray(n==null?void 0:n.grasslands)&&n.grasslands.some(fp)||Array.isArray(n==null?void 0:n.boundaryRows)&&n.boundaryRows.some(fp)?!0:fp(n)||ene(n).some(fp)}function l_(n={}){const e=CXe.map(i=>DXe(n==null?void 0:n[i]));return e.find(i=>i>0)||e.find(i=>i===0)||0}function DXe(n){if(typeof n=="number")return Number.isFinite(n)?n:0;const e=String(n!=null?n:"").trim();if(!e||e==="--")return 0;const t=e.replace(/,/g,"").match(/-?\d+(?:\.\d+)?/);if(!t)return 0;const i=Number(t[0]);return Number.isFinite(i)?e.includes("万")?i*1e4:i:0}function NXe(n={},e=0,t=new Map){const i=no(n,["pasturesId","pastures_id","pastureId","pasture_id","muhuId","id","value"]),r=no(n,[...a0.pasturesName,"herdsmanName","ownerName","label"],i||"");if(!r&&!i)return null;const a=no(n,["township","townName","areaName","area_name","zoneName","address"]),o=ene(n),s=o.filter(fp),l=i?t.get(String(i)):null,u=(l==null?void 0:l.rows)||[],c=u.length?u:o,d=l_(n)||OXe(c),h=!!(l!=null&&l.hasBoundary||s.length||fp(n));return w7({key:i?`pasture-${i}`:`pasture-${r}-${e}`,type:"pasture",name:r,areaCode:n.areaCode||n.area_code||aL[a],pasturesId:i,areaRange:d,yakNumber:jr(no(n,a0.yakNumber),0),location:n.location,township:a,hasBoundary:h,boundaryCount:u.length||s.length,grasslands:u.length?u:s.length?s:o,source:n})}function kXe(n={},e,t=null){if(!n||typeof n!="object"||e!=null&&e!=="")return null;const i=Object.prototype.hasOwnProperty.call(n,"yak_number"),r=["overload_rate","overloadRate","advice","balanceAdvice","level","conclusion"].some(s=>n[s]!==void 0&&n[s]!==null&&n[s]!==""),a=jr(n.yak_number);if(!i||!r||a===null)return null;const o=jr(t);return o!==null&&o>0?a>o*1.5?a:null:a}function FXe(n,e){const t=jr(n),i=jr(e);return t===null||i===null||i<=-100?null:Math.round(t/(1+i/100))}function OXe(n=[]){return(Array.isArray(n)?n:[]).reduce((e,t)=>{const i=l_(t);return e+(i>0?i:0)},0)}function ene(n={}){const e=[];["grasslands","grasslandList","grasslandRows","boundaryRows","boundaryList","geometryList","landList","plots","features"].forEach(r=>{const a=n==null?void 0:n[r];Array.isArray(a)?e.push(...a):Array.isArray(a==null?void 0:a.rows)?e.push(...a.rows):Array.isArray(a==null?void 0:a.list)?e.push(...a.list):Array.isArray(a==null?void 0:a.data)&&e.push(...a.data)});const i=no(n,["wkt","geo","geom","geometryWkt","shape"]);return(i||n!=null&&n.geometry)&&e.push(tn(wt({},n),{id:(n==null?void 0:n.grasslandId)||(n==null?void 0:n.gid)||(n==null?void 0:n.id),pastureId:(n==null?void 0:n.pastureId)||(n==null?void 0:n.pasturesId)||(n==null?void 0:n.pastures_id)||(n==null?void 0:n.muhuId)||(n==null?void 0:n.id),name:(n==null?void 0:n.grasslandName)||(n==null?void 0:n.name),wkt:i,geometry:n==null?void 0:n.geometry})),e.filter(Boolean)}function fp(n={}){var e,t;return typeof n=="string"?!!n.trim():(n==null?void 0:n.type)==="Feature"||n!=null&&n.type&&(n!=null&&n.coordinates)||(e=n==null?void 0:n.geometry)!=null&&e.type||(t=n==null?void 0:n.geometry)!=null&&t.coordinates||typeof(n==null?void 0:n.geometry)=="string"?!0:!!no(n,["wkt","geo","geom","geometryWkt","shape"])}function BXe(n={}){const e=jr(n.bearingCapacity,0),t=jr(n.livestockCapacity,0),i=jr(n.areaRange,0),r=jr(n.yakNumber,0),a=jr(n.overloadRate,e?(t-e)/e*100:0),o=t-e,s=e?v0(t/e*100,1):0,l=j3(a),u=Math.round(r*Yp.yakToSheepUnit),c=u?v0(t/u,2):1,d=i?v0(e/i,4):Yp.grasslandCapacityPerMu;return{bearing:e,livestock:t,areaRange:i,yakNumber:r,yakSheepUnit:u,pressureFactor:c,bearingCoefficient:d,overloadRate:v0(a,1),delta:o,usageRate:s,risk:l,bearingPercent:Math.max(4,Math.min(100,v0(e/Math.max(e,t,1)*100,1))),livestockPercent:Math.max(4,Math.min(100,v0(t/Math.max(e,t,1)*100,1)))}}function zXe(n={},e=j3(n.overloadRate)){const t=String(n.advice||"").trim(),i=t?t.split(/[。;;\n]/).map(o=>o.trim()).filter(Boolean):[],r=["提高放牧畜禽的密度","增加草地的利用率","密度不能过高"],a=i.filter(o=>r.some(s=>o.includes(s))?!1:e.key==="healthy"?!0:!r.some(s=>o.includes(s)));return[...e.actions||[],...a].filter((o,s,l)=>l.indexOf(o)===s).slice(0,4)}const GXe={class:"grass-livestock-balance"},UXe={class:"balance-screen"},VXe={class:"balance-selector"},HXe={class:"balance-scope-tabs"},WXe=["onClick"],jXe={class:"balance-target-list"},$Xe=["title","onClick"],qXe={key:0},XXe={class:"balance-action-box"},YXe=["disabled"],KXe={key:0,class:"balance-running"},ZXe={class:"balance-running-head"},JXe={class:"balance-core-inner"},QXe={class:"balance-running-title"},eYe={class:"balance-progress-line"},tYe={class:"balance-live-process"},nYe={key:1,class:"balance-waiting"},iYe={class:"balance-wait-core"},rYe={class:"balance-core-ring is-empty"},aYe={class:"balance-core-inner"},oYe={class:"balance-preflight"},sYe={key:2,class:"balance-analysis"},lYe={class:"balance-dashboard"},uYe={class:"balance-object-block"},cYe={class:"balance-core"},dYe={class:"balance-core-inner"},hYe={class:"balance-compare"},fYe={class:"balance-bar-row"},pYe={class:"balance-bar-row is-livestock"},vYe={class:"balance-detail"},mYe={class:"balance-process"},gYe={class:"balance-section-title"},yYe={class:"balance-process-track"},_Ye={class:"balance-decision"},SYe={class:"balance-section-title"},bYe={class:"balance-conclusion"},xYe={class:"balance-advice-list"},wYe=326,TYe=720,AYe=1310,CYe=820,MYe=1800,EYe={__name:"index",emits:["loading-progress","map-ready"],setup(n,{emit:e}){const t=e,i=Wt("county"),r=Wt(""),a=Wt("idle"),o=Wt(0),s=Wt(0),l=Wt({}),u=C5(KW.filter(st=>st.type==="pasture")),c=Wt([]),d=Wt(u);let h=!1,f=0,p=null,m=0,v=0,g=null;const _=Ye(()=>[...KW.filter(st=>st.type!=="pasture"),...c.value,...d.value].map(st=>IXe(l.value[st.key],st))),S=Ye(()=>_.value.filter(st=>st.type==="county")),x=Ye(()=>_.value.filter(st=>st.type==="town")),A=Ye(()=>_.value.filter(st=>st.type==="village")),C=Ye(()=>C5(_.value.filter(st=>st.type==="pasture"))),M=Ye(()=>i.value==="town"?x.value:i.value==="village"?A.value:i.value==="pasture"?C.value:S.value),I=Ye(()=>_.value.find(st=>st.key===r.value)||null),D=Ye(()=>!!I.value),E=Ye(()=>a.value==="running"),P=Ye(()=>D.value&&a.value==="done"),F=Ye(()=>BXe(I.value||{})),V=Ye(()=>[{key:"county",name:"县"},{key:"town",name:"镇"},{key:"village",name:"村"},{key:"pasture",name:"牧户"}]),G=Ye(()=>{var st;return((st=V.value.find(it=>it.key===i.value))==null?void 0:st.name)||"县"}),W=Ye(()=>I.value?I.value.pasturesId?`牧户编号 ${I.value.pasturesId}`:I.value.areaCode?`行政区划 ${I.value.areaCode}`:I.value.township||"核算对象":"等待选择核算对象"),Y=Ye(()=>D.value?P.value?"分析已完成":E.value?"正在执行核算":"已选择,待开始分析":"请先选择具体对象"),Q=Ye(()=>P.value?"草畜平衡分析舱":"草畜平衡分析"),K=Ye(()=>D.value?E.value?"分析中":"待开始":"待选择"),ae=Ye(()=>D.value?E.value?`${I.value.name} 正在分析`:`${I.value.name} 待开始分析`:"先选择一个核算对象"),ie=Ye(()=>D.value?E.value?"正在读取核算参数、执行公式计算,并生成结论与调控建议。":"点击左侧开始分析后,再展示结果、分析过程、结论和建议。":"选择县、镇、村或牧户后,系统才会进入草地承载力核算。"),he=Ye(()=>{const st=F.value;return`${st.delta>0?"超载量":"承载余量"} ${We(Math.abs(st.delta))} 牛点位,承载利用率 ${MT(st.usageRate)}。`}),Ee=Ye(()=>{const st=Math.max(0,Math.min(130,Number(F.value.usageRate)||0));return`${Math.round(st/130*360)}deg`}),He=Ye(()=>{const st=F.value;return[{key:"target",index:"01",name:"对象锁定",plan:"确定县、镇、村或牧户核算口径",desc:"统一行政区划与牧户对象,作为本次草畜平衡分析范围。",status:"已完成"},{key:"params",index:"02",name:"参数校验",plan:"核验草地、牲畜与承载系数",desc:"优先采用接口返回数据,缺失时使用本地基础台账补齐。",status:"已完成"},{key:"model",index:"03",name:"模型核算",plan:"评估草地承载压力与平衡状态",desc:"对理论承载力和实际载畜压力进行比对,识别超载风险。",status:"已完成"},{key:"scheme",index:"04",name:"方案输出",plan:st.delta>0?"形成压减、补饲与轮牧调控方案":"形成持续监测与稳态保持方案",desc:"根据风险等级生成治理建议,供后续调度和监管使用。",status:st.risk.shortLabel||"完成"}]}),xe=Ye(()=>{const st=F.value;return[{key:"target",index:"01",name:"锁定核算对象",desc:"确认行政区划与对象口径",pending:"等待对象确认",expression:"按所选层级锁定本次核算范围",result:"已锁定"},{key:"params",index:"02",name:"核验基础参数",desc:"校验草地、牲畜与承载系数",pending:"等待参数读取",expression:"按接口数据与本地台账进行参数补齐",result:"已校验"},{key:"model",index:"03",name:"评估平衡状态",desc:"识别承载压力与风险等级",pending:"等待模型核算",expression:"比对理论承载能力与实际放牧压力",result:"已评估"},{key:"conclusion",index:"04",name:"生成调控方案",desc:"输出治理建议与监管方向",pending:"等待结论生成",expression:st.delta>0?"生成载畜调控与补饲建议":"生成稳态保持与动态监测建议",result:st.risk.label}]}),Fe=Ye(()=>xe.value[Math.min(s.value,xe.value.length-1)]||xe.value[0]),pt=Ye(()=>[{key:"select",index:"01",name:"对象锁定",desc:D.value?I.value.name:"等待选择",state:D.value?"done":"active"},{key:"params",index:"02",name:"参数读取",desc:P.value?"草地与牦牛参数已确认":"分析后读取",state:E.value?"active":P.value?"done":D.value?"pending":"disabled"},{key:"formula",index:"03",name:"模型推演",desc:P.value?"承载模型已完成":"等待公式计算",state:E.value?"active":P.value?"done":"disabled"},{key:"result",index:"04",name:"结论生成",desc:P.value?F.value.risk.label:"等待建议生成",state:P.value?"done":"disabled"}]),Ot=Ye(()=>P.value?zXe(I.value,F.value.risk):[]);dl(()=>{t("loading-progress",{progress:100}),t("map-ready"),Lt(),J()}),Bl(()=>{h=!0,f+=1,m+=1,v+=1,$e()}),qa(()=>{var st;return(st=I.value)==null?void 0:st.key},()=>{a.value="idle",o.value=0,s.value=0,g=null,$e()});function bt(st){i.value=st,r.value="",a.value="idle"}function ht(st){st&&(i.value=["county","town","village","pasture"].includes(st.type)?st.type:"county",r.value=st.key,a.value="idle")}function Kt(){if(!I.value||E.value)return;a.value="running",o.value=0,s.value=0,$e();const st=Date.now(),it=Tt();g=it,p=window.setInterval(()=>{if(h)return;const Vt=g===it?92:100;o.value=Math.min(Vt,o.value+4),s.value=Math.min(xe.value.length-1,Math.floor(o.value/22))},90),it.finally(()=>rn(this,null,function*(){const Vt=MYe-(Date.now()-st);Vt>0&&(yield new Promise(Zt=>window.setTimeout(Zt,Vt))),!(h||a.value!=="running"||g!==it)&&(g=null,o.value=100,s.value=xe.value.length-1,$e(),a.value="done")}))}function Tt(){return rn(this,null,function*(){const st=I.value;if(!st||l.value[st.key])return null;const it=++f;try{const Vt=yield dXe({areaCode:st.type==="pasture"?void 0:st.areaCode,pasturesId:st.type==="pasture"?st.pasturesId:void 0});return h||it!==f||!Vt?null:(l.value=tn(wt({},l.value),{[st.key]:Vt}),Vt)}catch(Vt){return null}})}function Ae(st){return st.type==="pasture"?st.township||"牧户":st.type==="village"||st.type==="town"?"":"县级对象"}function Lt(){return rn(this,null,function*(){const st=++m,it=x.value.filter(Vt=>Vt==null?void 0:Vt.areaCode).map(Vt=>wt({},Vt));if(it.length)try{const Vt=yield Promise.all(it.map(Zt=>rn(this,null,function*(){try{const nn=yield hXe(Zt.areaCode);return h||st!==m?[]:vt(nn,Zt)}catch(nn){return[]}})));if(h||st!==m)return;c.value=Vt.flat()}catch(Vt){if(h||st!==m)return;c.value=[]}})}function vt(st=[],it={}){const Vt=(Array.isArray(st)?st:[]).filter(Ln=>{const je=k(Ln),Ht=_t(Ln);return!!(je||Ht)}),Zt=Vt.length||1,nn=(jr(it.areaRange,0)||0)/Zt,cn=(jr(it.yakNumber,0)||0)/Zt,an=Ct(it);return Vt.map((Ln,je)=>Ft(Ln,je,it,{areaRange:nn,yakNumber:cn,pressureFactor:an})).filter(Boolean)}function Ft(st={},it=0,Vt={},Zt={}){const nn=k(st),cn=_t(st)||(nn?`村级区划${nn}`:"");if(!nn&&!cn)return null;const an=jr(no(st,["areaRange","area_range","grasslandArea","grassland_area","acreage","area"]),Zt.areaRange),Ln=jr(no(st,["yakNumber","yak_number","number","yakCount","yak_count","livestockCount","livestock_count"]),Zt.yakNumber);return w7({key:`village-${nn||`${Vt.key||Vt.name}-${cn}-${it}`}`,type:"village",name:cn,areaCode:nn,areaRange:an,yakNumber:Ln,township:Vt.name,source:st,pressureFactor:Zt.pressureFactor})}function k(st={}){return String(no(st,["areaCode","area_code","code","value","id","areaId","area_id"],"")||"").trim()}function _t(st={}){return String(no(st,["areaName","area_name","name","label","zoneName","villageName","village_name"],"")||"").trim()}function Ct(st={}){const it=jr(st.yakNumber,0),Vt=jr(st.livestockCapacity,0),Zt=it*Yp.yakToSheepUnit,nn=Zt?Vt/Zt:1;return Number.isFinite(nn)&&nn>0?nn:1}function J(){return rn(this,null,function*(){const st=++v;try{const[it,Vt]=yield Promise.allSettled([Ute("",1,1e4),Vte()]);if(h||st!==v)return;const Zt=it.status==="fulfilled"?it.value:[],nn=Vt.status==="fulfilled"?Vt.value:[],cn=ee(Zt,nn),an=ZW(cn);an.length&&(d.value=an);const Ln=yield Bt(an,st);if(h||st!==v||!Ln.size)return;d.value=ZW(cn,Ln)}catch(it){d.value=u}})}function ee(st=[],it=[]){const Vt=new Map;(Array.isArray(it)?it:[]).forEach(nn=>{xt(nn).forEach(cn=>{Vt.set(cn,wt(wt({},Vt.get(cn)||{}),nn))})});const Zt=Array.isArray(st)&&st.length?st:it;return(Array.isArray(Zt)?Zt:[]).map(nn=>{const cn=xt(nn).map(an=>Vt.get(an)).find(Boolean);return cn?Ue(nn,cn):nn})}function Ue(st={},it={}){const Vt=wt({},st);return Object.entries(it).forEach(([Zt,nn])=>{(Vt[Zt]===void 0||Vt[Zt]===null||Vt[Zt]==="")&&(Vt[Zt]=nn)}),Vt}function xt(st={}){return[st.id,st.pasturesId,st.pastures_id,st.pastureId,st.pasture_id,st.muhuId,st.muhu_id,st.name,st.pasturesName,st.pastures_name,st.muhuName,st.muhu_name,st.pastureName,st.pasture_name].map(it=>String(it||"").trim()).filter(Boolean)}function Bt(){return rn(this,arguments,function*(st=[],it){const Vt=new Map,Zt=st.filter(nn=>nn==null?void 0:nn.pasturesId);return yield Ce(Zt,12,nn=>rn(this,null,function*(){if(!(h||it!==v))try{const cn=yield bM(nn.pasturesId);if(h||it!==v)return;Vt.set(String(nn.pasturesId),{rows:Array.isArray(cn)?cn:[],hasBoundary:s_({grasslands:cn})}),s_({grasslands:cn})&&(d.value=C5(d.value.map(an=>String(an.pasturesId)===String(nn.pasturesId)?tn(wt({},an),{hasBoundary:!0,boundaryCount:Array.isArray(cn)?cn.length:an.boundaryCount,grasslands:Array.isArray(cn)?cn:an.grasslands}):an)))}catch(cn){Vt.set(String(nn.pasturesId),{rows:[],hasBoundary:!1})}})),Vt})}function Ce(){return rn(this,arguments,function*(st=[],it=6,Vt){const Zt=[...st],nn=Array.from({length:Math.min(it,Zt.length)},()=>rn(this,null,function*(){for(;Zt.length&&!h;){const cn=Zt.shift();yield Vt(cn)}}));yield Promise.all(nn)})}function We(st){return Kte((Number(st)||0)/Yp.yakToSheepUnit)}function $e(){p&&(window.clearInterval(p),p=null)}function mt(st){return P.value||E.value&&st<=s.value}function Yt(st){return st<s.value||P.value?"done":st===s.value&&E.value?"active":"pending"}return(st,it)=>(Te(),Pe("div",GXe,[it[15]||(it[15]=O("div",{class:"balance-backdrop","aria-hidden":"true"},[O("div",{class:"balance-orbit is-left"}),O("div",{class:"balance-orbit is-right"}),O("div",{class:"balance-energy-band"})],-1)),O("div",UXe,[gn(Mi,{class:"balance-card balance-target-card",title:"核算对象",width:wYe,height:TYe},{default:mi(()=>{var Vt;return[O("div",VXe,[O("div",HXe,[(Te(!0),Pe(bn,null,Bn(V.value,Zt=>(Te(),Pe("button",{key:Zt.key,type:"button",class:Xn({active:i.value===Zt.key}),onClick:nn=>bt(Zt.key)},De(Zt.name),11,WXe))),128))]),O("div",jXe,[(Te(!0),Pe(bn,null,Bn(M.value,Zt=>{var nn;return Te(),Pe("button",{key:Zt.key,type:"button",class:Xn({active:Zt.key===((nn=I.value)==null?void 0:nn.key)}),title:Zt.name,onClick:cn=>ht(Zt)},[O("span",null,De(Zt.name),1),Ae(Zt)?(Te(),Pe("small",qXe,De(Ae(Zt)),1)):Dn("",!0)],10,$Xe)}),128))]),O("div",XXe,[it[0]||(it[0]=O("span",null,"当前对象",-1)),O("strong",null,De(((Vt=I.value)==null?void 0:Vt.name)||"未选择"),1),O("small",null,De(Y.value),1),O("button",{type:"button",disabled:!D.value||E.value,onClick:Kt},De(E.value?"分析中...":P.value?"重新分析":"开始分析"),9,YXe)])])]}),_:1}),gn(Mi,{class:"balance-card balance-sheet-card",title:Q.value,width:AYe,height:CYe},{default:mi(()=>[O("div",{class:Xn(["balance-sheet",{"is-ready":P.value,"is-running":E.value}])},[it[14]||(it[14]=O("div",{class:"balance-field-lines","aria-hidden":"true"},[O("i"),O("i"),O("i")],-1)),E.value?(Te(),Pe("section",KXe,[O("div",ZXe,[O("div",{class:"balance-core-ring is-running",style:Ji({"--usage-angle":`${o.value*3.6}deg`})},[O("div",JXe,[it[1]||(it[1]=O("span",null,"分析进度",-1)),O("strong",null,De(o.value)+"%",1),O("small",null,De(Fe.value.name),1)])],4),O("div",QXe,[O("span",null,De(I.value.name),1),O("strong",null,De(Fe.value.desc),1),O("small",null,De(Fe.value.expression),1),O("div",eYe,[O("i",{style:Ji({width:`${o.value}%`})},null,4)])])]),O("div",tYe,[(Te(!0),Pe(bn,null,Bn(xe.value,(Vt,Zt)=>(Te(),Pe("div",{key:Vt.key,class:Xn(["balance-live-step",`is-${Yt(Zt)}`])},[O("span",null,De(Vt.index),1),O("div",null,[O("strong",null,De(Vt.name),1),O("p",null,De(mt(Zt)?Vt.expression:Vt.pending),1)]),O("em",null,De(mt(Zt)?Vt.result:"等待"),1)],2))),128))])])):P.value?(Te(),Pe("section",sYe,[O("div",lYe,[O("div",uYe,[O("span",null,De(G.value)+"核算对象",1),O("strong",null,De(I.value.name),1),O("small",null,De(W.value),1)]),O("div",cYe,[O("div",{class:"balance-core-ring",style:Ji({"--usage-angle":Ee.value})},[O("div",dYe,[it[5]||(it[5]=O("span",null,"承载利用率",-1)),O("strong",null,De(Tr(MT)(F.value.usageRate)),1),O("small",null,"超载率 "+De(Tr(MT)(F.value.overloadRate)),1)])],4),it[6]||(it[6]=O("div",{class:"balance-core-caption"},"草地承载力模型",-1))]),O("div",{class:Xn(["balance-verdict-card",`is-${F.value.risk.key}`])},[it[7]||(it[7]=O("span",null,"分析结论",-1)),O("strong",null,De(F.value.risk.label),1),O("small",null,De(F.value.delta>0?"需调控载畜量":"承载能力可覆盖"),1)],2)]),O("div",hYe,[O("div",fYe,[it[9]||(it[9]=O("span",null,"理论承载力",-1)),O("div",null,[O("i",{style:Ji({width:`${F.value.bearingPercent}%`})},null,4)]),O("strong",null,[kr(De(We(F.value.bearing)),1),it[8]||(it[8]=O("em",null,"牛点位",-1))])]),O("div",pYe,[it[11]||(it[11]=O("span",null,"实际载畜量",-1)),O("div",null,[O("i",{style:Ji({width:`${F.value.livestockPercent}%`})},null,4)]),O("strong",null,[kr(De(We(F.value.livestock)),1),it[10]||(it[10]=O("em",null,"牛点位",-1))])])]),O("div",vYe,[O("div",mYe,[O("div",gYe,[it[12]||(it[12]=O("span",null,"分析过程",-1)),O("small",null,De(I.value.year||"当前年度"),1)]),O("div",yYe,[(Te(!0),Pe(bn,null,Bn(pt.value,Vt=>(Te(),Pe("span",{key:`track-${Vt.key}`,class:Xn(`is-${Vt.state}`)},De(Vt.name),3))),128))]),(Te(!0),Pe(bn,null,Bn(He.value,Vt=>(Te(),Pe("div",{key:Vt.key,class:"balance-formula-row"},[O("span",null,De(Vt.index),1),O("div",null,[O("strong",null,De(Vt.name),1),O("p",null,De(Vt.plan),1),O("small",null,De(Vt.desc),1)]),O("em",null,De(Vt.status),1)]))),128))]),O("div",_Ye,[O("div",SYe,[it[13]||(it[13]=O("span",null,"结论与建议",-1)),O("small",null,De(F.value.delta>0?"需要调控":"保持监测"),1)]),O("div",bYe,[O("strong",null,De(F.value.risk.description),1),O("p",null,De(he.value),1)]),O("div",xYe,[(Te(!0),Pe(bn,null,Bn(Ot.value,(Vt,Zt)=>(Te(),Pe("div",{key:`${Vt}-${Zt}`,class:"balance-advice-item"},[O("span",null,De(Zt+1),1),O("p",null,De(Vt),1)]))),128))])])])])):(Te(),Pe("section",nYe,[O("div",iYe,[O("div",rYe,[O("div",aYe,[O("span",null,De(K.value),1),O("strong",null,De(D.value?I.value.name:"草畜平衡"),1),O("small",null,De(D.value?"待执行模型分析":"等待核算对象"),1)])]),O("h2",null,De(ae.value),1),O("p",null,De(ie.value),1)]),O("div",oYe,[O("span",{class:Xn({active:D.value})},"对象锁定",2),it[2]||(it[2]=O("i",null,null,-1)),O("span",{class:Xn({active:D.value})},"等待启动分析",2),it[3]||(it[3]=O("i",null,null,-1)),it[4]||(it[4]=O("span",null,"生成过程与结论",-1))])]))],2)]),_:1},8,["title"])])]))}},tne="/jsyApi",Wh="/openApi",PYe=new Date().getFullYear();function RYe(n,e){return/^https?:\/\//.test(e)?e:`${n}${e.startsWith("/")?e:`/${e}`}`}function LYe(n){if((n==null?void 0:n.success)===!1&&(n==null?void 0:n.code)!==void 0&&![0,200,"0","200"].includes(n.code))throw new Error((n==null?void 0:n.msg)||(n==null?void 0:n.message)||"接口请求失败");return ki(n)}function ac(n,e,t,i={}){return su(RYe(n,e),{params:t,timeout:i.timeout||18e3}).then(LYe)}function IYe(){return ac(tne,"/api/yak/distribution").then(n=>nne(n))}function DYe(){return ac(tne,"/api/yak/forecast").then(n=>nne(n))}function JW(n=PYe){return ac(Wh,"/yak/trade/overview",typeof n=="object"?n:{year:n}).then(t=>t||{})}function NYe(){return ac(Wh,"/yak/trade/options").then(n=>n||{})}function QW(n={}){return ac(Wh,"/yak/trade/records",n).then(e=>e||{})}function kYe(n={}){return ac(Wh,"/yak/epidemic/analysis",n).then(e=>e||{})}function ej(n={}){return ac(Wh,"/yak/epidemic/records",n).then(e=>e||{})}function FYe(n={}){return ac(Wh,"/yak/epidemic/stats",n).then(e=>e||{})}function OYe(n={}){return ac(Wh,"/yak/epidemic/village-stats",n).then(e=>e||{})}function BYe(n){return ac(Wh,"/yak/epidemic/detail",{earTag:n}).then(e=>e||null)}function zYe(){return rn(this,null,function*(){return(yield IYe()).map((e,t)=>({key:rv(e,["areaCode","area_code","code","id"],`yak-town-${t}`),name:rv(e,["areaName","area_name","zoneName","townName","name"],`区域${t+1}`),value:oL(rv(e,["number","yakCount","yak_count","count","value"])),unit:"头"})).filter(e=>e.name&&Number.isFinite(e.value)).sort((e,t)=>t.value-e.value)})}function GYe(){return rn(this,null,function*(){return(yield DYe()).map((e,t)=>{const i=rv(e,["month","date","name","time"],`预测${t+1}`);return{key:`${i}-${t}`,name:UYe(i),value:oL(rv(e,["number","count","yakCount","value"])),unit:"头",extra:VYe("增速",rv(e,["speed","growth","growthRate","rate"]))}}).filter(e=>e.name&&Number.isFinite(e.value))})}function nne(n){return Array.isArray(n)?n:Array.isArray(n==null?void 0:n.rows)?n.rows:Array.isArray(n==null?void 0:n.list)?n.list:Array.isArray(n==null?void 0:n.records)?n.records:Array.isArray(n==null?void 0:n.data)?n.data:[]}function rv(n,e,t=""){for(const i of e){const r=n==null?void 0:n[i];if(r!=null&&r!=="")return r}return t}function UYe(n){const e=String(n||""),t=e.match(/(?:^|\D)(1[0-2]|0?[1-9])(?:月|$|-)/);return t?`${Number(t[1])}月`:e}function VYe(n,e){const t=oL(e);return Number.isFinite(t)?`${n}:${t.toLocaleString("zh-CN",{maximumFractionDigits:2})}`:""}function oL(n){if(n==null||n==="")return NaN;const e=Number(String(n).replace(/,/g,"").replace(/%/g,""));return Number.isFinite(e)?e:NaN}const HYe={class:"yak-management"},WYe={key:0,class:"yak-map-loading"},jYe={class:"yak-management-ui"},$Ye={key:0,class:"trade-year-switcher","aria-label":"交易年份切换"},qYe=["onClick"],XYe={key:1,class:"forecast-year-switcher","aria-label":"预测年份切换"},YYe=["onClick"],KYe={class:"yak-left"},ZYe={class:"yak-side-stack is-left"},JYe={class:"estimate-summary-card"},QYe={class:"estimate-flow-row"},eKe={class:"estimate-flow-item"},tKe={class:"estimate-flow-item is-adjustment"},nKe={class:"estimate-result-band"},iKe={class:"forecast-summary-card"},rKe={class:"forecast-result-row"},aKe={class:"forecast-result-main"},oKe={class:"forecast-simple-grid"},sKe={class:"epidemic-overview-card"},lKe={class:"epidemic-main-value"},uKe={class:"epidemic-progress-ring"},cKe={class:"epidemic-overview-grid"},dKe={class:"epidemic-chain-card"},hKe={class:"epidemic-chain-row"},fKe={class:"epidemic-chain-note"},pKe={class:"epidemic-chain-metrics"},vKe={key:0,class:"epidemic-three-pie-card"},mKe={class:"epidemic-three-pie-visual"},gKe={class:"epidemic-three-pie-center"},yKe={class:"epidemic-three-pie-legend"},_Ke={key:1,class:"epidemic-empty"},SKe={class:"trade-overview-card"},bKe={class:"trade-main-metric"},xKe={class:"trade-metric-grid"},wKe={class:"yak-right"},TKe={class:"yak-side-stack is-right"},AKe={class:"forecast-heat-list"},CKe={class:"epidemic-record-table is-double"},MKe={class:"epidemic-record-toolbar"},EKe={class:"epidemic-record-rows"},PKe=["onClick"],RKe={key:0,class:"epidemic-empty"},LKe={class:"trade-cert-card"},IKe={class:"trade-cert-main"},DKe={class:"trade-dest-list"},NKe={key:0,class:"epidemic-empty"},kKe={class:"trade-ledger-table"},FKe={class:"trade-ledger-toolbar"},OKe={class:"trade-ledger-rows"},BKe=["onClick"],zKe={key:0,class:"epidemic-empty"},GKe={class:"trade-ledger-pager"},UKe=["disabled"],VKe=["disabled"],HKe={class:"yak-bottom-topic"},WKe={class:"epidemic-ledger-dialog"},jKe={class:"epidemic-ledger-dialog-head"},$Ke={class:"epidemic-ledger-filters"},qKe=["value"],XKe=["value"],YKe={class:"epidemic-ledger-workspace"},KKe={class:"epidemic-ledger-list"},ZKe=["onClick"],JKe={key:0,class:"epidemic-empty"},QKe={class:"epidemic-ledger-detail"},eZe={class:"epidemic-detail-head"},tZe={class:"epidemic-detail-scroll"},nZe={class:"epidemic-detail-section-title"},iZe={class:"epidemic-detail-grid is-modal"},rZe={key:0,class:"epidemic-detail-section"},aZe={class:"epidemic-modal-photo-strip"},oZe=["src"],sZe={class:"epidemic-ledger-pager"},lZe=["disabled"],uZe=["disabled"],cZe={class:"epidemic-ledger-dialog trade-ledger-dialog"},dZe={class:"epidemic-ledger-dialog-head"},hZe={class:"epidemic-ledger-filters trade-ledger-filters"},fZe=["value"],pZe=["value"],vZe=["value"],mZe={class:"epidemic-ledger-workspace trade-ledger-workspace"},gZe={class:"epidemic-ledger-list trade-ledger-modal-list"},yZe=["onClick"],_Ze={key:0,class:"epidemic-empty"},SZe={class:"epidemic-ledger-detail trade-ledger-detail"},bZe={class:"epidemic-detail-head"},xZe={class:"epidemic-detail-grid is-modal trade-detail-grid"},wZe={class:"is-wide"},TZe={class:"is-wide"},AZe=["disabled"],CZe={class:"epidemic-ledger-pager"},MZe=["disabled"],EZe=["disabled"],Lr=398,Ir=190,PZe="https://qkl-hy.oss-cn-chengdu.aliyuncs.com/yak-vaccine-images",tj=14,ET=12,nj=14,RZe=5e3,H4=6,LZe=4200,IZe={__name:"index",emits:["module-stats"],setup(n,{emit:e}){const t=e,i=Ir*2+12,r=Ir*2+12,a=["#30dcff","#27f0c0","#ffd76c","#7aa7ff","#ff8f6b","#a6f06d"],o=["#24f6c4","#32dcff","#ffe06b","#7ee269","#ff9a62","#9ea7ff"],s=["#30dcff","#ffd76c","#27f0c0","#7aa7ff","#ff8f6b","#a6f06d","#9ea7ff"],l={name:"红原牦牛交易市场",lng:102.562157,lat:32.820484},u=[{key:"structure",name:"畜群结构",color:"#30dcff"},{key:"forecast",name:"畜群预测",color:"#ffd76c"},{key:"epidemic",name:"牦牛防疫",color:"#27f0c0"},{key:"trade",name:"牦牛交易",color:"#ffcf62"}],c=Wt("structure"),d=Wt("2027"),h=Wt(0),f=Wt([]),p=Wt([]),m=Wt({metrics:{}}),v=Wt({rows:[],year:null}),g=Wt({rows:[]}),_=Wt([]),S=Wt(0),x=Wt(!1),A=Wt(""),C=Wt(!1),M=Wt([]),I=Wt(0),D=Wt(1),E=Wt(!1),P=Wt(""),F=Wt(null),V=Wt(null),G=Wt(!1),W=Wt({keyword:"",town:"",medicine:"",startDate:"",endDate:""}),Y=Wt({years:[],latestYear:null}),Q=Wt({metrics:{},hasData:!1}),K=Wt([]),ae=Wt(0),ie=Wt(null),he=Wt(!1),Ee=Wt(""),He=Wt(1),xe=Wt(""),Fe=Wt(""),pt=Wt(!1),Ot=Wt([]),bt=Wt(0),ht=Wt(1),Kt=Wt(!1),Tt=Wt(""),Ae=Wt(null),Lt=Wt({keyword:"",startTown:"",usageType:"",certType:""}),vt=Wt(null),Ft=Wt(!1);let k=null,_t=!1,Ct=null,J=null,ee=0;const Ue=Ye(()=>Zee(d.value)),xt=Ye(()=>Kee+BR),Bt=Ye(()=>Ue.value.stock-Kd),Ce=Ye(()=>{var X;return((X=Lc.find(q=>q.key==="adultCow"))==null?void 0:X.ratio)||0}),We=Ye(()=>{var X;return((X=Lc.find(q=>q.key==="calf"))==null?void 0:X.ratio)||0}),$e=Ye(()=>di(f.value.length?f.value:hM,hM)),mt=Ye(()=>p.value.length>=6?p.value:uGe),Yt=Ye(()=>pGe(Ue.value)),st=Ye(()=>fGe(Ue.value)),it=Ye(()=>{var X;return((X=m.value)==null?void 0:X.metrics)||{}}),Vt=Ye(()=>{var X;return Mt((X=m.value)==null?void 0:X.dateTrend).sort(Ui)}),Zt=Ye(()=>{var X;return Mt((X=m.value)==null?void 0:X.medicineCounts)}),nn=Ye(()=>Zt.value.filter(X=>X.value>0).map((X,q)=>tn(wt({},X),{key:X.key||`${X.name}-${q}`,unit:"条"}))),cn=Ye(()=>nn.value.map(X=>`${X.name}:${X.value}`).join("|")||"epidemic-medicine-empty"),an=Ye(()=>{var X;return Mt((X=m.value)==null?void 0:X.ownerRanks).slice(0,8)}),Ln=Ye(()=>Math.max(Zt.value.filter(X=>X.name!=="未填写").length,1)),je=Ye(()=>{var X;return((X=Zt.value.find(q=>q.name&&q.name!=="未填写"))==null?void 0:X.name)||"-"}),Ht=Ye(()=>ye(it.value,["total","vaccine"])),wn=Ye(()=>ye(it.value,["owners"])),zn=Ye(()=>ye(it.value,["villages"])),Be=Ye(()=>ut.value.length),pn=Ye(()=>{var X;return((X=ut.value[0])==null?void 0:X.name)||"-"}),dn=Ye(()=>{const X=_.value.map(q=>q.operateTime).filter(Boolean).sort();return X.length?gt(X[X.length-1]):"-"}),Un=Ye(()=>{const X=Math.max(...Zt.value.map(q=>Number(q.value||0)),0);return X>0?X:Math.round(Ht.value/Ln.value)}),En=Ye(()=>{var q;const X=nr((q=v.value)==null?void 0:q.rows);return X.length?X:ut.value.map(ce=>({name:ce.name,recordCount:Number(ce.recordCount||0),earTagCount:Number(ce.earTagCount||0),ratio:ce.ratio,source:"ledger"}))}),Tn=Ye(()=>{var q;const X=new Set;return fs((q=g.value)==null?void 0:q.rows).filter(ce=>Number.isFinite(ce.lng)&&Number.isFinite(ce.lat)).map((ce,Je)=>{const Nt=`${ce.lng.toFixed(4)},${ce.lat.toFixed(4)}`,Cn=X.has(Nt)?(Je%3-1)*.012:0;return X.add(Nt),tn(wt({},ce),{name:ce.village,value:ce.earTagCount,unit:"万头",lng:ce.lng+Cn,lat:ce.lat-Cn*.65,displayValue:Number((ce.earTagCount/1e4).toFixed(2)),displayUnit:"万头",rankLabel:`第${Je+1}名`})})}),ut=Ye(()=>{var q;const X=new Map;return Mt((q=m.value)==null?void 0:q.townCounts).forEach(ce=>{const Je=Ve(ce.name);Je&&X.set(Je,Number(X.get(Je)||0)+Number(ce.value||0))}),[...X.entries()].map(([ce,Je])=>{const Nt=Math.round(Je/Ln.value),Cn=Ht.value?Je/Ht.value*100:0;return{name:ce,recordCount:Je,earTagCount:Nt,ratio:Cn}}).sort((ce,Je)=>Number(Je.recordCount||0)-Number(ce.recordCount||0))}),Jt=Ye(()=>_.value.slice(0,13)),hn=Ye(()=>Math.max(Math.ceil(I.value/tj),1)),Nn=Ye(()=>V.value||F.value||{}),Re=Ye(()=>qe(Nn.value)),lt=Ye(()=>{const X=Nn.value||{};return[{title:"基础信息",fields:[et("电子耳标",X.earTag,{wide:!0}),et("台账编号",X.epidemicId)]},{title:"牧户信息",fields:[et("养殖户",X.owner),et("联系电话",Dt(X.phone)),et("证件类型",X.idType),et("证件号码",fn(X.idNo))]},{title:"行政地址",fields:[et("镇/乡",X.town),et("村",X.village),et("详细地址",X.location,{wide:!0})]},{title:"畜只信息",fields:[et("畜种",X.livestockType),et("性别",X.sex),et("畜龄",X.age),et("体重",Gt(X.weight))]},{title:"防疫信息",fields:[et("疫苗/药品",X.medicine),et("防疫类型",X.preventionType),et("免疫方式",X.method),et("剂量",vn(X.dose)),et("免疫时间",gt(X.operateTime)),et("操作员",X.operator)]}].map(q=>tn(wt({},q),{fields:q.fields.filter(Boolean)})).filter(q=>q.fields.length)}),sn=Ye(()=>{var X;return Mt((X=m.value)==null?void 0:X.townCounts).map(q=>q.name)}),Pi=Ye(()=>Zt.value.map(X=>X.name).filter(X=>X&&X!=="未填写")),er=Ye(()=>{var X;return((X=Q.value)==null?void 0:X.metrics)||{}}),_e=Ye(()=>{var X,q,ce,Je,Nt,Cn,Fi,Ki;return jt((X=Y.value)==null?void 0:X.years,(q=Q.value)==null?void 0:q.availableYears,(ce=Q.value)==null?void 0:ce.available_years,(Je=Q.value)==null?void 0:Je.yearSummary,(Nt=Q.value)==null?void 0:Nt.year_summary,(Cn=Q.value)==null?void 0:Cn.latestYear,(Fi=Q.value)==null?void 0:Fi.latest_year,(Ki=Q.value)==null?void 0:Ki.year)}),ze=Ye(()=>{var X,q;return Sn(((X=Q.value)==null?void 0:X.monthTrend)||((q=Q.value)==null?void 0:q.month_trend),"name")});Ye(()=>{var X,q;return Hn(((X=Q.value)==null?void 0:X.yearSummary)||((q=Q.value)==null?void 0:q.year_summary))});const Qe=Ye(()=>{var X,q;return Sn(((X=Q.value)==null?void 0:X.startTownCounts)||((q=Q.value)==null?void 0:q.start_town_counts),"name")}),At=Ye(()=>{var X,q;return Sn(((X=Q.value)==null?void 0:X.usageCounts)||((q=Q.value)==null?void 0:q.usage_counts),"name")}),ke=Ye(()=>{const X=Qe.value.map(ce=>{const Je=String(ce.name||"").trim(),Nt=Ve(Je),Cn=tr(Nt||Je);return tn(wt({},ce),{rawName:Je,name:Cn,displayName:Cn,town:Nt,mapTownName:Nt})}).filter(ce=>ce.name&&ce.name!=="未填写").slice(0,10),q=Math.max(...X.map(ce=>ce.headCount),1);return X.map((ce,Je)=>tn(wt({},ce),{key:ce.key||`${ce.mapTownName||ce.name}-${Je}`,value:ce.headCount,unit:"头",ratio:Math.max(8,Math.round(ce.headCount/q*100))}))}),ft=Ye(()=>K.value.slice(0,ET)),en=Ye(()=>Math.max(Math.ceil(ae.value/ET),1)),we=Ye(()=>Math.max(Math.ceil(bt.value/nj),1)),Xe=Ye(()=>Ae.value||{}),Pt=Ye(()=>Xe.value.certId||Xe.value.factoryCode||""),Rt=Ye(()=>{var q,ce;const X=pi(((q=Y.value)==null?void 0:q.startTowns)||((ce=Y.value)==null?void 0:ce.start_towns));return X.length?X:yi(Qe.value.map(Je=>Je.name))}),Et=Ye(()=>{var q,ce;const X=pi(((q=Y.value)==null?void 0:q.usageTypes)||((ce=Y.value)==null?void 0:ce.usage_types));return X.length?X:yi(At.value.map(Je=>Je.name))}),Fn=Ye(()=>{var q,ce,Je,Nt;const X=hi(((q=Y.value)==null?void 0:q.certTypeOptions)||((ce=Y.value)==null?void 0:ce.cert_type_options));return X.length?X:pi(((Je=Y.value)==null?void 0:Je.certTypes)||((Nt=Y.value)==null?void 0:Nt.cert_types)).map(Cn=>({value:Cn,label:Cn}))}),Qn=Ye(()=>ke.value.map((X,q)=>({key:X.key||`${X.name}-${q}`,name:X.displayName||X.name,displayName:X.displayName||X.name,rawName:X.rawName,town:X.mapTownName||X.town||Ve(X.name),mapTownName:X.mapTownName||X.town||Ve(X.name),value:X.headCount,headCount:X.headCount,recordCount:X.recordCount,ratio:X.ratio,unit:"头"}))),ci=Ye(()=>$e.value.map(X=>tn(wt({},X),{adultCowRatio:Ce.value,calfRatio:We.value,adultCow:Math.round(X.count*Ce.value/100),calf:Math.round(X.count*We.value/100)}))),li=Ye(()=>{const X=ci.value,q=X.length,ce=Math.max(Math.ceil(q/H4),1),Je=h.value%ce,Nt=Je*H4,Cn=Math.min(Nt+H4,q);return{page:Je,pageCount:ce,start:Nt,end:Cn,total:q,rows:X.slice(Nt,Cn)}}),Z=Ye(()=>c.value==="forecast"?Yt.value:$e.value),H=Ye(()=>c.value==="forecast"?"forecast":"count"),w=Ye(()=>M7(Z.value,H.value)),T=Ye(()=>({key:"yak-marks-layer",layerName:"ne:daping_yak_marks",name:"牦牛识别标记",opacity:.96,queryBuffer:10,legends:[{key:"yak-marks",name:"牦牛",fillColor:"#FFFF00",strokeColor:"#FFFF00",selectable:!1}]})),R=Ye(()=>{var ce;const q=fs((ce=g.value)==null?void 0:ce.rows).map(Je=>ir(Je.town,Je.village)).filter(Boolean);return{key:"yak-epidemic-village-boundary",sourceType:"wfs",layerName:"ne:t_pastures_map",styles:"牧场样式",name:"防疫村边界",opacity:.86,queryBuffer:8,cqlFilter:q.length?q.join(" OR "):"EXCLUDE",legends:[{key:"yak-epidemic-village-boundary",name:"防疫村边界",fillColor:"#24F6C4",strokeColor:"#FFF06A",selectable:!1}]}}),N=Ye(()=>c.value==="epidemic"?R.value:c.value==="trade"?null:T.value),z=Ye(()=>c.value==="trade"?{scope:"trade-flow",title:`${ie.value||""}出栏来源`,metricLabel:"来源",unit:"头",source:tn(wt({},l),{total:Ne("headCount")}),rows:Qn.value}:{scope:c.value==="epidemic"?"village":"town",hideTownNames:c.value==="epidemic",title:c.value==="forecast"?`${Ue.value.shortLabel}预测存栏`:c.value==="epidemic"?"村级防疫信息":"乡镇估算存栏",metricLabel:c.value==="forecast"?"预测":c.value==="epidemic"?"防疫":"存栏",unit:"万头",rows:c.value==="epidemic"?Tn.value:w.value.map(X=>({name:X.name,value:Number((X.value/1e4).toFixed(2)),unit:"万头"}))}),U=Ye(()=>({color:a,tooltip:Ja(X=>`${X.name}<br/>结构占比:${X.percent}%<br/>估算数量:${Si(X.value)}头<br/>来源:无人机识别 + 专家共识模型`),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:Lc.map(X=>({name:X.name,value:X.count}))}]})),ue=Ye(()=>({color:a,tooltip:Ja(X=>`${X.name}<br/>占比:${X.percent}%<br/>估算数量:${Si(X.value)}头`),legend:{orient:"vertical",right:6,top:"middle",itemWidth:8,itemHeight:8,itemGap:6,formatter(X){const q=Lc.find(ce=>ce.name===X);return q?`${X} ${Yh(q.ratio)} ${ua(q.count)}头`:X},textStyle:{color:"rgba(222, 250, 255, 0.82)",fontSize:10,rich:{}}},graphic:{type:"text",left:"28%",top:"45%",style:{text:ua(Kd),fill:"#ffffff",fontFamily:"D-DIN, Arial, sans-serif",fontSize:19,fontWeight:900,textAlign:"center"}},series:[{name:"结构明细",type:"pie",radius:["34%","66%"],center:["31%","54%"],avoidLabelOverlap:!0,label:{color:"#fff",fontSize:10,formatter:"{d}%"},labelLine:{length:8,length2:5,lineStyle:{color:"rgba(223, 250, 255, 0.35)"}},itemStyle:{borderColor:"rgba(3, 18, 31, 0.92)",borderWidth:3,shadowBlur:8,shadowColor:"rgba(0, 0, 0, 0.28)"},data:Lc.map(X=>({name:X.name,value:X.count}))}]})),pe=Ye(()=>({color:["#ffd76c","#30dcff"],tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(X){const q=X.map(ce=>`${ce.marker}${ce.seriesName}:${Si(Math.abs(ce.value))}头`);return`${X[0].name}<br/>${q.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:X=>ua(Math.abs(X))},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}},axisLine:{show:!1},axisTick:{show:!1}},yAxis:{type:"category",data:ST.map(X=>X.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:ST.map(X=>-X.cow),itemStyle:{borderRadius:[7,0,0,7]}},{name:"公牛",type:"bar",stack:"gender",barWidth:12,data:ST.map(X=>X.bull),itemStyle:{borderRadius:[0,7,7,0]}}]})),de=Ye(()=>{const X=$e.value,q=X.map(ce=>ce.count);return{color:a,tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(ce){const Je=ce.map(Nt=>`${Nt.marker}${Nt.seriesName}:${Si(Nt.value)}头`);return`${ce[0].name}<br/>${Je.join("<br/>")}<br/>估算存栏:${Si(q[ce[0].dataIndex])}头<br/>结构依据:专家共识比例`}}),legend:{top:-2,right:0,itemWidth:8,itemHeight:6,itemGap:6,textStyle:{color:"rgba(222, 250, 255, 0.75)",fontSize:10}},grid:{left:54,right:30,top:22,bottom:8},xAxis:{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.56)",fontSize:10,formatter:ua},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}},axisLine:{show:!1},axisTick:{show:!1}},yAxis:{type:"category",inverse:!0,data:X.map(ce=>ce.name),axisLabel:{color:"rgba(223, 250, 255, 0.82)",fontSize:10,interval:0},axisLine:{show:!1},axisTick:{show:!1}},series:Lc.map(ce=>({name:ce.name.replace("(≤1岁)","").replace("(1-2岁)",""),type:"bar",stack:"town",barWidth:X.length>8?6:11,data:X.map(Je=>Math.round(Je.count*ce.ratio/100))}))}}),se=Ye(()=>ms($e.value,"count","头",{style:"ladder",tooltipFormatter(X){const q=$e.value[X.dataIndex];return`${q.name}<br/>估算存栏:${Si(q.count)}头<br/>来源:无人机识别`}})),re=Ye(()=>{const X=li.value,q=X.rows,ce=Math.max(...q.map(Je=>Je.adultCow+Je.calf),1);return{color:["#30dcff","#ffd76c"],animationDurationUpdate:700,animationEasingUpdate:"cubicOut",tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(Je){const Nt=q[Je[0].dataIndex],Cn=Je.filter(Fi=>["成年母牛","幼畜"].includes(Fi.seriesName)).map(Fi=>`${Fi.marker}${Fi.seriesName}:${Si(Fi.value)}头`);return`${Nt.name}<br/>母幼合计:${Si(Nt.adultCow+Nt.calf)}头<br/>${Cn.join("<br/>")}<br/>依据:无人机识别 + 专家共识模型`}}),legend:{data:["成年母牛","幼畜"],top:2,left:2,itemWidth:10,itemHeight:7,itemGap:9,textStyle:{color:"rgba(222, 250, 255, 0.78)",fontSize:10}},graphic:X.total>H4?{type:"text",right:4,top:3,silent:!0,style:{text:`${X.start+1}-${X.end} / ${X.total}`,fill:"rgba(222, 250, 255, 0.62)",fontSize:10,fontWeight:600}}:void 0,grid:{left:18,right:18,top:42,bottom:44,containLabel:!1},xAxis:{type:"category",data:q.map(Je=>Je.name),axisLabel:{color:"rgba(223, 250, 255, 0.78)",fontSize:10,lineHeight:12,interval:0,margin:8,formatter:co},axisLine:{show:!1},axisTick:{show:!1}},yAxis:{type:"value",max:Math.ceil(ce*1.28),axisLabel:{show:!1},axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.08)",type:"dashed"}}},series:[{name:"基础群规模",type:"bar",barWidth:15,barGap:"-100%",data:q.map(Je=>Je.adultCow+Je.calf),tooltip:{show:!1},itemStyle:{borderRadius:[8,8,1,1],color:"rgba(48, 220, 255, 0.07)"},silent:!0},{name:"成年母牛",type:"bar",stack:"foundation",barWidth:15,data:q.map(Je=>Je.adultCow),itemStyle:{borderRadius:[1,1,0,0],color:new po(0,0,0,1,[{offset:0,color:"rgba(48, 220, 255, 0.34)"},{offset:1,color:"#30dcff"}])}},{name:"幼畜",type:"bar",stack:"foundation",barWidth:15,data:q.map(Je=>Je.calf),itemStyle:{borderRadius:[8,8,1,1],color:new po(0,0,0,1,[{offset:0,color:"#ffd76c"},{offset:1,color:"rgba(255, 215, 108, 0.2)"}])},label:{show:!0,position:"top",formatter:({dataIndex:Je})=>ua(q[Je].adultCow+q[Je].calf),color:"#ffffff",fontSize:10,fontWeight:700}}]}}),Oe=Ye(()=>{const X=fW.slice().sort((Je,Nt)=>Nt.value-Je.value),q=fW.reduce((Je,Nt)=>Je+Nt.value,0),ce=X.map(Je=>Je.yoy||0);return{color:X.map(Je=>Je.color),tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(Je){const Nt=X[Je[0].dataIndex];return`${Nt.label}<br/>数量:${Si(Nt.value)}头<br/>占比:${Yh(Nt.value/q*100)}<br/>同比:${Nt.yoy>0?"+":""}${Nt.yoy}%`}}),grid:{left:36,right:30,top:20,bottom:34},xAxis:{type:"category",data:X.map(Je=>Je.label),axisLabel:{color:"rgba(223, 250, 255, 0.76)",fontSize:10,interval:0,margin:10},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.24)"}},axisTick:{show:!1}},yAxis:[{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.52)",fontSize:10,formatter:ua},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.09)",type:"dashed"}}},{type:"value",min:Math.min(-2,Math.floor(Math.min(...ce)-1)),max:Math.max(8,Math.ceil(Math.max(...ce)+1)),axisLabel:{color:"rgba(255, 215, 108, 0.68)",fontSize:10,formatter:"{value}%"},splitLine:{show:!1},axisLine:{show:!1},axisTick:{show:!1}}],series:[{name:"数量",type:"bar",barWidth:16,data:X.map((Je,Nt)=>({value:Je.value,itemStyle:{borderRadius:[8,8,2,2],color:new po(0,0,0,1,[{offset:0,color:Je.color},{offset:.72,color:`${Je.color}cc`},{offset:1,color:`${Je.color}18`}]),shadowBlur:Nt===0?12:7,shadowColor:Je.color},label:{show:!0,position:"top",color:Nt===0?"#ffd76c":"#ffffff",fontSize:10,formatter:({value:Cn})=>ua(Cn)}}))},{name:"同比",type:"line",yAxisIndex:1,smooth:!0,symbol:"circle",symbolSize:6,data:ce,lineStyle:{width:2,color:"#ffd76c"},itemStyle:{color:"#ffd76c",borderColor:"rgba(3, 18, 28, 0.9)",borderWidth:2},label:{show:!0,position:"top",color:"#ffd76c",fontSize:10,formatter:({value:Je})=>`${Je>0?"+":""}${Je}%`}}]}}),be=Ye(()=>{const X=Jee(Ue.value);return{color:["#30dcff","#ffd76c","#ff8f6b"],tooltip:tn(wt({},Ja()),{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:X.labels,axisLabel:{color:"rgba(223, 250, 255, 0.62)",fontSize:10,interval:Ue.value.months>18?4:Ue.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:ua},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}}},{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.48)",fontSize:10,formatter:ua},splitLine:{show:!1}}],series:[u1("预测存栏",X.stock,"#30dcff",0,!0),u1("繁殖补充",X.births,"#ffd76c",1),u1("出栏扣减",X.outflow,"#ff8f6b",1)]}}),me=Ye(()=>({color:["#30dcff","#ffd76c"],tooltip:tn(wt({},Ja()),{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:mt.value.map(X=>X.month||X.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:mt.value.map(X=>X.count||X.value),itemStyle:{borderRadius:[8,8,0,0],color:new po(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:mt.value.map(X=>X.speed||X.growthRate||0),lineStyle:{width:2.4,color:"#ffd76c"},itemStyle:{color:"#ffd76c"}}]})),ge=Ye(()=>({tooltip:Ja(),radar:{center:["50%","54%"],radius:"68%",splitNumber:4,indicator:pW.map(X=>({name:X.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:pW.map(X=>X.value),areaStyle:{color:"rgba(48, 220, 255, 0.22)"},lineStyle:{color:"#30dcff",width:2},itemStyle:{color:"#ffd76c"}}]}]})),Ze=Ye(()=>ms(Yt.value,"forecast","头")),fe=Ye(()=>{const X=st.value;return{color:a,tooltip:Ja(q=>{var Je;const ce=X.find(Nt=>Nt.name===q.name);return`${q.name}<br/>预测占比:${Yh((Je=ce==null?void 0:ce.ratio)!=null?Je:q.percent)}<br/>预测数量:${Si((ce==null?void 0:ce.count)||0)}头`}),legend:{orient:"vertical",right:4,top:"middle",itemWidth:8,itemHeight:8,itemGap:6,formatter(q){const ce=X.find(Je=>Je.name===q);return ce?`${q} ${Yh(ce.ratio)}`:q},textStyle:{color:"rgba(222, 250, 255, 0.8)",fontSize:10}},series:[{name:"期末结构预测",type:"pie",radius:["38%","66%"],center:["32%","54%"],startAngle:118,avoidLabelOverlap:!0,label:{color:"#fff",fontSize:10,formatter:({percent:q})=>q>=4?`${q}%`:""},labelLine:{length:8,length2:5,lineStyle:{color:"rgba(223, 250, 255, 0.35)"}},itemStyle:{borderColor:"rgba(3, 18, 31, 0.92)",borderWidth:3},data:X.map(q=>({name:q.name,value:q.count}))}]}}),B=Ye(()=>({color:["#ffd76c","#ff8f6b","#7aa7ff"],tooltip:tn(wt({},Ja()),{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:Hs.map(X=>X.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:ua},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}}},series:[{name:"繁殖补充",type:"bar",barWidth:12,data:Hs.map(X=>X.births),itemStyle:{borderRadius:[7,7,0,0]}},{name:"出栏流出",type:"bar",barWidth:12,data:Hs.map(X=>-X.outflow),itemStyle:{borderRadius:[0,0,7,7]}},{name:"稳态校正",type:"line",smooth:!0,symbolSize:6,data:Hs.map(X=>X.correction),lineStyle:{width:2.4}}]})),te=Ye(()=>{const X=Yt.value,q=Math.max(...X.map(ce=>Math.abs(ce.change)),1);return X.map(ce=>tn(wt({},ce),{width:Math.max(8,Math.round(Math.abs(ce.change)/q*100))}))}),oe=Ye(()=>{const X=Vt.value,q=X.map(Je=>Je.value),ce=Math.max(...q,1);return{color:["#27f0c0","#ffd76c"],tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"line",lineStyle:{color:"rgba(39, 240, 192, 0.34)"}},formatter(Je){const Nt=Je[0];return`${Nt.name}<br/>防疫记录:${Si(Nt.value)}条`}}),grid:{left:42,right:24,top:20,bottom:28},xAxis:{type:"category",data:X.map(Je=>Je.name),axisLabel:{color:"rgba(223, 250, 255, 0.62)",fontSize:10,interval:Math.max(Math.floor(X.length/7),0)},axisLine:{lineStyle:{color:"rgba(39, 240, 192, 0.22)"}},axisTick:{show:!1}},yAxis:{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10,formatter:ua},splitLine:{lineStyle:{color:"rgba(39, 240, 192, 0.1)",type:"dashed"}}},series:[{name:"防疫记录",type:"bar",barMaxWidth:12,data:q,itemStyle:{borderRadius:[7,7,0,0],color:new po(0,0,0,1,[{offset:0,color:"#27f0c0"},{offset:1,color:"rgba(39, 240, 192, 0.08)"}])},label:{show:!0,position:"top",color:"rgba(230, 255, 249, 0.92)",fontSize:10,formatter:({value:Je})=>Je>=ce*.42?ua(Je):""}},{name:"作业趋势",type:"line",smooth:!0,showSymbol:!1,data:q,lineStyle:{width:2.4,color:"#ffd76c"}}]}}),Ie=Ye(()=>{const X=En.value,q=X.length>8?10:12,ce=q+8,Je=X.map(br=>Number(br.recordCount||0)),Nt=X.map(br=>Number(br.earTagCount||0)),Cn=Math.max(...Je,1),Fi=X.map(()=>Math.ceil(Cn*1.08)),Ki=new po(0,0,0,1,[{offset:0,color:"rgba(48, 220, 255, 0.18)"},{offset:.48,color:"rgba(48, 220, 255, 0.06)"},{offset:1,color:"rgba(48, 220, 255, 0.02)"}]),wr=new po(0,0,0,1,[{offset:0,color:"#31f7ff"},{offset:.36,color:"#1cbcff"},{offset:1,color:"#266dff"}]);return{color:["#31f7ff","#ffe06b"],title:{text:`台账总量:{value|${ua(Ht.value)}条}`,right:0,top:0,textStyle:{color:"#fff",fontSize:12,fontWeight:500,rich:{value:{color:"#22f1ff",borderColor:"#14bdf4",borderWidth:1,borderRadius:2,padding:[2,6,3,6],fontSize:12,fontWeight:700}}}},tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(br){const _r=X[br[0].dataIndex];return[`${_r.name}`,`防疫记录:${Si(_r.recordCount)}条`,`耳标数量:${Si(_r.earTagCount)}头`,"数据来源:防疫台账"].join("<br/>")}}),legend:[{data:["防疫记录"],top:0,left:0,itemWidth:10,itemHeight:10,icon:"circle",textStyle:{color:"#fff",fontSize:11},selectedMode:!1},{data:["耳标数"],top:0,left:82,itemWidth:10,itemHeight:10,icon:"circle",textStyle:{color:"#fff",fontSize:11},selectedMode:!1}],grid:{left:36,right:8,top:38,bottom:50},xAxis:{type:"category",data:X.map(br=>br.name),axisLabel:{color:"#fff",fontSize:10,interval:0,formatter:wa},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1}},yAxis:{type:"value",name:"数量/条",max:Math.ceil(Cn*1.2),nameTextStyle:{color:"rgba(223, 250, 255, 0.62)",fontSize:10,align:"left"},axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10,formatter:ua},axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:"rgba(51, 89, 113, 0.16)",type:"dashed"}}},series:[{name:"统计底柱",type:"bar",barWidth:ce,barGap:"-100%",data:Fi,tooltip:{show:!1},silent:!0,z:1,itemStyle:{borderRadius:[8,8,1,1],borderColor:"rgba(48, 220, 255, 0.22)",borderWidth:1,color:Ki}},{name:"防疫记录",type:"bar",barGap:"-100%",barWidth:q,barMinHeight:2,z:3,data:Je.map(br=>({value:br,itemStyle:{borderRadius:[8,8,1,1],borderColor:"rgba(200, 252, 255, 0.22)",borderWidth:1,color:wr,shadowBlur:10,shadowColor:"rgba(49, 247, 255, 0.28)"}}))},{name:"顶部高光",type:"pictorialBar",symbol:"diamond",symbolSize:[q+7,5],symbolOffset:[0,-3],symbolPosition:"end",z:8,tooltip:{show:!1},data:Je.map(br=>({value:br,itemStyle:{color:"rgba(207, 252, 255, 0.88)",shadowBlur:8,shadowColor:"rgba(49, 247, 255, 0.72)"}}))},{name:"底座光影",type:"pictorialBar",symbol:"diamond",symbolSize:[ce+3,5],symbolOffset:[0,3],z:2,tooltip:{show:!1},data:Je,itemStyle:{color:"rgba(48, 220, 255, 0.24)",shadowBlur:10,shadowColor:"rgba(48, 220, 255, 0.45)"}},{name:"耳标数",type:"line",smooth:!0,showSymbol:!1,z:9,data:Nt,lineStyle:{width:2.2,color:"#ffe06b",shadowBlur:8,shadowColor:"rgba(255, 224, 107, 0.5)"},itemStyle:{color:"#ffe06b"}}]}}),Ge=Ye(()=>{const X=an.value;return{tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(q){const ce=X[q[0].dataIndex];return`${ce.name}<br/>防疫记录:${Si(ce.value)}条`}}),grid:{left:74,right:42,top:12,bottom:8},xAxis:{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.52)",fontSize:10,formatter:ua},axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:"rgba(39, 240, 192, 0.08)",type:"dashed"}}},yAxis:{type:"category",inverse:!0,data:X.map(q=>q.name),axisLabel:{color:"rgba(223, 250, 255, 0.82)",fontSize:10,interval:0},axisLine:{show:!1},axisTick:{show:!1}},series:[{name:"记录",type:"bar",barWidth:9,data:X.map((q,ce)=>({value:q.value,itemStyle:{borderRadius:[0,8,8,0],color:new po(0,0,1,0,[{offset:0,color:"rgba(48, 220, 255, 0.12)"},{offset:.62,color:["#27f0c0","#30dcff","#ffd76c"][ce%3]},{offset:1,color:"#ffffff"}])}})),label:{show:!0,position:"right",color:"#eaffff",fontSize:10,formatter:({value:q})=>ua(q)}},{type:"scatter",symbolSize:7,data:X.map(q=>q.value),itemStyle:{color:"#ffd76c",shadowBlur:8,shadowColor:"#ffd76c"}}]}}),nt=Ye(()=>{const X=ze.value;return{color:["#30dcff","#ffd76c"],tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(q){const ce=q.find(Nt=>Nt.seriesName==="流通头数"),Je=q.find(Nt=>Nt.seriesName==="出证记录");return`${(ce==null?void 0:ce.axisValue)||""}<br/>流通头数:${Si((ce==null?void 0:ce.value)||0)}头<br/>出证记录:${Si((Je==null?void 0:Je.value)||0)}条`}}),legend:{top:4,right:10,itemWidth:12,itemHeight:8,textStyle:{color:"rgba(255, 255, 255, 0.88)",fontSize:10}},grid:{left:42,right:38,top:34,bottom:28},xAxis:{type:"category",data:X.map(q=>q.name),axisLabel:{color:"rgba(255, 255, 255, 0.8)",fontSize:10,interval:1},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.24)"}},axisTick:{show:!1}},yAxis:[{type:"value",axisLabel:{color:"rgba(255, 255, 255, 0.76)",fontSize:10,formatter:ua},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.09)",type:"dashed"}}},{type:"value",axisLabel:{color:"rgba(255, 255, 255, 0.74)",fontSize:10,formatter:ua},splitLine:{show:!1}}],series:[{name:"流通头数",type:"bar",barMaxWidth:13,data:X.map(q=>q.headCount),itemStyle:{borderRadius:[7,7,0,0],color:new po(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:X.map(q=>q.recordCount),lineStyle:{width:2.2,color:"#ffd76c"},itemStyle:{color:"#ffd76c",borderColor:"rgba(3, 18, 28, 0.9)",borderWidth:2}}]}}),at=Ye(()=>ms(Qe.value.slice(0,10),"headCount","头",{colors:s,style:"ladder",axisTextColor:"rgba(255, 255, 255, 0.88)",dimAxisTextColor:"rgba(255, 255, 255, 0.74)",tooltipFormatter(X){const q=Qe.value[X.dataIndex];return`${q.name}<br/>流通头数:${Si(q.headCount)}头<br/>出证记录:${Si(q.recordCount)}条`}})),St=Ye(()=>{const X=At.value;return{color:s,tooltip:Ja(q=>{const ce=X.find(Je=>Je.name===q.name);return`${q.name}<br/>占比:${q.percent}%<br/>流通头数:${Si(q.value)}头<br/>出证记录:${Si((ce==null?void 0:ce.recordCount)||0)}条`}),legend:{orient:"vertical",right:4,top:"middle",itemWidth:8,itemHeight:8,itemGap:6,textStyle:{color:"rgba(255, 255, 255, 0.88)",fontSize:10},formatter(q){const ce=X.find(Je=>Je.name===q);return ce?`${q} ${ua(ce.headCount)}头`:q}},series:[{name:"用途结构",type:"pie",radius:["38%","64%"],center:["32%","54%"],startAngle:110,label:{color:"#fff",fontSize:10,formatter:({percent:q})=>q>=3?`${q}%`:""},labelLine:{length:8,length2:5,lineStyle:{color:"rgba(223, 250, 255, 0.36)"}},itemStyle:{borderColor:"rgba(3, 18, 31, 0.92)",borderWidth:3},data:X.map(q=>({name:q.name,value:q.headCount}))}]}}),zt=Ye(()=>{const X=[{name:"省外A证",value:Ne("outProvinceHeads","aCertHeads")},{name:"省内B证",value:Ne("inProvinceHeads","bCertHeads")}];return{color:["#ffd76c","#30dcff"],tooltip:Ja(q=>`${q.name}<br/>流通头数:${Si(q.value)}头<br/>占比:${q.percent}%`),series:[{type:"pie",radius:["48%","72%"],center:["50%","52%"],label:{show:!1},labelLine:{show:!1},itemStyle:{borderColor:"rgba(3, 18, 31, 0.92)",borderWidth:3},data:X}]}});dl(()=>{l1(),ea(),_a(),vi(),kt(),Vn()}),Bl(()=>{var X,q;_t=!0,Wn(),ti(),(q=(X=vt.value)==null?void 0:X.destroyMap)==null||q.call(X)}),qa([c,Ue,$e,Un,Ht,ie,er],()=>{sd()},{immediate:!0}),qa(c,()=>{kt(),Vn()}),qa(li,X=>{h.value>=X.pageCount&&(h.value=0),Vn()});function qt(X){d.value=X,kt()}function kt(){Wn(),!(c.value!=="forecast"||_t)&&(Ct=window.setInterval(On,RZe))}function On(){const X=Hs.findIndex(ce=>ce.key===d.value),q=X>=0?(X+1)%Hs.length:0;d.value=Hs[q].key}function Wn(){Ct&&(window.clearInterval(Ct),Ct=null)}function Vn(){ti(),!(c.value!=="structure"||_t||li.value.pageCount<=1)&&(J=window.setInterval(ii,LZe))}function ii(){const X=li.value.pageCount;X<=1||(h.value=(h.value+1)%X)}function ti(){J&&(window.clearInterval(J),J=null)}function di(X=[],q=[]){const ce=new Map;return q.forEach(Je=>{const Nt=tr(Je.name);Nt&&ce.set(Nt,tn(wt({},Je),{name:Nt,count:Number(Je.count||0)}))}),X.forEach(Je=>{const Nt=tr(Je.name);if(!Nt)return;const Cn=ce.get(Nt)||{};ce.set(Nt,tn(wt(wt({},Cn),Je),{name:Nt,count:Number.isFinite(Number(Je.count))?Number(Je.count):Number(Cn.count||0)}))}),[...ce.values()].sort((Je,Nt)=>Number(Nt.count||0)-Number(Je.count||0))}function tr(X){return dM(X||"").replace("色地镇","色地乡").replace("瓦切镇","瓦切乡").replace("安曲镇","安曲乡").replace("龙日镇","龙日乡")}function Ve(X){return String(X||"").trim().replace("色地乡","色地镇").replace("瓦切乡","瓦切镇").replace("安曲乡","安曲镇").replace("龙日乡","龙日镇")}function Mt(X=[]){return Array.isArray(X)?X.map((q,ce)=>{var Je,Nt,Cn;return{key:q.key||q.id||`${q.name||q.label||"item"}-${ce}`,name:String(q.name||q.label||q.town||q.village||"未填写"),value:Number((Cn=(Nt=(Je=q.value)!=null?Je:q.count)!=null?Nt:q.total)!=null?Cn:0)}}).filter(q=>q.name&&Number.isFinite(q.value)):[]}function jt(...X){const q=X.flatMap(ce=>Array.isArray(ce)?ce:[ce]).map(ce=>{var Je,Nt,Cn;return ce&&typeof ce=="object"?(Cn=(Nt=(Je=ce.year)!=null?Je:ce.value)!=null?Nt:ce.latestYear)!=null?Cn:ce.latest_year:ce}).map(Number).filter(ce=>Number.isFinite(ce)&&ce>0);return[...new Set(q)].sort((ce,Je)=>ce-Je)}function Sn(X=[],q="name"){return Array.isArray(X)?X.map((ce,Je)=>{var Nt,Cn,Fi,Ki,wr,br,_r,gs,To,ca,Qa,ud,cu,cd,Kh,dd,hd;return{key:ce.key||ce.id||`${ce[q]||ce.name||ce.label||"trade"}-${Je}`,name:String(ce[q]||ce.name||ce.label||ce.town||"未填写"),recordCount:Number((Fi=(Cn=(Nt=ce.recordCount)!=null?Nt:ce.record_count)!=null?Cn:ce.count)!=null?Fi:0),headCount:Number((_r=(br=(wr=(Ki=ce.headCount)!=null?Ki:ce.head_count)!=null?wr:ce.amount)!=null?br:ce.value)!=null?_r:0),lng:zr((ud=(Qa=(ca=(To=(gs=ce.lng)!=null?gs:ce.longitude)!=null?To:ce.destLng)!=null?ca:ce.dest_lng)!=null?Qa:ce.destLongitude)!=null?ud:ce.dest_longitude),lat:zr((hd=(dd=(Kh=(cd=(cu=ce.lat)!=null?cu:ce.latitude)!=null?cd:ce.destLat)!=null?Kh:ce.dest_lat)!=null?dd:ce.destLatitude)!=null?hd:ce.dest_latitude)}}).filter(ce=>ce.name&&Number.isFinite(ce.headCount)):[]}function Hn(X=[]){return Array.isArray(X)?X.map(q=>{var ce,Je,Nt,Cn,Fi,Ki;return{year:Number(q.year),recordCount:Number((Je=(ce=q.recordCount)!=null?ce:q.record_count)!=null?Je:0),headCount:Number((Ki=(Fi=(Cn=(Nt=q.headCount)!=null?Nt:q.head_count)!=null?Cn:q.amount)!=null?Fi:q.value)!=null?Ki:0)}}).filter(q=>Number.isFinite(q.year)&&Number.isFinite(q.headCount)):[]}function pi(X=[]){return Array.isArray(X)?yi(X.map(q=>{var ce,Je,Nt;return q&&typeof q=="object"?(Nt=(Je=(ce=q.value)!=null?ce:q.label)!=null?Je:q.name)!=null?Nt:"":q})):[]}function hi(X=[]){return Array.isArray(X)?X.map(q=>{var ce,Je,Nt,Cn,Fi,Ki;if(q&&typeof q=="object"){const wr=(Nt=(Je=(ce=q.value)!=null?ce:q.name)!=null?Je:q.label)!=null?Nt:"",br=(Ki=(Fi=(Cn=q.label)!=null?Cn:q.name)!=null?Fi:q.value)!=null?Ki:wr;return wr?{value:String(wr),label:String(br||wr)}:null}return q?{value:String(q),label:String(q)}:null}).filter(Boolean):[]}function yi(X=[]){return[...new Set(X.map(q=>String(q||"").trim()).filter(Boolean))]}function nr(X=[]){if(!Array.isArray(X))return[];const q=new Map;X.forEach((Je,Nt)=>{var br,_r,gs,To,ca,Qa;const Cn=Ve(Je.name||Je.areaName||Je.area_name||Je.town||Je.label||"");if(!Cn)return;const Fi=zr((gs=(_r=(br=Je.value)!=null?br:Je.number)!=null?_r:Je.count)!=null?gs:Je.total);if(!Number.isFinite(Fi))return;const Ki=q.get(Cn)||{key:Je.areaCode||Je.area_code||`${Cn}-${Nt}`,name:Cn,recordCount:0,earTagCount:0,source:"stats"};Ki.recordCount+=Fi;const wr=zr((Qa=(ca=(To=Je.earTagCount)!=null?To:Je.ear_tag_count)!=null?ca:Je.headCount)!=null?Qa:Je.head_count);Ki.earTagCount+=Number.isFinite(wr)?wr:0,q.set(Cn,Ki)});const ce=[...q.values()].reduce((Je,Nt)=>Je+Number(Nt.recordCount||0),0);return[...q.values()].map(Je=>tn(wt({},Je),{earTagCount:Je.earTagCount||Math.round(Number(Je.recordCount||0)/Ln.value),ratio:ce?Number(Je.recordCount||0)/ce*100:0})).sort((Je,Nt)=>Number(Nt.recordCount||0)-Number(Je.recordCount||0))}function zl(X={}){var Nt,Cn;const q=Array.isArray(X)?{rows:X}:X||{},ce=q.result||{};return{rows:q.rows||q.data||q.list||q.records||[],year:(Cn=(Nt=q.year)!=null?Nt:ce.year)!=null?Cn:null}}function fs(X=[]){return Array.isArray(X)?X.map((q,ce)=>{var gs,To,ca,Qa,ud,cu,cd,Kh,dd,hd,c1,q3;const Je=Ve(q.town||q.townName||q.town_name||""),Nt=String(q.village||q.villageName||q.village_name||q.name||"").trim(),Cn=zr((ca=(To=(gs=q.recordCount)!=null?gs:q.record_count)!=null?To:q.records)!=null?ca:q.total),Fi=zr((cd=(cu=(ud=(Qa=q.earTagCount)!=null?Qa:q.ear_tag_count)!=null?ud:q.headCount)!=null?cu:q.head_count)!=null?cd:q.value),Ki=zr((dd=(Kh=q.imageCount)!=null?Kh:q.image_count)!=null?dd:q.images),wr=zr((hd=q.imageRate)!=null?hd:q.image_rate),br=zr((c1=q.lng)!=null?c1:q.longitude),_r=zr((q3=q.lat)!=null?q3:q.latitude);return{key:q.key||q.id||`${Je}-${Nt}-${ce}`,town:Je,village:Nt,recordCount:Number.isFinite(Cn)?Cn:0,earTagCount:Number.isFinite(Fi)?Fi:0,imageCount:Number.isFinite(Ki)?Ki:0,imageRate:Number.isFinite(wr)?wr:0,lng:br,lat:_r}}).filter(q=>q.town&&q.village&&Number.isFinite(q.earTagCount)).sort((q,ce)=>Number(ce.earTagCount||0)-Number(q.earTagCount||0)):[]}function zr(X){if(X==null||X==="")return NaN;const q=Number(String(X).replace(/,/g,"").replace(/%/g,""));return Number.isFinite(q)?q:NaN}function Xo(X){return String(X||"").replace(/'/g,"''").replace(/%/g,"\\%").replace(/_/g,"\\_")}function ir(X,q){const ce=Ve(X),Je=String(q||"").trim();if(!ce||!Je)return"";const Nt=`${ce}${Je}`,Cn=Xo(Nt),Fi=Xo(Je);return`(full_name LIKE '%${Cn}%' OR name = '${Cn}' OR name = '${Fi}')`}function wa(X){return co(X)}function co(X){const q=String(X||"").trim();if(!q)return"";const ce=q.match(/^(.+)(镇|乡|村)$/);return ce?`${ce[1]}
${ce[2]}`:q}function Ui(X,q){return xr(X.name)-xr(q.name)}function xr(X){const q=String(X||"").match(/(\d{1,2})\D+(\d{1,2})/);return q?Number(q[1])*100+Number(q[2]):Number.MAX_SAFE_INTEGER}function _i(X=[]){return Array.isArray(X)?X.map(jn).filter(Boolean):[]}function jn(X){return X?{epidemicId:X.epidemicId||X.epidemic_id||X.id||"",earTag:X.earTag||X.ear_tag||"",owner:X.owner||"",idType:X.idType||X.id_type||"",idNo:X.idNo||X.id_no||"",phone:X.phone||"",town:X.town||"",village:X.village||"",location:X.location||"",livestockType:X.livestockType||X.livestock_type||"",age:X.age||"",sex:X.sex||"",weight:X.weight||X.weightKg||X.weight_kg||"",preventionType:X.preventionType||X.prevention_type||"",method:X.method||"",medicine:X.medicine||"",dose:X.dose||"",operator:X.operator||"",operateTime:X.operateTime||X.operate_time||"",imagePaths:X.imagePaths||X.image_paths||""}:null}function wi(X=[]){return Array.isArray(X)?X.map(mr).filter(Boolean):[]}function mr(X){var q,ce,Je,Nt;return X?{certId:X.certId||X.cert_id||X.id||"",certType:X.certType||X.cert_type||"",certScopeName:X.certScopeName||X.cert_scope_name||"",factoryCode:X.factoryCode||X.factory_code||"",ownerName:X.ownerName||X.owner_name||"",ownerPhone:X.ownerPhone||X.owner_phone||"",transportNumber:X.transportNumber||X.transport_number||"",amount:Number((Nt=(Je=(ce=(q=X.amount)!=null?q:X.headCount)!=null?ce:X.head_count)!=null?Je:X.value)!=null?Nt:0),unitName:X.unitName||X.unit_name||"头",animalTypeName:X.animalTypeName||X.animal_type_name||"",usageTypeName:X.usageTypeName||X.usage_type_name||"",startTown:X.startTown||X.start_town||"",startRegionFullName:X.startRegionFullName||X.start_region_full_name||"",destProvince:X.destProvince||X.dest_province||"",destRegionFullName:X.destRegionFullName||X.dest_region_full_name||"",quarantineOfficerName:X.quarantineOfficerName||X.quarantine_officer_name||"",issueTime:X.issueTime||X.issue_time||"",statusName:X.statusName||X.status_name||""}:null}function ye(X,q){for(const ce of q){const Je=Number(X==null?void 0:X[ce]);if(Number.isFinite(Je))return Je}return 0}function Ne(...X){return ye(er.value,X)}function qe(X={}){return String(X.imagePaths||"").split(";").map(q=>q.trim()).filter(Boolean)}function tt(X){const ce=String(X||"").replace(/^images\//,"").split("/").map(encodeURIComponent).join("/");return`${PZe}/${ce}`}function ve(X){return X==null||X===""?"-":X}function ct(X){const q=String(X!=null?X:"").trim();return!!(q&&q!=="-")}function et(X,q,ce={}){return ct(q)?wt({label:X,value:q},ce):null}function gt(X){return X?String(X).slice(0,10):"-"}function Dt(X){const q=String(X||"").trim();return q?q.length<7?q:`${q.slice(0,3)}****${q.slice(-4)}`:"-"}function fn(X){const q=String(X||"").trim();return q?q.length<=4?q:`****${q.slice(-4)}`:"-"}function Gt(X){const q=String(X!=null?X:"").trim();if(!q)return"-";if(/kg|公斤|千克/i.test(q))return q;const ce=Number(q);return Number.isFinite(ce)?`${Si(ce)}kg`:q}function vn(X){return String(X!=null?X:"").trim()||"-"}function gr(X={}){return X.certScopeName||X.certType||"-"}function ea(){return rn(this,null,function*(){var ce,Je;const[X,q]=yield Promise.allSettled([zYe(),GYe()]);X.status==="fulfilled"&&((ce=X.value)!=null&&ce.length)&&(f.value=mGe(X.value.map(Nt=>({name:dM(Nt.name),count:Number(Nt.value)})).filter(Nt=>Nt.name&&Number.isFinite(Nt.count)))),q.status==="fulfilled"&&((Je=q.value)!=null&&Je.length)&&(p.value=q.value.map(Nt=>({month:Nt.name,count:Number(Nt.value),speed:P7(Nt.extra)})).filter(Nt=>Nt.month&&Number.isFinite(Nt.count)))})}function vi(){return rn(this,arguments,function*(X=ie.value){var q,ce,Je,Nt,Cn,Fi;he.value=!0,Ee.value="";try{(ce=(q=Y.value)==null?void 0:q.years)!=null&&ce.length||(Y.value=yield NYe());const Ki=jt((Je=Y.value)==null?void 0:Je.years),wr=Number(((Nt=Y.value)==null?void 0:Nt.latestYear)||((Cn=Y.value)==null?void 0:Cn.latest_year)||Ki[Ki.length-1]),br=Number(X||ie.value||wr||Ki[Ki.length-1]);ie.value=br;let _r=yield JW({year:br});const gs=(Fi=_r==null?void 0:_r.hasData)!=null?Fi:_r==null?void 0:_r.has_data,To=Number((_r==null?void 0:_r.latestYear)||(_r==null?void 0:_r.latest_year)||wr);gs===!1&&To&&To!==br&&(ie.value=To,_r=yield JW({year:To})),Q.value=_r||{metrics:{},hasData:!1},yield Kr(1)}catch(Ki){Ee.value="交易数据接口异常",Q.value={metrics:{},hasData:!1},K.value=[],ae.value=0}finally{he.value=!1}})}function Kr(){return rn(this,arguments,function*(X=He.value){var ce,Je;if(!ie.value)return;const q={year:ie.value,page:X,pageSize:ET,keyword:Fe.value};try{const Nt=yield QW(q);K.value=wi(Nt.rows),ae.value=Number(((ce=Nt.page)==null?void 0:ce.totalCount)||Nt.totalCount||K.value.length||0),He.value=Number(((Je=Nt.page)==null?void 0:Je.page)||X||1)}catch(Nt){Ee.value=Ee.value||"交易台账接口异常",K.value=[],ae.value=0}})}function Ii(X){const q=Number(X);!Number.isFinite(q)||q===Number(ie.value)||(ie.value=q,He.value=1,xe.value="",Fe.value="",vi(q))}function yr(){Fe.value=xe.value.trim(),Kr(1)}function ps(X){const q=Math.min(Math.max(Number(X)||1,1),en.value);Kr(q)}function vs(X=null){pt.value=!0,X&&(Ae.value=X),uu(1,X)}function zi(){pt.value=!1}function Gr(){uu(1)}function lu(){Lt.value={keyword:"",startTown:"",usageType:"",certType:""},uu(1)}function od(X){const q=Math.min(Math.max(Number(X)||1,1),we.value);uu(q)}function uu(){return rn(this,arguments,function*(X=ht.value,q=null){var Nt,Cn;if(!ie.value)return;Kt.value=!0,Tt.value="";const ce=Lt.value,Je={year:ie.value,page:X,pageSize:nj,keyword:ce.keyword.trim(),startTown:ce.startTown,usageType:ce.usageType,certType:ce.certType};try{const Fi=yield QW(Je);Ot.value=wi(Fi.rows),bt.value=Number(((Nt=Fi.page)==null?void 0:Nt.totalCount)||Fi.totalCount||Ot.value.length||0),ht.value=Number(((Cn=Fi.page)==null?void 0:Cn.page)||X||1);const Ki=q?q.certId||q.factoryCode:"",wr=Ki?Ot.value.find(br=>(br.certId||br.factoryCode)===Ki)||q:Ot.value[0]||null;jh(wr)}catch(Fi){Tt.value="交易台账接口异常",Ot.value=[],bt.value=0,Ae.value=null}finally{Kt.value=!1}})}function jh(X){Ae.value=X||null}function $h(X){var q,ce;X!=null&&X.startTown&&(c.value="trade",(ce=(q=vt.value)==null?void 0:q.focusTown)==null||ce.call(q,Ve(X.startTown),{distanceScale:.78,duration:.8}))}function _a(){return rn(this,null,function*(){var Nt;x.value=!0,A.value="";const[X,q,ce,Je]=yield Promise.allSettled([kYe(),ej({page:1,pageSize:8}),FYe(),OYe()]);if(X.status==="fulfilled"?m.value=X.value||{metrics:{}}:(A.value="防疫统计接口异常",m.value={metrics:{}}),q.status==="fulfilled"){const Cn=q.value||{};_.value=_i(Cn.rows),S.value=Number(((Nt=Cn.page)==null?void 0:Nt.totalCount)||Cn.totalCount||_.value.length||0)}else A.value=A.value||"防疫台账接口异常",_.value=[],S.value=0;ce.status==="fulfilled"?v.value=zl(ce.value):v.value={rows:[],year:null},Je.status==="fulfilled"?g.value=Je.value||{rows:[]}:g.value={rows:[]},x.value=!1})}function Zr(X=null){C.value=!0,X&&(F.value=X,V.value=null),sc(1,X)}function Yo(){C.value=!1}function Ds(){sc(1)}function Gl(){W.value={keyword:"",town:"",medicine:"",startDate:"",endDate:""},sc(1)}function oc(X){sc(X)}function sc(){return rn(this,arguments,function*(X=D.value,q=null){var Je,Nt;E.value=!0,P.value="";const ce=tn(wt({},W.value),{page:X,pageSize:tj});try{const Cn=yield ej(ce);M.value=_i(Cn.rows),I.value=Number(((Je=Cn.page)==null?void 0:Je.totalCount)||Cn.totalCount||M.value.length||0),D.value=Number(((Nt=Cn.page)==null?void 0:Nt.page)||X||1);const Fi=q||M.value[0]||null;Fi?qh(Fi):(F.value=null,V.value=null)}catch(Cn){P.value="台账接口异常",M.value=[],I.value=0}finally{E.value=!1}})}function qh(X){return rn(this,null,function*(){if(F.value=X,V.value=null,!(X!=null&&X.earTag)&&!(X!=null&&X.epidemicId))return;const q=++ee;G.value=!0;try{const ce=yield BYe(X.earTag||X.epidemicId);q===ee&&(V.value=jn(ce)||X)}catch(ce){q===ee&&(V.value=X)}finally{q===ee&&(G.value=!1)}})}function l1(){var q;k=new am;const X=(ce=0)=>rn(this,null,function*(){var Nt,Cn;if(_t)return;yield Qs();const Je=vt.value;if((Nt=Je==null?void 0:Je.loadMap)==null||Nt.call(Je,k),Je!=null&&Je.canvasMap){Ft.value=!0,(Cn=Je.play)==null||Cn.call(Je);return}ce<24&&window.setTimeout(()=>X(ce+1),120)});(q=k.ready)==null||q.then(X).catch(()=>{Ft.value=!0})}function sd(){if(c.value==="epidemic"){t("module-stats",{moduleKey:"yak-management",items:[{zh:"防疫记录",value:Ht.value,unit:"条"},{zh:"防疫耳标",value:Un.value,unit:"头"},{zh:"疫苗类型",value:Ln.value,unit:"类"},{zh:"涉及村数",value:zn.value,unit:"个"}]});return}if(c.value==="forecast"){const X=Ue.value.stock-Kd;t("module-stats",{moduleKey:"yak-management",items:[{zh:"预测期末存栏",value:Ue.value.stock,unit:"头"},{zh:"繁殖补充",value:Ue.value.births,unit:"头"},{zh:"出栏流出",value:Ue.value.outflow,unit:"头"},{zh:"预测净变化",value:X,unit:"头"}]});return}if(c.value==="trade"){t("module-stats",{moduleKey:"yak-management",items:[{zh:"流通总量",value:Ne("headCount"),unit:"头"},{zh:"出证记录",value:Ne("recordCount"),unit:"条"},{zh:"交易销售",value:Ne("saleHeadCount"),unit:"头"},{zh:"运输车辆",value:Ne("vehicleCount"),unit:"辆"}]});return}t("module-stats",{moduleKey:"yak-management",items:[{zh:"无人机识别总数",value:u3,unit:"头"},{zh:"专家共识模型修正",value:xt.value,unit:"头"},{zh:"当前存栏预估数量",value:Kd,unit:"头"}]})}function ms(X,q,ce,Je={}){const Nt=Je.labelKey||"name",Cn=Je.colors||a,Fi=Math.max(...X.map(ca=>Number(ca[q]||0)),1),Ki=X.length>8,wr=Je.style==="ladder",br=Ki?wr?7:6:X.length>6?11:13,_r=["#30dcff","#27f0c0","#ffd76c","#7aa7ff","#ff8f6b","#a6f06d"],gs=Je.axisTextColor||"rgba(223, 250, 255, 0.82)",To=Je.dimAxisTextColor||"rgba(223, 250, 255, 0.56)";return{tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(ca){if(Je.tooltipFormatter)return Je.tooltipFormatter(ca[0]);const Qa=X[ca[0].dataIndex];return`${Qa[Nt]}<br/>数值:${Si(Qa[q])}${ce}`}}),grid:{left:Ki?58:74,right:Ki?50:54,top:Ki?3:14,bottom:Ki?5:14},xAxis:{type:"value",axisLabel:{color:To,fontSize:10,formatter:ce==="%"?"{value}%":ua},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",inverse:!0,data:X.map(ca=>ca[Nt]),axisLabel:{color:gs,fontSize:Ki?9:11,interval:0},axisLine:{show:!1},axisTick:{show:!1}},series:[{type:"bar",barWidth:br,barGap:"-100%",data:X.map((ca,Qa)=>({value:ca[q],itemStyle:{borderRadius:wr?[1,10,10,1]:[0,7,7,0],color:C7(wr?_r[Qa%_r.length]:Cn[Qa%Cn.length],wr),shadowBlur:wr?10:0,shadowColor:wr?Cn[Qa%Cn.length]:"transparent"}})),showBackground:!0,backgroundStyle:{color:wr?"rgba(48, 220, 255, 0.035)":"rgba(48, 220, 255, 0.055)",borderRadius:wr?[1,10,10,1]:[0,7,7,0]},label:{show:!0,position:"right",color:"#ffffff",fontSize:Ki?9:10,formatter:({value:ca})=>`${ce==="%"?Yh(ca):ua(ca)}`},markLine:Je.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(Fi*.72)}]}},...wr?[{type:"pictorialBar",symbol:"rect",symbolSize:[2,br+5],symbolOffset:[0,0],symbolPosition:"end",z:4,data:X.map((ca,Qa)=>({value:ca[q],itemStyle:{color:"#ffffff",opacity:Qa<3?.82:.5,shadowBlur:8,shadowColor:_r[Qa%_r.length]}}))}]:[]]}}function C7(X,q=!1){return new po(0,0,1,0,[{offset:0,color:q?`${X}22`:"rgba(48, 220, 255, 0.12)"},{offset:.64,color:q?X:`${X}cc`},{offset:1,color:X}])}function u1(X,q,ce,Je=0,Nt=!1){return{name:X,type:"line",yAxisIndex:Je,smooth:!0,symbolSize:5,data:q,lineStyle:{width:2.5,color:ce},itemStyle:{color:ce},areaStyle:Nt?{color:new po(0,0,0,1,[{offset:0,color:`${ce}44`},{offset:1,color:`${ce}05`}])}:void 0}}function M7(X,q){const ce=new Map;return X.forEach(Je=>{const Nt=E7(Je.name);if(!Nt)return;const Cn=ce.get(Nt)||{name:Nt,value:0};Cn.value+=Number(Je[q]||0),ce.set(Nt,Cn)}),[...ce.values()].sort((Je,Nt)=>Nt.value-Je.value)}function E7(X){return{色地乡:"色地镇",瓦切乡:"瓦切镇",安曲乡:"安曲镇",龙日乡:"龙日镇",色地镇:"色地镇",瓦切镇:"瓦切镇",安曲镇:"安曲镇",龙日镇:"龙日镇",邛溪镇:"邛溪镇",刷经寺镇:"刷经寺镇",阿木乡:"阿木乡",查尔玛乡:"查尔玛乡",江茸乡:"江茸乡",麦洼乡:"麦洼乡",壤口乡:"壤口乡"}[X]||""}function Ja(X){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:X}}function P7(X){const q=String(X||"").match(/-?\d+(?:\.\d+)?/);return q?Number(q[0]):0}function Si(X){const q=Number(X);return Number.isFinite(q)?q.toLocaleString("zh-CN",{maximumFractionDigits:Number.isInteger(q)?0:2}):"--"}function ua(X){const q=Number(X);return Number.isFinite(q)?Math.abs(q)>=1e4?`${(q/1e4).toFixed(Math.abs(q)>=1e5?0:1)}万`:Math.round(q).toLocaleString("zh-CN"):"--"}function Xh(X,q=2){const ce=Number(X);return Number.isFinite(ce)?`${(ce/1e4).toFixed(q)}万`:"--"}function Yh(X){const q=Number(X);return Number.isFinite(q)?`${Number.isInteger(q)?q:q.toFixed(1)}%`:"--"}function ld(X){const q=Number(X);return Number.isFinite(q)?`${q>=0?"+":"-"}${Si(Math.abs(q))}`:"--"}return(X,q)=>(Te(),Pe("div",HYe,[gn(rm,{ref_key:"mapSceneRef",ref:vt,class:"yak-map-scene","active-layer":N.value,"map-ranking":z.value},null,8,["active-layer","map-ranking"]),q[78]||(q[78]=O("div",{class:"yak-map-scrim"},null,-1)),Ft.value?Dn("",!0):(Te(),Pe("div",WYe,"3D地图加载中")),O("div",jYe,[c.value==="trade"&&_e.value.length?(Te(),Pe("div",$Ye,[q[20]||(q[20]=O("span",null,"交易年份",-1)),(Te(!0),Pe(bn,null,Bn(_e.value,ce=>(Te(),Pe("button",{key:ce,type:"button",class:Xn({active:Number(ce)===Number(ie.value)}),onClick:Je=>Ii(ce)},De(ce),11,qYe))),128))])):Dn("",!0),c.value==="forecast"?(Te(),Pe("div",XYe,[q[21]||(q[21]=O("span",null,"预测年份",-1)),(Te(!0),Pe(bn,null,Bn(Tr(Hs),ce=>(Te(),Pe("button",{key:ce.key,type:"button",class:Xn({active:ce.key===d.value}),onClick:Je=>qt(ce.key)},De(ce.shortLabel),11,YYe))),128))])):Dn("",!0),O("div",KYe,[O("div",ZYe,[c.value==="structure"?(Te(),Pe(bn,{key:0},[gn(Mi,{class:"yak-side-card left-card",title:"存栏估算",width:Lr,height:Ir},{default:mi(()=>[O("div",JYe,[O("div",QYe,[O("span",eKe,[q[23]||(q[23]=O("em",null,"无人机识别总数",-1)),O("strong",null,[kr(De(Si(Tr(u3))),1),q[22]||(q[22]=O("small",null,"头",-1))])]),O("span",tKe,[q[25]||(q[25]=O("em",null,"专家共识模型修正",-1)),O("strong",{class:Xn({positive:xt.value>0,negative:xt.value<0})},[kr(De(ld(xt.value)),1),q[24]||(q[24]=O("small",null,"头",-1))],2)])]),O("div",nKe,[q[27]||(q[27]=O("span",null,"当前存栏预估数量",-1)),O("strong",null,[kr(De(Si(Tr(Kd))),1),q[26]||(q[26]=O("em",null,"头",-1))])])])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"畜群结构占比",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:U.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"母牛/公牛年龄结构",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:pe.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"牦牛乡镇分布",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:de.value,autoresize:!0},null,8,["option"])]),_:1})],64)):c.value==="forecast"?(Te(),Pe(bn,{key:1},[gn(Mi,{class:"yak-side-card left-card",title:"畜群预测",width:Lr,height:Ir},{default:mi(()=>[O("div",iKe,[O("div",rKe,[O("div",aKe,[O("span",null,De(Ue.value.label)+"预测存栏",1),O("strong",null,[kr(De(Si(Ue.value.stock)),1),q[28]||(q[28]=O("em",null,"头",-1))])]),O("div",{class:Xn(["forecast-change-badge",{positive:Bt.value>0,negative:Bt.value<0}])},[q[30]||(q[30]=O("span",null,"较当前",-1)),O("strong",null,[kr(De(ld(Bt.value)),1),q[29]||(q[29]=O("em",null,"头",-1))])],2)]),O("div",oKe,[O("span",null,[q[31]||(q[31]=O("em",null,"补充",-1)),O("strong",null,De(Xh(Ue.value.births))+"头",1)]),O("span",null,[q[32]||(q[32]=O("em",null,"流出",-1)),O("strong",null,De(Xh(Ue.value.outflow))+"头",1)]),O("span",null,[q[33]||(q[33]=O("em",null,"周期",-1)),O("strong",null,De(Ue.value.months)+"个月",1)])])])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"未来存栏趋势",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:be.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"月度数量预测",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:me.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"预测因子雷达",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:ge.value,autoresize:!0},null,8,["option"])]),_:1})],64)):c.value==="epidemic"?(Te(),Pe(bn,{key:2},[gn(Mi,{class:"yak-side-card left-card",title:"防疫总览",width:Lr,height:Ir},{default:mi(()=>[O("div",sKe,[O("div",lKe,[q[35]||(q[35]=O("span",null,"防疫记录",-1)),O("strong",null,[kr(De(Si(Ht.value)),1),q[34]||(q[34]=O("em",null,"条",-1))])]),O("div",uKe,[O("strong",null,De(Si(Un.value)),1),q[36]||(q[36]=O("span",null,"耳标数",-1))]),O("div",cKe,[O("span",null,[q[37]||(q[37]=O("em",null,"覆盖乡镇",-1)),O("strong",null,De(Be.value)+"个",1)]),O("span",null,[q[38]||(q[38]=O("em",null,"养殖户",-1)),O("strong",null,De(Si(wn.value))+"户",1)]),O("span",null,[q[39]||(q[39]=O("em",null,"涉及村数",-1)),O("strong",null,De(Si(zn.value))+"个",1)]),O("span",null,[q[40]||(q[40]=O("em",null,"疫苗类型",-1)),O("strong",null,De(Ln.value)+"类",1)])])])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"防疫覆盖概况",width:Lr,height:Ir},{default:mi(()=>[O("div",dKe,[O("div",hKe,[O("span",null,[q[41]||(q[41]=O("em",null,"覆盖乡镇",-1)),O("strong",null,De(Be.value),1)]),O("span",null,[q[42]||(q[42]=O("em",null,"耳标数",-1)),O("strong",null,De(Si(Un.value)),1)]),O("span",null,[q[43]||(q[43]=O("em",null,"行政村",-1)),O("strong",null,De(Si(zn.value)),1)])]),O("div",fKe,[O("span",null,"最近免疫:"+De(dn.value)+";主用疫苗:"+De(je.value)+";重点乡镇:"+De(pn.value)+"。",1)]),O("div",pKe,[O("span",null,[q[44]||(q[44]=O("em",null,"疫苗类型数",-1)),O("strong",null,De(Ln.value)+"类",1)]),O("span",null,[q[45]||(q[45]=O("em",null,"养殖户数",-1)),O("strong",null,De(Si(wn.value))+"户",1)])])])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"防疫作业趋势",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:oe.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"疫苗类型分布",width:Lr,height:Ir},{default:mi(()=>[nn.value.length?(Te(),Pe("div",vKe,[O("div",mKe,[(Te(),Uo(Oee,{key:cn.value,data:nn.value,delay:3e3,colors:o,opacity:.62,class:"epidemic-three-pie"},{default:mi(({data:ce})=>[O("div",gKe,[O("strong",null,De(ua((ce==null?void 0:ce.count)||Ht.value)),1),O("span",null,De((ce==null?void 0:ce.name)||"疫苗类型"),1)])]),_:1},8,["data"]))]),O("div",yKe,[(Te(!0),Pe(bn,null,Bn(nn.value,(ce,Je)=>(Te(),Pe("div",{key:ce.key||ce.name,class:"epidemic-three-pie-row"},[O("i",{style:Ji({borderColor:o[Je%o.length]})},null,4),O("span",null,De(ce.name),1),O("strong",null,De(ua(ce.value)),1),O("em",null,De(ce.unit),1)]))),128))])])):(Te(),Pe("div",_Ke,"暂无疫苗类型数据"))]),_:1})],64)):c.value==="trade"?(Te(),Pe(bn,{key:3},[gn(Mi,{class:"yak-side-card left-card",title:"交易年度总览",width:Lr,height:Ir},{default:mi(()=>[O("div",SKe,[O("div",bKe,[O("span",null,De(ie.value)+"年流通总量",1),O("strong",null,[kr(De(Si(Ne("headCount"))),1),q[46]||(q[46]=O("em",null,"头",-1))])]),O("div",xKe,[O("span",null,[q[47]||(q[47]=O("em",null,"出证记录",-1)),O("strong",null,De(Si(Ne("recordCount")))+"条",1)]),O("span",null,[q[48]||(q[48]=O("em",null,"交易销售",-1)),O("strong",null,De(Si(Ne("saleHeadCount")))+"头",1)]),O("span",null,[q[49]||(q[49]=O("em",null,"运输车辆",-1)),O("strong",null,De(Si(Ne("vehicleCount")))+"辆",1)])])])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"交易流通趋势",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:nt.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"来源乡镇分布",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:at.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"用途结构统计",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:St.value,autoresize:!0},null,8,["option"])]),_:1})],64)):Dn("",!0)])]),O("div",wKe,[O("div",TKe,[c.value==="structure"?(Te(),Pe(bn,{key:0},[gn(Mi,{class:"yak-side-card right-card",title:"乡镇存栏排行",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:se.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"母牛与幼畜分布",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:re.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"出栏/交易影响",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:Oe.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"结构明细",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:ue.value,autoresize:!0},null,8,["option"])]),_:1})],64)):c.value==="forecast"?(Te(),Pe(bn,{key:1},[gn(Mi,{class:"yak-side-card right-card",title:"乡镇预测排行",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:Ze.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"期末结构预测",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:fe.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"补充/流出对比",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:B.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"预测变化热力",width:Lr,height:Ir},{default:mi(()=>[O("div",AKe,[(Te(!0),Pe(bn,null,Bn(te.value,ce=>(Te(),Pe("div",{key:ce.name,class:"heat-row",style:Ji({"--heat-width":`${ce.width}%`})},[O("span",null,De(ce.name),1),O("strong",null,De(ld(ce.change)),1)],4))),128))])]),_:1})],64)):c.value==="epidemic"?(Te(),Pe(bn,{key:2},[gn(Mi,{class:"yak-side-card right-card",title:"防疫统计",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:Ie.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"养殖户防疫排行",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:Ge.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card epidemic-ledger-card",title:"防疫记录台账",width:Lr,height:i},{default:mi(()=>[O("div",CKe,[O("div",MKe,[O("span",null,"共 "+De(Si(S.value))+" 条",1),O("button",{type:"button",onClick:q[0]||(q[0]=ce=>Zr())},"查看更多")]),q[50]||(q[50]=O("div",{class:"epidemic-record-header"},[O("span",null,"电子耳标"),O("span",null,"养殖户"),O("span",null,"镇/乡"),O("span",null,"疫苗"),O("span",null,"时间")],-1)),O("div",EKe,[(Te(!0),Pe(bn,null,Bn(Jt.value,ce=>(Te(),Pe("button",{key:ce.epidemicId||ce.earTag,type:"button",onClick:Je=>Zr(ce)},[O("span",null,De(ve(ce.earTag)),1),O("span",null,De(ve(ce.owner)),1),O("span",null,De(ve(ce.town)),1),O("strong",null,De(ve(ce.medicine)),1),O("span",null,De(gt(ce.operateTime)),1)],8,PKe))),128)),_.value.length?Dn("",!0):(Te(),Pe("div",RKe,De(x.value?"防疫台账读取中":A.value||"暂无防疫记录"),1))])])]),_:1})],64)):c.value==="trade"?(Te(),Pe(bn,{key:3},[gn(Mi,{class:"yak-side-card right-card",title:"出证结构统计",width:Lr,height:Ir},{default:mi(()=>[O("div",LKe,[O("div",IKe,[O("span",null,[q[52]||(q[52]=O("em",null,"省外流通 A证",-1)),O("strong",null,[kr(De(Si(Ne("outProvinceHeads","aCertHeads"))),1),q[51]||(q[51]=O("b",null,"头",-1))]),O("small",null,De(Si(Ne("outProvinceCount","aCertCount")))+"条记录",1)]),O("span",null,[q[54]||(q[54]=O("em",null,"省内流通 B证",-1)),O("strong",null,[kr(De(Si(Ne("inProvinceHeads","bCertHeads"))),1),q[53]||(q[53]=O("b",null,"头",-1))]),O("small",null,De(Si(Ne("inProvinceCount","bCertCount")))+"条记录",1)])]),gn(Tr(Ua),{class:"trade-cert-chart",option:zt.value,autoresize:!0},null,8,["option"])])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"出栏来源排行",width:Lr,height:Ir},{default:mi(()=>[O("div",DKe,[(Te(!0),Pe(bn,null,Bn(ke.value,(ce,Je)=>(Te(),Pe("div",{key:ce.name,class:"trade-dest-row",style:Ji({"--trade-ratio":`${ce.ratio}%`})},[O("span",null,De(Je+1),1),O("strong",null,De(ce.name),1),O("em",null,De(ua(ce.headCount))+"头",1)],4))),128)),ke.value.length?Dn("",!0):(Te(),Pe("div",NKe,De(he.value?"交易数据读取中":Ee.value||"暂无出栏来源数据"),1))])]),_:1}),gn(Mi,{class:"yak-side-card right-card trade-ledger-card",title:"交易出证台账",width:Lr,height:r},{default:mi(()=>[O("div",kKe,[O("div",FKe,[O("span",null,"共 "+De(Si(ae.value))+" 条",1),O("div",null,[to(O("input",{"onUpdate:modelValue":q[1]||(q[1]=ce=>xe.value=ce),type:"search",placeholder:"货主/车辆/检疫号/地区",onKeyup:V2(yr,["enter"])},null,544),[[Kf,xe.value]]),O("button",{type:"button",onClick:yr},"搜索"),O("button",{type:"button",class:"is-more",onClick:q[2]||(q[2]=ce=>vs())},"查看更多")])]),q[55]||(q[55]=O("div",{class:"trade-ledger-header"},[O("span",null,"货主"),O("span",null,"车牌"),O("span",null,"数量"),O("span",null,"源头"),O("span",null,"用途"),O("span",null,"时间")],-1)),O("div",OKe,[(Te(!0),Pe(bn,null,Bn(ft.value,ce=>(Te(),Pe("button",{key:ce.certId,type:"button",onClick:Je=>$h(ce)},[O("span",null,De(ve(ce.ownerName)),1),O("span",null,De(ve(ce.transportNumber)),1),O("strong",null,De(Si(ce.amount))+"头",1),O("span",null,De(ve(ce.startTown)),1),O("span",null,De(ve(ce.usageTypeName)),1),O("span",null,De(gt(ce.issueTime)),1)],8,BKe))),128)),ft.value.length?Dn("",!0):(Te(),Pe("div",zKe,De(he.value?"交易台账读取中":Ee.value||"暂无交易记录"),1))]),O("div",GKe,[O("span",null,"第 "+De(He.value)+" / "+De(en.value)+" 页",1),O("button",{type:"button",disabled:He.value<=1,onClick:q[3]||(q[3]=ce=>ps(He.value-1))},"上一页",8,UKe),O("button",{type:"button",disabled:He.value>=en.value,onClick:q[4]||(q[4]=ce=>ps(He.value+1))},"下一页",8,VKe)])])]),_:1})],64)):Dn("",!0)])]),O("div",HKe,[gn(y7,{"model-value":c.value,topics:u,"onUpdate:modelValue":q[5]||(q[5]=ce=>c.value=ce)},null,8,["model-value"])])]),C.value?(Te(),Pe("div",{key:1,class:"epidemic-ledger-modal",onClick:Ws(Yo,["self"])},[O("div",WKe,[O("div",jKe,[O("div",null,[q[56]||(q[56]=O("span",null,"牦牛防疫台账",-1)),O("strong",null,De(Si(I.value))+" 条记录",1)]),O("button",{type:"button",onClick:Yo},"关闭")]),O("div",$Ke,[to(O("input",{"onUpdate:modelValue":q[6]||(q[6]=ce=>W.value.keyword=ce),type:"search",placeholder:"耳标 / 养殖户 / 药品","aria-label":"耳标 / 养殖户 / 药品",onKeyup:V2(Ds,["enter"])},null,544),[[Kf,W.value.keyword]]),to(O("select",{"onUpdate:modelValue":q[7]||(q[7]=ce=>W.value.town=ce)},[q[57]||(q[57]=O("option",{value:""},"全部镇/乡",-1)),(Te(!0),Pe(bn,null,Bn(sn.value,ce=>(Te(),Pe("option",{key:ce,value:ce},De(ce),9,qKe))),128))],512),[[wm,W.value.town]]),to(O("select",{"onUpdate:modelValue":q[8]||(q[8]=ce=>W.value.medicine=ce)},[q[58]||(q[58]=O("option",{value:""},"全部疫苗",-1)),(Te(!0),Pe(bn,null,Bn(Pi.value,ce=>(Te(),Pe("option",{key:ce,value:ce},De(ce),9,XKe))),128))],512),[[wm,W.value.medicine]]),to(O("input",{"onUpdate:modelValue":q[9]||(q[9]=ce=>W.value.startDate=ce),type:"date"},null,512),[[Kf,W.value.startDate]]),to(O("input",{"onUpdate:modelValue":q[10]||(q[10]=ce=>W.value.endDate=ce),type:"date"},null,512),[[Kf,W.value.endDate]]),O("button",{type:"button",onClick:Ds},"检索"),O("button",{type:"button",class:"is-ghost",onClick:Gl},"重置")]),O("div",YKe,[O("div",KKe,[q[59]||(q[59]=O("div",{class:"epidemic-ledger-table-head"},[O("span",null,"电子耳标"),O("span",null,"养殖户"),O("span",null,"镇/乡"),O("span",null,"村"),O("span",null,"疫苗"),O("span",null,"免疫时间"),O("span",null,"图片")],-1)),(Te(!0),Pe(bn,null,Bn(M.value,ce=>{var Je,Nt;return Te(),Pe("button",{key:ce.epidemicId||ce.earTag,type:"button",class:Xn({active:(((Je=F.value)==null?void 0:Je.epidemicId)||((Nt=F.value)==null?void 0:Nt.earTag))===(ce.epidemicId||ce.earTag)}),onClick:Cn=>qh(ce)},[O("span",null,De(ve(ce.earTag)),1),O("span",null,De(ve(ce.owner)),1),O("span",null,De(ve(ce.town)),1),O("span",null,De(ve(ce.village)),1),O("strong",null,De(ve(ce.medicine)),1),O("span",null,De(gt(ce.operateTime)),1),O("span",null,De(qe(ce).length?`${qe(ce).length}张`:"无"),1)],10,ZKe)}),128)),M.value.length?Dn("",!0):(Te(),Pe("div",JKe,De(E.value?"台账读取中":P.value||"暂无匹配记录"),1))]),O("div",QKe,[O("div",eZe,[O("span",null,De(ve(Nn.value.earTag)),1),O("strong",null,De(G.value?"加载中":gt(Nn.value.operateTime)),1)]),O("div",tZe,[(Te(!0),Pe(bn,null,Bn(lt.value,ce=>(Te(),Pe("section",{key:ce.title,class:"epidemic-detail-section"},[O("div",nZe,De(ce.title),1),O("div",iZe,[(Te(!0),Pe(bn,null,Bn(ce.fields,Je=>(Te(),Pe("span",{key:`${ce.title}-${Je.label}`,class:Xn({"is-wide":Je.wide})},[O("em",null,De(Je.label),1),O("strong",null,De(Je.value),1)],2))),128))])]))),128)),Re.value.length?(Te(),Pe("section",rZe,[q[60]||(q[60]=O("div",{class:"epidemic-detail-section-title"},"现场照片",-1)),O("div",aZe,[(Te(!0),Pe(bn,null,Bn(Re.value.slice(0,6),ce=>(Te(),Pe("img",{key:ce,src:tt(ce),alt:"防疫照片"},null,8,oZe))),128))])])):Dn("",!0)])])]),O("div",sZe,[O("span",null,"第 "+De(D.value)+" / "+De(hn.value)+" 页",1),O("button",{type:"button",disabled:D.value<=1,onClick:q[11]||(q[11]=ce=>oc(D.value-1))},"上一页",8,lZe),O("button",{type:"button",disabled:D.value>=hn.value,onClick:q[12]||(q[12]=ce=>oc(D.value+1))},"下一页",8,uZe)])])])):Dn("",!0),pt.value?(Te(),Pe("div",{key:2,class:"epidemic-ledger-modal trade-ledger-modal",onClick:Ws(zi,["self"])},[O("div",cZe,[O("div",dZe,[O("div",null,[q[61]||(q[61]=O("span",null,"牦牛交易出证台账",-1)),O("strong",null,De(ie.value)+"年 "+De(Si(bt.value))+" 条记录",1)]),O("button",{type:"button",onClick:zi},"关闭")]),O("div",hZe,[to(O("input",{"onUpdate:modelValue":q[13]||(q[13]=ce=>Lt.value.keyword=ce),type:"search",placeholder:"货主 / 车辆 / 检疫号 / 地区",onKeyup:V2(Gr,["enter"])},null,544),[[Kf,Lt.value.keyword]]),to(O("select",{"onUpdate:modelValue":q[14]||(q[14]=ce=>Lt.value.startTown=ce)},[q[62]||(q[62]=O("option",{value:""},"全部源头乡镇",-1)),(Te(!0),Pe(bn,null,Bn(Rt.value,ce=>(Te(),Pe("option",{key:ce,value:ce},De(ce),9,fZe))),128))],512),[[wm,Lt.value.startTown]]),to(O("select",{"onUpdate:modelValue":q[15]||(q[15]=ce=>Lt.value.usageType=ce)},[q[63]||(q[63]=O("option",{value:""},"全部用途",-1)),(Te(!0),Pe(bn,null,Bn(Et.value,ce=>(Te(),Pe("option",{key:ce,value:ce},De(ce),9,pZe))),128))],512),[[wm,Lt.value.usageType]]),to(O("select",{"onUpdate:modelValue":q[16]||(q[16]=ce=>Lt.value.certType=ce)},[q[64]||(q[64]=O("option",{value:""},"全部证书",-1)),(Te(!0),Pe(bn,null,Bn(Fn.value,ce=>(Te(),Pe("option",{key:ce.value,value:ce.value},De(ce.label),9,vZe))),128))],512),[[wm,Lt.value.certType]]),O("button",{type:"button",onClick:Gr},"检索"),O("button",{type:"button",class:"is-ghost",onClick:lu},"重置")]),O("div",mZe,[O("div",gZe,[q[65]||(q[65]=O("div",{class:"trade-ledger-modal-table-head"},[O("span",null,"货主"),O("span",null,"证书"),O("span",null,"车牌号"),O("span",null,"数量"),O("span",null,"源头"),O("span",null,"用途"),O("span",null,"出证时间"),O("span",null,"状态")],-1)),(Te(!0),Pe(bn,null,Bn(Ot.value,ce=>(Te(),Pe("button",{key:ce.certId||ce.factoryCode,type:"button",class:Xn({active:Pt.value===(ce.certId||ce.factoryCode)}),onClick:Je=>jh(ce)},[O("span",null,De(ve(ce.ownerName)),1),O("span",null,De(ve(ce.certType||ce.certScopeName)),1),O("span",null,De(ve(ce.transportNumber)),1),O("strong",null,De(Si(ce.amount))+"头",1),O("span",null,De(ve(ce.startTown)),1),O("span",null,De(ve(ce.usageTypeName)),1),O("span",null,De(gt(ce.issueTime)),1),O("span",null,De(ve(ce.statusName)),1)],10,yZe))),128)),Ot.value.length?Dn("",!0):(Te(),Pe("div",_Ze,De(Kt.value?"交易台账读取中":Tt.value||"暂无匹配记录"),1))]),O("div",SZe,[O("div",bZe,[O("span",null,De(ve(Xe.value.factoryCode||Xe.value.certId)),1),O("strong",null,De(gt(Xe.value.issueTime)),1)]),O("div",xZe,[O("span",null,[q[66]||(q[66]=O("em",null,"货主",-1)),O("strong",null,De(ve(Xe.value.ownerName)),1)]),O("span",null,[q[67]||(q[67]=O("em",null,"联系方式",-1)),O("strong",null,De(Dt(Xe.value.ownerPhone)),1)]),O("span",null,[q[68]||(q[68]=O("em",null,"证书类型",-1)),O("strong",null,De(gr(Xe.value)),1)]),O("span",null,[q[69]||(q[69]=O("em",null,"车牌号",-1)),O("strong",null,De(ve(Xe.value.transportNumber)),1)]),O("span",null,[q[70]||(q[70]=O("em",null,"牦牛数量",-1)),O("strong",null,De(Si(Xe.value.amount))+"头",1)]),O("span",null,[q[71]||(q[71]=O("em",null,"用途",-1)),O("strong",null,De(ve(Xe.value.usageTypeName)),1)]),O("span",null,[q[72]||(q[72]=O("em",null,"源头乡镇",-1)),O("strong",null,De(ve(Xe.value.startTown)),1)]),O("span",null,[q[73]||(q[73]=O("em",null,"目的省份",-1)),O("strong",null,De(ve(Xe.value.destProvince)),1)]),O("span",null,[q[74]||(q[74]=O("em",null,"检疫员",-1)),O("strong",null,De(ve(Xe.value.quarantineOfficerName)),1)]),O("span",null,[q[75]||(q[75]=O("em",null,"状态",-1)),O("strong",null,De(ve(Xe.value.statusName)),1)]),O("span",wZe,[q[76]||(q[76]=O("em",null,"源头地区",-1)),O("strong",null,De(ve(Xe.value.startRegionFullName)),1)]),O("span",TZe,[q[77]||(q[77]=O("em",null,"目的地",-1)),O("strong",null,De(ve(Xe.value.destRegionFullName)),1)])]),O("button",{type:"button",class:"trade-detail-locate",disabled:!Xe.value.startTown,onClick:q[17]||(q[17]=ce=>$h(Xe.value))}," 定位源头乡镇 ",8,AZe)])]),O("div",CZe,[O("span",null,"第 "+De(ht.value)+" / "+De(we.value)+" 页",1),O("button",{type:"button",disabled:ht.value<=1,onClick:q[18]||(q[18]=ce=>od(ht.value-1))},"上一页",8,MZe),O("button",{type:"button",disabled:ht.value>=we.value,onClick:q[19]||(q[19]=ce=>od(ht.value+1))},"下一页",8,EZe)])])])):Dn("",!0)]))}},DZe='{"features":[{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.72054300028239,32.458068000269385],[102.70921799968262,32.462435999639084],[102.66725399978725,32.46158700022178],[102.66475800022761,32.45708600027499],[102.6542670000292,32.45687099992998],[102.64908599986569,32.454540000142686],[102.64659100013095,32.45003899983171],[102.64140999996745,32.44770700002092],[102.58634200013817,32.44655700029298],[102.57329699975548,32.444055000089435],[102.56811899996505,32.441720000201165],[102.55763000031477,32.44149699985824],[102.54471999965128,32.43454499978366],[102.53443299966735,32.42764900032831],[102.53194499960533,32.42314500031296],[102.526769000363,32.42080799991942],[102.51628400001239,32.42058100014747],[102.51023199963763,32.44714800005664],[102.50747499996206,32.45153699973817],[102.50216300027729,32.453645999886795],[102.49698600031178,32.45130800028919],[102.4947700002363,32.43791000036892],[102.48710900040669,32.431067000238166],[102.4820699996351,32.42428100002831],[102.47965299971818,32.41755300011894],[102.48088100030482,32.37753300002301],[102.48652900044856,32.36430899968859],[102.48666499999267,32.359863000236096],[102.47632399958208,32.355184999646646],[102.46095199969413,32.34371999992253],[102.44289599992558,32.33441799971085],[102.437935999695,32.325407999824286],[102.43890599964051,32.29428500016047],[102.44166099966623,32.289896999645855],[102.44179999958341,32.28545099996393],[102.44730999963487,32.27667599967831],[102.44786100017899,32.25889200011692],[102.43258100035256,32.24520199970394],[102.43010400016118,32.240696999781996],[102.42494200026425,32.238356000256665],[102.42006064394359,32.22712448083805],[102.42005999985149,32.22712299975095],[102.4149690000997,32.22255899991469],[102.41524799975896,32.21366699987058],[102.41277300011569,32.209162000035256],[102.41291299985781,32.20471600018898],[102.40796400039619,32.19570599980383],[102.40810400013831,32.19125999994271],[102.40294600043933,32.188918000250396],[102.4004730004459,32.184412999647414],[102.40061300018799,32.1799679999626],[102.39552599973582,32.175403000277186],[102.39312399988752,32.168675000186546],[102.38676500026439,32.165417000132486],[102.3867639366591,32.16541645489913],[102.38676500026439,32.165415000182996],[102.38726099965864,32.1638040000191],[102.38727599972724,32.161684999802844],[102.38729900019179,32.15967900026607],[102.38745900002534,32.15762099984043],[102.38774199988256,32.15543900038005],[102.38823800017512,32.1534859997799],[102.38827599980993,32.152227000292044],[102.38837500044245,32.15124699963698],[102.38894700000468,32.14986299981094],[102.38973299982715,32.148882000205184],[102.39086900035228,32.14857599982192],[102.3930669999861,32.14773000012812],[102.39454300026985,32.14719500028029],[102.39539000019172,32.14626499966233],[102.39564200008678,32.14523599985536],[102.39555800042119,32.14455000037774],[102.39593199961669,32.142995999951545],[102.39718299976954,32.14217700032519],[102.39883099958247,32.14156699963533],[102.40043300026294,32.14096900006332],[102.40181400011215,32.13985599972305],[102.40294399989118,32.13891400017396],[102.4040569999518,32.137688000352085],[102.40517900023323,32.13652599969788],[102.40663600025042,32.1356969998132],[102.40844399989693,32.135264999687486],[102.41039399983362,32.13540499975514],[102.41229299971668,32.13617599962412],[102.41399499995626,32.1370019996206],[102.4157649999679,32.1378290000206],[102.4172560003203,32.138430999967426],[102.42042999974736,32.13905699999628],[102.4229889999545,32.13974800024432],[102.42490499955602,32.13995300008256],[102.42677800039813,32.13956800032187],[102.42883399974173,32.138619999989075],[102.43134000024544,32.136622999795776],[102.43351799978778,32.13509500007721],[102.43590899976542,32.1336970000722],[102.43770200024161,32.132744000189106],[102.43882000032508,32.1319809999078],[102.43961299982024,32.13121800009119],[102.43998299971608,32.13029500033032],[102.43996799964748,32.129384000236506],[102.43899500022727,32.127972999749424],[102.43774400007442,32.126552999697694],[102.43670299998382,32.12503000000239],[102.43638199959344,32.12280699978877],[102.43694700038127,32.12113599964322],[102.43759199973844,32.11981000027881],[102.43862199995837,32.1178440001187],[102.43992300033995,32.11632899993877],[102.44092199969944,32.115736000343105],[102.44171900029085,32.115553000172454],[102.4431310001022,32.11552299973531],[102.44468400037887,32.115951999723244],[102.44624400032822,32.11660900014873],[102.44767399968295,32.11761099977621],[102.44865100019943,32.11806899971838],[102.4495929996575,32.11822199985972],[102.45079500030488,32.118196999719856],[102.45173299956497,32.118002999802],[102.45305700041109,32.11729100004433],[102.45495299992113,32.11513699982493],[102.45611600021046,32.11345500010981],[102.45795900001704,32.11199000002623],[102.45933599966828,32.110702999788465],[102.460892000318,32.109898999776576],[102.46255900039748,32.10940599986765],[102.4640890002096,32.10885599992084],[102.46528299956276,32.10843699997646],[102.46640800021724,32.10790300007726],[102.46834200026042,32.107114999694105],[102.469924999776,32.10599100027305],[102.47102799979085,32.10465299997843],[102.47139799968672,32.103558999742944],[102.4715580004186,32.10217400014529],[102.47118000012682,32.100238999989465],[102.47079900036032,32.09835900019173],[102.47048600036588,32.09670400025237],[102.47045600022864,32.09504800002299],[102.47063100013084,32.09400800025334],[102.47152699955814,32.09244899972349],[102.47271400013692,32.09139399967068],[102.47419000042068,32.09070200009054],[102.47552199986609,32.09033100007888],[102.47719599961826,32.090122999770244],[102.47872999962834,32.08998000013962],[102.47980199968107,32.08989899984502],[102.48100299960522,32.08964600037],[102.48171999983073,32.08900500008335],[102.48203299982515,32.08791399984918],[102.48170499976213,32.085684000246175],[102.48170499976213,32.08554099975769],[102.48172800022665,32.083676999896674],[102.48170099956415,32.083318000128976],[102.4816060000279,32.08172799962886],[102.48162100009654,32.07971899963388],[102.4817120003331,32.07811699994125],[102.48194599978653,32.07657100019843],[102.48225799995606,32.07558699993045],[102.48271599971548,32.07483600018153],[102.48363499960733,32.074128999893986],[102.48429499993141,32.073940999770485],[102.48510400021841,32.07392600033108],[102.4863510001733,32.074000999787145],[102.48774799991605,32.07379799994004],[102.48867100000588,32.073210000123105],[102.48918599966666,32.07222300027557],[102.48921599980389,32.070788000322466],[102.48898700037334,32.06970399991034],[102.48855600037813,32.06839999983754],[102.48764099978591,32.06686900005756],[102.48694299982702,32.065685999780804],[102.48645099973243,32.06460399966914],[102.48628300040124,32.063292000344006],[102.4865760003042,32.06156700006867],[102.48720999979072,32.060007999683116],[102.48816700021573,32.05810700005182],[102.48858700034029,32.05626800003703],[102.48799200031353,32.05393599962565],[102.4864850000676,32.05207099987044],[102.48472299955357,32.05064399968549],[102.48248700028493,32.04943099967271],[102.47979400018349,32.04902899977396],[102.47623499989362,32.048758999907534],[102.4730649997662,32.04868400031093],[102.4705089999321,32.04822100030305],[102.46834599956007,32.0477559999933],[102.46624800038367,32.04676400006588],[102.46527500006515,32.0453549997488],[102.46542400002808,32.0433479998149],[102.46558399986164,32.041740999826935],[102.46529000013378,32.04031999970817],[102.46452000020483,32.03924099990652],[102.46302800002753,32.038582000178444],[102.46154400024615,32.037985000006735],[102.46091499988421,32.03684799984184],[102.46095300041736,32.03576200037688],[102.46171199957732,32.03386200034655],[102.46263899986509,32.031040999951074],[102.46309699962451,32.02811099979689],[102.46310500002043,32.02530600025379],[102.46285300012534,32.02308099975598],[102.4625329995599,32.020907000299644],[102.46262399979649,32.01907100026484],[102.46339500044864,32.01756999995936],[102.46483300019926,32.01616899972524],[102.46627900034582,32.01504799993893],[102.46805600003015,32.01410900028854],[102.46990600040772,32.01315200030162],[102.47183600025296,32.012538999935906],[102.4740149996202,32.012562999903075],[102.47636499958996,32.013088999636715],[102.47873800002426,32.01401299971645],[102.48069899983162,32.014829000231046],[102.48281199997494,32.016329999735696],[102.48438699999292,32.01789899981495],[102.4856880003745,32.01902099981482],[102.48694299982702,32.01983799995544],[102.48775499958873,32.02015899970552],[102.48890299980945,32.02042299989569],[102.49004400035747,32.0205120003365],[102.49090999964754,32.020379999703074],[102.49190600043063,32.020074999900906],[102.49276000002513,32.01954100026702],[102.49327499968597,32.01850000015909],[102.49395000007863,32.01630800016253],[102.4947130003349,32.014569999674976],[102.49541899979141,32.01324200030587],[102.4961929999183,32.01213600018294],[102.49678799994507,32.01166799979396],[102.49798200019653,32.011296999911494],[102.49829900038894,32.01129199997676],[102.49991299986664,32.011300000329236],[102.50002300036982,32.01132299972018],[102.5026059999681,32.01186699982661],[102.50409700032048,32.01240900025838],[102.5061190002272,32.0128800002763],[102.50818700016468,32.01283899983566],[102.50991100014556,32.01211200010392],[102.51116599959806,32.0105180000837],[102.51239099981167,32.008715000046706],[102.51402613485139,32.006737045894845],[102.51402699992903,32.006738999805634],[102.51802600043492,32.01577800026322],[102.52317599973799,32.01811500036964],[102.52825999981707,32.022672999830995],[102.53602000027922,32.02506600016468],[102.54364799959856,32.031902000320905],[102.55114500029495,32.04318399994739],[102.5505510000931,32.063187000363364],[102.56829700024029,32.08136000012385],[102.57319100034857,32.0925849999706],[102.57860900033855,32.08602800011623],[102.5787390000349,32.081583000296526],[102.58147999981692,32.0771929997732],[102.58676599956239,32.07508100020391],[102.58689600015704,32.07063600014042],[102.59505099973109,32.05968900028574],[102.59518100032574,32.05524399973979],[102.60046500042141,32.05313099989102],[102.60868100009479,32.039961000309994],[102.61396400036554,32.03784800017711],[102.62440100013727,32.03806599983736],[102.62688199962832,32.04256599976612],[102.63719299990169,32.047229000085665],[102.6502409997591,32.0474989998973],[102.66161879165318,32.04519365023855],[102.6603289995514,32.046258999775404],[102.6596189998969,32.04747400020202],[102.65911599993164,32.04879899976884],[102.65887599973216,32.050005000244056],[102.65877600017303,32.051095999820376],[102.65921499966588,32.05234399969794],[102.65992400039376,32.0534280002818],[102.6610190000127,32.055043999878556],[102.66140099960411,32.05680899998501],[102.660752000049,32.05919100011729],[102.66019100035744,32.06091699987881],[102.65949699969818,32.06270299962657],[102.65820299988758,32.064615000125876],[102.65656699977026,32.06653400003934],[102.65506000042267,32.06810799997259],[102.6539580002327,32.069731000146156],[102.65264900035352,32.071304000377886],[102.65126799960599,32.072301000308855],[102.64950199979232,32.074332999979305],[102.64841499967096,32.07591400024069],[102.64744999974837,32.077477999830094],[102.64688499985884,32.07903499970173],[102.64652699965855,32.08081199979456],[102.64657299968931,32.08247099962167],[102.64667899999452,32.08338600022288],[102.64674000009389,32.08396000007435],[102.64651900016092,32.08568099998278],[102.64645800006156,32.08579299985619],[102.64555400023835,32.087527999682024],[102.6444470000255,32.08886799978205],[102.64327700006349,32.09014299979119],[102.64264000020393,32.09181100013682],[102.64228899967635,32.09371399999258],[102.6418769999477,32.09589099972743],[102.64194499971975,32.098589000362075],[102.64247199997446,32.10052499963338],[102.64248700004305,32.10126699982346],[102.64244900040823,32.10224099999723],[102.64218900011723,32.10292900008507],[102.64173899985546,32.1035649998565],[102.64080400007006,32.10403999985824],[102.63953799984857,32.10440899997917],[102.63812299966418,32.10454599980328],[102.6366539999514,32.105029999674755],[102.63526999972915,32.106149000191984],[102.63443000037833,32.10731399993922],[102.63344600018914,32.10829999990261],[102.63237400013641,32.10866199993504],[102.63164199984232,32.10890900024536],[102.63104299961762,32.109382000185356],[102.63039400006248,32.110078999644806],[102.63001300029602,32.11105799999349],[102.63011200003021,32.11214599985974],[102.63053899982745,32.11310700013002],[102.63117999988495,32.11441199968129],[102.63155800017672,32.115950999966785],[102.63166500030687,32.11743800000579],[102.63138199955134,32.11938900019685],[102.63074499969177,32.12089200032874],[102.62925000003973,32.12257699975614],[102.62765199955723,32.12335000011959],[102.6258399997128,32.12366999990971],[102.62503899982174,32.12404900029459],[102.62457699986437,32.12426800029919],[102.62391400006555,32.124735999954304],[102.6235430003448,32.12527000028649],[102.62314199958847,32.12583700034274],[102.62297500008223,32.12715700029693],[102.62300500021946,32.12835700014381],[102.62319600001516,32.13029999984813],[102.62344799991025,32.13235499983715],[102.6235430003448,32.132780000004836],[102.62389800017203,32.13441199980517],[102.624303000228,32.136753999740726],[102.62433300036523,32.13795699968742],[102.62388300010342,32.138819000003096],[102.62355099984238,32.13901299978229],[102.62316599987793,32.1392320003781],[102.6222269998946,32.13936200011829],[102.6208119997102,32.139217000249836],[102.61919099966144,32.13919100027528],[102.61703200038572,32.13905899976349],[102.61508200044901,32.13909500012946],[102.61280500027415,32.13976600029313],[102.6117370004194,32.140359999909556],[102.61061500013797,32.141301999735184],[102.60963799962148,32.1424090000801],[102.60887199989051,32.14396500028183],[102.6085050003677,32.145403999949565],[102.60855100039846,32.14712500019594],[102.60907399955687,32.1490040001611],[102.60986000027765,32.15082000007623],[102.6106379997042,32.152407000322484],[102.61134700043208,32.15370800014774],[102.61179000012285,32.155243999719374],[102.61178199972694,32.15736199983123],[102.6113709998232,32.16000599983707],[102.61083600007089,32.162305999817946],[102.60982900031551,32.1650749997723],[102.60914999972483,32.166692000039326],[102.60881400016417,32.167500999651836],[102.60791799983855,32.169156999904736],[102.60772000037014,32.169522999984466],[102.6064230001865,32.17125699988275],[102.60476699997767,32.17249500018919],[102.60299299976808,32.174187000329056],[102.60148300004744,32.175760999940834],[102.60091899998282,32.17749700013777],[102.60136900024462,32.17915000013801],[102.60213199960256,32.18027700004944],[102.60298199989742,32.18151999990075],[102.60334900031854,32.18283000023751],[102.60334099992264,32.184430999998206],[102.60296699982882,32.185756000338095],[102.60218900040229,32.186856999766334],[102.60106299992287,32.18779000037817],[102.59986600019667,32.18827299976411],[102.59811799992633,32.18869899969253],[102.59637899987685,32.18890000002658],[102.59497499956309,32.189331999855064],[102.59331199968157,32.19038799992703],[102.59193099983236,32.191790000339076],[102.59109200030645,32.19300499966926],[102.59045899974656,32.19450800026738],[102.59009200022375,32.196465000200085],[102.59008499965273,32.19852999972693],[102.5905960000139,32.20023399991587],[102.59177799967148,32.201642999986866],[102.59322800001598,32.20269999967366],[102.59426599973354,32.20376300036406],[102.59537200012143,32.20500399965598],[102.596341000242,32.205902000179094],[102.59731799986018,32.207315999728046],[102.59830899972205,32.209136999753504],[102.59907199997829,32.211992000127196],[102.59933100044437,32.2142709999633],[102.59930799997986,32.21628099984465],[102.5990179995516,32.21806399986507],[102.59852299998231,32.21977300036419],[102.59774499965744,32.221102999664076],[102.59695100033738,32.22198499976515],[102.59650799974827,32.22290800010725],[102.59625699967812,32.22371700016292],[102.59634799991471,32.22456899971848],[102.59663800034294,32.225481999673235],[102.59714899980577,32.226847999679315],[102.59815300008644,32.229858999925064],[102.59948399970696,32.23210100015272],[102.60031999975813,32.233750999872036],[102.60060900036142,32.234303999892475],[102.60270700043614,32.23744800018163],[102.60388200042104,32.23909099982512],[102.60527099976784,32.24061100010734],[102.60679300008238,32.24218799991208],[102.60887500026355,32.24454799993326],[102.61107700009534,32.24639999999734],[102.61275599987039,32.24860199962777],[102.61374400025753,32.250023999733266],[102.6140179998939,32.250410000266136],[102.61487999988432,32.25249800027531],[102.6150320002203,32.252851000048125],[102.61550500004832,32.25553400021737],[102.61535299971236,32.25754099991108],[102.61545200034487,32.258566000070694],[102.61607800033376,32.25935700020992],[102.61717200012781,32.25985299991186],[102.61899599966777,32.26022099989984],[102.62076999987741,32.26070200033467],[102.6222770001233,32.261478000356796],[102.6235430003448,32.26228100002441],[102.62444299997009,32.26286499974024],[102.62502700012618,32.26343699981507],[102.62638500040919,32.264772000030845],[102.62851799974564,32.266169999663845],[102.63035200022969,32.266483000083525],[102.63163000014674,32.266289000004],[102.63263000022945,32.26575300008734],[102.63380799968908,32.264757000077736],[102.63538400043029,32.263068000291],[102.63662700018725,32.2616080002599],[102.63779799997415,32.25992700021094],[102.63911500024926,32.25836200037371],[102.64082800035952,32.25672900023746],[102.64269299990738,32.255724999749056],[102.64457400024712,32.255290000048085],[102.64659899962858,32.25542700019276],[102.64796100010952,32.25585999975642],[102.64965099975522,32.25679100024409],[102.65103599980237,32.25796800020488],[102.6524660000554,32.25913900035345],[102.65426299983122,32.26070599984277],[102.6557320004423,32.2625140002575],[102.6571319996598,32.2644419997306],[102.65908099977158,32.26617700009032],[102.66144599980994,32.267717999879586],[102.66363900031921,32.26887800020565],[102.66535999992706,32.270222999757486],[102.66614199955154,32.271363999784604],[102.66660000020926,32.27335499999744],[102.66672900008072,32.27564700013293],[102.6667288779098,32.27564796699629],[102.6664550004443,32.277825999862166],[102.66590600044832,32.279955000093594],[102.66483400039557,32.28289500016384],[102.66381500004631,32.285258999785924],[102.66365500021276,32.2869800000831],[102.66398699957546,32.2889790003561],[102.66462699980806,32.290732999939486],[102.66523400042867,32.29307499980293],[102.66529499962972,32.29530300014266],[102.66481000010613,32.29749399964315],[102.66398599975052,32.29945499971654],[102.66355499975532,32.301005999863825],[102.66332600032479,32.30254400023498],[102.66330399968514,32.304207000076346],[102.66328799979163,32.306270000359824],[102.663272999723,32.30809799992012],[102.66312799995805,32.310399000171955],[102.6627010001608,32.31189199979196],[102.66205599990532,32.313277999743],[102.66148400034311,32.31448799988423],[102.66142300024373,32.314754999858735],[102.6599629998535,32.31442499998024],[102.6570479999942,32.31396399996381],[102.65467200008513,32.31360600027756],[102.65250500041346,32.31347099965742],[102.65067799960211,32.31333100026397],[102.64959800005177,32.31346100025025],[102.64850699973246,32.31424100004588],[102.64786200037533,32.31579600003118],[102.64725099955673,32.31837999983252],[102.64668300019247,32.31982400021056],[102.64647700032813,32.32189400006608],[102.64646999975716,32.32429699970619],[102.64660700002449,32.32687299985025],[102.646446000366,32.32869999990835],[102.64607999976981,32.3300760001124],[102.64612599980056,32.33179500013766],[102.64649200039676,32.33310500008602],[102.64659899962858,32.33338200006592],[102.64677799972871,32.33390700036274],[102.6465230003589,32.334716000053156],[102.6452980001453,32.33582699982633],[102.64358900023302,32.336142999976154],[102.64164000012123,32.33646299974329],[102.64031600017344,32.33762799964365],[102.6396869998115,32.339295999899285],[102.63908400028713,32.34148999966091],[102.6388780004228,32.34406900016386],[102.6385960003905,32.346021999946295],[102.63829799956638,32.347564999839186],[102.63835199999303,32.349569000149984],[102.63906900021853,32.35127000033997],[102.6404609999384,32.35256200025471],[102.64122400019464,32.35340900023051],[102.64260099984588,32.3542429998874],[102.64443600015484,32.35472600035402],[102.64674799959147,32.355087999729065],[102.64964800028048,32.35588100031466],[102.65190199999081,32.356810000100644],[102.65354599960575,32.35758499982846],[102.65506799992029,32.35876699999654],[102.65605600030743,32.360176000342406],[102.65643799989884,32.361831000300704],[102.65641500033261,32.36372100002522],[102.6570630000628,32.36559699978774],[102.65798199995466,32.36701400018139],[102.65897799983941,32.368826999919975],[102.66031699985584,32.370750000279486],[102.6615260001759,32.37368699969736],[102.66267100002355,32.376354999873506],[102.66366600008341,32.37834499998104],[102.6650050000998,32.380384999794686],[102.66640500021559,32.38196400027017],[102.66778199986688,32.382854000099236],[102.66976199994079,32.38379199973225],[102.67169199978599,32.385018000357135],[102.67302300030481,32.38665599997683],[102.67370299982205,32.38793300012527],[102.67441599984957,32.389127999694196],[102.67513300007508,32.39099600036613],[102.67546100013814,32.392996999824604],[102.6749730002415,32.395065000036375],[102.6748889996776,32.396892000142095],[102.67447000027627,32.398789000098276],[102.6736340002251,32.40058200011194],[102.6722419996069,32.4026909998388],[102.67079600035866,32.404378000020735],[102.67042200026486,32.40541499967604],[102.67038399973171,32.40644799965354],[102.67081100042729,32.4074750001632],[102.67186000001547,32.40853800014644],[102.6735429999885,32.409800999630384],[102.67533200026669,32.41097300009561],[102.67630499968692,32.41181500023215],[102.67693400004887,32.41254499993685],[102.67701799971445,32.413173000172556],[102.67698000007961,32.41426399968438],[102.67722399957879,32.41557299968458],[102.67778799964337,32.41659300007235],[102.67794500000223,32.4167100002004],[102.67951599982223,32.41788199965765],[102.68103099956575,32.41905500002939],[102.68108099979446,32.41909299982196],[102.6828309997146,32.420455999658365],[102.68427699986117,32.42124499982961],[102.68593600044302,32.42135799999464],[102.6876799996171,32.420926000082986],[102.68903399970212,32.420844000101376],[102.69073199974375,32.42115900013263],[102.6925810002964,32.42181299979039],[102.69395100027496,32.42247399973292],[102.69519099965886,32.42325200012484],[102.69652200017771,32.42500500034931],[102.69752499973515,32.42682099962222],[102.69873900007809,32.42836999981922],[102.70045899986098,32.42965399972422],[102.70190500000756,32.43054400029938],[102.7035489996225,32.43137599973765],[102.70513200003639,32.4322069997713],[102.70739800034058,32.43324999990037],[102.70951599960844,32.43400600028861],[102.71112900015959,32.43487400027467],[102.71243300001589,32.43576600018425],[102.71375699996368,32.43711700036367],[102.7153060000424,32.439207000017596],[102.7163050003002,32.44113199962613],[102.71716700029063,32.44289499974975],[102.71755300008003,32.44466000012344],[102.71751100024721,32.445806000128776],[102.71754499968411,32.44695299987042],[102.71799499994587,32.44837499965356],[102.71903299966343,32.44932900021208],[102.72045899971847,32.44975800012479],[102.72183299989501,32.45024899970421],[102.72245800005898,32.45086700032309],[102.72288599968117,32.451716999806905],[102.72269099968749,32.452583000122125],[102.72187100042815,32.45437300037524],[102.72109200027839,32.45576200010515],[102.7205850001152,32.4569159997802],[102.72054300028239,32.458065999948396],[102.72054385637686,32.45806766978815],[102.72054300028239,32.458068000269385]]],"type":"Polygon"},"properties":{"code":"513233206","name":"壤口乡","cp":[102.51205063384711,32.23458652276696]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.22913800004224,32.54569500010043],[102.22766599995644,32.54606099994012],[102.2260370004101,32.54580400033077],[102.22460999963184,32.54519599994064],[102.22266100041834,32.54332300015577],[102.22101299970714,32.541915000185355],[102.22017800037919,32.54061500018888],[102.21946799982638,32.539371999989406],[102.21882699976888,32.53777700008355],[102.21838400007809,32.53623900002918],[102.21783099988413,32.535388999817194],[102.21693899975647,32.534887999813336],[102.2157219999388,32.53462600007702],[102.21376899962902,32.53477100019899],[102.21181899969234,32.53514800017777],[102.20883600006097,32.535750999795056],[102.20627600002894,32.53590899992215],[102.20384600238813,32.53572099967242],[102.20396399969397,32.50236399999247],[102.19902000025526,32.49334199977785],[102.1992479998609,32.486671999873636],[102.19153099995478,32.482031999729095],[102.18149599986594,32.468434000218984],[102.18279300004956,32.43063900016145],[102.19103800003528,32.41971699991332],[102.19119000037125,32.415269999908496],[102.18872099967747,32.41075900003742],[102.18887300001343,32.40631300030013],[102.17653399998557,32.38375799963739],[102.17668700014643,32.37931200017249],[102.17175399968005,32.37029000033684],[102.16666799995113,32.36571399998626],[102.16728100041954,32.34792999976488],[102.162349999603,32.338907999762576],[102.16343702128388,32.30742333491071],[102.16396761569804,32.307330067144775],[102.16396800017696,32.307330000330744],[102.16618400025246,32.307347999873656],[102.16800399959448,32.30754899971455],[102.16942700017482,32.307981000379236],[102.17093299969748,32.30876100028527],[102.17181399995452,32.309487999848685],[102.17251600011139,32.31068100000379],[102.17338200029978,32.312619999917864],[102.17410700002287,32.314735999659085],[102.17481300037771,32.316492999826295],[102.17550700013867,32.317456999932574],[102.17653300016066,32.318411000027766],[102.17782600014631,32.31912800004046],[102.17944700019503,32.3196750003242],[102.18093099997641,32.31982199986218],[102.1824109995598,32.31973800037232],[102.1836890003752,32.319657000193956],[102.18489899962186,32.31975400013652],[102.18600900020775,32.32009099963835],[102.18763799975409,32.3206859997451],[102.18905299993848,32.32118399991292],[102.19034199972619,32.32144900033253],[102.19154400037357,32.321372000035566],[102.19275399962025,32.32094300032765],[102.19400899997108,32.319833999674515],[102.19526000012392,32.31866699966743],[102.19711399980118,32.31749199972528],[102.19873099965194,32.31650699974217],[102.20065399982444,32.31573300027772],[102.20259500043865,32.315065000075805],[102.2043389996127,32.3149219998038],[102.20602499995877,32.31489400023912],[102.20803500016993,32.31434799978495],[102.20943500028568,32.31375299979615],[102.21069800013413,32.3130459999625],[102.21171300028547,32.312306000174324],[102.21256400040524,32.31137500001384],[102.21347900009914,32.31004800014048],[102.21425300022604,32.30865699977465],[102.21490199978112,32.30732899963896],[102.21548199973928,32.30623500002756],[102.21578700023612,32.304739999894934],[102.21608500016195,32.302901000371804],[102.21633899970686,32.302100000342264],[102.21699599965785,32.30123100010397],[102.21806400041095,32.300751999680855],[102.21880400020265,32.30079599989505],[102.22063100011572,32.30145199979604],[102.22192499992629,32.30245899992285],[102.22289400004686,32.30364900007536],[102.22304600038284,32.30461800000232],[102.222672000289,32.30576499978738],[102.22209999982849,32.3074939997457],[102.22193199959898,32.30904299990093],[102.2225659999838,32.31028899986498],[102.22368599971709,32.3111989998362],[102.22384700027389,32.31141799973782],[102.22465099963972,32.312500999632974],[102.2253610001925,32.31391800035055],[102.22579600038567,32.31539499990022],[102.22630699984855,32.31727700013422],[102.22727599996912,32.3185279997631],[102.22749000022935,32.31880299994077],[102.228783000215,32.31952499963558],[102.23075099969505,32.320122999798386],[102.23344799999447,32.320361999711125],[102.23654299977883,32.319755999727306],[102.23968600014209,32.31850299998154],[102.24228399980899,32.31754100001973],[102.24388599959113,32.31671699973908],[102.24514500013991,32.315606000038954],[102.24593799963509,32.31468399981155],[102.24645599966894,32.31364199990284],[102.24655600012635,32.31215399967062],[102.24653299966181,32.31118200018915],[102.24644099960031,32.30997900000677],[102.24640399979039,32.30848400015017],[102.2467770000593,32.30716599985969],[102.24721999975007,32.306125999925655],[102.24799399987697,32.30473799997272],[102.24833000033595,32.30367200021401],[102.24852100013167,32.303147999996426],[102.24867299956932,32.30057300010776],[102.2488109996616,32.297939000116294],[102.24883400012611,32.29581600026148],[102.24899399995967,32.29409700001866],[102.2495580000243,32.29219500003034],[102.25003099985231,32.2912769997075],[102.25059599974185,32.29017800012493],[102.25150399976305,32.2886189996461],[102.25248100027952,32.28705999970095],[102.25332700037644,32.285900000232985],[102.25391499983219,32.28480399981369],[102.25422799982663,32.283880999649],[102.25421199993308,32.28319699993728],[102.25392200040321,32.28234199987823],[102.25349499970763,32.28114699991173],[102.25393800029671,32.27993600019266],[102.25485299999062,32.2786060002747],[102.25609699957246,32.27721100012442],[102.25714199986103,32.27570299995905],[102.25798100028523,32.27391500021707],[102.25833199991452,32.27167999997636],[102.25801899992008,32.269624999977445],[102.25738600025849,32.268264000180416],[102.25708900015756,32.267007999894844],[102.25725700038704,32.26568799970933],[102.2577750004209,32.264535000178356],[102.25840899990743,32.26275500024747],[102.25843099964871,32.26092399973417],[102.2581190003775,32.259098000311496],[102.2577450002837,32.257437999625004],[102.2575770000542,32.25566800000643],[102.25738600025849,32.253153000303215],[102.25730599989255,32.252323000303065],[102.25711900029481,32.25035700018977],[102.25711199972379,32.250026999907114],[102.25707300026404,32.248412000129605],[102.25723399992253,32.24634900031007],[102.25753900041937,32.24502000032892],[102.25792799968349,32.24432799973488],[102.25878999967391,32.24386099966474],[102.26007199978893,32.24401100018006],[102.26218400010735,32.24461300025248],[102.26428999967966,32.24549799967851],[102.26632699965496,32.246433000181995],[102.26818500042849,32.24795100027072],[102.26996999961042,32.24952599989304],[102.27035200010016,32.25003400005911],[102.27157200029087,32.2516749996312],[102.27208699995168,32.252323000303065],[102.27310200010302,32.253599999830854],[102.27439199971565,32.25449300012556],[102.2755440001343,32.25481799985216],[102.27696699981632,32.25496799974261],[102.27843999972704,32.254777999890116],[102.2797059999485,32.254012000218445],[102.28062499984036,32.252908000039824],[102.28132699999726,32.252323000303065],[102.28181599971877,32.251916000287565],[102.28354399989765,32.250862999914744],[102.28418400013022,32.25004699979723],[102.28472599955522,32.249355000279074],[102.28622100010554,32.247082999946834],[102.2875910000841,32.24523600018125],[102.288766000069,32.243618999790215],[102.2896049995949,32.2420569996629],[102.29016600018478,32.23981700027233],[102.29005099965876,32.237584999888874],[102.29002100041983,32.23615299998082],[102.29039499961534,32.23465799968733],[102.291362999911,32.23316099989059],[102.29235100029814,32.2319989998914],[102.29325900031932,32.23067099971789],[102.29390000037682,32.229290999717854],[102.29434999974033,32.228139000084],[102.29499099979783,32.22675500014931],[102.29550600035695,32.22560300028829],[102.29596400011634,32.2250260001222],[102.29642900044676,32.22478699972209],[102.2973680004301,32.22471800008429],[102.29818799968943,32.2250460001971],[102.29949300026898,32.22668000011593],[102.30110599992177,32.22928300021404],[102.30338399992154,32.23153600030531],[102.30414999965251,32.2327799997344],[102.30576300020364,32.23499700007204],[102.30707600028077,32.236461000017556],[102.30859000019939,32.237758000266794],[102.30976099998631,32.23871000022045],[102.31108900013207,32.2394759997948],[102.31285499994578,32.23978799963313],[102.31575399991155,32.23974600005333],[102.31844399963997,32.23959600009318],[102.32107599964203,32.2393260001486],[102.32341399991626,32.23914700017079],[102.32550100012028,32.238892000081364],[102.32757999992842,32.238458000220255],[102.32986100030122,32.23779400036994],[102.33241299993738,32.23724200026062],[102.33442399997344,32.23686600024813],[102.3368719998525,32.23576800036626],[102.33921099995162,32.2348199998676],[102.34182000038749,32.23374699993657],[102.3442919996577,32.23250800005564],[102.34675200013066,32.231043000235516],[102.34878499990803,32.229788000283285],[102.35085700004346,32.22866399970958],[102.35266100039028,32.227951999723714],[102.3542670003704,32.227644999773],[102.35601800011544,32.227270999674445],[102.35727799959086,32.22668300030083],[102.35846400034471,32.22568600027161],[102.35944799963558,32.224472999878785],[102.36033300009055,32.22211600007476],[102.36128299994454,32.220233000197375],[102.36211399997286,32.21850899999326],[102.36288499972667,32.216603999896066],[102.36364399978497,32.21437200016111],[102.36471199963972,32.21126700032529],[102.36566999988966,32.20884599967757],[102.36634799975708,32.20653899962611],[102.36650099991796,32.20447400021169],[102.3664480002145,32.20235800023728],[102.36620399981703,32.20019000035698],[102.36573500018697,32.197624000162456],[102.36481899976985,32.19575000001066],[102.36335000005712,32.19370999969953],[102.36190100043582,32.192132999647654],[102.36020300039422,32.19046600010302],[102.35875700024766,32.18916799978149],[102.35813899975638,32.18855300029495],[102.35716999963581,32.187309000178885],[102.3555789997243,32.1856740001579],[102.3535919999777,32.184214000346586],[102.35193999996685,32.182982999684214],[102.35069999968461,32.18179800032428],[102.34986899965632,32.180898000293034],[102.34951800002703,32.180328000309885],[102.34950999963112,32.17981199980098],[102.34969299992923,32.17924199986226],[102.35022699985659,32.17882999964581],[102.3512989999093,32.17864199995372],[102.3535769999091,32.17803399968339],[102.35624300024635,32.176852999940216],[102.35856599955363,32.17533000021126],[102.36002000009611,32.173874999700985],[102.3611039998444,32.172739999722616],[102.36230499976855,32.17186000025512],[102.36321299978974,32.170868000366525],[102.36392199961934,32.16942599991332],[102.36393800041117,32.168828999780594],[102.36395299958147,32.16810900028119],[102.36368999981573,32.16669999972476],[102.36364799998294,32.16645599987786],[102.36322799985837,32.16571799962962],[102.3628010000611,32.164810999750266],[102.36256400023463,32.16327300021465],[102.36321299978974,32.16211600021737],[102.36553599999536,32.160878000307626],[102.3675539997041,32.1604450000626],[102.36969399961161,32.159952000260894],[102.37131100036069,32.15987099969594],[102.37287200013495,32.1604169999988],[102.37319199980209,32.160662000075504],[102.37477900041392,32.161848999945015],[102.37503899980662,32.16202199990026],[102.37710199972122,32.16341599985209],[102.37907500012246,32.16475799996184],[102.3808519998068,32.16576299985301],[102.38254999984841,32.16653400002464],[102.38341600003682,32.166704000327655],[102.38417500009511,32.16685099973895],[102.38525100034579,32.1668309997968],[102.38549499984495,32.166704000327655],[102.38604399984095,32.16640200032209],[102.3867639366591,32.16541645489913],[102.38676500026439,32.165417000132486],[102.39312399988752,32.168675000186546],[102.39552599973582,32.175403000277186],[102.40061300018799,32.1799679999626],[102.4004730004459,32.184412999647414],[102.40294600043933,32.188918000250396],[102.40810400013831,32.19125999994271],[102.40796400039619,32.19570599980383],[102.41291299985781,32.20471600018898],[102.41277300011569,32.209162000035256],[102.41524799975896,32.21366699987058],[102.4149690000997,32.22255899991469],[102.42005999985149,32.22712299975095],[102.42006064394359,32.22712448083805],[102.42005999985149,32.227124999864486],[102.41200499983658,32.23361399970268],[102.41137499964974,32.25361999969366],[102.4165380002699,32.255961999814495],[102.41901399973806,32.260466999868946],[102.42934000008002,32.26515000000521],[102.43181800009631,32.269654999791],[102.43167900017913,32.27410099982918],[102.42892300032852,32.27848799963024],[102.41817699986196,32.28714299971402],[102.40728900000352,32.30024400021643],[102.3966780001545,32.30445100004478],[102.39604499959458,32.324459000040065],[102.39328600026923,32.32884600028191],[102.37998099959552,32.3352150000978],[102.37700800000991,32.346271000127025],[102.37162799965476,32.35059600000597],[102.36603399993771,32.36159099977306],[102.36574900043068,32.37048400007687],[102.36291599968881,32.377092999636],[102.35760400000409,32.37919500012696],[102.35703200044188,32.39698100007068],[102.34640700034916,32.401184000058215],[102.3462630004091,32.405631000238444],[102.33832899986969,32.40767100036518],[102.33818499992967,32.412116999943095],[102.3329429996668,32.41199499998065],[102.3222420003044,32.41841999975036],[102.31670899978842,32.42718999990334],[102.3162729997703,32.44052900012375],[102.31867700016679,32.44726100036022],[102.31766000036565,32.478388000286635],[102.30942700007549,32.489320000016875],[102.30410699999481,32.49142000031985],[102.29856699980611,32.50018999990818],[102.29834800042133,32.50685999977673],[102.29295299999758,32.51118299962165],[102.28850293382796,32.52992706437461],[102.28850199958005,32.52992699999737],[102.28825399988293,32.529891999982226],[102.2880060001858,32.52981999967023],[102.2870339996922,32.52948700022199],[102.28656099986418,32.529288999657915],[102.28635099980191,32.52921999962268],[102.28611099960241,32.529106000205836],[102.28589700024045,32.52904500030561],[102.28491700024924,32.52868299980977],[102.28398999996146,32.528406000003876],[102.28377200040158,32.528358000270615],[102.28355800014134,32.52835999978663],[102.28334899990396,32.52839600015625],[102.28293299997733,32.52850299990733],[102.28274200018166,32.52853300016855],[102.28256700027946,32.52853099989898],[102.28153700005953,32.52829399982899],[102.28134999956347,32.528220000231904],[102.28104499996492,32.528008999971405],[102.28086900023783,32.527922999956395],[102.27997999958492,32.52755400035787],[102.27985099971346,32.52746499984608],[102.2796559997198,32.52724799994768],[102.27959100032078,32.527188999842835],[102.2792249997246,32.527005999900105],[102.27846999986424,32.52671600010484],[102.27818700000704,32.52654900019502],[102.27791699967031,32.52636000026736],[102.27734799958282,32.5261289999841],[102.27713500004579,32.52599399966163],[102.27672599979188,32.52569100011807],[102.27629899999462,32.52558499983647],[102.27596300043395,32.52547799963982],[102.27563500037091,32.52532300023321],[102.27547100033938,32.525229000062104],[102.27519299960669,32.52499499975696],[102.27504000034415,32.52490599973989],[102.27486100024402,32.524845000017635],[102.27468499961859,32.52476100035723],[102.27425399962335,32.524448000155644],[102.27378499999331,32.524226999813955],[102.2732970000967,32.52390299986926],[102.27280400017719,32.52361799971652],[102.2723539999154,32.52331300010646],[102.2719880002175,32.52311900034973],[102.27185500014811,32.52306799985611],[102.27157599959052,32.523006999643506],[102.2714690003587,32.52294399975304],[102.2713279998934,32.52271000031409],[102.27121800028854,32.522610999814496],[102.27094299992893,32.52246800016266],[102.27064900020109,32.52241700005702],[102.27050000023816,32.52243499991939],[102.27035499957489,32.52249899999],[102.2702299999014,32.52259299998737],[102.27005400017431,32.52277800022681],[102.26994700004421,32.52285199976146],[102.26982900004342,32.52290099998276],[102.26966099981395,32.52293400005489],[102.26919600038184,32.52283700019848],[102.26889400025806,32.522704999694696],[102.26861200022574,32.52254500017828],[102.26845599969182,32.52248900024232],[102.26827300029204,32.52248100014043],[102.2674489999364,32.52259299998737],[102.26724999974479,32.52260599994699],[102.267059999774,32.522557000322294],[102.2668990001155,32.522452999778174],[102.26677299971882,32.52233099999149],[102.26668999987815,32.52221399992875],[102.26665499971803,32.522082000024646],[102.26663200015182,32.521803999730174],[102.266658999916,32.520763999851276],[102.26664800004535,32.52060899988756],[102.26658699994599,32.52026800008667],[102.26657199987736,32.51991199969805],[102.266518000349,32.519551000134165],[102.26614799955483,32.518950999682154],[102.26591199955328,32.51868099998979],[102.26586600042084,32.51854599983945],[102.26584299995632,32.51773799973345],[102.26582399968974,32.51759800029296],[102.26575099989482,32.517459999635484],[102.26564499958957,32.517320999642784],[102.26544600029627,32.51688300001998],[102.26540799976311,32.51677400029233],[102.26534300036411,32.51648400004663],[102.26512200043118,32.51586099966925],[102.26492700043751,32.515217000017074],[102.26486600033813,32.515107999784064],[102.26404600018047,32.514618999996046],[102.2639430002483,32.51453200013143],[102.26361900038322,32.51434900016754],[102.2634550003517,32.51427800019298],[102.26310800002204,32.51420399965837],[102.26219199960494,32.51414799982748],[102.2616540003779,32.51406400001571],[102.26147500027777,32.51408700037779],[102.26130700004829,32.51413799990813],[102.26115100041268,32.51414799982748],[102.2608380004182,32.51410499963607],[102.26068600008227,32.51406900035845],[102.2603570001943,32.51396499983924],[102.25965900023537,32.51368500034903],[102.25946099986868,32.51364199993613],[102.25930100003508,32.51354799966654],[102.25917899983634,32.513413000138925],[102.2591329998056,32.513248000356796],[102.259189999707,32.5129680001482],[102.25919800010291,32.51284299981409],[102.25917899983634,32.5127160001996],[102.25910199984347,32.51230899965942],[102.25887699971257,32.511506000027616],[102.25880899994048,32.51117699992676],[102.25885099977327,32.510374000031405],[102.25896100027646,32.509804000133194],[102.25896100027646,32.50965200010552],[102.25889599997915,32.509392000200066],[102.2578020001851,32.50939500010709],[102.25615400037219,32.509353999853715],[102.2540710003661,32.508912000147326],[102.25263699991514,32.50716099994335],[102.25245299979213,32.505163999904525],[102.25253700035601,32.50286799963787],[102.25253300015807,32.50231499993944],[102.25254800022667,32.500703000206826],[102.25238800039311,32.500028999637955],[102.25203299966755,32.49858900019219],[102.25145000023468,32.49693900005893],[102.25014200018039,32.495128000013004],[102.25003500005025,32.49503699971543],[102.24869199983588,32.49389000014551],[102.24832199994003,32.49379199987134],[102.24697500042603,32.493450999879116],[102.2452279999806,32.49393699996074],[102.24377099996342,32.49505100000034],[102.24253499987915,32.497013999757364],[102.24110499962613,32.49921199979622],[102.24060500003394,32.500018000347765],[102.23967100007346,32.501523000310826],[102.23925500014685,32.5023040001712],[102.23849500026365,32.50371299974934],[102.23832700003419,32.505376000028186],[102.23856399986065,32.50709000035224],[102.23873899976282,32.50880099989339],[102.23876200022735,32.50977499964439],[102.23857200025655,32.510519999857244],[102.23827400033073,32.512130000226904],[102.23796899983388,32.513739999790154],[102.23774000040333,32.515575999766575],[102.2377100002661,32.517234000121036],[102.23754899970932,32.51924100029983],[102.23678299997833,32.520855999708246],[102.23580600036016,32.52326300029506],[102.23508900013469,32.52452999975002],[102.23424999971046,32.526268999767616],[102.23362399972156,32.52839499964124],[102.2331199999314,32.529832000357395],[102.23281899963253,32.53144200013219],[102.23245200010973,32.53310799999886],[102.23235400020042,32.535675999848344],[102.23198699977931,32.537456000267184],[102.23158300044659,32.54004400012641],[102.23123199991898,32.542627999702226],[102.2303320002937,32.54458299981783],[102.22913800004224,32.54569500010043]]],"type":"Polygon"},"properties":{"code":"513233202","name":"江茸乡","cp":[102.26876480621743,32.352965999818025]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.57348199970343,32.61538900004376],[102.57072300037802,32.619780999788595],[102.56546699987146,32.61966900017894],[102.56027895062795,32.61733342766429],[102.56027800021039,32.617333000161864],[102.56047700040199,32.610661999676225],[102.55542099991197,32.60387800005239],[102.55049800038965,32.5926469996716],[102.53776500017648,32.579022000176906],[102.5352720000916,32.57451799970661],[102.53540599998588,32.57007100000381],[102.53022099962445,32.56773399968553],[102.52517000005561,32.56094899973837],[102.51210799995447,32.55844099990557],[102.50699200008827,32.55387899974675],[102.50712699980751,32.54943099966222],[102.50201199976627,32.54486999999856],[102.49420399962354,32.542473999955654],[102.47057699970415,32.54195299963648],[102.46539499971574,32.53961299965333],[102.44964399971111,32.5392630002809],[102.44446400027086,32.53692200021069],[102.44536399989613,32.50801599970725],[102.44287800038224,32.50350999980345],[102.43769999969348,32.50116900005221],[102.43521500000446,32.49666300026659],[102.4247199996081,32.496427000376336],[102.41436599967702,32.49174299973333],[102.40387100017895,32.491505000238035],[102.39834199986095,32.50028000022538],[102.3930949995752,32.50016000003495],[102.39033000040202,32.50454700000259],[102.3901880001118,32.50899400028102],[102.37664099958879,32.52203499977099],[102.37649900019687,32.526481999885426],[102.37117900011619,32.52858500034519],[102.36841099967168,32.532971999854226],[102.3679119999044,32.548537000236436],[102.36237500008873,32.55731000015761],[102.35705199963503,32.55941200007522],[102.35180100004966,32.55929099993555],[102.33633600027531,32.55002999995071],[102.32569000026616,32.55423200036816],[102.31263499983775,32.55170100002052],[102.28715199969295,32.551296000176166],[102.28715178230065,32.551295997147385],[102.28715199969295,32.551291999893806],[102.2871669997616,32.54791199966795],[102.2874570001898,32.544523999740804],[102.28773900022213,32.542065000197084],[102.28815900034668,32.5396099999977],[102.28932199973771,32.5373850003746],[102.29075700001357,32.53532999975784],[102.29192000030291,32.534357999914526],[102.29192799980054,32.53416500022341],[102.29201900003713,32.53268599998084],[102.29279800018686,32.53057100026532],[102.29286599995895,32.53042799964963],[102.2926030001932,32.530214000061406],[102.29152699994253,32.53011300002203],[102.29040200018635,32.53003599967578],[102.29018499955308,32.53004199962644],[102.28850293382796,32.52992706437461],[102.29295299999758,32.51118299962165],[102.29834800042133,32.50685999977673],[102.29856699980611,32.50018999990818],[102.30410699999481,32.49142000031985],[102.30942700007549,32.489320000016875],[102.31766000036565,32.478388000286635],[102.31867700016679,32.44726100036022],[102.3162729997703,32.44052900012375],[102.31670899978842,32.42718999990334],[102.3222420003044,32.41841999975036],[102.3329429996668,32.41199499998065],[102.33818499992967,32.412116999943095],[102.33832899986969,32.40767100036518],[102.3462630004091,32.405631000238444],[102.34640700034916,32.401184000058215],[102.35703200044188,32.39698100007068],[102.35760400000409,32.37919500012696],[102.36291599968881,32.377092999636],[102.36574900043068,32.37048400007687],[102.36603399993771,32.36159099977306],[102.37162799965476,32.35059600000597],[102.37700800000991,32.346271000127025],[102.37998099959552,32.3352150000978],[102.39328600026923,32.32884600028191],[102.39604499959458,32.324459000040065],[102.3966780001545,32.30445100004478],[102.40728900000352,32.30024400021643],[102.41817699986196,32.28714299971402],[102.42892300032852,32.27848799963024],[102.43167900017913,32.27410099982918],[102.43181800009631,32.269654999791],[102.42934000008002,32.26515000000521],[102.41901399973806,32.260466999868946],[102.4165380002699,32.255961999814495],[102.41137499964974,32.25361999969366],[102.41200499983658,32.23361399970268],[102.42005999985149,32.227124999864486],[102.42006064394359,32.22712448083805],[102.42494200026425,32.238356000256665],[102.43010400016118,32.240696999781996],[102.43258100035256,32.24520199970394],[102.44786100017899,32.25889200011692],[102.44730999963487,32.27667599967831],[102.44179999958341,32.28545099996393],[102.44166099966623,32.289896999645855],[102.43890599964051,32.29428500016047],[102.437935999695,32.325407999824286],[102.44289599992558,32.33441799971085],[102.46095199969413,32.34371999992253],[102.47632399958208,32.355184999646646],[102.48666499999267,32.359863000236096],[102.48652900044856,32.36430899968859],[102.48088100030482,32.37753300002301],[102.47965299971818,32.41755300011894],[102.4820699996351,32.42428100002831],[102.48710900040669,32.431067000238166],[102.4947700002363,32.43791000036892],[102.49698600031178,32.45130800028919],[102.50216300027729,32.453645999886795],[102.50747499996206,32.45153699973817],[102.51023199963763,32.44714800005664],[102.51628400001239,32.42058100014747],[102.526769000363,32.42080799991942],[102.53194499960533,32.42314500031296],[102.53443299966735,32.42764900032831],[102.54471999965128,32.43454499978366],[102.55763000031477,32.44149699985824],[102.56811899996505,32.441720000201165],[102.57329699975548,32.444055000089435],[102.58634200013817,32.44655700029298],[102.64140999996745,32.44770700002092],[102.64659100013095,32.45003899983171],[102.64908599986569,32.454540000142686],[102.6542670000292,32.45687099992998],[102.66475800022761,32.45708600027499],[102.66725399978725,32.46158700022178],[102.70921799968262,32.462435999639084],[102.72054300028239,32.458068000269385],[102.72054385637686,32.45806766978815],[102.72111900004255,32.45918999978176],[102.72208800016311,32.46008999966591],[102.72427800029934,32.46157999975049],[102.72681499986686,32.462904999783426],[102.7288030003367,32.46384100013197],[102.7303099996843,32.464672999938855],[102.73229300013126,32.46537299986771],[102.73440299990155,32.465849000016],[102.7362640001498,32.46557100020952],[102.73874700018894,32.464615999879435],[102.74094800019583,32.463710999633626],[102.74328999976969,32.46280800036274],[102.7454449997458,32.46259500025258],[102.74747500004842,32.46272400035811],[102.74827599993948,32.46292999979689],[102.74887900036215,32.463081999941686],[102.75001199961596,32.46309700037587],[102.75063799960486,32.46310799963158],[102.75204199991859,32.46279200015139],[102.75372800026464,32.462528000042596],[102.75372896595357,32.462527981093885],[102.75372800026464,32.462531999728455],[102.75087899962926,32.47438800008821],[102.72940199966311,32.49176300000609],[102.71853600044429,32.50489599974767],[102.71316299976185,32.509238000291866],[102.70785299972694,32.51135699968902],[102.69972999993996,32.52009299999741],[102.69448100000437,32.519987999780255],[102.68916900031965,32.52210499984978],[102.68379399998739,32.526446000263675],[102.67854400022694,32.52634000011547],[102.6679190001342,32.53057400022284],[102.66516699958319,32.534968000355185],[102.65991699982274,32.53486000028845],[102.64928900025528,32.539092000152],[102.64403899959649,32.53898399974345],[102.64128600011891,32.54337700003875],[102.63065600000331,32.54760800031061],[102.6279019998025,32.552000999652456],[102.62258599991979,32.55411599968648],[102.6223280001769,32.563011000099046],[102.61681800012548,32.57179600029717],[102.61668900025403,32.57624399998936],[102.61630099991652,32.589586999975204],[102.6187980001994,32.59408899993758],[102.61866900032796,32.59853700006751],[102.62324192189249,32.606778021045635],[102.60514400044455,32.61160499981802],[102.59726099995878,32.61143999966737],[102.59207200029766,32.6091059998483],[102.58412400041288,32.611163999905294],[102.57873700038506,32.61550000016734],[102.57348199970343,32.61538900004376]]],"type":"Polygon"},"properties":{"code":"513233201","name":"龙日乡","cp":[102.40041964577492,32.42345274031332]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.46684699971004,32.91798499996286],[102.43972829499369,32.934196822634064],[102.43972800034626,32.93419600007244],[102.43848899988897,32.93290699965392],[102.43677599977875,32.93185399962634],[102.43490700003292,32.931065999657854],[102.43256100026107,32.929334000176105],[102.43062700021792,32.92776700017671],[102.42915000010922,32.92562800029134],[102.42808999975205,32.9238699998633],[102.42746399976316,32.92342300004599],[102.4261709997775,32.92310199999368],[102.4249580001578,32.923296000124566],[102.42362300033932,32.92435099992438],[102.42202412579604,32.92540191690798],[102.42202400003191,32.92540199985095],[102.4204749999532,32.92589000022613],[102.41890800033116,32.92540199985095],[102.41697699976271,32.92411499994205],[102.41517699961386,32.922492999738544],[102.41344099993738,32.920801999923604],[102.41210600011894,32.91893699973099],[102.4119420000874,32.91859700007367],[102.4112519996261,32.91717799991624],[102.41110299966317,32.91668200025274],[102.4108089999353,32.91569499987539],[102.41085499996608,32.914545000047994],[102.41150299969627,32.91339500036225],[102.41275499967405,32.911823000186715],[102.41352100030333,32.9099210003071],[102.41328100010382,32.90826799988553],[102.41242699961099,32.907316000006],[102.41071000020112,32.90642900021754],[102.4088790000901,32.90554199983951],[102.40682700004615,32.904774000070844],[102.4039509996466,32.90368099975821],[102.40183000000566,32.902856999696844],[102.40066199969348,32.902301999854075],[102.39961700030325,32.901246000357204],[102.39896799984982,32.89982199974768],[102.39816699995875,32.89720200016635],[102.39777100012363,32.89458099983452],[102.3978620003602,32.89274999971515],[102.39816699995875,32.891531000353794],[102.39915899964554,32.89042800021385],[102.40054799989066,32.88874899972616],[102.40125000004753,32.88679499988101],[102.40154700014845,32.88483700026273],[102.40271499956233,32.88264199966707],[102.40409600030985,32.881014000321954],[102.405225000264,32.879735000008125],[102.40579699982621,32.87823500030655],[102.40594900016218,32.87646399981691],[102.40570499976471,32.87469399981668],[102.40504899963858,32.87287099964126],[102.40391200018684,32.87043300009171],[102.40305000019642,32.868382999748675],[102.4023100004047,32.865875999955875],[102.40185199974698,32.86337600022511],[102.40212700010659,32.86079500016055],[102.40226400037393,32.85821500029422],[102.40203500004509,32.85695600026866],[102.4011200003512,32.85554500018212],[102.39958600034112,32.85402899974049],[102.39732800043285,32.85212100031237],[102.39523399965778,32.850274000324156],[102.39334999984334,32.848010999676625],[102.39276999988518,32.846245999965745],[102.39254099955633,32.84447599987689],[102.3919680001692,32.84322199968011],[102.39065599991696,32.84215900025842],[102.38940899996203,32.84137600017406],[102.38825700044168,32.84139600008575],[102.38668499989845,32.84073000037577],[102.38469399995387,32.839750000351835],[102.38263799971195,32.83852600026861],[102.38029199994014,32.8371299996884],[102.377957000039,32.83562200018811],[102.37748400021097,32.835338999858],[102.37554299959677,32.83417500019824],[102.37503499960867,32.83386200002139],[102.37422299984692,32.83335599997017],[102.37382199998892,32.8331199998821],[102.37316900023588,32.8328580003353],[102.37254700044495,32.832596000015435],[102.37071200013598,32.832679999770015],[102.3683629999911,32.83337799967136],[102.3676879995984,32.83357900011988],[102.36591400028713,32.83343100016428],[102.36576899962385,32.833372999808375],[102.36454000011061,32.83289100007012],[102.36309399996408,32.83193800032076],[102.36171300011486,32.8309279998634],[102.35982599992735,32.82988600007373],[102.35700300012954,32.82826899978397],[102.35425300012666,32.826946000225114],[102.35253199962052,32.825940999889156],[102.35108299999926,32.824699999685954],[102.35051399991178,32.823624999901334],[102.35014099964286,32.82208300032935],[102.34906799976524,32.82037599980736],[102.3479310003135,32.81927600027802],[102.34661499986328,32.81837599979752],[102.34510099994468,32.817429999671134],[102.34311300037317,32.81660099968347],[102.34070599960367,32.815201999980225],[102.33869600029081,32.814196000065216],[102.33706699984616,32.814048000273836],[102.33478999967132,32.813709999815856],[102.33355000028742,32.81304099977583],[102.33133400021192,32.811237999673544],[102.32985700010327,32.8090840002262],[102.32865600017912,32.807103000152765],[102.32786199996072,32.80471500023639],[102.32760699969262,32.80265500013889],[102.32667600010517,32.80066600008849],[102.32557300009032,32.79982400030247],[102.32331900038001,32.799227000303986],[102.32027499975095,32.798608000071944],[102.31815099973697,32.797550000149414],[102.31682699978919,32.79619899994532],[102.31652200019066,32.794720999718756],[102.31568199994153,32.793301999790366],[102.31532000044157,32.792501000273916],[102.31426699975714,32.79085800022711],[102.3132640001997,32.78909500023651],[102.31254600014928,32.787211000077654],[102.31120700013287,32.785287999797106],[102.3097080002829,32.78401200022619],[102.30807600036351,32.78346799989417],[102.30636999992596,32.78297699963568],[102.30454300001288,32.78317500025979],[102.30237999964086,32.78394799978223],[102.30023999973339,32.78524000034578],[102.29797799962714,32.7864939996955],[102.29522000012668,32.78767900005675],[102.29278999979095,32.788171999793576],[102.29061200024861,32.78797399971902],[102.28876900044207,32.787426999793034],[102.28793000001784,32.78641199987229],[102.28749499982466,32.78509499965896],[102.28665200010077,32.783737000317224],[102.28569800004881,32.78296800021474],[102.28488899976185,32.78326800005756],[102.28442799962937,32.784058999661454],[102.2839780002659,32.78504099987402],[102.28373399986843,32.786195000058356],[102.28268799975496,32.787925000326744],[102.2807539997118,32.78950200023615],[102.27840499956694,32.790745999921874],[102.27530399993478,32.79165099997897],[102.27199599971509,32.792037000082225],[102.26902800015236,32.792423999849746],[102.26596500015506,32.79206999987633],[102.26268399969953,32.7908059998602],[102.2602810000263,32.789293000081145],[102.25841200028046,32.78783599963532],[102.25670300036818,32.78728900037104],[102.25529099965853,32.787482000280136],[102.25273499982443,32.78837999968703],[102.25132399983796,32.78891900008848],[102.25003500005025,32.7891889997524],[102.2489589997996,32.78941500009398],[102.24831400044245,32.78928200005943],[102.24703999982503,32.789033000164025],[102.24487300015336,32.789124000145996],[102.24278299957628,32.789618000041564],[102.24083000016485,32.790101000293625],[102.23920800029119,32.79000899994434],[102.2378430003355,32.78958199975359],[102.23633199989163,32.78886000025702],[102.23515799973164,32.787953999862445],[102.23364299998812,32.78677400036405],[102.23200299967283,32.786228999653545],[102.23052700028737,32.786425000042705],[102.22912299997364,32.787419999838455],[102.22833700015119,32.78852299980367],[102.2270669997317,32.78940300022392],[102.22551000015544,32.789767000344334],[102.22437000033064,32.789674999649606],[102.22354599997502,32.789115999703185],[102.22227200025594,32.787636999684736],[102.22122299976942,32.78599399965405],[102.21962000016235,32.78395899970842],[102.21841900023821,32.78129000013323],[102.21767900044648,32.77849800009505],[102.21669400043238,32.77674099988704],[102.21572899961146,32.775781999834535],[102.21457000041845,32.775575999979885],[102.21329199960306,32.77588399994534],[102.21215500015131,32.77629800003906],[102.21003699998512,32.77694000004198],[102.20808899969828,32.7778849998006],[102.2063530000218,32.778828000132506],[102.20496799997464,32.780456000128275],[102.2035910003234,32.78236799976001],[102.20227400004826,32.7837100000167],[102.20108399999478,32.784988999882344],[102.19935599981591,32.78622500005722],[102.198185000029,32.786447000036354],[102.1970250001127,32.78600500008246],[102.19647199991877,32.785327999949416],[102.19549652204667,32.783917755076075],[102.1954960001255,32.783916999845665],[102.19506500013027,32.782780999957026],[102.19496600039608,32.78129599986043],[102.19451600013427,32.779241000146406],[102.19373799980943,32.77776599981821],[102.19304700042153,32.776807000238236],[102.19195600010222,32.77654200004229],[102.18972800033119,32.77652199988146],[102.18742799969178,32.77644800000263],[102.18509299979064,32.77595200020603],[102.18352600016857,32.77511800001696],[102.18268599991943,32.77399400000888],[102.18211799965687,32.772517000218485],[102.18242700035168,32.771076999638716],[102.18328900034211,32.76980399970542],[102.1829920002412,32.768724000259596],[102.18229000008431,32.76764499990366],[102.18139399975868,32.766576999874175],[102.1807679997698,32.76589600022055],[102.17924600035357,32.76403699977091],[102.1779220004058,32.76216999994016],[102.17631600042567,32.759730999799444],[102.17491600030988,32.7575819996621],[102.17421800035099,32.756331000036035],[102.17411899971846,32.754907000021326],[102.17442800041326,32.75335599990197],[102.17459499991952,32.75213199990877],[102.17471000044554,32.75130499995512],[102.17471700011828,32.750023999693894],[102.17472499961585,32.74884100024878],[102.17483199974599,32.74735099962689],[102.17427500025238,32.74655699991256],[102.17338599959943,32.74617599996551],[102.17214600021553,32.745948000181656],[102.17092900039783,32.74596599970865],[102.16823200009846,32.74624099996269],[102.16554700039289,32.74686099993511],[102.16351700009025,32.74661000003592],[102.161399999749,32.74573099993163],[102.15923700027527,32.74420400005751],[102.15819600018469,32.74267600006903],[102.15782999958846,32.74136899974591],[102.15813500008531,32.73987100000883],[102.1589929998778,32.738361000073326],[102.16044599969703,32.73673899998204],[102.16170600007075,32.73507399988482],[102.16357499981659,32.73333099976465],[102.1655619995632,32.731698999741795],[102.16716000004574,32.73057699982118],[102.16882700012519,32.72935100017525],[102.170151000073,32.728067000017404],[102.17126900015647,32.72673600006044],[102.17218399985038,32.725115999684355],[102.17255399974624,32.72362300034286],[102.17312700003168,32.72206400012187],[102.17341699956157,32.72133799996694],[102.1734469996988,32.72001499992831],[102.1740309998549,32.71891700019493],[102.17496200034064,32.71821500015735],[102.17609499959441,32.717561000324814],[102.17682699988852,32.71686900017319],[102.17734999994524,32.716109000146325],[102.17786100030642,32.71439299976132],[102.17883399972662,32.71265600026459],[102.18008099968155,32.71097200035238],[102.18140499962934,32.70958099974845],[102.18305699964023,32.70805799973173],[102.18404900022531,32.706897999631096],[102.1850900003159,32.70510299999321],[102.18608500037573,32.7035059998811],[102.18721400032987,32.702344000149616],[102.18934300036672,32.70104900012156],[102.19153599997766,32.69940599990823],[102.19279100032848,32.698069000057075],[102.19369900034968,32.696222000065],[102.1941450004135,32.69495999990597],[102.19477800007509,32.69288700006184],[102.19506099993232,32.69031100017749],[102.19485500006799,32.68734100025062],[102.1938559998102,32.68506999991927],[102.19358499964855,32.68400199999716],[102.1936650000145,32.68384400007945],[102.19375299987803,32.68368400005022],[102.19390900041195,32.683350000256105],[102.19407000007045,32.68299900013375],[102.19416899980463,32.68268300025017],[102.19429100000337,32.682493000265175],[102.1944049998062,32.68231699967175],[102.19452000033225,32.682141999798894],[102.19464900020367,32.68196600002596],[102.19477899990002,32.68179100022143],[102.19530899962945,32.681062999864444],[102.19587400041726,32.680421999694424],[102.19601900018222,32.6802599996746],[102.19616399994717,32.680101999941584],[102.19631600028315,32.6799549998433],[102.19650000040616,32.67983200003811],[102.19671299994317,32.679750999907895],[102.19693399987611,32.67970500022129],[102.19738800033589,32.679732999868996],[102.19780799956213,32.67981000017805],[102.19800599992887,32.67987100032665],[102.19869600039017,32.6797790002973],[102.19880699981992,32.679640999697504],[102.19889499968349,32.679474000335716],[102.19887200011726,32.679270000057834],[102.19881799969058,32.67910699987152],[102.19869600039017,32.678955000181254],[102.19854700042724,32.67879200017628],[102.19845600019063,32.67858900020406],[102.19843299972612,32.678366999859065],[102.1985020002214,32.67814600007452],[102.19862400042015,32.67793500030371],[102.19889499968349,32.67749500028914],[102.19904700001942,32.67727100027399],[102.19923799981515,32.677057000356015],[102.1994520000754,32.6768660001305],[102.19967999968104,32.67668999979072],[102.1999020003372,32.67652500019696],[102.20012300027012,32.6763600002984],[102.20085899986387,32.675823000127075],[102.20106499972819,32.67565799968803],[102.20121000039146,32.67551000020812],[102.20136299965404,32.67530900035829],[102.20176699988507,32.674884999741124],[102.2020649998109,32.674669000122435],[102.20223600041344,32.67445000030151],[102.20236600010976,32.67421300030471],[102.20244999977535,32.67395599993904],[102.20262499967754,32.67330299980028],[102.20264099957109,32.67304300011411],[102.2026640000356,32.67279700020305],[102.20270199967044,32.67256300010159],[102.20277799983842,32.67234200032529],[102.20287699957264,32.672136000304945],[102.20300700016729,32.671934999669475],[102.20315899960494,32.6717159999521],[102.20406400015139,32.67052399969852],[102.20420100041876,32.67034400021433],[102.2043379997878,32.670172999839195],[102.20447599988005,32.67000600016959],[102.2046199998201,32.669866000210604],[102.20478100037688,32.66974599996311],[102.20492600014184,32.66965499978774],[102.2050709999068,32.66957599965176],[102.20519999977823,32.669510000039814],[102.20532199997696,32.66945599977103],[102.20561999990281,32.66935400035066],[102.20573399970561,32.66931900031509],[102.20612000039331,32.66931599970648],[102.2063100003641,32.66943599977524],[102.2064319996645,32.66961900017474],[102.20649399958882,32.669847999692216],[102.20652399972604,32.67009499985123],[102.20656999975678,32.67033599969112],[102.2066690003893,32.67054999982928],[102.20679099968972,32.67072800028872],[102.20694399985058,32.67088500028493],[102.20712700014869,32.67101399990199],[102.20731000044681,32.671117999809304],[102.20771399977953,32.67126599975961],[102.20792399984181,32.671340000020905],[102.20816099966827,32.67141600032763],[102.20839699966983,32.671484999823825],[102.20864100006732,32.6715460003642],[102.20887000039619,32.671607000106725],[102.20908399975809,32.671697999806426],[102.20935099972179,32.67203900001713],[102.20946500042291,32.672390000107626],[102.20951899995127,32.67259799962253],[102.20955699958611,32.67281000031673],[102.20961000018787,32.673016000295306],[102.20967100028724,32.67319900016784],[102.20973200038661,32.67336599991862],[102.20979299958769,32.67351100021429],[102.20986999958055,32.67363299999909],[102.20996099981716,32.673747999804895],[102.21004899968072,32.67384200004906],[102.21013999991729,32.67393899989167],[102.21025500044334,32.674017999950735],[102.21037699974376,32.674098999986576],[102.21049899994249,32.674169999724214],[102.21062899963886,32.6742390001181],[102.21079699986832,32.67432899976271],[102.21092699956468,32.674389999873604],[102.21118600003076,32.674509999932944],[102.2113159997271,32.6745709999202],[102.21144600032177,32.674631999865845],[102.21274699980505,32.675240000034684],[102.21290699963859,32.67530900035829],[102.21308200043909,32.67535700005878],[102.21327300023482,32.67540800013772],[102.21369300035938,32.67534699996578],[102.21382999972839,32.67522999992859],[102.21394400042954,32.675085000154574],[102.21413500022524,32.67476700021722],[102.21421899989082,32.67460699980642],[102.2143069997544,32.674446000223774],[102.2145050001211,32.67412299978706],[102.21460399985533,32.673962999735124],[102.21471099998543,32.67379799964142],[102.21481800011557,32.67363500005616],[102.2153140004081,32.672872000367576],[102.21583300026687,32.672086000294456],[102.21592399960514,32.671991999715004],[102.21602300023766,32.67190800027198],[102.21613799986538,32.67183199962756],[102.21626799956174,32.671768000268514],[102.2163970003315,32.6717279997951],[102.2165310002258,32.6716999999068],[102.21681300025809,32.6716869996316],[102.21694999962713,32.671706999879724],[102.2170879997194,32.671745999934735],[102.21721699959082,32.67179100026791],[102.21733999961447,32.67185500036668],[102.21744599991966,32.67193100023533],[102.2175460003771,32.6720149996568],[102.2176369997154,32.67209699966396],[102.21772100027928,32.6721750001727],[102.21848399963721,32.6729080001822],[102.21860599983596,32.67302700030652],[102.2188350001648,32.67325100037728],[102.21893800009695,32.67336300020205],[102.21904900042504,32.67347000011285],[102.21915900002992,32.67357899995374],[102.21927399965766,32.67368600036199],[102.21937999996284,32.67379000018368],[102.2195020001616,32.67389500028797],[102.21964000025382,32.67397299998311],[102.21979199969151,32.674056999753134],[102.2199530002483,32.67401900035303],[102.22011300008185,32.67398100018064],[102.2202350002806,32.67388900013411],[102.22033400001479,32.67379000018368],[102.22044100014492,32.67320800008993],[102.22046399971113,32.67306300005867],[102.2204870001757,32.67291799979209],[102.2205170003129,32.67277300004633],[102.22057099984127,32.67262800006521],[102.22064700000924,32.67249100017975],[102.22074599974343,32.67236100000589],[102.22086799994217,32.67224199975071],[102.22100500020954,32.67213000003294],[102.221165999868,32.67203299973862],[102.22134099977019,32.67196199981496],[102.22153999996185,32.671902999654456],[102.22173400013057,32.67184699997876],[102.22192499992629,32.67178099977575],[102.22211599972199,32.67169700013428],[102.22229099962419,32.671590000368624],[102.22245100035607,32.67145800029033],[102.22259600012103,32.67130799979282],[102.2227340002133,32.671140000297726],[102.22298500028346,32.67079700031623],[102.22310699958386,32.6706309999846],[102.22322100028502,32.67047099972843],[102.22325200024717,32.67026299979883],[102.22340399968479,32.670131000028654],[102.22356500024159,32.67001699979517],[102.22375500021239,32.669940000119055],[102.22415600007038,32.669923000063775],[102.2243469998661,32.66997600035892],[102.2246139998298,32.669933000007696],[102.22476600016574,32.66980299989286],[102.22483499976273,32.66963999982474],[102.22484999983133,32.66947200021818],[102.22484999983133,32.66929900028864],[102.22483899996068,32.66889799987217],[102.22482700026511,32.66846300001799],[102.22485800022724,32.668289999647406],[102.22493400039525,32.66812999973645],[102.22507099976428,32.667992000046326],[102.22524700038969,32.6678910001819],[102.22542200029187,32.66779099991911],[102.22561300008756,32.667694999924585],[102.22580399988328,32.66759599991673],[102.22600999974762,32.667485999863395],[102.22620800011433,32.667358999887696],[102.22685699966944,32.6669219998964],[102.22706599990681,32.66674900032343],[102.2271200003335,32.666669999886885],[102.2272269995653,32.66652199988614],[102.22739399996988,32.6663089996643],[102.22760800023012,32.66613299970159],[102.22785199972927,32.66599100025237],[102.22811899969295,32.665891999869125],[102.22839400005257,32.665822999835065],[102.22866100001627,32.665770000101524],[102.22891999958405,32.665714000363224],[102.22916399998154,32.665645000191724],[102.22936999984584,32.665531000284886],[102.22951499961081,32.66537799968383],[102.22962199974091,32.66518700020185],[102.22971399980243,32.66498599981528],[102.22982799960525,32.6647960000011],[102.22998099976611,32.66463100037214],[102.23014899999559,32.664486000034195],[102.23033999979131,32.66436900014283],[102.230542000356,32.66427199974186],[102.23077099978654,32.66422599964747],[102.23105299981884,32.66425400036538],[102.23140400034643,32.664041000031574],[102.2315719996776,32.66392899986541],[102.23173999990712,32.663799000090755],[102.23188499967208,32.663656999957915],[102.23201400044182,32.663506999977365],[102.23212900006955,32.663343999768465],[102.23222799980374,32.663178999727435],[102.2323039999717,32.66300800000977],[102.23241100010185,32.66265700012151],[102.23243399966806,32.662521999622946],[102.23248700026981,32.662361999972376],[102.23261000029345,32.6621940002957],[102.2327540002335,32.66204899978519],[102.23298299966406,32.66183600024637],[102.23312800032734,32.66172900001669],[102.23332699962066,32.66166800033726],[102.23343299992585,32.661568999702816],[102.23357799969081,32.66121500008906],[102.2335559999495,32.66094099989969],[102.2335559999495,32.66068099978798],[102.23360899965294,32.6604370002285],[102.23374599992029,32.660220999715534],[102.23393699971602,32.66004499986394],[102.23416199984692,32.65990299981702],[102.23439899967339,32.65977800002044],[102.23463499967491,32.65965899964633],[102.23489499996592,32.65958299992828],[102.23544399996192,32.65961799999552],[102.2373279997764,32.660135999993756],[102.2375260001431,32.66022499967374],[102.2377019998702,32.66034199969604],[102.23784699963515,32.66049899978914],[102.23793799987175,32.66067699985013],[102.2379920002984,32.66085799969313],[102.23802999993326,32.661026000368466],[102.23809100003263,32.66119600030727],[102.23816700020059,32.66137200016128],[102.23829699989695,32.661528999957675],[102.23845699973052,32.661645999785605],[102.23864800042453,32.66175300011471],[102.23883900022027,32.661857000212805],[102.2390180003204,32.66193400004755],[102.23920900011609,32.66192899962813],[102.2394069995845,32.661895000247554],[102.239574999814,32.6617840002002],[102.23972700014994,32.6616590000091],[102.23988000031082,32.661528999957675],[102.24019300030528,32.661276999866324],[102.24035300013885,32.66116000031163],[102.24051299997244,32.661041000264866],[102.2406579997374,32.66092399964502],[102.24078800033205,32.66078900031015],[102.24089499956385,32.66064200019757],[102.24099400019634,32.660489000302036],[102.24107799986193,32.660330999635846],[102.24116200042585,32.66018400028255],[102.24126899965765,32.66003900029257],[102.24139800042741,32.6599040003774],[102.24153599962135,32.65978699978177],[102.24169600035323,32.659683000300184],[102.24186399968441,32.65959899987428],[102.24203899958658,32.65952799990294],[102.242215000212,32.65946899985183],[102.24239799961177,32.659428999923264],[102.2425890003058,32.659400999962564],[102.24309200027106,32.65939799977723],[102.24331300020398,32.65940599976711],[102.24374800039719,32.65951299975262],[102.24416799962343,32.659621999980715],[102.24461000038761,32.659566000171566],[102.24552199970844,32.659375000369394],[102.24592599993952,32.65927300003068],[102.2464680002628,32.659116000053075],[102.24728400022249,32.65887900022444],[102.24756700007971,32.658794999799284],[102.24785699960964,32.65871699971194],[102.24816200010649,32.658657999881854],[102.24832199994003,32.65866100009209],[102.24879499976805,32.65866999996581],[102.24908500019627,32.65874899991116],[102.24935200015996,32.6588609997618],[102.24958899998643,32.659015999803096],[102.24980200042178,32.65920700037237],[102.24999300021746,32.65941799975065],[102.25003900024824,32.659471000225935],[102.25017599961727,32.65962599996577],[102.25035200024267,32.659829999721126],[102.25052700014486,32.66000999996389],[102.25071799994059,32.66014499971897],[102.25104600000361,32.66037700022238],[102.25122099990581,32.66027500027084],[102.2513890001353,32.66013999995575],[102.25157200043341,32.65997000027736],[102.25177099972673,32.65977599965322],[102.25196099969753,32.65957800013363],[102.252128999927,32.65937200018313],[102.25244199992147,32.658960000370556],[102.25259500008235,32.658745999703875],[102.2527549999159,32.658543000319085],[102.25295300028263,32.6583670001887],[102.25318199971315,32.65823799970977],[102.25344100017927,32.658143999689145],[102.25371599964055,32.658060000085925],[102.25399100000016,32.6579759996474],[102.25424999956795,32.65789400029572],[102.25449399996542,32.657833000268006],[102.25472300029425,32.657869000091],[102.25496699979344,32.65790700030859],[102.25518100005368,32.6580319996964],[102.25557000021608,32.65829900021741],[102.25591300034779,32.6585350002519],[102.25614199977832,32.658707999842946],[102.25628700044157,32.658772000236304],[102.25645499977276,32.65872899978798],[102.25661499960633,32.658665000120095],[102.25674500020098,32.65856800033524],[102.2568439999352,32.65845100025979],[102.2571259999675,32.65809800022232],[102.25724099959521,32.65795600010758],[102.25735500029634,32.657799999913294],[102.25743899996192,32.65762499966222],[102.25748499999268,32.657441999659866],[102.25751599995482,32.65725400011458],[102.25754600009206,32.65706799984548],[102.25766800029079,32.65678800001175],[102.25769099985702,32.6566429998072],[102.25771400032154,32.656483000221336],[102.25773699988775,32.65632000006042],[102.2577600003523,32.65614699962947],[102.25778299991853,32.655971999924034],[102.25779799998712,32.65577099999091],[102.25778999959121,32.65548400014591],[102.25765300022216,32.65527799983678],[102.25756899965828,32.655055999809306],[102.25755399958965,32.654451000309024],[102.25763800015356,32.654221999911385],[102.25769900025294,32.65397300000894],[102.2577600003523,32.653725999915665],[102.2578659997592,32.65349000004336],[102.25828599988378,32.65281299988551],[102.25843900004466,32.65264499965797],[102.25865999997758,32.65252800015043],[102.25897999964474,32.65249799976721],[102.25969000019751,32.6522110000042],[102.25993399969666,32.652073999829426],[102.26013999956099,32.65189099980952],[102.2603229998591,32.65168500029782],[102.26048299969266,32.65146299966853],[102.26106299965082,32.650509999839706],[102.26120099974305,32.65027299988702],[102.26130700004829,32.65002600016142],[102.26139099971388,32.64976999974107],[102.26152100030853,32.64920999962284],[102.26177999987628,32.64808900027492],[102.26184099997565,32.64781100018575],[102.26190200007503,32.64753899964296],[102.26195599960337,32.647266999785636],[102.26200900020517,32.64699000011511],[102.26203199977138,32.64672000000378],[102.26200900020517,32.646452999697175],[102.26195599960337,32.646195999680295],[102.26187199993778,32.64596400019631],[102.26175700031007,32.64574299969778],[102.26165100000486,32.645544000147204],[102.26154399987475,32.64536099962239],[102.26145199981326,32.6452010002703],[102.26137599964525,32.64506100003507],[102.26129199997966,32.64486499964019],[102.26126199984243,32.64477899971729],[102.26124599994893,32.644666999623325],[102.26125400034483,32.6445679998287],[102.26130700004829,32.64446899992448],[102.26164299960894,32.644122999765266],[102.26201699970274,32.643795000254244],[102.26221500006949,32.64362199979462],[102.26243600000241,32.64345099973294],[102.26264199986673,32.643278000120866],[102.26284100005839,32.64310300019029],[102.2630390004251,32.64292499993556],[102.26372599961503,32.64213099972062],[102.26527100039408,32.64035599982543],[102.26543100022766,32.64016599985921],[102.26557599999262,32.6399670000034],[102.26569800019136,32.63975400005117],[102.26579699992554,32.63952999999817],[102.26585100035223,32.63929299969275],[102.26590400005568,32.63904900001176],[102.26595000008642,32.63880000022171],[102.2659960001172,32.638548000366455],[102.26604100032303,32.63829599980134],[102.26608700035379,32.63804500008777],[102.26610999992002,32.637851000305865],[102.26639199995232,32.63716499999581],[102.26649900008242,32.6369380000858],[102.26662899977877,32.636722000296416],[102.26678100011475,32.636509000182535],[102.26694900034423,32.636295000250044],[102.26714000013995,32.636084000016865],[102.26736100007287,32.63575300030843],[102.26747599970061,32.63554000015708],[102.26755199986857,32.63530299987204],[102.26758299983071,32.63504600034733],[102.2675669999372,32.63478699991463],[102.26750599983782,32.634283000337966],[102.26747599970061,32.63408200007061],[102.267392000035,32.633793000024056],[102.26730800036943,32.633509000296534],[102.26722399980554,32.63321899980979],[102.26716299970617,32.63292699968473],[102.26710900017777,32.63263400001087],[102.26717799977476,32.63233699968496],[102.26722399980554,32.6320539999907],[102.26729300030082,32.63160399986333],[102.26724700027005,32.6312860003252],[102.26720100023933,32.630971000039764],[102.26714799963754,32.630668000217426],[102.26709400010918,32.630383999649794],[102.26702600033713,32.630111999827434],[102.26693400027561,32.62985700004696],[102.26682700014548,32.62962099998246],[102.26670499994674,32.62940700021934],[102.26659100014392,32.62920400005242],[102.26650699958003,32.629002999724115],[102.26645300005168,32.62879699969838],[102.26642299991444,32.62859099995494],[102.26641500041683,32.62838499973731],[102.26642299991444,32.62799100002031],[102.26640799984581,32.62780000011119],[102.26636900038609,32.62761700035851],[102.26630099971571,32.627434000231716],[102.2662239997228,32.62726800033455],[102.26604499962266,32.62694000030705],[102.26595699975911,32.626787000247525],[102.2658620002229,32.62663399992645],[102.26578199985696,32.626489000008746],[102.26542700002969,32.62588199982251],[102.26486999963778,32.62488199970803],[102.26477099990359,32.62468400010195],[102.26470999980423,32.62453600020966],[102.26464100020723,32.62436099993432],[102.26458000010787,32.62420100009657],[102.26445100023645,32.623832000009145],[102.26439000013707,32.62364899970907],[102.2643290000377,32.623465999791456],[102.26409200021124,32.622773999858744],[102.26403100011187,32.622604000270286],[102.26399299957872,32.6224279997777],[102.26398500008109,32.62224499963362],[102.2640389996095,32.62150699996932],[102.26409200021124,32.62134700032628],[102.2641609998082,32.621157000094975],[102.26421400040998,32.6209659999777],[102.26444299984053,32.62018500029689],[102.26449600044228,32.61997099991392],[102.26454900014573,32.61975300027764],[102.2646100002451,32.61953099984568],[102.264687000238,32.61930300034224],[102.26477099990359,32.61907399999763],[102.2648780000337,32.61884199979131],[102.26500000023243,32.618606000190844],[102.26513699960147,32.618363999871114],[102.26527399986881,32.618127999767246],[102.26541899963377,32.61789100028081],[102.26555699972606,32.61766000031173],[102.26568599959747,32.61742300034305],[102.26580100012352,32.61718700002862],[102.26589999985771,32.61694499965648],[102.26597600002567,32.616701000326245],[102.26601399966053,32.61646400008892],[102.26602999955408,32.61622000020445],[102.26602200005645,32.615731999954],[102.26605200019368,32.614779999637044],[102.26605999969128,32.61456200022419],[102.26612099979063,32.61433999978378],[102.2662360003167,32.61411699999043],[102.26640299982297,32.6138980001584],[102.26657100005245,32.613681999996366],[102.26710099978186,32.61304100019294],[102.26726200033865,32.612827000137635],[102.2673989997077,32.612613999903544],[102.26750599983782,32.61240000034113],[102.26757500033312,32.61216600032624],[102.26760499957201,32.611913999626296],[102.26761299996794,32.61165500035396],[102.26757500033312,32.61138799983211],[102.26746800020298,32.610878999907996],[102.26735299967696,32.61033999997427],[102.26728499990487,32.61007300007194],[102.26724600044516,32.60981099968023],[102.26723899987414,32.60955400035637],[102.26725399994272,32.60929500031233],[102.26728499990487,32.60902000036601],[102.2673150000421,32.60873799997059],[102.26732300043803,32.608474999834776],[102.26732300043803,32.608203000029874],[102.26729999997352,32.60794100022132],[102.26724700027005,32.60743999972126],[102.26717799977476,32.60697500007553],[102.26712500007132,32.60674599998441],[102.26709800030716,32.60652500024349],[102.26708300023851,32.606303999957284],[102.26709800030716,32.60608000017905],[102.26716299970617,32.605853000129564],[102.2674909997692,32.605372999664105],[102.2676659996714,32.6052179997527],[102.2679259999624,32.60511299997761],[102.26814699989534,32.60499600036434],[102.26835299975966,32.60486900019076],[102.26853600005776,32.60473999975262],[102.26890199975566,32.60444999989621],[102.26906300031244,32.60431999994286],[102.26917700011526,32.60395900005513],[102.2692080000774,32.60371000026162],[102.26932199988022,32.60324399973346],[102.26938299997958,32.603076000267194],[102.26946699964518,32.60290799972908],[102.26957399977528,32.602748000148914],[102.26968799957811,32.60259600005609],[102.26981800017276,32.60244300001577],[102.27020700033519,32.602023000030975],[102.27035200010016,32.60189400003497],[102.2705119999337,32.60178699999708],[102.2706869998359,32.60169999984375],[102.27088600002755,32.601626999928264],[102.27112200002911,32.601573000294636],[102.27167900042102,32.60159400002988],[102.2719539998823,32.60166499981915],[102.27218999988385,32.60177900015174],[102.2724040001441,32.60190100017443],[102.27261000000843,32.601993000118895],[102.27283500013934,32.60204899964393],[102.27305600007226,32.602102000054124],[102.2732700003325,32.60204899964393],[102.27348399969445,32.602010999916],[102.27368999955878,32.60198500029195],[102.27411700025432,32.602010999916],[102.27460500015097,32.60210999987061],[102.27481900041123,32.602193999792156],[102.27505500041275,32.60230899989938],[102.27525399970607,32.60236499998373],[102.27584899973283,32.60252500024794],[102.27604700009952,32.60247900018231],[102.27623000039763,32.602438999744116],[102.27661899966178,32.60243399978268],[102.27679500028717,32.60251000037719],[102.27708499981708,32.60270099975444],[102.27722200008442,32.60279199994849],[102.27736299965144,32.60287899979803],[102.27763800001105,32.60305099987825],[102.27795000018058,32.60321200011172],[102.27840799993997,32.60316099972121],[102.27859100023808,32.60307400014553],[102.27879000042972,32.60301599962471],[102.2792249997246,32.603005999765955],[102.2794309995889,32.60304599995098],[102.27962099955971,32.60310700025547],[102.27980399985782,32.603183999960265],[102.28016299988303,32.60329299995989],[102.28033799978519,32.6032450001708],[102.28050600001468,32.603190999998915],[102.28065499997759,32.60311000005851],[102.28077700017633,32.60300099983616],[102.28085300034432,32.602858000364],[102.28091500026859,32.60270599970098],[102.28097600036797,32.602545000071665],[102.28115899976774,32.60207200016849],[102.28119700030089,32.601904000017846],[102.28121999986712,32.601736000308875],[102.28121200036952,32.601566000129544],[102.28115899976774,32.60139299976717],[102.28049099994605,32.59992500027727],[102.28037700014326,32.5997400001108],[102.28026300034044,32.599558999962746],[102.2801560002103,32.59938900019316],[102.28010199978365,32.599025000171494],[102.28019399984517,32.598869999871326],[102.2803460001811,32.59874800026182],[102.28055200004542,32.59867200025983],[102.28078499967394,32.598627999950445],[102.28100599960688,32.59859499970419],[102.28121999986712,32.59857000033512],[102.28143400012736,32.59854399971251],[102.28163999999168,32.59852200028584],[102.2818380003584,32.598483000085004],[102.28202900015413,32.598417000230285],[102.28220400005631,32.598331000323746],[102.28236399988987,32.59821100021068],[102.28250199998214,32.59806400019366],[102.28260900011225,32.59789600009508],[102.28269299977784,32.5977129997644],[102.28276100044822,32.597514000122075],[102.28282199964926,32.59729600030698],[102.28288299974864,32.59706699969045],[102.28293700017532,32.59683800000228],[102.28294399984799,32.59660100017804],[102.2829289997794,32.59637299981299],[102.28290600021317,32.59614099982853],[102.2828519997865,32.59591599985051],[102.28280699958067,32.59569499988041],[102.2827680001209,32.595468999772],[102.28277599961852,32.59524699968648],[102.28279900008303,32.59503899964598],[102.28287500025104,32.59484099989384],[102.28297399998523,32.59465999968797],[102.28312700014611,32.594512000121895],[102.28328699997971,32.59439299997129],[102.28347799977539,32.59430600020638],[102.2836760001421,32.5942400003023],[102.2840200000987,32.5941619999402],[102.28422199976505,32.59413399998767],[102.28445799976662,32.5941640002608],[102.285251999985,32.594289000155506],[102.28526700005362,32.5940929998252],[102.28485500032497,32.592513999841344],[102.28392800003719,32.589358999929374],[102.28312700014611,32.58632000028105],[102.28298200038115,32.585624999802235],[102.28250600018009,32.58338500026213],[102.28247100001997,32.583230000159624],[102.28248699991352,32.58013799962597],[102.28305099997813,32.57659399973822],[102.28414999979503,32.57385000032533],[102.285512000276,32.570985999999024],[102.28625899974041,32.56827899968342],[102.28668700026088,32.564508000238305],[102.28683899969853,32.560902000139414],[102.2869149998665,32.557298000113995],[102.28699900043043,32.55409200025782],[102.28715178230065,32.551295997147385],[102.28715199969295,32.551296000176166],[102.31263499983775,32.55170100002052],[102.32569000026616,32.55423200036816],[102.33633600027531,32.55002999995071],[102.35180100004966,32.55929099993555],[102.35705199963503,32.55941200007522],[102.36237500008873,32.55731000015761],[102.3679119999044,32.548537000236436],[102.36841099967168,32.532971999854226],[102.37117900011619,32.52858500034519],[102.37649900019687,32.526481999885426],[102.37664099958879,32.52203499977099],[102.3901880001118,32.50899400028102],[102.39033000040202,32.50454700000259],[102.3930949995752,32.50016000003495],[102.39834199986095,32.50028000022538],[102.40387100017895,32.491505000238035],[102.41436599967702,32.49174299973333],[102.4247199996081,32.496427000376336],[102.43521500000446,32.49666300026659],[102.43769999969348,32.50116900005221],[102.44287800038224,32.50350999980345],[102.44536399989613,32.50801599970725],[102.44446400027086,32.53692200021069],[102.44964399971111,32.5392630002809],[102.46539499971574,32.53961299965333],[102.47057699970415,32.54195299963648],[102.49420399962354,32.542473999955654],[102.50201199976627,32.54486999999856],[102.50712699980751,32.54943099966222],[102.50699200008827,32.55387899974675],[102.51210799995447,32.55844099990557],[102.52517000005561,32.56094899973837],[102.53022099962445,32.56773399968553],[102.53540599998588,32.57007100000381],[102.5352720000916,32.57451799970661],[102.53776500017648,32.579022000176906],[102.55049800038965,32.5926469996716],[102.55542099991197,32.60387800005239],[102.56047700040199,32.610661999676225],[102.56027800021039,32.617333000161864],[102.56027895062795,32.61733342766429],[102.56027800021039,32.61733399968518],[102.54956799972884,32.62377999980486],[102.54417900005122,32.62811500021045],[102.54141700035278,32.632506999699224],[102.53609399989905,32.63461699969325],[102.53333200020062,32.639007999987705],[102.52800799992201,32.641119000235484],[102.52787400002771,32.64556700008753],[102.52254999974909,32.64767699989939],[102.51688800025997,32.66090600035049],[102.51634900030972,32.678697999847955],[102.52133899977918,32.68770699989537],[102.53172399967237,32.69238299991795],[102.53685100030751,32.69694399993735],[102.53408700006094,32.70133500015274],[102.52606100035835,32.705612999656935],[102.49449599970158,32.70492700012934],[102.49172899998031,32.70931699984443],[102.49091100037077,32.73600500000966],[102.49833000035107,32.75174599970841],[102.49798999969413,32.762866999710646],[102.50291499976458,32.77410200011542],[102.50271100044839,32.78077400017752],[102.49730900035196,32.78510800002185],[102.49454000008251,32.78949899989414],[102.48920499993324,32.79160800013374],[102.48643599966381,32.79599800025064],[102.4861620000274,32.804895000344786],[102.48865900031028,32.80940100020301],[102.49324500044703,32.8317579998922],[102.48479399969868,32.849378999771204],[102.47938699957939,32.85371199981261],[102.47113699957079,32.86465900021846],[102.4708620001095,32.873556000063495],[102.46808799981719,32.87794699971629],[102.46684699971004,32.91798499996286]]],"type":"Polygon"},"properties":{"code":"513233200","name":"安曲乡","cp":[102.33517275101616,32.71285091143605]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.91208688040663,33.29473401130976],[102.93973596034823,33.29410500063117],[102.94613784015311,33.29589204067135],[102.97857599967278,33.29645598117515],[102.98839608142315,33.30056799082406],[102.99783600063687,33.29670699114722],[103.00667184055123,33.301416960954604],[103.01442588069148,33.302910961157224],[103.02151392065984,33.30084303069479],[103.02466787957121,33.298184971138085],[103.04500283963858,33.29981397095593],[103.06439892009686,33.296916962218894],[103.07459592056739,33.28236099120048],[103.08437496008906,33.28064604124367],[103.09037615983621,33.27231096083713],[103.09331411973588,33.27235704116285],[103.09237416035181,33.270543001084626],[103.09354092009059,33.26758002213691],[103.08943800067595,33.26479101072386],[103.09239396011895,33.26118804111807],[103.08688487994236,33.261100021030316],[103.08839004043855,33.25947903090403],[103.09410612030443,33.25849002212428],[103.09785804008973,33.254847001203125],[103.10152059893372,33.25579693378715],[103.0992600003295,33.2518040003548],[103.09430400029689,33.24747300025029],[103.0945029995902,33.23897799981439],[103.09975599972371,33.23056600033684],[103.09995400009045,33.22207099988567],[103.09752700012776,33.21778200031209],[103.09762599986198,33.21353499972114],[103.09034499997396,33.200666999812604],[103.0853930001393,33.19633600036264],[103.08549299969843,33.19208799976918],[103.08306699956069,33.18779899989373],[103.08386599980193,33.1538199996784],[103.08144200021229,33.149530999624716],[103.08159200000013,33.14316000022164],[103.0791680004105,33.13887100028469],[103.07416899982188,33.13666300005934],[103.05937900044023,33.12154299971651],[103.02152499958221,33.1208989999286],[103.0065910002605,33.112142999992955],[103.0066950000176,33.107895999916586],[103.0017520004038,33.10356199991007],[103.00201299962139,33.09294400025379],[102.99454900033358,33.08856600005777],[102.98466900005542,33.079895000115926],[102.9822510003136,33.075603999852284],[102.97726000012088,33.07339199968166],[102.95257200001943,33.05171199968297],[102.95267900014954,33.04746500002439],[102.94066200033699,33.02388200033576],[102.94109099978404,33.006895999764474],[102.93867800006507,33.00260399968482],[102.93369199989525,33.000390000109995],[102.92613200034796,33.00025400004388],[102.92372100027882,32.995962000033764],[102.91364199980904,32.99577899967564],[102.90641000032484,32.982901999941625],[102.90706300007793,32.957422999796485],[102.8822090002951,32.94422199967649],[102.87252446264299,32.92917471967159],[102.87252400001061,32.929175000157706],[102.86228700025542,32.93535599964521],[102.8621750001024,32.939602999870814],[102.85708400035061,32.94163199975679],[102.85445399999834,32.94583199967179],[102.85434299967025,32.95007799999631],[102.84656399983989,32.95842900007515],[102.84124700013224,32.96895099963013],[102.84113400015437,32.97319700006989],[102.84354100002554,32.97749100007461],[102.84275500020308,33.007216999843614],[102.8451629998992,33.01151000031955],[102.84364800015568,33.06883999999917],[102.8460020003234,33.07525800023619],[102.85581099955813,33.08606299998923],[102.85564300022695,33.092433999881116],[102.86057699961991,33.096775000366634],[102.86298900041228,33.101068000320424],[102.86797899988177,33.10328500011545],[102.86764599979583,33.116025999663535],[102.8599640000498,33.120132999826325],[102.85732899967469,33.124333000252676],[102.8521700001508,33.12848499996107],[102.85161000028415,33.14972099999572],[102.8540220001782,33.154015000316036],[102.85626699966768,33.16467900018266],[102.86126100023343,33.16689700025913],[102.86103799975237,33.17539100002308],[102.85593199993194,33.17742100036876],[102.85329499990698,33.18162100005889],[102.8531269996775,33.18799199964272],[102.88052200012413,33.20337099970739],[102.8854630000881,33.2077120001137],[102.88787900018013,33.212005000113436],[102.8869979999231,33.24598399976756],[102.89194200026014,33.250323999964934],[102.89183199975696,33.254570999815854],[102.89677799974383,33.258911000222284],[102.90128600006277,33.28023999993852],[102.9062880001261,33.282456000159556],[102.90788596578716,33.29672994968289],[102.91208688040663,33.29473401130976]]],"type":"Polygon"},"properties":{"code":"513233207","name":"麦洼乡","cp":[102.940261,33.118079]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[103.12112800010789,33.272119000275914],[103.11971700012147,33.272461999727845],[103.11810699994338,33.27172999995895],[103.11649699976532,33.271337999656964],[103.11387300015916,33.272187000329104],[103.11387085498225,33.27218840405619],[103.10411699972958,33.260383000292826],[103.0992600003295,33.2518040003548],[103.09430400029689,33.24747300025029],[103.0945029995902,33.23897799981439],[103.09975599972371,33.23056600033684],[103.09995400009045,33.22207099988567],[103.09752700012776,33.21778200031209],[103.09762599986198,33.21353499972114],[103.09034499997396,33.200666999812604],[103.0853930001393,33.19633600036264],[103.08549299969843,33.19208799976918],[103.08306699956069,33.18779899989373],[103.08386599980193,33.1538199996784],[103.08144200021229,33.149530999624716],[103.08159200000013,33.14316000022164],[103.0791680004105,33.13887100028469],[103.07416899982188,33.13666300005934],[103.05937900044023,33.12154299971651],[103.02152499958221,33.1208989999286],[103.0065910002605,33.112142999992955],[103.0066950000176,33.107895999916586],[103.0017520004038,33.10356199991007],[103.00201299962139,33.09294400025379],[102.99454900033358,33.08856600005777],[102.98466900005542,33.079895000115926],[102.9822510003136,33.075603999852284],[102.97726000012088,33.07339199968166],[102.95257200001943,33.05171199968297],[102.95267900014954,33.04746500002439],[102.94066200033699,33.02388200033576],[102.94109099978404,33.006895999764474],[102.93867800006507,33.00260399968482],[102.93369199989525,33.000390000109995],[102.92613200034796,33.00025400004388],[102.92372100027882,32.995962000033764],[102.91364199980904,32.99577899967564],[102.90641000032484,32.982901999941625],[102.90706300007793,32.957422999796485],[102.8822090002951,32.94422199967649],[102.87252446264299,32.92917471967159],[102.87252400001061,32.929174000360575],[102.87268999969199,32.922805000162526],[102.87794500037361,32.91440499992099],[102.88817799993086,32.9082209998156],[102.89080499991009,32.90402100014107],[102.89151700011269,32.876421000286044],[102.89665899991813,32.8722670001583],[102.89687700037635,32.863774999764466],[102.90212600031191,32.855375000348026],[102.90223500009185,32.85112900019995],[102.90737400042255,32.84697500021379],[102.91535300026946,32.830127999905166],[102.93081600039399,32.81554000004758],[102.93092400034904,32.811294000149715],[102.93600500005512,32.809261999756984],[102.94606100006033,32.809441999717336],[102.95003499955357,32.81202099974449],[102.95003688960892,32.812022227361034],[102.95077199987054,32.813665999724186],[102.95246099969135,32.81580599987548],[102.95435399972665,32.81760400015349],[102.95671899976502,32.81927699980543],[102.95921000020012,32.820778000221594],[102.96055599988922,32.82240700020189],[102.96109800021253,32.823697000067305],[102.96182700013358,32.82540599985301],[102.96351299958133,32.827089000204246],[102.96553500038637,32.828246000145434],[102.96685900033417,32.82936999983421],[102.96771700012665,32.83072600005403],[102.96809100022044,32.83197699972396],[102.9678769999602,32.83338100004192],[102.96780900018814,32.83381599986146],[102.96691200003762,32.835614000156504],[102.9667139996709,32.836010999817866],[102.96561099965601,32.83774499998743],[102.96537499965447,32.838956000238994],[102.96534399969235,32.84027200017089],[102.96584699965757,32.84145999992396],[102.96657599957864,32.84288400004804],[102.967778000226,32.84434899997535],[102.96907100021167,32.846385999873405],[102.96958599987248,32.847697999983346],[102.96949499963588,32.84913199985729],[102.96897999997509,32.850283999655396],[102.96800699965657,32.851851000169134],[102.96725099997134,32.85397999979227],[102.96713700016852,32.85696399988587],[102.9674119996298,32.85912899985806],[102.96828500038922,32.86106200005941],[102.96998699973048,32.86309399989924],[102.97200100013961,32.86460199966886],[102.9732330000259,32.86626499977328],[102.97381600035709,32.86751700002693],[102.97406800025215,32.86900199964212],[102.97382399985467,32.87009499999824],[102.97379399971744,32.871181000316106],[102.97428900018508,32.871976999663964],[102.97559399986633,32.872238999912604],[102.97713899974708,32.871580999892124],[102.97842099986208,32.87103900014951],[102.9800419999108,32.87077700012727],[102.98182699999104,32.87120699999251],[102.98485599965318,32.87217800020894],[102.98762999994547,32.87335399995172],[102.99044100004771,32.873988999783194],[102.99302399964601,32.87371499962607],[102.99571300044781,32.872572999895965],[102.99814700008318,32.8713750002717],[102.99868400038362,32.87104700000553],[103.00005799966182,32.87003299986356],[103.00122099995114,32.8691630000216],[103.00312099965913,32.866780000066306],[103.0047679996471,32.86452000024356],[103.00561200009422,32.86324399976677],[103.00676699998759,32.86081500022321],[103.00821700033211,32.859242999654974],[103.01004800044312,32.858982000082406],[103.01224600007693,32.85919599998813],[103.01458400035115,32.8596690003],[103.01733400035401,32.86058699999608],[103.01990899955638,32.86243299978484],[103.02173299999468,32.86405799996645],[103.0231399997832,32.86542200031551],[103.02497900029009,32.86767299989042],[103.02696699986163,32.8700990003462],[103.02895000030858,32.872014000203905],[103.03110899958433,32.87374399982871],[103.0325549997309,32.87423399981514],[103.03363400035464,32.873985000365266],[103.03561000023059,32.87321999990749],[103.03682299985033,32.87279799969495],[103.03791800036757,32.872834000213395],[103.03902100038245,32.87326899978953],[103.04097399979388,32.87495000014183],[103.04189699988369,32.87613699991314],[103.04233600027484,32.87761500036862],[103.04224400021333,32.87905199977513],[103.04306400037096,32.881155000013834],[103.04498300034555,32.884031999717514],[103.04718000015446,32.8867960001568],[103.04876699986796,32.88885099989974],[103.05081999973686,32.89149499988623],[103.05180399992602,32.892680000174806],[103.05307500017038,32.89403099963883],[103.05453899986026,32.89531999982399],[103.0557110003704,32.89569600015495],[103.05707200012814,32.895554000041],[103.05867800010826,32.894831999871116],[103.0607490004188,32.89458899982867],[103.06293100015905,32.894780000039134],[103.06527399955782,32.89564199972413],[103.0667280001003,32.8966989998265],[103.06869599958033,32.89866199974025],[103.07105700031909,32.90004599963223],[103.0729520000042,32.900505999908646],[103.07445199967911,32.900476000045444],[103.07609600019234,32.900897999701485],[103.07706500031294,32.901390999975405],[103.07824399959748,32.902506999895316],[103.0793729995516,32.90408900036272],[103.08035300044115,32.904810999739084],[103.08137500026514,32.905017000075766],[103.08265300018219,32.90453399962558],[103.08372199986188,32.90393599997921],[103.08527400031365,32.90344300029728],[103.08666299966045,32.903506999860284],[103.08831499967133,32.90421100029667],[103.08923799976112,32.90545500025331],[103.08984000035889,32.907325999691956],[103.09008100038331,32.9083609999183],[103.09079799971046,32.90960499964059],[103.09190400009841,32.91031999997181],[103.0936930003766,32.91102899979502],[103.09512799975418,32.911280999972725],[103.09709199993459,32.91095300035479],[103.09893899993911,32.909804000024764],[103.10050999975913,32.90771600013755],[103.10171499988125,32.90499199982978],[103.10277600006332,32.901989000214876],[103.10391599988813,32.89933800024443],[103.10575500039504,32.897345000057925],[103.10766199977573,32.89530100018216],[103.10986000030788,32.89410400020007],[103.11223299984385,32.892836000260026],[103.1155670000028,32.890926000317606],[103.11844300040237,32.88930899973474],[103.12089200010635,32.887254000053126],[103.1224589997284,32.88543900026674],[103.12275699965423,32.88426600032813],[103.12293999995234,32.88354799994338],[103.12275699965423,32.882604999791205],[103.12236800039013,32.880631000144234],[103.12159000006525,32.87732500001638],[103.12112499973485,32.87528500012543],[103.12152899996588,32.873045000107886],[103.12276500005014,32.87140700032473],[103.12287999967788,32.87123799965481],[103.12494699979044,32.869643000261526],[103.12501899976047,32.86961799984166],[103.12803300025227,32.86859299994578],[103.13228999960275,32.86809199964521],[103.13561299989102,32.86813299997947],[103.13852399955239,32.868064000344575],[103.14154899991485,32.86736000014848],[103.14543600026775,32.86594600029525],[103.15046799957003,32.86390000022097],[103.15443500028888,32.863114999986536],[103.1568570002287,32.86259799994942],[103.15929500006204,32.862479000204566],[103.16120200034102,32.8624619999046],[103.16260199955848,32.86167800032934],[103.16303699975165,32.860462999970714],[103.16229000028726,32.85808500014605],[103.16204500006488,32.85465500014676],[103.16239599969416,32.851148000254554],[103.1627930002525,32.848561000149914],[103.16320499998116,32.84654399987043],[103.1640100000702,32.84446599989121],[103.16532999982005,32.84328599971115],[103.16695800043978,32.84330299991209],[103.1687279995531,32.84360099988706],[103.17035000032504,32.84339000013483],[103.1718180002129,32.84289900029343],[103.1726120004313,32.84224800014024],[103.17295499966463,32.84146300002132],[103.17306900036579,32.84071499976377],[103.1737899998909,32.84000599964611],[103.17486600014159,32.83969799990971],[103.17662399955935,32.83970799967774],[103.1788220000915,32.84062899997994],[103.18025999984211,32.84122100013943],[103.18228500012187,32.84094099965854],[103.18441800035669,32.8394059999961],[103.18742799975222,32.83758399994895],[103.18936599999334,32.836617999624764],[103.19069800033708,32.835897999705224],[103.19129300036383,32.83542699968388],[103.19392000034304,32.833341000376635],[103.1940500000394,32.83323999987731],[103.19695300020311,32.83099100030408],[103.19893300027704,32.82918199962787],[103.20078699995427,32.82776200013399],[103.20257700005739,32.82645300037418],[103.2045139995753,32.82537399981499],[103.20650899971785,32.8243519997564],[103.20822600002604,32.82425799967609],[103.20846600022554,32.824244999753475],[103.21116699982461,32.825061999784005],[103.2146879995813,32.827264000076546],[103.21728199994855,32.82978199968155],[103.21930800005326,32.83157000021245],[103.2200019998142,32.83217999984388],[103.22101699996554,32.83334500011753],[103.22203899978952,32.83452599970866],[103.22273699974845,32.83546900011901],[103.2234809997381,32.8364569998068],[103.22490799961808,32.838654000263354],[103.22615899977096,32.841490000138826],[103.22712000039394,32.84392899976148],[103.22799699955466,32.84614199986984],[103.22922599996623,32.8484539998872],[103.23014099966011,32.84946600007518],[103.23152999990525,32.850463000322826],[103.23372699971415,32.851212999775065],[103.23544400002234,32.851701999819376],[103.23748799967038,32.852272999690534],[103.24075400005727,32.852480999728336],[103.24354599989293,32.852705000036394],[103.24656299985946,32.853775999825],[103.24788699980729,32.85415700001642],[103.24930299981659,32.8545690002876],[103.25002400024003,32.8546100000817],[103.25283899964191,32.85477000029329],[103.25594000017237,32.85418499993426],[103.25893899969726,32.85451299993082],[103.26096399997702,32.85619199991869],[103.26326500044134,32.85797200021659],[103.26541200002151,32.859119000014516],[103.26782300009066,32.86021000029409],[103.27051600019212,32.861410000213354],[103.27051683113376,32.86141076006723],[103.27283600002467,32.86353400014959],[103.27450999977684,32.865663000081625],[103.27559000022548,32.86736000014848],[103.27722299996977,32.86950099989533],[103.27943099964932,32.870423999719726],[103.28279599977043,32.87148400019276],[103.2860179997764,32.872714999869146],[103.28959999963246,32.87401199963948],[103.29275100039163,32.87462500000634],[103.29461699976441,32.875616999900735],[103.29547899975488,32.87697000001066],[103.29547958635476,32.87697358963336],[103.29582199988654,32.879070000275156],[103.29494499982748,32.881271999668186],[103.2940100000421,32.88387099993798],[103.29322400021965,32.88669899975639],[103.29254499962899,32.88877200027843],[103.29285900034667,32.89037000015614],[103.29359900013839,32.892187999905396],[103.29408299983706,32.894467000217126],[103.29386899957679,32.896133000251425],[103.2924240001535,32.89759800011278],[103.29036399971362,32.89913600006529],[103.2893489995623,32.90133300030748],[103.28840700010423,32.90364100011533],[103.28784999971232,32.90537300015761],[103.28790300031406,32.907032999903656],[103.28776600004673,32.90852199968733],[103.28741500041745,32.910022000220245],[103.28637299960363,32.91153600017645],[103.28548800004698,32.91266200027547],[103.28495499994447,32.913472999917424],[103.28444000028371,32.91428199973979],[103.28386000032555,32.915444000149684],[103.28347799983582,32.91625799977201],[103.28366100013392,32.916423000026214],[103.28326100010084,32.91670600027612],[103.28314999977276,32.9175069997743],[103.28323400033665,32.91877600005164],[103.28324900040528,32.91899699975669],[103.2834479996986,32.92115000001522],[103.2834710001631,32.922190000115464],[103.28343299962998,32.92327900018062],[103.28305100003857,32.92437699983282],[103.2825969995788,32.92529799986808],[103.2819260002824,32.925768000007615],[103.28147600002058,32.92668700023979],[103.28149100008919,32.927783000199554],[103.28172000041806,32.928698999698256],[103.2816740003873,32.9297289998719],[103.28116999969883,32.93134299968235],[103.28101400006322,32.931920999811744],[103.28073600022887,32.93295299967794],[103.2808580004276,32.9349500001305],[103.28091100013106,32.937017999661876],[103.28088099999383,32.937220999806215],[103.28062099970285,32.93897099979577],[103.28004499994266,32.94104200003743],[103.27940399988516,32.94260400034122],[103.27870199972826,32.94461499997904],[103.27780600030096,32.9468070003706],[103.27708900007546,32.94802599996503],[103.27705800011333,32.949686000175106],[103.27682899978448,32.95153300029058],[103.27694400031051,32.953412000076575],[103.27745499977338,32.954782000197916],[103.27816100012818,32.955854999777735],[103.27885499988916,32.95646799968411],[103.27947300038045,32.95663399980141],[103.28104099982741,32.95661100029873],[103.28274600044001,32.95687299965422],[103.28363799966938,32.957308000234804],[103.2841380001599,32.957992000040065],[103.28422199982548,32.95872499990961],[103.28376400006609,32.95953600012609],[103.28316499984136,32.960011999666],[103.28241800037695,32.96018499980406],[103.28152899972403,32.96009300017801],[103.2810480003984,32.95992299971575],[103.2804990004024,32.95970599982545],[103.27989199978178,32.95988999978761],[103.27983900007833,32.96057399995792],[103.27965599978023,32.96149899988652],[103.27906800032447,32.96236699974105],[103.27840499962737,32.96290099990938],[103.27801600036322,32.963586999705505],[103.27796199993658,32.96427900037465],[103.27860299999406,32.96523499987169],[103.28027000007356,32.96653700018689],[103.28171600022009,32.96742200003968],[103.28283000010562,32.968267000251636],[103.28347500036108,32.96945899973406],[103.28403199985469,32.970194000359356],[103.28485500038539,32.970864000286554],[103.28540100000835,32.971699000033524],[103.2855759999105,32.97220700015919],[103.28583600020151,32.972956999854475],[103.28690800025424,32.97482899976248],[103.28802899981245,32.976248000305716],[103.28908599979657,32.977533000244996],[103.2903479998201,32.9792300002162],[103.2918779996322,32.98047300020802],[103.29298400002014,32.98131000020418],[103.29436900006729,32.98209799990015],[103.29554800025018,32.98293500031549],[103.29618099991174,32.98371399966741],[103.29627299997325,32.98475200021908],[103.29592900001668,32.98524500035415],[103.2968179997713,32.98590899966349],[103.29736699976729,32.98607400031039],[103.2983099999486,32.986371000094714],[103.29868300021751,32.98733699975893],[103.29865300008026,32.98843100000605],[103.29895799967879,32.98939699973074],[103.29983999976072,32.98977799964927],[103.30079700018572,32.989702000071745],[103.30133799978579,32.98934100024287],[103.30193399963747,32.988759000098035],[103.3024709999379,32.98863099996825],[103.30315800002616,32.98878699965429],[103.30393299997796,32.9898010003116],[103.3036119995876,32.990439999804714],[103.3027460002975,32.99103200018384],[103.30257800006802,32.992067000306335],[103.3030900002541,32.9933160000843],[103.30566100015682,32.994748000129995],[103.30616400012204,32.99542400015488],[103.3072289996038,32.99677000026856],[103.30766299997205,32.99761899976375],[103.30910499992063,32.99915599965374],[103.31101700022248,32.99976000036677],[103.31257700017186,32.99997900003419],[103.31644100006021,32.99947799977757],[103.31962299988322,32.99889000010637],[103.32247199962028,32.998251999787215],[103.32505900031485,32.99765299968522],[103.3278360000819,32.99707999965733],[103.32975400023153,32.99738099994655],[103.33141399974001,32.998202000016],[103.33178399963585,33.000008000300326],[103.33179100020686,33.00004299980342],[103.33182200016898,33.00019799991141],[103.33189800033699,33.0003920003531],[103.33210400020133,33.00197600013788],[103.33218100019418,33.002478000244594],[103.33238700005852,33.00434200034061],[103.33319899982025,33.00563700024571],[103.33421800016953,33.007381000158276],[103.3357999998602,33.009888000214325],[103.33755099960528,33.01226100015518],[103.33970300010665,33.01473399998899],[103.34159199994397,33.016706999751825],[103.34200000037298,33.018283999750906],[103.34146999974523,33.0190769998768],[103.34039000019489,33.01947399966559],[103.33932200034013,33.01969999979415],[103.33730799993101,33.01998300003134],[103.33583099982235,33.0206590002535],[103.33467599992893,33.021534000246795],[103.33414200000153,33.02238099965653],[103.33408099990217,33.023678000264454],[103.33455399973019,33.02531099988193],[103.33503099975619,33.0264449998032],[103.33547199979714,33.02849300026636],[103.33674999971419,33.030410000358046],[103.3376309999712,33.032497999907136],[103.33770799996411,33.034368000219416],[103.33798199960047,33.036059000001686],[103.33799099982133,33.039433999712934],[103.33753300006191,33.041918999629374],[103.33793700029297,33.04405999994687],[103.33828000042465,33.0460829996306],[103.33876499994822,33.048061999915056],[103.33937500004359,33.05121999978849],[103.34060699992986,33.054822000141314],[103.34169400005123,33.05769799968028],[103.3426439999052,33.06085300008388],[103.34346099968981,33.0640139997436],[103.34454799981117,33.06711400032125],[103.34523099970147,33.07039000007649],[103.34524499994515,33.072360000357406],[103.344993999875,33.0755220003622],[103.34459800003988,33.07855700020561],[103.34433399955093,33.080477000003164],[103.34407499998315,33.083127000269414],[103.34406699958723,33.08337400013174],[103.34401800008172,33.08522499988816],[103.34401399988377,33.085383000060034],[103.34406699958723,33.08665500016193],[103.34409000005175,33.08718899978745],[103.34409800044766,33.08831999997803],[103.34412799968659,33.089420000010314],[103.34318200003055,33.08975999969935],[103.34114500005523,33.09045999970062],[103.33944799983851,33.090986000029666],[103.3377499997969,33.091973000131446],[103.33598800018119,33.09323900005576],[103.3344049997673,33.09419099997668],[103.33257000035663,33.09488999989259],[103.33073099984969,33.095527999669194],[103.32910200030338,33.09588400022832],[103.32863699997294,33.096204999671826],[103.3283159995826,33.09632199983867],[103.32743500022389,33.09716099968873],[103.3262109998352,33.09822200030279],[103.32446000009013,33.099051000279154],[103.32254500031355,33.09979699965614],[103.32200299999023,33.10097500005076],[103.32178200005731,33.10260500019335],[103.32176699998868,33.10418599969594],[103.32128199956679,33.10547799979801],[103.32033599991074,33.106372999937726],[103.31878699983206,33.106981000189286],[103.31689899981964,33.107474999882584],[103.31481199961557,33.10779499985286],[103.31386299958649,33.10839999997462],[103.31332100016152,33.10963299999492],[103.31276799996755,33.11076000037242],[103.3105400001965,33.111924999989526],[103.30772499989632,33.11299599964931],[103.30590499965595,33.11348900016809],[103.30488600020502,33.114266999767764],[103.30540900026172,33.11550899970137],[103.30579800042416,33.1163019999867],[103.30546199996517,33.11714399996476],[103.30384099991645,33.117808000048946],[103.30228799963979,33.11819199970129],[103.30094199995068,33.1184049996486],[103.2999920000967,33.11930099966554],[103.29883600037837,33.120589999783796],[103.29732099973653,33.1213220000879],[103.29617699971378,33.12171399990879],[103.29563100009085,33.122720999720734],[103.29487600023053,33.12424200022204],[103.29359099974246,33.12507299962939],[103.29231299982541,33.125460000107736],[103.29117200017569,33.12539099978002],[103.28995899965766,33.12549799965456],[103.28901700019959,33.12582300005589],[103.2877350000846,33.12688700007209],[103.28631200040257,33.12760900023604],[103.28486700008096,33.127896000349494],[103.28244400031625,33.12776400003375],[103.28103699962945,33.127352000211175],[103.280034000072,33.12711800035677],[103.27848099979533,33.12682299993779],[103.27687099961727,33.12754199970492],[103.2765280003839,33.128725000194784],[103.27518099997157,33.129279000222624],[103.27430800011048,33.128710000293424],[103.27338500002065,33.12723000018488],[103.27268299986378,33.126225999635224],[103.2711990000824,33.12666600035118],[103.26951699993431,33.126650000281714],[103.26723200026184,33.12669100026582],[103.26514900025576,33.1275160002261],[103.26379500017075,33.12869099971255],[103.2633139999468,33.12958899966608],[103.26297099981514,33.13054300025371],[103.26288700014956,33.13179100025532],[103.26294800024891,33.132692000089015],[103.2625969997213,33.13454800013331],[103.26151299997302,33.13532799991325],[103.25976200022797,33.136046000272884],[103.25908299963729,33.13694600036112],[103.25813699998128,33.13772700033523],[103.25643999976455,33.138957000310775],[103.2558220001716,33.14052800032657],[103.25561600030728,33.141371999718956],[103.25499799981597,33.14283900010378],[103.25451699959206,33.143622999907166],[103.2516979999922,33.14360200029921],[103.25015700030943,33.14364800025765],[103.25003500011069,33.143780000004526],[103.24873000042948,33.145214999858084],[103.24788000013459,33.145917000241866],[103.24738399984204,33.14632900017441],[103.24684999991464,33.14657300036873],[103.24617100022232,33.14688399999339],[103.24495799970428,33.14743799973051],[103.24334800042452,33.1477100000289],[103.24207399980712,33.14786999981051],[103.24092999978436,33.14774799972139],[103.23971299996668,33.14852899983061],[103.23930100023802,33.149316999671996],[103.23909500037371,33.15032699962514],[103.23867500024913,33.15201299977157],[103.23746199973108,33.15223100027238],[103.23632500027934,33.152223999836934],[103.23511199976134,33.15270899978454],[103.23489900022429,33.15355799988627],[103.23401399976932,33.154847000120924],[103.23414299964075,33.15586499995508],[103.23418899967152,33.15755799970142],[103.23424999977088,33.15858099992493],[103.2338990001416,33.159984999992496],[103.23302200008254,33.160655999904556],[103.23152999990525,33.16143399962502],[103.2305270003478,33.16204999969201],[103.22984399955918,33.1632860002312],[103.23115199961346,33.16509999964019],[103.23101100004648,33.166622999831425],[103.23086999958117,33.166687000265966],[103.2296610001594,33.167233999758935],[103.22882500010823,33.166687000265966],[103.22879099977303,33.16666100035352],[103.22778800021558,33.16631499985967],[103.22752100025193,33.16668899973827],[103.22717700029531,33.167160000160514],[103.22575799991296,33.16805199987712],[103.22472100002034,33.16859699969577],[103.22447599979796,33.16872399980278],[103.2235300001419,33.16945099978125],[103.22277500028159,33.170106999844336],[103.22262999961835,33.17151199962738],[103.22297000027527,33.172660999832196],[103.22315699987301,33.173622000016636],[103.22219500032347,33.174500999845314],[103.22124499957116,33.17568300028521],[103.22102399963822,33.17753599986057],[103.22061899958224,33.178496999972296],[103.22013099968562,33.17973300018855],[103.22032200037965,33.18063799990851],[103.2215919999008,33.18166299985866],[103.22259500035652,33.18195299964519],[103.2235989997389,33.18264299999672],[103.2245340004226,33.18361099991913],[103.22338600020186,33.18433499997499],[103.22168800016027,33.18493099966393],[103.22054300031262,33.18542700025957],[103.21946000038923,33.186209999852466],[103.21871200020158,33.18705199965811],[103.21856700043662,33.18823900002935],[103.21896400009666,33.189032999981436],[103.21990300008001,33.18988999968335],[103.22055900020611,33.1910189997819],[103.22054400013752,33.192318999761625],[103.2200019998142,33.193051000009014],[103.21910899986162,33.19490200027768],[103.21949800002405,33.195862000306384],[103.22036000001451,33.19688499999473],[103.22128700030227,33.19829899964254],[103.22207700032267,33.199549999916485],[103.22266399995351,33.20113399987928],[103.22272599987778,33.202314999831216],[103.22210800028485,33.20326799964943],[103.22116099990555,33.20422200005209],[103.21974599972117,33.20539700016256],[103.21946399968887,33.206747000202],[103.22036800041042,33.20838699991668],[103.2213590002723,33.20986499990944],[103.22161899966498,33.21110900001929],[103.22100899956958,33.211888999682074],[103.2198679999199,33.21188400019777],[103.21838400013851,33.21260899984911],[103.21790000043984,33.21379199971142],[103.21816300020559,33.21480399987156],[103.2187499998364,33.21565599984386],[103.22008899985283,33.216400999724456],[103.2210160001406,33.2171969996521],[103.22100100007201,33.21866399969423],[103.21999000011864,33.219844000346065],[103.21871200020158,33.22022799968115],[103.21702199965759,33.22100499999663],[103.21634299996524,33.22184700037501],[103.21619800020028,33.22286100025087],[103.216460999966,33.2237670001137],[103.21744900035314,33.22524199976478],[103.21864699990425,33.226151999753114],[103.2193110004263,33.226831000051014],[103.21922699986241,33.228074000009634],[103.21834999980335,33.22874300036838],[103.21753300001872,33.23009099990563],[103.21785799970874,33.231507999986306],[103.21844100003992,33.23242099974133],[103.21825799974184,33.23266700014876],[103.21765900041544,33.23367799978013],[103.21745699985075,33.23435999977888],[103.2157789999006,33.234306000116106],[103.21389799956091,33.23430899963906],[103.21168514808049,33.234316000278845],[103.21168499985846,33.234316000278845],[103.20930899994943,33.234577999775986],[103.2079060003589,33.234522000069866],[103.20595999972186,33.23525900018855],[103.20401800018108,33.23617199985186],[103.20227499993359,33.23662499963809],[103.2012680001782,33.23680000030872],[103.20039799979185,33.23680000030872],[103.19905499957747,33.23646200017111],[103.19737300032769,33.2358940002026],[103.19569799985227,33.23567599972957],[103.1942259997665,33.23568100010842],[103.19288699975007,33.235851000045464],[103.19026999981659,33.23648400013532],[103.18838900037518,33.2367669997282],[103.18739000011739,33.23750699987279],[103.1869890002594,33.2384679999703],[103.18666899969395,33.24037599972463],[103.18687499955826,33.242573000245905],[103.18641000012617,33.24432299985065],[103.1855399997398,33.24539899991028],[103.18404099988982,33.24610999962891],[103.18176299989005,33.2472439999735],[103.1800919996126,33.248491000215246],[103.17908900005516,33.249231000283366],[103.17848300015777,33.25000899975842],[103.17781500033608,33.25086599962786],[103.17746800000644,33.25178899973039],[103.17715500001201,33.25261900035919],[103.1769569996453,33.25442200032124],[103.17675800035198,33.25679200012327],[103.17615599975422,33.25876800023829],[103.17509100027249,33.26057699975352],[103.17354999969139,33.261766999710574],[103.17217300004015,33.26213500035056],[103.17063200035734,33.26236600020314],[103.16895799970688,33.26214500033405],[103.1672830001298,33.261751000268134],[103.16606999961176,33.261138000079086],[103.16466199999836,33.26086300032545],[103.16325799968462,33.260918999681735],[103.16171299980387,33.2611480001767],[103.15941999973549,33.261128999764864],[103.15660899963326,33.26119499979402],[103.15459400029754,33.261421000221794],[103.15325600010605,33.261425999878995],[103.15137099956839,33.26081299966269],[103.14936100025552,33.260198000061195],[103.14686200032284,33.25951300017777],[103.14512300027333,33.25912099987433],[103.14290600037293,33.259124000048146],[103.14156399998349,33.25946499985186],[103.14069799979508,33.25986599980816],[103.139828000307,33.26054300009602],[103.13848500009264,33.261224000280436],[103.13687900011253,33.261113000205505],[103.13480399960406,33.26116900015268],[103.13245799983221,33.26106199990047],[103.13104699984576,33.26140299965074],[103.12984199972368,33.2622499997162],[103.12910100010706,33.26276100026553],[103.12790000018288,33.263949000259124],[103.12696100019954,33.265464000190626],[103.1258249996744,33.26755200018782],[103.12508499988269,33.268684000009],[103.1250270001564,33.268746999743776],[103.12307800004461,33.27082600004563],[103.12274199958563,33.27103999977894],[103.12112800010789,33.272119000275914]]],"type":"Polygon"},"properties":{"code":"513233208","name":"色地乡","cp":[103.14352108676084,33.04086199974242]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.73738999973088,32.98819599992347],[102.73229200030636,32.99021999996018],[102.72725300043311,32.99012000032909],[102.71975400008687,32.98784700011488],[102.71501300013942,32.97713100005532],[102.71003500036554,32.974908000187106],[102.70253799966913,32.97263400013344],[102.68982299989764,32.97662699967278],[102.68484599994864,32.974402999889314],[102.68508600014813,32.96590999965195],[102.67525400044892,32.95721400016075],[102.66530200020073,32.95276399993821],[102.64767499987924,32.95240400015372],[102.64005900025546,32.95437199986834],[102.63231899988483,32.96058600004589],[102.6323185561171,32.960586175664275],[102.62437799967273,32.945836000368494],[102.62463700013885,32.936938000331196],[102.61942599983811,32.934604999993624],[102.61427999983472,32.9300460001063],[102.6145400001257,32.92114800023959],[102.617306999847,32.91675400030336],[102.62811500023783,32.908075000032966],[102.63609099971171,32.906014000179184],[102.64425799987961,32.8972780000953],[102.64959600040197,32.89516199997895],[102.6523599997502,32.890766999947985],[102.66290600020021,32.8909820003087],[102.6732619997811,32.897870000048385],[102.68889399996004,32.904862999715505],[102.70735300013472,32.90523299985553],[102.71256500026034,32.907562999987654],[102.7231140001851,32.907772000072114],[102.73353900026127,32.91242999998657],[102.73869000028755,32.91698300001219],[102.74396500016236,32.9170869999642],[102.74917800011292,32.9194149997371],[102.76500299973739,32.919723999990495],[102.77825200033458,32.91775599983025],[102.78364699986001,32.913408000041485],[102.79161999985915,32.91133599991613],[102.79707399983413,32.90476400009668],[102.79731400003364,32.8958660003745],[102.79479699965928,32.89136599972504],[102.79491700020819,32.88691700025076],[102.78491399990641,32.86669399988988],[102.78509499965638,32.86002099993049],[102.78018600037775,32.84657199992657],[102.7804280002271,32.837675000039425],[102.77521899957621,32.83534800001575],[102.7762470001463,32.79753400002403],[102.77134399981715,32.784085999856046],[102.76356599981169,32.779483999657465],[102.75591099982982,32.77043200016433],[102.7269510003093,32.76986200000567],[102.72181000032879,32.76530899970729],[102.71654499960137,32.76520399991258],[102.71409900027045,32.75847899993467],[102.71453299974041,32.74290900033247],[102.7120260003101,32.738408999868504],[102.71246099960499,32.72283900013436],[102.7023729998127,32.70705999969367],[102.70262300005795,32.69816399978078],[102.69742500017603,32.69583400010416],[102.6841479999897,32.7000170003179],[102.67631999975553,32.697633000012225],[102.67657199965059,32.68873700016843],[102.68484000010085,32.67555199975846],[102.68496499977434,32.67110399977071],[102.6800210003356,32.65987800017425],[102.67213399965189,32.65971800032826],[102.6460990000364,32.65028399967215],[102.64084099987998,32.65017600007306],[102.6252620003028,32.64317800031052],[102.62013399984275,32.63862099968313],[102.62039199958562,32.62972499962597],[102.62590599983504,32.62093900032043],[102.62616399957791,32.61204399990777],[102.62324192189249,32.606778021045635],[102.61866900032796,32.59853700006751],[102.6187980001994,32.59408899993758],[102.61630099991652,32.589586999975204],[102.61668900025403,32.57624399998936],[102.61681800012548,32.57179600029717],[102.6223280001769,32.563011000099046],[102.62258599991979,32.55411599968648],[102.6279019998025,32.552000999652456],[102.63065600000331,32.54760800031061],[102.64128600011891,32.54337700003875],[102.64403899959649,32.53898399974345],[102.64928900025528,32.539092000152],[102.65991699982274,32.53486000028845],[102.66516699958319,32.534968000355185],[102.6679190001342,32.53057400022284],[102.67854400022694,32.52634000011547],[102.68379399998739,32.526446000263675],[102.68916900031965,32.52210499984978],[102.69448100000437,32.519987999780255],[102.69972999993996,32.52009299999741],[102.70785299972694,32.51135699968902],[102.71316299976185,32.509238000291866],[102.71853600044429,32.50489599974767],[102.72940199966311,32.49176300000609],[102.75087899962926,32.47438800008821],[102.75372800026464,32.462531999728455],[102.75372896595357,32.462527981093885],[102.7550780001517,32.46250200018521],[102.75717600022642,32.462860999621576],[102.75995299999344,32.46314599980621],[102.76186100009737,32.4636220003561],[102.76424899970198,32.46443099974373],[102.76637000024121,32.465528000290966],[102.76904800027405,32.46718899990251],[102.77043599979596,32.46836600013842],[102.77151200004666,32.47063000035783],[102.7717560004441,32.47211200033613],[102.77187799974455,32.474169000195886],[102.77164199974298,32.47549399991102],[102.77187799974455,32.47657800002294],[102.77242699974055,32.47707899992157],[102.7735020001663,32.47729599966111],[102.77565799996734,32.47713300020252],[102.7780840001051,32.47696999969087],[102.78091399957557,32.4768529997135],[102.78300099977965,32.47675100001724],[102.78489299999,32.47665499993004],[102.78652999993226,32.47668599963788],[102.7880249995843,32.476937000179035],[102.78945900003525,32.47753300003973],[102.79056200005013,32.478432999994865],[102.79120300010761,32.47967600033784],[102.79104999994674,32.48145699991717],[102.79037100025442,32.4835860001996],[102.78908599976636,32.48601800029126],[102.78826899998178,32.48815100033259],[102.78807099961503,32.490628000225776],[102.78798699994944,32.49240499988278],[102.78734599989194,32.49384700011567],[102.78568700020838,32.49535399978748],[102.78321500003987,32.49620299974083],[102.78094500043606,32.49711299965753],[102.7792819996562,32.497780000177734],[102.77794699983775,32.498376999978866],[102.77556300043109,32.49991599963377],[102.77546299997364,32.50000199993149],[102.7736479997562,32.50156400034707],[102.77284699986511,32.502299999979684],[102.77153399978793,32.50349299997378],[102.76995499957202,32.50495800014896],[102.76931400041282,32.506055999953446],[102.76928400027562,32.50737599987832],[102.7702070003654,32.50873200003502],[102.77194700023982,32.51069700031391],[102.77354099962605,32.5126189999198],[102.7749519996125,32.5146510001689],[102.77610400003118,32.51703200028858],[102.77719500035047,32.519811000197],[102.77788200043874,32.52254500017828],[102.77793500014216,32.52454899974698],[102.77824099956561,32.52574199988031],[102.77887800032347,32.52698999974249],[102.77976999955283,32.52765500024469],[102.78112799983583,32.5280289997517],[102.78350100027012,32.5282040002905],[102.78538900028258,32.528277999900766],[102.78724399978469,32.52882499966346],[102.78909400016228,32.52981899992847],[102.78971199975526,32.53020800012224],[102.79048199968418,32.53110300000094],[102.79200099962567,32.532389999793835],[102.79455999983281,32.53439499984325],[102.7965630003713,32.53623600026088],[102.79852300035374,32.53799799965588],[102.80018299986217,32.539506000262605],[102.80173199994088,32.541529000305495],[102.80232299976969,32.54329100034997],[102.8027810004274,32.54522900015219],[102.80262800026654,32.54700800021203],[102.80200700030052,32.54885200036389],[102.80131199981632,32.550638999671826],[102.80107599981476,32.551791000242545],[102.80138100031161,32.55293499999627],[102.80229699983043,32.55417599974445],[102.80373499958104,32.55522600032343],[102.80511600032854,32.55623099985265],[102.80553899992786,32.557023999817005],[102.80565299973068,32.55845100019321],[102.80540099983558,32.559423999836206],[102.80456599960932,32.56076000028327],[102.80339900002035,32.56261599963522],[102.8027730000315,32.56434999971809],[102.80273899969627,32.56549899962289],[102.80343699965519,32.566459999723904],[102.8046119996401,32.5672309998413],[102.80672899998135,32.56810299995863],[102.80976900041243,32.56837999994169],[102.81134500025533,32.568929000053345],[102.81284800030328,32.56935400022344],[102.81474399981332,32.56953900027406],[102.81656400005367,32.56961499999603],[102.81825299987445,32.56963599964887],[102.81825757768912,32.56963726921207],[102.82016099997834,32.57016500016878],[102.82214799972498,32.57115199973835],[102.82347900024378,32.5720069998542],[102.82528000021756,32.57362699967456],[102.82662599990668,32.575713999758875],[102.82743500019369,32.57793200026015],[102.82817900018334,32.580489999940234],[102.82885100020297,32.582537999680774],[102.82930399993951,32.58333599974596],[102.82983399966894,32.58428500000515],[102.83061600019174,32.58569399962455],[102.83098299971458,32.586663000240144],[102.8309369996838,32.587411000257276],[102.83042200002302,32.588221999627244],[102.82950599960587,32.589330999989976],[102.82880500017224,32.59054300017349],[102.82806100018257,32.59262500031082],[102.82770999965497,32.5947539998071],[102.82742699979777,32.59699600004144],[102.82721400026075,32.59883200030854],[102.82652700017249,32.600909999743024],[102.82453200002993,32.604099999941276],[102.82410900043065,32.60560099982759],[102.82427699976184,32.60679800024485],[102.8251270000567,32.608724999622346],[102.8253100003548,32.61026599993089],[102.8249520001545,32.61193100011622],[102.823978999836,32.61333300012233],[102.82301800011135,32.61395800032116],[102.8217550002629,32.614555999871875],[102.82029800024571,32.61555899971345],[102.81911200039016,32.61644900028265],[102.81887499966538,32.61782200028367],[102.81877599993119,32.61920300021755],[102.81801299967495,32.62076500006388],[102.81706299982095,32.62256300027673],[102.81535399990867,32.624490000101275],[102.8132440001384,32.62619900022524],[102.81186699958883,32.627592000011866],[102.81097399963626,32.629560999725776],[102.81080700012998,32.63099500007169],[102.81140899982944,32.63292799979044],[102.81302300020548,32.63512800022586],[102.8154409999473,32.63702500004273],[102.81832499984448,32.638845999782454],[102.82065700027091,32.640175000081705],[102.8223810002518,32.641281000106574],[102.82446699973262,32.64246500003353],[102.82624900033814,32.64334500018089],[102.82742299959979,32.64428600022566],[102.82806799985525,32.645705000361374],[102.828258999651,32.64764400033428],[102.82825100015336,32.649822999885316],[102.82758400015658,32.652185999722974],[102.82696599966529,32.65431299991831],[102.82694300009908,32.65585899962965],[102.82705000022922,32.65734400022783],[102.82724100002493,32.65883599982759],[102.82774399999016,32.65997000027736],[102.82898400027237,32.661031000082126],[102.83070400005532,32.66213499973565],[102.83262700022784,32.6631239996461],[102.83454600020238,32.663884000110286],[102.83563300032371,32.66431900032354],[102.83750200006955,32.665323000199486],[102.83945500037932,32.66667100037144],[102.83991700033668,32.6669920003191],[102.84151499992085,32.66844099962664],[102.84221299987978,32.66902400022713],[102.8432430000997,32.669891000084334],[102.84469300044421,32.67094599972261],[102.84661900009148,32.672054000333574],[102.84936200042164,32.67275999992726],[102.85133400009964,32.67311600000355],[102.85343200017435,32.673234999850756],[102.85518299991939,32.67302700030652],[102.85713600022915,32.67275200037651],[102.85930700009877,32.67299600034023],[102.86150800010566,32.67388399962746],[102.86323200008653,32.67475900009002],[102.86476199989866,32.67632800035612],[102.8659750004167,32.678477999722496],[102.86602800012014,32.68047900037363],[102.86676100023918,32.682414999692725],[102.86767599993306,32.683597000131336],[102.8690650001782,32.685052000196315],[102.87057999992172,32.68616299977768],[102.87212099960448,32.68779100035823],[102.87270800013363,32.68932699996373],[102.87249399987338,32.691155000273355],[102.87247100030717,32.692644999636876],[102.87291399999795,32.693834999912895],[102.87336000006178,32.69424500033608],[102.87403499955619,32.694871000052686],[102.8747829997438,32.69485300003762],[102.87503100033925,32.69475399988975],[102.87598799986591,32.694366999770246],[102.87765499994539,32.69358600002017],[102.87958499979062,32.69262800012281],[102.88133200023604,32.69201999963115],[102.88282799971299,32.69215399996093],[102.8838500004353,32.69259199994045],[102.88446800002828,32.69286899964672],[102.8855059997458,32.693530000331194],[102.8865400001637,32.693976999704674],[102.8876880003844,32.694125000333344],[102.88889699980616,32.69369999965651],[102.89057200028158,32.69320400031018],[102.89267399965594,32.693157999993424],[102.89450800014,32.69334900015116],[102.89580899962327,32.693778999624136],[102.89745700033447,32.694660999902844],[102.89925800030827,32.69611299988786],[102.90078700029548,32.69733299975012],[102.90257300020063,32.69804499988807],[102.90428200011291,32.698576000229316],[102.90565100026657,32.69895500001563],[102.90700199997855,32.69898600004265],[102.90786399996898,32.69827399985177],[102.90906499989312,32.697679000290854],[102.91041599960515,32.697595000060026],[102.91191600017835,32.698363000091746],[102.9136929998627,32.69895500001563],[102.91608499966527,32.699708000235155],[102.91821000040245,32.70035600028625],[102.9196980003818,32.70043799997371],[102.92153299979243,32.700343999754125],[102.92341300030726,32.69966800018048],[102.92548500044269,32.6985899997414],[102.92695300033053,32.697930999753105],[102.92817000014821,32.69762099986994],[102.92945999976084,32.69782399966635],[102.93063100044608,32.698371000372305],[102.93155000033794,32.69961700034934],[102.93256499959092,32.70171300022556],[102.93308699982276,32.70353599976747],[102.9337510003448,32.705297999741944],[102.93474600040463,32.70693800022448],[102.93639800041548,32.708502000371745],[102.93815599983324,32.71075099964291],[102.94009800027234,32.712149999945126],[102.94208900021692,32.71285400003547],[102.94482099977813,32.713372999639546],[102.9468689996241,32.71378999994281],[102.94874599976589,32.71424300034153],[102.95012300031543,32.71485099984506],[102.95096600003932,32.715575000028814],[102.95250300042245,32.71721100011316],[102.95443400009259,32.72038199999305],[102.9565549997335,32.72297300028633],[102.95784000022157,32.72524399971213],[102.95976300039408,32.7277780001361],[102.96147599960598,32.729494999682316],[102.96355899961206,32.73100299992258],[102.96502400002521,32.7321219997618],[102.96600400001643,32.733191999860445],[102.96657599957864,32.73408999987595],[102.96674800000608,32.735175000063464],[102.96638599960784,32.736844000089185],[102.96569100002195,32.738632000152215],[102.96458899983199,32.74019700026751],[102.96354000024382,32.7415320003065],[102.96264300009328,32.74338099980294],[102.96195299963198,32.745517000222385],[102.96200600023371,32.74729600002704],[102.9626659996595,32.748888000124055],[102.96287999991975,32.750031999873585],[102.96291000005698,32.750197999851586],[102.96288800031567,32.751687999694234],[102.96269300032199,32.75233400001233],[102.96252099989455,32.75289299983703],[102.96127399993962,32.75434499997767],[102.95998400032701,32.755780000300106],[102.95934300026951,32.757164000002874],[102.95919099993354,32.75887999973548],[102.9600679999926,32.760923999965435],[102.96085100034033,32.762955000288684],[102.96183899982915,32.76436400011823],[102.96276600011691,32.76559800023652],[102.96374600010815,32.766727000358934],[102.96521099962295,32.76773200018401],[102.96673999961017,32.768965000354825],[102.96778900009667,32.76997500024771],[102.96857099972115,32.770991999747075],[102.96900599991436,32.77206199979407],[102.96945199997819,32.773431000303205],[102.968944999815,32.776876999801935],[102.96867799985128,32.77911499985897],[102.9687549998442,32.78174899999823],[102.96909399977788,32.78397300016172],[102.96881500011862,32.786212999756806],[102.96853300008632,32.78805200009853],[102.9675599997678,32.78978699979325],[102.96618300011656,32.79123900002765],[102.96442800017353,32.791903000357514],[102.96207099963274,32.792577000048524],[102.96010300015271,32.79344900032664],[102.95864899961023,32.7948499999624],[102.9574700003257,32.79670299988666],[102.95589100010977,32.79856400005485],[102.95503999998998,32.79961200024223],[102.9545289996288,32.80059400013704],[102.95373199993568,32.80152899976169],[102.95238500042167,32.80172800033951],[102.95116799970566,32.801980000098055],[102.95071099977118,32.80255200005127],[102.95055000011271,32.804047999836534],[102.95074900030433,32.80621700017305],[102.95053500004408,32.808229000141274],[102.94998199985012,32.81007199972766],[102.95003499955357,32.81201800016238],[102.95003688960892,32.812022227361034],[102.95003499955357,32.81202099974449],[102.94606100006033,32.809441999717336],[102.93600500005512,32.809261999756984],[102.93092400034904,32.811294000149715],[102.93081600039399,32.81554000004758],[102.91535300026946,32.830127999905166],[102.90737400042255,32.84697500021379],[102.90223500009185,32.85112900019995],[102.90212600031191,32.855375000348026],[102.89687700037635,32.863774999764466],[102.89665899991813,32.8722670001583],[102.89151700011269,32.876421000286044],[102.89080499991009,32.90402100014107],[102.88817799993086,32.9082209998156],[102.87794500037361,32.91440499992099],[102.87268999969199,32.922805000162526],[102.87252400001061,32.929174000360575],[102.87252446264299,32.92917471967159],[102.87252400001061,32.929175000157706],[102.86228700025542,32.93535599964521],[102.8621750001024,32.939602999870814],[102.85708400035061,32.94163199975679],[102.85445399999834,32.94583199967179],[102.85434299967025,32.95007799999631],[102.84656399983989,32.95842900007515],[102.84124700013224,32.96895099963013],[102.82613399981207,32.968665999779134],[102.80329299971515,32.974604000016534],[102.78314200024492,32.97421699992647],[102.77581600015107,32.96557800004163],[102.7710109997312,32.95698799978203],[102.76608999985872,32.95264399967042],[102.76105400035851,32.952546000273145],[102.75841899998336,32.95674300031277],[102.75332400003359,32.9587680001749],[102.75320699985772,32.963014000146636],[102.74811100008304,32.965039000253356],[102.74529999998084,32.975604999716786],[102.73738999973088,32.98819599992347]]],"type":"Polygon"},"properties":{"code":"513233205","name":"阿木乡","cp":[102.83552513473182,32.7263610000727]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.57860900033855,32.08602800011623],[102.57319100034857,32.0925849999706],[102.56829700024029,32.08136000012385],[102.5505510000931,32.063187000363364],[102.55114500029495,32.04318399994739],[102.54364799959856,32.031902000320905],[102.53602000027922,32.02506600016468],[102.52825999981707,32.022672999830995],[102.52317599973799,32.01811500036964],[102.51802600043492,32.01577800026322],[102.51402699992903,32.006738999805634],[102.51402613485139,32.006737045894845],[102.51402699992903,32.006736000000295],[102.51525999964025,32.00516700001056],[102.51696899955249,32.00404100016083],[102.51870400030236,32.00377599978643],[102.52052000034475,32.00413699975097],[102.52153499959775,32.004401999843616],[102.52247699995415,32.00472499999868],[102.52478799956586,32.00482300005418],[102.52725200023679,32.0040830001843],[102.52902600044636,32.00295899966978],[102.52967900019944,32.00232099986442],[102.53065900019065,32.00137000017402],[102.53195200017635,32.00011900035057],[102.53196700024495,31.999984000028892],[102.53219300020075,31.997943999837993],[102.53258200036318,31.99693500007374],[102.53313499965881,31.995873000349484],[102.53419500001598,31.994774000129176],[102.53532099959706,31.99373099995393],[102.53643899968056,31.993187999988],[102.53723200007404,31.99254800007895],[102.53822799995875,31.99173599996684],[102.53894900038223,31.991097999787975],[102.53961300000594,31.990233000055905],[102.539941000069,31.989776999772726],[102.5401960003371,31.988800000186203],[102.54065400009654,31.987708999912215],[102.54103599968796,31.986443000347553],[102.54136399975103,31.985527000059474],[102.54200800018155,31.9840910000397],[102.54260300020832,31.983282000310385],[102.54339300022875,31.982300000137908],[102.54391200008752,31.980863000192578],[102.54430100024994,31.97959900009298],[102.54488500040605,31.9783350001083],[102.54560900030424,31.977411999895253],[102.546460000424,31.976250000179643],[102.54731400001853,31.975268000193612],[102.54810400003893,31.974342000275264],[102.54866800010356,31.97316599964187],[102.54939299982665,31.97241299993556],[102.55052599997875,31.971713999752804],[102.5515219998635,31.971358000025457],[102.55245300034925,31.971051999644505],[102.55331899963932,31.970701000259954],[102.55418099962976,31.970003999650714],[102.5546390002875,31.969025000179307],[102.5550279995516,31.96793699981704],[102.55541300041439,31.96695500005922],[102.55567299980706,31.966210000178584],[102.55612300006884,31.965119000346554],[102.55651999972889,31.964545999824217],[102.55750800011603,31.96333100029745],[102.55902600023259,31.961654999809898],[102.5603500001804,31.960269000225143],[102.56136399960847,31.95936600014267],[102.56281700032605,31.95842699971757],[102.56441599973516,31.95755200031218],[102.56588100014825,31.95633599973228],[102.56686899963707,31.95517699997434],[102.5677919997269,31.954139000189926],[102.56858500012036,31.95333000019361],[102.56924899974408,31.952521999950218],[102.56970999987655,31.951835000324245],[102.56936300044524,31.950410999635213],[102.56893499992474,31.948986999740548],[102.56851599962508,31.947559999663916],[102.56815699959986,31.94595100020293],[102.56779900029791,31.944297999865782],[102.5679819996977,31.942749000309604],[102.5684319999595,31.94160300014654],[102.5692830000793,31.940275000280508],[102.57033599986543,31.93889399987361],[102.57165599961529,31.937507999917404],[102.57317799992978,31.936001999631294],[102.57466599990914,31.935377999933674],[102.57607699989559,31.935247999939968],[102.57816400009962,31.935738999861023],[102.5802470001057,31.936344000285384],[102.58167399998568,31.937360999828122],[102.5835619999981,31.938483000003966],[102.58574299991346,31.940009000077414],[102.58730700006079,31.941552000018646],[102.58894800020099,31.94353500010937],[102.59085499958168,31.945459999953528],[102.59255599999635,31.947045000057056],[102.59445599970432,31.948684999747012],[102.59601999985165,31.949985000285864],[102.59757599960305,31.95128199986644],[102.59935400001059,31.952651999899334],[102.60125799991654,31.954005000051612],[102.60266899990299,31.954506000329985],[102.6044930003413,31.954831000079203],[102.60630900038369,31.955098000047016],[102.60745699970607,31.95526099977431],[102.6084640003598,31.95530699997702],[102.61095499989659,31.955396000353453],[102.61357199983007,31.955651999619615],[102.61606300026513,31.9558000001561],[102.61828699983823,31.955778999764895],[102.62070899977805,31.956041000127904],[102.62294099974702,31.956593000163],[102.62355099984238,31.956710000046723],[102.62503100032413,31.95699300015896],[102.62548499988556,31.95707999972737],[102.62757999958721,31.95751700007115],[102.62946400029999,31.957960000374506],[102.63129100021303,31.958629000034286],[102.63231700023502,31.959540000036373],[102.63313400001961,31.960392000354414],[102.6341600000416,31.961641000188163],[102.63531199956194,31.962658000203074],[102.63701700017458,31.963727000322958],[102.63850900035187,31.96463000020025],[102.63914200001345,31.964724000112646],[102.63932899961121,31.964751999938233],[102.63958800007728,31.964792999776304],[102.64093499959134,31.964606999769217],[102.64159900011335,31.96397400019188],[102.64258300030254,31.962766000062373],[102.64337999999566,31.96189900017005],[102.64385299982368,31.961723000337795],[102.64464299984408,31.96028599985624],[102.64495599983853,31.95913899975513],[102.64513099974073,31.95735900036298],[102.6459240001342,31.956151000104054],[102.64645499968852,31.955631999940824],[102.64724800008199,31.9545949999582],[102.64756899957405,31.95350600010394],[102.64793799964501,31.95155799973505],[102.64777000031381,31.94938399992551],[102.64714099995187,31.9476159998631],[102.64665300005522,31.94607399968674],[102.6461650001586,31.94482000033625],[102.64634799955842,31.943274000025315],[102.64720200005125,31.941950999815205],[102.64877000039652,31.941009000086076],[102.65085599987735,31.940932999842424],[102.65240099975809,31.940973999640647],[102.65354999980369,31.940906999905106],[102.65428600029577,31.94055900009469],[102.65488100032253,31.940095999721347],[102.65534699957955,31.939345999954543],[102.6555979996497,31.938027999725993],[102.6550489996537,31.937230000167567],[102.65401500013412,31.935410999814852],[102.65345799974219,31.934043000074194],[102.65310000044022,31.93278999994118],[102.65268000031566,31.931362999940216],[102.65279499994337,31.930333000046012],[102.65290899974619,31.928788999811406],[102.65361500010104,31.928077000164546],[102.65487700012454,31.927333000151247],[102.65560600004561,31.926638999961014],[102.6560210001473,31.925719999874012],[102.65721200002574,31.92456799971758],[102.6584060002772,31.92358400002168],[102.65967599979831,31.922773000263376],[102.66074799985103,31.922308000349183],[102.66157200020666,31.92119699961887],[102.66175499960644,31.919994000102623],[102.66157999970424,31.91905299993229],[102.66154200006943,31.918851999925135],[102.66094600021776,31.917561000303937],[102.66062599965232,31.91673200034441],[102.66045800032116,31.916307000100794],[102.6601029995956,31.915051000252486],[102.65988199966263,31.913846999982788],[102.6595920001327,31.91242000036754],[102.65970599993554,31.910815999776023],[102.66008800042529,31.90978600005151],[102.6602099997257,31.908583000009514],[102.66018700015948,31.907151000079615],[102.6603699995593,31.90600400028735],[102.660900000187,31.90508599970809],[102.66186599993453,31.903974999943728],[102.66220599969314,31.903572999954225],[102.66231600019633,31.903191999942706],[102.66224800042428,31.902884000215675],[102.66154899974211,31.901114999906667],[102.6610609998455,31.89980000032877],[102.66054199998673,31.898851000062088],[102.6598509997005,31.897829000214863],[102.65971400033145,31.89754899979148],[102.65943200029916,31.896970999683205],[102.65968400019425,31.895603000206098],[102.65980600039296,31.89502799972492],[102.65965300023208,31.893713000142036],[102.65947400013195,31.89225100035206],[102.65955399959957,31.89159699995108],[102.66040100041971,31.88976300037604],[102.6614270004417,31.888408999921772],[102.66255999969547,31.88742800012463],[102.66334600041625,31.886159000028403],[102.663392000447,31.884788000120906],[102.66304099991942,31.883476000013],[102.66355599958024,31.881870999979135],[102.66428100020165,31.88066300032506],[102.66520799959109,31.879793000243517],[102.66613099968092,31.878871999781964],[102.66651999984332,31.877553000355444],[102.66650099957674,31.876185000005915],[102.66695099983855,31.874982000280195],[102.66727200022892,31.873891000297125],[102.66711099967213,31.87200399980528],[102.66648999970612,31.870972999788542],[102.66600099998456,31.869722000098992],[102.66565000035527,31.86875300011352],[102.66556599979138,31.86766699974677],[102.6660169998781,31.86640100037528],[102.66660799970688,31.86508399984214],[102.66651999984332,31.8641679999206],[102.6669740003031,31.86261900006731],[102.66740899959798,31.860500999999953],[102.66765299999541,31.85883799974878],[102.66764499959949,31.858433999790094],[102.66763799992681,31.85757499976961],[102.66782100022493,31.856427999765142],[102.668213999687,31.855397999797873],[102.66920600027208,31.854474999819185],[102.66960600030518,31.854355000162606],[102.67000999963791,31.854180000097333],[102.6714519995865,31.853323000027014],[102.67280300019678,31.85257799976993],[102.6735580000571,31.85407700024378],[102.67457599968317,31.85572300026699],[102.6752629997714,31.856970999846816],[102.67567899969804,31.85765600010267],[102.6760219998297,31.85828099988366],[102.67666999955992,31.860046000169458],[102.67739099998334,31.863013000005548],[102.67787899987998,31.864382000035857],[102.67814300036893,31.865068999807615],[102.67842500040123,31.865928000190923],[102.67843999957152,31.866784999823622],[102.67838699986808,31.867812999627365],[102.67792599973565,31.868732999845893],[102.6771399999132,31.870112000349522],[102.6768880000181,31.871322999915368],[102.67711700034697,31.872694000348],[102.6776050002436,31.874290999981874],[102.67830300020249,31.875659000227643],[102.67865399983177,31.876743000082023],[102.67880699999264,31.877887000359006],[102.679633999823,31.879367000247736],[102.67991699968023,31.880335999987658],[102.67926399992713,31.88188700035318],[102.67868499979392,31.883492000108276],[102.67870800025845,31.884749999662006],[102.67892099979548,31.88583600005471],[102.67924899985853,31.886853999665938],[102.67901299985698,31.88749399995604],[102.67836400030185,31.888869999744006],[102.6777039999778,31.89002700035127],[102.67665100019164,31.891234999989738],[102.67592300009551,31.892555000179186],[102.67554900000168,31.894276000256447],[102.67542699980294,31.89524999964524],[102.67571700023119,31.89638799966763],[102.67619699973189,31.897242999961904],[102.67702500028544,31.898379999909288],[102.67777699977272,31.89940199974055],[102.67812800030033,31.90037099993206],[102.67841799983022,31.901624999976253],[102.67836400030185,31.902603000117814],[102.67790599964414,31.903180000150908],[102.67703299978307,31.903815999924397],[102.67590800002687,31.904796999748942],[102.67577800033055,31.905257999875776],[102.67585399960022,31.905657000073237],[102.67599900026349,31.90674300019138],[102.67615900009703,31.908228000184046],[102.6763380001972,31.910059000305633],[102.67641500019008,31.910570000090246],[102.67629299999133,31.911259000238957],[102.67596800030134,31.912289000250205],[102.67537300027459,31.913383000376918],[102.67506000028015,31.91476099989784],[102.67493100040872,31.91585100022504],[102.67494200027936,31.91671799997835],[102.674945999579,31.91693899978965],[102.67509899973986,31.918140000353198],[102.67510999961053,31.919030000291336],[102.6751139998085,31.919110999962673],[102.6753959998408,31.92008000001728],[102.67561000010105,31.921218000288295],[102.67536599970357,31.92259599985993],[102.67477099967684,31.92362899973771],[102.67431700011538,31.92460500019112],[102.67392799995295,31.92558199974645],[102.67368399955548,31.927239999631],[102.67356899992775,31.928393000140083],[102.67365299959334,31.929765999894144],[102.67373700015726,31.931195000024104],[102.67382900021877,31.932566000158083],[102.67417900002312,31.93376599997771],[102.67473300004198,31.934676000070667],[102.6755570003976,31.935756999657652],[102.67631599955756,31.93700900032871],[102.67673499985722,31.938093999860765],[102.67743299981615,31.939401999823318],[102.67805899980505,31.940995999747958],[102.67883299993194,31.942878000243283],[102.67979500037978,31.944473000203498],[102.68041700017073,31.945495000214905],[102.68050000001139,31.947092999954425],[102.68072900034028,31.948923999977836],[102.68108800036548,31.95034800008668],[102.68184700042374,31.951602000211864],[102.6823579998866,31.952689999755925],[102.68270900041419,31.953829000335194],[102.68299499974614,31.9551420003526],[102.68281599964601,31.956628999967233],[102.68270100001827,31.958005000029452],[102.68297999967753,31.959322000336368],[102.68326199970983,31.96034900021022],[102.68388000020111,31.961483999873913],[102.68497499982006,31.962619999897733],[102.6863149996614,31.963614999719113],[102.68706200002411,31.964291999979633],[102.6871459996897,31.96583200019425],[102.68683299969527,31.9672670002857],[102.68678800038774,31.968754000186124],[102.68654300016536,31.970242000212135],[102.68577999990912,31.971419999828942],[102.68457800016003,31.972404000199283],[102.68343699961203,31.972871999796364],[102.68216700009089,31.973167000197034],[102.68102600044116,31.973579000138475],[102.67986700034982,31.973876999909113],[102.67881000036571,31.974398000147335],[102.67764700007639,31.975324000262734],[102.67683399959141,31.976475999654387],[102.67673499985722,31.977912999718843],[102.67649899985567,31.97935000014198],[102.67656699962775,31.980262999707044],[102.67698299955434,31.981292999892418],[102.67722000027914,31.98254700032174],[102.67736500004406,31.98357700001329],[102.67736400021916,31.98449200029026],[102.67699099995026,31.9857560000365],[102.67636099976342,31.98736299994857],[102.67597199960097,31.988453999766044],[102.67564400043625,31.98966000012659],[102.6755149996665,31.990743999795022],[102.67556800026826,31.991717999712108],[102.67556800026826,31.99297900020639],[102.6756750003984,31.993947999888743],[102.67606399966249,31.995489000297013],[102.67670499972,31.99703199978064],[102.67665899968925,31.99794500012295],[102.6763390000221,31.998579000316393],[102.67574300017044,31.99909999970318],[102.67507600017365,31.999677000380146],[102.67484299964683,32.00004600029722],[102.6747549997833,32.00018099976585],[102.67343199966041,32.001180999656526],[102.67222999991132,32.00239900005017],[102.67205500000914,32.00258800034228],[102.67054799976324,32.00398699977583],[102.66931599987696,32.00584299976031],[102.66829400005295,32.00797699995192],[102.6680799997927,32.00957499985282],[102.66872099985021,32.01093499981669],[102.6703040002641,32.01205400014095],[102.67167400024266,32.01288799972849],[102.67250899957058,32.014019999721896],[102.67301300025908,32.01509800027189],[102.67355300003422,32.01672300004919],[102.67380900012726,32.01872199964661],[102.67385500015803,32.02032399972311],[102.67377899999006,32.022567999707476],[102.67344799955391,32.02396600034241],[102.67248600000437,32.025647000301696],[102.67144499991379,32.02692599963967],[102.67073899955894,32.02836499962778],[102.67085699955975,32.03019600031599],[102.67183400007622,32.03143999988442],[102.67281400006743,32.03285100018201],[102.67331000035998,32.03381900037024],[102.67334799999483,32.03501900016886],[102.67331799985759,32.03650999996831],[102.67276100036399,32.03841200032825],[102.67133000028605,32.04027000019666],[102.6696790001001,32.041441999961805],[102.66748099956797,32.04256899992124],[102.66521900036004,32.043524999671895],[102.66355999977817,32.04435700025634],[102.66162200043539,32.04519099966991],[102.66161879165318,32.04519365023855],[102.6502409997591,32.0474989998973],[102.63719299990169,32.047229000085665],[102.62688199962832,32.04256599976612],[102.62440100013727,32.03806599983736],[102.61396400036554,32.03784800017711],[102.60868100009479,32.039961000309994],[102.60046500042141,32.05313099989102],[102.59518100032574,32.05524399973979],[102.59505099973109,32.05968900028574],[102.58689600015704,32.07063600014042],[102.58676599956239,32.07508100020391],[102.58147999981692,32.0771929997732],[102.5787390000349,32.081583000296526],[102.57860900033855,32.08602800011623]]],"type":"Polygon"},"properties":{"code":"513233101","name":"刷经寺镇","cp":[102.61668800740293,31.972581499870266]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.007541999879,32.618424000067684],[102.0061989996646,32.61940800012594],[102.00470800021053,32.61931100013555],[102.00347600032424,32.618752000279954],[102.00215200037643,32.617869000309426],[102.00111799995855,32.61729699991274],[102.0007060002299,32.617198000098774],[102.00029399960295,32.617104000074754],[102.00005000010377,32.61689499980451],[101.99833000032086,32.61532999962895],[101.99581200012157,32.61343499988366],[101.9904490003832,32.61165700028405],[101.98882400013653,32.6103450002511],[101.98765599982433,32.60645900025964],[101.98722200035436,32.59810599979066],[101.98748099992213,32.593648000067084],[101.98875100034161,32.589762999919344],[101.98888900043386,32.58569399962455],[101.98893399974138,32.58438700029408],[101.98886199977136,32.58339099967469],[101.98830399955455,32.57574600011591],[101.98761399999154,32.571918000255856],[101.98813600022336,32.56728599980658],[101.98926600000239,32.56054000011569],[101.98992999962614,32.557159999875545],[101.98965199979179,32.55578499974042],[101.98622200027167,32.55408800010001],[101.98537899964948,32.55440999973881],[101.98380700000457,32.55491099984957],[101.98241799975943,32.55545500029838],[101.98188399983204,32.55563300027205],[101.97995399998683,32.5565310002431],[101.9771010000518,32.55843800012189],[101.97309900007116,32.56180699986596],[101.97246999970922,32.56241800019745],[101.97161500028977,32.56325500027752],[101.9691740000834,32.56586900010226],[101.96725900030683,32.567135000220254],[101.966412000385,32.56749900028995],[101.96416899964703,32.56759300012207],[101.96342100035773,32.5678680000156],[101.96323800005962,32.56802500032284],[101.96246399993272,32.5686760003283],[101.96204399980815,32.5687709997492],[101.9597249998005,32.57096699998651],[101.95909200013892,32.57141000022818],[101.95708100010283,32.57357699987013],[101.95508199976234,32.57535499967859],[101.95327054070371,32.57012656222263],[101.95326999991792,32.57012499969184],[101.95467000003369,32.56480599999259],[101.95587199978277,32.55880199989272],[101.95571100012428,32.553310999950845],[101.95435799986416,32.54816900005775],[101.95229699959938,32.542390000120236],[101.95026399982201,32.53924400036677],[101.94824600011324,32.535999999744575],[101.94614399984059,32.53166399986675],[101.94281800007757,32.528920000368345],[101.93754599967745,32.52795299965394],[101.93378200024652,32.52613699976118],[101.9305279995552,32.52362199971693],[101.92943999960893,32.52064600017682],[101.92908899997964,32.516126999924566],[101.9291350000104,32.51150000035428],[101.92824999955543,32.50555199999405],[101.92777000005472,32.502505999763514],[101.92738000006739,32.500047000195416],[101.92701799966912,32.49777100005144],[101.92591899985223,32.49159299981916],[101.92508699999901,32.48479600018645],[101.92222999986602,32.476907999702384],[101.91964399989469,32.46942099981953],[101.91928900006747,32.464615000170554],[101.92049800038752,32.46203399995369],[101.92164200041027,32.45997700029198],[101.92170400033454,32.45609399988027],[101.92067400011462,32.45123000007585],[101.92018899969274,32.44791299968669],[101.92032699978498,32.44511499985417],[101.91938100012896,32.44191099973671],[101.91674099973093,32.43785000003877],[101.91302199960754,32.43431300024127],[101.90997700005187,32.43076300010215],[101.90903100039586,32.42767599974535],[101.90900899975624,32.42584499968102],[101.9103519999706,32.4234409997801],[101.91313600030865,32.421848000146255],[101.91507399965148,32.420295000126075],[101.91523000018539,32.419184000277895],[101.91558099981468,32.41670199979463],[101.91560799957884,32.41651800012432],[101.91492899988653,32.41452800011703],[101.91304400024715,32.413901999995595],[101.91040499967406,32.41068800026036],[101.90635400018792,32.40755000004312],[101.90258499983575,32.40584099963662],[101.89968500004508,32.405620000036244],[101.89608800012039,32.40607399996089],[101.89366199998264,32.40579400011353],[101.89136899991426,32.40362299971323],[101.88859200014723,32.40002399970153],[101.88507200021543,32.396994999667925],[101.88178699956197,32.39437700006284],[101.87976899985318,32.392436000316266],[101.8774609997162,32.38889099971489],[101.87501200001223,32.38743900018922],[101.87339099996352,32.3864740001372],[101.87291800013548,32.38619400019312],[101.8663219997876,32.38220299994486],[101.86316400025406,32.3810740000186],[101.86141299961068,32.37844700026899],[101.86084000022353,32.374198999625754],[101.86113099957835,32.3686730002158],[101.8617940002755,32.36392099984435],[101.86238599992919,32.35991600004182],[101.86191300010118,32.356318999696434],[101.85978700043738,32.35235300012472],[101.85608699968222,32.34744799968439],[101.85332499998378,32.343855000221204],[101.85190999979939,32.34123000029027],[101.85129999970403,32.338133000162934],[101.8509599999454,32.33577800031924],[101.85089499964805,32.33533299975479],[101.85108700016701,32.33367700034005],[101.85159799962987,32.33352700007635],[101.85425200027154,32.33400800029031],[101.85604200037469,32.33333299999418],[101.85699600042665,32.33297199974782],[101.86041400025118,32.32895899990505],[101.86165299981018,32.32428900022573],[101.85939099970396,32.3187799998475],[101.85642999981388,32.31312699997951],[101.85548400015787,32.3080440002092],[101.85621700027687,32.305811999693326],[101.86044000019048,32.30248300034957],[101.8636250003865,32.30014699988438],[101.86691400033962,32.29835899989828],[101.87155200035491,32.29880900005412],[101.87339099996352,32.29984899967858],[101.87502000040816,32.30077699980516],[101.8760229999656,32.301344000013856],[101.88000200038,32.30493199981654],[101.8829659997448,32.30932099975599],[101.88330899987649,32.31360700014083],[101.88499100002458,32.316702999855664],[101.88761999965362,32.31761799977815],[101.89171299987086,32.31640699986169],[101.89668999981984,32.31108199974459],[101.90061200033287,32.30810699999536],[101.90559400030472,32.30661400025981],[101.90894699983193,32.30574500002997],[101.91013000021275,32.30430299989334],[101.9132169996012,32.30376399995112],[101.91395700029122,32.30366700034941],[101.91671800016472,32.30375100031582],[101.91947300019046,32.30400800035316],[101.92287900031944,32.30417600033515],[101.92565199988853,32.30451999983267],[101.92862700002227,32.30532900012792],[101.93096600012139,32.30621900015318],[101.93246099977344,32.30711899989681],[101.93373899969049,32.3083759996378],[101.93480700044357,32.309274000151724],[101.935878999598,32.31053200026122],[101.93660400021939,32.31150399988377],[101.93703100001666,32.312313000076486],[101.937781999679,32.31321599962421],[101.93938500018439,32.31492000010634],[101.94024299997687,32.31582700035166],[101.94184499975901,32.317353000295164],[101.94344300024156,32.318697999764446],[101.94622400020653,32.32130399995553],[101.94665500020176,32.3215739996597],[101.94718900012914,32.32219899978044],[101.94909300003509,32.32353100032183],[101.95016500008784,32.32461500011577],[101.95144700020282,32.325779000195965],[101.9536900000425,32.32802099992798],[101.95785600005468,32.331346999965305],[101.96010599956699,32.33296000015857],[101.96080799972388,32.33340999998659],[101.96275000016296,32.33465000014853],[101.9648859998725,32.33572500003249],[101.9650199997668,32.33580400026237],[101.96669799971693,32.336800999658564],[101.96801400016714,32.337262000301585],[101.96839599975857,32.33747500029779],[101.97018800040983,32.33848700016202],[101.973729000258,32.33766199963181],[101.97616200006847,32.33898000013275],[101.97616256331214,32.33898064071596],[101.98097699963576,32.34446899976344],[101.98484899992006,32.34927700000184],[101.98724400009569,32.35340199971132],[101.99022400025233,32.35495499982936],[101.9956170001279,32.3538109998678],[101.99833699999354,32.351660999675374],[102.00005400030174,32.35023299988914],[102.00029399960295,32.35003000025067],[102.0005150004342,32.349961000228745],[102.00151100031893,32.34954600028429],[102.00291499973436,32.348555000053906],[102.00398299958916,32.347970000374126],[102.00478799967819,32.34750399992006],[102.00559299976722,32.34732399990655],[102.0064089997269,32.34771500036117],[102.0071679997852,32.34845499990321],[102.00820200020307,32.3491290002529],[102.00921999982914,32.349685999838286],[102.01045300043866,32.350186999730575],[102.01157099962383,32.350142999986],[102.0133220002672,32.34978200001442],[102.01486700014794,32.34941599974549],[102.01580899960601,32.34923500027198],[102.01668999986302,32.34934199963554],[102.01764800011297,32.349670000051994],[102.01887199960333,32.35029100035259],[102.01962700036194,32.35085000003471],[102.02106599993749,32.3516330000897],[102.02235899992314,32.35225399981472],[102.02339199961781,32.35259599994335],[102.02494499989449,32.352465999993555],[102.02642500037622,32.35198900003073],[102.02843499968904,32.351163000221504],[102.0299720000722,32.35017299971072],[102.03163199958064,32.34883599996909],[102.03281800033453,32.34733800036734],[102.033668999556,32.34577200033116],[102.0340429996498,32.34434299989058],[102.03455400001097,32.342847999650985],[102.03479800040846,32.341642000254694],[102.03505399960315,32.34043900018317],[102.035435000268,32.339515999738566],[102.03585500039257,32.33884900000689],[102.03646100028996,32.33832800017294],[102.03719400040899,32.337976999852444],[102.03779600010844,32.33796700011527],[102.03841100022665,32.33818799974121],[102.0395820000136,32.33908799982162],[102.04026800027692,32.33988100025853],[102.04117200010018,32.34101800034399],[102.0420039999534,32.34209700019645],[102.042968999876,32.343108999981624],[102.04420900015823,32.34406999969074],[102.04564699990884,32.3452549997067],[102.04680699982512,32.345981999993604],[102.04822299983442,32.347141000297185],[102.04945499972074,32.34803800015497],[102.05102999973869,32.34881899979921],[102.05251799971805,32.34931700001543],[102.0546199999907,32.34974699980389],[102.05719900028932,32.350062999912645],[102.05929999983876,32.350491999734615],[102.06138600021791,32.35090299981032],[102.06314100016093,32.351053000109545],[102.06510600016624,32.35131499974208],[102.06679599981192,32.351347999694106],[102.06820699979838,32.351101999692986],[102.06960299971622,32.35033399980867],[102.0707290001956,32.34923200034479],[102.0719950004171,32.34818699965238],[102.07306300027184,32.347714000115644],[102.07471500028274,32.347164000015496],[102.07598900000181,32.34674900014128],[102.07766000027924,32.34626600033735],[102.07914400006062,32.34601400010897],[102.08109700037038,32.34558400003197],[102.08337100017216,32.34469699988228],[102.08484300025798,32.344154999657796],[102.08675499966152,32.343310999677065],[102.08808199998238,32.34238000028718],[102.08914300016444,32.34139100036517],[102.08992899998694,32.340295000189265],[102.09057699971711,32.33867600037276],[102.09075199961931,32.33723900034321],[102.09059199978574,32.33548399968331],[102.09057699971711,32.33529899965072],[102.09081299971868,32.33380800036187],[102.0910040004127,32.33336200033414],[102.09152300027145,32.33213099995053],[102.0923690003684,32.330691999887385],[102.09334599998657,32.329134999729135],[102.09425400000777,32.32739799994257],[102.09495199996668,32.325503999947585],[102.0958059995612,32.3241790000865],[102.09678300007766,32.32273200002332],[102.09743900020379,32.32180600037067],[102.09896499981797,32.32041000018292],[102.10089600038641,32.319235000079715],[102.10276500013227,32.318347000004806],[102.10456899958075,32.31763300009807],[102.10644599972251,32.317091000270416],[102.10798700030362,32.31672499988841],[102.10952399978845,32.3161879998745],[102.11079000000994,32.315489000324995],[102.11185100019202,32.31450100025669],[102.11249600044748,32.3132879999296],[102.1130680000097,32.311508000188724],[102.11323600023917,32.309788999961256],[102.11291499984881,32.307494999676436],[102.11282399961222,32.306125999925655],[102.11292999991743,32.3047480003427],[102.1134420001035,32.30365199999471],[102.11423358026052,32.30272765794833],[102.11423499959866,32.30272599966163],[102.11523399985646,32.30219200015668],[102.11697799992882,32.30160300003506],[102.11832100014318,32.30152600033179],[102.12034999972262,32.301837000250366],[102.12236400013172,32.30248200036353],[102.12310800012142,32.30273400028721],[102.12448599959755,32.30320900019351],[102.12503499959355,32.303372000257326],[102.12631699970858,32.303747999640436],[102.1284800000806,32.30422900010662],[102.13023800039666,32.30465899997209],[102.13172200017804,32.304921000267036],[102.13272899993346,32.30478800029314],[102.13406100027716,32.304192999778145],[102.13503299987246,32.30262899970816],[102.13620100018467,32.30038500009915],[102.13729599980363,32.298306999763255],[102.13840200019152,32.296285999704835],[102.13937399978683,32.294042000238726],[102.14000800017163,32.29185699993547],[102.14078200029853,32.29052700018311],[102.14143800042466,32.28977400015118],[102.1423649998141,32.28917999992815],[102.14337199956952,32.289052999683676],[102.14472599965454,32.28960200030024],[102.14596599993678,32.29090100022735],[102.14681299985861,32.29276999999465],[102.14711800035545,32.29454000031539],[102.14734000011327,32.296021000092146],[102.14749999994687,32.297509000257755],[102.14793099994209,32.298814000186745],[102.14854799971015,32.30037500000697],[102.14918100027006,32.30173600012768],[102.14973500028893,32.30264500021642],[102.15049699982193,32.30360599970136],[102.15153899973743,32.30501999996104],[102.1530379995874,32.306025000027674],[102.15452999976469,32.30674499995336],[102.15662399964144,32.30733499999323],[102.15824499969018,32.30753300007218],[102.15999600033356,32.30773099971844],[102.16175499957623,32.30771899982122],[102.16343702128388,32.30742333491071],[102.162349999603,32.338907999762576],[102.16728100041954,32.34792999976488],[102.16666799995113,32.36571399998626],[102.17175399968005,32.37029000033684],[102.17668700014643,32.37931200017249],[102.17653399998557,32.38375799963739],[102.18887300001343,32.40631300030013],[102.18872099967747,32.41075900003742],[102.19119000037125,32.415269999908496],[102.19103800003528,32.41971699991332],[102.18279300004956,32.43063900016145],[102.18149599986594,32.468434000218984],[102.19153099995478,32.482031999729095],[102.1992479998609,32.486671999873636],[102.19902000025526,32.49334199977785],[102.20396399969397,32.50236399999247],[102.20384600238813,32.53572099967242],[102.20148099965479,32.535300999932694],[102.19876900018511,32.53471899981657],[102.19557999979108,32.53453399993052],[102.19350099998297,32.53497100016584],[102.19243700032615,32.53561999976651],[102.1914559996117,32.53677899986081],[102.1898849997917,32.539213000259195],[102.18819000012311,32.54192399967817],[102.18661500010516,32.54407000007191],[102.18563099991596,32.546298999635304],[102.18365099984204,32.54821899963561],[102.18225099972625,32.54870499968473],[102.18056100008056,32.5486210003785],[102.17887499973452,32.54836199994036],[102.17670499968978,32.54765199991265],[102.17500699964815,32.54728399989218],[102.17366099995904,32.54725300028866],[102.17234500040716,32.54748299970577],[102.1705939997638,32.547570000223935],[102.16850699955974,32.54754700010381],[102.16566899969334,32.54725699999384],[102.1629069999949,32.54730000022073],[102.16006099973258,32.54761899983455],[102.15750499989848,32.54771900033224],[102.15461000013065,32.548108000232155],[102.15233600032886,32.54883199991994],[102.15054700005064,32.55030000007209],[102.14895699996406,32.55152599983523],[102.14706099955573,32.55279900034975],[102.1451499999771,32.554724000235076],[102.14349100029352,32.555948999934124],[102.14127400039314,32.556615999919],[102.13979800010937,32.55675599987778],[102.13852000019232,32.556892999782825],[102.13671599984549,32.55760999996956],[102.13524700013271,32.5586590003211],[102.1332519999902,32.56011800031495],[102.131317999947,32.56106899976265],[102.1297689998683,32.561553000351374],[102.12782700032756,32.56215300012848],[102.12580899972045,32.56235899972981],[102.12503899979151,32.56229000012184],[102.12418799967172,32.56221599977008],[102.12316599984771,32.56160400018937],[102.1231010004487,32.561553000351374],[102.12239500009389,32.56102399977237],[102.12150600033924,32.56052799974687],[102.12021699965322,32.56014699969557],[102.11880200036713,32.56010900037468],[102.11697799992882,32.5603659999108],[102.1146399996546,32.561091000052535],[102.11249999974713,32.56210000032359],[102.10980699964564,32.56328300003214],[102.10659899988339,32.56486900004256],[102.1033829997252,32.56611500026794],[102.10129999971912,32.566840000134654],[102.09847699992136,32.56745000017732],[102.09557100028287,32.56744000013558],[102.09259899962383,32.56736899973163],[102.08954700039551,32.566837999961365],[102.08614799993923,32.56591399993367],[102.08324399995058,32.56494800025897],[102.08086399984356,32.56423299988664],[102.07909399983191,32.563686000048165],[102.07664900032589,32.56297399984954],[102.07405900015661,32.56203599970323],[102.071411000261,32.56152100023031],[102.06937799958531,32.56143200007037],[102.06661199968892,32.561695999853555],[102.06412100015214,32.56241300027479],[102.06136299975336,32.563196999730465],[102.05983799996412,32.563236000141636],[102.05840699988619,32.562849000203464],[102.05650399980514,32.562473000085106],[102.05434100033145,32.56244799972735],[102.05252100009109,32.56250399973159],[102.05219300002803,32.564139000319194],[102.05142999977178,32.566593000353606],[102.05066400004081,32.56917199997321],[102.04948900005591,32.57207700034384],[102.04839400043697,32.57390600002485],[102.04739799965391,32.575125999777036],[102.04603199987329,32.57671999988873],[102.0445249996274,32.57871399966569],[102.04356800010069,32.580077000338484],[102.04321699957312,32.58150600021847],[102.04347600003919,32.58298900029826],[102.0436590003373,32.58339099967469],[102.04409100015744,32.58431700033089],[102.04422400022682,32.58553699997364],[102.04427399955723,32.585980000142854],[102.04419800028757,32.58763499978451],[102.04363699969768,32.589472000190554],[102.04266699975223,32.59174600006811],[102.04190799969392,32.59311600020635],[102.04060800003555,32.59516600013199],[102.03911300038354,32.596706999844805],[102.03733499997598,32.59823599967991],[102.035836000126,32.59937000014543],[102.03505000030351,32.60049000013892],[102.03354399988253,32.602420000343244],[102.032105000307,32.6041240003667],[102.03080499975033,32.605492000366155],[102.02929800040273,32.6075369997076],[102.02779899965442,32.60896500027536],[102.02596000004581,32.61010199994401],[102.02391899987252,32.61088800004919],[102.02205699979936,32.61119399977258],[102.02104599984601,32.611481999803395],[102.01914199994006,32.61203100003945],[102.01709800029202,32.61258800033054],[102.01543799988526,32.6131369998395],[102.01365700000295,32.613744999750665],[102.01149799982889,32.61439900009426],[102.00953000034883,32.616280000324544],[102.007541999879,32.618424000067684]]],"type":"Polygon"},"properties":{"code":"513233203","name":"查尔玛乡","cp":[102.05164640151992,32.45423049990481]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.77503299980334,33.326246000184724],[102.77321699976096,33.326641000107365],[102.77161499997882,33.326529000128744],[102.77027199976442,33.32635300008592],[102.76879200018101,33.325730000071985],[102.76765499983094,33.32499799981976],[102.76651900020411,33.32443300013734],[102.76544299995344,33.32431899994988],[102.76396300037004,33.324430999766584],[102.76235300019194,33.3246539999113],[102.76120800034428,33.32448100001362],[102.75961400005973,33.32396999978558],[102.75820200024842,33.32306199982746],[102.75646300019889,33.322215999746874],[102.75518899958148,33.321368999865655],[102.75357900030171,33.32013100031358],[102.75217499998799,33.31933700024006],[102.75136599970098,33.31899899974013],[102.75003099988253,33.31851599998686],[102.74948600008449,33.31831700003111],[102.74822999990874,33.31805099996163],[102.74767699971477,33.317928999855766],[102.74519399967559,33.31809199966969],[102.74263799984152,33.31836899979179],[102.74041400026843,33.3184170000053],[102.73806400029864,33.31829999981388],[102.73632100005119,33.31761600011375],[102.7357860002989,33.316940000219965],[102.73513799967039,33.315985999625546],[102.73487099970669,33.31468699971999],[102.73474100001036,33.313389999849626],[102.73447400004667,33.312880999791794],[102.73448200044258,33.31152800019204],[102.73421499958056,33.31040200033325],[102.73341799988745,33.30802900008393],[102.73222000033633,33.3053739997026],[102.73088100031991,33.302659999820364],[102.72887100010875,33.299107000362746],[102.72739800019804,33.29633999970058],[102.72560200024712,33.29312900028161],[102.72419399973542,33.291320000092185],[102.72222600025538,33.28863000000148],[102.72142100016636,33.287723999662475],[102.72007799995197,33.2871009999506],[102.71832700020691,33.28697900009738],[102.71590799974186,33.28691300003184],[102.71314299967038,33.2875239997889],[102.71092599976997,33.28802199966007],[102.70920599998705,33.288550999807555],[102.7071199996079,33.289160999896005],[102.70496100033213,33.289485999931486],[102.70260700016442,33.28964599972379],[102.70051999996036,33.28941300028075],[102.69890700030756,33.289293999793465],[102.69691499963974,33.2888029997012],[102.69517200029061,33.28812199983435],[102.69302399998719,33.28726700027714],[102.69140999961115,33.28674900026722],[102.68891599970135,33.28673600012164],[102.68608500040592,33.28706400014242],[102.6835749997043,33.28758700019649],[102.68115299976449,33.28797100005266],[102.67939799982143,33.28841299991501],[102.67770800017577,33.28891699977161],[102.67629299999133,33.2896380003043],[102.67467899961534,33.28996599993008],[102.6726009996321,33.28974799995451],[102.67098299995641,33.289120000101285],[102.66716099990086,33.28769300000493],[102.66325900037764,33.286830999812615],[102.66054199998673,33.286334000150156],[102.65751999999729,33.285643000245116],[102.65523199995178,33.284505999684924],[102.65423199986908,33.28342800011559],[102.65368700007107,33.28258899976212],[102.65368700007107,33.28100399980156],[102.65403400040071,33.27982700030489],[102.65437800035727,33.27836500014547],[102.65505700004962,33.27650199969339],[102.65586899981133,33.274586999742155],[102.65621299976793,33.27278599995639],[102.65723100029231,33.2716569997276],[102.65825300011632,33.27037899985502],[102.65946200043639,33.269422000166614],[102.66074799985103,33.26808000000613],[102.66125099981629,33.2668739996745],[102.6612590002122,33.26568599965676],[102.66076299991967,33.264524000156726],[102.65976000036223,33.26367500009708],[102.6588210003789,33.2630489999723],[102.6575429995635,33.26248199978487],[102.65640299973873,33.26179500023018],[102.65512499982167,33.26116999993681],[102.65290799992128,33.25986000026255],[102.64961599959511,33.25765199979658],[102.64722499961748,33.25630499987768],[102.64494699961772,33.25499500011823],[102.64320000007058,33.25385800008449],[102.64112100026247,33.25215700033212],[102.64103699969856,33.25206300036259],[102.64005300040769,33.250968999993184],[102.63933199998425,33.25004099993615],[102.63904999995195,33.249669999691484],[102.63885099976031,33.24898799967482],[102.63878999966094,33.2479739999806],[102.6389960004236,33.246733000322344],[102.63927099988489,33.24527900032245],[102.6395460002445,33.24386500022204],[102.6392790002808,33.24335700031374],[102.63853899959078,33.24273400035053],[102.63766499990476,33.242501999685494],[102.63719999957435,33.24216199980065],[102.6363869999877,33.24159700007253],[102.63586099955793,33.241041999842814],[102.63518900043663,33.24007800016316],[102.63453800033338,33.23883200015114],[102.63387399981133,33.23742000031671],[102.63340900037922,33.236406000168834],[102.63213099956387,33.234704000298564],[102.63140599984078,33.23312499983352],[102.63093700021071,33.23166099995745],[102.63060900014763,33.229964000109355],[102.63034899985665,33.2280420000563],[102.63013499959642,33.22630500007666],[102.62960800024004,33.22483799965883],[102.6290709999396,33.223141999904946],[102.62840700031589,33.22167199984157],[102.62743099962431,33.21942000014006],[102.62656500033421,33.217497000344274],[102.62556600007642,33.21540400010205],[102.62502700012618,33.21451399988872],[102.62461500039753,33.21381700034279],[102.62415000006712,33.21286100012402],[102.62435599993144,33.211731999805735],[102.62482899975943,33.21066099991447],[102.6250229999282,33.21031500031074],[102.6253739995575,33.20970800016029],[102.62577799978853,33.208524999960424],[102.62586300017735,33.20785300014855],[102.62532900024995,33.207235000310895],[102.62503899982174,33.2070140001089],[102.62452400016092,33.206607000297],[102.62358600000249,33.20610099976095],[102.62349800013895,33.20607300019254],[102.62198000002238,33.20558199986235],[102.62030100024732,33.20501199996049],[102.6191570002246,33.204331000089525],[102.61755500044244,33.20336400034948],[102.61594500026436,33.20211799974145],[102.61381200002957,33.20030600010791],[102.61133599966308,33.19837900001295],[102.60933399984788,33.19651600005441],[102.60818999982511,33.19521699976752],[102.606583999845,33.19396800033723],[102.60463800010625,33.19299900003309],[102.60269999986512,33.19226399989025],[102.60035400009332,33.19151899980236],[102.59829399965346,33.19049300030615],[102.596341000242,33.189533000062404],[102.59460100036762,33.18873699965909],[102.59381899984477,33.188484999856136],[102.5921290001991,33.18793799993105],[102.58998500009365,33.18691600011427],[102.58790999958514,33.186125000191126],[102.5871089996941,33.18577899985171],[102.58589699989925,33.18502899997392],[102.5851110000768,33.18466300017431],[102.58335600013378,33.183833999628966],[102.5818070000551,33.18276199986865],[102.58047499971134,33.181463000094766],[102.57947600035187,33.180160000024784],[102.57875099973046,33.17874899993489],[102.57835499989534,33.177395999870804],[102.57816400009962,33.17621599998523],[102.57797300030393,33.17451800023498],[102.57771399983781,33.17299699969021],[102.57731700017779,33.171699999637895],[102.57664599998306,33.17029599993154],[102.57577599959669,33.16905299986968],[102.57555499966377,33.16877599990006],[102.57504699967566,33.16815000026548],[102.57351400038876,33.166904000275295],[102.57314000029497,33.166662999826485],[102.57128999991737,33.16547500031609],[102.56914599981192,33.16405799982717],[102.56747899973246,33.16298500014539],[102.56641099987768,33.161967999654415],[102.56507900043226,33.16094600001578],[102.56334700005547,33.159982000178594],[102.56174100007534,33.15958299995266],[102.56045599958728,33.15962300015141],[102.55764500038336,33.15990099990078],[102.55570299994426,33.16029500001057],[102.55409699996419,33.160518999821896],[102.55262499987838,33.16006299962956],[102.55182700036035,33.15932799994869],[102.55095699997398,33.15847699963849],[102.5492980002904,33.15666700023969],[102.54815699974239,33.15490099991684],[102.54682500029699,33.15303400021053],[102.54568899977185,33.151961000262084],[102.5444190002507,33.15105600004371],[102.54268299967593,33.150488000195494],[102.54101599959648,33.150486000353716],[102.53934199984427,33.150938999827524],[102.5378000003366,33.15155400037515],[102.53633099972552,33.152285999699046],[102.534856000165,33.15286799995593],[102.53231500039948,33.1537629999424],[102.53063999992408,33.1543279996347],[102.52970599996362,33.15460500012562],[102.52856899961357,33.154266999965635],[102.52710400009875,33.153477999954546],[102.52557400028664,33.15234699999369],[102.52511599962891,33.15189100017945],[102.52399099987274,33.150650000013336],[102.52302599995015,33.14898900032689],[102.52177099959931,33.14650400008975],[102.52117599957255,33.14453099967459],[102.52065300041414,33.14301000018619],[102.5200580003874,33.14159900015953],[102.51952799975965,33.1408639999557],[102.51826499991122,33.13968099983066],[102.51693400029072,33.13855000027389],[102.51561000034292,33.13691200005412],[102.51514500001248,33.13595000029044],[102.51448499968842,33.13442499984778],[102.51430899996133,33.13308500004625],[102.51351999976582,33.13116799998034],[102.51252800007903,33.12930400014548],[102.51119999993328,33.127833999804125],[102.50928199978362,33.12645099973826],[102.50741999971046,33.124869000090406],[102.50529200039685,33.123568999713186],[102.5034949997227,33.122495999840375],[102.50196900010853,33.12119700032405],[102.50084299962916,33.12024000008879],[102.50001900017185,33.11957100009691],[102.4993820003123,33.11905300003162],[102.49826900025171,33.11827499993645],[102.49754399963028,33.11777399985382],[102.49574699985448,33.11635999991164],[102.49395500010151,33.11477799980691],[102.49276099985005,33.113648999880695],[102.49116200044094,33.1118439997434],[102.49003699978647,33.11043499990958],[102.4877860004492,33.10637900022069],[102.4869360001543,33.10417599972706],[102.48654600016697,33.102595000044616],[102.48647800039491,33.101587999780065],[102.48696600029155,33.0990519996571],[102.4871110000565,33.09707899997844],[102.48704999995712,33.09600600014317],[102.48631699983812,33.093857999935544],[102.48600100036894,33.09120500026754],[102.48570300044312,33.08925399988818],[102.48517600018842,33.0872270000826],[102.48444800009229,33.08626599979563],[102.48364999967593,33.08587200006974],[102.48275000005066,33.0852509998407],[102.48258600001913,33.08513700010763],[102.48205200009174,33.084796000314476],[102.4813010004294,33.08332100030505],[102.48114800026852,33.08299400011413],[102.48061400034112,33.081639000363204],[102.48022500017868,33.0794929998852],[102.47964100002258,33.07785999990773],[102.47891200010156,33.07605799986879],[102.47819499987607,33.07385800031114],[102.47713899971687,33.07171199970694],[102.47615100022803,33.06945999969305],[102.47536500040556,33.06629899990047],[102.47516299984089,33.06411000003504],[102.47551000017052,33.06174299997746],[102.47592199989919,33.05976700022909],[102.47612799976352,33.05903199974208],[102.47607400023516,33.05650499988524],[102.47609000012865,33.05424199974102],[102.47598999967123,33.05170199977068],[102.47592899957186,33.050125999846166],[102.47554000030776,33.048372999648514],[102.47487999998368,33.047190999644094],[102.47455199992062,33.04594999995799],[102.47427800028424,33.04460599976522],[102.47428499995694,33.043364999800076],[102.47456000031654,33.04167200012618],[102.47483499977781,33.04038000024334],[102.47532620306677,33.03874964672291],[102.47532699987242,33.03874999990787],[102.48861499992935,33.044638999645755],[102.49365700017567,33.0447489999113],[102.49630900026926,33.040557999709065],[102.50141500008966,33.03854400023393],[102.54678900031197,33.039520999961375],[102.5518940003075,33.03750600004666],[102.55693599965548,33.037612999955144],[102.56204099965102,33.03559699998103],[102.5647520001941,33.02928100033883],[102.5623579998434,33.024980999674796],[102.56280200025742,33.010118999733955],[102.56790499970481,33.00810200023508],[102.57256600018461,33.02094799975619],[102.57748000038441,33.02530099998507],[102.58252099990752,33.02540700018944],[102.59543599969554,33.01505500016427],[102.59808100011642,33.010860999713515],[102.59845600003516,32.998123000093734],[102.6011630003803,32.9918059996968],[102.60632600010213,32.98766500014871],[102.60688599996877,32.96855699965646],[102.60952899984154,32.96436299969485],[102.62212200031261,32.96462400003406],[102.6323185561171,32.960586175664275],[102.63231899988483,32.96058600004589],[102.64005900025546,32.95437199986834],[102.64767499987924,32.95240400015372],[102.66530200020073,32.95276399993821],[102.67525400044892,32.95721400016075],[102.68508600014813,32.96590999965195],[102.68484599994864,32.974402999889314],[102.68982299989764,32.97662699967278],[102.70253799966913,32.97263400013344],[102.71003500036554,32.974908000187106],[102.71501300013942,32.97713100005532],[102.71975400008687,32.98784700011488],[102.72725300043311,32.99012000032909],[102.73229200030636,32.99021999996018],[102.73738999973088,32.98819599992347],[102.74529999998084,32.975604999716786],[102.74811100008304,32.965039000253356],[102.75320699985772,32.963014000146636],[102.75332400003359,32.9587680001749],[102.75841899998336,32.95674300031277],[102.76105400035851,32.952546000273145],[102.76608999985872,32.95264399967042],[102.7710109997312,32.95698799978203],[102.77581600015107,32.96557800004163],[102.78314200024492,32.97421699992647],[102.80329299971515,32.974604000016534],[102.82613399981207,32.968665999779134],[102.84124700013224,32.96895099963013],[102.84113400015437,32.97319700006989],[102.84354100002554,32.97749100007461],[102.84275500020308,33.007216999843614],[102.8451629998992,33.01151000031955],[102.84364800015568,33.06883999999917],[102.8460020003234,33.07525800023619],[102.85581099955813,33.08606299998923],[102.85564300022695,33.092433999881116],[102.86057699961991,33.096775000366634],[102.86298900041228,33.101068000320424],[102.86797899988177,33.10328500011545],[102.86764599979583,33.116025999663535],[102.8599640000498,33.120132999826325],[102.85732899967469,33.124333000252676],[102.8521700001508,33.12848499996107],[102.85161000028415,33.14972099999572],[102.8540220001782,33.154015000316036],[102.85626699966768,33.16467900018266],[102.86126100023343,33.16689700025913],[102.86103799975237,33.17539100002308],[102.85593199993194,33.17742100036876],[102.85329499990698,33.18162100005889],[102.8531269996775,33.18799199964272],[102.88052200012413,33.20337099970739],[102.8854630000881,33.2077120001137],[102.88787900018013,33.212005000113436],[102.8869979999231,33.24598399976756],[102.89194200026014,33.250323999964934],[102.89183199975696,33.254570999815854],[102.89677799974383,33.258911000222284],[102.90128600006277,33.28023999993852],[102.9062880001261,33.282456000159556],[102.9079640004264,33.29742700001929],[102.90574400015299,33.29826899995073],[102.90393200030854,33.29900399970941],[102.9017110002102,33.30012599998098],[102.89982700039575,33.30119399972027],[102.89808400014829,33.30187499966485],[102.89674000010898,33.302714000028516],[102.89512999993092,33.30367299968488],[102.89351300008015,33.30474399964376],[102.8923759997301,33.305305999979694],[102.89103300041403,33.30598199999126],[102.89002599976033,33.30609900019763],[102.88881300014059,33.30564400026514],[102.8867309999594,33.30547600031365],[102.88524299998008,33.305630999931864],[102.88396099986508,33.30625100015428],[102.88281699984233,33.30749200014216],[102.88188600025492,33.30923800004917],[102.88113899989217,33.31211200003087],[102.88066600006415,33.31436999989545],[102.88012399974086,33.316051000309045],[102.87870500025682,33.317912000313534],[102.8779649995668,33.31858900005287],[102.87682399991708,33.31943300032516],[102.87514599996696,33.320052999985734],[102.87503100033925,33.320091999783045],[102.87367300005624,33.320564999765764],[102.87332999992458,33.32062300031059],[102.8719110004405,33.3209370003642],[102.87043500015676,33.32138899976989],[102.8687560003817,33.321720000370355],[102.86700899993627,33.32183699972404],[102.86566999991987,33.32172299989381],[102.86472400026383,33.32155699983491],[102.86331999995011,33.32110200025453],[102.86104299977525,33.32026699985204],[102.85949399969653,33.31962799977367],[102.85788799971644,33.3190049997249],[102.8561410001693,33.31827499979755],[102.85406999985878,33.317372000014934],[102.85279899961444,33.31681299982268],[102.85125100025894,33.316189000017445],[102.84884299966454,33.31500399989317],[102.84680999988717,33.31425300027757],[102.84513199993705,33.313574000024175],[102.84264800007294,33.31284099982791],[102.84084399972612,33.312506000254906],[102.84084394672553,33.31250599575063],[102.8392989998454,33.31239400012849],[102.83788799985895,33.31245200010466],[102.8372850003346,33.31256200026419],[102.83634999965089,33.312731999964726],[102.83511399956663,33.312812999917426],[102.83398100031286,33.31292400031424],[102.83257000032641,33.312645000265356],[102.83082600025405,33.311794999851735],[102.82948700023762,33.31106800024379],[102.82814499984816,33.31033000013965],[102.82681300040275,33.30993599984158],[102.82593600034369,33.31027700011556],[102.82452799983199,33.31129200000602],[102.82358200017595,33.31242100022573],[102.82279600035349,33.313073999753456],[102.82232699982511,33.31369700015275],[102.82119000037338,33.314320999779454],[102.81944700012592,33.31521399973077],[102.81735999992186,33.31651100023892],[102.81628500039443,33.317190000136435],[102.81480800028572,33.31820200021918],[102.81346599989625,33.318992999754954],[102.81131799959283,33.31989900034614],[102.80942200008283,33.32060800025103],[102.80801500029432,33.321107000246286],[102.80600000006032,33.321445000077766],[102.80405500014648,33.321674000158005],[102.80238399986905,33.32183999999411],[102.80076700001828,33.321788999892696],[102.7986270001108,33.32167199972398],[102.79661900044778,33.321541000092836],[102.7949370002997,33.32142699987548],[102.79299200038584,33.32199099969245],[102.79110699984818,33.32277700022518],[102.78849400011268,33.32373900009745],[102.7866100002982,33.32407400003663],[102.78456900012492,33.32422699999275],[102.78275399990743,33.3247329996809],[102.78094200006298,33.32512500030034],[102.7791260000206,33.32546599970557],[102.77744700024554,33.32579900017243],[102.77503299980334,33.326246000184724]]],"type":"Polygon"},"properties":{"code":"513233204","name":"瓦切乡","cp":[102.68497870490992,33.13952250013054]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.49630900026926,33.040557999709065],[102.49365700017567,33.0447489999113],[102.48861499992935,33.044638999645755],[102.47532699987242,33.03874999990787],[102.47532620306677,33.03874964672291],[102.47532699987242,33.03874699971867],[102.47573899960108,33.03711199963633],[102.47548699970598,33.03468399989877],[102.47528800041266,33.03350099983324],[102.47476600018086,33.032090000014975],[102.47423899992616,33.030962999981135],[102.4730229999334,33.02947200031724],[102.4716999998105,33.02777599971843],[102.47057400022942,33.02614400003298],[102.46937999997795,33.02495900011916],[102.46751500043007,33.0235469996264],[102.46618399991124,33.02280999991109],[102.4647300002671,33.02157100000949],[102.46379600030664,33.02099899970298],[102.46285300012534,33.019818000277574],[102.46252500006227,33.01908600019347],[102.46226499977129,33.01795699974493],[102.46207399997557,33.01660099963153],[102.46175000011048,33.01490699987428],[102.46143000044333,33.013101999898836],[102.4608350004166,33.010848999678224],[102.46054499998836,33.008845000260095],[102.46062100015635,33.006979999975464],[102.460956999717,33.005100000292124],[102.46103399970991,33.00335299984177],[102.46099600007506,33.00195600032361],[102.46098000018155,33.00138400009932],[102.46098000018155,33.000310999886615],[102.46098799967913,33.000177999694074],[102.46097699980848,33.000023000304296],[102.46079699988344,32.997642999665324],[102.45919900029924,32.99455700027357],[102.45841699977643,32.99257099994854],[102.45832499971493,32.99113899999033],[102.45877099977876,32.98901999992293],[102.4594279997298,32.987173999755136],[102.4602169999253,32.98497900031916],[102.46040799972101,32.98326299973028],[102.45991999982438,32.982016000020536],[102.45876400010607,32.98106399964844],[102.45734100042407,32.979944999875194],[102.45631500040207,32.97733400001429],[102.45624599990678,32.97343899973343],[102.45665799963544,32.97051299962675],[102.4571349996614,32.9671280001906],[102.45734100042407,32.96454900005887],[102.4577449997568,32.96351699966268],[102.45828299988213,32.96230200036688],[102.4588939998024,32.96074500011537],[102.4591680003371,32.959598000160724],[102.45869499961078,32.95891900029204],[102.4577449997568,32.95853799988001],[102.45625400030269,32.958110000136635],[102.45469400035334,32.957743999655754],[102.45333900044344,32.95691199987165],[102.45245399998842,32.9552669997591],[102.45190900019041,32.954078999829854],[102.45095500013844,32.95317900007942],[102.44911999982948,32.95258399985238],[102.44726199995429,32.95219100030065],[102.44448500018726,32.95139200035112],[102.44277999957463,32.95050900036823],[102.44154000019071,32.94892999997233],[102.44112400026413,32.94750299963138],[102.44049099970421,32.94517599980698],[102.43985800004263,32.941867000094874],[102.44004800001342,32.938832000306576],[102.44038399957407,32.93602399963781],[102.43972829499369,32.934196822634064],[102.46684699971004,32.91798499996286],[102.46808799981719,32.87794699971629],[102.4708620001095,32.873556000063495],[102.47113699957079,32.86465900021846],[102.47938699957939,32.85371199981261],[102.48479399969868,32.849378999771204],[102.49324500044703,32.8317579998922],[102.48865900031028,32.80940100020301],[102.4861620000274,32.804895000344786],[102.48643599966381,32.79599800025064],[102.48920499993324,32.79160800013374],[102.49454000008251,32.78949899989414],[102.49730900035196,32.78510800002185],[102.50271100044839,32.78077400017752],[102.50291499976458,32.77410200011542],[102.49798999969413,32.762866999710646],[102.49833000035107,32.75174599970841],[102.49091100037077,32.73600500000966],[102.49172899998031,32.70931699984443],[102.49449599970158,32.70492700012934],[102.52606100035835,32.705612999656935],[102.53408700006094,32.70133500015274],[102.53685100030751,32.69694399993735],[102.53172399967237,32.69238299991795],[102.52133899977918,32.68770699989537],[102.51634900030972,32.678697999847955],[102.51688800025997,32.66090600035049],[102.52254999974909,32.64767699989939],[102.52787400002771,32.64556700008753],[102.52800799992201,32.641119000235484],[102.53333200020062,32.639007999987705],[102.53609399989905,32.63461699969325],[102.54141700035278,32.632506999699224],[102.54417900005122,32.62811500021045],[102.54956799972884,32.62377999980486],[102.56027800021039,32.61733399968518],[102.56027895062795,32.61733342766429],[102.56546699987146,32.61966900017894],[102.57072300037802,32.619780999788595],[102.57348199970343,32.61538900004376],[102.57873700038506,32.61550000016734],[102.58412400041288,32.611163999905294],[102.59207200029766,32.6091059998483],[102.59726099995878,32.61143999966737],[102.60514400044455,32.61160499981802],[102.62324192189249,32.606778021045635],[102.62616399957791,32.61204399990777],[102.62590599983504,32.62093900032043],[102.62039199958562,32.62972499962597],[102.62013399984275,32.63862099968313],[102.6252620003028,32.64317800031052],[102.64084099987998,32.65017600007306],[102.6460990000364,32.65028399967215],[102.67213399965189,32.65971800032826],[102.6800210003356,32.65987800017425],[102.68496499977434,32.67110399977071],[102.68484000010085,32.67555199975846],[102.67657199965059,32.68873700016843],[102.67631999975553,32.697633000012225],[102.6841479999897,32.7000170003179],[102.69742500017603,32.69583400010416],[102.70262300005795,32.69816399978078],[102.7023729998127,32.70705999969367],[102.71246099960499,32.72283900013436],[102.7120260003101,32.738408999868504],[102.71453299974041,32.74290900033247],[102.71409900027045,32.75847899993467],[102.71654499960137,32.76520399991258],[102.72181000032879,32.76530899970729],[102.7269510003093,32.76986200000567],[102.75591099982982,32.77043200016433],[102.76356599981169,32.779483999657465],[102.77134399981715,32.784085999856046],[102.7762470001463,32.79753400002403],[102.77521899957621,32.83534800001575],[102.7804280002271,32.837675000039425],[102.78018600037775,32.84657199992657],[102.78509499965638,32.86002099993049],[102.78491399990641,32.86669399988988],[102.79491700020819,32.88691700025076],[102.79479699965928,32.89136599972504],[102.79731400003364,32.8958660003745],[102.79707399983413,32.90476400009668],[102.79161999985915,32.91133599991613],[102.78364699986001,32.913408000041485],[102.77825200033458,32.91775599983025],[102.76500299973739,32.919723999990495],[102.74917800011292,32.9194149997371],[102.74396500016236,32.9170869999642],[102.73869000028755,32.91698300001219],[102.73353900026127,32.91242999998657],[102.7231140001851,32.907772000072114],[102.71256500026034,32.907562999987654],[102.70735300013472,32.90523299985553],[102.68889399996004,32.904862999715505],[102.6732619997811,32.897870000048385],[102.66290600020021,32.8909820003087],[102.6523599997502,32.890766999947985],[102.64959600040197,32.89516199997895],[102.64425799987961,32.8972780000953],[102.63609099971171,32.906014000179184],[102.62811500023783,32.908075000032966],[102.617306999847,32.91675400030336],[102.6145400001257,32.92114800023959],[102.61427999983472,32.9300460001063],[102.61942599983811,32.934604999993624],[102.62463700013885,32.936938000331196],[102.62437799967273,32.945836000368494],[102.6323185561171,32.960586175664275],[102.62212200031261,32.96462400003406],[102.60952899984154,32.96436299969485],[102.60688599996877,32.96855699965646],[102.60632600010213,32.98766500014871],[102.6011630003803,32.9918059996968],[102.59845600003516,32.998123000093734],[102.59808100011642,33.010860999713515],[102.59543599969554,33.01505500016427],[102.58252099990752,33.02540700018944],[102.57748000038441,33.02530099998507],[102.57256600018461,33.02094799975619],[102.56790499970481,33.00810200023508],[102.56280200025742,33.010118999733955],[102.5623579998434,33.024980999674796],[102.5647520001941,33.02928100033883],[102.56204099965102,33.03559699998103],[102.55693599965548,33.037612999955144],[102.5518940003075,33.03750600004666],[102.54678900031197,33.039520999961375],[102.50141500008966,33.03854400023393],[102.49630900026926,33.040557999709065]]],"type":"Polygon"},"properties":{"code":"513233100","name":"邛溪镇","cp":[102.63374746802602,32.82576351047847]},"type":"Feature"}],"type":"FeatureCollection"}';const NZe={class:"pasture-management"},kZe={key:0,class:"pasture-map-loading"},FZe={class:"pasture-management-ui"},OZe={class:"pasture-left"},BZe={class:"pasture-side-stack is-left"},zZe={class:"pasture-right"},GZe={class:"pasture-side-stack is-right"},UZe={class:"pasture-map-layer-tools"},Bf=398,zf=190,VZe=12,HZe={__name:"index",emits:["module-stats","loading-progress","map-ready"],setup(n,{emit:e}){const t=e,i=zf*2+VZe,r=Wt(null),a=Wt(!1),o=Wt(CT),s=Wt(kp),l=Wt(""),u=Wt(""),c=["牧户数量","户均牦牛头数","户均草地面积","联户数量"];let d=null,h=!1,f=!1,p=0;const m={513233100:"邛溪镇",513233101:"刷经寺镇",513233103:"安曲镇",513233105:"龙日镇",513233200:"安曲镇",513233201:"龙日镇",513233202:"江茸乡",513233203:"查尔玛乡",513233204:"瓦切镇",513233205:"阿木乡",513233206:"壤口乡",513233207:"麦洼乡",513233208:"色地镇"},v={安曲乡:"安曲镇",龙日乡:"龙日镇",瓦切乡:"瓦切镇",色地乡:"色地镇"},g={"4028abc18eecd2af018eecdc44b7086b":"瓦切镇","402881828b486d54018b48741f590270":"查尔玛乡","402881828b486d54018b48740ed7024a":"麦洼乡","402881828b486d54018b48732e1c0044":"安曲镇","4028abc18eec9b97018eeca1538900db":"瓦切镇","402881828b486d54018b48740fb1024c":"安曲镇"},_={尼尕尔让:"瓦切镇",更迫尕:"查尔玛乡",王西卓玛:"麦洼乡",扎花克周:"安曲镇",恰波:"瓦切镇",热布丹:"安曲镇",求甲:"阿木乡",罗尔旦:"阿木乡",扎尔江:"阿木乡",达尔基:"阿木乡",尼科:"瓦切镇",班洛:"阿木乡",拉木共:"阿木乡",尕尔玛:"瓦切镇",尕尔丹:"安曲镇",泽旺甲:"瓦切镇",阿尕:"安曲镇",陈理:"瓦切镇",贡秋卓玛:"阿木乡",更多:"瓦切镇",阿泽:"瓦切镇",达勒错:"色地镇",泽朗罗日:"安曲镇",仁青:"瓦切镇",贡多:"阿木乡",泽周:"刷经寺镇",泽科:"瓦切镇",扎巴:"阿木乡",泽真:"瓦切镇",索拉姐:"瓦切镇",尕让罗周:"瓦切镇",尕让拉姆:"瓦切镇",更让尼玛:"阿木乡",向秋卓玛:"瓦切镇",东科:"阿木乡",扑瓦甲:"阿木乡"},S=Re(DZe),x=Ye(()=>{const _e=B3("grassland","grassland-distribution");return _e?[tn(wt({},_e),{name:"草场边界",legends:[{name:"草场边界",fillColor:"#1D953F",strokeColor:"#1D953F"}]})]:[]}),A=Ye(()=>l.value&&x.value.find(_e=>_e.key===l.value)||null),C=Ye(()=>{var _e;return(((_e=A.value)==null?void 0:_e.legends)||[]).find(ze=>ze.key===u.value)||null}),M=Ye(()=>{var ze;const _e=A.value;return _e?(ze=C.value)!=null&&ze.cqlFilter?tn(wt({},_e),{cqlFilter:C.value.cqlFilter,activeLegend:C.value,name:C.value.name||_e.name}):_e:null}),I=Ye(()=>_t(o.value.core).length?_t(o.value.core):Wte),D=Ye(()=>Ue(o.value.distribution).length?Ue(o.value.distribution):rL),E=Ye(()=>xt(o.value.online).length?xt(o.value.online):$te),P=Ye(()=>Bt(o.value.age).length?Bt(o.value.age):bXe),F=Ye(()=>Ce(o.value.age).length?Ce(o.value.age):Yte),V=Ye(()=>Vt(s.value).length?Vt(s.value):xXe),G=Ye(()=>Zt(s.value).length?Zt(s.value):wXe),W=Ye(()=>({title:"牧户分布排行",metricLabel:"牧户",unit:"户",hideMapLabels:!1,hideTownNames:!1,showBars:!1,showPointMarkers:!1,rows:(D.value.length?D.value:TXe).slice(0,8).map(_e=>({name:_e.name,value:Number(_e.value)||0,unit:_e.unit||"户"}))})),Y=Ye(()=>({key:"pasture-town",type:"bar",variant:"distribution",rows:D.value})),Q=Ye(()=>({key:"pasture-grassland-area",type:"heat",rows:V.value})),K=Ye(()=>({key:"pasture-season",type:"stackColumn",segments:[{key:"summer",name:"夏草场"},{key:"winter",name:"冬草场"}],rows:G.value.slice(0,7)})),ae=Ye(()=>({key:"pasture-online",type:"line",rows:E.value})),ie=Ye(()=>({key:"pasture-age",type:"column",variant:"slim",rows:P.value})),he=Ye(()=>({key:"pasture-gender",type:"donut",rows:F.value})),Ee=Ye(()=>({key:"pasture-herdsman-list",type:"projectTable",searchPlaceholder:"搜索牧户 / 乡镇",emptyText:"无匹配牧户",searchKeys:["name","township","id","grasslandArea"],columns:[{key:"name",label:"牧户名称",field:"name",width:"30%"},{key:"grasslandArea",label:"草场面积",field:"grasslandArea",width:"28%",align:"right",strong:!0,format:"number",unit:"亩"},{key:"township",label:"区域",field:"township",width:"24%"},{key:"locate",label:"定位",field:"locateText",width:"18%",align:"center",fallback:"定位"}],rows:s.value}));dl(()=>{Ft(),Ae(),He()}),Bl(()=>{var _e,ze;f=!0,(ze=(_e=r.value)==null?void 0:_e.destroyMap)==null||ze.call(_e)});function He(){return rn(this,null,function*(){try{const _e=yield yXe();if(f)return;o.value=wt(wt({},CT),_e),Ft();const ze=We(_e.list);s.value=ze.length?ze:$e(kp),xe(s.value)}catch(_e){o.value=CT,s.value=$e(kp)}})}function xe(){return rn(this,arguments,function*(_e=[]){const ze=++p,Qe=(Array.isArray(_e)?_e:[]).filter(ft=>(ft==null?void 0:ft.township)==="--"&&Ln(ft)).slice(0,80);if(!Qe.length)return;const At=yield Kt(Qe,5,ft=>rn(this,null,function*(){const en=Ln(ft);let we=[],Xe=null;try{we=Ot(yield bM(en))}catch(Fn){we=[]}let Pt=wn(ft,we)||Be(ft,ft.name,en);if(!Pt){try{Xe=yield gXe(en)}catch(Fn){Xe=null}Pt=bt(Xe)}const Rt=!!(en||we.some(an)||an(ft));if(!Pt&&!we.length&&Rt===ft.canLocate)return null;const Et={key:ft.key,id:ft.id,realPastureId:en,name:ft.name,township:Pt||ft.township,grasslands:we.length?we:ft.grasslands,canLocate:Rt,locateText:Rt?"定位":"--"};return Fe(Et,ze),Et}));if(f||ze!==p)return;const ke=new Map;At.filter(Boolean).forEach(ft=>{[ft.key,ft.id,ft.realPastureId,ft.name].filter(Boolean).forEach(en=>{ke.set(String(en),ft)})}),ke.size&&pt(ke)})}function Fe(_e,ze=p){if(!_e||f||ze!==p)return;const Qe=new Map;[_e.key,_e.id,_e.realPastureId,_e.name].filter(Boolean).forEach(At=>{Qe.set(String(At),_e)}),pt(Qe)}function pt(_e){_e!=null&&_e.size&&(s.value=s.value.map(ze=>{const Qe=[ze.key,ze.id,ze.realPastureId,ze.name].filter(Boolean).map(ke=>_e.get(String(ke))).find(Boolean);if(!Qe)return ze;const At=Qe.township&&Qe.township!=="--"?Qe.township:ze.township;return tn(wt({},ze),{township:At,grasslands:Qe.grasslands,canLocate:Qe.canLocate,locateText:Qe.locateText,searchText:[ze.name,At,ze.id].filter(Boolean).join(" ")})}))}function Ot(_e=[]){const ze=[];return(Array.isArray(_e)?_e:[]).forEach(Qe=>{const At=cn(Qe);At.length?ze.push(...At):Qe&&typeof Qe=="object"&&ze.push(Qe)}),ze}function bt(_e){const ze=Array.isArray(_e)?_e:Array.isArray(_e==null?void 0:_e.rows)?_e.rows:Array.isArray(_e==null?void 0:_e.list)?_e.list:Array.isArray(_e==null?void 0:_e.data)?_e.data:[_e];for(const Qe of ze.filter(Boolean)){const At=Array.isArray(Qe==null?void 0:Qe.fields)?Qe.fields:Array.isArray(Qe==null?void 0:Qe.children)?Qe.children:[],ke=Ht(Qe,["township","townName","town_name","areaName","area_name","fullName","full_name","address","牧场所在区域"]);if(ke)return zn(ht(ke));for(const en of At){const we=String((en==null?void 0:en.name)||(en==null?void 0:en.label)||(en==null?void 0:en.title)||"").trim(),Xe=Ht(en,["value","text","content"]);if(Xe&&/区域|地址|乡镇/.test(we))return zn(ht(Xe))}const ft=Object.entries(Qe||{}).filter(([en])=>/fullName|full_name|address|areaName|area_name|town/i.test(en)).map(([,en])=>en);for(const en of ft)if(en)return zn(ht(en))}return""}function ht(_e){const ze=String(_e||"").trim();if(!ze||ze==="--")return"";const Qe=ze.match(/([\u4e00-\u9fa5]{1,12}(?:镇|乡))/);return(Qe==null?void 0:Qe[1])||ze}function Kt(_e,ze,Qe){return rn(this,null,function*(){const At=new Array(_e.length);let ke=0;const ft=Array.from({length:Math.min(ze,_e.length)},()=>rn(this,null,function*(){for(;ke<_e.length;){const en=ke;ke+=1,At[en]=yield Qe(_e[en],en)}}));return yield Promise.all(ft),At})}function Tt(_e){return rn(this,null,function*(){var en,we,Xe,Pt,Rt,Et;if(!je(_e)){(we=(en=r.value)==null?void 0:en.focusPasture)==null||we.call(en,{name:_e==null?void 0:_e.name});return}const ze=Ln(_e);let Qe=[];if(ze)try{Qe=yield bM(ze)}catch(Fn){Qe=[]}const At=cn(_e),ke=Qe.filter(an),ft=ke.length?ke:At;if(!ft.length){(Pt=(Xe=r.value)==null?void 0:Xe.focusPasture)==null||Pt.call(Xe,{name:_e==null?void 0:_e.name});return}(Et=(Rt=r.value)==null?void 0:Rt.focusPasture)==null||Et.call(Rt,{name:_e==null?void 0:_e.name,grasslands:ft})})}function Ae(){var _e,ze,Qe;d=new am,h=!1,t("loading-progress",{progress:0}),(ze=(_e=d.instance)==null?void 0:_e.on)==null||ze.call(_e,"onProgress",(At,ke,ft)=>{t("loading-progress",{progress:Math.floor(ke/(ft||1)*100),path:At,itemsLoaded:ke,itemsTotal:ft})}),(Qe=d.ready)==null||Qe.then(()=>{h=!0,vt()}).catch(()=>{a.value=!0,t("map-ready")})}function Lt(){h&&vt()}function vt(_e=0){return rn(this,null,function*(){var Qe,At;if(f||!h||!d)return;yield Qs();const ze=r.value;if((Qe=ze==null?void 0:ze.loadMap)==null||Qe.call(ze,d),ze!=null&&ze.canvasMap){a.value=!0,t("loading-progress",{progress:100}),t("map-ready"),(At=ze.play)==null||At.call(ze);return}if(_e<24){window.setTimeout(()=>vt(_e+1),120);return}a.value=!0,t("map-ready")})}function Ft(){t("module-stats",{moduleKey:"pasture-management",items:k().map(_e=>({zh:_e.name,name:_e.name,value:_e.value,unit:_e.unit,decimals:Number.isInteger(Number(_e.value))?0:2}))})}function k(){const _e=new Map;return(Array.isArray(I.value)?I.value:[]).forEach(ze=>{!(ze!=null&&ze.name)||ee(ze.name)||_e.set(ze.name,ze)}),c.map(ze=>_e.get(ze)||jte.find(Qe=>Qe.name===ze||Qe.zh===ze)).filter(Boolean).slice(0,4)}function _t(_e=[]){return(Array.isArray(_e)?_e:[]).map((ze,Qe)=>{const At=ze.key||ze.id||ze.code||ze.name||ze.zh||`${Qe}`,ke=ze.name||ze.title||ze.label||ze.zh,ft=Ct(ke,At),en=Ht(ze,["value","num","count","dataValue"]);if(!ft||en===void 0||en===null||en==="")return null;const we=J(ft,en,ze.unit||ze.dw||"");return{key:At,name:we.name,value:we.value,unit:we.unit,icon:ze.icon||["town","area","yield","rate"][Qe%4]}}).filter(Boolean)}function Ct(_e,ze){const Qe=String(_e||ze||""),At=String(ze||"").toLowerCase();return/avg.*yak|yak.*avg|yak.*household|yak.*per|hjyak/.test(At)||/户均.*牦牛|牦牛.*户均/.test(Qe)?"户均牦牛头数":/avg.*grass|grass.*avg|grass.*household|grass.*per/.test(At)||/户均.*草地|草地.*户均/.test(Qe)?"户均草地面积":/income|revenue|人均收入/.test(At)||Qe.includes("人均收入")?"人均收入":/poverty|monitor|防反贫|监测户/.test(At)||Qe.includes("防反贫")||Qe.includes("监测户")?"防反贫监测户":/joint|union|link|联户/.test(At)||Qe.includes("联户")?"联户数量":/herdsman|muhu|pasture.*count|牧户数量/.test(At)||Qe.includes("牧户数量")?"牧户数量":/yak/.test(At)||Qe.includes("牦牛")?null:/grass/.test(At)||Qe.includes("草地面积")?"草地面积":/wet/.test(At)||Qe.includes("湿地")?"湿地面积":Qe.includes("牧户")||Qe.includes("牧场")?"牧户数量":/project/.test(At)||Qe.includes("工程")||Qe.includes("项目")?"工程数量":/base/.test(At)||Qe.includes("基地")?"基地数量":Qe}function J(_e,ze,Qe){const At=Number(ze)||0;return _e==="户均牦牛头数"?{name:_e,value:At,unit:Qe||"头"}:_e==="户均草地面积"?{name:_e,value:At,unit:Qe||"亩"}:_e==="人均收入"?{name:_e,value:At,unit:Qe||"元/年"}:_e==="联户数量"||_e==="防反贫监测户"?{name:_e,value:At,unit:Qe||"户"}:(_e.includes("草地")||_e.includes("湿地"))&&!String(Qe).includes("万")?{name:_e,value:Math.round(At/1e4*100)/100,unit:"万亩"}:_e.includes("牧户")?{name:_e,value:At,unit:Qe||"户"}:_e.includes("工程")||_e.includes("项目")||_e.includes("基地")?{name:_e,value:At,unit:Qe||"个"}:{name:_e,value:At,unit:Qe}}function ee(_e){return _e==="草地面积"||_e==="湿地面积"||_e==="区域数量"||_e==="牦牛数量"}function Ue(_e=[]){return(Array.isArray(_e)?_e:[]).map(ze=>{const Qe=Ht(ze,["areaName","area_name","name","townName","zoneName"]),At=Ht(ze,["number","value","count","num","pastureCount","muhuCount","muhu_count"]);return!Qe||At===void 0||At===null||At===""?null:{key:ze.code||ze.areaCode||ze.area_code||Qe,name:Qe,value:Number(At)||0,unit:"户"}}).filter(Boolean).sort((ze,Qe)=>Qe.value-ze.value)}function xt(_e=[]){return(Array.isArray(_e)?_e:[]).map(ze=>{const Qe=Ht(ze,["areaName","area_name","name","townName","zoneName"]),At=Number(Ht(ze,["registeredMuhuCount","registered_muhu_count","registeredCount"])),ke=Number(Ht(ze,["muhuCount","muhu_count","onlineCount"])),ft=Ht(ze,["onlinePercent","uplineRate","upline_rate","onlineRate","value","percent","rate"]),en=ft!=null&&ft!==""?ft:At>0?ke/At*100:void 0;return!Qe||en===void 0||en===null||en===""?null:{key:ze.code||ze.areaCode||ze.area_code||Qe,name:Qe,value:Number(String(en).replace("%",""))||0,unit:"%",extra:Number.isFinite(ke)&&Number.isFinite(At)&&At>0?`${ke}/${At}户`:ze.extra}}).filter(Boolean).slice(0,7)}function Bt(_e=[]){const ze=new Map;return(Array.isArray(_e)?_e:[]).forEach(Qe=>{const At=Ht(Qe,["ageRange","age_range","age","name","label"]),ke=Ht(Qe,["number","value","count","num"]);!At||ke===void 0||ke===null||ke===""||ze.set(At,(ze.get(At)||0)+(Number(ke)||0))}),Array.from(ze.entries()).map(([Qe,At])=>({key:Qe,name:Qe,value:At,unit:"人"}))}function Ce(_e=[]){const ze=new Map;return(Array.isArray(_e)?_e:[]).forEach(Qe=>{const At=Ht(Qe,["sex","gender","name"]),ke=Ht(Qe,["number","value","count","num"]);if(!At||ke===void 0||ke===null||ke==="")return;const ft=String(At).includes("女")?"女":String(At).includes("男")?"男":At;ze.set(ft,(ze.get(ft)||0)+(Number(ke)||0))}),Array.from(ze.entries()).map(([Qe,At])=>({key:Qe,name:Qe,value:At,unit:"人"}))}function We(_e=[]){return(Array.isArray(_e)?_e:[]).map((ze,Qe)=>{const At=Ht(ze,["name","pasturesName","pastures_name","muhuName","muhu_name","pastureName","pasture_name","herdsmanName"]);if(!At)return null;const ke=cn(ze),ft=Yt(ze)||st(ke),en=Ln(ze),we=wn(ze,ke)||Be(ze,At,en),Xe=tn(wt({},ze),{key:ze.key||ze.id||ze.pasturesId||ze.pastures_id||`${At}-${Qe}`,id:en||ze.id||ze.pastureId||ze.pasturesId||ze.pastures_id||ze.muhuId||ze.key,realPastureId:en,name:At,township:we||"--",grasslandArea:ft,acreage:ft,grasslands:ke});return Xe.canLocate=!!(en||ke.some(an)||an(ze)),Xe.locateText=Xe.canLocate?"定位":"--",Xe.value=Xe.grasslandArea,Xe.unit="亩",Xe.searchText=[Xe.name,Xe.township,Xe.id].filter(Boolean).join(" "),Xe}).filter(Boolean).sort(mt)}function $e(_e=[]){return[...Array.isArray(_e)?_e:[]].map(ze=>tn(wt({},ze),{grasslandArea:Yt(ze),acreage:Yt(ze)})).sort(mt)}function mt(_e,ze){const Qe=Yt(_e),At=Yt(ze),ke=Qe>0?1:0,ft=At>0?1:0;if(ke!==ft)return ft-ke;const en=je(_e)?1:0,we=je(ze)?1:0;return en!==we?we-en:Qe!==At?At-Qe:String((_e==null?void 0:_e.name)||"").localeCompare(String((ze==null?void 0:ze.name)||""),"zh-CN")}function Yt(_e={}){const Qe=["acreage","grasslandArea","grassland_area","area","areaRange","area_range","cdAcreage","cd_acreage","totalAcreage","total_acreage","grasslandAcreage","grassland_acreage","pastureArea","pasture_area"].map(ke=>it(_e==null?void 0:_e[ke]));return Qe.find(ke=>ke>0)||Qe.find(ke=>ke===0)||0}function st(_e=[]){return(Array.isArray(_e)?_e:[]).reduce((ze,Qe)=>ze+Yt(Qe),0)}function it(_e){if(typeof _e=="number")return Number.isFinite(_e)?_e:0;const ze=String(_e!=null?_e:"").trim();if(!ze||ze==="--")return 0;const Qe=ze.replace(/,/g,"").match(/-?\d+(?:\.\d+)?/);if(!Qe)return 0;const At=Number(Qe[0]);return Number.isFinite(At)?ze.includes("万")?At*1e4:At:0}function Vt(_e=[]){return nn(_e,ze=>Number(ze.grasslandArea)||0,"万亩",ze=>Math.round(ze/1e4*100)/100)}function Zt(_e=[]){const ze=new Map;return(Array.isArray(_e)?_e:[]).forEach(Qe=>{const At=(Qe==null?void 0:Qe.township)||(Qe==null?void 0:Qe.areaName)||(Qe==null?void 0:Qe.area_name);if(!At||At==="--")return;const ke=ze.get(At)||{key:`${At}-season`,name:At,values:{summer:0,winter:0},total:0,unit:"万亩"};ke.values.summer+=Number(Ht(Qe,["summerAcreage","summer_acreage","summerArea","summer_area"]))||0,ke.values.winter+=Number(Ht(Qe,["winterAcreage","winter_acreage","winterArea","winter_area"]))||0,ke.total=ke.values.summer+ke.values.winter,ze.set(At,ke)}),Array.from(ze.values()).filter(Qe=>Qe.total>0).map(Qe=>tn(wt({},Qe),{value:Math.round(Qe.total/1e4*100)/100,values:{summer:Math.round(Qe.values.summer/1e4*100)/100,winter:Math.round(Qe.values.winter/1e4*100)/100}})).sort((Qe,At)=>At.value-Qe.value)}function nn(_e=[],ze,Qe,At=ke=>ke){const ke=new Map;return(Array.isArray(_e)?_e:[]).forEach(ft=>{const en=(ft==null?void 0:ft.township)||(ft==null?void 0:ft.areaName)||(ft==null?void 0:ft.area_name);if(!en||en==="--")return;const we=ke.get(en)||{key:en,name:en,value:0,unit:Qe},Xe=ze(ft);we.value+=Number(Xe)||0,ke.set(en,we)}),Array.from(ke.values()).map(ft=>tn(wt({},ft),{value:At(ft.value)})).filter(ft=>Number.isFinite(ft.value)&&ft.value>0).sort((ft,en)=>en.value-ft.value)}function cn(_e={}){const ze=[];["grasslands","grasslandList","grasslandRows","landList","plots","features"].forEach(ke=>{const ft=_e==null?void 0:_e[ke];Array.isArray(ft)?ze.push(...ft):Array.isArray(ft==null?void 0:ft.rows)?ze.push(...ft.rows):Array.isArray(ft==null?void 0:ft.list)?ze.push(...ft.list):Array.isArray(ft==null?void 0:ft.data)&&ze.push(...ft.data)});const At=Ht(_e,["wkt","geo","geom","geometryWkt","geometry_wkt","shape","location"]);return(At||_e!=null&&_e.geometry)&&ze.push(tn(wt({},_e),{id:(_e==null?void 0:_e.grasslandId)||(_e==null?void 0:_e.gid)||(_e==null?void 0:_e.id),pastureId:(_e==null?void 0:_e.pastureId)||(_e==null?void 0:_e.pasturesId)||(_e==null?void 0:_e.pastures_id)||(_e==null?void 0:_e.muhuId)||(_e==null?void 0:_e.id),name:(_e==null?void 0:_e.grasslandName)||(_e==null?void 0:_e.name),wkt:At,geometry:_e==null?void 0:_e.geometry})),ze.filter(Boolean)}function an(_e={}){var ze,Qe;return typeof _e=="string"?!!_e.trim():(_e==null?void 0:_e.type)==="Feature"||_e!=null&&_e.type&&(_e!=null&&_e.coordinates)||(ze=_e==null?void 0:_e.geometry)!=null&&ze.type||(Qe=_e==null?void 0:_e.geometry)!=null&&Qe.coordinates||typeof(_e==null?void 0:_e.geometry)=="string"?!0:!!Ht(_e,["wkt","geo","geom","geometryWkt","geometry_wkt","shape","location"])}function Ln(_e={}){const ze=(_e==null?void 0:_e.realPastureId)||(_e==null?void 0:_e.pastureId)||(_e==null?void 0:_e.pasturesId)||(_e==null?void 0:_e.pastures_id)||(_e==null?void 0:_e.muhuId)||(_e==null?void 0:_e.id);return ze==null||ze===""?null:ze}function je(_e={}){return _e!=null&&_e.canLocate||Ln(_e)||an(_e)?!0:cn(_e).some(an)}function Ht(_e={},ze=[]){for(const Qe of ze){const At=_e==null?void 0:_e[Qe];if(At!=null&&At!=="")return At}}function wn(_e={},ze=[]){const Qe=Ht(_e,["township","townName","town_name","areaName","area_name","zoneName","zone_name"]);if(Qe)return zn(Qe);const At=dn(Ht(_e,["areaCode","area_code","townCode","town_code","code"]));if(At)return At;for(const ft of ze){const en=Ht(ft,["township","townName","town_name","areaName","area_name","zoneName","zone_name"]);if(en)return zn(en);const we=dn(Ht(ft,["areaCode","area_code","townCode","town_code","code"]));if(we)return we}const ke=Un(_e);if(ke)return ke;for(const ft of ze){const en=Un(ft);if(en)return en}return""}function zn(_e){const ze=String(_e||"").trim();if(!ze||ze==="--")return"";if(v[ze])return v[ze];if(m[ze])return m[ze];const Qe=dn(ze);return Qe||ze}function Be(_e={},ze="",Qe=""){const At=[Qe,_e.realPastureId,_e.pastureId,_e.pasturesId,_e.pastures_id,_e.muhuId,_e.id];for(const ft of At){const en=g[String(ft||"").trim()];if(en)return zn(en)}const ke=[ze,_e.name,_e.pasturesName,_e.pastures_name,_e.muhuName,_e.muhu_name,_e.pastureName,_e.pasture_name];for(const ft of ke){const en=_[pn(ft)];if(en)return zn(en)}return""}function pn(_e){return String(_e||"").replace(/[·•・..。`´’‘ʼʹ''"“”\s\-—_()()]/g,"").replace(/˙/g,"")}function dn(_e){const ze=String(_e||"").trim();if(!ze)return"";const Qe=ze.replace(/\D/g,"");return Qe&&(m[Qe]||m[Qe.slice(0,9)])||""}function Un(_e={}){const ze=En(_e),Qe=lt(ze);if(!Qe)return"";const At=S.find(ke=>Pi(Qe,ke.geometry));return At!=null&&At.name?zn(At.name):""}function En(_e={}){var At,ke;if((_e==null?void 0:_e.type)==="Feature")return En(_e.geometry);if(_e!=null&&_e.type&&(_e!=null&&_e.coordinates))return _e;if((At=_e==null?void 0:_e.geometry)!=null&&At.type||(ke=_e==null?void 0:_e.geometry)!=null&&ke.coordinates)return _e.geometry;const ze=Ht(_e,["geometry","location","wkt","geo","geom","geometryWkt","geometry_wkt","shape"]);if(!ze||typeof ze!="string")return null;const Qe=ze.trim();if(!Qe)return null;if(Qe.startsWith("{")||Qe.startsWith("["))try{const ft=JSON.parse(Qe);return En(ft)}catch(ft){return null}return Tn(Qe)}function Tn(_e){var ft;const ze=String(_e||"").trim(),Qe=ze.match(/^([A-Z]+)(?:\s+[A-Z]+)?\s*\(/i),At=(ft=Qe==null?void 0:Qe[1])==null?void 0:ft.toUpperCase();if(!At)return null;const ke=ze.slice(ze.indexOf("("));return At==="POINT"?{type:"Point",coordinates:ut(ke)}:At==="MULTIPOINT"?{type:"MultiPoint",coordinates:Nn(ke).map(ut).filter(Boolean)}:At==="LINESTRING"?{type:"LineString",coordinates:Jt(ke)}:At==="MULTILINESTRING"?{type:"MultiLineString",coordinates:Nn(ke).map(Jt).filter(en=>en.length)}:At==="POLYGON"?{type:"Polygon",coordinates:hn(ke)}:At==="MULTIPOLYGON"?{type:"MultiPolygon",coordinates:Nn(ke).map(hn).filter(en=>en.length)}:null}function ut(_e){const ze=String(_e||"").replace(/^\(+|\)+$/g,"").trim().split(/\s+/).slice(0,2).map(Number);return ze.length>=2&&Number.isFinite(ze[0])&&Number.isFinite(ze[1])?[ze[0],ze[1]]:null}function Jt(_e){return String(_e||"").replace(/^\(+|\)+$/g,"").split(",").map(ut).filter(Boolean)}function hn(_e){return Nn(_e).map(Jt).filter(ze=>ze.length>=3)}function Nn(_e){const ze=[];let Qe=0,At=-1;return Array.from(String(_e||"")).forEach((ke,ft)=>{ke==="("?(Qe===0&&(At=ft+1),Qe+=1):ke===")"&&(Qe-=1,Qe===0&&At>=0&&(ze.push(_e.slice(At,ft)),At=-1))}),ze.length?ze:[String(_e||"")]}function Re(_e){try{const ze=typeof _e=="string"?JSON.parse(_e):_e;return((ze==null?void 0:ze.features)||[]).map(Qe=>{var At,ke,ft,en;return{name:((At=Qe==null?void 0:Qe.properties)==null?void 0:At.name)||((ke=Qe==null?void 0:Qe.properties)==null?void 0:ke.areaName)||((ft=Qe==null?void 0:Qe.properties)==null?void 0:ft.townName),code:(en=Qe==null?void 0:Qe.properties)==null?void 0:en.code,geometry:Qe==null?void 0:Qe.geometry}}).filter(Qe=>{var At;return Qe.name&&((At=Qe.geometry)==null?void 0:At.coordinates)})}catch(ze){return[]}}function lt(_e){const ze=sn(_e);if(!ze.length)return null;const Qe=ze.reduce((At,ke)=>({lng:At.lng+ke[0],lat:At.lat+ke[1]}),{lng:0,lat:0});return[Qe.lng/ze.length,Qe.lat/ze.length]}function sn(_e){const ze=[],Qe=At=>{if(Array.isArray(At)){if(At.length>=2&&Number.isFinite(Number(At[0]))&&Number.isFinite(Number(At[1]))){ze.push([Number(At[0]),Number(At[1])]);return}At.forEach(Qe)}};return Qe(_e==null?void 0:_e.coordinates),ze}function Pi(_e,ze){return!_e||!(ze!=null&&ze.coordinates)?!1:ze.type==="Polygon"?er(_e,ze.coordinates):ze.type==="MultiPolygon"?ze.coordinates.some(Qe=>er(_e,Qe)):!1}function er(_e,ze){var en,we,Xe,Pt;const Qe=ze==null?void 0:ze[0];if(!Array.isArray(Qe)||Qe.length<3)return!1;let At=!1;const ke=_e[0],ft=_e[1];for(let Rt=0,Et=Qe.length-1;Rt<Qe.length;Et=Rt++){const Fn=Number((en=Qe[Rt])==null?void 0:en[0]),Qn=Number((we=Qe[Rt])==null?void 0:we[1]),ci=Number((Xe=Qe[Et])==null?void 0:Xe[0]),li=Number((Pt=Qe[Et])==null?void 0:Pt[1]);Qn>ft!=li>ft&&ke<(ci-Fn)*(ft-Qn)/(li-Qn||1e-12)+Fn&&(At=!At)}return At}return(_e,ze)=>{var Qe;return Te(),Pe("div",NZe,[gn(rm,{ref_key:"mapSceneRef",ref:r,class:"pasture-map-scene","active-layer":M.value,"map-ranking":W.value,onSceneMounted:Lt},null,8,["active-layer","map-ranking"]),ze[2]||(ze[2]=O("div",{class:"pasture-map-scrim"},null,-1)),a.value?Dn("",!0):(Te(),Pe("div",kZe,"3D地图加载中")),O("div",FZe,[O("div",OZe,[O("div",BZe,[gn(Mi,{class:"pasture-side-card left-card",title:"牧户区域统计",width:Bf,height:zf},{default:mi(()=>[gn(Cl,{panel:Y.value,compact:""},null,8,["panel"])]),_:1}),gn(Mi,{class:"pasture-side-card left-card",title:"草地面积分布",width:Bf,height:zf},{default:mi(()=>[gn(Cl,{panel:Q.value,compact:""},null,8,["panel"])]),_:1}),gn(Mi,{class:"pasture-side-card left-card",title:"夏冬草场面积",width:Bf,height:zf},{default:mi(()=>[gn(Cl,{panel:K.value,compact:""},null,8,["panel"])]),_:1}),gn(Mi,{class:"pasture-side-card left-card",title:"牧户上线率",width:Bf,height:zf},{default:mi(()=>[gn(Cl,{panel:ae.value,compact:""},null,8,["panel"])]),_:1})])]),O("div",zZe,[O("div",GZe,[gn(Mi,{class:"pasture-side-card right-card",title:"牧户年龄统计",width:Bf,height:zf},{default:mi(()=>[gn(Cl,{panel:ie.value,compact:""},null,8,["panel"])]),_:1}),gn(Mi,{class:"pasture-side-card right-card",title:"牧户性别统计",width:Bf,height:zf},{default:mi(()=>[gn(Cl,{panel:he.value,compact:""},null,8,["panel"])]),_:1}),gn(Mi,{class:"pasture-side-card right-card pasture-list-card",title:"牧户列表",width:Bf,height:i},{default:mi(()=>[gn(Cl,{panel:Ee.value,compact:"",onRowSelect:Tt},null,8,["panel"])]),_:1})])]),O("div",UZe,[gn(UR,{modelValue:l.value,"onUpdate:modelValue":ze[0]||(ze[0]=At=>l.value=At),"selected-legend-key":u.value,"onUpdate:selectedLegendKey":ze[1]||(ze[1]=At=>u.value=At),"topic-key":"grassland",layers:x.value,legends:((Qe=M.value)==null?void 0:Qe.legends)||[],width:232,height:430},null,8,["modelValue","selected-legend-key","layers","legends"])])])])}}},AM=[{key:"family-pasture",name:"家庭生态牧场",color:"#24f6c4",unit:"户",metricLabel:"牧场",width:126},{key:"artificial-grassland",name:"人工草地",color:"#7ee269",unit:"万亩",metricLabel:"草地",width:112},{key:"scale-breeding",name:"规模化养殖基地",subName:"牦牛选育场",color:"#32dcff",unit:"个",metricLabel:"基地",width:132},{key:"forage-storage",name:"防灾减灾",subName:"饲草储备库",color:"#ffe06b",unit:"个",metricLabel:"库点",width:126},{key:"slaughter-processing",name:"屠宰与加工",color:"#ff9a62",unit:"家",metricLabel:"主体",width:112},{key:"farm-equipment",name:"农机装备",color:"#30dcff",unit:"套",metricLabel:"装备",width:112},{key:"social-service",name:"社会化服务",subName:"金融/疫病/银行/保险/培训",color:"#9ea7ff",unit:"个",metricLabel:"主体",width:132}],ine=[{key:"support-disaster-001",name:"嚷口防灾减灾饲草储备库",stageKey:"forage-storage",typeName:"防灾减灾饲草储备库",capacity:1500,capacityUnit:"吨",town:"刷经寺镇",address:"壤口村",status:"正常运营",products:"燕麦草、披碱草、老芒麦",longitude:102.489619,latitude:32.20577086},{key:"support-disaster-002",name:"安曲防灾减灾饲草储备库",stageKey:"forage-storage",typeName:"防灾减灾饲草储备库",capacity:1500,capacityUnit:"吨",town:"安曲镇",address:"夺龙村",status:"正常运营",products:"燕麦草、披碱草、老芒麦",longitude:102.3283137,latitude:32.63727531},{key:"support-disaster-003",name:"瓦切唐日合作社饲草储备库",stageKey:"forage-storage",typeName:"防灾减灾饲草储备库",capacity:1500,capacityUnit:"吨",town:"瓦切镇",address:"唐日村",status:"正常运营",products:"燕麦草、披碱草、老芒麦",longitude:102.6162349,latitude:33.11047864},{key:"support-disaster-004",name:"瓦切牧草交易中心饲草储备库",stageKey:"forage-storage",typeName:"防灾减灾饲草储备库",capacity:1500,capacityUnit:"吨",town:"瓦切镇",address:"达俄村",status:"正常运营",products:"燕麦草、披碱草、老芒麦",longitude:102.6014834,latitude:33.09604707},{key:"support-disaster-005",name:"龙日坝龙日坝村 1 饲草储备库",stageKey:"forage-storage",typeName:"防灾减灾饲草储备库",capacity:1500,capacityUnit:"吨",town:"龙日镇",address:"龙日坝村",status:"正常运营",products:"燕麦草、披碱草、老芒麦",longitude:102.383916,latitude:32.44992916},{key:"support-disaster-006",name:"龙日坝龙日坝村 2 饲草储备库",stageKey:"forage-storage",typeName:"防灾减灾饲草储备库",capacity:1500,capacityUnit:"吨",town:"龙日镇",address:"龙日坝村",status:"正常运营",products:"燕麦草、披碱草、老芒麦",longitude:102.3834086,latitude:32.45041994},{key:"support-disaster-007",name:"江茸乡饲草储备库",stageKey:"forage-storage",typeName:"防灾减灾饲草储备库",capacity:1500,capacityUnit:"吨",town:"江茸乡",address:"茸日玛村",status:"正常运营",products:"燕麦草、披碱草、老芒麦",longitude:102.256868,latitude:32.46996565}],sL=[{key:"support-processing-001",name:"西部牦牛产业集团有限责任公司",stageKey:"slaughter-processing",typeName:"乳制品加工",capacity:3e3,capacityUnit:"吨",outputValue:3e4,town:"邛溪镇",address:"瑞庆西路37号",status:"存续(在营)",products:"牦牛奶粉",longitude:102.5292,latitude:32.7917},{key:"support-processing-002",name:"四川红原菊乐牦牛乳业有限公司",stageKey:"slaughter-processing",typeName:"乳制品加工",capacity:4e3,capacityUnit:"吨",outputValue:7e3,town:"邛溪镇",address:"瑞庆东路76号附6号",status:"存续(在营)",products:"圣舟牦牛奶",longitude:102.5666,latitude:32.8179},{key:"support-processing-003",name:"四川雅克乳业有限公司",stageKey:"slaughter-processing",typeName:"乳制品加工",capacity:1e3,capacityUnit:"吨",outputValue:3e3,town:"邛溪镇",address:"瑞庆西路",status:"存续(在营)",products:"牦牛酸奶、牦牛奶粉",longitude:102.5315,latitude:32.7921},{key:"support-processing-004",name:"四川红原遛遛牛食品有限责任公司",stageKey:"slaughter-processing",typeName:"肉制品加工",capacity:4500,capacityUnit:"吨",outputValue:8e3,town:"邛溪镇",address:"瑞庆东路72号",status:"存续(在营)",products:"风干牦牛肉、卤制牦牛肉",longitude:102.5592,latitude:32.8151},{key:"support-processing-005",name:"四川红原黑帐篷牦牛肉食品有限责任公司",stageKey:"slaughter-processing",typeName:"肉制品加工",capacity:300,capacityUnit:"吨",outputValue:1e3,town:"邛溪镇",address:"瑞庆中路",status:"存续(在营)",products:"风干牦牛肉、牦牛肉礼包",longitude:102.551,latitude:32.7987},{key:"support-processing-006",name:"红原御坊斋牦牛肉制品厂",stageKey:"slaughter-processing",typeName:"肉制品加工",capacity:200,capacityUnit:"吨",outputValue:600,town:"邛溪镇",address:"阳嘎北街",status:"存续(在营)",products:"牛肉干、牦牛肉粒",longitude:102.5431,latitude:32.7962},{key:"support-processing-007",name:"四川牦牛火了生态农业科技有限公司",stageKey:"slaughter-processing",typeName:"肉制品加工",capacity:0,capacityUnit:"吨",outputValue:500,town:"邛溪镇",address:"瑞庆中路13号附1号",status:"存续(在营)",products:"包装牦牛肉干",longitude:102.5402,latitude:32.7958}],WZe=2618,jZe=220605,ij=OR.reduce((n,e)=>n+Number(e.devices||0),0),$Ze=ine.reduce((n,e)=>n+Number(e.capacity||0),0),qZe=sL.reduce((n,e)=>n+Number(e.capacity||0),0);sL.reduce((n,e)=>n+Number(e.outputValue||0),0);new Set(z3.map(n=>n.zoneName)).size;Vu.herdsmanCount,rj(Vu.grasslandArea),rj(Vu.grasslandArea),Vu.baseCount,ine.length,sL.length;function XZe(n){return AM.find(e=>e.key===n)||AM[0]}function rj(n){const e=Number(n||0)/1e4;return Number(e.toFixed(1))}const YZe={class:"yak-industry-chain"},KZe={key:0,class:"industry-map-loading"},ZZe={class:"industry-point-detail__head"},JZe={class:"industry-point-detail__name"},QZe={class:"industry-point-detail__grid"},eJe={class:"industry-bottom-switcher"},tJe={__name:"index",emits:["module-stats","loading-progress","map-ready"],setup(n,{emit:e}){const t=e,i=Wt("family-pasture"),r=Wt(null),a=Wt(!1),o=Wt(null),s=Wt({x:0,y:0});let l=null,u=!1;const c=Ye(()=>XZe(i.value)),d=Ye(()=>{var P;const D=B3("yak-industry-chain","yak-industry-points"),E=(P=D==null?void 0:D.legends)==null?void 0:P.find(F=>{var V;return((V=F.match)==null?void 0:V.value)===i.value});return D&&tn(wt({},D),{activeLegend:E||{key:`yak-industry-empty-${i.value}`,name:c.value.name,fillColor:c.value.color,strokeColor:c.value.color,match:{field:"stageKey",value:i.value}}})}),h=Ye(()=>AM.map(D=>({key:D.key,name:D.name,color:D.color,width:D.width}))),f=Ye(()=>({showTownNames:!0,showBars:!1,showPointMarkers:!1,title:`${c.value.name}排行`,metricLabel:c.value.metricLabel,unit:c.value.unit,rows:[]})),p=Ye(()=>{const D=o.value;return D?[{label:"所属环节",value:M(D.stageName)},{label:"点位类型",value:M(D.categoryName)},{label:"所在乡镇",value:M(D.town)},{label:"村/地址",value:M(D.village||D.address)},{label:"能力规模",value:C(D)},{label:"联系人",value:M(D.contactName)},{label:"联系电话",value:M(D.contactPhone)},{label:"运行状态",value:M(D.status)}].filter(E=>E.value!==void 0&&E.value!==null&&String(E.value).trim()!==""):[]}),m=Ye(()=>{var D,E;return M(((D=o.value)==null?void 0:D.categoryName)||((E=o.value)==null?void 0:E.stageName))}),v=Ye(()=>{var D;return M((D=o.value)==null?void 0:D.name)}),g=Ye(()=>{const V={x:Math.max(24,Math.min(1896,Number(s.value.x||0))),y:Math.max(24,Math.min(1056,Number(s.value.y||0)))},G=V.x>1320,W=G?Math.max(24,V.x-430-28):Math.min(1920-430-24,V.x+28),Y=Math.min(Math.max(V.y-252/2,128),1080-252-116),Q=Math.min(Math.max(V.y-Y,42),252-38);return{left:`${W}px`,top:`${Y}px`,"--point-arrow-top":`${Q}px`,"--point-arrow-side":G?"100%":"0px","--point-arrow-offset":G?"-1px":"-9px","--point-arrow-rotate":G?"-45deg":"135deg"}});dl(S),Bl(()=>{var D,E;u=!0,(E=(D=r.value)==null?void 0:D.destroyMap)==null||E.call(D)});function _(D){i.value=D,A()}function S(){var E,P,F;l=new am,t("loading-progress",{progress:0}),(P=(E=l.instance)==null?void 0:E.on)==null||P.call(E,"onProgress",(V,G,W)=>{t("loading-progress",{progress:Math.floor(G/(W||1)*100),path:V,itemsLoaded:G,itemsTotal:W})});const D=(V=0)=>rn(this,null,function*(){var W,Y;if(u)return;yield Qs();const G=r.value;if((W=G==null?void 0:G.loadMap)==null||W.call(G,l),G!=null&&G.canvasMap){a.value=!0,t("loading-progress",{progress:100}),t("map-ready"),(Y=G.play)==null||Y.call(G);return}if(V<24){window.setTimeout(()=>D(V+1),120);return}a.value=!0,t("map-ready")});(F=l.ready)==null||F.then(D).catch(()=>{a.value=!0,t("map-ready")})}function x(D={}){var P;const E=((P=D.feature)==null?void 0:P.properties)||{};if(E.stageKey){o.value=E,s.value=I(D.screen);return}o.value=null}function A(){var E,P,F,V;o.value=null;const D=((P=(E=r.value)==null?void 0:E.canvasMap)==null?void 0:P.value)||((F=r.value)==null?void 0:F.canvasMap);(V=D==null?void 0:D.clearSelectedFeature)==null||V.call(D)}function C(D){return D.capacity===void 0||D.capacity===null||D.capacity===""?"":`${D.capacity}${D.capacityUnit||""}`}function M(D){return String(D!=null?D:"").replace(/\bcxpt[-_./\s]*/gi,"").replace(/\s+/g," ").trim()}function I(D={}){var Y;const E=document.querySelector("#large-screen"),P=(Y=E==null?void 0:E.getBoundingClientRect)==null?void 0:Y.call(E),F=P!=null&&P.width?1920/P.width:1,V=P!=null&&P.height?1080/P.height:1,G=(P==null?void 0:P.left)||0,W=(P==null?void 0:P.top)||0;return{x:(Number(D.x)-G)*F,y:(Number(D.y)-W)*V}}return(D,E)=>(Te(),Pe("div",YZe,[gn(rm,{ref_key:"mapSceneRef",ref:r,class:"industry-map-scene","active-layer":d.value,"map-ranking":f.value,onFeatureInfo:x},null,8,["active-layer","map-ranking"]),E[0]||(E[0]=O("div",{class:"industry-map-scrim"},null,-1)),a.value?Dn("",!0):(Te(),Pe("div",KZe,"3D地图加载中")),o.value?(Te(),Pe("div",{key:1,class:"industry-point-detail",style:Ji(g.value)},[O("div",ZZe,[O("span",null,De(m.value),1),O("button",{type:"button",title:"关闭",onClick:A},"×")]),O("div",JZe,De(v.value),1),O("div",QZe,[(Te(!0),Pe(bn,null,Bn(p.value,P=>(Te(),Pe("div",{key:P.label,class:"industry-point-detail__row"},[O("span",null,De(P.label),1),O("strong",null,De(P.value),1)]))),128))])],4)):Dn("",!0),O("div",eJe,[gn(y7,{"model-value":i.value,topics:h.value,"onUpdate:modelValue":_},null,8,["model-value","topics"])])]))}},T7="/openApi";function nJe(n,e){return/^https?:\/\//.test(e)?e:`${n}${e.startsWith("/")?e:`/${e}`}`}function A7(n,e,t,i={}){return su(nJe(n,e),{params:t,timeout:i.timeout}).then(iJe)}function iJe(n){if((n==null?void 0:n.success)===!1||(n==null?void 0:n.code)!==void 0&&![0,200,"0","200"].includes(n.code)){const t=new Error((n==null?void 0:n.msg)||(n==null?void 0:n.message)||"接口请求失败");throw t.code=n==null?void 0:n.code,t}return ki(n)}function rJe(n,e=window.location.hash||window.location.pathname,t="智慧管理"){return A7(T7,"/ai/stat/question",{question:n,pagePath:e,pageName:t},{timeout:45e3})}function aJe(n){return A7(T7,"/ai/balance/targets",{question:n},{timeout:18e3}).then(e=>Array.isArray(e)?e:(e==null?void 0:e.rows)||(e==null?void 0:e.list)||[])}function oJe({areaCode:n,pasturesId:e}={}){return A7(T7,"/ai/balance/advice",{areaCode:n,pasturesId:e},{timeout:18e3})}function sJe(){return A7(T7,"/ai/balance/welcome",void 0,{timeout:12e3})}const lJe="/openApi";function uJe(n){return/^https?:\/\//.test(n)?n:`${lJe}${n.startsWith("/")?n:`/${n}`}`}function cJe(n){if((n==null?void 0:n.success)===!1||(n==null?void 0:n.code)!==void 0&&![0,200,"0","200"].includes(n.code)){const t=new Error((n==null?void 0:n.msg)||(n==null?void 0:n.message)||"图表接口请求失败");throw t.code=n==null?void 0:n.code,t}return ki(n)}function dJe(i){return rn(this,arguments,function*(n,e=window.location.hash||window.location.pathname,t="智慧管理"){const r=yield su(uJe("/ai/stat/charts"),{params:{question:n,pagePath:e,pageName:t},timeout:3e4}).then(cJe);return(Array.isArray(r==null?void 0:r.charts)?r.charts:[]).map(hJe).filter(o=>o.rows.length)})}function hJe(n,e){const t=Array.isArray(n==null?void 0:n.rows)?n.rows:[];return{id:(n==null?void 0:n.id)||`smart-chart-${e}`,type:fJe(n==null?void 0:n.type),title:(n==null?void 0:n.title)||`统计图表${e+1}`,subtitle:(n==null?void 0:n.subtitle)||pJe(n==null?void 0:n.source),unit:(n==null?void 0:n.unit)||"",source:(n==null?void 0:n.source)||{},rows:t.map((i,r)=>({key:(i==null?void 0:i.key)||`${(i==null?void 0:i.name)||"row"}-${r}`,name:String((i==null?void 0:i.name)||`指标${r+1}`),value:vJe(i==null?void 0:i.value),rawValue:i==null?void 0:i.value,unit:(i==null?void 0:i.unit)||(n==null?void 0:n.unit)||"",extra:(i==null?void 0:i.extra)||""})).filter(i=>i.name&&Number.isFinite(i.value))}}function fJe(n){return["pie","donut"].includes(n)?"pie":["line","trend"].includes(n)?"line":"bar"}function pJe(n={}){const e=n.table?`来源:${n.table}`:"来源:openApi 统计库",t=n.period?`,${n.period}`:"";return`${e}${t}`}function vJe(n){if(n==null||n==="")return NaN;const e=Number(String(n).replace(/,/g,"").replace(/%/g,""));return Number.isFinite(e)?e:NaN}const mJe={class:"wisdom-management"},gJe={class:"wisdom-chat"},yJe={key:0,class:"wisdom-empty-state"},_Je={class:"wisdom-prompt-grid"},SJe=["disabled","onClick"],bJe={key:0,class:"wisdom-message-mark"},xJe={class:"wisdom-bubble"},wJe={key:0,class:"wisdom-steps"},TJe={key:1,class:"wisdom-digesting"},AJe={key:2,class:"wisdom-chart-list"},CJe={key:3,class:"wisdom-insight-list"},MJe=["innerHTML"],EJe={key:5,class:"wisdom-stream-caret"},PJe={key:6,class:"wisdom-suggestion-list"},RJe=["disabled","onClick"],LJe={key:7,class:"wisdom-choice-list"},IJe=["disabled","onClick"],DJe={class:"wisdom-input-shell"},NJe=["disabled"],kJe=["disabled"],FJe={key:0,class:"wisdom-button-loading"},OJe={__name:"index",setup(n){const e=l0e({loader:()=>u0e(()=>import("./SmartChartRenderer-3aefa042-1782919616283.js"),["./SmartChartRenderer-3aefa042-1782919616283.js","./index-1782919616283.js","./index-47d6f37a-balabala-1782919616283.css","./SmartChartRenderer-8fd37aa6-balabala-1782919616283.css"],import.meta.url),loadingComponent:{template:'<div class="smart-chart-loading">正在绘制统计图表</div>'}}),t=Wt(""),i=Wt([]),r=Wt(!1),a=Wt(null),o=Wt("可以直接询问牦牛数量、草地面积、牧户情况、饲草产量、林地面积、基地分布、畜群结构和交易流通等统计问题。"),s=[{label:"牦牛分布",question:"牦牛分布"},{label:"畜群结构",question:"牦牛结构占比"},{label:"草地面积",question:"草地面积分布"},{label:"草畜平衡",question:"红原县草畜平衡建议"},{label:"湿地类型",question:"湿地类型结构"},{label:"公益林保护",question:"公益林保护等级统计"}];let l=null;dl(()=>{sJe().then(Q=>{const K=(Q==null?void 0:Q.value)||(Q==null?void 0:Q.text)||Q;typeof K=="string"&&K.trim()&&(o.value=K)}).catch(()=>{})}),Bl(()=>{P()});function u(){return`${Date.now()}-${Math.random().toString(16).slice(2)}`}function c(){return rn(this,arguments,function*(Q=t.value){const K=String(Q||"").trim();if(!K||r.value)return;const ae={id:u(),role:"user",text:K},ie={id:u(),role:"assistant",steps:[`正在理解:${K}`],digesting:!0,digestText:"小牧正在匹配业务数据",visibleText:"",fullText:"",streaming:!1,choices:[],charts:[],insights:[],suggestions:[]};if(i.value=[...i.value,ae,ie],t.value="",r.value=!0,yield W(),m(K)){yield h(K,ie.id);return}yield d(K,ie.id)})}function d(Q,K){return rn(this,null,function*(){M(K,{digestText:"正在理解问题并查询统计库"});const ae=rJe(Q,window.location.hash||window.location.pathname,"智慧管理"),ie=dJe(Q,window.location.hash||window.location.pathname,"智慧管理"),[he,Ee]=yield Promise.allSettled([ae,ie]),He=Ee.status==="fulfilled"?Ee.value||[]:[],xe=Ee.status==="rejected"?Ee.reason:null;if(he.status==="fulfilled"){const Fe=he.value,pt=(Fe==null?void 0:Fe.answer)||"小牧暂时没有查到相关统计数据,可以换一种说法再问一次。",Ot=[`正在理解:${Q}`,"已查询统计库","已生成统计回答"];He.length?Ot.push(`已生成 ${He.length} 个数据图表`):xe&&Ot.push("图表生成暂时不可用"),M(K,{digesting:!1,steps:Ot,insights:He.length?A(He):[],suggestions:C(Q,He),allowFollowUp:!0}),E(K,xe?`${pt}
**图表状态**
- ${D(xe,"图表接口暂时不可用,已先返回文字分析。")}`:pt,He);return}if(He.length){M(K,{digesting:!1,steps:[`正在理解:${Q}`,"已查询统计库",`已生成 ${He.length} 个数据图表`,"文字分析暂时不可用"],insights:A(He),suggestions:C(Q,He),allowFollowUp:!0}),E(K,"文字分析服务暂时没有返回结果,已按统计库真实数据生成可视化图表。",He);return}I(K,D(he.reason,"小牧暂时没有获取到统计结果,请稍后再试。"))})}function h(Q,K){return rn(this,null,function*(){M(K,{digestText:"正在检索草畜平衡对象"});try{const ae=yield aJe(Q),ie=v(ae);if(!ie.length){M(K,{digesting:!1,steps:[`正在理解:${Q}`,"未匹配到草畜平衡对象"]}),E(K,"暂时没有匹配到对应的区域或牧户。可以输入更明确的乡镇、村名、牧户或牧场名称,例如“红原县草畜平衡建议”。");return}if(ie.length>1){M(K,{digesting:!1,steps:[`正在理解:${Q}`,"已匹配多个对象,请选择一个继续"],choices:ie.slice(0,8)}),r.value=!1;return}yield p(ie[0],K)}catch(ae){I(K,D(ae,"草畜平衡对象检索失败,请稍后再试。"))}})}function f(Q){return rn(this,null,function*(){if(r.value)return;const K=Q.name||Q.label||"草畜平衡建议",ae={id:u(),role:"user",text:K},ie={id:u(),role:"assistant",steps:[`已选择:${K}`],digesting:!0,digestText:"正在消化草畜平衡数据",visibleText:"",fullText:"",streaming:!1,choices:[],charts:[],insights:[],suggestions:[]};i.value=[...i.value,ae,ie],r.value=!0,yield W(),yield p(Q,ie.id)})}function p(Q,K){return rn(this,null,function*(){const ae=(Q==null?void 0:Q.name)||(Q==null?void 0:Q.label)||"该区域",ie=g(Q);M(K,{steps:[`已锁定:${ae}`,"正在消化草畜平衡数据"],digestText:"正在生成平衡建议"});try{const he=yield oJe(ie);M(K,{digesting:!1,steps:[`已锁定:${ae}`,"已生成草畜平衡建议"]}),E(K,_(ae,he||{}))}catch(he){I(K,D(he,"小牧刚才没有消化成功,请稍后再问一次。"))}})}function m(Q){return/草畜|平衡|承载|载畜|超载|放牧压力|轮牧|休牧|牧场建议|牧户建议/.test(Q)}function v(Q=[]){return Q.map((K,ae)=>({key:(K==null?void 0:K.key)||(K==null?void 0:K.type)||"area_code",value:(K==null?void 0:K.value)||(K==null?void 0:K.id)||(K==null?void 0:K.code)||(K==null?void 0:K.areaCode)||(K==null?void 0:K.pasturesId),name:(K==null?void 0:K.name)||(K==null?void 0:K.label)||(K==null?void 0:K.areaName)||(K==null?void 0:K.pasturesName)||`对象${ae+1}`,raw:K})).filter(K=>K.value||K.name==="红原县")}function g(Q){return(Q==null?void 0:Q.key)==="pasturesId"||(Q==null?void 0:Q.key)==="pastures_id"?{pasturesId:Q.value}:{areaCode:(Q==null?void 0:Q.value)||"513233"}}function _(Q,K={}){const ae=S(K,["areaRange","arearange","area_range","area","acreage"],0),ie=S(K,["yakNumber","yaknumber","yak_number","livestock_capacity","livestockCapacity","livestockcapacity"],0),he=S(K,["level","conclusion"],"暂无等级"),Ee=S(K,["overloadRate","overloadrate","overload_rate"],0),He=S(K,["advice","balanceAdvice","balanceadvice","balance_advice"],"暂无建议,请稍后再试。");return`**${Q}草畜平衡建议**
- 草地面积:${x(ae)} 亩
- 牦牛/载畜量:${x(ie)} 头
- 草畜平衡等级:${he}
- 超载率:${x(Ee)}%
**建议**
${He}`}function S(Q,K,ae=""){for(const ie of K){const he=Q==null?void 0:Q[ie];if(he!=null&&he!=="")return he}return ae}function x(Q){const K=Number(String(Q).replace(/,/g,""));return Number.isFinite(K)?K.toLocaleString("zh-CN",{maximumFractionDigits:2}):Q||"--"}function A(Q=[]){const K=[];return Q.slice(0,2).forEach(ae=>{var Ot;const ie=(ae.rows||[]).map(bt=>tn(wt({},bt),{value:Number(bt.value)})).filter(bt=>bt.name&&Number.isFinite(bt.value));if(!ie.length)return;const he=ae.unit||((Ot=ie.find(bt=>bt.unit))==null?void 0:Ot.unit)||"",Ee=ie.slice().sort((bt,ht)=>ht.value-bt.value),He=ie.reduce((bt,ht)=>bt+ht.value,0),xe=He/ie.length,Fe=Ee[0],pt=Ee[Ee.length-1];K.push({label:"最高",value:`${Fe.name} ${x(Fe.value)}${he}`,note:ae.title}),ie.length>2&&K.push({label:ae.type==="pie"?"占比项":"最低",value:`${pt.name} ${x(pt.value)}${he}`,note:ae.type==="pie"?"最小结构项":"低值区域"}),K.push({label:"合计",value:`${x(He)}${he}`,note:ie.length>1?`覆盖 ${ie.length} 项`:ae.title}),ae.type!=="pie"&&ie.length>1&&K.push({label:"均值",value:`${x(xe)}${he}`,note:"按当前图表项计算"})}),K.slice(0,4)}function C(Q,K=[]){const ae=String(Q||""),ie=[],he=(Ee,He)=>{!ie.some(xe=>xe.question===He)&&He!==ae&&ie.push({label:Ee,question:He})};return(/牦牛|畜群|存栏|牛/.test(ae)||K.some(Ee=>{var He,xe;return(xe=(He=Ee.source)==null?void 0:He.localKey)==null?void 0:xe.includes("yak")}))&&(he("看畜群结构","牦牛结构占比"),he("看存栏预测","牦牛存栏预测"),he("看交易结构","牦牛交易结构")),/草地|草原|饲草|鲜草/.test(ae)&&(he("看草地健康","草地健康占比"),he("看生产力","草地生产力分布"),he("看退化统计","草地退化统计")),/湿地/.test(ae)&&(he("看湿地类型","湿地类型结构"),he("看湿地级别","湿地级别面积统计")),/林地|公益林|森林/.test(ae)&&(he("看权属结构","林地权属结构"),he("看公益林等级","公益林保护等级统计")),/草畜|平衡|承载|载畜/.test(ae)&&(he("看牦牛分布","牦牛分布"),he("看草地面积","草地面积分布")),he("换个图表",`${ae} 图表`),ie.slice(0,3)}function M(Q,K,ae=!0){i.value=i.value.map(ie=>ie.id===Q?wt(wt({},ie),K):ie),ae&&W()}function I(Q,K){M(Q,{digesting:!1,steps:["请求已结束"]}),E(Q,K)}function D(Q,K){const ae=String((Q==null?void 0:Q.message)||"");return(Q==null?void 0:Q.code)===401||(Q==null?void 0:Q.code)==="401"||(Q==null?void 0:Q.code)==="HTTP_401"||/未登录|授权|Unauthorized|HTTP 401/i.test(ae)?"接口需要登录授权。当前智慧管理不会使用假数据,请先完成平台登录或使用 openApi 统计库口径继续问数。":(Q==null?void 0:Q.code)==="REQUEST_TIMEOUT"||/timeout|timed out|超时/i.test(ae)?"服务响应时间较长,请稍后再试,或换一个更具体的问题。":(Q==null?void 0:Q.code)==="REQUEST_ABORTED"||/aborted|abort|signal/i.test(ae)?"本次请求被中断了,请重新发送一次。":/Failed to fetch|NetworkError|Load failed|HTTP 50|HTTP 40/i.test(ae)||/[a-zA-Z]{4,}/.test(ae)?K:ae||K}function E(Q,K,ae=[]){P();const ie=String(K||""),he=ie.length>1200?36:ie.length>700?24:14;let Ee=0;const He=ae.length>0;M(Q,{fullText:ie,visibleText:"",streaming:!0,choices:[],charts:ae}),He&&Y();const xe=()=>{if(Ee=Math.min(Ee+he,ie.length),M(Q,{visibleText:ie.slice(0,Ee),streaming:Ee<ie.length},!He),Ee>=ie.length){l=null,ae.length&&M(Q,{charts:ae},!1),r.value=!1;return}l=window.setTimeout(xe,18)};l=window.setTimeout(xe,0)}function P(){l&&(window.clearTimeout(l),l=null)}function F(Q){const K=G(Q).split(/\r?\n/),ae=[];let ie=[],he=!1;const Ee=()=>{ie.length&&(ae.push(`<${he?"ol":"ul"}>${ie.map(He=>`<li>${V(He)}</li>`).join("")}</${he?"ol":"ul"}>`),ie=[],he=!1)};return K.forEach(He=>{const xe=He.trim();if(!xe){Ee();return}const Fe=xe.match(/^#{1,4}\s+(.+)$/)||xe.match(/^\*\*(.+)\*\*$/);if(Fe){Ee(),ae.push(`<h3>${V(Fe[1])}</h3>`);return}const pt=xe.match(/^\d+[.)、]\s+(.+)$/),Ot=xe.match(/^[-*]\s+(.+)$/);if(pt||Ot){const bt=!!pt;ie.length&&he!==bt&&Ee(),he=bt,ie.push(pt?pt[1]:Ot[1]);return}Ee(),ae.push(`<p>${V(xe)}</p>`)}),Ee(),ae.join("")}function V(Q){return Q.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>")}function G(Q){return String(Q||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function W(){return rn(this,null,function*(){yield Qs(),window.requestAnimationFrame(()=>{a.value&&(a.value.scrollTop=a.value.scrollHeight)})})}function Y(){return rn(this,null,function*(){yield Qs(),window.requestAnimationFrame(()=>{const Q=a.value,K=Q==null?void 0:Q.querySelector(".wisdom-message.is-assistant:last-child .wisdom-chart-list");if(!Q||!K)return;const ae=Q.getBoundingClientRect(),ie=K.getBoundingClientRect();Q.scrollTop+=ie.top-ae.top-12})})}return(Q,K)=>(Te(),Pe("div",mJe,[K[11]||(K[11]=pp('<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)),O("main",gJe,[O("div",{ref_key:"dialogueRef",ref:a,class:Xn(["wisdom-dialogue",{"is-empty":!i.value.length}])},[i.value.length?Dn("",!0):(Te(),Pe("section",yJe,[K[3]||(K[3]=O("div",{class:"wisdom-empty-mark"},[O("span"),O("strong",null,"AI")],-1)),K[4]||(K[4]=O("h2",null,"智慧管理问答",-1)),O("p",null,De(o.value),1),O("div",_Je,[(Te(),Pe(bn,null,Bn(s,ae=>O("button",{key:ae.question,type:"button",disabled:r.value,onClick:ie=>c(ae.question)},De(ae.label),9,SJe)),64))])])),(Te(!0),Pe(bn,null,Bn(i.value,ae=>{var ie,he,Ee,He,xe;return Te(),Pe("article",{key:ae.id,class:Xn(["wisdom-message",`is-${ae.role}`])},[ae.role==="assistant"?(Te(),Pe("div",bJe,[...K[5]||(K[5]=[O("span",null,"牧",-1)])])):Dn("",!0),O("div",xJe,[ae.role==="user"?(Te(),Pe(bn,{key:0},[kr(De(ae.text),1)],64)):(Te(),Pe(bn,{key:1},[(ie=ae.steps)!=null&&ie.length?(Te(),Pe("div",wJe,[(Te(!0),Pe(bn,null,Bn(ae.steps,Fe=>(Te(),Pe("div",{key:Fe,class:"wisdom-step"},[K[6]||(K[6]=O("span",null,null,-1)),kr(De(Fe),1)]))),128))])):Dn("",!0),ae.digesting?(Te(),Pe("div",TJe,[K[7]||(K[7]=O("span",null,null,-1)),K[8]||(K[8]=O("span",null,null,-1)),K[9]||(K[9]=O("span",null,null,-1)),O("em",null,De(ae.digestText||"小牧正在消化中"),1)])):Dn("",!0),(he=ae.charts)!=null&&he.length?(Te(),Pe("div",AJe,[(Te(!0),Pe(bn,null,Bn(ae.charts,Fe=>(Te(),Uo(Tr(e),{key:Fe.id,chart:Fe,onReady:W},null,8,["chart"]))),128))])):Dn("",!0),(Ee=ae.insights)!=null&&Ee.length?(Te(),Pe("div",CJe,[(Te(!0),Pe(bn,null,Bn(ae.insights,Fe=>(Te(),Pe("div",{key:`${Fe.label}-${Fe.value}`,class:"wisdom-insight-item"},[O("span",null,De(Fe.label),1),O("strong",null,De(Fe.value),1),O("em",null,De(Fe.note),1)]))),128))])):Dn("",!0),ae.visibleText?(Te(),Pe("div",{key:4,class:"wisdom-answer",innerHTML:F(ae.visibleText)},null,8,MJe)):Dn("",!0),ae.streaming?(Te(),Pe("span",EJe)):Dn("",!0),(He=ae.suggestions)!=null&&He.length&&(ae.allowFollowUp||!ae.digesting&&!ae.streaming)?(Te(),Pe("div",PJe,[(Te(!0),Pe(bn,null,Bn(ae.suggestions,Fe=>(Te(),Pe("button",{key:Fe.question,type:"button",disabled:r.value,onClick:pt=>c(Fe.question)},De(Fe.label),9,RJe))),128))])):Dn("",!0),(xe=ae.choices)!=null&&xe.length?(Te(),Pe("div",LJe,[(Te(!0),Pe(bn,null,Bn(ae.choices,(Fe,pt)=>(Te(),Pe("button",{key:`${Fe.key||"choice"}-${Fe.value||pt}`,type:"button",disabled:r.value,onClick:Ot=>f(Fe)},De(Fe.name||Fe.label||Fe.value),9,IJe))),128))])):Dn("",!0)],64))])],2)}),128))],2),O("form",{class:"wisdom-input-bar",onSubmit:K[2]||(K[2]=Ws(ae=>c(),["prevent"]))},[O("div",DJe,[K[10]||(K[10]=O("span",{class:"wisdom-input-icon"},null,-1)),to(O("input",{"onUpdate:modelValue":K[0]||(K[0]=ae=>t.value=ae),disabled:r.value,autocomplete:"off",placeholder:"输入牧户、区域或草畜平衡问题",onKeydown:K[1]||(K[1]=V2(Ws(ae=>c(),["prevent"]),["enter"]))},null,40,NJe),[[Kf,t.value]]),O("button",{type:"submit",disabled:r.value||!t.value.trim()},[r.value?(Te(),Pe("span",FJe)):Dn("",!0),O("span",null,De(r.value?"消化中":"发送"),1)],8,kJe)])],32)])]))}},u_=[{key:"home",label:"首页",bottomLabel:"核心指标",status:"ready"},{key:"forest-grass-wet",label:"林草湿一张图",bottomLabel:"林草湿",status:"ready"},{key:"ecological-protection",label:"生态保护",bottomLabel:"生态保护",status:"ready"},{key:"yak-management",label:"牦牛管理",bottomLabel:"牦牛管理",status:"ready"},{key:"pasture-management",label:"牧场管理",bottomLabel:"牧场管理",status:"ready"},{key:"yak-industry-chain",label:"牦牛产业全链",bottomLabel:"产业全链",status:"ready"},{key:"smart-management",label:"智慧管理",bottomLabel:"智慧管理",status:"ready"},{key:"grass-livestock-balance",label:"草畜平衡",bottomLabel:"草畜平衡",status:"ready"}];function BJe(n){return u_.find(e=>e.key===n)||u_[1]}const zJe={key:0,class:"platform-module-pane"},GJe={key:1,class:"platform-module-pane"},UJe={key:2,class:"platform-module-pane"},VJe={key:3,class:"platform-module-pane"},HJe={key:4,class:"platform-module-pane"},WJe={key:5,class:"platform-module-pane"},jJe={key:6,class:"platform-module-pane"},$Je={key:7,class:"platform-module-pane"},qJe={class:"large-screen-wrap"},XJe={class:"top-menu"},YJe={key:0,class:"top-menu-mid-space"},KJe={key:1,class:"module-coming"},ZJe={class:"module-coming-title"},JJe={key:2,class:"bottom-tray"},QJe={class:"bottom-menu"},eQe=["onClick"],tQe={key:8,class:"loading platform-loading"},nQe={class:"loading-progress"},iQe={class:"value"},rQe=1200,aQe={__name:"index",setup(n){const e=Wt("home"),t=Wt("national-park"),i=Wt({home:!0}),r=Wt({}),a=Wt(!0),o=Wt(0);let s=null,l=!1;const u=Date.now(),c={progress:0},d=["xiaoshoujine","zongxiaoliang","xiaoshoujine","zongxiaoliang"],h=Ye(()=>BJe(e.value)),f=Ye(()=>e.value==="ecological-protection"?HW:u_),p=Ye(()=>e.value==="ecological-protection"?t.value:e.value),m=Ye(()=>{const F=r.value[e.value];return Array.isArray(F)||F!=null&&F.length?F:I([{zh:"草地总面积",en:"",value:756.43,unit:"万亩",decimals:2},{zh:"林地总面积",en:"",value:177.92,unit:"万亩",decimals:2},{zh:"湿地面积",en:"",value:291.82,unit:"万亩",decimals:2}])});dl(()=>{s=d_.init({dh:1080,dw:1920,el:"#large-screen",resize:!0}),E()}),Bl(()=>{var F;(F=s==null?void 0:s.off)==null||F.call(s,"#large-screen"),ka.killTweensOf(c)});function v(F){D(F),e.value=F,Qs(E)}function g(F){if(e.value==="ecological-protection"){_(F.key),Qs(E);return}v(F.key)}function _(F){t.value=HW.some(V=>V.key===F)?F:"national-park",Qs(E)}function S(F){const V=F.moduleKey||(F.topicKey?"forest-grass-wet":e.value);r.value=tn(wt({},r.value),{[V]:I(F.items||[])})}function x(F={}){const V=typeof F=="number"?F:F.progress;C(V)}function A(){ka.killTweensOf(c),c.progress=100,o.value=100;const F=Date.now()-u,V=Math.max(180,rQe-F);window.setTimeout(M,V)}function C(F){if(!a.value)return;const V=Math.max(0,Math.min(100,Math.floor(Number(F)||0)));V<o.value||ka.to(c,{progress:V,duration:.35,ease:"power2.out",onUpdate:()=>{o.value=Math.floor(c.progress)}})}function M(){if(!a.value||l)return;l=!0;const F=ka.timeline({onComplete:()=>{a.value=!1}});F.to(".platform-loading .loading-text span",{y:"200%",opacity:0,ease:"power4.inOut",duration:1.4,stagger:.14}),F.to(".platform-loading .loading-progress",{opacity:0,ease:"power4.inOut",duration:1.2},"<"),F.to(".platform-loading",{opacity:0,ease:"power4.inOut",duration:.8},"-=0.55")}function I(F=[]){return F.slice(0,4).map((V,G)=>{var Q;const W=Number(V.value)||0,Y={zh:V.zh||V.name||`指标${G+1}`,en:V.en||"",value:W,unit:V.unit||"",decimals:(Q=V.decimals)!=null?Q:Number.isInteger(W)?0:2};return wt({icon:d[G%d.length]},Y)})}function D(F){["home","forest-grass-wet","ecological-protection","grass-livestock-balance","yak-management","pasture-management","yak-industry-chain","smart-management"].includes(F)&&(i.value[F]||(i.value=tn(wt({},i.value),{[F]:!0})))}function E(){window.scrollTo(0,0),document.documentElement.scrollTop=0,document.body.scrollTop=0;const F=document.querySelector("#app");F&&(F.scrollTop=0)}function P(){c0e()}return(F,V)=>(Te(),Pe("div",{class:Xn(["large-screen platform-screen",{"is-home":h.value.key==="home","is-forest-grass-wet":h.value.key==="forest-grass-wet","is-ecological-protection":h.value.key==="ecological-protection","is-grass-livestock-balance":h.value.key==="grass-livestock-balance","is-yak-management":h.value.key==="yak-management","is-pasture-management":h.value.key==="pasture-management","is-yak-industry-chain":h.value.key==="yak-industry-chain","is-smart-management":h.value.key==="smart-management"}]),id:"large-screen"},[i.value.home?to((Te(),Pe("div",zJe,[gn(qGe,{onLoadingProgress:x,onMapReady:A,onModuleStats:S})],512)),[[wd,h.value.key==="home"]]):Dn("",!0),i.value["forest-grass-wet"]?to((Te(),Pe("div",GJe,[gn(CUe,{"show-loading":!1,onTopicStats:S})],512)),[[wd,h.value.key==="forest-grass-wet"]]):Dn("",!0),i.value["ecological-protection"]?to((Te(),Pe("div",UJe,[gn(rXe,{"active-view":t.value,"show-loading":!1,onModuleStats:S,onViewChange:_},null,8,["active-view"])],512)),[[wd,h.value.key==="ecological-protection"]]):Dn("",!0),i.value["grass-livestock-balance"]?to((Te(),Pe("div",VJe,[gn(EYe,{onLoadingProgress:x,onMapReady:A,onModuleStats:S})],512)),[[wd,h.value.key==="grass-livestock-balance"]]):Dn("",!0),i.value["yak-management"]?to((Te(),Pe("div",HJe,[gn(IZe,{onModuleStats:S})],512)),[[wd,h.value.key==="yak-management"]]):Dn("",!0),i.value["pasture-management"]?to((Te(),Pe("div",WJe,[gn(HZe,{onLoadingProgress:x,onMapReady:A,onModuleStats:S})],512)),[[wd,h.value.key==="pasture-management"]]):Dn("",!0),i.value["yak-industry-chain"]?to((Te(),Pe("div",jJe,[gn(tJe,{onLoadingProgress:x,onMapReady:A,onModuleStats:S})],512)),[[wd,h.value.key==="yak-industry-chain"]]):Dn("",!0),i.value["smart-management"]?to((Te(),Pe("div",$Je,[gn(OJe)],512)),[[wd,h.value.key==="smart-management"]]):Dn("",!0),O("div",qJe,[gn(que,{title:"红原县数字畜牧业监管平台","sub-text":"Hongyuan Digital Animal Husbandry Supervision Platform"},{right:mi(()=>[O("div",{class:"m-header-tools"},[O("button",{class:"logout-button",title:"退出登录",type:"button",onClick:P}," 退出 ")])]),_:1}),O("div",XJe,[gn(Yue,{"default-active":e.value,onSelect:v},{default:mi(()=>[(Te(!0),Pe(bn,null,Bn(Tr(u_),(G,W)=>(Te(),Pe(bn,{key:G.key},[gn(Kue,{index:G.key},{default:mi(()=>[kr(De(G.label),1)]),_:2},1032,["index"]),W===3?(Te(),Pe("div",YJe)):Dn("",!0)],64))),128))]),_:1},8,["default-active"])]),m.value.length&&!["smart-management","grass-livestock-balance","yak-industry-chain"].includes(h.value.key)?(Te(),Pe("div",{key:0,class:Xn(["top-count-card",{"is-four":m.value.length>3}])},[(Te(!0),Pe(bn,null,Bn(m.value,G=>(Te(),Uo(oce,{key:G.zh,info:G},null,8,["info"]))),128))],2)):Dn("",!0),h.value.status!=="ready"?(Te(),Pe("div",KJe,[O("div",ZJe,De(h.value.label),1),V[0]||(V[0]=O("div",{class:"module-coming-text"},"模块建设中,平台框架已预留入口",-1))])):Dn("",!0),["home","forest-grass-wet","ecological-protection","grass-livestock-balance","yak-management","pasture-management","yak-industry-chain","smart-management"].includes(h.value.key)?Dn("",!0):(Te(),Pe("div",JJe,[gn(F5,{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"}),gn(F5,{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"}),V[1]||(V[1]=O("div",{class:"bottom-tray-arrow"},[O("img",{src:M5,alt:""}),O("img",{src:E5,alt:""})],-1)),O("div",QJe,[(Te(!0),Pe(bn,null,Bn(f.value,G=>(Te(),Pe("div",{key:G.key,class:Xn(["bottom-menu-item",{"is-active":G.key===p.value}]),onClick:W=>g(G)},[O("span",null,De(G.bottomLabel),1)],10,eQe))),128))]),V[2]||(V[2]=O("div",{class:"bottom-tray-arrow is-reverse"},[O("img",{src:M5,alt:""}),O("img",{src:E5,alt:""})],-1))])),V[3]||(V[3]=O("div",{class:"large-screen-left-zsline"},null,-1)),V[4]||(V[4]=O("div",{class:"large-screen-right-zsline"},null,-1))]),a.value?(Te(),Pe("div",tQe,[V[6]||(V[6]=pp('<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)),O("div",nQe,[O("span",iQe,De(o.value),1),V[5]||(V[5]=O("span",{class:"unit"},"%",-1))])])):Dn("",!0)],2))}},hQe=Object.freeze(Object.defineProperty({__proto__:null,default:aQe},Symbol.toStringTag,{value:"Module"}));export{Ua as H,po as L,hQe as i};