(self.webpackChunk=self.webpackChunk||[]).push([[25894,42441,43428],{680:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(19973),i=r(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},o=r(22589),s=function(e,t){return i.createElement(o.Z,(0,n.Z)({},e,{ref:t,icon:a}))};var l=i.forwardRef(s)},88522:function(e,t,r){"use strict";var n=r(92310),i=r.n(n),a=r(75440),o=r(55405),s=r(59301),l=r(53487),u=r(92343),h=r(36355),c=r(57809);const{Option:d}=c.default;function f(e){return e&&e.type&&(e.type.isSelectOption||e.type.isSelectOptGroup)}const p=(e,t)=>{const{prefixCls:r,className:n,popupClassName:l,dropdownClassName:p,children:m,dataSource:g}=e,_=(0,a.Z)(m);let v;1===_.length&&(0,u.l$)(_[0])&&!f(_[0])&&([v]=_);const y=v?()=>v:void 0;let x;x=_.length&&f(_[0])?m:g?g.map((e=>{if((0,u.l$)(e))return e;switch(typeof e){case"string":return s.createElement(d,{key:e,value:e},e);case"object":{const{value:t}=e;return s.createElement(d,{key:t,value:t},e.text)}default:return}})):[];const{getPrefixCls:T}=s.useContext(h.E_),b=T("select",r);return s.createElement(c.default,Object.assign({ref:t,suffixIcon:null},(0,o.Z)(e,["dataSource","dropdownClassName"]),{prefixCls:b,popupClassName:l||p,className:i()(`${b}-auto-complete`,n),mode:c.default.SECRET_COMBOBOX_MODE_DO_NOT_USE},{getInputElement:y}),x)},m=s.forwardRef(p),g=(0,l.Z)(m);m.Option=d,m._InternalPanelDoNotUseOrYouWillBeFired=g,t.Z=m},28103:function(e,t,r){"use strict";r.d(t,{Z:function(){return f}});var n=r(92310),i=r.n(n),a=r(59301),o=r(36355),s=r(17313),l=r(83116),u=r(37613);const h=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:n,lineWidth:i,textPaddingInline:a,orientationMargin:o,verticalMarginInline:l}=e;return{[t]:Object.assign(Object.assign({},(0,s.Wf)(e)),{borderBlockStart:`${i}px solid ${n}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:l,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${i}px solid ${n}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${n}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${i}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-left`]:{"&::before":{width:100*o+"%"},"&::after":{width:100-100*o+"%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:100-100*o+"%"},"&::after":{width:100*o+"%"}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:a},"&-dashed":{background:"none",borderColor:n,borderStyle:"dashed",borderWidth:`${i}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:r}}})}};var c=(0,l.Z)("Divider",(e=>{const t=(0,u.TS)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[h(t)]}),(e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}))),d=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{const{getPrefixCls:t,direction:r,divider:n}=a.useContext(o.E_),{prefixCls:s,type:l="horizontal",orientation:u="center",orientationMargin:h,className:f,rootClassName:p,children:m,dashed:g,plain:_,style:v}=e,y=d(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),x=t("divider",s),[T,b]=c(x),w=u.length>0?`-${u}`:u,E=!!m,S="left"===u&&null!=h,M="right"===u&&null!=h,A=i()(x,null==n?void 0:n.className,b,`${x}-${l}`,{[`${x}-with-text`]:E,[`${x}-with-text${w}`]:E,[`${x}-dashed`]:!!g,[`${x}-plain`]:!!_,[`${x}-rtl`]:"rtl"===r,[`${x}-no-default-orientation-margin-left`]:S,[`${x}-no-default-orientation-margin-right`]:M},f,p),C=a.useMemo((()=>"number"==typeof h?h:/^\d+$/.test(h)?Number(h):h),[h]),L=Object.assign(Object.assign({},S&&{marginLeft:C}),M&&{marginRight:C});return T(a.createElement("div",Object.assign({className:A,style:Object.assign(Object.assign({},null==n?void 0:n.style),v)},y,{role:"separator"}),m&&"vertical"!==l&&a.createElement("span",{className:`${x}-inner-text`,style:L},m)))}},43428:function(e,t,r){"use strict";r.d(t,{Z:function(){return H}});var n=r(92310),i=r.n(n),a=r(20985),o=r(8295),s=r(43403),l=r(19171),u=r(59301),h=u.createContext(null),c=u.createContext({}),d=h,f=r(51060),p=r(19973),m=r(43167),g=r(20287),_=r(47413),v=r(83794);var y=function(e){var t=e.prefixCls,r=e.className,n=e.style,o=e.children,s=e.containerRef,l=e.id,h={onMouseEnter:e.onMouseEnter,onMouseOver:e.onMouseOver,onMouseLeave:e.onMouseLeave,onClick:e.onClick,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp},d=u.useContext(c).panel,f=(0,v.useComposeRef)(d,s);return u.createElement(u.Fragment,null,u.createElement("div",(0,p.Z)({id:l,className:i()("".concat(t,"-content"),r),style:(0,a.Z)({},n),"aria-modal":"true",role:"dialog",ref:f},h),o))},x=r(85870);function T(e){return"string"==typeof e&&String(Number(e))===e?((0,x.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var b={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function w(e,t){var r,n,s,l,h=e.prefixCls,c=e.open,v=e.placement,x=e.inline,w=e.push,E=e.forceRender,S=e.autoFocus,M=e.keyboard,A=e.rootClassName,C=e.rootStyle,L=e.zIndex,N=e.className,D=e.id,I=e.style,P=e.motion,O=e.width,R=e.height,F=e.children,B=e.contentWrapperStyle,U=e.mask,z=e.maskClosable,G=e.maskMotion,H=e.maskClassName,k=e.maskStyle,V=e.afterOpenChange,W=e.onClose,j=e.onMouseEnter,X=e.onMouseOver,q=e.onMouseLeave,Z=e.onClick,Y=e.onKeyDown,K=e.onKeyUp,$=u.useRef(),Q=u.useRef(),J=u.useRef();u.useImperativeHandle(t,(function(){return $.current}));u.useEffect((function(){var e;c&&S&&(null===(e=$.current)||void 0===e||e.focus({preventScroll:!0}))}),[c]);var ee=u.useState(!1),te=(0,o.Z)(ee,2),re=te[0],ne=te[1],ie=u.useContext(d),ae=null!==(r=null!==(n=null===(s=!1===w?{distance:0}:!0===w?{}:w||{})||void 0===s?void 0:s.distance)&&void 0!==n?n:null==ie?void 0:ie.pushDistance)&&void 0!==r?r:180,oe=u.useMemo((function(){return{pushDistance:ae,push:function(){ne(!0)},pull:function(){ne(!1)}}}),[ae]);u.useEffect((function(){var e,t;c?null==ie||null===(e=ie.push)||void 0===e||e.call(ie):null==ie||null===(t=ie.pull)||void 0===t||t.call(ie)}),[c]),u.useEffect((function(){return function(){var e;null==ie||null===(e=ie.pull)||void 0===e||e.call(ie)}}),[]);var se=U&&u.createElement(m.default,(0,p.Z)({key:"mask"},G,{visible:c}),(function(e,t){var r=e.className,n=e.style;return u.createElement("div",{className:i()("".concat(h,"-mask"),r,H),style:(0,a.Z)((0,a.Z)({},n),k),onClick:z&&c?W:void 0,ref:t})})),le="function"==typeof P?P(v):P,ue={};if(re&&ae)switch(v){case"top":ue.transform="translateY(".concat(ae,"px)");break;case"bottom":ue.transform="translateY(".concat(-ae,"px)");break;case"left":ue.transform="translateX(".concat(ae,"px)");break;default:ue.transform="translateX(".concat(-ae,"px)")}"left"===v||"right"===v?ue.width=T(O):ue.height=T(R);var he={onMouseEnter:j,onMouseOver:X,onMouseLeave:q,onClick:Z,onKeyDown:Y,onKeyUp:K},ce=u.createElement(m.default,(0,p.Z)({key:"panel"},le,{visible:c,forceRender:E,onVisibleChanged:function(e){null==V||V(e)},removeOnLeave:!1,leavedClassName:"".concat(h,"-content-wrapper-hidden")}),(function(t,r){var n=t.className,o=t.style;return u.createElement("div",(0,p.Z)({className:i()("".concat(h,"-content-wrapper"),n),style:(0,a.Z)((0,a.Z)((0,a.Z)({},ue),o),B)},(0,_.Z)(e,{data:!0})),u.createElement(y,(0,p.Z)({id:D,containerRef:r,prefixCls:h,className:N,style:I},he),F))})),de=(0,a.Z)({},C);return L&&(de.zIndex=L),u.createElement(d.Provider,{value:oe},u.createElement("div",{className:i()(h,"".concat(h,"-").concat(v),A,(l={},(0,f.Z)(l,"".concat(h,"-open"),c),(0,f.Z)(l,"".concat(h,"-inline"),x),l)),style:de,tabIndex:-1,ref:$,onKeyDown:function(e){var t=e.keyCode,r=e.shiftKey;switch(t){case g.Z.TAB:var n;if(t===g.Z.TAB)if(r||document.activeElement!==J.current){if(r&&document.activeElement===Q.current){var i;null===(i=J.current)||void 0===i||i.focus({preventScroll:!0})}}else null===(n=Q.current)||void 0===n||n.focus({preventScroll:!0});break;case g.Z.ESC:W&&M&&(e.stopPropagation(),W(e))}}},se,u.createElement("div",{tabIndex:0,ref:Q,style:b,"aria-hidden":"true","data-sentinel":"start"}),ce,u.createElement("div",{tabIndex:0,ref:J,style:b,"aria-hidden":"true","data-sentinel":"end"})))}var E=u.forwardRef(w);var S=function(e){var t=e.open,r=void 0!==t&&t,n=e.prefixCls,i=void 0===n?"rc-drawer":n,h=e.placement,d=void 0===h?"right":h,f=e.autoFocus,p=void 0===f||f,m=e.keyboard,g=void 0===m||m,_=e.width,v=void 0===_?378:_,y=e.mask,x=void 0===y||y,T=e.maskClosable,b=void 0===T||T,w=e.getContainer,S=e.forceRender,M=e.afterOpenChange,A=e.destroyOnClose,C=e.onMouseEnter,L=e.onMouseOver,N=e.onMouseLeave,D=e.onClick,I=e.onKeyDown,P=e.onKeyUp,O=e.panelRef,R=u.useState(!1),F=(0,o.Z)(R,2),B=F[0],U=F[1];var z=u.useState(!1),G=(0,o.Z)(z,2),H=G[0],k=G[1];(0,l.Z)((function(){k(!0)}),[]);var V=!!H&&r,W=u.useRef(),j=u.useRef();(0,l.Z)((function(){V&&(j.current=document.activeElement)}),[V]);var X=u.useMemo((function(){return{panel:O}}),[O]);if(!S&&!B&&!V&&A)return null;var q={onMouseEnter:C,onMouseOver:L,onMouseLeave:N,onClick:D,onKeyDown:I,onKeyUp:P},Z=(0,a.Z)((0,a.Z)({},e),{},{open:V,prefixCls:i,placement:d,autoFocus:p,keyboard:g,width:v,mask:x,maskClosable:b,inline:!1===w,afterOpenChange:function(e){var t,r;(U(e),null==M||M(e),e||!j.current||null!==(t=W.current)&&void 0!==t&&t.contains(j.current))||(null===(r=j.current)||void 0===r||r.focus({preventScroll:!0}))},ref:W},q);return u.createElement(c.Provider,{value:X},u.createElement(s.Z,{open:V||S||B,autoDestroy:!1,getContainer:w,autoLock:x&&(V||B)},u.createElement(E,Z)))},M=r(62892),A=r(36355),C=r(32441),L=r(47729);var N=e=>{const{prefixCls:t,title:r,footer:n,extra:a,closeIcon:o,closable:s,onClose:l,headerStyle:h,drawerStyle:c,bodyStyle:d,footerStyle:f,children:p}=e,m=u.useCallback((e=>u.createElement("button",{type:"button",onClick:l,"aria-label":"Close",className:`${t}-close`},e)),[l]),[g,_]=(0,L.Z)(s,o,m,void 0,!0),v=u.useMemo((()=>r||g?u.createElement("div",{style:h,className:i()(`${t}-header`,{[`${t}-header-close-only`]:g&&!r&&!a})},u.createElement("div",{className:`${t}-header-title`},_,r&&u.createElement("div",{className:`${t}-title`},r)),a&&u.createElement("div",{className:`${t}-extra`},a)):null),[g,_,a,h,t,r]),y=u.useMemo((()=>{if(!n)return null;const e=`${t}-footer`;return u.createElement("div",{className:e,style:f},n)}),[n,f,t]);return u.createElement("div",{className:`${t}-wrapper-body`,style:c},v,u.createElement("div",{className:`${t}-body`,style:d},p),y)},D=r(33234),I=r(83116),P=r(37613);var O=e=>{const{componentCls:t,motionDurationSlow:r}=e,n={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${r}`}}};return{[t]:{[`${t}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${r}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${t}-panel-motion`]:{"&-left":[n,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[n,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[n,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[n,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const R=e=>{const{componentCls:t,zIndexPopup:r,colorBgMask:n,colorBgElevated:i,motionDurationSlow:a,motionDurationMid:o,padding:s,paddingLG:l,fontSizeLG:u,lineHeightLG:h,lineWidth:c,lineType:d,colorSplit:f,marginSM:p,colorIcon:m,colorIconHover:g,colorText:_,fontWeightStrong:v,footerPaddingBlock:y,footerPaddingInline:x}=e,T=`${t}-content-wrapper`;return{[t]:{position:"fixed",inset:0,zIndex:r,pointerEvents:"none","&-pure":{position:"relative",background:i,[`&${t}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${t}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${t}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${t}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${t}-mask`]:{position:"absolute",inset:0,zIndex:r,background:n,pointerEvents:"auto"},[T]:{position:"absolute",zIndex:r,maxWidth:"100vw",transition:`all ${a}`,"&-hidden":{display:"none"}},[`&-left > ${T}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${T}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${T}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${T}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${t}-content`]:{width:"100%",height:"100%",overflow:"auto",background:i,pointerEvents:"auto"},[`${t}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${t}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${s}px ${l}px`,fontSize:u,lineHeight:h,borderBottom:`${c}px ${d} ${f}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${t}-extra`]:{flex:"none"},[`${t}-close`]:{display:"inline-block",marginInlineEnd:p,color:m,fontWeight:v,fontSize:u,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${o}`,textRendering:"auto","&:focus, &:hover":{color:g,textDecoration:"none"}},[`${t}-title`]:{flex:1,margin:0,color:_,fontWeight:e.fontWeightStrong,fontSize:u,lineHeight:h},[`${t}-body`]:{flex:1,minWidth:0,minHeight:0,padding:l,overflow:"auto"},[`${t}-footer`]:{flexShrink:0,padding:`${y}px ${x}px`,borderTop:`${c}px ${d} ${f}`},"&-rtl":{direction:"rtl"}}}};var F=(0,I.Z)("Drawer",(e=>{const t=(0,P.TS)(e,{});return[R(t),O(t)]}),(e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}))),B=r(11575),U=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{const{rootClassName:t,width:r,height:n,size:a="default",mask:o=!0,push:s=z,open:l,afterOpenChange:h,onClose:c,prefixCls:d,getContainer:f,style:p,className:m,visible:g,afterVisibleChange:_}=e,v=U(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:y,getPrefixCls:x,direction:T,drawer:b}=u.useContext(A.E_),w=x("drawer",d),[E,L]=F(w),I=void 0===f&&y?()=>y(document.body):f,P=i()({"no-mask":!o,[`${w}-rtl`]:"rtl"===T},t,L);const O=u.useMemo((()=>null!=r?r:"large"===a?736:378),[r,a]),R=u.useMemo((()=>null!=n?n:"large"===a?736:378),[n,a]),G={motionName:(0,M.m)(w,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},H=(0,B.H)();return E(u.createElement(D.BR,null,u.createElement(C.Ux,{status:!0,override:!0},u.createElement(S,Object.assign({prefixCls:w,onClose:c,maskMotion:G,motion:e=>({motionName:(0,M.m)(w,`panel-motion-${e}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500})},v,{open:null!=l?l:g,mask:o,push:s,width:O,height:R,style:Object.assign(Object.assign({},null==b?void 0:b.style),p),className:i()(null==b?void 0:b.className,m),rootClassName:P,getContainer:I,afterOpenChange:null!=h?h:_,panelRef:H}),u.createElement(N,Object.assign({prefixCls:w},v,{onClose:c}))))))};G._InternalPanelDoNotUseOrYouWillBeFired=e=>{const{prefixCls:t,style:r,className:n,placement:a="right"}=e,o=U(e,["prefixCls","style","className","placement"]),{getPrefixCls:s}=u.useContext(A.E_),l=s("drawer",t),[h,c]=F(l),d=i()(l,`${l}-pure`,`${l}-${a}`,c,n);return h(u.createElement("div",{className:d,style:r},u.createElement(N,Object.assign({prefixCls:l},o))))};var H=G},97774:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=Object.assign||function(e){for(var t=1;t0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i),e},s.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]},s.cross=function(e,t,r){var n=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=n,e},s.lerp=function(e,t,r,n){var i=t[0],a=t[1];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e},s.random=function(e,t){t=t||1;var r=2*n()*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e},s.transformMat2=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i,e[1]=r[1]*n+r[3]*i,e},s.transformMat2d=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i+r[4],e[1]=r[1]*n+r[3]*i+r[5],e},s.transformMat3=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[3]*i+r[6],e[1]=r[1]*n+r[4]*i+r[7],e},s.transformMat4=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[4]*i+r[12],e[1]=r[1]*n+r[5]*i+r[13],e},s.forEach=(o=s.create(),function(e,t,r,n,i,a){var s,l;for(t||(t=2),r||(r=0),l=n?Math.min(n*t+r,e.length):e.length,s=r;s0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e},l.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},l.cross=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=i*l-a*s,e[1]=a*o-n*l,e[2]=n*s-i*o,e},l.lerp=function(e,t,r,n){var i=t[0],a=t[1],o=t[2];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e},l.random=function(e,t){t=t||1;var r=2*n()*Math.PI,i=2*n()-1,a=Math.sqrt(1-i*i)*t;return e[0]=Math.cos(r)*a,e[1]=Math.sin(r)*a,e[2]=i*t,e},l.transformMat4=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,e[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,e[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,e},l.transformMat3=function(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e},l.transformQuat=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2],u=r[3],h=u*n+s*a-l*i,c=u*i+l*n-o*a,d=u*a+o*i-s*n,f=-o*n-s*i-l*a;return e[0]=h*u+f*-o+c*-l-d*-s,e[1]=c*u+f*-s+d*-o-h*-l,e[2]=d*u+f*-l+h*-s-c*-o,e},l.rotateX=function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},l.rotateY=function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},l.rotateZ=function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},l.forEach=function(){var e=l.create();return function(t,r,n,i,a,o){var s,l;for(r||(r=3),n||(n=0),l=i?Math.min(i*r+n,t.length):t.length,s=n;s1?0:Math.acos(i)},l.str=function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},void 0!==e&&(e.vec3=l);var u={create:function(){var e=new r(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e},clone:function(e){var t=new r(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},fromValues:function(e,t,n,i){var a=new r(4);return a[0]=e,a[1]=t,a[2]=n,a[3]=i,a},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},set:function(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e},add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e},subtract:function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}};u.sub=u.subtract,u.multiply=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e},u.mul=u.multiply,u.divide=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e},u.div=u.divide,u.min=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e},u.max=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e},u.scale=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e},u.scaleAndAdd=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},u.distance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+a*a)},u.dist=u.distance,u.squaredDistance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return r*r+n*n+i*i+a*a},u.sqrDist=u.squaredDistance,u.length=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)},u.len=u.length,u.squaredLength=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i},u.sqrLen=u.squaredLength,u.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},u.inverse=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},u.normalize=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e[3]=t[3]*o),e},u.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},u.lerp=function(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=t[3];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e[3]=s+n*(r[3]-s),e},u.random=function(e,t){return t=t||1,e[0]=n(),e[1]=n(),e[2]=n(),e[3]=n(),u.normalize(e,e),u.scale(e,e,t),e},u.transformMat4=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e},u.transformQuat=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2],u=r[3],h=u*n+s*a-l*i,c=u*i+l*n-o*a,d=u*a+o*i-s*n,f=-o*n-s*i-l*a;return e[0]=h*u+f*-o+c*-l-d*-s,e[1]=c*u+f*-s+d*-o-h*-l,e[2]=d*u+f*-l+h*-s-c*-o,e},u.forEach=function(){var e=u.create();return function(t,r,n,i,a,o){var s,l;for(r||(r=4),n||(n=0),l=i?Math.min(i*r+n,t.length):t.length,s=n;s.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(l.cross(p,t,r),e[0]=p[0],e[1]=p[1],e[2]=p[2],e[3]=1+n,v.normalize(e,e))}),v.setAxes=(_=d.create(),function(e,t,r,n){return _[0]=r[0],_[3]=r[1],_[6]=r[2],_[1]=n[0],_[4]=n[1],_[7]=n[2],_[2]=-t[0],_[5]=-t[1],_[8]=-t[2],v.normalize(e,v.fromMat3(e,_))}),v.clone=u.clone,v.fromValues=u.fromValues,v.copy=u.copy,v.set=u.set,v.identity=function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},v.setAxisAngle=function(e,t,r){r*=.5;var n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e},v.add=u.add,v.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],l=r[1],u=r[2],h=r[3];return e[0]=n*h+o*s+i*u-a*l,e[1]=i*h+o*l+a*s-n*u,e[2]=a*h+o*u+n*l-i*s,e[3]=o*h-n*s-i*l-a*u,e},v.mul=v.multiply,v.scale=u.scale,v.rotateX=function(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=n*l+o*s,e[1]=i*l+a*s,e[2]=a*l-i*s,e[3]=o*l-n*s,e},v.rotateY=function(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=n*l-a*s,e[1]=i*l+o*s,e[2]=a*l+n*s,e[3]=o*l-i*s,e},v.rotateZ=function(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=n*l+i*s,e[1]=i*l-n*s,e[2]=a*l+o*s,e[3]=o*l-a*s,e},v.calculateW=function(e,t){var r=t[0],n=t[1],i=t[2];return e[0]=r,e[1]=n,e[2]=i,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i)),e},v.dot=u.dot,v.lerp=u.lerp,v.slerp=function(e,t,r,n){var i,a,o,s,l,u=t[0],h=t[1],c=t[2],d=t[3],f=r[0],p=r[1],m=r[2],g=r[3];return(a=u*f+h*p+c*m+d*g)<0&&(a=-a,f=-f,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),e[0]=s*u+l*f,e[1]=s*h+l*p,e[2]=s*c+l*m,e[3]=s*d+l*g,e},v.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a,s=o?1/o:0;return e[0]=-r*s,e[1]=-n*s,e[2]=-i*s,e[3]=a*s,e},v.conjugate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e},v.length=u.length,v.len=v.length,v.squaredLength=u.squaredLength,v.sqrLen=v.squaredLength,v.normalize=u.normalize,v.fromMat3=function(e,t){var r,n=t[0]+t[4]+t[8];if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[3*i+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(t[3*i+i]-t[3*a+a]-t[3*o+o]+1),e[i]=.5*r,r=.5/r,e[3]=(t[3*a+o]-t[3*o+a])*r,e[a]=(t[3*a+i]+t[3*i+a])*r,e[o]=(t[3*o+i]+t[3*i+o])*r}return e},v.str=function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},void 0!==e&&(e.quat=v)}(r.exports)}()},function(e,t,r){"use strict";var n=r(24),i=r(46),a=r(5),o=r(6),s=r(7),l=r(17),u=r(28),h=r(13),c=r(0),d=r.n(c),f=r(29),p=r(53),m=r.n(p),g=r(54),_=r(106),v=r(107),y=r(113),x=r(114),T=r(3),b=r(68),w=r(37),E=r(69),S=r(116),M=r(70),A=r(71),C=r(72),L=r(36),N=r(30),D=r(23),I=r(4),P=r(117),O=r(50),R=r(118),F=r(119),B=r(120),U=r(9),z=r(67),G=r(49),H=r(15),k=r(52),V=r(121),W=r(126),j=r(63),X=r(127),q=r(128),Z=r(129),Y=r(130),K=r(131),$=r(132);function Q(e){return e instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof Image}d.a.util.extend(u.a.prototype,V.a),s.a.import(W.a),s.a.import(j.a),s.a.import(X.a),s.a.import(q.a),s.a.import(Z.a),s.a.import(Y.a),s.a.import(K.a),s.a.import($.a);var J=f.a.prototype.addToScene,ee=f.a.prototype.removeFromScene;f.a.prototype.addToScene=function(e){if(J.call(this,e),this.__zr){var t=this.__zr;e.traverse((function(e){e.__zr=t,e.addAnimatorsToZr&&e.addAnimatorsToZr(t)}))}},f.a.prototype.removeFromScene=function(e){ee.call(this,e),e.traverse((function(e){var t=e.__zr;e.__zr=null,t&&e.removeAnimatorsFromZr&&e.removeAnimatorsFromZr(t)}))},l.a.prototype.setTextureImage=function(e,t,r,n){if(this.shader){var i,a,o=r.getZr(),s=this;return s.autoUpdateTextureStatus=!1,s.disableTexture(e),(a=t)&&"none"!==a&&(i=te.loadTexture(t,r,n,(function(t){s.enableTexture(e),o&&o.refresh()})),s.set(e,i)),i}};var te={};te.Renderer=i.a,te.Node=u.a,te.Mesh=n.a,te.Shader=s.a,te.Material=l.a,te.Texture=o.a,te.Texture2D=a.a,te.Geometry=h.a,te.SphereGeometry=b.a,te.PlaneGeometry=w.a,te.CubeGeometry=E.a,te.AmbientLight=S.a,te.DirectionalLight=M.a,te.PointLight=A.a,te.SpotLight=C.a,te.PerspectiveCamera=L.a,te.OrthographicCamera=N.a,te.Vector2=D.a,te.Vector3=I.a,te.Vector4=P.a,te.Quaternion=O.a,te.Matrix2=R.a,te.Matrix2d=F.a,te.Matrix3=B.a,te.Matrix4=U.a,te.Plane=z.a,te.Ray=G.a,te.BoundingBox=H.a,te.Frustum=k.a;var re=g.a.createBlank("rgba(255,255,255,0)").image;function ne(e){return Math.pow(2,Math.round(Math.log(e)/Math.LN2))}function ie(e){if((e.wrapS===o.a.REPEAT||e.wrapT===o.a.REPEAT)&&e.image){var t=ne(e.width),r=ne(e.height);if(t!==e.width||r!==e.height){var n=document.createElement("canvas");n.width=t,n.height=r,n.getContext("2d").drawImage(e.image,0,0,t,r),e.image=n}}}te.loadTexture=function(e,t,r,n){"function"==typeof r&&(n=r,r={}),r=r||{};for(var i=Object.keys(r).sort(),a="",o=0;o3?t[3]=e[3]:t[3]=1,t):((t=d.a.color.parse(e||"#000",t)||[0,0,0,0])[0]/=255,t[1]/=255,t[2]/=255,t)},te.directionFromAlphaBeta=function(e,t){var r=e/180*Math.PI+Math.PI/2,n=-t/180*Math.PI+Math.PI/2,i=[],a=Math.sin(r);return i[0]=a*Math.cos(n),i[1]=-Math.cos(r),i[2]=a*Math.sin(n),i},te.getShadowResolution=function(e){var t=1024;switch(e){case"low":t=512;break;case"medium":break;case"high":t=2048;break;case"ultra":t=4096}return t},te.COMMON_SHADERS=["lambert","color","realistic","hatching"],te.createShader=function(e){var t=s.a.source(e+".vertex"),r=s.a.source(e+".fragment");t||console.error("Vertex shader of '%s' not exits",e),r||console.error("Fragment shader of '%s' not exits",e);var n=new s.a(t,r);return n.name=e,n},te.createMaterial=function(e,t){t instanceof Array||(t=[t]);var r=te.createShader(e),n=new l.a({shader:r});return t.forEach((function(e){"string"==typeof e&&n.define(e)})),n},te.setMaterialFromModel=function(e,t,r,n){t.autoUpdateTextureStatus=!1;var i=r.getModel(e+"Material"),a=i.get("detailTexture"),o=T.a.firstNotNull(i.get("textureTiling"),1),s=T.a.firstNotNull(i.get("textureOffset"),0);"number"==typeof o&&(o=[o,o]),"number"==typeof s&&(s=[s,s]);var l=o[0]>1||o[1]>1?te.Texture.REPEAT:te.Texture.CLAMP_TO_EDGE,u={anisotropic:8,wrapS:l,wrapT:l};if("realistic"===e){var h=i.get("roughness"),c=i.get("metalness");null!=c?isNaN(c)&&(t.setTextureImage("metalnessMap",c,n,u),c=T.a.firstNotNull(i.get("metalnessAdjust"),.5)):c=0,null!=h?isNaN(h)&&(t.setTextureImage("roughnessMap",h,n,u),h=T.a.firstNotNull(i.get("roughnessAdjust"),.5)):h=.5;var d=i.get("normalTexture");t.setTextureImage("detailMap",a,n,u),t.setTextureImage("normalMap",d,n,u),t.set({roughness:h,metalness:c,detailUvRepeat:o,detailUvOffset:s})}else if("lambert"===e)t.setTextureImage("detailMap",a,n,u),t.set({detailUvRepeat:o,detailUvOffset:s});else if("color"===e)t.setTextureImage("detailMap",a,n,u),t.set({detailUvRepeat:o,detailUvOffset:s});else if("hatching"===e){var f=i.get("hatchingTextures")||[];f.length<6&&console.error("Invalid hatchingTextures.");for(var p=0;p<6;p++)t.setTextureImage("hatch"+(p+1),f[p],n,{anisotropic:8,wrapS:te.Texture.REPEAT,wrapT:te.Texture.REPEAT});t.set({detailUvRepeat:o,detailUvOffset:s})}},te.updateVertexAnimation=function(e,t,r,n){var i=n.get("animation"),a=n.get("animationDurationUpdate"),o=n.get("animationEasingUpdate"),s=r.shadowDepthMaterial;if(i&&t&&a>0&&t.geometry.vertexCount===r.geometry.vertexCount){r.material.define("vertex","VERTEX_ANIMATION"),r.ignorePreZ=!0,s&&s.define("vertex","VERTEX_ANIMATION");for(var l=0;lr?r:e}a.add=function(e,t,r){return i.add(e.array,t.array,r.array),e._dirty=!0,e},a.set=function(e,t,r,n){i.set(e.array,t,r,n),e._dirty=!0},a.copy=function(e,t){return i.copy(e.array,t.array),e._dirty=!0,e},a.cross=function(e,t,r){return i.cross(e.array,t.array,r.array),e._dirty=!0,e},a.distance=a.dist=function(e,t){return i.distance(e.array,t.array)},a.divide=a.div=function(e,t,r){return i.divide(e.array,t.array,r.array),e._dirty=!0,e},a.dot=function(e,t){return i.dot(e.array,t.array)},a.len=function(e){return i.length(e.array)},a.lerp=function(e,t,r,n){return i.lerp(e.array,t.array,r.array,n),e._dirty=!0,e},a.min=function(e,t,r){return i.min(e.array,t.array,r.array),e._dirty=!0,e},a.max=function(e,t,r){return i.max(e.array,t.array,r.array),e._dirty=!0,e},a.multiply=a.mul=function(e,t,r){return i.multiply(e.array,t.array,r.array),e._dirty=!0,e},a.negate=function(e,t){return i.negate(e.array,t.array),e._dirty=!0,e},a.normalize=function(e,t){return i.normalize(e.array,t.array),e._dirty=!0,e},a.random=function(e,t){return i.random(e.array,t),e._dirty=!0,e},a.scale=function(e,t,r){return i.scale(e.array,t.array,r),e._dirty=!0,e},a.scaleAndAdd=function(e,t,r,n){return i.scaleAndAdd(e.array,t.array,r.array,n),e._dirty=!0,e},a.squaredDistance=a.sqrDist=function(e,t){return i.sqrDist(e.array,t.array)},a.squaredLength=a.sqrLen=function(e){return i.sqrLen(e.array)},a.subtract=a.sub=function(e,t,r){return i.subtract(e.array,t.array,r.array),e._dirty=!0,e},a.transformMat3=function(e,t,r){return i.transformMat3(e.array,t.array,r.array),e._dirty=!0,e},a.transformMat4=function(e,t,r){return i.transformMat4(e.array,t.array,r.array),e._dirty=!0,e},a.transformQuat=function(e,t,r){return i.transformQuat(e.array,t.array,r.array),e._dirty=!0,e};var u=Math.atan2,h=Math.asin,c=Math.abs;a.eulerFromQuat=function(e,t,r){e._dirty=!0,t=t.array;var n=e.array,i=t[0],a=t[1],o=t[2],s=t[3],c=i*i,d=a*a,f=o*o,p=s*s;switch(r=(r||"XYZ").toUpperCase()){case"XYZ":n[0]=u(2*(i*s-a*o),p-c-d+f),n[1]=h(l(2*(i*o+a*s),-1,1)),n[2]=u(2*(o*s-i*a),p+c-d-f);break;case"YXZ":n[0]=h(l(2*(i*s-a*o),-1,1)),n[1]=u(2*(i*o+a*s),p-c-d+f),n[2]=u(2*(i*a+o*s),p-c+d-f);break;case"ZXY":n[0]=h(l(2*(i*s+a*o),-1,1)),n[1]=u(2*(a*s-o*i),p-c-d+f),n[2]=u(2*(o*s-i*a),p-c+d-f);break;case"ZYX":n[0]=u(2*(i*s+o*a),p-c-d+f),n[1]=h(l(2*(a*s-i*o),-1,1)),n[2]=u(2*(i*a+o*s),p+c-d-f);break;case"YZX":n[0]=u(2*(i*s-o*a),p-c+d-f),n[1]=u(2*(a*s-i*o),p+c-d-f),n[2]=h(l(2*(i*a+o*s),-1,1));break;case"XZY":n[0]=u(2*(i*s+a*o),p-c+d-f),n[1]=u(2*(i*o+a*s),p+c-d-f),n[2]=h(l(2*(o*s-i*a),-1,1));break;default:console.warn("Unkown order: "+r)}return e},a.eulerFromMat3=function(e,t,r){var n=t.array,i=n[0],a=n[3],o=n[6],s=n[1],d=n[4],f=n[7],p=n[2],m=n[5],g=n[8],_=e.array;switch(r=(r||"XYZ").toUpperCase()){case"XYZ":_[1]=h(l(o,-1,1)),c(o)<.99999?(_[0]=u(-f,g),_[2]=u(-a,i)):(_[0]=u(m,d),_[2]=0);break;case"YXZ":_[0]=h(-l(f,-1,1)),c(f)<.99999?(_[1]=u(o,g),_[2]=u(s,d)):(_[1]=u(-p,i),_[2]=0);break;case"ZXY":_[0]=h(l(m,-1,1)),c(m)<.99999?(_[1]=u(-p,g),_[2]=u(-a,d)):(_[1]=0,_[2]=u(s,i));break;case"ZYX":_[1]=h(-l(p,-1,1)),c(p)<.99999?(_[0]=u(m,g),_[2]=u(s,i)):(_[0]=0,_[2]=u(-a,d));break;case"YZX":_[2]=h(l(s,-1,1)),c(s)<.99999?(_[0]=u(-f,d),_[1]=u(-p,i)):(_[0]=0,_[1]=u(o,g));break;case"XZY":_[2]=h(-l(a,-1,1)),c(a)<.99999?(_[0]=u(m,d),_[1]=u(o,i)):(_[0]=u(-f,g),_[1]=0);break;default:console.warn("Unkown order: "+r)}return e._dirty=!0,e},a.POSITIVE_X=new a(1,0,0),a.NEGATIVE_X=new a(-1,0,0),a.POSITIVE_Y=new a(0,1,0),a.NEGATIVE_Y=new a(0,-1,0),a.POSITIVE_Z=new a(0,0,1),a.NEGATIVE_Z=new a(0,0,-1),a.UP=new a(0,1,0),a.ZERO=new a(0,0,0),t.a=a},function(e,t,r){"use strict";var n=r(6),i=r(11),a=r(66).a.isPowerOfTwo,o=n.a.extend((function(){return{image:null,pixels:null,mipmaps:[]}}),{update:function(e){var t=e.gl;t.bindTexture(t.TEXTURE_2D,this._cache.get("webgl_texture")),this.updateCommon(e);var r=this.format,n=this.type;t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,this.getAvailableWrapS()),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,this.getAvailableWrapT()),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,this.getAvailableMagFilter()),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,this.getAvailableMinFilter());var a=e.getGLExtension("EXT_texture_filter_anisotropic");if(a&&this.anisotropic>1&&t.texParameterf(t.TEXTURE_2D,a.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===n&&(e.getGLExtension("OES_texture_half_float")||(n=i.a.FLOAT)),this.mipmaps.length)for(var o=this.width,s=this.height,l=0;l=n.a.COMPRESSED_RGB_S3TC_DXT1_EXT?e.compressedTexImage2D(e.TEXTURE_2D,r,o,i,a,0,t.pixels):e.texImage2D(e.TEXTURE_2D,r,o,i,a,0,o,s,t.pixels)},generateMipmap:function(e){var t=e.gl;this.useMipmap&&!this.NPOT&&(t.bindTexture(t.TEXTURE_2D,this._cache.get("webgl_texture")),t.generateMipmap(t.TEXTURE_2D))},isPowerOfTwo:function(){var e,t;return this.image?(e=this.image.width,t=this.image.height):(e=this.width,t=this.height),a(e)&&a(t)},isRenderable:function(){return this.image?"CANVAS"===this.image.nodeName||"VIDEO"===this.image.nodeName||this.image.complete:!(!this.width||!this.height)},bind:function(e){e.gl.bindTexture(e.gl.TEXTURE_2D,this.getWebGLTexture(e))},unbind:function(e){e.gl.bindTexture(e.gl.TEXTURE_2D,null)},load:function(e,t){var r=new Image;t&&(r.crossOrigin=t);var n=this;return r.onload=function(){n.dirty(),n.trigger("success",n),r.onload=null},r.onerror=function(){n.trigger("error",n),r.onerror=null},r.src=e,this.image=r,this}});Object.defineProperty(o.prototype,"width",{get:function(){return this.image?this.image.width:this._width},set:function(e){this.image?console.warn("Texture from image can't set width"):(this._width!==e&&this.dirty(),this._width=e)}}),Object.defineProperty(o.prototype,"height",{get:function(){return this.image?this.image.height:this._height},set:function(e){this.image?console.warn("Texture from image can't set height"):(this._height!==e&&this.dirty(),this._height=e)}}),t.a=o},function(e,t,r){"use strict";var n=r(8),i=r(11),a=r(48),o=n.a.extend({width:512,height:512,type:i.a.UNSIGNED_BYTE,format:i.a.RGBA,wrapS:i.a.REPEAT,wrapT:i.a.REPEAT,minFilter:i.a.LINEAR_MIPMAP_LINEAR,magFilter:i.a.LINEAR,useMipmap:!0,anisotropic:1,flipY:!0,sRGB:!0,unpackAlignment:4,premultiplyAlpha:!1,dynamic:!1,NPOT:!1},(function(){this._cache=new a.a}),{getWebGLTexture:function(e){var t=e.gl,r=this._cache;return r.use(e.__uid__),r.miss("webgl_texture")&&r.put("webgl_texture",t.createTexture()),this.dynamic?this.update(e):r.isDirty()&&(this.update(e),r.fresh()),r.get("webgl_texture")},bind:function(){},unbind:function(){},dirty:function(){this._cache&&this._cache.dirtyAll()},update:function(e){},updateCommon:function(e){var t=e.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,this.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,this.unpackAlignment),this.format===i.a.DEPTH_COMPONENT&&(this.useMipmap=!1);var r=e.getGLExtension("EXT_sRGB");this.format!==o.SRGB||r||(this.format=o.RGB),this.format!==o.SRGB_ALPHA||r||(this.format=o.RGBA),this.NPOT=!this.isPowerOfTwo()},getAvailableWrapS:function(){return this.NPOT?i.a.CLAMP_TO_EDGE:this.wrapS},getAvailableWrapT:function(){return this.NPOT?i.a.CLAMP_TO_EDGE:this.wrapT},getAvailableMinFilter:function(){var e=this.minFilter;return this.NPOT||!this.useMipmap?e==i.a.NEAREST_MIPMAP_NEAREST||e==i.a.NEAREST_MIPMAP_LINEAR?i.a.NEAREST:e==i.a.LINEAR_MIPMAP_LINEAR||e==i.a.LINEAR_MIPMAP_NEAREST?i.a.LINEAR:e:e},getAvailableMagFilter:function(){return this.magFilter},nextHighestPowerOfTwo:function(e){--e;for(var t=1;t<32;t<<=1)e|=e>>t;return e+1},dispose:function(e){var t=this._cache;t.use(e.__uid__);var r=t.get("webgl_texture");r&&e.gl.deleteTexture(r),t.deleteContext(e.__uid__)},isRenderable:function(){},isPowerOfTwo:function(){}});Object.defineProperty(o.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e}}),Object.defineProperty(o.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e}}),o.BYTE=i.a.BYTE,o.UNSIGNED_BYTE=i.a.UNSIGNED_BYTE,o.SHORT=i.a.SHORT,o.UNSIGNED_SHORT=i.a.UNSIGNED_SHORT,o.INT=i.a.INT,o.UNSIGNED_INT=i.a.UNSIGNED_INT,o.FLOAT=i.a.FLOAT,o.HALF_FLOAT=36193,o.UNSIGNED_INT_24_8_WEBGL=34042,o.DEPTH_COMPONENT=i.a.DEPTH_COMPONENT,o.DEPTH_STENCIL=i.a.DEPTH_STENCIL,o.ALPHA=i.a.ALPHA,o.RGB=i.a.RGB,o.RGBA=i.a.RGBA,o.LUMINANCE=i.a.LUMINANCE,o.LUMINANCE_ALPHA=i.a.LUMINANCE_ALPHA,o.SRGB=35904,o.SRGB_ALPHA=35906,o.COMPRESSED_RGB_S3TC_DXT1_EXT=33776,o.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777,o.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778,o.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779,o.NEAREST=i.a.NEAREST,o.LINEAR=i.a.LINEAR,o.NEAREST_MIPMAP_NEAREST=i.a.NEAREST_MIPMAP_NEAREST,o.LINEAR_MIPMAP_NEAREST=i.a.LINEAR_MIPMAP_NEAREST,o.NEAREST_MIPMAP_LINEAR=i.a.NEAREST_MIPMAP_LINEAR,o.LINEAR_MIPMAP_LINEAR=i.a.LINEAR_MIPMAP_LINEAR,o.REPEAT=i.a.REPEAT,o.CLAMP_TO_EDGE=i.a.CLAMP_TO_EDGE,o.MIRRORED_REPEAT=i.a.MIRRORED_REPEAT,t.a=o},function(e,t,r){"use strict";var n=r(21),i=r(18),a=r(1),o=r.n(a),s=o.a.mat2,l=o.a.mat3,u=o.a.mat4,h=/uniform\s+(bool|float|int|vec2|vec3|vec4|ivec2|ivec3|ivec4|mat2|mat3|mat4|sampler2D|samplerCube)\s+([\w\,]+)?(\[.*?\])?\s*(:\s*([\S\s]+?))?;/g,c=/attribute\s+(float|int|vec2|vec3|vec4)\s+(\w*)\s*(:\s*(\w+))?;/g,d=/#define\s+(\w+)?(\s+[\w-.]+)?\s*;?\s*\n/g,f={bool:"1i",int:"1i",sampler2D:"t",samplerCube:"t",float:"1f",vec2:"2f",vec3:"3f",vec4:"4f",ivec2:"2i",ivec3:"3i",ivec4:"4i",mat2:"m2",mat3:"m3",mat4:"m4"},p={bool:function(){return!0},int:function(){return 0},float:function(){return 0},sampler2D:function(){return null},samplerCube:function(){return null},vec2:function(){return[0,0]},vec3:function(){return[0,0,0]},vec4:function(){return[0,0,0,0]},ivec2:function(){return[0,0]},ivec3:function(){return[0,0,0]},ivec4:function(){return[0,0,0,0]},mat2:function(){return s.create()},mat3:function(){return l.create()},mat4:function(){return u.create()},array:function(){return[]}},m=["POSITION","NORMAL","BINORMAL","TANGENT","TEXCOORD","TEXCOORD_0","TEXCOORD_1","COLOR","JOINT","WEIGHT"],g=["SKIN_MATRIX","VIEWPORT_SIZE","VIEWPORT","DEVICEPIXELRATIO","WINDOW_SIZE","NEAR","FAR","TIME"],_=["WORLD","VIEW","PROJECTION","WORLDVIEW","VIEWPROJECTION","WORLDVIEWPROJECTION","WORLDINVERSE","VIEWINVERSE","PROJECTIONINVERSE","WORLDVIEWINVERSE","VIEWPROJECTIONINVERSE","WORLDVIEWPROJECTIONINVERSE","WORLDTRANSPOSE","VIEWTRANSPOSE","PROJECTIONTRANSPOSE","WORLDVIEWTRANSPOSE","VIEWPROJECTIONTRANSPOSE","WORLDVIEWPROJECTIONTRANSPOSE","WORLDINVERSETRANSPOSE","VIEWINVERSETRANSPOSE","PROJECTIONINVERSETRANSPOSE","WORLDVIEWINVERSETRANSPOSE","VIEWPROJECTIONINVERSETRANSPOSE","WORLDVIEWPROJECTIONINVERSETRANSPOSE"],v={},y={};function x(e,t){"object"==typeof e&&(t=e.fragment,e=e.vertex),this._shaderID=function(e,t){var r="vertex:"+e+"fragment:"+t;if(v[r])return v[r];var i=n.a.genGUID();return v[r]=i,y[i]={vertex:e,fragment:t},i}(e,t),this._vertexCode=x.parseImport(e),this._fragmentCode=x.parseImport(t),this.attributeSemantics={},this.matrixSemantics={},this.uniformSemantics={},this.matrixSemanticKeys=[],this.uniformTemplates={},this.attributes={},this.textures={},this.vertexDefines={},this.fragmentDefines={},this._parseAttributes(),this._parseUniforms(),this._parseDefines()}x.prototype={constructor:x,createUniforms:function(){var e={};for(var t in this.uniformTemplates){var r=this.uniformTemplates[t];e[t]={type:r.type,value:r.value()}}return e},_parseImport:function(){this._vertexCode=x.parseImport(this.vertex),this._fragmentCode=x.parseImport(this.fragment)},_parseUniforms:function(){var e={},t=this;function r(r,n,i,a,o,s){if(n&&i){var l,u=f[n],h=!0;if(u){if(t._uniformList.push(i),"sampler2D"!==n&&"samplerCube"!==n||(t.textures[i]={shaderType:"fragment",type:n}),a&&(u+="v"),s)if(m.indexOf(s)>=0)t.attributeSemantics[s]={symbol:i,type:u},h=!1;else if(_.indexOf(s)>=0){var c=!1,d=s;s.match(/TRANSPOSE$/)&&(c=!0,d=s.slice(0,-9)),t.matrixSemantics[s]={symbol:i,type:u,isTranspose:c,semanticNoTranspose:d},h=!1}else if(g.indexOf(s)>=0)t.uniformSemantics[s]={symbol:i,type:u},h=!1;else if("unconfigurable"===s)h=!1;else{if(!(l=t._parseDefaultValue(n,s)))throw new Error('Unkown semantic "'+s+'"');s=""}h&&(e[i]={type:u,value:a?p.array:l||p[n],semantic:s||null})}return["uniform",n,i,a].join(" ")+";\n"}}this._uniformList=[],this._vertexCode=this._vertexCode.replace(h,r),this._fragmentCode=this._fragmentCode.replace(h,r),t.matrixSemanticKeys=Object.keys(this.matrixSemantics),this.uniformTemplates=e},_parseDefaultValue:function(e,t){if("vec2"!==e&&"vec3"!==e&&"vec4"!==e)return"bool"===e?function(){return"true"===t.toLowerCase()}:"float"===e?function(){return parseFloat(t)}:"int"===e?function(){return parseInt(t)}:void 0;var r=/\[\s*(.*)\s*\]/.exec(t)[1];if(r){var n=r.split(/\s*,\s*/);return function(){return new i.a.Float32Array(n)}}},_parseAttributes:function(){var e={},t=this;this._vertexCode=this._vertexCode.replace(c,(function(r,n,i,a,o){if(n&&i){var s=1;switch(n){case"vec4":s=4;break;case"vec3":s=3;break;case"vec2":s=2;break;case"float":s=1}if(e[i]={type:"float",size:s,semantic:o||null},o){if(m.indexOf(o)<0)throw new Error('Unkown semantic "'+o+'"');t.attributeSemantics[o]={symbol:i,type:n}}}return["attribute",n,i].join(" ")+";\n"})),this.attributes=e},_parseDefines:function(){var e=this;function t(t,r,n){var i=e.fragmentDefines;return i[r]||(i[r]="false"!=n&&("true"==n||(n?isNaN(parseFloat(n))?n.trim():parseFloat(n):null))),""}this._vertexCode=this._vertexCode.replace(d,t),this._fragmentCode=this._fragmentCode.replace(d,t)},clone:function(){var e=y[this._shaderID];return new x(e.vertex,e.fragment)}},Object.defineProperty&&(Object.defineProperty(x.prototype,"shaderID",{get:function(){return this._shaderID}}),Object.defineProperty(x.prototype,"vertex",{get:function(){return this._vertexCode}}),Object.defineProperty(x.prototype,"fragment",{get:function(){return this._fragmentCode}}),Object.defineProperty(x.prototype,"uniforms",{get:function(){return this._uniformList}}));var T=/(@import)\s*([0-9a-zA-Z_\-\.]*)/g;x.parseImport=function(e){return e=e.replace(T,(function(e,t,r){return(e=x.source(r))?x.parseImport(e):(console.error('Shader chunk "'+r+'" not existed in library'),"")}))};var b=/(@export)\s*([0-9a-zA-Z_\-\.]*)\s*\n([\s\S]*?)@end/g;x.import=function(e){e.replace(b,(function(e,t,r,n){if(n=n.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+\x24)/g,"")){for(var i,a=r.split("."),o=x.codes,s=0;sa[0]&&(a[0]=s),l>a[1]&&(a[1]=l),c>a[2]&&(a[2]=c)}r._dirty=!0,n._dirty=!0}},dirty:function(){for(var e=this.getEnabledAttributes(),t=0;t=0){t||(t=d());var r=this.indices;return t[0]=r[3*e],t[1]=r[3*e+1],t[2]=r[3*e+2],t}},setTriangleIndices:function(e,t){var r=this.indices;r[3*e]=t[0],r[3*e+1]=t[1],r[3*e+2]=t[2]},isUseIndices:function(){return!!this.indices},initIndicesFromArray:function(e){var t,r=this.vertexCount>65535?o.a.Uint32Array:o.a.Uint16Array;if(e[0]&&e[0].length){var n=0;t=new r(3*e.length);for(var i=0;i=0&&(t.splice(r,1),delete this.attributes[e],!0)},getAttribute:function(e){return this.attributes[e]},getEnabledAttributes:function(){var e=this._enabledAttributes,t=this._attributeList;if(e)return e;for(var r=[],n=this.vertexCount,i=0;i65535&&(this.indices=new o.a.Uint32Array(this.indices));for(var e=this.attributes,t=this.indices,r=this.getEnabledAttributes(),n={},i=0;i=r.COLOR_ATTACHMENT0&&a<=r.COLOR_ATTACHMENT0+8&&i.push(a);n.drawBuffersEXT(i)}}this.trigger("beforerender",this,e);var o=this.clearDepth?r.DEPTH_BUFFER_BIT:0;if(r.depthMask(!0),this.clearColor){o|=r.COLOR_BUFFER_BIT,r.colorMask(!0,!0,!0,!0);var s=this.clearColor;Array.isArray(s)&&r.clearColor(s[0],s[1],s[2],s[3])}r.clear(o),this.blendWithPrevious?(r.enable(r.BLEND),this.material.transparent=!0):(r.disable(r.BLEND),this.material.transparent=!1),this.renderQuad(e),this.trigger("afterrender",this,e),t&&this.unbind(e,t)},renderQuad:function(e){d.material=this.material,e.renderPass([d],f)},dispose:function(e){}});t.a=p},function(e,t,r){"use strict";var n,i,a,o,s,l,u=r(4),h=r(1),c=r.n(h).a.vec3,d=c.copy,f=c.set,p=function(e,t){this.min=e||new u.a(1/0,1/0,1/0),this.max=t||new u.a(-1/0,-1/0,-1/0)};p.prototype={constructor:p,updateFromVertices:function(e){if(e.length>0){var t=this.min,r=this.max,n=t.array,i=r.array;d(n,e[0]),d(i,e[0]);for(var a=1;ai[0]&&(i[0]=o[0]),o[1]>i[1]&&(i[1]=o[1]),o[2]>i[2]&&(i[2]=o[2])}t._dirty=!0,r._dirty=!0}},union:function(e){var t=this.min,r=this.max;return c.min(t.array,t.array,e.min.array),c.max(r.array,r.array,e.max.array),t._dirty=!0,r._dirty=!0,this},intersection:function(e){var t=this.min,r=this.max;return c.max(t.array,t.array,e.min.array),c.min(r.array,r.array,e.max.array),t._dirty=!0,r._dirty=!0,this},intersectBoundingBox:function(e){var t=this.min.array,r=this.max.array,n=e.min.array,i=e.max.array;return!(t[0]>i[0]||t[1]>i[1]||t[2]>i[2]||r[0]=i[0]&&r[1]>=i[1]&&r[2]>=i[2]},containPoint:function(e){var t=this.min.array,r=this.max.array,n=e.array;return t[0]<=n[0]&&t[1]<=n[1]&&t[2]<=n[2]&&r[0]>=n[0]&&r[1]>=n[1]&&r[2]>=n[2]},isFinite:function(){var e=this.min.array,t=this.max.array;return isFinite(e[0])&&isFinite(e[1])&&isFinite(e[2])&&isFinite(t[0])&&isFinite(t[1])&&isFinite(t[2])},applyTransform:(n=c.create(),i=c.create(),a=c.create(),o=c.create(),s=c.create(),l=c.create(),function(e){var t=this.min.array,r=this.max.array,u=e.array;return n[0]=u[0]*t[0],n[1]=u[1]*t[0],n[2]=u[2]*t[0],i[0]=u[0]*r[0],i[1]=u[1]*r[0],i[2]=u[2]*r[0],a[0]=u[4]*t[1],a[1]=u[5]*t[1],a[2]=u[6]*t[1],o[0]=u[4]*r[1],o[1]=u[5]*r[1],o[2]=u[6]*r[1],s[0]=u[8]*t[2],s[1]=u[9]*t[2],s[2]=u[10]*t[2],l[0]=u[8]*r[2],l[1]=u[9]*r[2],l[2]=u[10]*r[2],t[0]=Math.min(n[0],i[0])+Math.min(a[0],o[0])+Math.min(s[0],l[0])+u[12],t[1]=Math.min(n[1],i[1])+Math.min(a[1],o[1])+Math.min(s[1],l[1])+u[13],t[2]=Math.min(n[2],i[2])+Math.min(a[2],o[2])+Math.min(s[2],l[2])+u[14],r[0]=Math.max(n[0],i[0])+Math.max(a[0],o[0])+Math.max(s[0],l[0])+u[12],r[1]=Math.max(n[1],i[1])+Math.max(a[1],o[1])+Math.max(s[1],l[1])+u[13],r[2]=Math.max(n[2],i[2])+Math.max(a[2],o[2])+Math.max(s[2],l[2])+u[14],this.min._dirty=!0,this.max._dirty=!0,this}),applyProjection:function(e){var t=this.min.array,r=this.max.array,n=e.array,i=t[0],a=t[1],o=t[2],s=r[0],l=r[1],u=t[2],h=r[0],c=r[1],d=r[2];if(1===n[15])t[0]=n[0]*i+n[12],t[1]=n[5]*a+n[13],r[2]=n[10]*o+n[14],r[0]=n[0]*h+n[12],r[1]=n[5]*c+n[13],t[2]=n[10]*d+n[14];else{var f=-1/o;t[0]=n[0]*i*f,t[1]=n[5]*a*f,r[2]=(n[10]*o+n[14])*f,f=-1/u,r[0]=n[0]*s*f,r[1]=n[5]*l*f,f=-1/d,t[2]=(n[10]*d+n[14])*f}return this.min._dirty=!0,this.max._dirty=!0,this},updateVertices:function(){if(!(e=this.vertices)){for(var e=[],t=0;t<8;t++)e[t]=c.fromValues(0,0,0);this.vertices=e}var r=this.min.array,n=this.max.array;return f(e[0],r[0],r[1],r[2]),f(e[1],r[0],n[1],r[2]),f(e[2],n[0],r[1],r[2]),f(e[3],n[0],n[1],r[2]),f(e[4],r[0],r[1],n[2]),f(e[5],r[0],n[1],n[2]),f(e[6],n[0],r[1],n[2]),f(e[7],n[0],n[1],n[2]),this},copy:function(e){var t=this.min,r=this.max;return d(t.array,e.min.array),d(r.array,e.max.array),t._dirty=!0,r._dirty=!0,this},clone:function(){var e=new p;return e.copy(this),e}},t.a=p},function(e,t,r){"use strict";t.a=function(e,t,r){return{seriesType:e,reset:function(e,t){var r=e.getData(),n=e.visualColorAccessPath.split(".");n[n.length-1]="opacity";var i=e.get(n);return r.setVisual("opacity",null==i?1:i),{dataEach:r.hasItemOption?function(e){var t=r.getItemModel(e).get(n);null!=t&&r.setItemVisual(e,"opacity",t)}:null}}}}},function(e,t,r){"use strict";var n=r(8),i=r(6),a=r(21),o=r(93).a.parseToFloat,s={};function l(e,t,r){var n=Object.keys(e);n.sort();for(var i=[],a=0;a=0},getEnabledUniforms:function(){return this._enabledUniforms},getTextureUniforms:function(){return this._textureUniforms},set:function(e,t){if("object"==typeof e)for(var r in e){var n=e[r];this.setUniform(r,n)}else this.setUniform(e,t)},get:function(e){var t=this.uniforms[e];if(t)return t.value},attachShader:function(e,t){var r=this.uniforms;this.uniforms=e.createUniforms(),this.shader=e;var n=this.uniforms;this._enabledUniforms=Object.keys(n),this._enabledUniforms.sort(),this._textureUniforms=this._enabledUniforms.filter((function(e){var t=this.uniforms[e].type;return"t"===t||"tv"===t}),this);var i=this.vertexDefines,o=this.fragmentDefines;if(this.vertexDefines=a.a.clone(e.vertexDefines),this.fragmentDefines=a.a.clone(e.fragmentDefines),t){for(var s in r)n[s]&&(n[s].value=r[s].value);a.a.defaults(this.vertexDefines,i),a.a.defaults(this.fragmentDefines,o)}var l={};for(var u in e.textures)l[u]={shaderType:e.textures[u].shaderType,type:e.textures[u].type,enabled:!(!t||!this._textureStatus[u])&&this._textureStatus[u].enabled};this._textureStatus=l,this._programKey=""},clone:function(){var e=new this.constructor({name:this.name,shader:this.shader});for(var t in this.uniforms)e.uniforms[t].value=this.uniforms[t].value;return e.depthTest=this.depthTest,e.depthMask=this.depthMask,e.transparent=this.transparent,e.blend=this.blend,e.vertexDefines=a.a.clone(this.vertexDefines),e.fragmentDefines=a.a.clone(this.fragmentDefines),e.enableTexture(this.getEnabledTextures()),e.precision=this.precision,e},define:function(e,t,r){var n=this.vertexDefines,i=this.fragmentDefines;"vertex"!==e&&"fragment"!==e&&"both"!==e&&arguments.length<3&&(r=t,t=e,e="both"),r=null!=r?r:null,"vertex"!==e&&"both"!==e||n[t]!==r&&(n[t]=r,this._programKey=""),"fragment"!==e&&"both"!==e||i[t]!==r&&(i[t]=r,"both"!==e&&(this._programKey=""))},undefine:function(e,t){"vertex"!==e&&"fragment"!==e&&"both"!==e&&arguments.length<2&&(t=e,e="both"),"vertex"!==e&&"both"!==e||this.isDefined("vertex",t)&&(delete this.vertexDefines[t],this._programKey=""),"fragment"!==e&&"both"!==e||this.isDefined("fragment",t)&&(delete this.fragmentDefines[t],"both"!==e&&(this._programKey=""))},isDefined:function(e,t){switch(e){case"vertex":return void 0!==this.vertexDefines[t];case"fragment":return void 0!==this.fragmentDefines[t]}},getDefine:function(e,t){switch(e){case"vertex":return this.vertexDefines[t];case"fragment":return this.fragmentDefines[t]}},enableTexture:function(e){if(Array.isArray(e))for(var t=0;t=r.x&&t>=r.y&&e<=r.x+r.width&&t<=r.y+r.height};var _=new c.a;g.prototype.castRay=function(e,t,r){var n=this.layer.renderer,i=n.viewport;return n.viewport=this.viewport,n.screenToNDC(e,t,_),this.camera.castRay(_,r),n.viewport=i,r},g.prototype.prepareRender=function(){this.scene.update(),this.camera.update(),this._needsSortProgressively=!1;for(var e=0;e30},g.prototype._doRender=function(e,t,r){var n,i=this.scene,a=this.camera;r=r||0,this._updateTransparent(e,i,a,r),t||(this._shadowMapPass.kernelPCF=this._pcfKernels[0],this._shadowMapPass.render(e,i,a,!0)),this._updateShadowPCFKernel(r),e.gl.clearColor(0,0,0,0),this._enablePostEffect&&(this.needsTemporalSS()&&this._temporalSS.jitterProjection(e,a),this._compositor.updateNormal(e,i,a,this._temporalSS.getFrame())),this._updateSSAO(e,i,a,this._temporalSS.getFrame()),this._enablePostEffect?((n=this._compositor.getSourceFrameBuffer()).bind(e),e.gl.clear(e.gl.DEPTH_BUFFER_BIT|e.gl.COLOR_BUFFER_BIT),e.render(i,a,!0,!0),n.unbind(e),this.needsTemporalSS()&&t?(this._compositor.composite(e,a,this._temporalSS.getSourceFrameBuffer(),this._temporalSS.getFrame()),e.setViewport(this.viewport),this._temporalSS.render(e)):(e.setViewport(this.viewport),this._compositor.composite(e,a,null,0))):this.needsTemporalSS()&&t?((n=this._temporalSS.getSourceFrameBuffer()).bind(e),e.saveClear(),e.clearBit=e.gl.DEPTH_BUFFER_BIT|e.gl.COLOR_BUFFER_BIT,e.render(i,a,!0,!0),e.restoreClear(),n.unbind(e),e.setViewport(this.viewport),this._temporalSS.render(e)):(e.setViewport(this.viewport),e.render(i,a,!0,!0))},g.prototype._updateTransparent=function(e,t,r,n){for(var i=new h.a,a=new u.a,o=r.getWorldPosition(),s=0;sthis.camera.far||e65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(e){this.triangleCount!==e&&(this.indices=0===e?null:this.vertexCount>65535?new Uint32Array(3*e):new Uint16Array(3*e))},_getCubicCurveApproxStep:function(e,t,r,n){return 1/(l.dist(e,t)+l.dist(r,t)+l.dist(n,r)+1)*this.segmentScale},getCubicCurveVertexCount:function(e,t,r,n){var i=this._getCubicCurveApproxStep(e,t,r,n),a=Math.ceil(1/i);return this.useNativeLine?2*a:2*a+2},getCubicCurveTriangleCount:function(e,t,r,n){var i=this._getCubicCurveApproxStep(e,t,r,n),a=Math.ceil(1/i);return this.useNativeLine?0:2*a},getLineVertexCount:function(){return this.getPolylineVertexCount(u)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(u)},getPolylineVertexCount:function(e){var t;return t="number"==typeof e?e:"number"!=typeof e[0]?e.length:e.length/3,this.useNativeLine?2*(t-1):2*(t-1)+2},getPolylineTriangleCount:function(e){var t;return t="number"==typeof e?e:"number"!=typeof e[0]?e.length:e.length/3,this.useNativeLine?0:2*Math.max(t-1,0)},addCubicCurve:function(e,t,r,n,i,a){null==a&&(a=1);var o=e[0],s=e[1],l=e[2],u=t[0],h=t[1],c=t[2],d=r[0],f=r[1],p=r[2],m=n[0],g=n[1],_=n[2],v=this._getCubicCurveApproxStep(e,t,r,n),y=v*v,x=y*v,T=3*v,b=3*y,w=6*y,E=6*x,S=o-2*u+d,M=s-2*h+f,A=l-2*c+p,C=3*(u-d)-o+m,L=3*(h-f)-s+g,N=3*(c-p)-l+_,D=o,I=s,P=l,O=(u-o)*T+S*b+C*x,R=(h-s)*T+M*b+L*x,F=(c-l)*T+A*b+N*x,B=S*w+C*E,U=M*w+L*E,z=A*w+N*E,G=C*E,H=L*E,k=N*E,V=0,W=0,j=Math.ceil(1/v),X=new Float32Array(3*(j+1)),q=(X=[],0);for(W=0;W1&&(D=O>0?Math.min(D,m):Math.max(D,m),I=R>0?Math.min(I,g):Math.max(I,g),P=F>0?Math.min(P,_):Math.max(P,_));return this.addPolyline(X,i,a)},addLine:function(e,t,r,n){return this.addPolyline([e,t],r,n)},addPolyline:function(e,t,r,n,i){if(e.length){var a="number"!=typeof e[0];if(null==i&&(i=a?e.length:e.length/3),!(i<2)){null==n&&(n=0),null==r&&(r=1),this._itemVertexOffsets.push(this._vertexOffset);var o,s,l=(a="number"!=typeof e[0])?"number"!=typeof t[0]:t.length/4===i,u=this.attributes.position,h=this.attributes.positionPrev,c=this.attributes.positionNext,d=this.attributes.color,f=this.attributes.offset,p=this.indices,m=this._vertexOffset;r=Math.max(r,.01);for(var g=n;g1&&(u.copy(m,m-1),d.copy(m,m-1),m++):(g0&&(c.set(m-2,o),c.set(m-1,o)),u.set(m,o),u.set(m+1,o),d.set(m,s),d.set(m+1,s),f.set(m,r/2),f.set(m+1,-r/2),m+=2),this.useNativeLine)d.set(m,s),u.set(m,o),m++;else if(g>0){var y=3*this._triangleOffset;(p=this.indices)[y]=m-4,p[y+1]=m-3,p[y+2]=m-2,p[y+3]=m-3,p[y+4]=m-1,p[y+5]=m-2,this._triangleOffset+=2}}if(!this.useNativeLine){var x=this._vertexOffset,T=this._vertexOffset+2*i;h.copy(x,x+2),h.copy(x+1,x+3),c.copy(T-1,T-3),c.copy(T-2,T-4)}return this._vertexOffset=m,this._vertexOffset}}},setItemColor:function(e,t){for(var r=this._itemVertexOffsets[e],n=e0)},render:function(e,t,r){var i=e.gl;if(this.skeleton){this.skeleton.update();var a=this.skeleton.getSubSkinMatrices(this.__uid__,this.joints);r.setUniformOfSemantic(i,"SKIN_MATRIX",a)}return n.a.prototype.render.call(this,e,t,r)},getSkinMatricesTexture:function(){return this._skinMatricesTexture=this._skinMatricesTexture||new a.a({type:i.a.FLOAT,minFilter:i.a.NEAREST,magFilter:i.a.NEAREST,useMipmap:!1,flipY:!1}),this._skinMatricesTexture}});o.POINTS=i.a.POINTS,o.LINES=i.a.LINES,o.LINE_LOOP=i.a.LINE_LOOP,o.LINE_STRIP=i.a.LINE_STRIP,o.TRIANGLES=i.a.TRIANGLES,o.TRIANGLE_STRIP=i.a.TRIANGLE_STRIP,o.TRIANGLE_FAN=i.a.TRIANGLE_FAN,o.BACK=i.a.BACK,o.FRONT=i.a.FRONT,o.FRONT_AND_BACK=i.a.FRONT_AND_BACK,o.CW=i.a.CW,o.CCW=i.a.CCW,t.a=o},function(e,t,r){"use strict";var n=r(6),i=r(11),a=r(21),o=r(66).a.isPowerOfTwo,s=["px","nx","py","ny","pz","nz"],l=n.a.extend((function(){return{image:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},pixels:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},mipmaps:[]}}),{update:function(e){var t=e.gl;t.bindTexture(t.TEXTURE_CUBE_MAP,this._cache.get("webgl_texture")),this.updateCommon(e);var r=this.format,n=this.type;t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_WRAP_S,this.getAvailableWrapS()),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_WRAP_T,this.getAvailableWrapT()),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,this.getAvailableMagFilter()),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,this.getAvailableMinFilter());var a=e.getGLExtension("EXT_texture_filter_anisotropic");if(a&&this.anisotropic>1&&t.texParameterf(t.TEXTURE_CUBE_MAP,a.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===n&&(e.getGLExtension("OES_texture_half_float")||(n=i.a.FLOAT)),this.mipmaps.length)for(var o=this.width,s=this.height,l=0;l0&&console.warn("Found multiple camera in one scene. Use the fist one."),this._cameraList.push(e)),e.name&&(this._nodeRepository[e.name]=e)},removeFromScene:function(e){if(e instanceof a.a){var t=this._cameraList.indexOf(e);t>=0&&this._cameraList.splice(t,1)}e.name&&delete this._nodeRepository[e.name]},getNode:function(e){return this._nodeRepository[e]},cloneNode:function(e){var t=e.clone(),r={},n=function(i,a){i.skeleton&&(a.skeleton=i.skeleton.clone(e,t),a.joints=i.joints.slice()),i.material&&(r[i.material.__uid__]={oldMat:i.material});for(var o=0;o0&&this._updateRenderList(n)}},_updateLightUniforms:function(){var e=this.lights;e.sort(c);var t=this._lightUniforms;for(var r in t)for(var n in t[r])t[r][n].value.length=0;for(var i=0;i0?e[t].value=new Float32Array(e[t].value):e[t].value=null;this.indices&&this.indices.length>0&&(this.indices=this.vertexCount>65535?new Uint32Array(this.indices):new Uint16Array(this.indices)),this.dirty()}}},function(e,t,r){"use strict";var n=r(2),i=r(57),a=r(56),o=r(0),s=r.n(o);function l(){}l.prototype={constructor:l,setScene:function(e){this._scene=e,this._skybox&&this._skybox.attachScene(this._scene)},initLight:function(e){this._lightRoot=e,this.mainLight=new n.a.DirectionalLight({shadowBias:.005}),this.ambientLight=new n.a.AmbientLight,e.add(this.mainLight),e.add(this.ambientLight)},dispose:function(){this._lightRoot&&(this._lightRoot.remove(this.mainLight),this._lightRoot.remove(this.ambientLight))},updateLight:function(e){var t=this.mainLight,r=this.ambientLight,i=e.getModel("light"),a=i.getModel("main"),o=i.getModel("ambient");t.intensity=a.get("intensity"),r.intensity=o.get("intensity"),t.color=n.a.parseColor(a.get("color")).slice(0,3),r.color=n.a.parseColor(o.get("color")).slice(0,3);var s=a.get("alpha")||0,l=a.get("beta")||0;t.position.setArray(n.a.directionFromAlphaBeta(s,l)),t.lookAt(n.a.Vector3.ZERO),t.castShadow=a.get("shadow"),t.shadowResolution=n.a.getShadowResolution(a.get("shadowQuality"))},updateAmbientCubemap:function(e,t,r){var a=t.getModel("light.ambientCubemap"),o=a.get("texture");if(o){this._cubemapLightsCache=this._cubemapLightsCache||{};var s=this._cubemapLightsCache[o];if(!s){var l=this;s=this._cubemapLightsCache[o]=n.a.createAmbientCubemap(a.option,e,r,(function(){l._skybox instanceof i.a&&l._skybox.setEnvironmentMap(s.specular.cubemap),r.getZr().refresh()}))}this._lightRoot.add(s.diffuse),this._lightRoot.add(s.specular),this._currentCubemapLights=s}else this._currentCubemapLights&&(this._lightRoot.remove(this._currentCubemapLights.diffuse),this._lightRoot.remove(this._currentCubemapLights.specular),this._currentCubemapLights=null)},updateSkybox:function(e,t,r){var o=t.get("environment"),l=this;function u(){return l._skybox instanceof a.a||(l._skybox&&l._skybox.dispose(e),l._skybox=new a.a),l._skybox}if(o&&"none"!==o)if("auto"===o)if(this._currentCubemapLights){var h=(l._skybox instanceof i.a||(l._skybox&&l._skybox.dispose(e),l._skybox=new i.a),l._skybox),c=this._currentCubemapLights.specular.cubemap;h.setEnvironmentMap(c),this._scene&&h.attachScene(this._scene),h.material.set("lod",2)}else this._skybox&&this._skybox.detachScene();else if("object"==typeof o&&o.colorStops||"string"==typeof o&&s.a.color.parse(o)){var d=u(),f=new n.a.Texture2D({anisotropic:8,flipY:!1});d.setEnvironmentMap(f);var p=f.image=document.createElement("canvas");p.width=p.height=16;var m=p.getContext("2d");new s.a.graphic.Rect({shape:{x:0,y:0,width:16,height:16},style:{fill:o}}).brush(m),d.attachScene(this._scene)}else d=u(),f=n.a.loadTexture(o,r,{anisotropic:8,flipY:!1}),d.setEnvironmentMap(f),d.attachScene(this._scene);else this._skybox&&this._skybox.detachScene(this._scene),this._skybox=null;var g=t.coordinateSystem;if(this._skybox)if(!g||!g.viewGL||"auto"===o||o.match&&o.match(/.hdr$/))this._skybox.material.undefine("fragment","SRGB_DECODE");else{var _=g.viewGL.isLinearSpace()?"define":"undefine";this._skybox.material[_]("fragment","SRGB_DECODE")}}},t.a=l},function(e,t,r){"use strict";var n=r(0),i=r.n(n);t.a=function(e,t,r){var n=e.getData(),a=e.getRawValue(t),o=i.a.util.isArray(a)?function(e){var a=[],o=function(e,t){var r=[];return i.a.util.each(e.dimensions,(function(n){var i=e.getDimensionInfo(n),a=i.otherDims[t];null!=a&&!1!==a&&(r[a]=i.name)})),r}(n,"tooltip");function s(e,t){var o=n.getDimensionInfo(t);if(o&&!1!==o.otherDims.tooltip){var s=o.type,l="- "+(o.tooltipName||o.name)+": "+("ordinal"===s?e+"":"time"===s?r?"":i.a.format.formatTime("yyyy/MM/dd hh:mm:ss",e):i.a.format.addCommas(e));l&&a.push(i.a.format.encodeHTML(l))}}return o.length?i.a.util.each(o,(function(e){s(n.get(e,t),e)})):i.a.util.each(e,s),"
"+a.join("
")}(a):i.a.format.encodeHTML(i.a.format.addCommas(a)),s=n.getName(t),l=n.getItemVisual(t,"color");i.a.util.isObject(l)&&l.colorStops&&(l=(l.colorStops[0]||{}).color),l=l||"transparent";var u=i.a.format.getTooltipMarker(l),h=e.name;return"\0-"===h&&(h=""),h=h?i.a.format.encodeHTML(h)+(r?": ":"
"):"",r?u+h+o:h+u+(s?i.a.format.encodeHTML(s)+": "+o:o)}},function(e,t,r){"use strict";var n=r(51),i=n.a.extend({fov:50,aspect:1,near:.1,far:2e3},{updateProjectionMatrix:function(){var e=this.fov/180*Math.PI;this.projectionMatrix.perspective(e,this.aspect,this.near,this.far)},decomposeProjectionMatrix:function(){var e=this.projectionMatrix.array,t=2*Math.atan(1/e[5]);this.fov=t/Math.PI*180,this.aspect=e[5]/e[0],this.near=e[14]/(e[10]-1),this.far=e[14]/(e[10]+1)},clone:function(){var e=n.a.prototype.clone.call(this);return e.fov=this.fov,e.aspect=this.aspect,e.near=this.near,e.far=this.far,e}});t.a=i},function(e,t,r){"use strict";var n=r(13),i=r(15),a=n.a.extend({dynamic:!1,widthSegments:1,heightSegments:1},(function(){this.build()}),{build:function(){for(var e=this.heightSegments,t=this.widthSegments,r=this.attributes,n=[],a=[],o=[],s=[],l=0;l<=e;l++)for(var u=l/e,h=0;h<=t;h++){var c=h/t;if(n.push([2*c-1,2*u-1,0]),a&&a.push([c,u]),o&&o.push([0,0,1]),h0&&this._notFirst?this.animateTo({alpha:h,beta:c,center:d,distance:a,targetOrthographicSize:s,easing:u.animationEasingUpdate,duration:u.animationDurationUpdate}):(this.setDistance(a),this.setAlpha(h),this.setBeta(c),this.setCenter(d),this.setOrthographicSize(s)),this._notFirst=!0,this._validateProperties()},_validateProperties:function(){null==s[this.panMouseButton]&&console.error("Unkown panMouseButton %s. It should be left|middle|right",this.panMouseButton),null==s[this.rotateMouseButton]&&console.error("Unkown rotateMouseButton %s. It should be left|middle|right",this.rotateMouseButton),"cw"!==this.autoRotateDirection&&"ccw"!==this.autoRotateDirection&&console.error("Unkown autoRotateDirection %s. It should be cw|ccw",this.autoRotateDirection)},animateTo:function(e){var t=this.zr,r=this,n={},i={};return null!=e.distance&&(n.distance=this.getDistance(),i.distance=e.distance),null!=e.orthographicSize&&(n.orthographicSize=this.getOrthographicSize(),i.orthographicSize=e.orthographicSize),null!=e.alpha&&(n.alpha=this.getAlpha(),i.alpha=e.alpha),null!=e.beta&&(n.beta=this.getBeta(),i.beta=e.beta),null!=e.center&&(n.center=this.getCenter(),i.center=e.center),this._addAnimator(t.animation.animate(n).when(e.duration||1e3,i).during((function(){null!=n.alpha&&r.setAlpha(n.alpha),null!=n.beta&&r.setBeta(n.beta),null!=n.distance&&r.setDistance(n.distance),null!=n.center&&r.setCenter(n.center),null!=n.orthographicSize&&r.setOrthographicSize(n.orthographicSize),r._needsUpdate=!0}))).start(e.easing||"linear")},stopAllAnimation:function(){for(var e=0;e0},_update:function(e){if(this._rotating){var t=("cw"===this.autoRotateDirection?1:-1)*this.autoRotateSpeed/180*Math.PI;this._phi-=t*e/1e3,this._needsUpdate=!0}else this._rotateVelocity.len()>0&&(this._needsUpdate=!0);(Math.abs(this._zoomSpeed)>.1||this._panVelocity.len()>0)&&(this._needsUpdate=!0),this._needsUpdate&&(e=Math.min(e,50),this._updateDistanceOrSize(e),this._updatePan(e),this._updateRotate(e),this._updateTransform(),this.getCamera().update(),this.zr&&this.zr.refresh(),this.trigger("update"),this._needsUpdate=!1)},_updateRotate:function(e){var t=this._rotateVelocity;this._phi=t.y*e/20+this._phi,this._theta=t.x*e/20+this._theta,this.setAlpha(this.getAlpha()),this.setBeta(this.getBeta()),this._vectorDamping(t,Math.pow(this.damping,e/16))},_updateDistanceOrSize:function(e){"perspective"===this._projection?this._setDistance(this._distance+this._zoomSpeed*e/20):this._setOrthoSize(this._orthoSize+this._zoomSpeed*e/20),this._zoomSpeed*=Math.pow(this.damping,e/16)},_setDistance:function(e){this._distance=Math.max(Math.min(e,this.maxDistance),this.minDistance)},_setOrthoSize:function(e){this._orthoSize=Math.max(Math.min(e,this.maxOrthographicSize),this.minOrthographicSize);var t=this.getCamera(),r=this._orthoSize,n=r/this.viewGL.viewport.height*this.viewGL.viewport.width;t.left=-n/2,t.right=n/2,t.top=r/2,t.bottom=-r/2},_updatePan:function(e){var t=this._panVelocity,r=this._distance,n=this.getCamera(),i=n.worldTransform.y,a=n.worldTransform.x;this._center.scaleAndAdd(a,-t.x*r/200).scaleAndAdd(i,-t.y*r/200),this._vectorDamping(t,0)},_updateTransform:function(){var e=this.getCamera(),t=new a.a,r=this._theta+Math.PI/2,n=this._phi+Math.PI/2,i=Math.sin(r);t.x=i*Math.cos(n),t.y=-Math.cos(r),t.z=i*Math.sin(n),e.position.copy(this._center).scaleAndAdd(t,this._distance),e.rotation.identity().rotateY(-this._phi).rotateX(-this._theta)},_startCountingStill:function(){clearTimeout(this._stillTimeout);var e=this.autoRotateAfterStill,t=this;!isNaN(e)&&e>0&&(this._stillTimeout=setTimeout((function(){t._rotating=!0}),1e3*e))},_vectorDamping:function(e,t){var r=e.len();(r*=t)<1e-4&&(r=0),e.normalize().scale(r)},_decomposeTransform:function(){if(this.getCamera()){this.getCamera().updateWorldTransform();var e=this.getCamera().worldTransform.z,t=Math.asin(e.y),r=Math.atan2(e.x,e.z);this._theta=t,this._phi=-r,this.setBeta(this.getBeta()),this.setAlpha(this.getAlpha()),this.getCamera().aspect?this._setDistance(this.getCamera().position.dist(this._center)):this._setOrthoSize(this.getCamera().top-this.getCamera().bottom)}},_mouseDownHandler:function(e){if(!e.target&&!this._isAnimating()){var t=e.offsetX,r=e.offsetY;this.viewGL&&!this.viewGL.containPoint(t,r)||(this.zr.on("mousemove",this._mouseMoveHandler),this.zr.on("mouseup",this._mouseUpHandler),e.event.targetTouches?1===e.event.targetTouches.length&&(this._mode="rotate"):e.event.button===s[this.rotateMouseButton]?this._mode="rotate":e.event.button===s[this.panMouseButton]?this._mode="pan":this._mode="",this._rotateVelocity.set(0,0),this._rotating=!1,this.autoRotate&&this._startCountingStill(),this._mouseX=e.offsetX,this._mouseY=e.offsetY)}},_mouseMoveHandler:function(e){if(!(e.target&&e.target.__isGLToZRProxy||this._isAnimating())){var t=l(this.panSensitivity),r=l(this.rotateSensitivity);"rotate"===this._mode?(this._rotateVelocity.y=(e.offsetX-this._mouseX)/this.zr.getHeight()*2*r[0],this._rotateVelocity.x=(e.offsetY-this._mouseY)/this.zr.getWidth()*2*r[1]):"pan"===this._mode&&(this._panVelocity.x=(e.offsetX-this._mouseX)/this.zr.getWidth()*t[0]*400,this._panVelocity.y=(-e.offsetY+this._mouseY)/this.zr.getHeight()*t[1]*400),this._mouseX=e.offsetX,this._mouseY=e.offsetY,e.event.preventDefault()}},_mouseWheelHandler:function(e){if(!this._isAnimating()){var t=e.event.wheelDelta||-e.event.detail;this._zoomHandler(e,t)}},_pinchHandler:function(e){this._isAnimating()||(this._zoomHandler(e,e.pinchScale>1?1:-1),this._mode="")},_zoomHandler:function(e,t){if(0!==t){var r,n=e.offsetX,i=e.offsetY;this.viewGL&&!this.viewGL.containPoint(n,i)||(r="perspective"===this._projection?Math.max(Math.max(Math.min(this._distance-this.minDistance,this.maxDistance-this._distance))/20,.5):Math.max(Math.max(Math.min(this._orthoSize-this.minOrthographicSize,this.maxOrthographicSize-this._orthoSize))/20,.5),this._zoomSpeed=(t>0?-1:1)*r*this.zoomSensitivity,this._rotating=!1,this.autoRotate&&"rotate"===this._mode&&this._startCountingStill(),e.event.preventDefault())}},_mouseUpHandler:function(){this.zr.off("mousemove",this._mouseMoveHandler),this.zr.off("mouseup",this._mouseUpHandler)},_isRightMouseButtonUsed:function(){return"right"===this.rotateMouseButton||"right"===this.panMouseButton},_contextMenuHandler:function(e){this._isRightMouseButtonUsed()&&e.preventDefault()},_addAnimator:function(e){var t=this._animators;return t.push(e),e.done((function(){var r=t.indexOf(e);r>=0&&t.splice(r,1)})),e}});Object.defineProperty(u.prototype,"autoRotate",{get:function(e){return this._autoRotate},set:function(e){this._autoRotate=e,this._rotating=e}}),t.a=u},function(e,t,r){"use strict";t.a="@export ecgl.lines3D.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec3 position: POSITION;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(position, 1.0);\n v_Color = a_Color;\n}\n\n@end\n\n@export ecgl.lines3D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n}\n@end\n\n\n\n@export ecgl.lines3D.clipNear\n\nvec4 clipNear(vec4 p1, vec4 p2) {\n float n = (p1.w - near) / (p1.w - p2.w);\n return vec4(mix(p1.xy, p2.xy, n), -near, near);\n}\n\n@end\n\n@export ecgl.lines3D.expandLine\n#ifdef VERTEX_ANIMATION\n vec4 prevProj = worldViewProjection * vec4(mix(prevPositionPrev, positionPrev, percent), 1.0);\n vec4 currProj = worldViewProjection * vec4(mix(prevPosition, position, percent), 1.0);\n vec4 nextProj = worldViewProjection * vec4(mix(prevPositionNext, positionNext, percent), 1.0);\n#else\n vec4 prevProj = worldViewProjection * vec4(positionPrev, 1.0);\n vec4 currProj = worldViewProjection * vec4(position, 1.0);\n vec4 nextProj = worldViewProjection * vec4(positionNext, 1.0);\n#endif\n\n if (currProj.w < 0.0) {\n if (nextProj.w > 0.0) {\n currProj = clipNear(currProj, nextProj);\n }\n else if (prevProj.w > 0.0) {\n currProj = clipNear(currProj, prevProj);\n }\n }\n\n vec2 prevScreen = (prevProj.xy / abs(prevProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 currScreen = (currProj.xy / abs(currProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 nextScreen = (nextProj.xy / abs(nextProj.w) + 1.0) * 0.5 * viewport.zw;\n\n vec2 dir;\n float len = offset;\n if (position == positionPrev) {\n dir = normalize(nextScreen - currScreen);\n }\n else if (position == positionNext) {\n dir = normalize(currScreen - prevScreen);\n }\n else {\n vec2 dirA = normalize(currScreen - prevScreen);\n vec2 dirB = normalize(nextScreen - currScreen);\n\n vec2 tanget = normalize(dirA + dirB);\n\n float miter = 1.0 / max(dot(tanget, dirA), 0.5);\n len *= miter;\n dir = tanget;\n }\n\n dir = vec2(-dir.y, dir.x) * len;\n currScreen += dir;\n\n currProj.xy = (currScreen / viewport.zw - 0.5) * 2.0 * abs(currProj.w);\n@end\n\n\n@export ecgl.meshLines3D.vertex\n\nattribute vec3 position: POSITION;\nattribute vec3 positionPrev;\nattribute vec3 positionNext;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevPositionPrev;\nattribute vec3 prevPositionNext;\nuniform float percent : 1.0;\n#endif\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\nuniform float near : NEAR;\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.vertexHeader\n\n@import ecgl.lines3D.clipNear\n\nvoid main()\n{\n @import ecgl.lines3D.expandLine\n\n gl_Position = currProj;\n\n v_Color = a_Color;\n\n @import ecgl.common.wireframe.vertexMain\n}\n@end\n\n\n@export ecgl.meshLines3D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"},function(e,t,r){var n=r(12),i=r(75),a=r(78).parsePercent,o=r(149),s=n.each,l=["left","right","top","bottom","width","height"],u=[["width","left","right"],["height","top","bottom"]];function h(e,t,r,n,i){var a=0,o=0;null==n&&(n=1/0),null==i&&(i=1/0);var s=0;t.eachChild((function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=t.childAt(u+1),m=p&&p.getBoundingRect();if("horizontal"===e){var g=f.width+(m?-m.x+f.x:0);(h=a+g)>n||l.newline?(a=0,h=g,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var _=f.height+(m?-m.y+f.y:0);(c=o+_)>i||l.newline?(a+=s+r,o=0,c=_,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===e?a=h+r:o=c+r)}))}var c=h,d=n.curry(h,"vertical"),f=n.curry(h,"horizontal");function p(e,t,r){r=o.normalizeCssArray(r||0);var n=t.width,s=t.height,l=a(e.left,n),u=a(e.top,s),h=a(e.right,n),c=a(e.bottom,s),d=a(e.width,n),f=a(e.height,s),p=r[2]+r[0],m=r[1]+r[3],g=e.aspect;switch(isNaN(d)&&(d=n-h-m-l),isNaN(f)&&(f=s-c-p-u),null!=g&&(isNaN(d)&&isNaN(f)&&(g>n/s?d=.8*n:f=.8*s),isNaN(d)&&(d=g*f),isNaN(f)&&(f=d/g)),isNaN(l)&&(l=n-h-d-m),isNaN(u)&&(u=s-c-f-p),e.left||e.right){case"center":l=n/2-d/2-r[3];break;case"right":l=n-d-m}switch(e.top||e.bottom){case"middle":case"center":u=s/2-f/2-r[0];break;case"bottom":u=s-f-p}l=l||0,u=u||0,isNaN(d)&&(d=n-m-l-(h||0)),isNaN(f)&&(f=s-p-u-(c||0));var _=new i(l+r[3],u+r[0],d,f);return _.margin=r,_}function m(e,t){return t&&e&&s(l,(function(r){t.hasOwnProperty(r)&&(e[r]=t[r])})),e}t.LOCATION_PARAMS=l,t.HV_NAMES=u,t.box=c,t.vbox=d,t.hbox=f,t.getAvailableSize=function(e,t,r){var n=t.width,i=t.height,s=a(e.x,n),l=a(e.y,i),u=a(e.x2,n),h=a(e.y2,i);return(isNaN(s)||isNaN(parseFloat(e.x)))&&(s=0),(isNaN(u)||isNaN(parseFloat(e.x2)))&&(u=n),(isNaN(l)||isNaN(parseFloat(e.y)))&&(l=0),(isNaN(h)||isNaN(parseFloat(e.y2)))&&(h=i),r=o.normalizeCssArray(r||0),{width:Math.max(u-s-r[1]-r[3],0),height:Math.max(h-l-r[0]-r[2],0)}},t.getLayoutRect=p,t.positionElement=function(e,t,r,a,o){var s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],u=o&&o.boundingMode||"all";if(s||l){var h;if("raw"===u)h="group"===e.type?new i(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(h=e.getBoundingRect(),e.needLocalTransform()){var c=e.getLocalTransform();(h=h.clone()).applyTransform(c)}t=p(n.defaults({width:h.width,height:h.height},t),r,a);var d=e.position,f=s?t.x-h.x:0,m=l?t.y-h.y:0;e.attr("position","raw"===u?[f,m]:[d[0]+f,d[1]+m])}},t.sizeCalculable=function(e,t){return null!=e[u[t][0]]||null!=e[u[t][1]]&&null!=e[u[t][2]]},t.mergeLayoutParam=function(e,t,r){!n.isObject(r)&&(r={});var i=r.ignoreSize;!n.isArray(i)&&(i=[i,i]);var a=l(u[0],0),o=l(u[1],1);function l(r,n){var a={},o=0,l={},u=0;if(s(r,(function(t){l[t]=e[t]})),s(r,(function(e){h(t,e)&&(a[e]=l[e]=t[e]),c(a,e)&&o++,c(l,e)&&u++})),i[n])return c(t,r[1])?l[r[2]]=null:c(t,r[2])&&(l[r[1]]=null),l;if(2!==u&&o){if(o>=2)return a;for(var d=0;d0&&(this.outputs[e].keepLastFrame?(this._prevOutputTextures[e]&&this._compositor.releaseTexture(this._prevOutputTextures[e]),this._prevOutputTextures[e]=this._outputTextures[e]):this._compositor.releaseTexture(this._outputTextures[e]))}});t.a=n},function(e,t,r){"use strict";t.a=function(e,t){for(var r=0,n=1/t,i=e;i>0;)r+=n*(i%t),i=Math.floor(i/t),n/=t;return r}},function(e,t,r){"use strict";var n=r(0),i=r.n(n);t.a=function(e,t,r){r=r||e.getSource();var n=t||i.a.getCoordinateSystemDimensions(e.get("coordinateSystem"))||["x","y","z"],a=i.a.helper.createDimensions(r,{dimensionsDefine:r.dimensionsDefine||e.get("dimensions"),encodeDefine:r.encodeDefine||e.get("encode"),coordDimensions:n.map((function(t){var r=e.getReferringComponents(t+"Axis3D")[0];return{type:r&&"category"===r.get("type")?"ordinal":"float",name:t,stackable:"z"===t}}))});"cartesian3D"===e.get("coordinateSystem")&&a.forEach((function(t){if(n.indexOf(t.coordDim)>=0){var r=e.getReferringComponents(t.coordDim+"Axis3D")[0];r&&"category"===r.get("type")&&(t.ordinalMeta=r.getOrdinalMeta())}}));var o=new i.a.List(a,e);return o.initData(r),o}},function(e,t){e.exports=function(e,t,r){return{seriesType:e,performRawSeries:!0,reset:function(e,n,i){var a=e.getData(),o=e.get("symbol")||t,s=e.get("symbolSize");if(a.setVisual({legendSymbol:r||o,symbol:o,symbolSize:s}),!n.isSeriesFiltered(e)){var l="function"==typeof s;return{dataEach:a.hasItemOption||l?function(t,r){if("function"==typeof s){var n=e.getRawValue(r),i=e.getDataParams(r);t.setItemVisual(r,"symbolSize",s(n,i))}if(t.hasItemOption){var a=t.getItemModel(r),o=a.getShallow("symbol",!0),l=a.getShallow("symbolSize",!0);null!=o&&t.setItemVisual(r,"symbol",o),null!=l&&t.setItemVisual(r,"symbolSize",l)}}:null}}}}}},function(e,t,r){"use strict";var n=r(8),i=r(92),a=r(11),o=(r(18),r(15)),s=r(9),l=r(17),u=r(23),h=r(96),c=r(7),d=r(98),f=r(63),p=r(1),m=r.n(p);c.a.import(d.a),c.a.import(f.a);var g=m.a.mat4,_=m.a.vec3,v=g.create,y={};function x(e){return e.material}function T(){}var b,w,E=n.a.extend((function(){return{canvas:null,_width:100,_height:100,devicePixelRatio:window.devicePixelRatio||1,clearColor:[0,0,0,0],clearBit:17664,alpha:!0,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,throwError:!0,gl:null,viewport:{},__currentFrameBuffer:null,_viewportStack:[],_clearStack:[],_sceneRendering:null}}),(function(){this.canvas||(this.canvas=document.createElement("canvas"));var e=this.canvas;try{var t={alpha:this.alpha,depth:this.depth,stencil:this.stencil,antialias:this.antialias,premultipliedAlpha:this.premultipliedAlpha,preserveDrawingBuffer:this.preserveDrawingBuffer};if(this.gl=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!this.gl)throw new Error;this._glinfo=new i.a(this.gl),this.gl.targetRenderer&&console.error("Already created a renderer"),this.gl.targetRenderer=this,this.resize()}catch(e){throw"Error creating WebGL Context "+e}this._programMgr=new h.a(this)}),{resize:function(e,t){var r=this.canvas,n=this.devicePixelRatio;null!=e?(r.style.width=e+"px",r.style.height=t+"px",r.width=e*n,r.height=t*n,this._width=e,this._height=t):(this._width=r.width/n,this._height=r.height/n),this.setViewport(0,0,this._width,this._height)},getWidth:function(){return this._width},getHeight:function(){return this._height},getViewportAspect:function(){var e=this.viewport;return e.width/e.height},setDevicePixelRatio:function(e){this.devicePixelRatio=e,this.resize(this._width,this._height)},getDevicePixelRatio:function(){return this.devicePixelRatio},getGLExtension:function(e){return this._glinfo.getExtension(e)},getGLParameter:function(e){return this._glinfo.getParameter(e)},setViewport:function(e,t,r,n,i){if("object"==typeof e){var a=e;e=a.x,t=a.y,r=a.width,n=a.height,i=a.devicePixelRatio}i=i||this.devicePixelRatio,this.gl.viewport(e*i,t*i,r*i,n*i),this.viewport={x:e,y:t,width:r,height:n,devicePixelRatio:i}},saveViewport:function(){this._viewportStack.push(this.viewport)},restoreViewport:function(){this._viewportStack.length>0&&this.setViewport(this._viewportStack.pop())},saveClear:function(){this._clearStack.push({clearBit:this.clearBit,clearColor:this.clearColor})},restoreClear:function(){if(this._clearStack.length>0){var e=this._clearStack.pop();this.clearColor=e.clearColor,this.clearBit=e.clearBit}},bindSceneRendering:function(e){this._sceneRendering=e},render:function(e,t,r,n){var i=this.gl,a=this.clearColor;if(this.clearBit){i.colorMask(!0,!0,!0,!0),i.depthMask(!0);var o=this.viewport,s=!1,l=o.devicePixelRatio;(o.width!==this._width||o.height!==this._height||l&&l!==this.devicePixelRatio||o.x||o.y)&&(s=!0,i.enable(i.SCISSOR_TEST),i.scissor(o.x*l,o.y*l,o.width*l,o.height*l)),i.clearColor(a[0],a[1],a[2],a[3]),i.clear(this.clearBit),s&&i.disable(i.SCISSOR_TEST)}if(r||e.update(!1),t=t||e.getMainCamera()){t.getScene()||t.update(!0),this._sceneRendering=e,e.viewBoundingBoxLastFrame.min.set(1/0,1/0,1/0),e.viewBoundingBoxLastFrame.max.set(-1/0,-1/0,-1/0);var u=this.cullRenderList(e.opaqueList,e,t),h=this.cullRenderList(e.transparentList,e,t),c=e.material;e.trigger("beforerender",this,e,t),n?(this.renderPreZ(u,e,t),i.depthFunc(i.LEQUAL)):i.depthFunc(i.LESS);for(var d=v(),f=_.create(),p=0;p0){var s=e[i-1],l=s.joints?s.joints.length:0;if((a.joints.length?a.joints.length:0)===l&&a.material===s.material&&a.lightGroup===s.lightGroup){a.__program=s.__program;continue}}var u=this._programMgr.getProgram(a,o,t);this.validateProgram(u),a.__program=u}},cullRenderList:function(e,t,r){for(var n=[],i=0;i0&&b.min.array[2]<0&&(b.max.array[2]=-1e-20),b.applyProjection(w);var o=b.min.array,s=b.max.array;if(s[0]<-1||o[0]>1||s[1]<-1||o[1]>1||s[2]<-1||o[2]>1)return!0}return!1}),disposeScene:function(e){this.disposeNode(e,!0,!0),e.dispose()},disposeNode:function(e,t,r){e.getParent()&&e.getParent().remove(e),e.traverse((function(e){e.geometry&&t&&e.geometry.dispose(this),e.dispose&&e.dispose(this)}),this)},disposeGeometry:function(e){e.dispose(this)},disposeTexture:function(e){e.dispose(this)},disposeFrameBuffer:function(e){e.dispose(this)},dispose:function(){},screenToNDC:function(e,t,r){r||(r=new u.a),t=this._height-t;var n=this.viewport,i=r.array;return i[0]=(e-n.x)/n.width,i[0]=2*i[0]-1,i[1]=(t-n.y)/n.height,i[1]=2*i[1]-1,r}});E.opaqueSortCompare=E.prototype.opaqueSortCompare=function(e,t){return e.renderOrder===t.renderOrder?e.__program===t.__program?e.material===t.material?e.geometry.__uid__-t.geometry.__uid__:e.material.__uid__-t.material.__uid__:e.__program&&t.__program?e.__program.__uid__-t.__program.__uid__:0:e.renderOrder-t.renderOrder},E.transparentSortCompare=E.prototype.transparentSortCompare=function(e,t){return e.renderOrder===t.renderOrder?e.__depth===t.__depth?e.__program===t.__program?e.material===t.material?e.geometry.__uid__-t.geometry.__uid__:e.material.__uid__-t.material.__uid__:e.__program&&t.__program?e.__program.__uid__-t.__program.__uid__:0:e.__depth-t.__depth:e.renderOrder-t.renderOrder};var S={IDENTITY:v(),WORLD:v(),VIEW:v(),PROJECTION:v(),WORLDVIEW:v(),VIEWPROJECTION:v(),WORLDVIEWPROJECTION:v(),WORLDINVERSE:v(),VIEWINVERSE:v(),PROJECTIONINVERSE:v(),WORLDVIEWINVERSE:v(),VIEWPROJECTIONINVERSE:v(),WORLDVIEWPROJECTIONINVERSE:v(),WORLDTRANSPOSE:v(),VIEWTRANSPOSE:v(),PROJECTIONTRANSPOSE:v(),WORLDVIEWTRANSPOSE:v(),VIEWPROJECTIONTRANSPOSE:v(),WORLDVIEWPROJECTIONTRANSPOSE:v(),WORLDINVERSETRANSPOSE:v(),VIEWINVERSETRANSPOSE:v(),PROJECTIONINVERSETRANSPOSE:v(),WORLDVIEWINVERSETRANSPOSE:v(),VIEWPROJECTIONINVERSETRANSPOSE:v(),WORLDVIEWPROJECTIONINVERSETRANSPOSE:v()};E.COLOR_BUFFER_BIT=a.a.COLOR_BUFFER_BIT,E.DEPTH_BUFFER_BIT=a.a.DEPTH_BUFFER_BIT,E.STENCIL_BUFFER_BIT=a.a.STENCIL_BUFFER_BIT,t.a=E},function(e,t,r){"use strict";function n(e,t){this.action=e,this.context=t}var i={trigger:function(e){if(this.hasOwnProperty("__handlers__")&&this.__handlers__.hasOwnProperty(e)){var t=this.__handlers__[e],r=t.length,n=-1,i=arguments;switch(i.length){case 1:for(;++nu)){var c=Math.sqrt(u-s),d=o-c,f=o+c;return n||(n=new l.a),d<0?f<0?null:(h.scaleAndAdd(n.array,i,a,f),n):(h.scaleAndAdd(n.array,i,a,d),n)}}}(),intersectBoundingBox:function(e,t){var r,n,i,a,o,s,u=this.direction.array,c=this.origin.array,d=e.min.array,f=e.max.array,p=1/u[0],m=1/u[1],g=1/u[2];if(p>=0?(r=(d[0]-c[0])*p,n=(f[0]-c[0])*p):(n=(d[0]-c[0])*p,r=(f[0]-c[0])*p),m>=0?(i=(d[1]-c[1])*m,a=(f[1]-c[1])*m):(a=(d[1]-c[1])*m,i=(f[1]-c[1])*m),r>a||i>n)return null;if((i>r||r!=r)&&(r=i),(a=0?(o=(d[2]-c[2])*g,s=(f[2]-c[2])*g):(s=(d[2]-c[2])*g,o=(f[2]-c[2])*g),r>s||o>n)return null;if((o>r||r!=r)&&(r=o),(s=0?r:n;return t||(t=new l.a),h.scaleAndAdd(t.array,c,u,_),t},intersectTriangle:(n=h.create(),i=h.create(),a=h.create(),o=h.create(),function(e,t,r,s,u,d){var f=this.direction.array,p=this.origin.array;e=e.array,t=t.array,r=r.array,h.sub(n,t,e),h.sub(i,r,e),h.cross(o,i,f);var m=h.dot(n,o);if(s){if(m>-1e-5)return null}else if(m>-1e-5&&m1)return null;h.cross(o,n,a);var _=h.dot(f,o)/m;if(_<0||_>1||g+_>1)return null;h.cross(o,n,i);var v=-h.dot(a,o)/m;return v<0?null:(u||(u=new l.a),d&&l.a.set(d,1-g-_,g,_),h.scaleAndAdd(u.array,p,f,v),u)}),applyTransform:function(e){l.a.add(this.direction,this.direction,this.origin),l.a.transformMat4(this.origin,this.origin,e),l.a.transformMat4(this.direction,this.direction,e),l.a.sub(this.direction,this.direction,this.origin),l.a.normalize(this.direction,this.direction)},copy:function(e){l.a.copy(this.origin,e.origin),l.a.copy(this.direction,e.direction)},clone:function(){var e=new d;return e.copy(this),e}},t.a=d},function(e,t,r){"use strict";var n,i,a=r(1),o=r.n(a),s=o.a.quat,l=function(e,t,r,n){e=e||0,t=t||0,r=r||0,n=void 0===n?1:n,this.array=s.fromValues(e,t,r,n),this._dirty=!0};l.prototype={constructor:l,add:function(e){return s.add(this.array,this.array,e.array),this._dirty=!0,this},calculateW:function(){return s.calculateW(this.array,this.array),this._dirty=!0,this},set:function(e,t,r,n){return this.array[0]=e,this.array[1]=t,this.array[2]=r,this.array[3]=n,this._dirty=!0,this},setArray:function(e){return this.array[0]=e[0],this.array[1]=e[1],this.array[2]=e[2],this.array[3]=e[3],this._dirty=!0,this},clone:function(){return new l(this.x,this.y,this.z,this.w)},conjugate:function(){return s.conjugate(this.array,this.array),this._dirty=!0,this},copy:function(e){return s.copy(this.array,e.array),this._dirty=!0,this},dot:function(e){return s.dot(this.array,e.array)},fromMat3:function(e){return s.fromMat3(this.array,e.array),this._dirty=!0,this},fromMat4:(n=o.a.mat3,i=n.create(),function(e){return n.fromMat4(i,e.array),n.transpose(i,i),s.fromMat3(this.array,i),this._dirty=!0,this}),identity:function(){return s.identity(this.array),this._dirty=!0,this},invert:function(){return s.invert(this.array,this.array),this._dirty=!0,this},len:function(){return s.len(this.array)},length:function(){return s.length(this.array)},lerp:function(e,t,r){return s.lerp(this.array,e.array,t.array,r),this._dirty=!0,this},mul:function(e){return s.mul(this.array,this.array,e.array),this._dirty=!0,this},mulLeft:function(e){return s.multiply(this.array,e.array,this.array),this._dirty=!0,this},multiply:function(e){return s.multiply(this.array,this.array,e.array),this._dirty=!0,this},multiplyLeft:function(e){return s.multiply(this.array,e.array,this.array),this._dirty=!0,this},normalize:function(){return s.normalize(this.array,this.array),this._dirty=!0,this},rotateX:function(e){return s.rotateX(this.array,this.array,e),this._dirty=!0,this},rotateY:function(e){return s.rotateY(this.array,this.array,e),this._dirty=!0,this},rotateZ:function(e){return s.rotateZ(this.array,this.array,e),this._dirty=!0,this},rotationTo:function(e,t){return s.rotationTo(this.array,e.array,t.array),this._dirty=!0,this},setAxes:function(e,t,r){return s.setAxes(this.array,e.array,t.array,r.array),this._dirty=!0,this},setAxisAngle:function(e,t){return s.setAxisAngle(this.array,e.array,t),this._dirty=!0,this},slerp:function(e,t,r){return s.slerp(this.array,e.array,t.array,r),this._dirty=!0,this},sqrLen:function(){return s.sqrLen(this.array)},squaredLength:function(){return s.squaredLength(this.array)},fromEuler:function(e,t){return l.fromEuler(this,e,t)},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var u=Object.defineProperty;if(u){var h=l.prototype;u(h,"x",{get:function(){return this.array[0]},set:function(e){this.array[0]=e,this._dirty=!0}}),u(h,"y",{get:function(){return this.array[1]},set:function(e){this.array[1]=e,this._dirty=!0}}),u(h,"z",{get:function(){return this.array[2]},set:function(e){this.array[2]=e,this._dirty=!0}}),u(h,"w",{get:function(){return this.array[3]},set:function(e){this.array[3]=e,this._dirty=!0}})}l.add=function(e,t,r){return s.add(e.array,t.array,r.array),e._dirty=!0,e},l.set=function(e,t,r,n,i){s.set(e.array,t,r,n,i),e._dirty=!0},l.copy=function(e,t){return s.copy(e.array,t.array),e._dirty=!0,e},l.calculateW=function(e,t){return s.calculateW(e.array,t.array),e._dirty=!0,e},l.conjugate=function(e,t){return s.conjugate(e.array,t.array),e._dirty=!0,e},l.identity=function(e){return s.identity(e.array),e._dirty=!0,e},l.invert=function(e,t){return s.invert(e.array,t.array),e._dirty=!0,e},l.dot=function(e,t){return s.dot(e.array,t.array)},l.len=function(e){return s.length(e.array)},l.lerp=function(e,t,r,n){return s.lerp(e.array,t.array,r.array,n),e._dirty=!0,e},l.slerp=function(e,t,r,n){return s.slerp(e.array,t.array,r.array,n),e._dirty=!0,e},l.multiply=l.mul=function(e,t,r){return s.multiply(e.array,t.array,r.array),e._dirty=!0,e},l.rotateX=function(e,t,r){return s.rotateX(e.array,t.array,r),e._dirty=!0,e},l.rotateY=function(e,t,r){return s.rotateY(e.array,t.array,r),e._dirty=!0,e},l.rotateZ=function(e,t,r){return s.rotateZ(e.array,t.array,r),e._dirty=!0,e},l.setAxisAngle=function(e,t,r){return s.setAxisAngle(e.array,t.array,r),e._dirty=!0,e},l.normalize=function(e,t){return s.normalize(e.array,t.array),e._dirty=!0,e},l.squaredLength=l.sqrLen=function(e){return s.sqrLen(e.array)},l.fromMat3=function(e,t){return s.fromMat3(e.array,t.array),e._dirty=!0,e},l.setAxes=function(e,t,r,n){return s.setAxes(e.array,t.array,r.array,n.array),e._dirty=!0,e},l.rotationTo=function(e,t,r){return s.rotationTo(e.array,t.array,r.array),e._dirty=!0,e},l.fromEuler=function(e,t,r){e._dirty=!0,t=t.array;var n=e.array,i=Math.cos(t[0]/2),a=Math.cos(t[1]/2),o=Math.cos(t[2]/2),s=Math.sin(t[0]/2),l=Math.sin(t[1]/2),u=Math.sin(t[2]/2);switch(r=(r||"XYZ").toUpperCase()){case"XYZ":n[0]=s*a*o+i*l*u,n[1]=i*l*o-s*a*u,n[2]=i*a*u+s*l*o,n[3]=i*a*o-s*l*u;break;case"YXZ":n[0]=s*a*o+i*l*u,n[1]=i*l*o-s*a*u,n[2]=i*a*u-s*l*o,n[3]=i*a*o+s*l*u;break;case"ZXY":n[0]=s*a*o-i*l*u,n[1]=i*l*o+s*a*u,n[2]=i*a*u+s*l*o,n[3]=i*a*o-s*l*u;break;case"ZYX":n[0]=s*a*o-i*l*u,n[1]=i*l*o+s*a*u,n[2]=i*a*u-s*l*o,n[3]=i*a*o+s*l*u;break;case"YZX":n[0]=s*a*o+i*l*u,n[1]=i*l*o+s*a*u,n[2]=i*a*u-s*l*o,n[3]=i*a*o-s*l*u;break;case"XZY":n[0]=s*a*o-i*l*u,n[1]=i*l*o-s*a*u,n[2]=i*a*u+s*l*o,n[3]=i*a*o+s*l*u}},t.a=l},function(e,t,r){"use strict";var n,i=r(28),a=r(9),o=r(52),s=r(49),l=r(1),u=r.n(l),h=u.a.vec3,c=u.a.vec4,d=i.a.extend((function(){return{projectionMatrix:new a.a,invProjectionMatrix:new a.a,viewMatrix:new a.a,frustum:new o.a}}),(function(){this.update(!0)}),{update:function(e){i.a.prototype.update.call(this,e),a.a.invert(this.viewMatrix,this.worldTransform),this.updateProjectionMatrix(),a.a.invert(this.invProjectionMatrix,this.projectionMatrix),this.frustum.setFromProjection(this.projectionMatrix)},setViewMatrix:function(e){a.a.copy(this.viewMatrix,e),a.a.invert(this.worldTransform,e),this.decomposeWorldTransform()},decomposeProjectionMatrix:function(){},setProjectionMatrix:function(e){a.a.copy(this.projectionMatrix,e),a.a.invert(this.invProjectionMatrix,e),this.decomposeProjectionMatrix()},updateProjectionMatrix:function(){},castRay:(n=c.create(),function(e,t){var r=void 0!==t?t:new s.a,i=e.array[0],a=e.array[1];return c.set(n,i,a,-1,1),c.transformMat4(n,n,this.invProjectionMatrix.array),c.transformMat4(n,n,this.worldTransform.array),h.scale(r.origin.array,n,1/n[3]),c.set(n,i,a,1,1),c.transformMat4(n,n,this.invProjectionMatrix.array),c.transformMat4(n,n,this.worldTransform.array),h.scale(n,n,1/n[3]),h.sub(r.direction.array,n,r.origin.array),h.normalize(r.direction.array,r.direction.array),r.direction._dirty=!0,r.origin._dirty=!0,r})});t.a=d},function(e,t,r){"use strict";r(4);var n,i=r(15),a=r(67),o=r(1),s=r.n(o).a.vec3,l=s.set,u=s.copy,h=s.transformMat4,c=Math.min,d=Math.max,f=function(){this.planes=[];for(var e=0;e<6;e++)this.planes.push(new a.a);for(this.boundingBox=new i.a,this.vertices=[],e=0;e<8;e++)this.vertices[e]=s.fromValues(0,0,0)};f.prototype={setFromProjection:function(e){var t=this.planes,r=e.array,n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],u=r[5],h=r[6],c=r[7],d=r[8],f=r[9],p=r[10],m=r[11],g=r[12],_=r[13],v=r[14],y=r[15];l(t[0].normal.array,o-n,c-s,m-d),t[0].distance=-(y-g),t[0].normalize(),l(t[1].normal.array,o+n,c+s,m+d),t[1].distance=-(y+g),t[1].normalize(),l(t[2].normal.array,o+i,c+u,m+f),t[2].distance=-(y+_),t[2].normalize(),l(t[3].normal.array,o-i,c-u,m-f),t[3].distance=-(y-_),t[3].normalize(),l(t[4].normal.array,o-a,c-h,m-p),t[4].distance=-(y-v),t[4].normalize(),l(t[5].normal.array,o+a,c+h,m+p),t[5].distance=-(y+v),t[5].normalize();var x=this.boundingBox;if(0===y){var T=u/n,b=-v/(p-1),w=-v/(p+1),E=-w/u,S=-b/u;x.min.set(-E*T,-E,w),x.max.set(E*T,E,b);var M=this.vertices;l(M[0],-E*T,-E,w),l(M[1],-E*T,E,w),l(M[2],E*T,-E,w),l(M[3],E*T,E,w),l(M[4],-S*T,-S,b),l(M[5],-S*T,S,b),l(M[6],S*T,-S,b),l(M[7],S*T,S,b)}else{var A=(-1-g)/n,C=(1-g)/n,L=(1-_)/u,N=(-1-_)/u,D=(-1-v)/p,I=(1-v)/p;x.min.set(Math.min(A,C),Math.min(N,L),Math.min(I,D)),x.max.set(Math.max(C,A),Math.max(L,N),Math.max(D,I));var P=x.min.array,O=x.max.array;M=this.vertices,l(M[0],P[0],P[1],P[2]),l(M[1],P[0],O[1],P[2]),l(M[2],O[0],P[1],P[2]),l(M[3],O[0],O[1],P[2]),l(M[4],P[0],P[1],O[2]),l(M[5],P[0],O[1],O[2]),l(M[6],O[0],P[1],O[2]),l(M[7],O[0],O[1],O[2])}},getTransformedBoundingBox:(n=s.create(),function(e,t){var r=this.vertices,i=t.array,a=e.min,o=e.max,s=a.array,l=o.array,f=r[0];h(n,f,i),u(s,n),u(l,n);for(var p=1;p<8;p++)f=r[p],h(n,f,i),s[0]=c(n[0],s[0]),s[1]=c(n[1],s[1]),s[2]=c(n[2],s[2]),l[0]=d(n[0],l[0]),l[1]=d(n[1],l[1]),l[2]=d(n[2],l[2]);return a._dirty=!0,o._dirty=!0,e})},t.a=f},function(e,t){var r=function(){this.head=null,this.tail=null,this._len=0},n=r.prototype;n.insert=function(e){var t=new i(e);return this.insertEntry(t),t},n.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.remove=function(e){var t=e.prev,r=e.next;t?t.next=r:this.head=r,r?r.prev=t:this.tail=t,e.next=e.prev=null,this._len--},n.len=function(){return this._len},n.clear=function(){this.head=this.tail=null,this._len=0};var i=function(e){this.value=e,this.next,this.prev},a=function(e){this._list=new r,this._map={},this._maxSize=e||10,this._lastRemovedEntry=null},o=a.prototype;o.put=function(e,t){var r=this._list,n=this._map,a=null;if(null==n[e]){var o=r.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=r.head;r.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new i(t),s.key=e,r.insertEntry(s),n[e]=s}return a},o.get=function(e){var t=this._map[e],r=this._list;if(null!=t)return t!==r.tail&&(r.remove(t),r.insertEntry(t)),t.value},o.clear=function(){this._list.clear(),this._map={}};var s=a;e.exports=s},function(e,t,r){"use strict";var n=r(5),i=r(25),a=r(102),o=r(55),s=r(56),l=r(29),u=r(104),h=r(105),c={loadTexture:function(e,t,r,a){if("function"==typeof t?(a=r=t,t={}):t=t||{},"string"==typeof e){if(e.match(/.hdr$/)||"hdr"===t.fileType)return o=new n.a({width:0,height:0,sRGB:!1}),c._fetchTexture(e,(function(e){h.a.parseRGBE(e,o,t.exposure),o.dirty(),r&&r(o)}),a),o;e.match(/.dds$/)||"dds"===t.fileType?(o=new n.a({width:0,height:0}),c._fetchTexture(e,(function(e){u.a.parse(e,o),o.dirty(),r&&r(o)}),a)):((o=new n.a).load(e),o.success(r),o.error(a))}else if("object"==typeof e&&void 0!==e.px){var o;(o=new i.a).load(e),o.success(r),o.error(a)}return o},loadPanorama:function(e,t,r,n,i,a){var o=this;"function"==typeof n?(a=i=n,n={}):n=n||{},c.loadTexture(t,n,(function(t){t.flipY=n.flipY||!1,o.panoramaToCubeMap(e,t,r,n),t.dispose(e),i&&i(r)}),a)},panoramaToCubeMap:function(e,t,r,n){var i=new o.a,a=new s.a({scene:new l.a});return a.material.set("diffuseMap",t),(n=n||{}).encodeRGBM&&a.material.define("fragment","RGBM_ENCODE"),r.sRGB=t.sRGB,i.texture=r,i.render(e,a.scene),i.texture=null,i.dispose(e),r},heightToNormal:function(e,t){var r=document.createElement("canvas"),n=r.width=e.width,i=r.height=e.height,a=r.getContext("2d");a.drawImage(e,0,0,n,i),t=t||!1;for(var o=a.getImageData(0,0,n,i),s=a.createImageData(n,i),l=0;l20)return console.warn("Given image is not a height map"),e}var d,f,p,m;l%(4*n)==0?(d=o.data[l],p=o.data[l+4]):l%(4*n)==4*(n-1)?(d=o.data[l-4],p=o.data[l]):(d=o.data[l-4],p=o.data[l+4]),l<4*n?(f=o.data[l],m=o.data[l+4*n]):l>n*(i-1)*4?(f=o.data[l-4*n],m=o.data[l]):(f=o.data[l-4*n],m=o.data[l+4*n]),s.data[l]=d-p+127,s.data[l+1]=f-m+127,s.data[l+2]=255,s.data[l+3]=255}return a.putImageData(s,0,0),r},isHeightImage:function(e,t,r){if(!e||!e.width||!e.height)return!1;var n=document.createElement("canvas"),i=n.getContext("2d"),a=t||32;r=r||20,n.width=n.height=a,i.drawImage(e,0,0,a,a);for(var o=i.getImageData(0,0,a,a),s=0;sr)return!1}return!0},_fetchTexture:function(e,t,r){a.a.get({url:e,responseType:"arraybuffer",onload:t,onerror:r})},createChessboard:function(e,t,r,i){e=e||512,t=t||64,r=r||"black",i=i||"white";var a=Math.ceil(e/t),o=document.createElement("canvas");o.width=e,o.height=e;var s=o.getContext("2d");s.fillStyle=i,s.fillRect(0,0,e,e),s.fillStyle=r;for(var l=0;l0?this.material.define("fragment","LOD"):this.material.undefine("fragment","LOD"),e.renderPass([this],t)}});t.a=l},function(e,t,r){"use strict";var n=r(2),i=r(143),a=r(144);n.a.Shader.import(a.a),t.a=n.a.Mesh.extend((function(){return{geometry:new i.a({dynamic:!0}),material:new n.a.Material({shader:n.a.createShader("ecgl.labels"),transparent:!0,depthMask:!1}),culling:!1,castShadow:!1,ignorePicking:!0}}))},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(2),o=r(186),s=r(22),l=r(3),u=r(1),h=r.n(u),c=r(60),d=r(61),f=r(40),p=h.a.vec3;function m(e){this.rootNode=new a.a.Node,this._triangulationResults={},this._shadersMap=a.a.COMMON_SHADERS.reduce((function(e,t){return e[t]=a.a.createShader("ecgl."+t),e}),{}),this._linesShader=a.a.createShader("ecgl.meshLines3D");var t={};a.a.COMMON_SHADERS.forEach((function(e){t[e]=new a.a.Material({shader:a.a.createShader("ecgl."+e)})})),this._groundMaterials=t,this._groundMesh=new a.a.Mesh({geometry:new a.a.PlaneGeometry({dynamic:!0}),castShadow:!1,renderNormal:!0,$ignorePicking:!0}),this._groundMesh.rotation.rotateX(-Math.PI/2),this._labelsBuilder=new d.a(512,512,e),this._labelsBuilder.getMesh().renderOrder=100,this._labelsBuilder.getMesh().material.depthTest=!1,this.rootNode.add(this._labelsBuilder.getMesh()),this._initMeshes(),this._api=e}a.a.Shader.import(f.a),m.prototype={constructor:m,extrudeY:!0,update:function(e,t,r,n,i){var a=e.getData();null==n&&(n=0),null==i&&(i=a.count()),this._startIndex=n,this._endIndex=i-1,this._triangulation(e,n,i);var o=this._getShader(e.get("shading"));this._prepareMesh(e,o,r,n,i),this.rootNode.updateWorldTransform(),this._updateRegionMesh(e,r,n,i);var s=e.coordinateSystem;"geo3D"===s.type&&this._updateGroundPlane(e,s,r);var l=this;this._labelsBuilder.updateData(a,n,i),this._labelsBuilder.getLabelPosition=function(e,t,r){var n=a.getName(e),i=r;if("geo3D"===s.type)return u=s.getRegion(n).center,s.dataToPoint([u[0],u[1],i]);var o=l._triangulationResults[e-l._startIndex],u=l.extrudeY?[(o.max[0]+o.min[0])/2,o.max[1]+i,(o.max[2]+o.min[2])/2]:[(o.max[0]+o.min[0])/2,(o.max[1]+o.min[1])/2,o.max[2]+i]},this._data=a,this._labelsBuilder.updateLabels(),this._updateDebugWireframe(e),this._lastHoverDataIndex=0},_initMeshes:function(){this.rootNode.removeAll();var e,t=this,r=(e=new a.a.Mesh({name:"Polygon",material:new a.a.Material({shader:t._shadersMap.lambert}),culling:!1,geometry:new a.a.Geometry({sortTriangles:!0,dynamic:!0}),ignorePicking:!0,renderNormal:!0}),i.a.util.extend(e.geometry,c.a),e),n=new a.a.Mesh({material:new a.a.Material({shader:this._linesShader}),castShadow:!1,ignorePicking:!0,$ignorePicking:!0,geometry:new s.a({useNativeLine:!1})});this.rootNode.add(r),this.rootNode.add(n),r.material.define("both","VERTEX_COLOR"),r.material.define("fragment","DOUBLE_SIDED"),this._polygonMesh=r,this._linesMesh=n,this.rootNode.add(this._groundMesh)},_getShader:function(e){var t=this._shadersMap[e];return t||(console.warn("Unkown shading "+e),t=this._shadersMap.lambert),t.__shading=e,t},_prepareMesh:function(e,t,r,n,i){for(var o=0,s=0,l=0,u=0,h=n;h65535?new Uint32Array(3*s):new Uint16Array(3*s),f.material.shader!==t&&f.material.attachShader(t,!0),a.a.setMaterialFromModel(t.__shading,f.material,e,r),l>0&&(this._linesMesh.geometry.resetOffset(),this._linesMesh.geometry.setVertexCount(l),this._linesMesh.geometry.setTriangleCount(u)),this._dataIndexOfVertex=new Uint32Array(o),this._vertexRangeOfDataIndex=new Uint32Array(2*(i-n))},_updateRegionMesh:function(e,t,r,n){for(var i=e.getData(),o=0,s=0,u=!1,h=this._polygonMesh,c=this._linesMesh,d=r;d0;E&&(w*=t.getDevicePixelRatio(),this._updateLinesGeometry(c.geometry,e,d,x,w,e.coordinateSystem.transform)),c.invisible=!E,c.material.set({color:v})}(h=this._polygonMesh).material.transparent=u,h.material.depthMask=!u,h.geometry.updateBoundingBox(),h.material.get("normalMap")&&h.geometry.generateTangents(),h.seriesIndex=e.seriesIndex,h.on("mousemove",this._onmousemove,this),h.on("mouseout",this._onmouseout,this)},_updateDebugWireframe:function(e){var t=e.getModel("debug.wireframe");if(t.get("show")){var r=a.a.parseColor(t.get("lineStyle.color")||"rgba(0,0,0,0.5)"),n=l.a.firstNotNull(t.get("lineStyle.width"),1),i=this._polygonMesh;i.geometry.generateBarycentric(),i.material.define("both","WIREFRAME_TRIANGLE"),i.material.set("wireframeLineColor",r),i.material.set("wireframeLineWidth",n)}},_onmousemove:function(e){var t=this._dataIndexOfVertex[e.triangle[0]];null==t&&(t=-1),t!==this._lastHoverDataIndex&&(this.downplay(this._lastHoverDataIndex),this.highlight(t)),this._lastHoverDataIndex=t,this._polygonMesh.dataIndex=t},_onmouseover:function(e){if(e.target){var t=e.target.eventData?this._data.indexOfName(e.target.eventData.name):e.target.dataIndex;null!=t&&(this.highlight(t),this._labelsBuilder.updateLabels([t]))}},_onmouseout:function(e){e.target&&(this.downplay(this._lastHoverDataIndex),this._lastHoverDataIndex=-1,this._polygonMesh.dataIndex=-1)},_updateGroundPlane:function(e,t,r){var n=e.getModel("groundPlane",e);if(this._groundMesh.invisible=!n.get("show",!0),!this._groundMesh.invisible){var i=e.get("shading"),o=this._groundMaterials[i];o||(console.warn("Unkown shading "+i),o=this._groundMaterials.lambert),a.a.setMaterialFromModel(i,o,n,r),o.get("normalMap")&&this._groundMesh.geometry.generateTangents(),this._groundMesh.material=o,this._groundMesh.material.set("color",a.a.parseColor(n.get("color"))),this._groundMesh.scale.set(t.size[0],t.size[2],1)}},_triangulation:function(e,t,r){this._triangulationResults=[];for(var n=[1/0,1/0,1/0],i=[-1/0,-1/0,-1/0],a=e.coordinateSystem,s=t;s1?n:0,D[H][_]=A.points[V+2],l.set(i+H,D[H]),s?(R[0]=(A.points[V]*v[0]-y[0])/T,R[1]=(A.points[V+2]*v[_]-y[_])/T):(R[0]=(k?F:F+G)/T,R[1]=(D[H][g]*v[g]-y[g])/T),h.set(i+H,R)}for(p.sub(I,D[1],D[0]),p.sub(P,D[3],D[0]),p.cross(O,I,P),p.normalize(O,O),H=0;H<4;H++)u.set(i+H,O),f&&c.set(i+H,o);for(H=0;H<6;H++)m[3*a+H]=N[H]+i;i+=4,a+=2,F+=G}}return t.dirty(),{vertexOffset:i,triangleOffset:a}},_getRegionLinesInfo:function(e,t,r){var n=0,i=0;return t.getRegionModel(e).getModel("itemStyle").get("borderWidth")>0&&t.getRegionPolygonCoords(e).forEach((function(e){var t=e.exterior,a=e.interiors;n+=r.getPolylineVertexCount(t),i+=r.getPolylineTriangleCount(t);for(var o=0;othis._endIndex)){t-=this._startIndex;for(var n=this._vertexRangeOfDataIndex[2*t];n=2e4},doSortTriangles:function(e,t){var r=this.indices;if(0===t){var n=this.attributes.position;e=e.array,this._triangleZList&&this._triangleZList.length===this.triangleCount||(this._triangleZList=new Float32Array(this.triangleCount),this._sortedTriangleIndices=new Uint32Array(this.triangleCount),this._indicesTmp=new r.constructor(r.length),this._triangleZListTmp=new Float32Array(this.triangleCount));for(var i,u=0,h=0;h0,r={},n=0;n2?(g=this._updateSymbolSprite(e,p,d,f),u.enableTexture("sprite")):u.disableTexture("sprite"),c.position.init(i-n);var _=[];if(m){u.undefine("VERTEX_SIZE"),u.undefine("VERTEX_COLOR");var v=l.getVisual("color"),y=l.getVisual("opacity");a.a.parseColor(v,_),_[3]*=y,u.set({color:_,u_Size:d.maxSize*this._sizeScale})}else u.set({color:[1,1,1,1]}),u.define("VERTEX_SIZE"),u.define("VERTEX_COLOR"),c.size.init(i-n),c.color.init(i-n),this._originalOpacity=new Float32Array(i-n);for(var x=l.getLayout("points"),T=c.position.value,b=0;b1?(s[0]=r.maxSize,s[1]=r.maxSize/r.aspect):(s[1]=r.maxSize,s[0]=r.maxSize*r.aspect),s[0]=s[0]||1,s[1]=s[1]||1,this._symbolType===r.type&&(i=this._symbolSize,a=s,i&&a&&i[0]===a[0]&&i[1]===a[1])&&this._lineWidth===t.lineWidth||(o.a.createSymbolSprite(r.type,s,{fill:"#fff",lineWidth:t.lineWidth,stroke:"transparent",shadowColor:"transparent",minMargin:Math.min(s[0]/2,10)},this._spriteImageCanvas),o.a.createSDFFromCanvas(this._spriteImageCanvas,Math.min(this._spriteImageCanvas.width,32),20,this._mesh.material.get("sprite").image),this._symbolType=r.type,this._symbolSize=s,this._lineWidth=t.lineWidth),this._spriteImageCanvas.width/r.maxSize*n},_updateMaterial:function(e,t){var r="lighter"===e.get("blendMode")?a.a.additiveBlend:null,n=this._mesh.material;n.blend=r,n.set("lineWidth",t.lineWidth/20);var i=a.a.parseColor(t.stroke);n.set("strokeColor",i),n.transparent=!0,n.depthMask=!1,n.depthTest=!this.is2D,n.sortVertices=!this.is2D},_updateLabelBuilder:function(e,t,r){var n=e.getData(),i=this._mesh.geometry,a=i.attributes.position.value,o=(t=this._startDataIndex,this._mesh.sizeScale);this._labelsBuilder.updateData(n,t,r),this._labelsBuilder.getLabelPosition=function(e,r,n){var i=3*(e-t);return[a[i],a[i+1],a[i+2]]},this._labelsBuilder.getLabelDistance=function(e,r,n){return i.attributes.size.get(e-t)/o/2+n},this._labelsBuilder.updateLabels()},_updateAnimation:function(e){a.a.updateVertexAnimation([["prevPosition","position"],["prevSize","size"]],this._prevMesh,this._mesh,e)},_updateHandler:function(e,t,r){var n,i=e.getData(),a=this._mesh,o=this,s=-1,l=e.coordinateSystem&&"cartesian3D"===e.coordinateSystem.type;l&&(n=e.coordinateSystem.model),a.seriesIndex=e.seriesIndex,a.off("mousemove"),a.off("mouseout"),a.on("mousemove",(function(t){var u=t.vertexIndex+o._startDataIndex;u!==s&&(this.highlightOnMouseover&&(this.downplay(i,s),this.highlight(i,u),this._labelsBuilder.updateLabels([u])),l&&r.dispatchAction({type:"grid3DShowAxisPointer",value:[i.get(e.coordDimToDataDim("x")[0],u),i.get(e.coordDimToDataDim("y")[0],u),i.get(e.coordDimToDataDim("z")[0],u)],grid3DIndex:n.componentIndex})),a.dataIndex=u,s=u}),this),a.on("mouseout",(function(e){var t=e.vertexIndex+o._startDataIndex;this.highlightOnMouseover&&(this.downplay(i,t),this._labelsBuilder.updateLabels()),s=-1,a.dataIndex=-1,l&&r.dispatchAction({type:"grid3DHideAxisPointer",grid3DIndex:n.componentIndex})}),this)},updateLayout:function(e,t,r){var n=e.getData();if(this._mesh){var i=this._mesh.geometry.attributes.position.value,a=n.getLayout("points");if(this.is2D)for(var o=0;othis._endDataIndex||tthis._endDataIndex||t.05&&(a=!0),f!==o&&(s=!0),o=f,n=c}return a&&console.warn("Different symbol width / height ratio will be ignored."),s&&console.warn("Different symbol type will be ignored."),{maxSize:l,type:o,aspect:n}}},t.a=c},function(e,t,r){"use strict";t.a="@export clay.prez.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nattribute vec3 position : POSITION;\n@import clay.chunk.skinning_header\nvoid main()\n{\n vec3 skinnedPosition = position;\n#ifdef SKINNING\n @import clay.chunk.skin_matrix\n skinnedPosition = (skinMatrixWS * vec4(position, 1.0)).xyz;\n#endif\n gl_Position = worldViewProjection * vec4(skinnedPosition, 1.0);\n}\n@end\n@export clay.prez.fragment\nvoid main()\n{\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n}\n@end"},function(e,t,r){"use strict";var n,i=r(28),a=r(11),o=0,s=null,l=!0,u=function(){this.triangleCount=0,this.vertexCount=0,this.drawCallCount=0};function h(e,t,r){this.availableAttributes=e,this.availableAttributeSymbols=t,this.indicesBuffer=r,this.vao=null}var c,d=i.a.extend({material:null,geometry:null,mode:a.a.TRIANGLES,_drawCache:null,_renderInfo:null},(function(){this._drawCache={},this._renderInfo=new u}),{__program:null,lightGroup:0,renderOrder:0,lineWidth:1,culling:!0,cullFace:a.a.BACK,frontFace:a.a.CCW,frustumCulling:!0,receiveShadow:!0,castShadow:!0,ignorePicking:!1,ignorePreZ:!1,ignoreGBuffer:!1,isRenderable:function(){return this.geometry&&this.material&&this.material.shader&&!this.invisible&&this.geometry.vertexCount>0},beforeRender:function(e){},afterRender:function(e,t){},getBoundingBox:function(e,t){return t=i.a.prototype.getBoundingBox.call(this,e,t),this.geometry&&this.geometry.boundingBox&&t.union(this.geometry.boundingBox),t},render:function(e,t,r){var i=e.gl,u=(t=t||this.material).shader,c=this.geometry,d=this.mode,f=c.vertexCount,p=(c.isUseIndices(),e.getGLExtension("OES_element_index_uint")&&f>65535?i.UNSIGNED_INT:i.UNSIGNED_SHORT),m=e.getGLExtension("OES_vertex_array_object"),g=!c.dynamic,_=this._renderInfo;_.vertexCount=f,_.triangleCount=0,_.drawCallCount=0;var v=!1;if(((n=e.__uid__+"-"+c.__uid__+"-"+r.__uid__)!==o||m&&g||c._cache.isDirty("any"))&&(v=!0),o=n,v){var y=this._drawCache[n];if(!y){var x=c.getBufferChunks(e);if(!x)return;y=[];for(var T=0;T>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},nearestPowerOfTwo:function(e){return Math.pow(2,Math.round(Math.log(e)/Math.LN2))}};t.a=n},function(e,t,r){"use strict";var n,i,a,o,s=r(4),l=r(1),u=r.n(l),h=u.a.vec3,c=u.a.mat4,d=u.a.vec4,f=function(e,t){this.normal=e||new s.a(0,1,0),this.distance=t||0};f.prototype={constructor:f,distanceToPoint:function(e){return h.dot(e.array,this.normal.array)-this.distance},projectPoint:function(e,t){t||(t=new s.a);var r=this.distanceToPoint(e);return h.scaleAndAdd(t.array,e.array,this.normal.array,-r),t._dirty=!0,t},normalize:function(){var e=1/h.len(this.normal.array);h.scale(this.normal.array,e),this.distance*=e},intersectFrustum:function(e){for(var t=e.vertices,r=this.normal.array,n=h.dot(t[0].array,r)>this.distance,i=1;i<8;i++)if(h.dot(t[i].array,r)>this.distance!=n)return!0},intersectLine:(o=h.create(),function(e,t,r){var n=this.distanceToPoint(e),i=this.distanceToPoint(t);if(n>0&&i>0||n<0&&i<0)return null;var a=this.normal.array,l=this.distance,u=e.array;h.sub(o,t.array,e.array),h.normalize(o,o);var c=h.dot(a,o);if(0===c)return null;r||(r=new s.a);var d=(h.dot(a,u)-l)/c;return h.scaleAndAdd(r.array,u,o,-d),r._dirty=!0,r}),applyTransform:(n=c.create(),i=d.create(),a=d.create(),a[3]=1,function(e){e=e.array,h.scale(a,this.normal.array,this.distance),d.transformMat4(a,a,e),this.distance=h.dot(a,this.normal.array),c.invert(n,e),c.transpose(n,n),i[3]=0,h.copy(i,this.normal.array),d.transformMat4(i,i,n),h.copy(this.normal.array,i)}),copy:function(e){h.copy(this.normal.array,e.normal.array),this.normal._dirty=!0,this.distance=e.distance},clone:function(){var e=new f;return e.copy(this),e}},t.a=f},function(e,t,r){"use strict";var n=r(13),i=r(15),a=n.a.extend({dynamic:!1,widthSegments:40,heightSegments:20,phiStart:0,phiLength:2*Math.PI,thetaStart:0,thetaLength:Math.PI,radius:1},(function(){this.build()}),{build:function(){var e=this.heightSegments,t=this.widthSegments,r=this.attributes.position,n=this.attributes.texcoord0,a=this.attributes.normal,o=(t+1)*(e+1);r.init(o),n.init(o),a.init(o);var s,l,u,h,c,d,f,p,m,g,_,v=o>65535?Uint32Array:Uint16Array,y=this.indices=new v(t*e*6),x=this.radius,T=this.phiStart,b=this.phiLength,w=this.thetaStart,E=this.thetaLength,S=[],M=[],A=0,C=1/(x=this.radius);for(f=0;f<=e;f++)for(d=0;d<=t;d++)h=d/t,c=f/e,s=-x*Math.cos(T+h*b)*Math.sin(w+c*E),l=x*Math.cos(w+c*E),u=x*Math.sin(T+h*b)*Math.sin(w+c*E),S[0]=s,S[1]=l,S[2]=u,M[0]=h,M[1]=c,r.set(A,S),n.set(A,M),S[0]*=C,S[1]*=C,S[2]*=C,a.set(A,S),A++;var L=t+1,N=0;for(f=0;fo&&(i=this._x=0,a+=this._rowHeight+l,this._y=a,this._rowHeight=0),this._x+=t+l,this._rowHeight=Math.max(this._rowHeight,r),a+r+l>s)return null;e.position[0]+=this.offsetX*this.dpr+i,e.position[1]+=this.offsetY*this.dpr+a,this._zr.add(e);var u=[this.offsetX/this.width,this.offsetY/this.height];return[[i/o+u[0],a/s+u[1]],[(i+t)/o+u[0],(a+r)/s+u[1]]]},_fitElement:function(e,t,r){var n=e.getBoundingRect(),i=t/n.width,a=r/n.height;e.position=[-n.x*i,-n.y*a],e.scale=[i,a],e.update()}},s.prototype={clear:function(){for(var e=0;e=e)){var i=(r+this._nodeWidth)*this._dpr,a=(n+this._nodeHeight)*this._dpr;try{this._zr.resize({width:i,height:a})}catch(e){this._canvas.width=i,this._canvas.height=a}var s=new o(this._zr,r,n,this._nodeWidth,this._nodeHeight,this._gap,this._dpr);return this._textureAtlasNodes.push(s),s}console.error("Too much labels. Some will be ignored.")},add:function(e,t,r){if(this._coords[e.id])return console.warn("Element already been add"),this._coords[e.id];var n=this._getCurrentNode().add(e,t,r);if(!n){var i=this._expand();if(!i)return;n=i.add(e,t,r)}return this._coords[e.id]=n,n},getCoordsScale:function(){var e=this._dpr;return[this._nodeWidth/this._canvas.width*e,this._nodeHeight/this._canvas.height*e]},getCoords:function(e){return this._coords[e]}},t.a=s},function(e,t,r){"use strict";t.a=function(e,t,r){var n,i=e.scale;return"ordinal"===i.type&&("function"==typeof r?(n=i.getTicks()[t],!r(n,i.getLabel(n))):t%(r+1))}},function(e,t,r){var n,i,a,o,s=r(76),l=r(77),u=s.applyTransform,h=Math.min,c=Math.max;function d(e,t,r,n){r<0&&(e+=r,r=-r),n<0&&(t+=n,n=-n),this.x=e,this.y=t,this.width=r,this.height=n}d.prototype={constructor:d,union:function(e){var t=h(e.x,this.x),r=h(e.y,this.y);this.width=c(e.x+e.width,this.x+this.width)-t,this.height=c(e.y+e.height,this.y+this.height)-r,this.x=t,this.y=r},applyTransform:(n=[],i=[],a=[],o=[],function(e){if(e){n[0]=a[0]=this.x,n[1]=o[1]=this.y,i[0]=o[0]=this.x+this.width,i[1]=a[1]=this.y+this.height,u(n,n,e),u(i,i,e),u(a,a,e),u(o,o,e),this.x=h(n[0],i[0],a[0],o[0]),this.y=h(n[1],i[1],a[1],o[1]);var t=c(n[0],i[0],a[0],o[0]),r=c(n[1],i[1],a[1],o[1]);this.width=t-this.x,this.height=r-this.y}}),calculateTransform:function(e){var t=this,r=e.width/t.width,n=e.height/t.height,i=l.create();return l.translate(i,i,[-t.x,-t.y]),l.scale(i,i,[r,n]),l.translate(i,i,[e.x,e.y]),i},intersect:function(e){if(!e)return!1;e instanceof d||(e=d.create(e));var t=this,r=t.x,n=t.x+t.width,i=t.y,a=t.y+t.height,o=e.x,s=e.x+e.width,l=e.y,u=e.y+e.height;return!(n=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height},clone:function(){return new d(this.x,this.y,this.width,this.height)},copy:function(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},d.create=function(e){return new d(e.x,e.y,e.width,e.height)};var f=d;e.exports=f},function(e,t){var r="undefined"==typeof Float32Array?Array:Float32Array;function n(e){return Math.sqrt(a(e))}var i=n;function a(e){return e[0]*e[0]+e[1]*e[1]}var o=a;function s(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var l=s;function u(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var h=u;t.create=function(e,t){var n=new r(2);return null==e&&(e=0),null==t&&(t=0),n[0]=e,n[1]=t,n},t.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e},t.clone=function(e){var t=new r(2);return t[0]=e[0],t[1]=e[1],t},t.set=function(e,t,r){return e[0]=t,e[1]=r,e},t.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e},t.scaleAndAdd=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e},t.sub=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e},t.len=n,t.length=i,t.lenSquare=a,t.lengthSquare=o,t.mul=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e},t.div=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e},t.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]},t.scale=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e},t.normalize=function(e,t){var r=n(t);return 0===r?(e[0]=0,e[1]=0):(e[0]=t[0]/r,e[1]=t[1]/r),e},t.distance=s,t.dist=l,t.distanceSquare=u,t.distSquare=h,t.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e},t.lerp=function(e,t,r,n){return e[0]=t[0]+n*(r[0]-t[0]),e[1]=t[1]+n*(r[1]-t[1]),e},t.applyTransform=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i+r[4],e[1]=r[1]*n+r[3]*i+r[5],e},t.min=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e},t.max=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}},function(e,t){var r="undefined"==typeof Float32Array?Array:Float32Array;function n(){var e=new r(6);return i(e),e}function i(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}t.create=n,t.identity=i,t.copy=a,t.mul=function(e,t,r){var n=t[0]*r[0]+t[2]*r[1],i=t[1]*r[0]+t[3]*r[1],a=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],l=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e},t.translate=function(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e},t.rotate=function(e,t,r){var n=t[0],i=t[2],a=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(r),h=Math.cos(r);return e[0]=n*h+o*u,e[1]=-n*u+o*h,e[2]=i*h+s*u,e[3]=-i*u+h*s,e[4]=h*a+u*l,e[5]=h*l-u*a,e},t.scale=function(e,t,r){var n=r[0],i=r[1];return e[0]=t[0]*n,e[1]=t[1]*i,e[2]=t[2]*n,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*i,e},t.invert=function(e,t){var r=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=r*o-a*n;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-n*l,e[3]=r*l,e[4]=(n*s-o*i)*l,e[5]=(a*i-r*s)*l,e):null},t.clone=function(e){var t=n();return a(t,e),t}},function(e,t,r){var n=r(12),i=1e-4,a=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function o(e){return Math.floor(Math.log(e)/Math.LN10)}t.linearMap=function(e,t,r,n){var i=t[1]-t[0],a=r[1]-r[0];if(0===i)return 0===a?r[0]:(r[0]+r[1])/2;if(n)if(i>0){if(e<=t[0])return r[0];if(e>=t[1])return r[1]}else{if(e>=t[0])return r[0];if(e<=t[1])return r[1]}else{if(e===t[0])return r[0];if(e===t[1])return r[1]}return(e-t[0])/i*a+r[0]},t.parsePercent=function(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return"string"==typeof e?(r=e,r.replace(/^\s+/,"").replace(/\s+$/,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var r},t.round=function(e,t,r){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),r?e:+e},t.asc=function(e){return e.sort((function(e,t){return e-t})),e},t.getPrecision=function(e){if(e=+e,isNaN(e))return 0;for(var t=1,r=0;Math.round(e*t)/t!==e;)t*=10,r++;return r},t.getPrecisionSafe=function(e){var t=e.toString(),r=t.indexOf("e");if(r>0){var n=+t.slice(r+1);return n<0?-n:0}var i=t.indexOf(".");return i<0?0:t.length-1-i},t.getPixelPrecision=function(e,t){var r=Math.log,n=Math.LN10,i=Math.floor(r(e[1]-e[0])/n),a=Math.round(r(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20},t.getPercentWithPrecision=function(e,t,r){if(!e[t])return 0;var i=n.reduce(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===i)return 0;for(var a=Math.pow(10,r),o=n.map(e,(function(e){return(isNaN(e)?0:e)/i*a*100})),s=100*a,l=n.map(o,(function(e){return Math.floor(e)})),u=n.reduce(l,(function(e,t){return e+t}),0),h=n.map(o,(function(e,t){return e-l[t]}));uc&&(c=h[f],d=f);++l[d],h[d]=0,++u}return l[t]/a},t.MAX_SAFE_INTEGER=9007199254740991,t.remRadian=function(e){var t=2*Math.PI;return(e%t+t)%t},t.isRadianAroundZero=function(e){return e>-1e-4&&e=-20?+e.toFixed(r<0?-r:0):e},t.reformIntervals=function(e){e.sort((function(e,t){return s(e,t,0)?-1:1}));for(var t=-1/0,r=1,n=0;n=0}},function(e,t,r){"use strict";var n=r(5),i=r(11),a=r(21),o=function(){this._pool={},this._allocatedTextures=[]};o.prototype={constructor:o,get:function(e){var t=u(e);this._pool.hasOwnProperty(t)||(this._pool[t]=[]);var r=this._pool[t];if(!r.length){var i=new n.a(e);return this._allocatedTextures.push(i),i}return r.pop()},put:function(e){var t=u(e);this._pool.hasOwnProperty(t)||(this._pool[t]=[]),this._pool[t].push(e)},clear:function(e){for(var t=0;tc&&u.push({pivot:Math.floor((h+c)/2),left:c,right:h}),c=s[l].pivot+1,(h=s[l].right)>c&&u.push({pivot:Math.floor((h+c)/2),left:c,right:h})}s=this._parts=u}else for(l=0;l65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(e){this.triangleCount!==e&&(this.indices=0===e?null:this.vertexCount>65535?new Uint32Array(3*e):new Uint16Array(3*e))},_getCubicCurveApproxStep:function(e,t,r,n){return 1/(m.dist(e,t)+m.dist(r,t)+m.dist(n,r)+1)*this.segmentScale},getCubicCurveVertexCount:function(e,t,r,n){var i=this._getCubicCurveApproxStep(e,t,r,n),a=Math.ceil(1/i);return this.useNativeLine?2*a:2*a+2},getCubicCurveTriangleCount:function(e,t,r,n){var i=this._getCubicCurveApproxStep(e,t,r,n),a=Math.ceil(1/i);return this.useNativeLine?0:2*a},getLineVertexCount:function(){return this.getPolylineVertexCount(g)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(g)},getPolylineVertexCount:function(e){var t;return t="number"==typeof e?e:"number"!=typeof e[0]?e.length:e.length/2,this.useNativeLine?2*(t-1):2*(t-1)+2},getPolylineTriangleCount:function(e){var t;return t="number"==typeof e?e:"number"!=typeof e[0]?e.length:e.length/2,this.useNativeLine?0:2*(t-1)},addCubicCurve:function(e,t,r,n,i,a){null==a&&(a=1);var o=e[0],s=e[1],l=t[0],u=t[1],h=r[0],c=r[1],d=n[0],f=n[1],p=this._getCubicCurveApproxStep(e,t,r,n),m=p*p,g=m*p,_=3*p,v=3*m,y=6*m,x=6*g,T=o-2*l+h,b=s-2*u+c,w=3*(l-h)-o+d,E=3*(u-c)-s+f,S=o,M=s,A=(l-o)*_+T*v+w*g,C=(u-s)*_+b*v+E*g,L=T*y+w*x,N=b*y+E*x,D=w*x,I=E*x,P=0,O=0,R=Math.ceil(1/p),F=new Float32Array(3*(R+1)),B=(F=[],0);for(O=0;O1&&(S=A>0?Math.min(S,d):Math.max(S,d),M=C>0?Math.min(M,f):Math.max(M,f));this.addPolyline(F,i,a)},addLine:function(e,t,r,n){this.addPolyline([e,t],r,n)},addPolyline:(n=m.create(),i=m.create(),a=m.create(),o=m.create(),s=[],l=[],u=[],function(e,t,r,h,c){if(e.length){var d="number"!=typeof e[0];if(null==c&&(c=d?e.length:e.length/2),!(c<2)){null==h&&(h=0),null==r&&(r=1),this._itemVertexOffsets.push(this._vertexOffset);for(var f,p=d?"number"!=typeof t[0]:t.length/4===c,g=this.attributes.position,_=this.attributes.color,v=this.attributes.offset,y=this.attributes.normal,x=this.indices,T=this._vertexOffset,b=0;b1&&(g.copy(T,T-1),_.copy(T,T-1),T++);else{var S;if(b0){m.sub(n,s,u),m.sub(i,l,s),m.normalize(n,n),m.normalize(i,i),m.add(o,n,i),m.normalize(o,o);var M=r/2*Math.min(1/m.dot(n,o),2);a[0]=-o[1],a[1]=o[0],S=M}else m.sub(n,l,s),m.normalize(n,n),a[0]=-n[1],a[1]=n[0],S=r/2;else m.sub(n,s,u),m.normalize(n,n),a[0]=-n[1],a[1]=n[0],S=r/2;y.set(T,a),y.set(T+1,a),v.set(T,S),v.set(T+1,-S),m.copy(u,s),g.set(T,s),g.set(T+1,s),_.set(T,f),_.set(T+1,f),T+=2}if(this.useNativeLine)_.set(T,f),g.set(T,s),T++;else if(b>0){var A=3*this._faceOffset;(x=this.indices)[A]=T-4,x[A+1]=T-3,x[A+2]=T-2,x[A+3]=T-3,x[A+4]=T-1,x[A+5]=T-2,this._faceOffset+=2}}this._vertexOffset=T}}}),setItemColor:function(e,t){for(var r=this._itemVertexOffsets[e],n=ee&&o=0&&this._viewsToDispose.splice(t,1),this.views.push(e),e.layer=this;var r=this.zr;e.scene.traverse((function(e){e.__zr=r,e.addAnimatorsToZr&&e.addAnimatorsToZr(r)}))}},c.prototype.removeView=function(e){if(e.layer===this){var t=this.views.indexOf(e);t>=0&&(this.views.splice(t,1),e.scene.traverse(d,this),e.layer=null,this._viewsToDispose.push(e))}},c.prototype.removeViewsAll=function(){this.views.forEach((function(e){e.scene.traverse(d,this),e.layer=null,this._viewsToDispose.push(e)}),this),this.views.length=0},c.prototype.resize=function(e,t){this.renderer.resize(e,t)},c.prototype.clear=function(){var e=this.renderer.gl;e.clearColor(0,0,0,0),e.depthMask(!0),e.colorMask(!0,!0,!0,!0),e.clear(e.DEPTH_BUFFER_BIT|e.COLOR_BUFFER_BIT)},c.prototype.clearDepth=function(){var e=this.renderer.gl;e.clear(e.DEPTH_BUFFER_BIT)},c.prototype.clearColor=function(){var e=this.renderer.gl;e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)},c.prototype.needsRefresh=function(){this.zr.refresh()},c.prototype.refresh=function(){for(var e=0;e20)){e=e.event;var n=this.pickObject(e.offsetX,e.offsetY);n&&(this._dispatchEvent(e.type,e,n),this._dispatchDataEvent(e.type,e,n));var i=this._clickToSetFocusPoint(e);i&&i.view.setDOFFocusOnPoint(i.distance)&&this.zr.refresh()}}},c.prototype._clickToSetFocusPoint=function(e){for(var t=this.renderer,r=t.viewport,n=this.views.length-1;n>=0;n--){var i=this.views[n];if(i.hasDOF()&&i.containPoint(e.offsetX,e.offsetY)){this._picking.scene=i.scene,this._picking.camera=i.camera,t.viewport=i.viewport;var a=this._picking.pick(e.offsetX,e.offsetY,!0);if(a)return a.view=i,a}}t.viewport=r},c.prototype.onglobalout=function(e){var t=this._hovered;t&&this._dispatchEvent("mouseout",e,{target:t.target})},c.prototype.pickObject=function(e,t){for(var r=[],n=this.renderer,i=n.viewport,a=0;a=0&&(l.dataIndex=this._lastDataIndex,l.seriesIndex=this._lastSeriesIndex,this.zr.handler.dispatchToElement(u,"mouseout",t)),s=!0):null!=o&&o!==this._lastEventData&&(null!=this._lastEventData&&(l.eventData=this._lastEventData,this.zr.handler.dispatchToElement(u,"mouseout",t)),s=!0),this._lastEventData=o,this._lastDataIndex=i,this._lastSeriesIndex=a),l.eventData=o,l.dataIndex=i,l.seriesIndex=a,(null!=o||parseInt(i,10)>=0)&&(this.zr.handler.dispatchToElement(u,e,t),s&&this.zr.handler.dispatchToElement(u,"mouseover",t))},c.prototype._dispatchToView=function(e,t){for(var r=0;r255?255:e}function s(e){return e<0?0:e>1?1:e}function l(e){return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100*255):o(parseInt(e,10))}function u(e){return e.length&&"%"===e.charAt(e.length-1)?s(parseFloat(e)/100):s(parseFloat(e))}function h(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function c(e,t,r){return e+(t-e)*r}function d(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var p=new n.a(20),m=null;function g(e,t){m&&f(m,t),m=p.put(e,m||t.slice())}function _(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=u(e[1]),i=u(e[2]),a=i<=.5?i*(n+1):i+n-i*n,s=2*i-a;return d(t=t||[],o(255*h(s,a,r+1/3)),o(255*h(s,a,r)),o(255*h(s,a,r-1/3)),1),4===e.length&&(t[3]=e[3]),t}i.parse=function(e,t){if(e){t=t||[];var r=p.get(e);if(r)return f(t,r);var n,i=(e+="").replace(/ /g,"").toLowerCase();if(i in a)return f(t,a[i]),g(e,t),t;if("#"===i.charAt(0))return 4===i.length?(n=parseInt(i.substr(1),16))>=0&&n<=4095?(d(t,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),g(e,t),t):void d(t,0,0,0,1):7===i.length?(n=parseInt(i.substr(1),16))>=0&&n<=16777215?(d(t,(16711680&n)>>16,(65280&n)>>8,255&n,1),g(e,t),t):void d(t,0,0,0,1):void 0;var o=i.indexOf("("),s=i.indexOf(")");if(-1!==o&&s+1===i.length){var h=i.substr(0,o),c=i.substr(o+1,s-(o+1)).split(","),m=1;switch(h){case"rgba":if(4!==c.length)return void d(t,0,0,0,1);m=u(c.pop());case"rgb":return 3!==c.length?void d(t,0,0,0,1):(d(t,l(c[0]),l(c[1]),l(c[2]),m),g(e,t),t);case"hsla":return 4!==c.length?void d(t,0,0,0,1):(c[3]=u(c[3]),_(c,t),g(e,t),t);case"hsl":return 3!==c.length?void d(t,0,0,0,1):(_(c,t),g(e,t),t);default:return}}d(t,0,0,0,1)}},i.parseToFloat=function(e,t){if(t=i.parse(e,t))return t[0]/=255,t[1]/=255,t[2]/=255,t},i.lift=function(e,t){var r=i.parse(e);if(r){for(var n=0;n<3;n++)r[n]=t<0?r[n]*(1-t)|0:(255-r[n])*t+r[n]|0;return i.stringify(r,4===r.length?"rgba":"rgb")}},i.toHex=function(e){var t=i.parse(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},i.fastLerp=function(e,t,r){if(t&&t.length&&e>=0&&e<=1){r=r||[];var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),l=t[i],u=t[a],h=n-i;return r[0]=o(c(l[0],u[0],h)),r[1]=o(c(l[1],u[1],h)),r[2]=o(c(l[2],u[2],h)),r[3]=s(c(l[3],u[3],h)),r}},i.fastMapToColor=i.fastLerp,i.lerp=function(e,t,r){if(t&&t.length&&e>=0&&e<=1){var n=e*(t.length-1),a=Math.floor(n),l=Math.ceil(n),u=i.parse(t[a]),h=i.parse(t[l]),d=n-a,f=i.stringify([o(c(u[0],h[0],d)),o(c(u[1],h[1],d)),o(c(u[2],h[2],d)),s(c(u[3],h[3],d))],"rgba");return r?{color:f,leftIndex:a,rightIndex:l,value:n}:f}},i.mapToColor=i.lerp,i.modifyHSL=function(e,t,r,n){if(e=i.parse(e))return e=function(e){if(e){var t,r,n=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o,u=(s+o)/2;if(0===l)t=0,r=0;else{r=u<.5?l/(s+o):l/(2-s-o);var h=((s-n)/6+l/2)/l,c=((s-i)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?t=d-c:i===s?t=1/3+h-d:a===s&&(t=2/3+c-h),t<0&&(t+=1),t>1&&(t-=1)}var f=[360*t,r,u];return null!=e[3]&&f.push(e[3]),f}}(e),null!=t&&(e[0]=(a=t,(a=Math.round(a))<0?0:a>360?360:a)),null!=r&&(e[1]=u(r)),null!=n&&(e[2]=u(n)),i.stringify(_(e),"rgba");var a},i.modifyAlpha=function(e,t){if((e=i.parse(e))&&null!=t)return e[3]=s(t),i.stringify(e,"rgba")},i.stringify=function(e,t){if(e&&e.length){var r=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(r+=","+e[3]),t+"("+r+")"}},t.a=i},function(e,t,r){"use strict";var n=r(95),i=function(e){this._list=new n.a,this._map={},this._maxSize=e||10};i.prototype.setMaxSize=function(e){this._maxSize=e},i.prototype.put=function(e,t){if(void 0===this._map[e]){var r=this._list.length();if(r>=this._maxSize&&r>0){var n=this._list.head;this._list.remove(n),delete this._map[n.key]}var i=this._list.insert(t);i.key=e,this._map[e]=i}},i.prototype.get=function(e){var t=this._map[e];if(void 0!==t)return t!==this._list.tail&&(this._list.remove(t),this._list.insertEntry(t)),t.value},i.prototype.remove=function(e){var t=this._map[e];void 0!==t&&(delete this._map[e],this._list.remove(t))},i.prototype.clear=function(){this._list.clear(),this._map={}},t.a=i},function(e,t,r){"use strict";var n=function(){this.head=null,this.tail=null,this._length=0};n.prototype.insert=function(e){var t=new n.Entry(e);return this.insertEntry(t),t},n.prototype.insertAt=function(e,t){if(!(e<0)){for(var r=this.head,i=0;r&&i!=e;)r=r.next,i++;if(r){var a=new n.Entry(t),o=r.prev;o?(o.next=a,a.prev=o):this.head=a,a.next=r,r.prev=a}else this.insert(t)}},n.prototype.insertBeforeEntry=function(e,t){var r=new n.Entry(e),i=t.prev;i?(i.next=r,r.prev=i):this.head=r,r.next=t,t.prev=r,this._length++},n.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,this.tail=e):this.head=this.tail=e,this._length++},n.prototype.remove=function(e){var t=e.prev,r=e.next;t?t.next=r:this.head=r,r?r.prev=t:this.tail=t,e.next=e.prev=null,this._length--},n.prototype.removeAt=function(e){if(!(e<0)){for(var t=this.head,r=0;t&&r!=e;)t=t.next,r++;return t?(this.remove(t),t.value):void 0}},n.prototype.getHead=function(){if(this.head)return this.head.value},n.prototype.getTail=function(){if(this.tail)return this.tail.value},n.prototype.getAt=function(e){if(!(e<0)){for(var t=this.head,r=0;t&&r!=e;)t=t.next,r++;return t.value}},n.prototype.indexOf=function(e){for(var t=this.head,r=0;t;){if(t.value===e)return r;t=t.next,r++}},n.prototype.length=function(){return this._length},n.prototype.isEmpty=function(){return 0===this._length},n.prototype.forEach=function(e,t){for(var r=this.head,n=0,i=void 0!==t;r;)i?e.call(t,r.value,n):e(r.value,n),r=r.next,n++},n.prototype.clear=function(){this.tail=this.head=null,this._length=0},n.Entry=function(e){this.value=e,this.next=null,this.prev=null},t.a=n},function(e,t,r){"use strict";var n=r(97),i=/for\s*?\(int\s*?_idx_\s*\=\s*([\w-]+)\;\s*_idx_\s*<\s*([\w-]+);\s*_idx_\s*\+\+\s*\)\s*\{\{([\s\S]+?)(?=\}\})\}\}/g;function a(e,t,r){var n={};for(var a in r)n[a+"_COUNT"]=r[a];return e.replace(i,(function(e,r,i,a){var o="";isNaN(r)&&(r=r in t?t[r]:n[r]),isNaN(i)&&(i=i in t?t[i]:n[i]);for(var s=parseInt(r);s0&&n.push("#define "+i.toUpperCase()+"_COUNT "+a)}if(r)for(var o=0;o=0&&S[w]>1e-4&&(g.transformMat4(C,E,T[M[w]]),g.scaleAndAdd(A,A,C,S[w]));L.set(b,A)}}for(b=0;b=0&&(function(e){o(e,"itemStyle"),o(e,"lineStyle"),o(e,"areaStyle"),o(e,"label")}(t),"mapbox"===t.coordinateSystem&&(t.coordinateSystem="mapbox3D",e.mapbox3D=e.mapbox))})),s(e.xAxis3D),s(e.yAxis3D),s(e.zAxis3D),s(e.grid3D),o(e.geo3D)}},function(e,t,r){"use strict";t.a={get:function(e){var t=new XMLHttpRequest;t.open("get",e.url),t.responseType=e.responseType||"text",e.onprogress&&(t.onprogress=function(t){if(t.lengthComputable){var r=t.loaded/t.total;e.onprogress(r,t.loaded,t.total)}else e.onprogress(null)}),t.onload=function(r){t.status>=400?e.onerror&&e.onerror():e.onload&&e.onload(t.response)},e.onerror&&(t.onerror=e.onerror),t.send(null)}}},function(e,t,r){"use strict";t.a="@export clay.basic.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec2 uvRepeat : [1.0, 1.0];\nuniform vec2 uvOffset : [0.0, 0.0];\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 position : POSITION;\nattribute vec3 barycentric;\n@import clay.chunk.skinning_header\nvarying vec2 v_Texcoord;\nvarying vec3 v_Barycentric;\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\nvoid main()\n{\n vec3 skinnedPosition = position;\n#ifdef SKINNING\n @import clay.chunk.skin_matrix\n skinnedPosition = (skinMatrixWS * vec4(position, 1.0)).xyz;\n#endif\n v_Texcoord = texcoord * uvRepeat + uvOffset;\n v_Barycentric = barycentric;\n gl_Position = worldViewProjection * vec4(skinnedPosition, 1.0);\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n}\n@end\n@export clay.basic.fragment\nvarying vec2 v_Texcoord;\nuniform sampler2D diffuseMap;\nuniform vec3 color : [1.0, 1.0, 1.0];\nuniform vec3 emission : [0.0, 0.0, 0.0];\nuniform float alpha : 1.0;\n#ifdef ALPHA_TEST\nuniform float alphaCutoff: 0.9;\n#endif\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\nuniform float lineWidth : 0.0;\nuniform vec4 lineColor : [0.0, 0.0, 0.0, 0.6];\nvarying vec3 v_Barycentric;\n@import clay.util.edge_factor\n@import clay.util.rgbm\n@import clay.util.srgb\n@import clay.util.ACES\nvoid main()\n{\n#ifdef RENDER_TEXCOORD\n gl_FragColor = vec4(v_Texcoord, 1.0, 1.0);\n return;\n#endif\n gl_FragColor = vec4(color, alpha);\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n#endif\n#ifdef DIFFUSEMAP_ENABLED\n vec4 tex = decodeHDR(texture2D(diffuseMap, v_Texcoord));\n#ifdef SRGB_DECODE\n tex = sRGBToLinear(tex);\n#endif\n#if defined(DIFFUSEMAP_ALPHA_ALPHA)\n gl_FragColor.a = tex.a;\n#endif\n gl_FragColor.rgb *= tex.rgb;\n#endif\n gl_FragColor.rgb += emission;\n if( lineWidth > 0.)\n {\n gl_FragColor.rgb = mix(gl_FragColor.rgb, lineColor.rgb, (1.0 - edgeFactor(lineWidth)) * lineColor.a);\n }\n#ifdef ALPHA_TEST\n if (gl_FragColor.a < alphaCutoff) {\n discard;\n }\n#endif\n#ifdef TONEMAPPING\n gl_FragColor.rgb = ACESToneMapping(gl_FragColor.rgb);\n#endif\n#ifdef SRGB_ENCODE\n gl_FragColor = linearTosRGB(gl_FragColor);\n#endif\n gl_FragColor = encodeHDR(gl_FragColor);\n}\n@end"},function(e,t,r){"use strict";var n=r(6),i=r(5);function a(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}r(25);var o=a("DXT1"),s=a("DXT3"),l=a("DXT5"),u={parse:function(e,t){var r=new Int32Array(e,0,31);if(542327876!==r[0])return null;if(4&!r(20))return null;var a,u,h=r(21),c=r[4],d=r[3],f=512&r[28],p=131072&r[2];switch(h){case o:a=8,u=n.a.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case s:a=16,u=n.a.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case l:a=16,u=n.a.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return null}var m=r[1]+4,g=f?6:1,_=1;p&&(_=Math.max(1,r[7]));for(var v=[],y=0;y0){var i=Math.pow(2,e[3]-128-8+n);t[r+0]=e[0]*i,t[r+1]=e[1]*i,t[r+2]=e[2]*i}else t[r+0]=0,t[r+1]=0,t[r+2]=0;return t[r+3]=1,t}function s(e,t,r,n){for(var i,a,o=0,s=0,l=n;l>0;)if(e[s][0]=t[r++],e[s][1]=t[r++],e[s][2]=t[r++],e[s][3]=t[r++],1===e[s][0]&&1===e[s][1]&&1===e[s][2]){for(var u=e[s][3]<>>0;u>0;u--)i=e[s-1],(a=e[s])[0]=i[0],a[1]=i[1],a[2]=i[2],a[3]=i[3],s++,l--;o+=8}else s++,l--,o=0;return r}function l(e,t,r,n){if(n<8|n>32767)return s(e,t,r,n);if(2!=(i=t[r++]))return s(e,t,r-1,n);if(e[0][1]=t[r++],e[0][2]=t[r++],i=t[r++],(e[0][2]<<8>>>0|i)>>>0!==n)return null;for(var i=0;i<4;i++)for(var a=0;a128){o=(127&o)>>>0;for(var l=t[r++];o--;)e[a++][i]=l}else for(;o--;)e[a++][i]=t[r++]}return r}var u={parseRGBE:function(e,t,r){null==r&&(r=0);var s=new Uint8Array(e),u=s.length;if("#?"===function(e,t,r){for(var n="",i=t;i=u)){h+=2;for(var c="";h=0||(o.forEach((function(t){e.on(t,this[s(t)],this)}),this),this._meshes.push(e))},detachFromMesh:function(e){var t=this._meshes.indexOf(e);t>=0&&this._meshes.splice(t,1),o.forEach((function(t){e.off(t,this[s(t)])}),this)},dispose:function(){this._meshes.forEach((function(e){this.detachFromMesh(e)}),this)}},t.a=g},function(e,t,r){"use strict";var n=r(19),i=r(108),a=n.a.extend({cubemap:null,castShadow:!1,_normalDistribution:null,_brdfLookup:null},{type:"AMBIENT_CUBEMAP_LIGHT",prefilter:function(e,t){this._brdfLookup||(this._normalDistribution=i.a.generateNormalDistribution(),this._brdfLookup=i.a.integrateBRDF(e,this._normalDistribution));var r=this.cubemap;if(!r.__prefiltered){var n=i.a.prefilterEnvironmentMap(e,r,{encodeRGBM:!0,width:t,height:t},this._normalDistribution,this._brdfLookup);this.cubemap=n.environmentMap,this.cubemap.__prefiltered=!0,r.dispose(e)}},uniformTemplates:{ambientCubemapLightColor:{type:"3f",value:function(e){var t=e.color,r=e.intensity;return[t[0]*r,t[1]*r,t[2]*r]}},ambientCubemapLightCubemap:{type:"t",value:function(e){return e.cubemap}},ambientCubemapLightBRDFLookup:{type:"t",value:function(e){return e._brdfLookup}}}});t.a=a},function(e,t,r){"use strict";var n=r(5),i=r(25),a=r(6),o=r(10),s=r(14),l=r(17),u=r(7),h=r(57),c=r(29),d=r(55),f=r(18),p=r(54),m=r(111),g=r(112),_={},v=["px","nx","py","ny","pz","nz"];_.prefilterEnvironmentMap=function(e,t,r,s,m){m&&s||(s=_.generateNormalDistribution(),m=_.integrateBRDF(e,s));var y=(r=r||{}).width||64,x=r.height||64,T=r.type||t.type,b=new i.a({width:y,height:x,type:T,flipY:!1,mipmaps:[]});b.isPowerOfTwo()||console.warn("Width and height must be power of two to enable mipmap.");var w=Math.min(y,x),E=Math.log(w)/Math.log(2)+1,S=new l.a({shader:new u.a({vertex:u.a.source("clay.skybox.vertex"),fragment:g.a})});S.set("normalDistribution",s),r.encodeRGBM&&S.define("fragment","RGBM_ENCODE"),r.decodeRGBM&&S.define("fragment","RGBM_DECODE");var M,A=new c.a;if(t instanceof n.a){var C=new i.a({width:y,height:x,type:T===a.a.FLOAT?a.a.HALF_FLOAT:T});p.a.panoramaToCubeMap(e,t,C,{encodeRGBM:r.decodeRGBM}),t=C}(M=new h.a({scene:A,material:S})).material.set("environmentMap",t);var L=new d.a({texture:b});r.encodeRGBM&&(T=b.type=a.a.UNSIGNED_BYTE);for(var N=new n.a({width:y,height:x,type:T}),D=new o.a({depthBuffer:!1}),I=f.a[T===a.a.UNSIGNED_BYTE?"Uint8Array":"Float32Array"],P=0;P>>16)>>>0;l=(((16711935&(l=((252645135&(l=((858993459&(l=((1431655765&l)<<1|(2863311530&l)>>>1)>>>0))<<2|(3435973836&l)>>>2)>>>0))<<4|(4042322160&l)>>>4)>>>0))<<8|(4278255360&l)>>>8)>>>0)/4294967296;for(var u=0;u=0&&l.splice(e,1)})),l.push(u),this.__zr&&this.__zr.animation.addAnimator(u),u},stopAnimation:function(e){this._animators=this._animators||[];for(var t=this._animators,r=t.length,n=0;n.5?t:e}function c(e,t,r,n,i){var a=e.length;if(1==i)for(var o=0;oi)e.length=i;else for(var a=n;a=0&&!(A[r]<=t);r--);r=Math.min(r,x-2)}else{for(r=G;rt);r++);r=Math.min(r-1,x-2)}G=r,H=t;var n=A[r+1]-A[r];if(0!==n)if(R=(t-A[r])/n,y)if(B=C[r],F=C[0===r?r:r-1],U=C[r>x-2?x-1:r+1],z=C[r>x-3?x-1:r+2],w)p(F,B,U,z,R,R*R,R*R*R,g(e,s),M);else{if(E)i=p(F,B,U,z,R,R*R,R*R*R,k,1),i=_(k);else{if(S)return h(B,U,R);i=m(F,B,U,z,R,R*R,R*R*R)}v(e,s,i)}else if(w)c(C[r],C[r+1],R,g(e,s),M);else{var i;if(E)c(C[r],C[r+1],R,k,1),i=_(k);else{if(S)return h(C[r],C[r+1],R);i=u(C[r],C[r+1],R)}v(e,s,i)}},ondestroy:r});return t&&"spline"!==t&&(V.easing=t),V}}}var y=function(e,t,r,n){this._tracks={},this._target=e,this._loop=t||!1,this._getter=r||s,this._setter=n||l,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};y.prototype={when:function(e,t){var r=this._tracks;for(var n in t)if(t.hasOwnProperty(n)){if(!r[n]){r[n]=[];var i=this._getter(this._target,n);if(null==i)continue;0!==e&&r[n].push({time:0,value:g(i)})}r[n].push({time:e,value:t[n]})}return this},during:function(e){return this._onframeList.push(e),this},pause:function(){for(var e=0;e255?255:e}function o(e){return e<0?0:e>1?1:e}function s(e){return e.length&&"%"===e.charAt(e.length-1)?a(parseFloat(e)/100*255):a(parseInt(e,10))}function l(e){return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100):o(parseFloat(e))}function u(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function h(e,t,r){return e+(t-e)*r}function c(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var f=new n(20),p=null;function m(e,t){p&&d(p,t),p=f.put(e,p||t.slice())}function g(e,t){if(e){t=t||[];var r=f.get(e);if(r)return d(t,r);var n,a=(e+="").replace(/ /g,"").toLowerCase();if(a in i)return d(t,i[a]),m(e,t),t;if("#"===a.charAt(0))return 4===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=4095?(c(t,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),m(e,t),t):void c(t,0,0,0,1):7===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=16777215?(c(t,(16711680&n)>>16,(65280&n)>>8,255&n,1),m(e,t),t):void c(t,0,0,0,1):void 0;var o=a.indexOf("("),u=a.indexOf(")");if(-1!==o&&u+1===a.length){var h=a.substr(0,o),p=a.substr(o+1,u-(o+1)).split(","),g=1;switch(h){case"rgba":if(4!==p.length)return void c(t,0,0,0,1);g=l(p.pop());case"rgb":return 3!==p.length?void c(t,0,0,0,1):(c(t,s(p[0]),s(p[1]),s(p[2]),g),m(e,t),t);case"hsla":return 4!==p.length?void c(t,0,0,0,1):(p[3]=l(p[3]),_(p,t),m(e,t),t);case"hsl":return 3!==p.length?void c(t,0,0,0,1):(_(p,t),m(e,t),t);default:return}}c(t,0,0,0,1)}}function _(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=l(e[1]),i=l(e[2]),o=i<=.5?i*(n+1):i+n-i*n,s=2*i-o;return c(t=t||[],a(255*u(s,o,r+1/3)),a(255*u(s,o,r)),a(255*u(s,o,r-1/3)),1),4===e.length&&(t[3]=e[3]),t}function v(e,t,r){if(t&&t.length&&e>=0&&e<=1){r=r||[];var n=e*(t.length-1),i=Math.floor(n),s=Math.ceil(n),l=t[i],u=t[s],c=n-i;return r[0]=a(h(l[0],u[0],c)),r[1]=a(h(l[1],u[1],c)),r[2]=a(h(l[2],u[2],c)),r[3]=o(h(l[3],u[3],c)),r}}var y=v;function x(e,t,r){if(t&&t.length&&e>=0&&e<=1){var n=e*(t.length-1),i=Math.floor(n),s=Math.ceil(n),l=g(t[i]),u=g(t[s]),c=n-i,d=b([a(h(l[0],u[0],c)),a(h(l[1],u[1],c)),a(h(l[2],u[2],c)),o(h(l[3],u[3],c))],"rgba");return r?{color:d,leftIndex:i,rightIndex:s,value:n}:d}}var T=x;function b(e,t){if(e&&e.length){var r=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(r+=","+e[3]),t+"("+r+")"}}t.parse=g,t.lift=function(e,t){var r=g(e);if(r){for(var n=0;n<3;n++)r[n]=t<0?r[n]*(1-t)|0:(255-r[n])*t+r[n]|0;return b(r,4===r.length?"rgba":"rgb")}},t.toHex=function(e){var t=g(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},t.fastLerp=v,t.fastMapToColor=y,t.lerp=x,t.mapToColor=T,t.modifyHSL=function(e,t,r,n){if(e=g(e))return e=function(e){if(e){var t,r,n=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o,u=(s+o)/2;if(0===l)t=0,r=0;else{r=u<.5?l/(s+o):l/(2-s-o);var h=((s-n)/6+l/2)/l,c=((s-i)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?t=d-c:i===s?t=1/3+h-d:a===s&&(t=2/3+c-h),t<0&&(t+=1),t>1&&(t-=1)}var f=[360*t,r,u];return null!=e[3]&&f.push(e[3]),f}}(e),null!=t&&(e[0]=(i=t,(i=Math.round(i))<0?0:i>360?360:i)),null!=r&&(e[1]=l(r)),null!=n&&(e[2]=l(n)),b(_(e),"rgba");var i},t.modifyAlpha=function(e,t){if((e=g(e))&&null!=t)return e[3]=o(t),b(e,"rgba")},t.stringify=b},function(e,t,r){"use strict";t.a="\n@export clay.util.rand\nhighp float rand(vec2 uv) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot(uv.xy, vec2(a,b)), sn = mod(dt, 3.141592653589793);\n return fract(sin(sn) * c);\n}\n@end\n@export clay.util.calculate_attenuation\nuniform float attenuationFactor : 5.0;\nfloat lightAttenuation(float dist, float range)\n{\n float attenuation = 1.0;\n attenuation = dist*dist/(range*range+1.0);\n float att_s = attenuationFactor;\n attenuation = 1.0/(attenuation*att_s+1.0);\n att_s = 1.0/(att_s+1.0);\n attenuation = attenuation - att_s;\n attenuation /= 1.0 - att_s;\n return clamp(attenuation, 0.0, 1.0);\n}\n@end\n@export clay.util.edge_factor\nfloat edgeFactor(float width)\n{\n vec3 d = fwidth(v_Barycentric);\n vec3 a3 = smoothstep(vec3(0.0), d * width, v_Barycentric);\n return min(min(a3.x, a3.y), a3.z);\n}\n@end\n@export clay.util.encode_float\nvec4 encodeFloat(const in float depth)\n{\n const vec4 bitShifts = vec4(256.0*256.0*256.0, 256.0*256.0, 256.0, 1.0);\n const vec4 bit_mask = vec4(0.0, 1.0/256.0, 1.0/256.0, 1.0/256.0);\n vec4 res = fract(depth * bitShifts);\n res -= res.xxyz * bit_mask;\n return res;\n}\n@end\n@export clay.util.decode_float\nfloat decodeFloat(const in vec4 color)\n{\n const vec4 bitShifts = vec4(1.0/(256.0*256.0*256.0), 1.0/(256.0*256.0), 1.0/256.0, 1.0);\n return dot(color, bitShifts);\n}\n@end\n@export clay.util.float\n@import clay.util.encode_float\n@import clay.util.decode_float\n@end\n@export clay.util.rgbm_decode\nvec3 RGBMDecode(vec4 rgbm, float range) {\n return range * rgbm.rgb * rgbm.a;\n}\n@end\n@export clay.util.rgbm_encode\nvec4 RGBMEncode(vec3 color, float range) {\n if (dot(color, color) == 0.0) {\n return vec4(0.0);\n }\n vec4 rgbm;\n color /= range;\n rgbm.a = clamp(max(max(color.r, color.g), max(color.b, 1e-6)), 0.0, 1.0);\n rgbm.a = ceil(rgbm.a * 255.0) / 255.0;\n rgbm.rgb = color / rgbm.a;\n return rgbm;\n}\n@end\n@export clay.util.rgbm\n@import clay.util.rgbm_decode\n@import clay.util.rgbm_encode\nvec4 decodeHDR(vec4 color)\n{\n#if defined(RGBM_DECODE) || defined(RGBM)\n return vec4(RGBMDecode(color, 51.5), 1.0);\n#else\n return color;\n#endif\n}\nvec4 encodeHDR(vec4 color)\n{\n#if defined(RGBM_ENCODE) || defined(RGBM)\n return RGBMEncode(color.xyz, 51.5);\n#else\n return color;\n#endif\n}\n@end\n@export clay.util.srgb\nvec4 sRGBToLinear(in vec4 value) {\n return vec4(mix(pow(value.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), value.rgb * 0.0773993808, vec3(lessThanEqual(value.rgb, vec3(0.04045)))), value.w);\n}\nvec4 linearTosRGB(in vec4 value) {\n 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.w);\n}\n@end\n@export clay.chunk.skinning_header\n#ifdef SKINNING\nattribute vec3 weight : WEIGHT;\nattribute vec4 joint : JOINT;\nuniform mat4 skinMatrix[JOINT_COUNT] : SKIN_MATRIX;\nmat4 getSkinMatrix(float idx) {\n return skinMatrix[int(idx)];\n}\n#endif\n@end\n@export clay.chunk.skin_matrix\nmat4 skinMatrixWS = getSkinMatrix(joint.x) * weight.x;\nif (weight.y > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.y) * weight.y;\n}\nif (weight.z > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.z) * weight.z;\n}\nfloat weightW = 1.0-weight.x-weight.y-weight.z;\nif (weightW > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.w) * weightW;\n}\n@end\n@export clay.util.parallax_correct\nvec3 parallaxCorrect(in vec3 dir, in vec3 pos, in vec3 boxMin, in vec3 boxMax) {\n vec3 first = (boxMax - pos) / dir;\n vec3 second = (boxMin - pos) / dir;\n vec3 further = max(first, second);\n float dist = min(further.x, min(further.y, further.z));\n vec3 fixedPos = pos + dir * dist;\n vec3 boxCenter = (boxMax + boxMin) * 0.5;\n return normalize(fixedPos - boxCenter);\n}\n@end\n@export clay.util.clamp_sample\nvec4 clampSample(const in sampler2D texture, const in vec2 coord)\n{\n#ifdef STEREO\n float eye = step(0.5, coord.x) * 0.5;\n vec2 coordClamped = clamp(coord, vec2(eye, 0.0), vec2(0.5 + eye, 1.0));\n#else\n vec2 coordClamped = clamp(coord, vec2(0.0), vec2(1.0));\n#endif\n return texture2D(texture, coordClamped);\n}\n@end\n@export clay.util.ACES\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\n@end"},function(e,t,r){"use strict";t.a="\n@export ecgl.common.transformUniforms\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;\nuniform mat4 world : WORLD;\n@end\n\n@export ecgl.common.attributes\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 normal : NORMAL;\n@end\n\n@export ecgl.common.uv.header\nuniform vec2 uvRepeat : [1.0, 1.0];\nuniform vec2 uvOffset : [0.0, 0.0];\nuniform vec2 detailUvRepeat : [1.0, 1.0];\nuniform vec2 detailUvOffset : [0.0, 0.0];\n\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n@export ecgl.common.uv.main\nv_Texcoord = texcoord * uvRepeat + uvOffset;\nv_DetailTexcoord = texcoord * detailUvRepeat + detailUvOffset;\n@end\n\n@export ecgl.common.uv.fragmentHeader\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n\n@export ecgl.common.albedo.main\n\n vec4 albedoTexel = vec4(1.0);\n#ifdef DIFFUSEMAP_ENABLED\n albedoTexel = texture2D(diffuseMap, v_Texcoord);\n #ifdef SRGB_DECODE\n albedoTexel = sRGBToLinear(albedoTexel);\n #endif\n#endif\n\n#ifdef DETAILMAP_ENABLED\n vec4 detailTexel = texture2D(detailMap, v_DetailTexcoord);\n #ifdef SRGB_DECODE\n detailTexel = sRGBToLinear(detailTexel);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, detailTexel.rgb, detailTexel.a);\n albedoTexel.a = detailTexel.a + (1.0 - detailTexel.a) * albedoTexel.a;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexHeader\n\n#ifdef WIREFRAME_QUAD\nattribute vec4 barycentric;\nvarying vec4 v_Barycentric;\n#elif defined(WIREFRAME_TRIANGLE)\nattribute vec3 barycentric;\nvarying vec3 v_Barycentric;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n v_Barycentric = barycentric;\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentHeader\n\nuniform float wireframeLineWidth : 1;\nuniform vec4 wireframeLineColor: [0, 0, 0, 0.5];\n\n#ifdef WIREFRAME_QUAD\nvarying vec4 v_Barycentric;\nfloat edgeFactor () {\n vec4 d = fwidth(v_Barycentric);\n vec4 a4 = smoothstep(vec4(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(min(a4.x, a4.y), a4.z), a4.w);\n}\n#elif defined(WIREFRAME_TRIANGLE)\nvarying vec3 v_Barycentric;\nfloat edgeFactor () {\n vec3 d = fwidth(v_Barycentric);\n vec3 a3 = smoothstep(vec3(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(a3.x, a3.y), a3.z);\n}\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n if (wireframeLineWidth > 0.) {\n vec4 lineColor = wireframeLineColor;\n#ifdef SRGB_DECODE\n lineColor = sRGBToLinear(lineColor);\n#endif\n\n gl_FragColor.rgb = mix(gl_FragColor.rgb, lineColor.rgb, (1.0 - edgeFactor()) * lineColor.a);\n }\n#endif\n@end\n\n\n\n\n@export ecgl.common.bumpMap.header\n\n#ifdef BUMPMAP_ENABLED\nuniform sampler2D bumpMap;\nuniform float bumpScale : 1.0;\n\n\nvec3 bumpNormal(vec3 surfPos, vec3 surfNormal, vec3 baseNormal)\n{\n vec2 dSTdx = dFdx(v_Texcoord);\n vec2 dSTdy = dFdy(v_Texcoord);\n\n float Hll = bumpScale * texture2D(bumpMap, v_Texcoord).x;\n float dHx = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdx).x - Hll;\n float dHy = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdy).x - Hll;\n\n vec3 vSigmaX = dFdx(surfPos);\n vec3 vSigmaY = dFdy(surfPos);\n vec3 vN = surfNormal;\n\n vec3 R1 = cross(vSigmaY, vN);\n vec3 R2 = cross(vN, vSigmaX);\n\n float fDet = dot(vSigmaX, R1);\n\n vec3 vGrad = sign(fDet) * (dHx * R1 + dHy * R2);\n return normalize(abs(fDet) * baseNormal - vGrad);\n\n}\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexHeader\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexMain\n\n#ifdef NORMALMAP_ENABLED\n if (dot(tangent, tangent) > 0.0) {\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n }\n#endif\n\n@end\n\n\n@export ecgl.common.normalMap.fragmentHeader\n\n#ifdef NORMALMAP_ENABLED\nuniform sampler2D normalMap;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.fragmentMain\n#ifdef NORMALMAP_ENABLED\n if (dot(v_Tangent, v_Tangent) > 0.0) {\n vec3 normalTexel = texture2D(normalMap, v_DetailTexcoord).xyz;\n if (dot(normalTexel, normalTexel) > 0.0) { N = normalTexel * 2.0 - 1.0;\n mat3 tbn = mat3(v_Tangent, v_Bitangent, v_Normal);\n N = normalize(tbn * N);\n }\n }\n#endif\n@end\n\n\n\n@export ecgl.common.vertexAnimation.header\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevNormal;\nuniform float percent;\n#endif\n\n@end\n\n@export ecgl.common.vertexAnimation.main\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n vec3 norm = mix(prevNormal, normal, percent);\n#else\n vec3 pos = position;\n vec3 norm = normal;\n#endif\n\n@end\n\n\n@export ecgl.common.ssaoMap.header\n#ifdef SSAOMAP_ENABLED\nuniform sampler2D ssaoMap;\nuniform vec4 viewport : VIEWPORT;\n#endif\n@end\n\n@export ecgl.common.ssaoMap.main\n float ao = 1.0;\n#ifdef SSAOMAP_ENABLED\n ao = texture2D(ssaoMap, (gl_FragCoord.xy - viewport.xy) / viewport.zw).r;\n#endif\n@end\n\n\n\n\n@export ecgl.common.diffuseLayer.header\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\nuniform float layerDiffuseIntensity[LAYER_DIFFUSEMAP_COUNT];\nuniform sampler2D layerDiffuseMap[LAYER_DIFFUSEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.header\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\nuniform float layerEmissionIntensity[LAYER_EMISSIVEMAP_COUNT];\nuniform sampler2D layerEmissiveMap[LAYER_EMISSIVEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.layers.header\n@import ecgl.common.diffuseLayer.header\n@import ecgl.common.emissiveLayer.header\n@end\n\n@export ecgl.common.diffuseLayer.main\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_DIFFUSEMAP_COUNT; _idx_++) {{\n float intensity = layerDiffuseIntensity[_idx_];\n vec4 texel2 = texture2D(layerDiffuseMap[_idx_], v_Texcoord);\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, texel2.rgb * intensity, texel2.a);\n albedoTexel.a = texel2.a + (1.0 - texel2.a) * albedoTexel.a;\n }}\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.main\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_EMISSIVEMAP_COUNT; _idx_++)\n {{\n vec4 texel2 = texture2D(layerEmissiveMap[_idx_], v_Texcoord) * layerEmissionIntensity[_idx_];\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n float intensity = layerEmissionIntensity[_idx_];\n gl_FragColor.rgb += texel2.rgb * texel2.a * intensity;\n }}\n#endif\n\n@end\n"},function(e,t,r){"use strict";t.a="@export ecgl.color.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\n@import ecgl.common.uv.header\n\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 position: POSITION;\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\nvoid main()\n{\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n @import ecgl.common.uv.main\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n@export ecgl.color.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.layers.header\n\n@import ecgl.common.uv.fragmentHeader\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n\n}\n@end"},function(e,t,r){"use strict";t.a="/**\n * http: */\n\n@export ecgl.lambert.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n\n@import ecgl.common.attributes\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.vertexAnimation.header\n\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n}\n\n@end\n\n\n@export ecgl.lambert.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n gl_FragColor *= sRGBToLinear(v_Color);\n #else\n gl_FragColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseColor = vec3(0.0, 0.0, 0.0);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n diffuseColor += ambientLightColor[i] * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseColor += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n vec3 lightColor = directionalLightColor[i];\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n diffuseColor += lightColor * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor.rgb *= diffuseColor;\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"},function(e,t,r){"use strict";t.a="@export ecgl.realistic.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@import ecgl.common.vertexAnimation.header\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n\n\n@export ecgl.realistic.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n#define PI 3.14159265358979\n#define ROUGHNESS_CHANEL 0\n#define METALNESS_CHANEL 1\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\n\nuniform sampler2D detailMap;\nuniform sampler2D metalnessMap;\nuniform sampler2D roughnessMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform float metalness : 0.0;\nuniform float roughness : 0.5;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n@import clay.header.ambient_cubemap_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n@import ecgl.common.normalMap.fragmentHeader\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import clay.util.rgbm\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n\nfloat D_Phong(float g, float ndh) {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n}\n\nvoid main()\n{\n vec4 albedoColor = color;\n\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n albedoColor *= sRGBToLinear(v_Color);\n #else\n albedoColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n albedoColor *= albedoTexel;\n\n float m = metalness;\n\n#ifdef METALNESSMAP_ENABLED\n float m2 = texture2D(metalnessMap, v_DetailTexcoord)[METALNESS_CHANEL];\n m = clamp(m2 + (m - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 baseColor = albedoColor.rgb;\n albedoColor.rgb = baseColor * (1.0 - m);\n vec3 specFactor = mix(vec3(0.04), baseColor, m);\n\n float g = 1.0 - roughness;\n\n#ifdef ROUGHNESSMAP_ENABLED\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 N = v_Normal;\n\n#ifdef DOUBLE_SIDED\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n@import ecgl.common.normalMap.fragmentMain\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n vec3 fresnelTerm = F_Schlick(ndv, specFactor);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += ambientLightColor[_idx_] * ambientFactor * ao;\n }}\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++)\n {{\n vec3 L = -directionalLightDirection[_idx_];\n vec3 lc = directionalLightColor[_idx_];\n\n vec3 H = normalize(L + V);\n float ndl = clamp(dot(N, normalize(L)), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[_idx_];\n }\n#endif\n\n vec3 li = lc * ndl * shadowContrib;\n\n diffuseTerm += li;\n specularTerm += li * fresnelTerm * D_Phong(g, ndh);\n }}\n#endif\n\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n vec3 L = reflect(-V, N);\n L = vec3(L.x, L[NORMAL_UP_AXIS], L[NORMAL_FRONT_AXIS]);\n float rough2 = clamp(1.0 - g, 0.0, 1.0);\n float bias2 = rough2 * 5.0;\n vec2 brdfParam2 = texture2D(ambientCubemapLightBRDFLookup[0], vec2(rough2, ndv)).xy;\n vec3 envWeight2 = specFactor * brdfParam2.x + brdfParam2.y;\n vec3 envTexel2;\n for(int _idx_ = 0; _idx_ < AMBIENT_CUBEMAP_LIGHT_COUNT; _idx_++)\n {{\n envTexel2 = RGBMDecode(textureCubeLodEXT(ambientCubemapLightCubemap[_idx_], L, bias2), 51.5);\n specularTerm += ambientCubemapLightColor[_idx_] * envTexel2 * envWeight2 * ao;\n }}\n#endif\n\n gl_FragColor.rgb = albedoColor.rgb * diffuseTerm + specularTerm;\n gl_FragColor.a = albedoColor.a;\n\n#ifdef SRGB_ENCODE\n gl_FragColor = linearTosRGB(gl_FragColor);\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"},function(e,t,r){"use strict";t.a="@export ecgl.hatching.vertex\n\n@import ecgl.realistic.vertex\n\n@end\n\n\n@export ecgl.hatching.fragment\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform vec4 color : [0.0, 0.0, 0.0, 1.0];\nuniform vec4 paperColor : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nuniform sampler2D hatch1;\nuniform sampler2D hatch2;\nuniform sampler2D hatch3;\nuniform sampler2D hatch4;\nuniform sampler2D hatch5;\nuniform sampler2D hatch6;\n\nfloat shade(in float tone) {\n vec4 c = vec4(1. ,1., 1., 1.);\n float step = 1. / 6.;\n vec2 uv = v_DetailTexcoord;\n if (tone <= step / 2.0) {\n c = mix(vec4(0.), texture2D(hatch6, uv), 12. * tone);\n }\n else if (tone <= step) {\n c = mix(texture2D(hatch6, uv), texture2D(hatch5, uv), 6. * tone);\n }\n if(tone > step && tone <= 2. * step){\n c = mix(texture2D(hatch5, uv), texture2D(hatch4, uv) , 6. * (tone - step));\n }\n if(tone > 2. * step && tone <= 3. * step){\n c = mix(texture2D(hatch4, uv), texture2D(hatch3, uv), 6. * (tone - 2. * step));\n }\n if(tone > 3. * step && tone <= 4. * step){\n c = mix(texture2D(hatch3, uv), texture2D(hatch2, uv), 6. * (tone - 3. * step));\n }\n if(tone > 4. * step && tone <= 5. * step){\n c = mix(texture2D(hatch2, uv), texture2D(hatch1, uv), 6. * (tone - 4. * step));\n }\n if(tone > 5. * step){\n c = mix(texture2D(hatch1, uv), vec4(1.), 6. * (tone - 5. * step));\n }\n\n return c.r;\n}\n\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n vec4 inkColor = sRGBToLinear(color);\n#else\n vec4 inkColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n inkColor *= sRGBToLinear(v_Color);\n #else\n inkColor *= v_Color;\n #endif\n#endif\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float tone = 0.0;\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n tone += dot(ambientLightColor[i], w) * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n tone += dot(calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_], w) * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n float lightTone = dot(directionalLightColor[i], w);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n tone += lightTone * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor = mix(inkColor, paperColor, shade(clamp(tone, 0.0, 1.0)));\n }\n@end\n"},function(e,t,r){"use strict";t.a="@export ecgl.sm.depth.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec3 position : POSITION;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\nvarying vec4 v_ViewPosition;\n\nvoid main(){\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n v_ViewPosition = worldViewProjection * vec4(pos, 1.0);\n gl_Position = v_ViewPosition;\n\n}\n@end\n\n\n\n@export ecgl.sm.depth.fragment\n\n@import clay.sm.depth.fragment\n\n@end"},function(e,t,r){"use strict";r(134),r(138),r(139),r(145);var n=r(0),i=r.n(n);i.a.registerAction({type:"grid3DChangeCamera",event:"grid3dcamerachanged",update:"series:updateCamera"},(function(e,t){t.eachComponent({mainType:"grid3D",query:e},(function(t){t.setView(e)}))})),i.a.registerAction({type:"grid3DShowAxisPointer",event:"grid3dshowaxispointer",update:"grid3D:showAxisPointer"},(function(e,t){})),i.a.registerAction({type:"grid3DHideAxisPointer",event:"grid3dhideaxispointer",update:"grid3D:hideAxisPointer"},(function(e,t){}))},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(135),o=i.a.extendComponentModel({type:"cartesian3DAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid3D",index:this.option.gridIndex,id:this.option.gridId})[0]}});function s(e,t){return t.type||(t.data?"category":"value")}i.a.helper.mixinAxisModelCommonMethods(o),Object(a.a)("x",o,s,{name:"X"}),Object(a.a)("y",o,s,{name:"Y"}),Object(a.a)("z",o,s,{name:"Z"})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(136),o=r(137),s=r.n(o),l=["value","category","time","log"];t.a=function(e,t,r,n){i.a.util.each(l,(function(o){t.extend({type:e+"Axis3D."+o,__ordinalMeta:null,mergeDefaultAndTheme:function(t,n){var a=n.getTheme();i.a.util.merge(t,a.get(o+"Axis3D")),i.a.util.merge(t,this.getDefaultOption()),t.type=r(e,t)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=s.a.createByAxisModel(this))},getCategories:function(){if("category"===this.option.type)return this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:i.a.util.merge(i.a.util.clone(a.a[o+"Axis3D"]),n||{},!0)})})),t.superClass.registerSubTypeDefaulter(e+"Axis3D",i.a.util.curry(r,e))}},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a={show:!0,grid3DIndex:0,inverse:!1,name:"",nameLocation:"middle",nameTextStyle:{fontSize:16},nameGap:20,axisPointer:{},axisLine:{},axisTick:{},axisLabel:{},splitArea:{}},o=i.a.util.merge({boundaryGap:!0,axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"},axisPointer:{label:{show:!1}}},a),s=i.a.util.merge({boundaryGap:[0,0],splitNumber:5,axisPointer:{label:{}}},a),l=i.a.util.defaults({scale:!0,min:"dataMin",max:"dataMax"},s),u=i.a.util.defaults({logBase:10},s);u.scale=!0,t.a={categoryAxis3D:o,valueAxis3D:s,timeAxis3D:l,logAxis3D:u}},function(e,t,r){var n=r(12),i=n.createHashMap,a=n.isObject,o=n.map;function s(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this._map}s.createByAxisModel=function(e){var t=e.option,r=t.data,n=r&&o(r,h);return new s({categories:n,needCollect:!n,deduplication:!1!==t.dedplication})};var l=s.prototype;function u(e){return e._map||(e._map=i(e.categories))}function h(e){return a(e)&&null!=e.value?e.value:e+""}l.getOrdinal=function(e){return u(this).get(e)},l.parseAndCollect=function(e){var t,r=this._needCollect;if("string"!=typeof e&&!r)return e;if(r&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var n=u(this);return null==(t=n.get(e))&&(r?(t=this.categories.length,this.categories[t]=e,n.set(e,t)):t=NaN),t};var c=s;e.exports=c},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(38),o=r(31),s=r(32),l=i.a.extendComponentModel({type:"grid3D",dependencies:["xAxis3D","yAxis3D","zAxis3D"],defaultOption:{show:!0,zlevel:-10,left:0,top:0,width:"100%",height:"100%",environment:"auto",boxWidth:100,boxHeight:100,boxDepth:100,axisPointer:{show:!0,lineStyle:{color:"rgba(0, 0, 0, 0.8)",width:1},label:{show:!0,formatter:null,margin:8,textStyle:{fontSize:14,color:"#fff",backgroundColor:"rgba(0,0,0,0.5)",padding:3,borderRadius:3}}},axisLine:{show:!0,lineStyle:{color:"#333",width:2,type:"solid"}},axisTick:{show:!0,inside:!1,length:3,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}},light:{main:{alpha:30,beta:40},ambient:{intensity:.4}},viewControl:{alpha:20,beta:40,autoRotate:!1,distance:200,minDistance:40,maxDistance:400}}});i.a.util.merge(l.prototype,a.a),i.a.util.merge(l.prototype,o.a),i.a.util.merge(l.prototype,s.a)},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(2),o=r(39),s=r(22),l=r(3),u=r(73),h=r(34),c=r(140),d=r(142),f=r(58),p=r(40),m=l.a.firstNotNull;a.a.Shader.import(p.a),["x","y","z"].forEach((function(e){i.a.extendComponentView({type:e+"Axis3D"})}));var g={x:0,y:2,z:1};i.a.extendComponentView({type:"grid3D",__ecgl__:!0,init:function(e,t){var r=new a.a.Material({shader:a.a.createShader("ecgl.color"),depthMask:!1,transparent:!0}),n=new a.a.Material({shader:a.a.createShader("ecgl.meshLines3D"),depthMask:!1,transparent:!0});r.define("fragment","DOUBLE_SIDED"),r.define("both","VERTEX_COLOR"),this.groupGL=new a.a.Node,this._control=new o.a({zr:t.getZr()}),this._control.init(),this._faces=[["y","z","x",-1,"left"],["y","z","x",1,"right"],["x","y","z",-1,"bottom"],["x","y","z",1,"top"],["x","z","y",-1,"far"],["x","z","y",1,"near"]].map((function(e){var t=new c.a(e,n,r);return this.groupGL.add(t.rootNode),t}),this),this._axes=["x","y","z"].map((function(e){var t=new d.a(e,n);return this.groupGL.add(t.rootNode),t}),this);var i=t.getDevicePixelRatio();this._axisLabelSurface=new u.a({width:256,height:256,devicePixelRatio:i}),this._axisLabelSurface.onupdate=function(){t.getZr().refresh()},this._axisPointerLineMesh=new a.a.Mesh({geometry:new s.a({useNativeLine:!1}),material:n,castShadow:!1,ignorePicking:!0,renderOrder:3}),this.groupGL.add(this._axisPointerLineMesh),this._axisPointerLabelsSurface=new u.a({width:128,height:128,devicePixelRatio:i}),this._axisPointerLabelsMesh=new f.a({ignorePicking:!0,renderOrder:4,castShadow:!1}),this._axisPointerLabelsMesh.material.set("textureAtlas",this._axisPointerLabelsSurface.getTexture()),this.groupGL.add(this._axisPointerLabelsMesh),this._lightRoot=new a.a.Node,this._sceneHelper=new h.a,this._sceneHelper.initLight(this._lightRoot)},render:function(e,t,r){this._model=e,this._api=r;var n=e.coordinateSystem;n.viewGL.add(this._lightRoot),e.get("show")?n.viewGL.add(this.groupGL):n.viewGL.remove(this.groupGL);var i=this._control;i.setViewGL(n.viewGL);var a=e.getModel("viewControl");i.setFromViewControlModel(a,0),this._axisLabelSurface.clear();var o=["x","y","z"].reduce((function(t,r){var i=n.getAxis(r),a=i.model;return t[r]=m(a.get("axisLabel.interval"),e.get("axisLabel.interval")),"ordinal"===i.scale.type&&(null!=t[r]&&"auto"!=t[r]||(t[r]=Math.floor(i.scale.getTicks().length/8))),t}),{});i.off("update"),e.get("show")&&(this._faces.forEach((function(n){n.update(o,e,t,r)}),this),this._axes.forEach((function(t){t.update(e,o,this._axisLabelSurface,r)}),this)),i.on("update",this._onCameraChange.bind(this,e,r),this),this._sceneHelper.setScene(n.viewGL.scene),this._sceneHelper.updateLight(e),n.viewGL.setPostEffect(e.getModel("postEffect"),r),n.viewGL.setTemporalSuperSampling(e.getModel("temporalSuperSampling")),this._initMouseHandler(e)},afterRender:function(e,t,r,n){var i=n.renderer;this._sceneHelper.updateAmbientCubemap(i,e,r),this._sceneHelper.updateSkybox(i,e,r)},showAxisPointer:function(e,t,r,n){this._doShowAxisPointer(),this._updateAxisPointer(n.value)},hideAxisPointer:function(e,t,r,n){this._doHideAxisPointer()},_initMouseHandler:function(e){var t=e.coordinateSystem.viewGL;e.get("show")&&e.get("axisPointer.show")?t.on("mousemove",this._updateAxisPointerOnMousePosition,this):t.off("mousemove",this._updateAxisPointerOnMousePosition)},_updateAxisPointerOnMousePosition:function(e){if(!e.target){for(var t,r=this._model.coordinateSystem,n=r.viewGL,i=n.castRay(e.offsetX,e.offsetY,new a.a.Ray),o=0;on[1]?0:1,s=this._faces[2*r+o],l=this._faces[2*r+1-o];s.rootNode.invisible=!0,l.rootNode.invisible=!1}},_updateAxisLinePosition:function(){var e=this._model.coordinateSystem,t=e.getAxis("x"),r=e.getAxis("y"),n=e.getAxis("z"),i=n.getExtentMax(),a=n.getExtentMin(),o=t.getExtentMin(),s=t.getExtentMax(),l=r.getExtentMax(),u=r.getExtentMin(),h=this._axes[0].rootNode,c=this._axes[1].rootNode,d=this._axes[2].rootNode,f=this._faces,p=f[4].rootNode.invisible?u:l,m=f[2].rootNode.invisible?i:a,g=f[0].rootNode.invisible?o:s,_=f[2].rootNode.invisible?i:a,v=f[0].rootNode.invisible?s:o,y=f[4].rootNode.invisible?u:l;h.rotation.identity(),c.rotation.identity(),d.rotation.identity(),f[4].rootNode.invisible&&(this._axes[0].flipped=!0,h.rotation.rotateX(Math.PI)),f[0].rootNode.invisible&&(this._axes[1].flipped=!0,c.rotation.rotateZ(Math.PI)),f[4].rootNode.invisible&&(this._axes[2].flipped=!0,d.rotation.rotateY(Math.PI)),h.position.set(0,m,p),c.position.set(g,_,0),d.position.set(v,0,y),h.update(),c.update(),d.update(),this._updateAxisLabelAlign()},_updateAxisLabelAlign:function(){var e=this._control.getCamera(),t=[new a.a.Vector4,new a.a.Vector4],r=new a.a.Vector4;this.groupGL.getWorldPosition(r),r.w=1,r.transformMat4(e.viewMatrix).transformMat4(e.projectionMatrix),r.x/=r.w,r.y/=r.w,this._axes.forEach((function(n){for(var i=n.axisLineCoords,a=(n.labelsMesh.geometry,0);ar.y?"bottom":"top"):(s="middle",o=h>r.x?"left":"right"),n.setSpriteAlign(o,s,this._api)}),this)},_doShowAxisPointer:function(){this._axisPointerLineMesh.invisible&&(this._axisPointerLineMesh.invisible=!1,this._axisPointerLabelsMesh.invisible=!1,this._api.getZr().refresh())},_doHideAxisPointer:function(){this._axisPointerLineMesh.invisible||(this._axisPointerLineMesh.invisible=!0,this._axisPointerLabelsMesh.invisible=!0,this._api.getZr().refresh())},_updateAxisPointer:function(e){var t=this._model.coordinateSystem,r=t.dataToPoint(e),n=this._axisPointerLineMesh.geometry,i=this._model.getModel("axisPointer"),o=this._api.getDevicePixelRatio();function s(e){return l.a.firstNotNull(e.model.get("axisPointer.show"),i.get("show"))}function u(e){var t=e.model.getModel("axisPointer",i).getModel("lineStyle"),r=a.a.parseColor(t.get("color")),n=m(t.get("width"),1),o=m(t.get("opacity"),1);return r[3]*=o,{color:r,lineWidth:n}}n.convertToDynamicArray(!0);for(var h=0;h0&&e.rotation.rotateY(Math.PI),t.normal.z=-n)}(this.rootNode,this.plane,l,this.faceInfo[3])},d.prototype._updateSplitLines=function(e,t,r,n,o){var s=o.getDevicePixelRatio();t.forEach((function(o,l){var c=o.model,d=t[1-l].getExtent();if(!o.scale.isBlank()){var f=c.getModel("splitLine",r.getModel("splitLine"));if(f.get("show")){var p=f.getModel("lineStyle"),m=p.get("color"),g=h(p.get("opacity"),1),_=h(p.get("width"),1),v=f.get("interval");null!=v&&"auto"!==v||(v=n[o.dim]),m=i.a.util.isArray(m)?m:[m];for(var y=o.getTicksCoords(),x=0,T=0;T65535?new Uint32Array(3*n):new Uint16Array(3*n))},getQuadVertexCount:function(){return 4},getQuadTriangleCount:function(){return 2},addQuad:(n=d.create(),i=d.create(),a=d.create(),o=[0,3,1,3,2,1],function(e,t){var r=this.attributes.position,s=this.attributes.normal,l=this.attributes.color;d.sub(n,e[1],e[0]),d.sub(i,e[2],e[1]),d.cross(a,n,i),d.normalize(a,a);for(var u=0;u<4;u++)r.set(this._vertexOffset+u,e[u]),l.set(this._vertexOffset+u,t),s.set(this._vertexOffset+u,a);var h=3*this._faceOffset;for(u=0;u<6;u++)this.indices[h+u]=o[u]+this._vertexOffset;this._vertexOffset+=4,this._faceOffset+=2})});u.a.util.defaults(f.prototype,h.a),t.a=f},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(2),o=r(22),s=r(3),l=r(58),u=r(74),h=s.a.firstNotNull,c={x:0,y:2,z:1};function d(e,t){var r=new a.a.Mesh({geometry:new o.a({useNativeLine:!1}),material:t,castShadow:!1,ignorePicking:!0,renderOrder:2}),n=new l.a;n.material.depthMask=!1;var i=new a.a.Node;i.add(r),i.add(n),this.rootNode=i,this.dim=e,this.linesMesh=r,this.labelsMesh=n,this.axisLineCoords=null,this.labelElements=[]}var f={x:"y",y:"x",z:"y"};d.prototype.update=function(e,t,r,n){var o=e.coordinateSystem.getAxis(this.dim),s=t[this.dim],l=this.linesMesh.geometry,d=this.labelsMesh.geometry;l.convertToDynamicArray(!0),d.convertToDynamicArray(!0);var p=o.model,m=o.getExtent(),g=n.getDevicePixelRatio(),_=p.getModel("axisLine",e.getModel("axisLine")),v=p.getModel("axisTick",e.getModel("axisTick")),y=p.getModel("axisLabel",e.getModel("axisLabel")),x=_.get("lineStyle.color");if(_.get("show")){var T=_.getModel("lineStyle"),b=[0,0,0];(I=[0,0,0])[P=c[o.dim]]=m[0],b[P]=m[1],this.axisLineCoords=[I,b];var w=a.a.parseColor(x),E=h(T.get("width"),1),S=h(T.get("opacity"),1);w[3]*=S,l.addLine(I,b,w,E*g)}if(v.get("show")){var M=v.getModel("lineStyle"),A=a.a.parseColor(h(M.get("color"),x));E=h(M.get("width"),1),A[3]*=h(M.get("opacity"),1);var C=o.getTicksCoords();null!=(B=v.get("interval"))&&"auto"!==B||(B=s);for(var L=v.get("length"),N=0;N65535?new Uint32Array(3*r):new Uint16Array(3*r))},setSpriteAlign:function(e,t,r,n,i){var a,o,s,l;switch(null==r&&(r="left"),null==n&&(n="top"),i=i||0,r){case"left":a=i,s=t[0]+i;break;case"center":case"middle":a=-t[0]/2,s=t[0]/2;break;case"right":a=-t[0]-i,s=-i}switch(n){case"bottom":o=i,l=t[1]+i;break;case"middle":o=-t[1]/2,l=t[1]/2;break;case"top":o=-t[1]-i,l=-i}var u=4*e,h=this.attributes.offset;h.set(u,[a,l]),h.set(u+1,[s,l]),h.set(u+2,[s,o]),h.set(u+3,[a,o])},addSprite:function(e,t,r,n,i,a){var o=this._vertexOffset;this.setSprite(this._vertexOffset/4,e,t,r,n,i,a);for(var l=0;l/g,">").replace(/"/g,""").replace(/'/g,"'")}var l=["a","b","c","d","e","f","g"],u=function(e,t){return"{"+e+(null==t?"":t)+"}"},h=function(e){return e<10?"0"+e:e},c=i.truncateText,d=i.getBoundingRect;t.addCommas=function(e){return isNaN(e)?"-":(e=(e+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")},t.toCamelCase=function(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e},t.normalizeCssArray=o,t.encodeHTML=s,t.formatTpl=function(e,t,r){n.isArray(t)||(t=[t]);var i=t.length;if(!i)return"";for(var a=t[0].$vars||[],o=0;o':'':""},t.formatTime=function(e,t,r){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var n=a.parseDate(t),i=r?"UTC":"",o=n["get"+i+"FullYear"](),s=n["get"+i+"Month"]()+1,l=n["get"+i+"Date"](),u=n["get"+i+"Hours"](),c=n["get"+i+"Minutes"](),d=n["get"+i+"Seconds"]();return e=e.replace("MM",h(s)).replace("M",s).replace("yyyy",o).replace("yy",o%100).replace("dd",h(l)).replace("d",l).replace("hh",h(u)).replace("h",u).replace("mm",h(c)).replace("m",c).replace("ss",h(d)).replace("s",d)},t.capitalFirst=function(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e},t.truncateText=c,t.getTextRect=d},function(e,t,r){var n=r(75),i=r(151),a=r(12),o=a.getContext,s=a.extend,l=a.retrieve2,u=a.retrieve3,h={},c=0,d=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,f="12px sans-serif",p={};function m(e,t){var r=e+":"+(t=t||f);if(h[r])return h[r];for(var n=(e+"").split("\n"),i=0,a=0,o=n.length;a5e3&&(c=0,h={}),c++,h[r]=i,i}function g(e,t,r){return"right"===r?e-=t:"center"===r&&(e-=t/2),e}function _(e,t,r){return"middle"===r?e-=t/2:"bottom"===r&&(e-=t),e}function v(e,t,r,n,i){if(!t)return"";var a=(e+"").split("\n");i=y(t,r,n,i);for(var o=0,s=a.length;o=a;u++)o-=a;var h=m(r);return h>o&&(r="",h=0),o=e-h,n.ellipsis=r,n.ellipsisWidth=h,n.contentWidth=o,n.containerWidth=e,n}function x(e,t){var r=t.containerWidth,n=t.font,i=t.contentWidth;if(!r)return"";var a=m(e,n);if(a<=r)return e;for(var o=0;;o++){if(a<=i||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?T(e,i,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*i/a):0;a=m(e=e.substr(0,s),n)}return""===e&&(e=t.placeholder),e}function T(e,t,r,n){for(var i=0,a=0,o=e.length;al)e="",a=[];else if(null!=u)for(var h=y(u-(r?r[1]+r[3]:0),t,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=a.length;ca&&M(r,e.substring(a,o)),M(r,n[2],n[1]),a=d.lastIndex}ay)return{lines:[],width:0,height:0};B.textWidth=m(B.text,L);var D=A.textWidth,I=null==D||"auto"===D;if("string"==typeof D&&"%"===D.charAt(D.length-1))B.percentWidth=D,f.push(B),D=0;else{if(I){D=B.textWidth;var P=A.textBackgroundColor,O=P&&P.image;O&&(O=i.findExistImage(O),i.isImageReady(O)&&(D=Math.max(D,O.width*N/O.height)))}var R=C?C[1]+C[3]:0;D+=R;var F=null!=_?_-E:null;null!=F&&F4){console.warn("Support at most 4 cascade");continue}_.shadowCascade>1&&(o=_.shadowCascade),this.renderDirectionalLightShadow(e,t,r,_,this._opaqueCasters,p,h,u)}else _ instanceof c.a?this.renderSpotLightShadow(e,t,_,this._opaqueCasters,l,s):_ instanceof f.a&&this.renderPointLightShadow(e,t,_,this._opaqueCasters,m);this._shadowMapNumber[_.type]++}for(var v in this._shadowMapNumber){var y=this._shadowMapNumber[v],x=v+"_SHADOWMAP_COUNT";for(g=0;g0?T.define("fragment",x,y):T.isDefined("fragment",x)&&T.undefine("fragment",x))}for(g=0;g0){var w=u.map(A);if(b.directionalLightShadowMaps={value:u,type:"tv"},b.directionalLightMatrices={value:h,type:"m4v"},b.directionalLightShadowMapSizes={value:w,type:"1fv"},o){var E=p.slice(),S=p.slice();E.pop(),S.shift(),E.reverse(),S.reverse(),h.reverse(),b.shadowCascadeClipsNear={value:E,type:"1fv"},b.shadowCascadeClipsFar={value:S,type:"1fv"}}}if(s.length>0){var M=s.map(A);(b=t.shadowUniforms).spotLightShadowMaps={value:s,type:"tv"},b.spotLightMatrices={value:l,type:"m4v"},b.spotLightShadowMapSizes={value:M,type:"1fv"}}m.length>0&&(b.pointLightShadowMaps={value:m,type:"tv"})}function A(e){return e.height}},renderDirectionalLightShadow:(C=new s.a,L=new l.a,N=new o.a,D=new l.a,I=new l.a,P=new l.a,O=new l.a,function(e,t,r,n,i,a,o,s){var h=this._getDepthMaterial(n),c={getMaterial:function(e){return e.shadowDepthMaterial||h},sortCompare:u.a.opaqueSortCompare};if(!t.viewBoundingBoxLastFrame.isFinite()){var d=t.getBoundingBox();t.viewBoundingBoxLastFrame.copy(d).applyTransform(r.viewMatrix)}var f=Math.min(-t.viewBoundingBoxLastFrame.min.z,r.far),p=Math.max(-t.viewBoundingBoxLastFrame.max.z,r.near),m=this._getDirectionalLightCamera(n,t,r),g=P.array;O.copy(m.projectionMatrix),M.invert(I.array,m.worldTransform.array),M.multiply(I.array,I.array,r.worldTransform.array),M.multiply(g,O.array,I.array);for(var _=[],v=r instanceof y.a,x=(r.near+r.far)/(r.near-r.far),T=2*r.near*r.far/(r.near-r.far),b=0;b<=n.shadowCascade;b++){var w=p*Math.pow(f/p,b/n.shadowCascade),E=p+(f-p)*b/n.shadowCascade,S=w*n.cascadeSplitLogFactor+E*(1-n.cascadeSplitLogFactor);_.push(S),a.push(-(-S*x+T)/-S)}var A=this._getTexture(n,n.shadowCascade);s.push(A);var F=e.viewport,B=e.gl;for(this._frameBuffer.attach(A),this._frameBuffer.bind(e),B.clear(B.COLOR_BUFFER_BIT|B.DEPTH_BUFFER_BIT),b=0;b=0||(this.nodes.push(e),this._dirty=!0)},removeNode:function(e){"string"==typeof e&&(e=this.getNodeByName(e));var t=this.nodes.indexOf(e);t>=0&&(this.nodes.splice(t,1),this._dirty=!0)},getNodeByName:function(e){for(var t=0;t=r.COLOR_ATTACHMENT0&&c<=r.COLOR_ATTACHMENT0+8&&h.push(c);u.drawBuffersEXT(h)}e.saveClear(),e.clearBit=i.a.DEPTH_BUFFER_BIT|i.a.COLOR_BUFFER_BIT,t=e.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ),e.restoreClear(),n.unbind(e)}else t=e.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ);this.trigger("afterrender",t),this._rendering=!1,this._rendered=!0}});t.a=o},function(e,t,r){"use strict";var n=r(42).a.extend((function(){return{texture:null,outputs:{color:{}}}}),(function(){}),{getOutput:function(e,t){return this.texture},beforeFrame:function(){},afterFrame:function(){}});t.a=n},function(e,t,r){"use strict";var n=r(14),i=r(42),a=i.a.extend((function(){return{name:"",inputs:{},outputs:null,shader:"",inputLinks:{},outputLinks:{},pass:null,_prevOutputTextures:{},_outputTextures:{},_outputReferences:{},_rendering:!1,_rendered:!1,_compositor:null}}),(function(){var e=new n.a({fragment:this.shader});this.pass=e}),{render:function(e,t){this.trigger("beforerender",e),this._rendering=!0;var r=e.gl;for(var n in this.inputLinks){var i=(c=this.inputLinks[n]).node.getOutput(e,c.pin);this.pass.setUniform(n,i)}if(this.outputs){this.pass.outputs={};var a={};for(var o in this.outputs){var s=this.updateParameter(o,e);isNaN(s.width)&&this.updateParameter(o,e);var l=this.outputs[o],u=this._compositor.allocateTexture(s);this._outputTextures[o]=u,"string"==typeof(h=l.attachment||r.COLOR_ATTACHMENT0)&&(h=r[h]),a[h]=u}for(var h in this._compositor.getFrameBuffer().bind(e),a)this._compositor.getFrameBuffer().attach(a[h],h);this.pass.render(e),this._compositor.getFrameBuffer().updateMipmap(e.gl)}else this.pass.outputs=null,this._compositor.getFrameBuffer().unbind(e),this.pass.render(e,t);for(var n in this.inputLinks){var c;(c=this.inputLinks[n]).node.removeReference(c.pin)}this._rendering=!1,this._rendered=!0,this.trigger("afterrender",e)},updateParameter:function(e,t){var r,n,i=this.outputs[e],a=i.parameters,o=i._parametersCopy;if(o||(o=i._parametersCopy={}),a)for(var s in a)"width"!==s&&"height"!==s&&(o[s]=a[s]);return r=a.width instanceof Function?a.width.call(this,t):a.width,n=a.height instanceof Function?a.height.call(this,t):a.height,o.width===r&&o.height===n||this._outputTextures[e]&&this._outputTextures[e].dispose(t),o.width=r,o.height=n,o},setParameter:function(e,t){this.pass.setUniform(e,t)},getParameter:function(e){return this.pass.getUniform(e)},setParameters:function(e){for(var t in e)this.setParameter(t,e[t])},define:function(e,t){this.pass.material.define("fragment",e,t)},undefine:function(e){this.pass.material.undefine("fragment",e)},removeReference:function(e){this._outputReferences[e]--,0===this._outputReferences[e]&&(this.outputs[e].keepLastFrame?(this._prevOutputTextures[e]&&this._compositor.releaseTexture(this._prevOutputTextures[e]),this._prevOutputTextures[e]=this._outputTextures[e]):this._compositor.releaseTexture(this._outputTextures[e]))},clear:function(){i.a.prototype.clear.call(this),this.pass.material.disableTexturesAll()}});t.a=a},function(e,t,r){"use strict";var n=r(9),i=r(4),a=r(5),o=r(6),s=r(14),l=r(7),u=r(10),h=r(43),c=r(163);function d(e){for(var t=new Uint8Array(e*e*4),r=0,n=new i.a,a=0;a=this._haltonSequence.length},render:function(e,t,r){var n=this._blendPass;0===this._frame?(n.setUniform("weight1",0),n.setUniform("weight2",1)):(n.setUniform("weight1",.9),n.setUniform("weight2",.1)),n.setUniform("texture1",this._prevFrameTex),n.setUniform("texture2",t||this._sourceTex),this._blendFb.attach(this._outputTex),this._blendFb.bind(e),n.render(e),this._blendFb.unbind(e),r||(this._outputPass.setUniform("texture",this._outputTex),this._outputPass.render(e));var i=this._prevFrameTex;this._prevFrameTex=this._outputTex,this._outputTex=i,this._frame++},dispose:function(e){this._sourceFb.dispose(e),this._blendFb.dispose(e),this._prevFrameTex.dispose(e),this._outputTex.dispose(e),this._sourceTex.dispose(e),this._outputPass.dispose(e),this._blendPass.dispose(e)}},t.a=u},function(e,t,r){"use strict";var n=r(0),i=r.n(n);r(184),r(185),r(82),i.a.registerAction({type:"geo3DChangeCamera",event:"geo3dcamerachanged",update:"series:updateCamera"},(function(e,t){t.eachComponent({mainType:"geo3D",query:e},(function(t){t.setView(e)}))}))},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(38),o=r(31),s=r(32),l=r(26),u=r(80),h=i.a.extendComponentModel({type:"geo3D",layoutMode:"box",coordinateSystem:null,optionUpdated:function(){var e=this.option;e.regions=this.getFilledRegions(e.regions,e.map);var t=i.a.helper.completeDimensions(["value"],e.data,{encodeDef:this.get("encode"),dimsDef:this.get("dimensions")}),r=new i.a.List(t,this);r.initData(e.regions);var n={};r.each((function(e){var t=r.getName(e),i=r.getItemModel(e);n[t]=i})),this._regionModelMap=n,this._data=r},getData:function(){return this._data},getRegionModel:function(e){var t=this.getData().getName(e);return this._regionModelMap[t]||new i.a.Model(null,this)},getRegionPolygonCoords:function(e){var t=this.getData().getName(e),r=this.coordinateSystem.getRegion(t);return r?r.geometries:[]},getFormattedLabel:function(e,t){var r=this._data.getName(e),n=this.getRegionModel(r),i=n.get("normal"===t?["label","formatter"]:["emphasis","label","formatter"]);null==i&&(i=n.get(["label","formatter"]));var a={name:r};if("function"==typeof i)return a.status=t,i(a);if("string"==typeof i){var o=a.seriesName;return i.replace("{a}",null!=o?o:"")}return r},defaultOption:{regions:[]}});i.a.util.merge(h.prototype,u.a),i.a.util.merge(h.prototype,a.a),i.a.util.merge(h.prototype,o.a),i.a.util.merge(h.prototype,s.a),i.a.util.merge(h.prototype,l.a)},function(e,t,r){"use strict";var n=r(59),i=r(0),a=r.n(i),o=r(2),s=r(39),l=r(34);a.a.extendComponentView({type:"geo3D",__ecgl__:!0,init:function(e,t){this._geo3DBuilder=new n.a(t),this.groupGL=new o.a.Node,this._lightRoot=new o.a.Node,this._sceneHelper=new l.a(this._lightRoot),this._sceneHelper.initLight(this._lightRoot),this._control=new s.a({zr:t.getZr()}),this._control.init()},render:function(e,t,r){this.groupGL.add(this._geo3DBuilder.rootNode);var n=e.coordinateSystem;if(n&&n.viewGL){n.viewGL.add(this._lightRoot),e.get("show")?n.viewGL.add(this.groupGL):n.viewGL.remove(this.groupGL);var i=this._control;i.setViewGL(n.viewGL);var a=e.getModel("viewControl");i.setFromViewControlModel(a,0),this._sceneHelper.setScene(n.viewGL.scene),this._sceneHelper.updateLight(e),n.viewGL.setPostEffect(e.getModel("postEffect"),r),n.viewGL.setTemporalSuperSampling(e.getModel("temporalSuperSampling")),this._geo3DBuilder.update(e,t,r,0,e.getData().count());var o=n.viewGL.isLinearSpace()?"define":"undefine";this._geo3DBuilder.rootNode.traverse((function(e){e.material&&e.material[o]("fragment","SRGB_DECODE")})),i.off("update"),i.on("update",(function(){r.dispatchAction({type:"geo3DChangeCamera",alpha:i.getAlpha(),beta:i.getBeta(),distance:i.getDistance(),center:i.getCenter(),from:this.uid,geo3DId:e.id})}))}},afterRender:function(e,t,r,n){var i=n.renderer;this._sceneHelper.updateAmbientCubemap(i,e,r),this._sceneHelper.updateSkybox(i,e,r)},dispose:function(){this._control.dispose()}})},function(e,t,r){"use strict";function n(e,t,r){r=r||2;var n,s,l,u,h,f,m,g=t&&t.length,_=g?t[0]*r:e.length,v=i(e,0,_,r,!0),y=[];if(!v)return y;if(g&&(v=function(e,t,r,n){var o,s,l,u=[];for(o=0,s=t.length;o80*r){n=l=e[0],s=u=e[1];for(var x=r;x<_;x+=r)(h=e[x])l&&(l=h),f>u&&(u=f);m=Math.max(l-n,u-s)}return o(v,y,r,n,s,m),y}function i(e,t,r,n,i){var a,o;if(i===S(e,t,r,n)>0)for(a=t;a=t;a-=n)o=b(a,e[a],e[a+1],o);return o&&v(o,o.next)&&(w(o),o=o.next),o}function a(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==_(n.prev,n,n.next))n=n.next;else{if(w(n),(n=t=n.prev)===n.next)return null;r=!0}}while(r||n!==t);return t}function o(e,t,r,n,i,c,d){if(e){!d&&c&&function(e,t,r,n){var i=e;do{null===i.z&&(i.z=f(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,r,n,i,a,o,s,l,u=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1)}(i)}(e,n,i,c);for(var p,m,g=e;e.prev!==e.next;)if(p=e.prev,m=e.next,c?l(e,n,i,c):s(e))t.push(p.i/r),t.push(e.i/r),t.push(m.i/r),w(e),e=m.next,g=m.next;else if((e=m)===g){d?1===d?o(e=u(e,t,r),t,r,n,i,c,2):2===d&&h(e,t,r,n,i,c):o(a(e),t,r,n,i,c,1);break}}}function s(e){var t=e.prev,r=e,n=e.next;if(_(t,r,n)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(m(t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y)&&_(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(e,t,r,n){var i=e.prev,a=e,o=e.next;if(_(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,h=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,c=f(s,l,t,r,n),d=f(u,h,t,r,n),p=e.nextZ;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&_(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=e.prevZ;p&&p.z>=c;){if(p!==e.prev&&p!==e.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&_(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!v(i,a)&&y(i,n,n.next,a)&&x(i,a)&&x(a,i)&&(t.push(i.i/r),t.push(n.i/r),t.push(a.i/r),w(n),w(n.next),n=e=a),n=n.next}while(n!==e);return n}function h(e,t,r,n,i,s){var l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&g(l,u)){var h=T(l,u);return l=a(l,l.next),h=a(h,h.next),o(l,t,r,n,i,s),void o(h,t,r,n,i,s)}u=u.next}l=l.next}while(l!==e)}function c(e,t){return e.x-t.x}function d(e,t){if(t=function(e,t){var r,n=t,i=e.x,a=e.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=h&&i!==n.x&&m(ar.x)&&x(n,e)&&(r=n,d=l),n=n.next;return r}(e,t),t){var r=T(t,e);a(r,r.next)}}function f(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)/i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)/i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function p(e){var t=e,r=e;do{t.x=0&&(e-o)*(n-s)-(r-o)*(t-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function g(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&y(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&x(e,t)&&x(t,e)&&function(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)}function _(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function y(e,t,r,n){return!!(v(e,t)&&v(r,n)||v(e,n)&&v(r,t))||_(e,t,r)>0!=_(e,t,n)>0&&_(r,n,e)>0!=_(r,n,t)>0}function x(e,t){return _(e.prev,e,e.next)<0?_(e,t,e.next)>=0&&_(e,e.prev,t)>=0:_(e,t,e.prev)<0||_(e,e.next,t)<0}function T(e,t){var r=new E(e.i,e.x,e.y),n=new E(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function b(e,t,r,n){var i=new E(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function w(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function E(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(e,t,r,n){for(var i=0,a=t,o=r-n;a0},_displacementChanged:!0,_displacementScale:0,updateDisplacementHash:function(){var e=this.getDisplacementTexture(),t=this.getDisplacemenScale();this._displacementChanged=this._displacementTexture!==e||this._displacementScale!==t,this._displacementTexture=e,this._displacementScale=t},isDisplacementChanged:function(){return this._displacementChanged}});i.a.util.merge(h.prototype,a.a),i.a.util.merge(h.prototype,o.a),i.a.util.merge(h.prototype,s.a),i.a.util.merge(h.prototype,l.a)},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(2),o=r(39),s=r(34),l=r(192),u=r(3);i.a.extendComponentView({type:"globe",__ecgl__:!0,_displacementScale:0,init:function(e,t){this.groupGL=new a.a.Node,this._sphereGeometry=new a.a.SphereGeometry({widthSegments:200,heightSegments:100,dynamic:!0}),this._overlayGeometry=new a.a.SphereGeometry({widthSegments:80,heightSegments:40}),this._planeGeometry=new a.a.PlaneGeometry,this._earthMesh=new a.a.Mesh({renderNormal:!0}),this._lightRoot=new a.a.Node,this._sceneHelper=new s.a,this._sceneHelper.initLight(this._lightRoot),this.groupGL.add(this._earthMesh),this._control=new o.a({zr:t.getZr()}),this._control.init(),this._layerMeshes={}},render:function(e,t,r){var n=e.coordinateSystem,i=e.get("shading");n.viewGL.add(this._lightRoot),e.get("show")?n.viewGL.add(this.groupGL):n.viewGL.remove(this.groupGL),this._sceneHelper.setScene(n.viewGL.scene),n.viewGL.setPostEffect(e.getModel("postEffect"),r),n.viewGL.setTemporalSuperSampling(e.getModel("temporalSuperSampling"));var o=this._earthMesh;o.geometry=this._sphereGeometry;var s="ecgl."+i;o.material&&o.material.shader.name===s||(o.material=a.a.createMaterial(s)),a.a.setMaterialFromModel(i,o.material,e,r),["roughnessMap","metalnessMap","detailMap","normalMap"].forEach((function(e){var t=o.material.get(e);t&&(t.flipY=!1)})),o.material.set("color",a.a.parseColor(e.get("baseColor")));var l=.99*n.radius;o.scale.set(l,l,l);var u=o.material.setTextureImage("diffuseMap",e.get("baseTexture"),r,{flipY:!1,anisotropic:8});u&&u.surface&&u.surface.attachToMesh(o);var h=o.material.setTextureImage("bumpMap",e.get("heightTexture"),r,{flipY:!1,anisotropic:8});h&&h.surface&&h.surface.attachToMesh(o),o.material[e.get("postEffect.enable")?"define":"undefine"]("fragment","SRGB_DECODE"),this._updateLight(e,r),this._displaceVertices(e,r),this._updateViewControl(e,r),this._updateLayers(e,r)},afterRender:function(e,t,r,n){var i=n.renderer;this._sceneHelper.updateAmbientCubemap(i,e,r),this._sceneHelper.updateSkybox(i,e,r)},_updateLayers:function(e,t){var r=e.coordinateSystem,n=e.get("layers"),o=r.radius,s=[],l=[],h=[],c=[];i.a.util.each(n,(function(e){var n=new i.a.Model(e),d=n.get("type"),f=a.a.loadTexture(n.get("texture"),t,{flipY:!1,anisotropic:8});if(f.surface&&f.surface.attachToMesh(this._earthMesh),"blend"===d){var p=n.get("blendTo"),m=u.a.firstNotNull(n.get("intensity"),1);"emission"===p?(h.push(f),c.push(m)):(s.push(f),l.push(m))}else{var g=n.get("id"),_=this._layerMeshes[g];_||(_=this._layerMeshes[g]=new a.a.Mesh({geometry:this._overlayGeometry,castShadow:!1,ignorePicking:!0})),"lambert"===n.get("shading")?(_.material=_.__lambertMaterial||new a.a.Material({autoUpdateTextureStatus:!1,shader:a.a.createShader("ecgl.lambert"),transparent:!0,depthMask:!1}),_.__lambertMaterial=_.material):(_.material=_.__colorMaterial||new a.a.Material({autoUpdateTextureStatus:!1,shader:a.a.createShader("ecgl.color"),transparent:!0,depthMask:!1}),_.__colorMaterial=_.material),_.material.enableTexture("diffuseMap");var v=n.get("distance"),y=o+(null==v?r.radius/100:v);_.scale.set(y,y,y),o=y;var x=this._blankTexture||(this._blankTexture=a.a.createBlankTexture("rgba(255, 255, 255, 0)"));_.material.set("diffuseMap",x),a.a.loadTexture(n.get("texture"),t,{flipY:!1,anisotropic:8},(function(e){e.surface&&e.surface.attachToMesh(_),_.material.set("diffuseMap",e),t.getZr().refresh()})),n.get("show")?this.groupGL.add(_):this.groupGL.remove(_)}}),this);var d=this._earthMesh.material;d.define("fragment","LAYER_DIFFUSEMAP_COUNT",s.length),d.define("fragment","LAYER_EMISSIVEMAP_COUNT",h.length),d.set("layerDiffuseMap",s),d.set("layerDiffuseIntensity",l),d.set("layerEmissiveMap",h),d.set("layerEmissionIntensity",c);var f=e.getModel("debug.wireframe");if(f.get("show")){d.define("both","WIREFRAME_TRIANGLE");var p=a.a.parseColor(f.get("lineStyle.color")||"rgba(0,0,0,0.5)"),m=u.a.firstNotNull(f.get("lineStyle.width"),1);d.set("wireframeLineWidth",m),d.set("wireframeLineColor",p)}else d.undefine("both","WIREFRAME_TRIANGLE")},_updateViewControl:function(e,t){var r=e.coordinateSystem,n=e.getModel("viewControl"),i=(r.viewGL.camera,this),a=this._control;a.setViewGL(r.viewGL);var o,s,l=n.get("targetCoord");null!=l&&(s=l[0]+90,o=l[1]),a.setFromViewControlModel(n,{baseDistance:r.radius,alpha:o,beta:s}),a.off("update"),a.on("update",(function(){t.dispatchAction({type:"globeChangeCamera",alpha:a.getAlpha(),beta:a.getBeta(),distance:a.getDistance()-r.radius,center:a.getCenter(),from:i.uid,globeId:e.id})}))},_displaceVertices:function(e,t){var r=e.get("displacementQuality"),n=e.get("debug.wireframe.show"),i=e.coordinateSystem;if(e.isDisplacementChanged()||r!==this._displacementQuality||n!==this._showDebugWireframe){this._displacementQuality=r,this._showDebugWireframe=n;var a=this._sphereGeometry,o={low:100,medium:200,high:400,ultra:800}[r]||200,s=o/2;(a.widthSegments!==o||n)&&(a.widthSegments=o,a.heightSegments=s,a.build()),this._doDisplaceVertices(a,i),n&&a.generateBarycentric()}},_doDisplaceVertices:function(e,t){var r=e.attributes.position.value,n=e.attributes.texcoord0.value,i=e.__originalPosition;i&&i.length===r.length||((i=new Float32Array(r.length)).set(r),e.__originalPosition=i);for(var a=t.displacementWidth,o=t.displacementHeight,s=t.displacementData,l=0;l0&&f>0||d<0&&f<0)),g=["x","y","z"].map((function(t){return e.coordDimToDataDim(t)[0]}));r.each(g,(function(e,i,a,s){var l=r.get(g[2],s,!0),u=r.stackedOn?l-a:m?0:p[0],h=t.dataToPoint([e,i,u]),c=t.dataToPoint([e,i,l]),d=o.dist(h,c),f=[0,c[1]0&&(p++,c[3]<.99&&(m=!0))}})),s.geometry.setBarCount(p);var g=r.getLayout("orient"),_=this._barIndexOfData=new Int32Array(r.count());p=0,r.each((function(e){if(r.hasValue(e)){var t=r.getItemLayout(e),n=t[0],i=t[1],a=t[2],s=4*e;c[0]=d[s++],c[1]=d[s++],c[2]=d[s++],c[3]=d[s++],c[3]>0&&(o._barMesh.geometry.addBar(n,i,g,a,c,e),_[e]=p++)}else _[e]=-1})),s.geometry.dirty(),s.geometry.updateBoundingBox();var v=s.material;v.transparent=m,v.depthMask=!m,s.geometry.sortTriangles=m,this._initHandler(e,t)},_initHandler:function(e,t){var r=e.getData(),n=this._barMesh,i="cartesian3D"===e.coordinateSystem.type;n.seriesIndex=e.seriesIndex;var a=-1;n.off("mousemove"),n.off("mouseout"),n.on("mousemove",(function(e){var o=n.geometry.getDataIndexOfVertex(e.triangle[0]);o!==a&&(this._downplay(a),this._highlight(o),this._labelsBuilder.updateLabels([o]),i&&t.dispatchAction({type:"grid3DShowAxisPointer",value:[r.get("x",o),r.get("y",o),r.get("z",o,!0)]})),a=o,n.dataIndex=o}),this),n.on("mouseout",(function(e){this._downplay(a),this._labelsBuilder.updateLabels(),a=-1,n.dataIndex=-1,i&&t.dispatchAction({type:"grid3DHideAxisPointer"})}),this)},_highlight:function(e){var t=this._data;if(t){var r=this._barIndexOfData[e];if(!(r<0)){var n=t.getItemModel(e).getModel("emphasis.itemStyle"),o=n.get("color"),s=n.get("opacity");if(null==o){var l=t.getItemVisual(e,"color");o=i.a.color.lift(l,-.4)}null==s&&(s=t.getItemVisual(e,"opacity"));var u=a.a.parseColor(o);u[3]*=s,this._barMesh.geometry.setColor(r,u),this._api.getZr().refresh()}}},_downplay:function(e){var t=this._data;if(t){var r=this._barIndexOfData[e];if(!(r<0)){var n=t.getItemVisual(e,"color"),i=t.getItemVisual(e,"opacity"),o=a.a.parseColor(n);o[3]*=i,this._barMesh.geometry.setColor(r,o),this._api.getZr().refresh()}}},highlight:function(e,t,r,n){this._toggleStatus("highlight",e,t,r,n)},downplay:function(e,t,r,n){this._toggleStatus("downplay",e,t,r,n)},_toggleStatus:function(e,t,r,n,a){var l=t.getData(),u=o.a.queryDataIndex(l,a),h=this;null!=u?i.a.util.each(s.a.normalizeToArray(u),(function(t){"highlight"===e?this._highlight(t):this._downplay(t)}),this):l.each((function(t){"highlight"===e?h._highlight(t):h._downplay(t)}))},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(e,t,r){"use strict";var n,i,a,o,s,l,u,h,c=r(0),d=r.n(c),f=r(33),p=r(60),m=r(13),g=r(1),_=r.n(g),v=_.a.vec3,y=_.a.mat3,x=m.a.extend((function(){return{attributes:{position:new m.a.Attribute("position","float",3,"POSITION"),normal:new m.a.Attribute("normal","float",3,"NORMAL"),color:new m.a.Attribute("color","float",4,"COLOR"),prevPosition:new m.a.Attribute("prevPosition","float",3),prevNormal:new m.a.Attribute("prevNormal","float",3)},dynamic:!0,enableNormal:!1,bevelSize:1,bevelSegments:0,_dataIndices:null,_vertexOffset:0,_triangleOffset:0}}),{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0},setBarCount:function(e){var t=this.enableNormal,r=this.getBarVertexCount()*e,n=this.getBarTriangleCount()*e;this.vertexCount!==r&&(this.attributes.position.init(r),t?this.attributes.normal.init(r):this.attributes.normal.value=null,this.attributes.color.init(r)),this.triangleCount!==n&&(this.indices=r>65535?new Uint32Array(3*n):new Uint16Array(3*n),this._dataIndices=new Uint32Array(r))},getBarVertexCount:function(){var e=this.bevelSize>0?this.bevelSegments:0;return e>0?this._getBevelBarVertexCount(e):this.enableNormal?24:8},getBarTriangleCount:function(){var e=this.bevelSize>0?this.bevelSegments:0;return e>0?this._getBevelBarTriangleCount(e):12},_getBevelBarVertexCount:function(e){return 4*(e+1)*(e+1)*2},_getBevelBarTriangleCount:function(e){return(4*e+3+1)*(2*e+1)*2+4},setColor:function(e,t){for(var r=this.getBarVertexCount(),n=r*(e+1),i=r*e;i0&&this.bevelSegments>0)this._addBevelBar(e,c,m,g,this.bevelSize,this.bevelSegments,_);else{v.copy(i,c),v.normalize(i,i),v.cross(a,m,i),v.normalize(a,a),v.cross(n,i,a),v.normalize(a,a),v.negate(o,n),v.negate(s,i),v.negate(l,a),t(u[0],e,n,g[0]/2),t(u[0],u[0],a,g[2]/2),t(u[1],e,n,g[0]/2),t(u[1],u[1],l,g[2]/2),t(u[2],e,o,g[0]/2),t(u[2],u[2],l,g[2]/2),t(u[3],e,o,g[0]/2),t(u[3],u[3],a,g[2]/2),t(r,e,i,g[1]),t(u[4],r,n,g[0]/2),t(u[4],u[4],a,g[2]/2),t(u[5],r,n,g[0]/2),t(u[5],u[5],l,g[2]/2),t(u[6],r,o,g[0]/2),t(u[6],u[6],l,g[2]/2),t(u[7],r,o,g[0]/2),t(u[7],u[7],a,g[2]/2);var T=this.attributes;if(this.enableNormal){h[0]=n,h[1]=o,h[2]=i,h[3]=s,h[4]=a,h[5]=l;for(var b=this._vertexOffset,w=0;w=0){var v=3*l,y=new u.a(this._points[v],this._points[v+1],this._points[v+2]);a.push({dataIndex:l,point:y,pointWorld:y.clone(),target:this._line3DMesh,distance:this._camera.getWorldPosition().dist(y)})}},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(e,t){t.containStroke=function(e,t,r,n,i,a,o){if(0===i)return!1;var s=i,l=0;if(o>t+s&&o>n+s||oe+s&&a>r+s||al?u.position[1]+=(h-l)/2:u.position[0]+=(h-s)/2;var c=u.getBoundingRect();return u.position[0]-=c.x,u.position[1]-=c.y,u.setStyle(r),u.update(),u.__size=h,u}(e,t,r),l=o.getMarginByStyle(r);return{image:a(s.__size,n,(function(e){s.brush(e)})),margin:l}},createSDFFromCanvas:function(e,t,r,n){return a(t,n,(function(t){var n=e.getContext("2d").getImageData(0,0,e.width,e.height);t.putImageData(function(e,t,r){var n=t.width,i=t.height,a=e.canvas.width,o=e.canvas.height,s=n/a,l=i/o;function u(e){return e<128?1:-1}function h(e,a){var o=1/0;e=Math.floor(e*s);for(var h=(a=Math.floor(a*l))*n+e,c=u(t.data[4*h]),d=Math.max(a-r,0);d=0;c--){var d,f=s[2*(d=this.geometry.indices?this.geometry.indices[c]:c)],p=s[2*d+1],m=this.geometry.attributes.size.get(d)/this.sizeScale/2;if(e>f-m*u&&ep-m*h&&t=2e4},doSortVertices:function(e,t){var r=this.indices,n=a.create();if(!r){r=this.indices=this.vertexCount>65535?new Uint32Array(this.vertexCount):new Uint16Array(this.vertexCount);for(var i=0;i.05);else for(i=0;i<3;i++)this._progressiveQuickSort(3*t+i);this.dirtyIndices()},_simpleSort:function(e){var t=this._zList,r=this.indices;function i(e,r){return t[r]-t[e]}e?Array.prototype.sort.call(r,i):n.a.sort(r,i,0,r.length-1)},_progressiveQuickSort:function(e){var t=this._zList,r=this.indices;this._quickSort=this._quickSort||new n.a,this._quickSort.step(r,(function(e,r){return t[r]-t[e]}),e)}}},function(e,t,r){"use strict";t.a="@export ecgl.sdfSprite.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform float elapsedTime : 0;\n\nattribute vec3 position : POSITION;\n\n#ifdef VERTEX_SIZE\nattribute float size;\n#else\nuniform float u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_FillColor: COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute float prevSize;\nuniform float percent : 1.0;\n#endif\n\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvarying float v_Size;\n\nvoid main()\n{\n\n#ifdef POSITIONTEXTURE_ENABLED\n gl_Position = worldViewProjection * vec4(texture2D(positionTexture, position.xy).xy, -10.0, 1.0);\n#else\n\n #ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n #else\n vec3 pos = position;\n #endif\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n#endif\n\n#ifdef VERTEX_SIZE\n#ifdef VERTEX_ANIMATION\n v_Size = mix(prevSize, size, percent);\n#else\n v_Size = size;\n#endif\n#else\n v_Size = u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\n v_Color = a_FillColor;\n #endif\n\n gl_PointSize = v_Size;\n}\n\n@end\n\n@export ecgl.sdfSprite.fragment\n\nuniform vec4 color: [1, 1, 1, 1];\nuniform vec4 strokeColor: [1, 1, 1, 1];\nuniform float smoothing: 0.07;\n\nuniform float lineWidth: 0.0;\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\nvarying float v_Size;\n\nuniform sampler2D sprite;\n\n@import clay.util.srgb\n\nvoid main()\n{\n gl_FragColor = color;\n\n vec4 _strokeColor = strokeColor;\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n #endif\n\n#ifdef SPRITE_ENABLED\n float d = texture2D(sprite, gl_PointCoord).r;\n gl_FragColor.a *= smoothstep(0.5 - smoothing, 0.5 + smoothing, d);\n\n if (lineWidth > 0.0) {\n float sLineWidth = lineWidth / 2.0;\n\n float outlineMaxValue0 = 0.5 + sLineWidth;\n float outlineMaxValue1 = 0.5 + sLineWidth + smoothing;\n float outlineMinValue0 = 0.5 - sLineWidth - smoothing;\n float outlineMinValue1 = 0.5 - sLineWidth;\n\n if (d <= outlineMaxValue1 && d >= outlineMinValue0) {\n float a = _strokeColor.a;\n if (d <= outlineMinValue1) {\n a = a * smoothstep(outlineMinValue0, outlineMinValue1, d);\n }\n else {\n a = a * smoothstep(outlineMaxValue1, outlineMaxValue0, d);\n }\n gl_FragColor.rgb = mix(gl_FragColor.rgb * gl_FragColor.a, _strokeColor.rgb, a);\n gl_FragColor.a = gl_FragColor.a * (1.0 - a) + a;\n }\n }\n#endif\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(gl_FragColor);\n#endif\n}\n@end"},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=(r(221),r(222),r(225),r(16));i.a.registerVisual(Object(a.a)("lines3D")),i.a.registerAction({type:"lines3DPauseEffect",event:"lines3deffectpaused",update:"series.lines3D:pauseEffect"},(function(){})),i.a.registerAction({type:"lines3DResumeEffect",event:"lines3deffectresumed",update:"series.lines3D:resumeEffect"},(function(){})),i.a.registerAction({type:"lines3DToggleEffect",event:"lines3deffectchanged",update:"series.lines3D:toggleEffect"},(function(){}))},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(1),o=r.n(a),s=o.a.vec3,l=o.a.vec2,u=s.normalize,h=s.cross,c=s.sub,d=s.add,f=s.create,p=f(),m=f(),g=f(),_=f(),v=[],y=[];function x(e,t){l.copy(v,e[0]),l.copy(y,e[1]);var r=[],n=r[0]=f(),i=r[1]=f(),a=r[2]=f(),o=r[3]=f();t.dataToPoint(v,n),t.dataToPoint(y,o),u(p,n),c(m,o,n),u(m,m),h(g,m,p),u(g,g),h(m,p,g),d(i,p,m),u(i,i),u(p,o),c(m,n,o),u(m,m),h(g,m,p),u(g,g),h(m,p,g),d(a,p,m),u(a,a),d(_,n,o),u(_,_);var x=s.dot(n,_),T=s.dot(_,i),b=(Math.max(s.len(n),s.len(o))-x)/T*2;return s.scaleAndAdd(i,n,i,b),s.scaleAndAdd(a,o,a,b),r}function T(e,t){for(var r=new Float32Array(3*e.length),n=0,i=[],a=0;a0&&i[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(i)+". Lines must have 2d coords array in data item.");t.push(i)})),{coordsList:t}}function w(e,t,r){var n=e.getData(),i=e.get("polyline"),a=b(n);n.setLayout("lineType",i?"polyline":"cubicBezier"),n.each((function(e){var o=a.coordsList[e],l=i?T(o,t):function(e,t,r){var n=[],i=n[0]=s.create(),a=n[1]=s.create(),o=n[2]=s.create(),l=n[3]=s.create();t.dataToPoint(e[0],i),t.dataToPoint(e[1],l);var u=s.dist(i,l);return s.lerp(a,i,l,.3),s.lerp(o,i,l,.3),s.scaleAndAdd(a,a,r,Math.min(.1*u,10)),s.scaleAndAdd(o,o,r,Math.min(.1*u,10)),n}(o,t,r);n.setItemLayout(e,l)}))}i.a.registerLayout((function(e,t){e.eachSeriesByType("lines3D",(function(e){var t=e.coordinateSystem;"globe"===t.type?function(e,t){var r=e.getData(),n=e.get("polyline");r.setLayout("lineType",n?"polyline":"cubicBezier");var i=b(r);r.each((function(e){var a=i.coordsList[e],o=n?T:x;r.setItemLayout(e,o(a,t))}))}(e,t):"geo3D"===t.type?w(e,t,[0,1,0]):"mapbox3D"===t.type&&w(e,t,[0,0,1])}))}))},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(2),o=r(22),s=r(223),l=r(40);a.a.Shader.import(l.a),i.a.extendChartView({type:"lines3D",__ecgl__:!0,init:function(e,t){this.groupGL=new a.a.Node,this._meshLinesMaterial=new a.a.Material({shader:a.a.createShader("ecgl.meshLines3D"),transparent:!0,depthMask:!1}),this._linesMesh=new a.a.Mesh({geometry:new o.a,material:this._meshLinesMaterial,$ignorePicking:!0}),this._trailMesh=new s.a},render:function(e,t,r){this.groupGL.add(this._linesMesh);var n=e.coordinateSystem,i=e.getData();if(n&&n.viewGL){n.viewGL.add(this.groupGL),this._updateLines(e,t,r);var o=n.viewGL.isLinearSpace()?"define":"undefine";this._linesMesh.material[o]("fragment","SRGB_DECODE"),this._trailMesh.material[o]("fragment","SRGB_DECODE")}var s=this._trailMesh;if(s.stopAnimation(),e.get("effect.show")){this.groupGL.add(s),s.updateData(i,r,this._linesMesh.geometry),s.__time=s.__time||0;var l=36e5;this._curveEffectsAnimator=s.animate("",{loop:!0}).when(l,{__time:l}).during((function(){s.setAnimationTime(s.__time)})).start()}else this.groupGL.remove(s),this._curveEffectsAnimator=null;this._linesMesh.material.blend=this._trailMesh.material.blend="lighter"===e.get("blendMode")?a.a.additiveBlend:null},pauseEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.pause()},resumeEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.resume()},toggleEffect:function(){var e=this._curveEffectsAnimator;e&&(e.isPaused()?e.resume():e.pause())},_updateLines:function(e,t,r){var n=e.getData(),i=e.coordinateSystem,o=this._linesMesh.geometry,s=e.get("polyline");o.expandLine=!0;var l=function(e){return null!=e.radius?e.radius:null!=e.size?Math.max(e.size[0],e.size[1],e.size[2]):100}(i);o.segmentScale=l/20;var u="lineStyle.width".split("."),h=r.getDevicePixelRatio(),c=0;n.each((function(e){var t=n.getItemModel(e).get(u);null==t&&(t=1),n.setItemVisual(e,"lineWidth",t),c=Math.max(t,c)})),o.useNativeLine=!1;var d=0,f=0;n.each((function(e){var t=n.getItemLayout(e);s?(d+=o.getPolylineVertexCount(t),f+=o.getPolylineTriangleCount(t)):(d+=o.getCubicCurveVertexCount(t[0],t[1],t[2],t[3]),f+=o.getCubicCurveTriangleCount(t[0],t[1],t[2],t[3]))})),o.setVertexCount(d),o.setTriangleCount(f),o.resetOffset();var p=[];n.each((function(e){var t=n.getItemLayout(e),r=n.getItemVisual(e,"color"),i=n.getItemVisual(e,"opacity"),l=n.getItemVisual(e,"lineWidth")*h;null==i&&(i=1),(p=a.a.parseColor(r,p))[3]*=i,s?o.addPolyline(t,p,l):o.addCubicCurve(t[0],t[1],t[2],t[3],p,l)})),o.dirty()},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(e,t,r){"use strict";var n=r(0),i=(r.n(n),r(2)),a=r(1),o=r.n(a),s=r(22),l=r(224),u=o.a.vec3;i.a.Shader.import(l.a),t.a=i.a.Mesh.extend((function(){var e=new i.a.Material({shader:new i.a.Shader(i.a.Shader.source("ecgl.trail2.vertex"),i.a.Shader.source("ecgl.trail2.fragment")),transparent:!0,depthMask:!1}),t=new s.a({dynamic:!0});return t.createAttribute("dist","float",1),t.createAttribute("distAll","float",1),t.createAttribute("start","float",1),{geometry:t,material:e,culling:!1,$ignorePicking:!0}}),{updateData:function(e,t,r){var n=e.hostModel,a=this.geometry,o=n.getModel("effect"),s=o.get("trailWidth")*t.getDevicePixelRatio(),l=o.get("trailLength"),h=n.get("effect.constantSpeed"),c=1e3*n.get("effect.period"),d=null!=h;this.getScene()||console.error("TrailMesh must been add to scene before updateData"),d?this.material.set("speed",h/1e3):this.material.set("period",c),this.material[d?"define":"undefine"]("vertex","CONSTANT_SPEED");var f=n.get("polyline");a.trailLength=l,this.material.set("trailLength",l),a.resetOffset(),["position","positionPrev","positionNext"].forEach((function(e){a.attributes[e].value=r.attributes[e].value})),["dist","distAll","start","offset","color"].forEach((function(e){a.attributes[e].init(a.vertexCount)})),a.indices=r.indices;var p=[],m=o.get("trailColor"),g=o.get("trailOpacity"),_=null!=m,v=null!=g;this.updateWorldTransform();var y=this.worldTransform.x.len(),x=this.worldTransform.y.len(),T=this.worldTransform.z.len(),b=0,w=0;e.each((function(t){var n=e.getItemLayout(t),o=v?g:e.getItemVisual(t,"opacity"),l=e.getItemVisual(t,"color");null==o&&(o=1),(p=i.a.parseColor(_?m:l,p))[3]*=o;for(var h=f?r.getPolylineVertexCount(n):r.getCubicCurveVertexCount(n[0],n[1],n[2],n[3]),E=0,S=[],M=[],A=b;Ab&&(E+=u.dist(S,M)),a.attributes.dist.set(A,E),u.copy(M,S);w=Math.max(w,E);var C=Math.random()*(d?E:c);for(A=b;A0?1:-1)*s/2),a.attributes.color.set(A,p);b+=h})),this.material.set("spotSize",.1*w*l),this.material.set("spotIntensity",o.get("spotIntensity")),a.dirty()},setAnimationTime:function(e){this.material.set("time",e)}})},function(e,t,r){"use strict";t.a="@export ecgl.trail2.vertex\nattribute vec3 position: POSITION;\nattribute vec3 positionPrev;\nattribute vec3 positionNext;\nattribute float offset;\nattribute float dist;\nattribute float distAll;\nattribute float start;\n\nattribute vec4 a_Color : COLOR;\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\nuniform float near : NEAR;\n\nuniform float speed : 0;\nuniform float trailLength: 0.3;\nuniform float time;\nuniform float period: 1000;\n\nuniform float spotSize: 1;\n\nvarying vec4 v_Color;\nvarying float v_Percent;\nvarying float v_SpotPercent;\n\n@import ecgl.common.wireframe.vertexHeader\n\n@import ecgl.lines3D.clipNear\n\nvoid main()\n{\n @import ecgl.lines3D.expandLine\n\n gl_Position = currProj;\n\n v_Color = a_Color;\n\n @import ecgl.common.wireframe.vertexMain\n\n#ifdef CONSTANT_SPEED\n float t = mod((speed * time + start) / distAll, 1. + trailLength) - trailLength;\n#else\n float t = mod((time + start) / period, 1. + trailLength) - trailLength;\n#endif\n\n float trailLen = distAll * trailLength;\n\n v_Percent = (dist - t * distAll) / trailLen;\n\n v_SpotPercent = spotSize / distAll;\n\n }\n@end\n\n\n@export ecgl.trail2.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform float spotIntensity: 5;\n\nvarying vec4 v_Color;\nvarying float v_Percent;\nvarying float v_SpotPercent;\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n if (v_Percent > 1.0 || v_Percent < 0.0) {\n discard;\n }\n\n float fade = v_Percent;\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n\n if (v_Percent > (1.0 - v_SpotPercent)) {\n gl_FragColor.rgb *= spotIntensity;\n }\n\n gl_FragColor.a *= fade;\n}\n\n@end"},function(e,t,r){"use strict";var n=r(0),i=r.n(n);i.a.extendSeriesModel({type:"series.lines3D",dependencies:["globe"],visualColorAccessPath:"lineStyle.color",getInitialData:function(e,t){var r=new i.a.List(["value"],this);return r.hasItemOption=!1,r.initData(e.data,[],(function(e,t,n,i){if(e instanceof Array)return NaN;r.hasItemOption=!0;var a=e.value;return null!=a?a instanceof Array?a[i]:a:void 0})),r},defaultOption:{coordinateSystem:"globe",globeIndex:0,geo3DIndex:0,zlevel:-10,polyline:!1,effect:{show:!1,period:4,trailWidth:4,trailLength:.2,spotIntensity:6},silent:!0,blendMode:"source-over",lineStyle:{width:1,opacity:.5}}})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=(r(227),r(228),r(16));i.a.registerVisual(Object(a.a)("polygons3D"))},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(26);function o(e,t){for(var r=[],n=0;n0;this._updateSurfaceMesh(this._surfaceMesh,e,c,p);var m=this._surfaceMesh.material;p?(m.define("WIREFRAME_QUAD"),m.set("wireframeLineWidth",f),m.set("wireframeLineColor",a.a.parseColor(d.get("lineStyle.color")))):m.undefine("WIREFRAME_QUAD"),this._initHandler(e,r),this._updateAnimation(e)},_updateAnimation:function(e){a.a.updateVertexAnimation([["prevPosition","position"],["prevNormal","normal"]],this._prevSurfaceMesh,this._surfaceMesh,e)},_createSurfaceMesh:function(){var e=new a.a.Mesh({geometry:new a.a.Geometry({dynamic:!0,sortTriangles:!0}),shadowDepthMaterial:new a.a.Material({shader:new a.a.Shader(a.a.Shader.source("ecgl.sm.depth.vertex"),a.a.Shader.source("ecgl.sm.depth.fragment"))}),culling:!1,renderOrder:10,renderNormal:!0});return e.geometry.createAttribute("barycentric","float",4),e.geometry.createAttribute("prevPosition","float",3),e.geometry.createAttribute("prevNormal","float",3),i.a.util.extend(e.geometry,l.a),e},_initHandler:function(e,t){var r=e.getData(),n=this._surfaceMesh,i=e.coordinateSystem;n.seriesIndex=e.seriesIndex;var a=-1;n.off("mousemove"),n.off("mouseout"),n.on("mousemove",(function(e){var o=function(e,t){for(var r=1/0,i=-1,a=[],o=0;o=0){var s=[];n.geometry.attributes.position.get(o,s);for(var l=i.pointToData(s),h=1/0,c=-1,d=[],f=0;f65535?Uint32Array:Uint16Array)((g-1)*(_-1)*6),E=function(e,t,r){r[1]=e*_+t,r[0]=e*_+t+1,r[3]=(e+1)*_+t+1,r[2]=(e+1)*_+t},S=!1;if(h){var M=[],A=[],C=0;v?d.init(i.vertexCount):d.value=null;for(var L=[[],[],[]],N=[],D=[],I=u.create(),P=function(e,t,r){var n=3*t;return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r},O=new Float32Array(s.length),R=new Float32Array(s.length/3*4),F=0;F ")),a.value&&(h+=" : "+i.a.format.encodeHTML(a.value)),h}return s.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var e=(this.option.categories||[]).map((function(e){return null!=e.value?e:i.a.util.extend({value:0},e)})),t=new i.a.List(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e,!0)}))},setView:function(e){null!=e.zoom&&(this.option.zoom=e.zoom),null!=e.offset&&(this.option.offset=e.offset)},setNodePosition:function(e){for(var t=0;t "+_)),p++)}var v=i.a.helper.completeDimensions(["value"],e);(c=new i.a.List(v,r)).initData(e);var y=new i.a.List(["value"],r);return y.initData(f,d),a&&a(c,y),l()({mainData:c,struct:s,structAttr:"graph",datas:{node:c,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),s.update(),s}},function(e,t,r){r(85).__DEV__;var n=r(12),i=r(244).enableClassCheck;function a(e){return"_EC_"+e}var o=function(e){this._directed=e||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},s=o.prototype;function l(e,t){this.id=null==e?"":e,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==t?-1:t}function u(e,t,r){this.node1=e,this.node2=t,this.dataIndex=null==r?-1:r}s.type="graph",s.isDirected=function(){return this._directed},s.addNode=function(e,t){e=e||""+t;var r=this._nodesMap;if(!r[a(e)]){var n=new l(e,t);return n.hostGraph=this,this.nodes.push(n),r[a(e)]=n,n}},s.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},s.getNodeById=function(e){return this._nodesMap[a(e)]},s.addEdge=function(e,t,r){var n=this._nodesMap,i=this._edgesMap;if("number"==typeof e&&(e=this.nodes[e]),"number"==typeof t&&(t=this.nodes[t]),l.isInstance(e)||(e=n[a(e)]),l.isInstance(t)||(t=n[a(t)]),e&&t){var o=e.id+"-"+t.id;if(!i[o]){var s=new u(e,t,r);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}}},s.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},s.getEdge=function(e,t){l.isInstance(e)&&(e=e.id),l.isInstance(t)&&(t=t.id);var r=this._edgesMap;return this._directed?r[e+"-"+t]:r[e+"-"+t]||r[t+"-"+e]},s.eachNode=function(e,t){for(var r=this.nodes,n=r.length,i=0;i=0&&e.call(t,r[i],i)},s.eachEdge=function(e,t){for(var r=this.edges,n=r.length,i=0;i=0&&r[i].node1.dataIndex>=0&&r[i].node2.dataIndex>=0&&e.call(t,r[i],i)},s.breadthFirstTraverse=function(e,t,r,n){if(l.isInstance(t)||(t=this._nodesMap[a(t)]),t){for(var i="out"===r?"outEdges":"in"===r?"inEdges":"edges",o=0;o=0&&r.node2.dataIndex>=0})),i=0,a=n.length;i=0&&this[e][t].setItemVisual(this.dataIndex,r,n)},getVisual:function(r,n){return this[e][t].getItemVisual(this.dataIndex,r,n)},setLayout:function(r,n){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}};n.mixin(l,h("hostGraph","data")),n.mixin(u,h("hostGraph","edgeData")),o.Node=l,o.Edge=u,i(l),i(u);var c=o;e.exports=c},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){r(85).__DEV__;var n=r(12),i="___EC__COMPONENT__CONTAINER___";function a(e){var t={main:"",sub:""};return e&&(e=e.split("."),t.main=e[0]||"",t.sub=e[1]||""),t}var o=0;function s(e,t){var r=n.slice(arguments,2);return this.superClass.prototype[t].apply(e,r)}function l(e,t,r){return this.superClass.prototype[t].apply(e,r)}t.parseClassType=a,t.enableClassExtend=function(e,t){e.$constructor=e,e.extend=function(e){var t=this,r=function(){e.$constructor?e.$constructor.apply(this,arguments):t.apply(this,arguments)};return n.extend(r.prototype,e),r.extend=this.extend,r.superCall=s,r.superApply=l,n.inherits(r,this),r.superClass=t,r}},t.enableClassCheck=function(e){var t=["__\0is_clz",o++,Math.random().toFixed(3)].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}},t.enableClassManagement=function(e,t){t=t||{};var r={};if(e.registerClass=function(e,t){if(t)if(function(e){n.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}(t),(t=a(t)).sub){if(t.sub!==i){var o=function(e){var t=r[e.main];return t&&t[i]||((t=r[e.main]={})[i]=!0),t}(t);o[t.sub]=e}}else r[t.main]=e;return e},e.getClass=function(e,t,n){var a=r[e];if(a&&a[i]&&(a=t?a[t]:null),n&&!a)throw new Error(t?"Component "+e+"."+(t||"")+" not exists. Load it first.":e+".type should be specified.");return a},e.getClassesByMainType=function(e){e=a(e);var t=[],o=r[e.main];return o&&o[i]?n.each(o,(function(e,r){r!==i&&t.push(e)})):t.push(o),t},e.hasClass=function(e){return e=a(e),!!r[e.main]},e.getAllClassMainTypes=function(){var e=[];return n.each(r,(function(t,r){e.push(r)})),e},e.hasSubTypes=function(e){e=a(e);var t=r[e.main];return t&&t[i]},e.parseClassType=a,t.registerWhenExtend){var o=e.extend;o&&(e.extend=function(t){var r=o.call(this,t);return e.registerClass(r,t.type)})}return e},t.setReadOnly=function(e,t){}},function(e,t,r){var n=r(12),i=n.each,a="\0__link_datas",o="\0__link_mainData";function s(e,t){if((i=this)[o]===i){var r=n.extend({},this[a]);r[this.dataType]=t,c(t,r,e)}else d(t,this.dataType,this[o],e);var i;return t}function l(e,t){return e.struct&&e.struct.update(this),t}function u(e,t){return i(t[a],(function(r,n){r!==t&&d(r.cloneShallow(),n,t,e)})),t}function h(e){var t=this[o];return null==e||null==t?t:t[a][e]}function c(e,t,r){e[a]={},i(t,(function(t,n){d(t,n,e,r)}))}function d(e,t,r,n){r[a][t]=e,e[o]=r,e.dataType=t,n.struct&&(e[n.structAttr]=n.struct,n.struct[n.datasAttr[t]]=e),e.getLinkedData=h}var f=function(e){var t=e.mainData,r=e.datas;r||(r={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,c(t,r,e),i(r,(function(r){i(t.TRANSFERABLE_METHODS,(function(t){r.wrapMethod(t,n.curry(s,e))}))})),t.wrapMethod("cloneShallow",n.curry(u,e)),i(t.CHANGABLE_METHODS,(function(r){t.wrapMethod(r,n.curry(l,e))})),n.assert(r[t.dataType]===t)};e.exports=f},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(41),o=r.n(a),s=r(2),l=r(20),u=r(86),h=r(3),c=r(247),d=r(249),f=r(65),p=r.n(f),m=r(1),g=r.n(m),_=r(251),v=r(62),y=r(252),x=g.a.vec2;s.a.Shader.import(y.a);var T,b=1;i.a.extendChartView({type:"graphGL",__ecgl__:!0,init:function(e,t){this.groupGL=new s.a.Node,this.viewGL=new l.a("orthographic"),this.viewGL.camera.left=this.viewGL.camera.right=0,this.viewGL.add(this.groupGL),this._pointsBuilder=new v.a(!0,t),this._forceEdgesMesh=new s.a.Mesh({material:new s.a.Material({shader:s.a.createShader("ecgl.forceAtlas2.edges"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new s.a.Geometry({attributes:{node:new s.a.Geometry.Attribute("node","float",2),color:new s.a.Geometry.Attribute("color","float",4,"COLOR")},dynamic:!0,mainAttribute:"node"}),renderOrder:-1,mode:s.a.Mesh.LINES}),this._edgesMesh=new s.a.Mesh({material:new s.a.Material({shader:s.a.createShader("ecgl.meshLines2D"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new u.a({useNativeLine:!1,dynamic:!0}),renderOrder:-1,culling:!1}),this._layoutId=0,this._control=new _.a({zr:t.getZr(),viewGL:this.viewGL}),this._control.setTarget(this.groupGL),this._control.init(),this._clickHandler=this._clickHandler.bind(this)},render:function(e,t,r){this.groupGL.add(this._pointsBuilder.rootNode),this._model=e,this._api=r,this._initLayout(e,t,r),this._pointsBuilder.update(e,t,r),this._forceLayoutInstance instanceof c.a||this.groupGL.remove(this._forceEdgesMesh),this._updateCamera(e,r),this._control.off("update"),this._control.on("update",(function(){r.dispatchAction({type:"graphGLRoam",seriesId:e.id,zoom:this._control.getZoom(),offset:this._control.getOffset()}),this._pointsBuilder.updateView(this.viewGL.camera)}),this),this._control.setZoom(h.a.firstNotNull(e.get("zoom"),1)),this._control.setOffset(e.get("offset")||[0,0]);var n=this._pointsBuilder.getPointsMesh();if(n.off("mousemove",this._mousemoveHandler),n.off("mouseout",this._mouseOutHandler,this),r.getZr().off("click",this._clickHandler),this._pointsBuilder.highlightOnMouseover=!0,e.get("focusNodeAdjacency")){var i=e.get("focusNodeAdjacencyOn");"click"===i?r.getZr().on("click",this._clickHandler):"mouseover"===i?(n.on("mousemove",this._mousemoveHandler,this),n.on("mouseout",this._mouseOutHandler,this),this._pointsBuilder.highlightOnMouseover=!1):console.warn("Unkown focusNodeAdjacencyOn value s"+i)}this._lastMouseOverDataIndex=-1},_clickHandler:function(e){if(!this._layouting){var t=this._pointsBuilder.getPointsMesh().dataIndex;t>=0?this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:t}):this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id})}},_mousemoveHandler:function(e){if(!this._layouting){var t=this._pointsBuilder.getPointsMesh().dataIndex;t>=0?t!==this._lastMouseOverDataIndex&&this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:t}):this._mouseOutHandler(e),this._lastMouseOverDataIndex=t}},_mouseOutHandler:function(e){this._layouting||(this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id}),this._lastMouseOverDataIndex=-1)},_updateForceEdgesGeometry:function(e,t){var r=this._forceEdgesMesh.geometry,n=t.getEdgeData(),i=0,a=this._forceLayoutInstance,o=2*n.count();r.attributes.node.init(o),r.attributes.color.init(o),n.each((function(t){var o=e[t];r.attributes.node.set(i,a.getNodeUV(o.node1)),r.attributes.node.set(i+1,a.getNodeUV(o.node2));var l=n.getItemVisual(o.dataIndex,"color"),u=s.a.parseColor(l);u[3]*=h.a.firstNotNull(n.getItemVisual(o.dataIndex,"opacity"),1),r.attributes.color.set(i,u),r.attributes.color.set(i+1,u),i+=2})),r.dirty()},_updateMeshLinesGeometry:function(){var e=this._model.getEdgeData(),t=this._edgesMesh.geometry,r=(e=this._model.getEdgeData(),this._model.getData().getLayout("points"));t.resetOffset(),t.setVertexCount(e.count()*t.getLineVertexCount()),t.setTriangleCount(e.count()*t.getLineTriangleCount());var n=[],i=[],a=["lineStyle","width"];this._originalEdgeColors=new Float32Array(4*e.count()),this._edgeIndicesMap=new Float32Array(e.count()),e.each((function(o){var l=e.graph.getEdgeByIndex(o),u=2*l.node1.dataIndex,c=2*l.node2.dataIndex;n[0]=r[u],n[1]=r[u+1],i[0]=r[c],i[1]=r[c+1];var d=e.getItemVisual(l.dataIndex,"color"),f=s.a.parseColor(d);f[3]*=h.a.firstNotNull(e.getItemVisual(l.dataIndex,"opacity"),1);var p=e.getItemModel(l.dataIndex),m=h.a.firstNotNull(p.get(a),1)*this._api.getDevicePixelRatio();t.addLine(n,i,f,m);for(var g=0;g<4;g++)this._originalEdgeColors[4*l.dataIndex+g]=f[g];this._edgeIndicesMap[l.dataIndex]=o}),!1,this),t.dirty()},_updateForceNodesGeometry:function(e){for(var t=this._pointsBuilder.getPointsMesh(),r=[],n=0;n=f&&(l._syncNodePosition(e),d=0),r.getZr().refresh(),p()((function(){m(t)}))}))};p()((function(){l._forceLayoutInstanceToDispose&&(l._forceLayoutInstanceToDispose.dispose(i.layer.renderer),l._forceLayoutInstanceToDispose=null),m(u)})),this._layouting=!0}}else console.error("None layout don't have startLayout action")}},stopLayout:function(e,t,r,n){n&&null!=n.from&&n.from!==this.uid||(this._layoutId=0,this.groupGL.remove(this._forceEdgesMesh),this.groupGL.add(this._edgesMesh),this._forceLayoutInstance&&this.viewGL.layer&&(n&&n.beforeLayout||(this._syncNodePosition(e),this._updateAfterLayout(e,t,r)),this._api.getZr().refresh(),this._layouting=!1))},_syncNodePosition:function(e){var t=this._forceLayoutInstance.getNodePosition(this.viewGL.layer.renderer);e.getData().setLayout("points",t),e.setNodePosition(t)},_updateAfterLayout:function(e,t,r){this._updateMeshLinesGeometry(),this._pointsBuilder.removePositionTexture(),this._pointsBuilder.updateLayout(e,t,r),this._pointsBuilder.updateView(this.viewGL.camera),this._pointsBuilder.updateLabels(),this._pointsBuilder.showLabels()},focusNodeAdjacency:function(e,t,r,n){var i=this._model.getData();this._downplayAll();var a=n.dataIndex,o=i.graph,s=[],l=o.getNodeByIndex(a);s.push(l),l.edges.forEach((function(e){e.dataIndex<0||(e.node1!==l&&s.push(e.node1),e.node2!==l&&s.push(e.node2))}),this),this._pointsBuilder.fadeOutAll(.05),this._fadeOutEdgesAll(.05),s.forEach((function(e){this._pointsBuilder.highlight(i,e.dataIndex)}),this),this._pointsBuilder.updateLabels(s.map((function(e){return e.dataIndex})));var u=[];l.edges.forEach((function(e){e.dataIndex>=0&&(this._highlightEdge(e.dataIndex),u.push(e))}),this),this._focusNodes=s,this._focusEdges=u},unfocusNodeAdjacency:function(e,t,r,n){this._downplayAll(),this._pointsBuilder.fadeInAll(),this._fadeInEdgesAll(),this._pointsBuilder.updateLabels()},_highlightEdge:function(e){var t=this._model.getEdgeData().getItemModel(e),r=s.a.parseColor(t.get("emphasis.lineStyle.color")||t.get("lineStyle.color")),n=h.a.firstNotNull(t.get("emphasis.lineStyle.opacity"),t.get("lineStyle.opacity"),1);r[3]*=n,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[e],r)},_downplayAll:function(){this._focusNodes&&this._focusNodes.forEach((function(e){this._pointsBuilder.downplay(this._model.getData(),e.dataIndex)}),this),this._focusEdges&&this._focusEdges.forEach((function(e){this._downplayEdge(e.dataIndex)}),this)},_downplayEdge:function(e){var t=this._getColor(e,[]);this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[e],t)},_setEdgeFade:(T=[],function(e,t){this._getColor(e,T),T[3]*=t,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[e],T)}),_getColor:function(e,t){for(var r=0;r<4;r++)t[r]=this._originalEdgeColors[4*e+r];return t},_fadeOutEdgesAll:function(e){this._model.getData().graph.eachEdge((function(t){this._setEdgeFade(t.dataIndex,e)}),this)},_fadeInEdgesAll:function(){this._fadeOutEdgesAll(1)},_updateCamera:function(e,t){this.viewGL.setViewport(0,0,t.getWidth(),t.getHeight(),t.getDevicePixelRatio());for(var r=this.viewGL.camera,n=e.getData().getLayout("points"),i=x.create(1/0,1/0),a=x.create(-1/0,-1/0),o=[],s=0;sr.left&&ur.top)){var h=Math.max(a[0]-i[0],10),c=h/t.getWidth()*t.getHeight();h*=1.4,c*=1.4,i[0]-=.2*h,r.left=i[0],r.top=l-c/2,r.bottom=l+c/2,r.right=h+i[0],r.near=0,r.far=100}},dispose:function(){var e=this.viewGL.layer.renderer;this._forceLayoutInstance&&this._forceLayoutInstance.dispose(e),this.groupGL.removeAll(),this._layoutId=-1},remove:function(){this.groupGL.removeAll(),this._control.dispose()}})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(2),o=r(14),s=r(10),l=r(248);a.a.Shader.import(l.a);var u={repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null};function h(e){var t={type:a.a.Texture.FLOAT,minFilter:a.a.Texture.NEAREST,magFilter:a.a.Texture.NEAREST};this._positionSourceTex=new a.a.Texture2D(t),this._positionSourceTex.flipY=!1,this._positionTex=new a.a.Texture2D(t),this._positionPrevTex=new a.a.Texture2D(t),this._forceTex=new a.a.Texture2D(t),this._forcePrevTex=new a.a.Texture2D(t),this._weightedSumTex=new a.a.Texture2D(t),this._weightedSumTex.width=this._weightedSumTex.height=1,this._globalSpeedTex=new a.a.Texture2D(t),this._globalSpeedPrevTex=new a.a.Texture2D(t),this._globalSpeedTex.width=this._globalSpeedTex.height=1,this._globalSpeedPrevTex.width=this._globalSpeedPrevTex.height=1,this._nodeRepulsionPass=new o.a({fragment:a.a.Shader.source("ecgl.forceAtlas2.updateNodeRepulsion")}),this._positionPass=new o.a({fragment:a.a.Shader.source("ecgl.forceAtlas2.updatePosition")}),this._globalSpeedPass=new o.a({fragment:a.a.Shader.source("ecgl.forceAtlas2.calcGlobalSpeed")}),this._copyPass=new o.a({fragment:a.a.Shader.source("clay.compositor.output")});var r=function(e){e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ONE)};this._edgeForceMesh=new a.a.Mesh({geometry:new a.a.Geometry({attributes:{node1:new a.a.Geometry.Attribute("node1","float",2),node2:new a.a.Geometry.Attribute("node2","float",2),weight:new a.a.Geometry.Attribute("weight","float",1)},dynamic:!0,mainAttribute:"node1"}),material:new a.a.Material({transparent:!0,shader:a.a.createShader("ecgl.forceAtlas2.updateEdgeAttraction"),blend:r,depthMask:!1,depthText:!1}),mode:a.a.Mesh.POINTS}),this._weightedSumMesh=new a.a.Mesh({geometry:new a.a.Geometry({attributes:{node:new a.a.Geometry.Attribute("node","float",2)},dynamic:!0,mainAttribute:"node"}),material:new a.a.Material({transparent:!0,shader:a.a.createShader("ecgl.forceAtlas2.calcWeightedSum"),blend:r,depthMask:!1,depthText:!1}),mode:a.a.Mesh.POINTS}),this._framebuffer=new s.a({depthBuffer:!1}),this._dummyCamera=new a.a.OrthographicCamera({left:-1,right:1,top:1,bottom:-1,near:0,far:100}),this._globalSpeed=0}h.prototype.updateOption=function(e){for(var t in u)this[t]=u[t];var r=this._nodes.length;if(this.jitterTolerence=r>5e4?10:r>5e3?1:.1,this.scaling=r>100?2:10,e)for(var t in u)null!=e[t]&&(this[t]=e[t]);if(this.repulsionByDegree)for(var n=this._positionSourceTex.pixels,i=0;ie},h.prototype._swapTexture=function(){var e=this._positionPrevTex;this._positionPrevTex=this._positionTex,this._positionTex=e,e=this._forcePrevTex,this._forcePrevTex=this._forceTex,this._forceTex=e,e=this._globalSpeedPrevTex,this._globalSpeedPrevTex=this._globalSpeedTex,this._globalSpeedTex=e},h.prototype._initFromSource=function(e){this._framebuffer.attach(this._positionPrevTex),this._framebuffer.bind(e),this._copyPass.setUniform("texture",this._positionSourceTex),this._copyPass.render(e),e.gl.clearColor(0,0,0,0),this._framebuffer.attach(this._forcePrevTex),e.gl.clear(e.gl.COLOR_BUFFER_BIT),this._framebuffer.attach(this._globalSpeedPrevTex),e.gl.clear(e.gl.COLOR_BUFFER_BIT),this._framebuffer.unbind(e)},h.prototype._resize=function(e,t){["_positionSourceTex","_positionTex","_positionPrevTex","_forceTex","_forcePrevTex"].forEach((function(r){this[r].width=e,this[r].height=t,this[r].dirty()}),this)},h.prototype.dispose=function(e){this._framebuffer.dispose(e),this._copyPass.dispose(e),this._nodeRepulsionPass.dispose(e),this._positionPass.dispose(e),this._globalSpeedPass.dispose(e),this._edgeForceMesh.geometry.dispose(e),this._weightedSumMesh.geometry.dispose(e),this._positionSourceTex.dispose(e),this._positionTex.dispose(e),this._positionPrevTex.dispose(e),this._forceTex.dispose(e),this._forcePrevTex.dispose(e),this._weightedSumTex.dispose(e),this._globalSpeedTex.dispose(e),this._globalSpeedPrevTex.dispose(e)},i.a.ForceAtlas2GPU=h,t.a=h},function(e,t,r){"use strict";t.a="@export ecgl.forceAtlas2.updateNodeRepulsion\n\n#define NODE_COUNT 0\n\nuniform sampler2D positionTex;\n\nuniform vec2 textureSize;\nuniform float gravity;\nuniform float scaling;\nuniform vec2 gravityCenter;\n\nuniform bool strongGravityMode;\nuniform bool preventOverlap;\n\nvarying vec2 v_Texcoord;\n\nvoid main() {\n\n vec4 n0 = texture2D(positionTex, v_Texcoord);\n\n vec2 force = vec2(0.0);\n for (int i = 0; i < NODE_COUNT; i++) {\n vec2 uv = vec2(\n mod(float(i), textureSize.x) / (textureSize.x - 1.0),\n floor(float(i) / textureSize.x) / (textureSize.y - 1.0)\n );\n vec4 n1 = texture2D(positionTex, uv);\n\n vec2 dir = n0.xy - n1.xy;\n float d2 = dot(dir, dir);\n\n if (d2 > 0.0) {\n float factor = 0.0;\n if (preventOverlap) {\n float d = sqrt(d2);\n d = d - n0.w - n1.w;\n if (d > 0.0) {\n factor = scaling * n0.z * n1.z / (d * d);\n }\n else if (d < 0.0) {\n factor = scaling * 100.0 * n0.z * n1.z;\n }\n }\n else {\n factor = scaling * n0.z * n1.z / d2;\n }\n force += dir * factor;\n }\n }\n\n vec2 dir = gravityCenter - n0.xy;\n float d = 1.0;\n if (!strongGravityMode) {\n d = length(dir);\n }\n\n force += dir * n0.z * gravity / (d + 1.0);\n\n gl_FragColor = vec4(force, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.vertex\n\nattribute vec2 node1;\nattribute vec2 node2;\nattribute float weight;\n\nuniform sampler2D positionTex;\nuniform float edgeWeightInfluence;\nuniform bool preventOverlap;\nuniform bool linLogMode;\n\nuniform vec2 windowSize: WINDOW_SIZE;\n\nvarying vec2 v_Force;\n\nvoid main() {\n\n vec4 n0 = texture2D(positionTex, node1);\n vec4 n1 = texture2D(positionTex, node2);\n\n vec2 dir = n1.xy - n0.xy;\n float d = length(dir);\n float w;\n if (edgeWeightInfluence == 0.0) {\n w = 1.0;\n }\n else if (edgeWeightInfluence == 1.0) {\n w = weight;\n }\n else {\n w = pow(weight, edgeWeightInfluence);\n }\n vec2 offset = vec2(1.0 / windowSize.x, 1.0 / windowSize.y);\n vec2 scale = vec2((windowSize.x - 1.0) / windowSize.x, (windowSize.y - 1.0) / windowSize.y);\n vec2 pos = node1 * scale * 2.0 - 1.0;\n gl_Position = vec4(pos + offset, 0.0, 1.0);\n gl_PointSize = 1.0;\n\n float factor;\n if (preventOverlap) {\n d = d - n1.w - n0.w;\n }\n if (d <= 0.0) {\n v_Force = vec2(0.0);\n return;\n }\n\n if (linLogMode) {\n factor = w * log(d) / d;\n }\n else {\n factor = w;\n }\n v_Force = dir * factor;\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.fragment\n\nvarying vec2 v_Force;\n\nvoid main() {\n gl_FragColor = vec4(v_Force, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.vertex\n\nattribute vec2 node;\n\nvarying vec2 v_NodeUv;\n\nvoid main() {\n\n v_NodeUv = node;\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n gl_PointSize = 1.0;\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.fragment\n\nvarying vec2 v_NodeUv;\n\nuniform sampler2D positionTex;\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_NodeUv).rg;\n vec2 forcePrev = texture2D(forcePrevTex, v_NodeUv).rg;\n\n float mass = texture2D(positionTex, v_NodeUv).z;\n float swing = length(force - forcePrev) * mass;\n float traction = length(force + forcePrev) * 0.5 * mass;\n\n gl_FragColor = vec4(swing, traction, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcGlobalSpeed\n\nuniform sampler2D globalSpeedPrevTex;\nuniform sampler2D weightedSumTex;\nuniform float jitterTolerence;\n\nvoid main() {\n vec2 weightedSum = texture2D(weightedSumTex, vec2(0.5)).xy;\n float prevGlobalSpeed = texture2D(globalSpeedPrevTex, vec2(0.5)).x;\n float globalSpeed = jitterTolerence * jitterTolerence\n * weightedSum.y / weightedSum.x;\n if (prevGlobalSpeed > 0.0) {\n globalSpeed = min(globalSpeed / prevGlobalSpeed, 1.5) * prevGlobalSpeed;\n }\n gl_FragColor = vec4(globalSpeed, 0.0, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updatePosition\n\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\nuniform sampler2D positionTex;\nuniform sampler2D globalSpeedTex;\n\nvarying vec2 v_Texcoord;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_Texcoord).xy;\n vec2 forcePrev = texture2D(forcePrevTex, v_Texcoord).xy;\n vec4 node = texture2D(positionTex, v_Texcoord);\n\n float globalSpeed = texture2D(globalSpeedTex, vec2(0.5)).r;\n float swing = length(force - forcePrev);\n float speed = 0.1 * globalSpeed / (0.1 + globalSpeed * sqrt(swing));\n\n float df = length(force);\n if (df > 0.0) {\n speed = min(df * speed, 10.0) / df;\n\n gl_FragColor = vec4(node.xy + speed * force, node.zw);\n }\n else {\n gl_FragColor = node;\n }\n}\n@end\n\n@export ecgl.forceAtlas2.edges.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 node;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\nuniform sampler2D positionTex;\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(\n texture2D(positionTex, node).xy, -10.0, 1.0\n );\n v_Color = a_Color;\n}\n@end\n\n@export ecgl.forceAtlas2.edges.fragment\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nvarying vec4 v_Color;\nvoid main() {\n gl_FragColor = color * v_Color;\n}\n@end"},function(e,t,r){"use strict";var n=r(5),i=r(6),a=r(250).a.toString();a=a.slice(a.indexOf("{")+1,a.lastIndexOf("}"));var o={barnesHutOptimize:!0,barnesHutTheta:1.5,repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null},s=function(e){for(var t in o)this[t]=o[t];if(e)for(var t in e)this[t]=e[t];this._nodes=[],this._edges=[],this._disposed=!1,this._positionTex=new n.a({type:i.a.FLOAT,flipY:!1,minFilter:i.a.NEAREST,magFilter:i.a.NEAREST})};s.prototype.initData=function(e,t){var r=new Blob([a]),n=window.URL.createObjectURL(r);this._worker=new Worker(n),this._worker.onmessage=this._$onupdate.bind(this),this._nodes=e,this._edges=t,this._frame=0;for(var i=e.length,o=t.length,s=new Float32Array(2*i),l=new Float32Array(i),u=new Float32Array(i),h=new Float32Array(2*o),c=new Float32Array(o),d=0;d5e4?10:a>5e3?1:.1,t.scaling=a>100?2:10,t.barnesHutOptimize=a>1e3,e)for(var r in o)null!=e[r]&&(t[r]=e[r]);if(!t.gravityCenter){for(var s=[1/0,1/0],l=[-1/0,-1/0],u=0;ue},s.prototype.getNodePosition=function(e,t){if(t||(t=new Float32Array(2*this._nodes.length)),this._positionArr)for(var r=0;r=e&&this.bbox[1]<=t&&this.bbox[3]>=t},u.setBBox=function(e,t,r,n){this.bbox[0]=e,this.bbox[1]=t,this.bbox[2]=r,this.bbox[3]=n,this.size=(r-e+n-t)/2},u._newSubRegion=function(){var e=this.subRegions[this.nSubRegions];return e||(e=new l,this.subRegions[this.nSubRegions]=e),this.nSubRegions++,e},u._addNodeToSubRegion=function(e){var t=this.findSubRegion(e.position[0],e.position[1]),r=this.bbox;if(!t){var n=(r[0]+r[2])/2,i=(r[1]+r[3])/2,a=(r[2]-r[0])/2,o=(r[3]-r[1])/2,s=e.position[0]>=n?1:0,l=e.position[1]>=i?1:0;(t=this._newSubRegion()).setBBox(s*a+r[0],l*o+r[1],(s+1)*a+r[0],(l+1)*o+r[1])}t.addNode(e)},u._updateCenterOfMass=function(e){null==this.centerOfMass&&(this.centerOfMass=new Float32Array(2));var t=this.centerOfMass[0]*this.mass,r=this.centerOfMass[1]*this.mass;t+=e.position[0]*e.mass,r+=e.position[1]*e.mass,this.mass+=e.mass,this.centerOfMass[0]=t/this.mass,this.centerOfMass[1]=r/this.mass};var f,p=d.prototype;p.initNodes=function(e,t,r){var n=t.length;this.nodes.length=0;for(var i=void 0!==r,a=0;a0&&(this.strongGravityMode?this.applyNodeStrongGravity(h):this.applyNodeGravity(h))}for(l=0;l0&&(g=Math.min(g/this._globalSpeed,1.5)*this._globalSpeed),this._globalSpeed=g,l=0;l0&&(v=Math.min(y*v,10)/y,n(u.position,u.position,u.force,v))}},p.applyRegionToNodeRepulsion=(f=e(),function(e,t){if(e.node)this.applyNodeToNodeRepulsion(e.node,t,!0);else{a(f,t.position,e.centerOfMass);var r=f[0]*f[0]+f[1]*f[1];if(r>this.barnesHutTheta*e.size*e.size){var i=this.scaling*t.mass*e.mass/r;n(t.force,t.force,f,i)}else for(var o=0;o0)s=this.scaling*e.mass*r.mass/(l*l);else{if(!(l<0))return;s=100*this.scaling*e.mass*r.mass}}else s=this.scaling*e.mass*r.mass/o;n(e.force,e.force,t,s),n(r.force,r.force,t,-s)}}}}(),p.applyEdgeAttraction=function(){var t=e();return function(e){var i=e.source,o=e.target;a(t,i.position,o.position);var s,l,u=r(t);s=0===this.edgeWeightInfluence?1:1===this.edgeWeightInfluence?e.weight:Math.pow(e.weight,this.edgeWeightInfluence),this.preventOverlap&&(u=u-i.size-o.size)<=0||(l=this.linLogMode?-s*Math.log(u+1)/(u+1):-s,n(i.force,i.force,t,l),n(o.force,o.force,t,-l))}}(),p.applyNodeGravity=function(){var t=e();return function(e){a(t,this.gravityCenter,e.position);var i=r(t);n(e.force,e.force,t,this.gravity*e.mass/(i+1))}}(),p.applyNodeStrongGravity=function(){var t=e();return function(e){a(t,this.gravityCenter,e.position),n(e.force,e.force,t,this.gravity*e.mass)}}(),p.updateBBox=function(){for(var e=1/0,t=1/0,r=-1/0,n=-1/0,i=0;i0?1.1:.9,a=Math.max(Math.min(this._zoom*i,this.maxZoom),this.minZoom);i=a/this._zoom;var o=this._convertPos(r,n),s=(o.x-this._dx)*(i-1),l=(o.y-this._dy)*(i-1);this._dx-=s,this._dy-=l,this._zoom=a,this._needsUpdate=!0}}},dispose:function(){var e=this.zr;e.off("mousedown",this._mouseDownHandler),e.off("mousemove",this._mouseMoveHandler),e.off("mouseup",this._mouseUpHandler),e.off("mousewheel",this._mouseWheelHandler),e.off("globalout",this._mouseUpHandler),e.animation.off("frame",this._update)}}));t.a=i},function(e,t,r){"use strict";t.a="@export ecgl.lines2D.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 position: POSITION;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n v_Color = a_Color;\n}\n\n@end\n\n@export ecgl.lines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.vertex\n\nattribute vec2 position: POSITION;\nattribute vec2 normal;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n vec4 p2 = worldViewProjection * vec4(position + normal, -10.0, 1.0);\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n p2.xy /= p2.w;\n gl_Position.xy /= gl_Position.w;\n\n vec2 N = normalize(p2.xy - gl_Position.xy);\n gl_Position.xy += N * offset / viewport.zw * 2.0;\n\n gl_Position.xy *= gl_Position.w;\n\n v_Color = a_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n\n@end"},function(e,t,r){"use strict";var n=r(0);r.n(n),r(254),r(258)},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(2),o=r(3),s=r(20),l=r(255);i.a.extendChartView({type:"flowGL",__ecgl__:!0,init:function(e,t){this.viewGL=new s.a("orthographic"),this.groupGL=new a.a.Node,this.viewGL.add(this.groupGL),this._particleSurface=new l.a;var r=new a.a.Mesh({geometry:new a.a.PlaneGeometry,material:new a.a.Material({shader:new a.a.Shader({vertex:a.a.Shader.source("ecgl.color.vertex"),fragment:a.a.Shader.source("ecgl.color.fragment")}),transparent:!0})});r.material.enableTexture("diffuseMap"),this.groupGL.add(r),this._planeMesh=r},render:function(e,t,r){var n=this._particleSurface;n.setParticleType(e.get("particleType")),n.setSupersampling(e.get("supersampling")),this._updateData(e,r),this._updateCamera(r.getWidth(),r.getHeight(),r.getDevicePixelRatio());var i=o.a.firstNotNull(e.get("particleDensity"),128);n.setParticleDensity(i,i);var s=this._planeMesh,l=+new Date,u=this,h=!0;s.__percent=0,s.stopAnimation(),s.animate("",{loop:!0}).when(1e5,{__percent:1}).during((function(){var e=+new Date,t=Math.min(e-l,20);l+=t,u._renderer&&(n.update(u._renderer,r,t/1e3,h),s.material.set("diffuseMap",n.getSurfaceTexture())),h=!1})).start();var c=e.getModel("itemStyle"),d=a.a.parseColor(c.get("color"));d[3]*=o.a.firstNotNull(c.get("opacity"),1),s.material.set("color",d),n.setColorTextureImage(e.get("colorTexture"),r),n.setParticleSize(e.get("particleSize")),n.particleSpeedScaling=e.get("particleSpeed"),n.motionBlurFactor=1-Math.pow(.1,e.get("particleTrail"))},updateTransform:function(e,t,r){this._updateData(e,r)},afterRender:function(e,t,r,n){var i=n.renderer;this._renderer=i},_updateData:function(e,t){var r=e.coordinateSystem,n=r.dimensions.map((function(t){return e.coordDimToDataDim(t)[0]})),i=e.getData(),a=i.getDataExtent(n[0]),o=i.getDataExtent(n[1]),s=e.get("gridWidth"),l=e.get("gridHeight");if(null==s||"auto"===s){var u=(a[1]-a[0])/(o[1]-o[0]);s=Math.round(Math.sqrt(u*i.count()))}null!=l&&"auto"!==l||(l=Math.ceil(i.count()/s));var h=this._particleSurface.vectorFieldTexture,c=h.pixels;if(c&&c.length===l*s*4)for(var d=0;d=359&&(i[0]>0&&(i[0]=0),a[0]0?e[e.length-1]:this._lastFrameTexture},setRegion:function(e){this._particlePass.setUniform("region",e)},resize:function(e,t){this._lastFrameTexture.width=e*this._supersampling,this._lastFrameTexture.height=t*this._supersampling,this._thisFrameTexture.width=e*this._supersampling,this._thisFrameTexture.height=t*this._supersampling,this._width=e,this._height=t},setParticleSize:function(e){var t=this._getParticleMesh();if(e<=2)return t.material.disableTexture("spriteTexture"),void(t.material.transparent=!1);this._spriteTexture||(this._spriteTexture=new l.a),this._spriteTexture.image&&this._spriteTexture.image.width===e||(this._spriteTexture.image=function(e){var t=document.createElement("canvas");t.width=t.height=e;var r=t.getContext("2d");return r.fillStyle="#fff",r.arc(e/2,e/2,e/2,0,2*Math.PI),r.fill(),t}(e),this._spriteTexture.dirty()),t.material.transparent=!0,t.material.enableTexture("spriteTexture"),t.material.set("spriteTexture",this._spriteTexture),this._particleSize=e},setGradientTexture:function(e){var t=this._getParticleMesh().material;t[e?"enableTexture":"disableTexture"]("gradientTexture"),t.setUniform("gradientTexture",e)},setColorTextureImage:function(e,t){this._getParticleMesh().material.setTextureImage("colorTexture",e,t,{flipY:!0})},setParticleType:function(e){this._particleType=e},clearFrame:function(e){var t=this._frameBuffer;t.attach(this._lastFrameTexture),t.bind(e),e.gl.clear(e.gl.DEPTH_BUFFER_BIT|e.gl.COLOR_BUFFER_BIT),t.unbind(e)},setSupersampling:function(e){this._supersampling=e,this.resize(this._width,this._height)},_updateDownsampleTextures:function(e,t){for(var r=this._downsampleTextures,n=Math.max(Math.floor(Math.log(this._supersampling/t.getDevicePixelRatio())/Math.log(2)),0),i=2,a=this._width*this._supersampling,o=this._height*this._supersampling,s=0;s65535?new Uint32Array(3*n):new Uint16Array(3*n))},addLine:function(e){var t=this._vertexOffset;this.attributes.position.set(t,[e[0],e[1],1]),this.attributes.position.set(t+1,[e[0],e[1],-1]),this.attributes.position.set(t+2,[e[0],e[1],2]),this.attributes.position.set(t+3,[e[0],e[1],-2]),this.setTriangleIndices(this._faceOffset++,[t,t+1,t+2]),this.setTriangleIndices(this._faceOffset++,[t+1,t+2,t+3]),this._vertexOffset+=4}}));t.a=a},function(e,t,r){"use strict";t.a="@export ecgl.vfParticle.particle.fragment\n\nuniform sampler2D particleTexture;\nuniform sampler2D spawnTexture;\nuniform sampler2D velocityTexture;\n\nuniform float deltaTime;\nuniform float elapsedTime;\n\nuniform float speedScaling : 1.0;\n\nuniform vec2 textureSize;\nuniform vec4 region : [0, 0, 1, 1];\nuniform float firstFrameTime;\n\nvarying vec2 v_Texcoord;\n\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, v_Texcoord);\n bool spawn = false;\n if (p.w <= 0.0) {\n p = texture2D(spawnTexture, fract(v_Texcoord + elapsedTime / 10.0));\n p.w -= firstFrameTime;\n spawn = true;\n }\n vec2 v = texture2D(velocityTexture, fract(p.xy * region.zw + region.xy)).xy;\n v = (v - 0.5) * 2.0;\n p.z = length(v);\n p.xy += v * deltaTime / 10.0 * speedScaling;\n p.w -= deltaTime;\n\n if (spawn || p.xy != fract(p.xy)) {\n p.z = 0.0;\n }\n p.xy = fract(p.xy);\n\n gl_FragColor = p;\n}\n@end\n\n@export ecgl.vfParticle.renderPoints.vertex\n\n#define PI 3.1415926\n\nattribute vec2 texcoord : TEXCOORD_0;\n\nuniform sampler2D particleTexture;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nuniform float size : 1.0;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, texcoord);\n\n if (p.w > 0.0 && p.z > 1e-5) {\n gl_Position = worldViewProjection * vec4(p.xy * 2.0 - 1.0, 0.0, 1.0);\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n\n v_Mag = p.z;\n v_Uv = p.xy;\n\n gl_PointSize = size;\n}\n\n@end\n\n@export ecgl.vfParticle.renderPoints.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\nuniform sampler2D spriteTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n#ifdef SPRITETEXTURE_ENABLED\n gl_FragColor *= texture2D(spriteTexture, gl_PointCoord);\n if (color.a == 0.0) {\n discard;\n }\n#endif\n#ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.vertex\n\n#define PI 3.1415926\n\nattribute vec3 position : POSITION;\n\nuniform sampler2D particleTexture;\nuniform sampler2D prevParticleTexture;\n\nuniform float size : 1.0;\nuniform vec4 vp: VIEWPORT;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\n@import clay.util.rand\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, position.xy);\n vec4 p2 = texture2D(prevParticleTexture, position.xy);\n\n p.xy = p.xy * 2.0 - 1.0;\n p2.xy = p2.xy * 2.0 - 1.0;\n\n if (p.w > 0.0 && p.z > 1e-5) {\n vec2 dir = normalize(p.xy - p2.xy);\n vec2 norm = vec2(dir.y / vp.z, -dir.x / vp.w) * sign(position.z) * size;\n if (abs(position.z) == 2.0) {\n gl_Position = vec4(p.xy + norm, 0.0, 1.0);\n v_Uv = p.xy;\n v_Mag = p.z;\n }\n else {\n gl_Position = vec4(p2.xy + norm, 0.0, 1.0);\n v_Mag = p2.z;\n v_Uv = p2.xy;\n }\n gl_Position = worldViewProjection * gl_Position;\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n #ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n"},function(e,t,r){"use strict";var n=r(0),i=r.n(n);i.a.extendSeriesModel({type:"series.flowGL",dependencies:["geo","grid","bmap"],visualColorAccessPath:"itemStyle.color",getInitialData:function(e,t){var r=i.a.getCoordinateSystemDimensions(this.get("coordinateSystem"))||["x","y"];if(r.length>2)throw new Error("flowGL can only be used on 2d coordinate systems.");r.push("vx","vy");var n=i.a.helper.completeDimensions(r,this.getSource(),{encodeDef:this.get("encode"),dimsDef:this.get("dimensions")}),a=new i.a.List(n,this);return a.initData(this.getSource()),a},defaultOption:{coordinateSystem:"cartesian2d",zlevel:10,supersampling:1,particleType:"point",particleDensity:128,particleSize:1,particleSpeed:1,particleTrail:2,colorTexture:null,gridWidth:"auto",gridHeight:"auto",itemStyle:{color:"#fff",opacity:.8}}})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=(r(260),r(261),r(16));i.a.registerVisual(Object(a.a)("linesGL"))},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(12),o=(r.n(a),i.a.extendSeriesModel({type:"series.linesGL",dependencies:["grid","geo"],visualColorAccessPath:"lineStyle.color",streamEnabled:!0,init:function(e){var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count)),o.superApply(this,"init",arguments)},mergeOption:function(e){var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count)),o.superApply(this,"mergeOption",arguments)},appendData:function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=Object(a.concatArray)(this._flatCoords,t.flatCoords),this._flatCoordsOffset=Object(a.concatArray)(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},_getCoordsFromItemModel:function(e){var t=this.getData().getItemModel(e),r=t.option instanceof Array?t.option:t.getShallow("coords");if(!(r instanceof Array&&r.length>0&&r[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(r)+". Lines must have 2d coords array in data item.");return r},getLineCoordsCount:function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},getLineCoords:function(e,t){if(this._flatCoordsOffset){for(var r=this._flatCoordsOffset[2*e],n=this._flatCoordsOffset[2*e+1],i=0;ir)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,o),flatCoords:i,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},getInitialData:function(e,t){var r=new i.a.List(["value"],this);return r.hasItemOption=!1,r.initData(e.data,[],(function(e,t,n,i){if(e instanceof Array)return NaN;r.hasItemOption=!0;var a=e.value;return null!=a?a instanceof Array?a[i]:a:void 0})),r},defaultOption:{coordinateSystem:"geo",zlevel:10,progressive:1e4,progressiveThreshold:5e4,blendMode:"source-over",lineStyle:{opacity:.8},postEffect:{enable:!1,colorCorrection:{exposure:0,brightness:0,contrast:1,saturation:1,enable:!0}}}}))},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(2),o=r(20),s=r(86),l=r(84),u=r(3);i.a.extendChartView({type:"linesGL",__ecgl__:!0,init:function(e,t){this.groupGL=new a.a.Node,this.viewGL=new o.a("orthographic"),this.viewGL.add(this.groupGL),this._glViewHelper=new l.a(this.viewGL),this._nativeLinesShader=a.a.createShader("ecgl.lines3D"),this._meshLinesShader=a.a.createShader("ecgl.meshLines3D"),this._linesMeshes=[],this._currentStep=0},render:function(e,t,r){this.groupGL.removeAll(),this._glViewHelper.reset(e,r);var n=this._linesMeshes[0];n||(n=this._linesMeshes[0]=this._createLinesMesh(e)),this._linesMeshes.length=1,this.groupGL.add(n),this._updateLinesMesh(e,n,0,e.getData().count()),this.viewGL.setPostEffect(e.getModel("postEffect"),r)},incrementalPrepareRender:function(e,t,r){this.groupGL.removeAll(),this._glViewHelper.reset(e,r),this._currentStep=0,this.viewGL.setPostEffect(e.getModel("postEffect"),r)},incrementalRender:function(e,t,r,n){var i=this._linesMeshes[this._currentStep];i||(i=this._createLinesMesh(t),this._linesMeshes[this._currentStep]=i),this._updateLinesMesh(t,i,e.start,e.end),this.groupGL.add(i),n.getZr().refresh(),this._currentStep++},updateTransform:function(e,t,r){e.coordinateSystem.getRoamTransform&&this._glViewHelper.updateTransform(e,r)},_createLinesMesh:function(e){return new a.a.Mesh({$ignorePicking:!0,material:new a.a.Material({shader:a.a.createShader("ecgl.lines3D"),transparent:!0,depthMask:!1,depthTest:!1}),geometry:new s.a({segmentScale:10,useNativeLine:!0,dynamic:!1}),mode:a.a.Mesh.LINES,culling:!1})},_updateLinesMesh:function(e,t,r,n){var i=e.getData();t.material.blend="lighter"===e.get("blendMode")?a.a.additiveBlend:null;var o=e.get("lineStyle.curveness")||0,s=e.get("polyline"),l=t.geometry,h=e.coordinateSystem,c=u.a.firstNotNull(e.get("lineStyle.width"),1);c>1?(t.material.shader!==this._meshLinesShader&&t.material.attachShader(this._meshLinesShader),t.mode=a.a.Mesh.TRIANGLES):(t.material.shader!==this._nativeLinesShader&&t.material.attachShader(this._nativeLinesShader),t.mode=a.a.Mesh.LINES),r=r||0,n=n||i.count(),l.resetOffset();var d=0,f=0,p=[],m=[],g=[],_=[],v=[],y=.3,x=.7;function T(){m[0]=p[0]*x+_[0]*y-(p[1]-_[1])*o,m[1]=p[1]*x+_[1]*y-(_[0]-p[0])*o,g[0]=p[0]*y+_[0]*x-(p[1]-_[1])*o,g[1]=p[1]*y+_[1]*x-(_[0]-p[0])*o}if(s||0!==o)for(var b=r;b=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));u.ref=function(t){e.scrollComponent=t,l&&l(t)};var h=[r];return i&&(s?o?h.unshift(s):h.push(s):this.defaultLoader&&(o?h.unshift(this.defaultLoader):h.push(this.defaultLoader))),a.default.createElement(n,u,h)}}]),t}(i.Component);l.propTypes={children:o.default.node.isRequired,element:o.default.node,hasMore:o.default.bool,initialLoad:o.default.bool,isReverse:o.default.bool,loader:o.default.node,loadMore:o.default.func.isRequired,pageStart:o.default.number,ref:o.default.func,getScrollParent:o.default.func,threshold:o.default.number,useCapture:o.default.bool,useWindow:o.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},26724:function(e,t,r){e.exports=r(51581)},27774:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeSensorId=t.SensorTabIndex=t.SensorClassName=void 0;t.SizeSensorId="size-sensor-id";t.SensorClassName="size-sensor-object";t.SensorTabIndex="-1"},79301:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60,r=null;return function(){for(var n=this,i=arguments.length,a=new Array(i),o=0;o