unis_crm/dist/assets/index-D1YmE68l.js

582 lines
2.0 MiB
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))a(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&a(o)}).observe(document,{childList:!0,subtree:!0});function r(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(n){if(n.ep)return;n.ep=!0;const i=r(n);fetch(n.href,i)}})();var iC={exports:{}},bg={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var yO;function Vee(){if(yO)return bg;yO=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(a,n,i){var o=null;if(i!==void 0&&(o=""+i),n.key!==void 0&&(o=""+n.key),"key"in n){i={};for(var s in n)s!=="key"&&(i[s]=n[s])}else i=n;return n=i.ref,{$$typeof:t,type:a,key:o,ref:n!==void 0?n:null,props:i}}return bg.Fragment=e,bg.jsx=r,bg.jsxs=r,bg}var xO;function Fee(){return xO||(xO=1,iC.exports=Vee()),iC.exports}var g=Fee(),oC={exports:{}},Yt={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var bO;function Gee(){if(bO)return Yt;bO=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),h=Symbol.iterator;function v(H){return H===null||typeof H!="object"?null:(H=h&&H[h]||H["@@iterator"],typeof H=="function"?H:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,b={};function w(H,Z,te){this.props=H,this.context=Z,this.refs=b,this.updater=te||m}w.prototype.isReactComponent={},w.prototype.setState=function(H,Z){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,Z,"setState")},w.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function _(){}_.prototype=w.prototype;function T(H,Z,te){this.props=H,this.context=Z,this.refs=b,this.updater=te||m}var C=T.prototype=new _;C.constructor=T,x(C,w.prototype),C.isPureReactComponent=!0;var k=Array.isArray;function A(){}var M={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function R(H,Z,te){var ie=te.ref;return{$$typeof:t,type:H,key:Z,ref:ie!==void 0?ie:null,props:te}}function P(H,Z){return R(H.type,Z,H.props)}function j(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function V(H){var Z={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(te){return Z[te]})}var I=/\/+/g;function F(H,Z){return typeof H=="object"&&H!==null&&H.key!=null?V(""+H.key):Z.toString(36)}function G(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(A,A):(H.status="pending",H.then(function(Z){H.status==="pending"&&(H.status="fulfilled",H.value=Z)},function(Z){H.status==="pending"&&(H.status="rejected",H.reason=Z)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function O(H,Z,te,ie,ce){var me=typeof H;(me==="undefined"||me==="boolean")&&(H=null);var ze=!1;if(H===null)ze=!0;else switch(me){case"bigint":case"string":case"number":ze=!0;break;case"object":switch(H.$$typeof){case t:case e:ze=!0;break;case c:return ze=H._init,O(ze(H._payload),Z,te,ie,ce)}}if(ze)return ce=ce(H),ze=ie===""?"."+F(H,0):ie,k(ce)?(te="",ze!=null&&(te=ze.replace(I,"$&/")+"/"),O(ce,Z,te,"",function(Be){return Be})):ce!=null&&(j(ce)&&(ce=P(ce,te+(ce.key==null||H&&H.key===ce.key?"":(""+ce.key).replace(I,"$&/")+"/")+ze)),Z.push(ce)),1;ze=0;var Ce=ie===""?".":ie+":";if(k(H))for(var ge=0;ge<H.length;ge++)ie=H[ge],me=Ce+F(ie,ge),ze+=O(ie,Z,te,me,ce);else if(ge=v(H),typeof ge=="function")for(H=ge.call(H),ge=0;!(ie=H.next()).done;)ie=ie.value,me=Ce+F(ie,ge++),ze+=O(ie,Z,te,me,ce);else if(me==="object"){if(typeof H.then=="function")return O(G(H),Z,te,ie,ce);throw Z=String(H),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return ze}function U(H,Z,te){if(H==null)return H;var ie=[],ce=0;return O(H,ie,"","",function(me){return Z.call(te,me,ce++)}),ie}function $(H){if(H._status===-1){var Z=H._result;Z=Z(),Z.then(function(te){(H._status===0||H._status===-1)&&(H._status=1,H._result=te)},function(te){(H._status===0||H._status===-1)&&(H._status=2,H._result=te)}),H._status===-1&&(H._status=0,H._result=Z)}if(H._status===1)return H._result.default;throw H._result}var K=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},q={map:U,forEach:function(H,Z,te){U(H,function(){Z.apply(this,arguments)},te)},count:function(H){var Z=0;return U(H,function(){Z++}),Z},toArray:function(H){return U(H,function(Z){return Z})||[]},only:function(H){if(!j(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return Yt.Activity=d,Yt.Children=q,Yt.Component=w,Yt.Fragment=r,Yt.Profiler=n,Yt.PureComponent=T,Yt.StrictMode=a,Yt.Suspense=l,Yt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Yt.__COMPILER_RUNTIME={__proto__:null,c:function(H){return M.H.useMemoCache(H)}},Yt.cache=function(H){return function(){return H.apply(null,arguments)}},Yt.cacheSignal=function(){return null},Yt.cloneElement=function(H,Z,te){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var ie=x({},H.props),ce=H.key;if(Z!=null)for(me in Z.key!==void 0&&(ce=""+Z.key),Z)!L.call(Z,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&Z.ref===void 0||(ie[me]=Z[me]);var me=arguments.length-2;if(me===1)ie.children=te;else if(1<me){for(var ze=Array(me),Ce=0;Ce<me;Ce++)ze[Ce]=arguments[Ce+2];ie.children=ze}return R(H.type,ce,ie)},Yt.createContext=function(H){return H={$$typeof:o,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:i,_context:H},H},Yt.createElement=function(H,Z,te){var ie,ce={},me=null;if(Z!=null)for(ie in Z.key!==void 0&&(me=""+Z.key),Z)L.call(Z,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(ce[ie]=Z[ie]);var ze=arguments.length-2;if(ze===1)ce.children=te;else if(1<ze){for(var Ce=Array(ze),ge=0;ge<ze;ge++)Ce[ge]=arguments[ge+2];ce.children=Ce}if(H&&H.defaultProps)for(ie in ze=H.defaultProps,ze)ce[ie]===void 0&&(ce[ie]=ze[ie]);return R(H,me,ce)},Yt.createRef=function(){return{current:null}},Yt.forwardRef=function(H){return{$$typeof:s,render:H}},Yt.isValidElement=j,Yt.lazy=function(H){return{$$typeof:c,_payload:{_status:-1,_result:H},_init:$}},Yt.memo=function(H,Z){return{$$typeof:u,type:H,compare:Z===void 0?null:Z}},Yt.startTransition=function(H){var Z=M.T,te={};M.T=te;try{var ie=H(),ce=M.S;ce!==null&&ce(te,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(A,K)}catch(me){K(me)}finally{Z!==null&&te.types!==null&&(Z.types=te.types),M.T=Z}},Yt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Yt.use=function(H){return M.H.use(H)},Yt.useActionState=function(H,Z,te){return M.H.useActionState(H,Z,te)},Yt.useCallback=function(H,Z){return M.H.useCallback(H,Z)},Yt.useContext=function(H){return M.H.useContext(H)},Yt.useDebugValue=function(){},Yt.useDeferredValue=function(H,Z){return M.H.useDeferredValue(H,Z)},Yt.useEffect=function(H,Z){return M.H.useEffect(H,Z)},Yt.useEffectEvent=function(H){return M.H.useEffectEvent(H)},Yt.useId=function(){return M.H.useId()},Yt.useImperativeHandle=function(H,Z,te){return M.H.useImperativeHandle(H,Z,te)},Yt.useInsertionEffect=function(H,Z){return M.H.useInsertionEffect(H,Z)},Yt.useLayoutEffect=function(H,Z){return M.H.useLayoutEffect(H,Z)},Yt.useMemo=function(H,Z){return M.H.useMemo(H,Z)},Yt.useOptimistic=function(H,Z){return M.H.useOptimistic(H,Z)},Yt.useReducer=function(H,Z,te){return M.H.useReducer(H,Z,te)},Yt.useRef=function(H){return M.H.useRef(H)},Yt.useState=function(H){return M.H.useState(H)},Yt.useSyncExternalStore=function(H,Z,te){return M.H.useSyncExternalStore(H,Z,te)},Yt.useTransition=function(){return M.H.useTransition()},Yt.version="19.2.4",Yt}var wO;function HL(){return wO||(wO=1,oC.exports=Gee()),oC.exports}var E=HL(),sC={exports:{}},wg={},lC={exports:{}},uC={};/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var SO;function Hee(){return SO||(SO=1,(function(t){function e(O,U){var $=O.length;O.push(U);e:for(;0<$;){var K=$-1>>>1,q=O[K];if(0<n(q,U))O[K]=U,O[$]=q,$=K;else break e}}function r(O){return O.length===0?null:O[0]}function a(O){if(O.length===0)return null;var U=O[0],$=O.pop();if($!==U){O[0]=$;e:for(var K=0,q=O.length,H=q>>>1;K<H;){var Z=2*(K+1)-1,te=O[Z],ie=Z+1,ce=O[ie];if(0>n(te,$))ie<q&&0>n(ce,te)?(O[K]=ce,O[ie]=$,K=ie):(O[K]=te,O[Z]=$,K=Z);else if(ie<q&&0>n(ce,$))O[K]=ce,O[ie]=$,K=ie;else break e}}return U}function n(O,U){var $=O.sortIndex-U.sortIndex;return $!==0?$:O.id-U.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,d=null,h=3,v=!1,m=!1,x=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function C(O){for(var U=r(u);U!==null;){if(U.callback===null)a(u);else if(U.startTime<=O)a(u),U.sortIndex=U.expirationTime,e(l,U);else break;U=r(u)}}function k(O){if(x=!1,C(O),!m)if(r(l)!==null)m=!0,A||(A=!0,V());else{var U=r(u);U!==null&&G(k,U.startTime-O)}}var A=!1,M=-1,L=5,R=-1;function P(){return b?!0:!(t.unstable_now()-R<L)}function j(){if(b=!1,A){var O=t.unstable_now();R=O;var U=!0;try{e:{m=!1,x&&(x=!1,_(M),M=-1),v=!0;var $=h;try{t:{for(C(O),d=r(l);d!==null&&!(d.expirationTime>O&&P());){var K=d.callback;if(typeof K=="function"){d.callback=null,h=d.priorityLevel;var q=K(d.expirationTime<=O);if(O=t.unstable_now(),typeof q=="function"){d.callback=q,C(O),U=!0;break t}d===r(l)&&a(l),C(O)}else a(l);d=r(l)}if(d!==null)U=!0;else{var H=r(u);H!==null&&G(k,H.startTime-O),U=!1}}break e}finally{d=null,h=$,v=!1}U=void 0}}finally{U?V():A=!1}}}var V;if(typeof T=="function")V=function(){T(j)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,F=I.port2;I.port1.onmessage=j,V=function(){F.postMessage(null)}}else V=function(){w(j,0)};function G(O,U){M=w(function(){O(t.unstable_now())},U)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(O){O.callback=null},t.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<O?Math.floor(1e3/O):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_next=function(O){switch(h){case 1:case 2:case 3:var U=3;break;default:U=h}var $=h;h=U;try{return O()}finally{h=$}},t.unstable_requestPaint=function(){b=!0},t.unstable_runWithPriority=function(O,U){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var $=h;h=O;try{return U()}finally{h=$}},t.unstable_scheduleCallback=function(O,U,$){var K=t.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?K+$:K):$=K,O){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=$+q,O={id:c++,callback:U,priorityLevel:O,startTime:$,expirationTime:q,sortIndex:-1},$>K?(O.sortIndex=$,e(u,O),r(l)===null&&O===r(u)&&(x?(_(M),M=-1):x=!0,G(k,$-K))):(O.sortIndex=q,e(l,O),m||v||(m=!0,A||(A=!0,V()))),O},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(O){var U=h;return function(){var $=h;h=U;try{return O.apply(this,arguments)}finally{h=$}}}})(uC)),uC}var _O;function Uee(){return _O||(_O=1,lC.exports=Hee()),lC.exports}var cC={exports:{}},Ai={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var TO;function $ee(){if(TO)return Ai;TO=1;var t=HL();function e(l){var u="https://react.dev/errors/"+l;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)u+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(e(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},n=Symbol.for("react.portal");function i(l,u,c){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:n,key:d==null?null:""+d,children:l,containerInfo:u,implementation:c}}var o=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(l,u){if(l==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return Ai.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Ai.createPortal=function(l,u){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(e(299));return i(l,u,null,c)},Ai.flushSync=function(l){var u=o.T,c=a.p;try{if(o.T=null,a.p=2,l)return l()}finally{o.T=u,a.p=c,a.d.f()}},Ai.preconnect=function(l,u){typeof l=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,a.d.C(l,u))},Ai.prefetchDNS=function(l){typeof l=="string"&&a.d.D(l)},Ai.preinit=function(l,u){if(typeof l=="string"&&u&&typeof u.as=="string"){var c=u.as,d=s(c,u.crossOrigin),h=typeof u.integrity=="string"?u.integrity:void 0,v=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;c==="style"?a.d.S(l,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:d,integrity:h,fetchPriority:v}):c==="script"&&a.d.X(l,{crossOrigin:d,integrity:h,fetchPriority:v,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},Ai.preinitModule=function(l,u){if(typeof l=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var c=s(u.as,u.crossOrigin);a.d.M(l,{crossOrigin:c,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&a.d.M(l)},Ai.preload=function(l,u){if(typeof l=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var c=u.as,d=s(c,u.crossOrigin);a.d.L(l,c,{crossOrigin:d,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},Ai.preloadModule=function(l,u){if(typeof l=="string")if(u){var c=s(u.as,u.crossOrigin);a.d.m(l,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:c,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else a.d.m(l)},Ai.requestFormReset=function(l){a.d.r(l)},Ai.unstable_batchedUpdates=function(l,u){return l(u)},Ai.useFormState=function(l,u,c){return o.H.useFormState(l,u,c)},Ai.useFormStatus=function(){return o.H.useHostTransitionStatus()},Ai.version="19.2.4",Ai}var CO;function rG(){if(CO)return cC.exports;CO=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),cC.exports=$ee(),cC.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var kO;function Wee(){if(kO)return wg;kO=1;var t=Uee(),e=HL(),r=rG();function a(f){var p="https://react.dev/errors/"+f;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+f+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(f){return!(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)}function i(f){var p=f,y=f;if(f.alternate)for(;p.return;)p=p.return;else{f=p;do p=f,(p.flags&4098)!==0&&(y=p.return),f=p.return;while(f)}return p.tag===3?y:null}function o(f){if(f.tag===13){var p=f.memoizedState;if(p===null&&(f=f.alternate,f!==null&&(p=f.memoizedState)),p!==null)return p.dehydrated}return null}function s(f){if(f.tag===31){var p=f.memoizedState;if(p===null&&(f=f.alternate,f!==null&&(p=f.memoizedState)),p!==null)return p.dehydrated}return null}function l(f){if(i(f)!==f)throw Error(a(188))}function u(f){var p=f.alternate;if(!p){if(p=i(f),p===null)throw Error(a(188));return p!==f?null:f}for(var y=f,S=p;;){var N=y.return;if(N===null)break;var D=N.alternate;if(D===null){if(S=N.return,S!==null){y=S;continue}break}if(N.child===D.child){for(D=N.child;D;){if(D===y)return l(N),f;if(D===S)return l(N),p;D=D.sibling}throw Error(a(188))}if(y.return!==S.return)y=N,S=D;else{for(var B=!1,W=N.child;W;){if(W===y){B=!0,y=N,S=D;break}if(W===S){B=!0,S=N,y=D;break}W=W.sibling}if(!B){for(W=D.child;W;){if(W===y){B=!0,y=D,S=N;break}if(W===S){B=!0,S=D,y=N;break}W=W.sibling}if(!B)throw Error(a(189))}}if(y.alternate!==S)throw Error(a(190))}if(y.tag!==3)throw Error(a(188));return y.stateNode.current===y?f:p}function c(f){var p=f.tag;if(p===5||p===26||p===27||p===6)return f;for(f=f.child;f!==null;){if(p=c(f),p!==null)return p;f=f.sibling}return null}var d=Object.assign,h=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function V(f){return f===null||typeof f!="object"?null:(f=j&&f[j]||f["@@iterator"],typeof f=="function"?f:null)}var I=Symbol.for("react.client.reference");function F(f){if(f==null)return null;if(typeof f=="function")return f.$$typeof===I?null:f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case x:return"Fragment";case w:return"Profiler";case b:return"StrictMode";case k:return"Suspense";case A:return"SuspenseList";case R:return"Activity"}if(typeof f=="object")switch(f.$$typeof){case m:return"Portal";case T:return f.displayName||"Context";case _:return(f._context.displayName||"Context")+".Consumer";case C:var p=f.render;return f=f.displayName,f||(f=p.displayName||p.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case M:return p=f.displayName||null,p!==null?p:F(f.type)||"Memo";case L:p=f._payload,f=f._init;try{return F(f(p))}catch{}}return null}var G=Array.isArray,O=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},K=[],q=-1;function H(f){return{current:f}}function Z(f){0>q||(f.current=K[q],K[q]=null,q--)}function te(f,p){q++,K[q]=f.current,f.current=p}var ie=H(null),ce=H(null),me=H(null),ze=H(null);function Ce(f,p){switch(te(me,p),te(ce,f),te(ie,null),p.nodeType){case 9:case 11:f=(f=p.documentElement)&&(f=f.namespaceURI)?Fj(f):0;break;default:if(f=p.tagName,p=p.namespaceURI)p=Fj(p),f=Gj(p,f);else switch(f){case"svg":f=1;break;case"math":f=2;break;default:f=0}}Z(ie),te(ie,f)}function ge(){Z(ie),Z(ce),Z(me)}function Be(f){f.memoizedState!==null&&te(ze,f);var p=ie.current,y=Gj(p,f.type);p!==y&&(te(ce,f),te(ie,y))}function _e(f){ce.current===f&&(Z(ie),Z(ce)),ze.current===f&&(Z(ze),mg._currentValue=$)}var Oe,xt;function Ye(f){if(Oe===void 0)try{throw Error()}catch(y){var p=y.stack.trim().match(/\n( *(at )?)/);Oe=p&&p[1]||"",xt=-1<y.stack.indexOf(`
at`)?" (<anonymous>)":-1<y.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Oe+f+xt}var st=!1;function We(f,p){if(!f||st)return"";st=!0;var y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var S={DetermineComponentFrameRoot:function(){try{if(p){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(we){var pe=we}Reflect.construct(f,[],Ee)}else{try{Ee.call()}catch(we){pe=we}f.call(Ee.prototype)}}else{try{throw Error()}catch(we){pe=we}(Ee=f())&&typeof Ee.catch=="function"&&Ee.catch(function(){})}}catch(we){if(we&&pe&&typeof we.stack=="string")return[we.stack,pe.stack]}return[null,null]}};S.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var N=Object.getOwnPropertyDescriptor(S.DetermineComponentFrameRoot,"name");N&&N.configurable&&Object.defineProperty(S.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var D=S.DetermineComponentFrameRoot(),B=D[0],W=D[1];if(B&&W){var Q=B.split(`
`),he=W.split(`
`);for(N=S=0;S<Q.length&&!Q[S].includes("DetermineComponentFrameRoot");)S++;for(;N<he.length&&!he[N].includes("DetermineComponentFrameRoot");)N++;if(S===Q.length||N===he.length)for(S=Q.length-1,N=he.length-1;1<=S&&0<=N&&Q[S]!==he[N];)N--;for(;1<=S&&0<=N;S--,N--)if(Q[S]!==he[N]){if(S!==1||N!==1)do if(S--,N--,0>N||Q[S]!==he[N]){var Ae=`
`+Q[S].replace(" at new "," at ");return f.displayName&&Ae.includes("<anonymous>")&&(Ae=Ae.replace("<anonymous>",f.displayName)),Ae}while(1<=S&&0<=N);break}}}finally{st=!1,Error.prepareStackTrace=y}return(y=f?f.displayName||f.name:"")?Ye(y):""}function At(f,p){switch(f.tag){case 26:case 27:case 5:return Ye(f.type);case 16:return Ye("Lazy");case 13:return f.child!==p&&p!==null?Ye("Suspense Fallback"):Ye("Suspense");case 19:return Ye("SuspenseList");case 0:case 15:return We(f.type,!1);case 11:return We(f.type.render,!1);case 1:return We(f.type,!0);case 31:return Ye("Activity");default:return""}}function kt(f){try{var p="",y=null;do p+=At(f,y),y=f,f=f.return;while(f);return p}catch(S){return`
Error generating stack: `+S.message+`
`+S.stack}}var Jt=Object.prototype.hasOwnProperty,Nr=t.unstable_scheduleCallback,rr=t.unstable_cancelCallback,Fe=t.unstable_shouldYield,Mt=t.unstable_requestPaint,dr=t.unstable_now,ar=t.unstable_getCurrentPriorityLevel,sa=t.unstable_ImmediatePriority,va=t.unstable_UserBlockingPriority,rn=t.unstable_NormalPriority,wa=t.unstable_LowPriority,En=t.unstable_IdlePriority,pa=t.log,an=t.unstable_setDisableYieldValue,gr=null,Ar=null;function Hr(f){if(typeof pa=="function"&&an(f),Ar&&typeof Ar.setStrictMode=="function")try{Ar.setStrictMode(gr,f)}catch{}}var ye=Math.clz32?Math.clz32:xe,Rt=Math.log,Te=Math.LN2;function xe(f){return f>>>=0,f===0?32:31-(Rt(f)/Te|0)|0}var Pt=256,bt=262144,Vt=4194304;function Zt(f){var p=f&42;if(p!==0)return p;switch(f&-f){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return f&261888;case 262144:case 524288:case 1048576:case 2097152:return f&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return f&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return f}}function nr(f,p,y){var S=f.pendingLanes;if(S===0)return 0;var N=0,D=f.suspendedLanes,B=f.pingedLanes;f=f.warmLanes;var W=S&134217727;return W!==0?(S=W&~D,S!==0?N=Zt(S):(B&=W,B!==0?N=Zt(B):y||(y=W&~f,y!==0&&(N=Zt(y))))):(W=S&~D,W!==0?N=Zt(W):B!==0?N=Zt(B):y||(y=S&~f,y!==0&&(N=Zt(y)))),N===0?0:p!==0&&p!==N&&(p&D)===0&&(D=N&-N,y=p&-p,D>=y||D===32&&(y&4194048)!==0)?p:N}function _r(f,p){return(f.pendingLanes&~(f.suspendedLanes&~f.pingedLanes)&p)===0}function ma(f,p){switch(f){case 1:case 2:case 4:case 8:case 64:return p+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return p+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Mr(){var f=Vt;return Vt<<=1,(Vt&62914560)===0&&(Vt=4194304),f}function Zr(f){for(var p=[],y=0;31>y;y++)p.push(f);return p}function za(f,p){f.pendingLanes|=p,p!==268435456&&(f.suspendedLanes=0,f.pingedLanes=0,f.warmLanes=0)}function la(f,p,y,S,N,D){var B=f.pendingLanes;f.pendingLanes=y,f.suspendedLanes=0,f.pingedLanes=0,f.warmLanes=0,f.expiredLanes&=y,f.entangledLanes&=y,f.errorRecoveryDisabledLanes&=y,f.shellSuspendCounter=0;var W=f.entanglements,Q=f.expirationTimes,he=f.hiddenUpdates;for(y=B&~y;0<y;){var Ae=31-ye(y),Ee=1<<Ae;W[Ae]=0,Q[Ae]=-1;var pe=he[Ae];if(pe!==null)for(he[Ae]=null,Ae=0;Ae<pe.length;Ae++){var we=pe[Ae];we!==null&&(we.lane&=-536870913)}y&=~Ee}S!==0&&ut(f,S,0),D!==0&&N===0&&f.tag!==0&&(f.suspendedLanes|=D&~(B&~p))}function ut(f,p,y){f.pendingLanes|=p,f.suspendedLanes&=~p;var S=31-ye(p);f.entangledLanes|=p,f.entanglements[S]=f.entanglements[S]|1073741824|y&261930}function Da(f,p){var y=f.entangledLanes|=p;for(f=f.entanglements;y;){var S=31-ye(y),N=1<<S;N&p|f[S]&p&&(f[S]|=p),y&=~N}}function Tr(f,p){var y=p&-p;return y=(y&42)!==0?1:lr(y),(y&(f.suspendedLanes|p))!==0?0:y}function lr(f){switch(f){case 2:f=1;break;case 8:f=4;break;case 32:f=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:f=128;break;case 268435456:f=134217728;break;default:f=0}return f}function Ba(f){return f&=-f,2<f?8<f?(f&134217727)!==0?32:268435456:8:2}function Dr(){var f=U.p;return f!==0?f:(f=window.event,f===void 0?32:dO(f.type))}function Va(f,p){var y=U.p;try{return U.p=f,p()}finally{U.p=y}}var ua=Math.random().toString(36).slice(2),Ze="__reactFiber$"+ua,wr="__reactProps$"+ua,le="__reactContainer$"+ua,tt="__reactEvents$"+ua,Ot="__reactListeners$"+ua,pt="__reactHandles$"+ua,nn="__reactResources$"+ua,Sa="__reactMarker$"+ua;function Zn(f){delete f[Ze],delete f[wr],delete f[tt],delete f[Ot],delete f[pt]}function Ur(f){var p=f[Ze];if(p)return p;for(var y=f.parentNode;y;){if(p=y[le]||y[Ze]){if(y=p.alternate,p.child!==null||y!==null&&y.child!==null)for(f=qj(f);f!==null;){if(y=f[Ze])return y;f=qj(f)}return p}f=y,y=f.parentNode}return null}function Rn(f){if(f=f[Ze]||f[le]){var p=f.tag;if(p===5||p===6||p===13||p===31||p===26||p===27||p===3)return f}return null}function Kr(f){var p=f.tag;if(p===5||p===26||p===27||p===6)return f.stateNode;throw Error(a(33))}function $a(f){var p=f[nn];return p||(p=f[nn]={hoistableStyles:new Map,hoistableScripts:new Map}),p}function fr(f){f[Sa]=!0}var Vo=new Set,bi={};function Pn(f,p){Qr(f,p),Qr(f+"Capture",p)}function Qr(f,p){for(bi[f]=p,f=0;f<p.length;f++)Vo.add(p[f])}var Ss=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ji={},Oi={};function mo(f){return Jt.call(Oi,f)?!0:Jt.call(Ji,f)?!1:Ss.test(f)?Oi[f]=!0:(Ji[f]=!0,!1)}function yn(f,p,y){if(mo(p))if(y===null)f.removeAttribute(p);else{switch(typeof y){case"undefined":case"function":case"symbol":f.removeAttribute(p);return;case"boolean":var S=p.toLowerCase().slice(0,5);if(S!=="data-"&&S!=="aria-"){f.removeAttribute(p);return}}f.setAttribute(p,""+y)}}function In(f,p,y){if(y===null)f.removeAttribute(p);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":f.removeAttribute(p);return}f.setAttribute(p,""+y)}}function Wa(f,p,y,S){if(S===null)f.removeAttribute(y);else{switch(typeof S){case"undefined":case"function":case"symbol":case"boolean":f.removeAttribute(y);return}f.setAttributeNS(p,y,""+S)}}function La(f){switch(typeof f){case"bigint":case"boolean":case"number":case"string":case"undefined":return f;case"object":return f;default:return""}}function wi(f){var p=f.type;return(f=f.nodeName)&&f.toLowerCase()==="input"&&(p==="checkbox"||p==="radio")}function jr(f,p,y){var S=Object.getOwnPropertyDescriptor(f.constructor.prototype,p);if(!f.hasOwnProperty(p)&&typeof S<"u"&&typeof S.get=="function"&&typeof S.set=="function"){var N=S.get,D=S.set;return Object.defineProperty(f,p,{configurable:!0,get:function(){return N.call(this)},set:function(B){y=""+B,D.call(this,B)}}),Object.defineProperty(f,p,{enumerable:S.enumerable}),{getValue:function(){return y},setValue:function(B){y=""+B},stopTracking:function(){f._valueTracker=null,delete f[p]}}}}function zi(f){if(!f._valueTracker){var p=wi(f)?"checked":"value";f._valueTracker=jr(f,p,""+f[p])}}function xn(f){if(!f)return!1;var p=f._valueTracker;if(!p)return!0;var y=p.getValue(),S="";return f&&(S=wi(f)?f.checked?"true":"false":f.value),f=S,f!==y?(p.setValue(f),!0):!1}function Or(f){if(f=f||(typeof document<"u"?document:void 0),typeof f>"u")return null;try{return f.activeElement||f.body}catch{return f.body}}var Kn=/[\n"\\]/g;function _a(f){return f.replace(Kn,function(p){return"\\"+p.charCodeAt(0).toString(16)+" "})}function _s(f,p,y,S,N,D,B,W){f.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?f.type=B:f.removeAttribute("type"),p!=null?B==="number"?(p===0&&f.value===""||f.value!=p)&&(f.value=""+La(p)):f.value!==""+La(p)&&(f.value=""+La(p)):B!=="submit"&&B!=="reset"||f.removeAttribute("value"),p!=null?J(f,B,La(p)):y!=null?J(f,B,La(y)):S!=null&&f.removeAttribute("value"),N==null&&D!=null&&(f.defaultChecked=!!D),N!=null&&(f.checked=N&&typeof N!="function"&&typeof N!="symbol"),W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"?f.name=""+La(W):f.removeAttribute("name")}function Si(f,p,y,S,N,D,B,W){if(D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(f.type=D),p!=null||y!=null){if(!(D!=="submit"&&D!=="reset"||p!=null)){zi(f);return}y=y!=null?""+La(y):"",p=p!=null?""+La(p):y,W||p===f.value||(f.value=p),f.defaultValue=p}S=S??N,S=typeof S!="function"&&typeof S!="symbol"&&!!S,f.checked=W?f.checked:!!S,f.defaultChecked=!!S,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(f.name=B),zi(f)}function J(f,p,y){p==="number"&&Or(f.ownerDocument)===f||f.defaultValue===""+y||(f.defaultValue=""+y)}function Me(f,p,y,S){if(f=f.options,p){p={};for(var N=0;N<y.length;N++)p["$"+y[N]]=!0;for(y=0;y<f.length;y++)N=p.hasOwnProperty("$"+f[y].value),f[y].selected!==N&&(f[y].selected=N),N&&S&&(f[y].defaultSelected=!0)}else{for(y=""+La(y),p=null,N=0;N<f.length;N++){if(f[N].value===y){f[N].selected=!0,S&&(f[N].defaultSelected=!0);return}p!==null||f[N].disabled||(p=f[N])}p!==null&&(p.selected=!0)}}function re(f,p,y){if(p!=null&&(p=""+La(p),p!==f.value&&(f.value=p),y==null)){f.defaultValue!==p&&(f.defaultValue=p);return}f.defaultValue=y!=null?""+La(y):""}function de(f,p,y,S){if(p==null){if(S!=null){if(y!=null)throw Error(a(92));if(G(S)){if(1<S.length)throw Error(a(93));S=S[0]}y=S}y==null&&(y=""),p=y}y=La(p),f.defaultValue=y,S=f.textContent,S===y&&S!==""&&S!==null&&(f.value=S),zi(f)}function ct(f,p){if(p){var y=f.firstChild;if(y&&y===f.lastChild&&y.nodeType===3){y.nodeValue=p;return}}f.textContent=p}var ir=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function zr(f,p,y){var S=p.indexOf("--")===0;y==null||typeof y=="boolean"||y===""?S?f.setProperty(p,""):p==="float"?f.cssFloat="":f[p]="":S?f.setProperty(p,y):typeof y!="number"||y===0||ir.has(p)?p==="float"?f.cssFloat=y:f[p]=(""+y).trim():f[p]=y+"px"}function Qn(f,p,y){if(p!=null&&typeof p!="object")throw Error(a(62));if(f=f.style,y!=null){for(var S in y)!y.hasOwnProperty(S)||p!=null&&p.hasOwnProperty(S)||(S.indexOf("--")===0?f.setProperty(S,""):S==="float"?f.cssFloat="":f[S]="");for(var N in p)S=p[N],p.hasOwnProperty(N)&&y[N]!==S&&zr(f,N,S)}else for(var D in p)p.hasOwnProperty(D)&&zr(f,D,p[D])}function Xe(f){if(f.indexOf("-")===-1)return!1;switch(f){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jn=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Bi=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ts(f){return Bi.test(""+f)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":f}function Ya(){}var go=null;function Ue(f){return f=f.target||f.srcElement||window,f.correspondingUseElement&&(f=f.correspondingUseElement),f.nodeType===3?f.parentNode:f}var On=null,_i=null;function yo(f){var p=Rn(f);if(p&&(f=p.stateNode)){var y=f[wr]||null;e:switch(f=p.stateNode,p.type){case"input":if(_s(f,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name),p=y.name,y.type==="radio"&&p!=null){for(y=f;y.parentNode;)y=y.parentNode;for(y=y.querySelectorAll('input[name="'+_a(""+p)+'"][type="radio"]'),p=0;p<y.length;p++){var S=y[p];if(S!==f&&S.form===f.form){var N=S[wr]||null;if(!N)throw Error(a(90));_s(S,N.value,N.defaultValue,N.defaultValue,N.checked,N.defaultChecked,N.type,N.name)}}for(p=0;p<y.length;p++)S=y[p],S.form===f.form&&xn(S)}break e;case"textarea":re(f,y.value,y.defaultValue);break e;case"select":p=y.value,p!=null&&Me(f,!!y.multiple,p,!1)}}}var xo=!1;function il(f,p,y){if(xo)return f(p,y);xo=!0;try{var S=f(p);return S}finally{if(xo=!1,(On!==null||_i!==null)&&(Wx(),On&&(p=On,f=_i,_i=On=null,yo(p),f)))for(p=0;p<f.length;p++)yo(f[p])}}function eo(f,p){var y=f.stateNode;if(y===null)return null;var S=y[wr]||null;if(S===null)return null;y=S[p];e:switch(p){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(S=!S.disabled)||(f=f.type,S=!(f==="button"||f==="input"||f==="select"||f==="textarea")),f=!S;break e;default:f=!1}if(f)return null;if(y&&typeof y!="function")throw Error(a(231,p,typeof y));return y}var Dt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zn=!1;if(Dt)try{var bn={};Object.defineProperty(bn,"passive",{get:function(){zn=!0}}),window.addEventListener("test",bn,bn),window.removeEventListener("test",bn,bn)}catch{zn=!1}var Ta=null,Bn=null,Jn=null;function ca(){if(Jn)return Jn;var f,p=Bn,y=p.length,S,N="value"in Ta?Ta.value:Ta.textContent,D=N.length;for(f=0;f<y&&p[f]===N[f];f++);var B=y-f;for(S=1;S<=B&&p[y-S]===N[D-S];S++);return Jn=N.slice(f,1<S?1-S:void 0)}function Fo(f){var p=f.keyCode;return"charCode"in f?(f=f.charCode,f===0&&p===13&&(f=13)):f=p,f===10&&(f=13),32<=f||f===13?f:0}function dc(){return!0}function iu(){return!1}function Jr(f){function p(y,S,N,D,B){this._reactName=y,this._targetInst=N,this.type=S,this.nativeEvent=D,this.target=B,this.currentTarget=null;for(var W in f)f.hasOwnProperty(W)&&(y=f[W],this[W]=y?y(D):D[W]);return this.isDefaultPrevented=(D.defaultPrevented!=null?D.defaultPrevented:D.returnValue===!1)?dc:iu,this.isPropagationStopped=iu,this}return d(p.prototype,{preventDefault:function(){this.defaultPrevented=!0;var y=this.nativeEvent;y&&(y.preventDefault?y.preventDefault():typeof y.returnValue!="unknown"&&(y.returnValue=!1),this.isDefaultPrevented=dc)},stopPropagation:function(){var y=this.nativeEvent;y&&(y.stopPropagation?y.stopPropagation():typeof y.cancelBubble!="unknown"&&(y.cancelBubble=!0),this.isPropagationStopped=dc)},persist:function(){},isPersistent:dc}),p}var Fa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(f){return f.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vi=Jr(Fa),ou=d({},Fa,{view:0,detail:0}),ol=Jr(ou),ur,Go,Ti,Vn=d({},ou,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ks,button:0,buttons:0,relatedTarget:function(f){return f.relatedTarget===void 0?f.fromElement===f.srcElement?f.toElement:f.fromElement:f.relatedTarget},movementX:function(f){return"movementX"in f?f.movementX:(f!==Ti&&(Ti&&f.type==="mousemove"?(ur=f.screenX-Ti.screenX,Go=f.screenY-Ti.screenY):Go=ur=0,Ti=f),ur)},movementY:function(f){return"movementY"in f?f.movementY:Go}}),yr=Jr(Vn),Ho=d({},Vn,{dataTransfer:0}),ga=Jr(Ho),Fi=d({},ou,{relatedTarget:0}),Cs=Jr(Fi),su=d({},Fa,{animationName:0,elapsedTime:0,pseudoElement:0}),Uo=Jr(su),Jh=d({},Fa,{clipboardData:function(f){return"clipboardData"in f?f.clipboardData:window.clipboardData}}),Mm=Jr(Jh),Yd=d({},Fa,{data:0}),ui=Jr(Yd),Ci={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},qd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zd(f){var p=this.nativeEvent;return p.getModifierState?p.getModifierState(f):(f=qd[f])?!!p[f]:!1}function ks(){return Zd}var Kd=d({},ou,{key:function(f){if(f.key){var p=Ci[f.key]||f.key;if(p!=="Unidentified")return p}return f.type==="keypress"?(f=Fo(f),f===13?"Enter":String.fromCharCode(f)):f.type==="keydown"||f.type==="keyup"?Xd[f.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ks,charCode:function(f){return f.type==="keypress"?Fo(f):0},keyCode:function(f){return f.type==="keydown"||f.type==="keyup"?f.keyCode:0},which:function(f){return f.type==="keypress"?Fo(f):f.type==="keydown"||f.type==="keyup"?f.keyCode:0}}),Ns=Jr(Kd),ei=d({},Vn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lu=Jr(ei),Ca=d({},ou,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ks}),uu=Jr(Ca),sl=d({},Fa,{propertyName:0,elapsedTime:0,pseudoElement:0}),Qd=Jr(sl),cu=d({},Vn,{deltaX:function(f){return"deltaX"in f?f.deltaX:"wheelDeltaX"in f?-f.wheelDeltaX:0},deltaY:function(f){return"deltaY"in f?f.deltaY:"wheelDeltaY"in f?-f.wheelDeltaY:"wheelDelta"in f?-f.wheelDelta:0},deltaZ:0,deltaMode:0}),Dm=Jr(cu),Lm=d({},Fa,{newState:0,oldState:0}),ll=Jr(Lm),fc=[9,13,27,32],du=Dt&&"CompositionEvent"in window,As=null;Dt&&"documentMode"in document&&(As=document.documentMode);var hc=Dt&&"TextEvent"in window&&!As,ul=Dt&&(!du||As&&8<As&&11>=As),vc=" ",fu=!1;function Jd(f,p){switch(f){case"keyup":return fc.indexOf(p.keyCode)!==-1;case"keydown":return p.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ev(f){return f=f.detail,typeof f=="object"&&"data"in f?f.data:null}var Ms=!1;function Em(f,p){switch(f){case"compositionend":return ev(p);case"keypress":return p.which!==32?null:(fu=!0,vc);case"textInput":return f=p.data,f===vc&&fu?null:f;default:return null}}function Rm(f,p){if(Ms)return f==="compositionend"||!du&&Jd(f,p)?(f=ca(),Jn=Bn=Ta=null,Ms=!1,f):null;switch(f){case"paste":return null;case"keypress":if(!(p.ctrlKey||p.altKey||p.metaKey)||p.ctrlKey&&p.altKey){if(p.char&&1<p.char.length)return p.char;if(p.which)return String.fromCharCode(p.which)}return null;case"compositionend":return ul&&p.locale!=="ko"?null:p.data;default:return null}}var Pm={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function hu(f){var p=f&&f.nodeName&&f.nodeName.toLowerCase();return p==="input"?!!Pm[f.type]:p==="textarea"}function cl(f,p,y,S){On?_i?_i.push(S):_i=[S]:On=S,p=Jx(p,"onChange"),0<p.length&&(y=new Vi("onChange","change",null,y,S),f.push({event:y,listeners:p}))}var dl=null,fl=null;function tv(f){Ij(f,0)}function X(f){var p=Kr(f);if(xn(p))return f}function Le(f,p){if(f==="change")return p}var Re=!1;if(Dt){var Ge;if(Dt){var Br="oninput"in document;if(!Br){var or=document.createElement("div");or.setAttribute("oninput","return;"),Br=typeof or.oninput=="function"}Ge=Br}else Ge=!1;Re=Ge&&(!document.documentMode||9<document.documentMode)}function Fn(){dl&&(dl.detachEvent("onpropertychange",on),fl=dl=null)}function on(f){if(f.propertyName==="value"&&X(fl)){var p=[];cl(p,fl,f,Ue(f)),il(tv,p)}}function Ds(f,p,y){f==="focusin"?(Fn(),dl=p,fl=y,dl.attachEvent("onpropertychange",on)):f==="focusout"&&Fn()}function Im(f){if(f==="selectionchange"||f==="keyup"||f==="keydown")return X(fl)}function jm(f,p){if(f==="click")return X(p)}function Om(f,p){if(f==="input"||f==="change")return X(p)}function zm(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var Ht=typeof Object.is=="function"?Object.is:zm;function ki(f,p){if(Ht(f,p))return!0;if(typeof f!="object"||f===null||typeof p!="object"||p===null)return!1;var y=Object.keys(f),S=Object.keys(p);if(y.length!==S.length)return!1;for(S=0;S<y.length;S++){var N=y[S];if(!Jt.call(p,N)||!Ht(f[N],p[N]))return!1}return!0}function bo(f){for(;f&&f.firstChild;)f=f.firstChild;return f}function sn(f,p){var y=bo(f);f=0;for(var S;y;){if(y.nodeType===3){if(S=f+y.textContent.length,f<=p&&S>=p)return{node:y,offset:p-f};f=S}e:{for(;y;){if(y.nextSibling){y=y.nextSibling;break e}y=y.parentNode}y=void 0}y=bo(y)}}function hl(f,p){return f&&p?f===p?!0:f&&f.nodeType===3?!1:p&&p.nodeType===3?hl(f,p.parentNode):"contains"in f?f.contains(p):f.compareDocumentPosition?!!(f.compareDocumentPosition(p)&16):!1:!1}function vu(f){f=f!=null&&f.ownerDocument!=null&&f.ownerDocument.defaultView!=null?f.ownerDocument.defaultView:window;for(var p=Or(f.document);p instanceof f.HTMLIFrameElement;){try{var y=typeof p.contentWindow.location.href=="string"}catch{y=!1}if(y)f=p.contentWindow;else break;p=Or(f.document)}return p}function pc(f){var p=f&&f.nodeName&&f.nodeName.toLowerCase();return p&&(p==="input"&&(f.type==="text"||f.type==="search"||f.type==="tel"||f.type==="url"||f.type==="password")||p==="textarea"||f.contentEditable==="true")}var y2=Dt&&"documentMode"in document&&11>=document.documentMode,mc=null,Bm=null,ef=null,Vm=!1;function Fm(f,p,y){var S=y.window===y?y.document:y.nodeType===9?y:y.ownerDocument;Vm||mc==null||mc!==Or(S)||(S=mc,"selectionStart"in S&&pc(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),ef&&ki(ef,S)||(ef=S,S=Jx(Bm,"onSelect"),0<S.length&&(p=new Vi("onSelect","select",null,p,y),f.push({event:p,listeners:S}),p.target=mc)))}function vl(f,p){var y={};return y[f.toLowerCase()]=p.toLowerCase(),y["Webkit"+f]="webkit"+p,y["Moz"+f]="moz"+p,y}var Y={animationend:vl("Animation","AnimationEnd"),animationiteration:vl("Animation","AnimationIteration"),animationstart:vl("Animation","AnimationStart"),transitionrun:vl("Transition","TransitionRun"),transitionstart:vl("Transition","TransitionStart"),transitioncancel:vl("Transition","TransitionCancel"),transitionend:vl("Transition","TransitionEnd")},ee={},oe={};Dt&&(oe=document.createElement("div").style,"AnimationEvent"in window||(delete Y.animationend.animation,delete Y.animationiteration.animation,delete Y.animationstart.animation),"TransitionEvent"in window||delete Y.transitionend.transition);function ke(f){if(ee[f])return ee[f];if(!Y[f])return f;var p=Y[f],y;for(y in p)if(p.hasOwnProperty(y)&&y in oe)return ee[f]=p[y];return f}var qe=ke("animationend"),lt=ke("animationiteration"),It=ke("animationstart"),Ga=ke("transitionrun"),Gn=ke("transitionstart"),ka=ke("transitioncancel"),tf=ke("transitionend"),Ls=new Map,rv="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");rv.push("scrollEnd");function ea(f,p){Ls.set(f,p),Pn(p,[f])}var gc=typeof reportError=="function"?reportError:function(f){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var p=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof f=="object"&&f!==null&&typeof f.message=="string"?String(f.message):String(f),error:f});if(!window.dispatchEvent(p))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",f);return}console.error(f)},Ni=[],$o=0,x2=0;function fx(){for(var f=$o,p=x2=$o=0;p<f;){var y=Ni[p];Ni[p++]=null;var S=Ni[p];Ni[p++]=null;var N=Ni[p];Ni[p++]=null;var D=Ni[p];if(Ni[p++]=null,S!==null&&N!==null){var B=S.pending;B===null?N.next=N:(N.next=B.next,B.next=N),S.pending=N}D!==0&&mP(y,N,D)}}function hx(f,p,y,S){Ni[$o++]=f,Ni[$o++]=p,Ni[$o++]=y,Ni[$o++]=S,x2|=S,f.lanes|=S,f=f.alternate,f!==null&&(f.lanes|=S)}function b2(f,p,y,S){return hx(f,p,y,S),vx(f)}function rf(f,p){return hx(f,null,null,p),vx(f)}function mP(f,p,y){f.lanes|=y;var S=f.alternate;S!==null&&(S.lanes|=y);for(var N=!1,D=f.return;D!==null;)D.childLanes|=y,S=D.alternate,S!==null&&(S.childLanes|=y),D.tag===22&&(f=D.stateNode,f===null||f._visibility&1||(N=!0)),f=D,D=D.return;return f.tag===3?(D=f.stateNode,N&&p!==null&&(N=31-ye(y),f=D.hiddenUpdates,S=f[N],S===null?f[N]=[p]:S.push(p),p.lane=y|536870912),D):null}function vx(f){if(50<ug)throw ug=0,MT=null,Error(a(185));for(var p=f.return;p!==null;)f=p,p=f.return;return f.tag===3?f.stateNode:null}var av={};function _J(f,p,y,S){this.tag=f,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=S,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wo(f,p,y,S){return new _J(f,p,y,S)}function w2(f){return f=f.prototype,!(!f||!f.isReactComponent)}function pu(f,p){var y=f.alternate;return y===null?(y=wo(f.tag,p,f.key,f.mode),y.elementType=f.elementType,y.type=f.type,y.stateNode=f.stateNode,y.alternate=f,f.alternate=y):(y.pendingProps=p,y.type=f.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=f.flags&65011712,y.childLanes=f.childLanes,y.lanes=f.lanes,y.child=f.child,y.memoizedProps=f.memoizedProps,y.memoizedState=f.memoizedState,y.updateQueue=f.updateQueue,p=f.dependencies,y.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},y.sibling=f.sibling,y.index=f.index,y.ref=f.ref,y.refCleanup=f.refCleanup,y}function gP(f,p){f.flags&=65011714;var y=f.alternate;return y===null?(f.childLanes=0,f.lanes=p,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=y.childLanes,f.lanes=y.lanes,f.child=y.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=y.memoizedProps,f.memoizedState=y.memoizedState,f.updateQueue=y.updateQueue,f.type=y.type,p=y.dependencies,f.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext}),f}function px(f,p,y,S,N,D){var B=0;if(S=f,typeof f=="function")w2(f)&&(B=1);else if(typeof f=="string")B=Aee(f,y,ie.current)?26:f==="html"||f==="head"||f==="body"?27:5;else e:switch(f){case R:return f=wo(31,y,p,N),f.elementType=R,f.lanes=D,f;case x:return af(y.children,N,D,p);case b:B=8,N|=24;break;case w:return f=wo(12,y,p,N|2),f.elementType=w,f.lanes=D,f;case k:return f=wo(13,y,p,N),f.elementType=k,f.lanes=D,f;case A:return f=wo(19,y,p,N),f.elementType=A,f.lanes=D,f;default:if(typeof f=="object"&&f!==null)switch(f.$$typeof){case T:B=10;break e;case _:B=9;break e;case C:B=11;break e;case M:B=14;break e;case L:B=16,S=null;break e}B=29,y=Error(a(130,f===null?"null":typeof f,"")),S=null}return p=wo(B,y,p,N),p.elementType=f,p.type=S,p.lanes=D,p}function af(f,p,y,S){return f=wo(7,f,S,p),f.lanes=y,f}function S2(f,p,y){return f=wo(6,f,null,p),f.lanes=y,f}function yP(f){var p=wo(18,null,null,0);return p.stateNode=f,p}function _2(f,p,y){return p=wo(4,f.children!==null?f.children:[],f.key,p),p.lanes=y,p.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},p}var xP=new WeakMap;function Wo(f,p){if(typeof f=="object"&&f!==null){var y=xP.get(f);return y!==void 0?y:(p={value:f,source:p,stack:kt(p)},xP.set(f,p),p)}return{value:f,source:p,stack:kt(p)}}var nv=[],iv=0,mx=null,Gm=0,Yo=[],Xo=0,yc=null,pl=1,ml="";function mu(f,p){nv[iv++]=Gm,nv[iv++]=mx,mx=f,Gm=p}function bP(f,p,y){Yo[Xo++]=pl,Yo[Xo++]=ml,Yo[Xo++]=yc,yc=f;var S=pl;f=ml;var N=32-ye(S)-1;S&=~(1<<N),y+=1;var D=32-ye(p)+N;if(30<D){var B=N-N%5;D=(S&(1<<B)-1).toString(32),S>>=B,N-=B,pl=1<<32-ye(p)+N|y<<N|S,ml=D+f}else pl=1<<D|y<<N|S,ml=f}function T2(f){f.return!==null&&(mu(f,1),bP(f,1,0))}function C2(f){for(;f===mx;)mx=nv[--iv],nv[iv]=null,Gm=nv[--iv],nv[iv]=null;for(;f===yc;)yc=Yo[--Xo],Yo[Xo]=null,ml=Yo[--Xo],Yo[Xo]=null,pl=Yo[--Xo],Yo[Xo]=null}function wP(f,p){Yo[Xo++]=pl,Yo[Xo++]=ml,Yo[Xo++]=yc,pl=p.id,ml=p.overflow,yc=f}var ci=null,Na=null,Sr=!1,xc=null,qo=!1,k2=Error(a(519));function bc(f){var p=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Hm(Wo(p,f)),k2}function SP(f){var p=f.stateNode,y=f.type,S=f.memoizedProps;switch(p[Ze]=f,p[wr]=S,y){case"dialog":vr("cancel",p),vr("close",p);break;case"iframe":case"object":case"embed":vr("load",p);break;case"video":case"audio":for(y=0;y<dg.length;y++)vr(dg[y],p);break;case"source":vr("error",p);break;case"img":case"image":case"link":vr("error",p),vr("load",p);break;case"details":vr("toggle",p);break;case"input":vr("invalid",p),Si(p,S.value,S.defaultValue,S.checked,S.defaultChecked,S.type,S.name,!0);break;case"select":vr("invalid",p);break;case"textarea":vr("invalid",p),de(p,S.value,S.defaultValue,S.children)}y=S.children,typeof y!="string"&&typeof y!="number"&&typeof y!="bigint"||p.textContent===""+y||S.suppressHydrationWarning===!0||Bj(p.textContent,y)?(S.popover!=null&&(vr("beforetoggle",p),vr("toggle",p)),S.onScroll!=null&&vr("scroll",p),S.onScrollEnd!=null&&vr("scrollend",p),S.onClick!=null&&(p.onclick=Ya),p=!0):p=!1,p||bc(f,!0)}function _P(f){for(ci=f.return;ci;)switch(ci.tag){case 5:case 31:case 13:qo=!1;return;case 27:case 3:qo=!0;return;default:ci=ci.return}}function ov(f){if(f!==ci)return!1;if(!Sr)return _P(f),Sr=!0,!1;var p=f.tag,y;if((y=p!==3&&p!==27)&&((y=p===5)&&(y=f.type,y=!(y!=="form"&&y!=="button")||UT(f.type,f.memoizedProps)),y=!y),y&&Na&&bc(f),_P(f),p===13){if(f=f.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));Na=Xj(f)}else if(p===31){if(f=f.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));Na=Xj(f)}else p===27?(p=Na,Pc(f.type)?(f=qT,qT=null,Na=f):Na=p):Na=ci?Ko(f.stateNode.nextSibling):null;return!0}function nf(){Na=ci=null,Sr=!1}function N2(){var f=xc;return f!==null&&(no===null?no=f:no.push.apply(no,f),xc=null),f}function Hm(f){xc===null?xc=[f]:xc.push(f)}var A2=H(null),of=null,gu=null;function wc(f,p,y){te(A2,p._currentValue),p._currentValue=y}function yu(f){f._currentValue=A2.current,Z(A2)}function M2(f,p,y){for(;f!==null;){var S=f.alternate;if((f.childLanes&p)!==p?(f.childLanes|=p,S!==null&&(S.childLanes|=p)):S!==null&&(S.childLanes&p)!==p&&(S.childLanes|=p),f===y)break;f=f.return}}function D2(f,p,y,S){var N=f.child;for(N!==null&&(N.return=f);N!==null;){var D=N.dependencies;if(D!==null){var B=N.child;D=D.firstContext;e:for(;D!==null;){var W=D;D=N;for(var Q=0;Q<p.length;Q++)if(W.context===p[Q]){D.lanes|=y,W=D.alternate,W!==null&&(W.lanes|=y),M2(D.return,y,f),S||(B=null);break e}D=W.next}}else if(N.tag===18){if(B=N.return,B===null)throw Error(a(341));B.lanes|=y,D=B.alternate,D!==null&&(D.lanes|=y),M2(B,y,f),B=null}else B=N.child;if(B!==null)B.return=N;else for(B=N;B!==null;){if(B===f){B=null;break}if(N=B.sibling,N!==null){N.return=B.return,B=N;break}B=B.return}N=B}}function sv(f,p,y,S){f=null;for(var N=p,D=!1;N!==null;){if(!D){if((N.flags&524288)!==0)D=!0;else if((N.flags&262144)!==0)break}if(N.tag===10){var B=N.alternate;if(B===null)throw Error(a(387));if(B=B.memoizedProps,B!==null){var W=N.type;Ht(N.pendingProps.value,B.value)||(f!==null?f.push(W):f=[W])}}else if(N===ze.current){if(B=N.alternate,B===null)throw Error(a(387));B.memoizedState.memoizedState!==N.memoizedState.memoizedState&&(f!==null?f.push(mg):f=[mg])}N=N.return}f!==null&&D2(p,f,y,S),p.flags|=262144}function gx(f){for(f=f.firstContext;f!==null;){if(!Ht(f.context._currentValue,f.memoizedValue))return!0;f=f.next}return!1}function sf(f){of=f,gu=null,f=f.dependencies,f!==null&&(f.firstContext=null)}function di(f){return TP(of,f)}function yx(f,p){return of===null&&sf(f),TP(f,p)}function TP(f,p){var y=p._currentValue;if(p={context:p,memoizedValue:y,next:null},gu===null){if(f===null)throw Error(a(308));gu=p,f.dependencies={lanes:0,firstContext:p},f.flags|=524288}else gu=gu.next=p;return y}var TJ=typeof AbortController<"u"?AbortController:function(){var f=[],p=this.signal={aborted:!1,addEventListener:function(y,S){f.push(S)}};this.abort=function(){p.aborted=!0,f.forEach(function(y){return y()})}},CJ=t.unstable_scheduleCallback,kJ=t.unstable_NormalPriority,wn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function L2(){return{controller:new TJ,data:new Map,refCount:0}}function Um(f){f.refCount--,f.refCount===0&&CJ(kJ,function(){f.controller.abort()})}var $m=null,E2=0,lv=0,uv=null;function NJ(f,p){if($m===null){var y=$m=[];E2=0,lv=IT(),uv={status:"pending",value:void 0,then:function(S){y.push(S)}}}return E2++,p.then(CP,CP),p}function CP(){if(--E2===0&&$m!==null){uv!==null&&(uv.status="fulfilled");var f=$m;$m=null,lv=0,uv=null;for(var p=0;p<f.length;p++)(0,f[p])()}}function AJ(f,p){var y=[],S={status:"pending",value:null,reason:null,then:function(N){y.push(N)}};return f.then(function(){S.status="fulfilled",S.value=p;for(var N=0;N<y.length;N++)(0,y[N])(p)},function(N){for(S.status="rejected",S.reason=N,N=0;N<y.length;N++)(0,y[N])(void 0)}),S}var kP=O.S;O.S=function(f,p){uj=dr(),typeof p=="object"&&p!==null&&typeof p.then=="function"&&NJ(f,p),kP!==null&&kP(f,p)};var lf=H(null);function R2(){var f=lf.current;return f!==null?f:da.pooledCache}function xx(f,p){p===null?te(lf,lf.current):te(lf,p.pool)}function NP(){var f=R2();return f===null?null:{parent:wn._currentValue,pool:f}}var cv=Error(a(460)),P2=Error(a(474)),bx=Error(a(542)),Sx={then:function(){}};function AP(f){return f=f.status,f==="fulfilled"||f==="rejected"}function MP(f,p,y){switch(y=f[y],y===void 0?f.push(p):y!==p&&(p.then(Ya,Ya),p=y),p.status){case"fulfilled":return p.value;case"rejected":throw f=p.reason,LP(f),f;default:if(typeof p.status=="string")p.then(Ya,Ya);else{if(f=da,f!==null&&100<f.shellSuspendCounter)throw Error(a(482));f=p,f.status="pending",f.then(function(S){if(p.status==="pending"){var N=p;N.status="fulfilled",N.value=S}},function(S){if(p.status==="pending"){var N=p;N.status="rejected",N.reason=S}})}switch(p.status){case"fulfilled":return p.value;case"rejected":throw f=p.reason,LP(f),f}throw cf=p,cv}}function uf(f){try{var p=f._init;return p(f._payload)}catch(y){throw y!==null&&typeof y=="object"&&typeof y.then=="function"?(cf=y,cv):y}}var cf=null;function DP(){if(cf===null)throw Error(a(459));var f=cf;return cf=null,f}function LP(f){if(f===cv||f===bx)throw Error(a(483))}var dv=null,Wm=0;function _x(f){var p=Wm;return Wm+=1,dv===null&&(dv=[]),MP(dv,f,p)}function Ym(f,p){p=p.props.ref,f.ref=p!==void 0?p:null}function Tx(f,p){throw p.$$typeof===h?Error(a(525)):(f=Object.prototype.toString.call(p),Error(a(31,f==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":f)))}function EP(f){function p(ue,ae){if(f){var fe=ue.deletions;fe===null?(ue.deletions=[ae],ue.flags|=16):fe.push(ae)}}function y(ue,ae){if(!f)return null;for(;ae!==null;)p(ue,ae),ae=ae.sibling;return null}function S(ue){for(var ae=new Map;ue!==null;)ue.key!==null?ae.set(ue.key,ue):ae.set(ue.index,ue),ue=ue.sibling;return ae}function N(ue,ae){return ue=pu(ue,ae),ue.index=0,ue.sibling=null,ue}function D(ue,ae,fe){return ue.index=fe,f?(fe=ue.alternate,fe!==null?(fe=fe.index,fe<ae?(ue.flags|=67108866,ae):fe):(ue.flags|=67108866,ae)):(ue.flags|=1048576,ae)}function B(ue){return f&&ue.alternate===null&&(ue.flags|=67108866),ue}function W(ue,ae,fe,De){return ae===null||ae.tag!==6?(ae=S2(fe,ue.mode,De),ae.return=ue,ae):(ae=N(ae,fe),ae.return=ue,ae)}function Q(ue,ae,fe,De){var _t=fe.type;return _t===x?Ae(ue,ae,fe.props.children,De,fe.key):ae!==null&&(ae.elementType===_t||typeof _t=="object"&&_t!==null&&_t.$$typeof===L&&uf(_t)===ae.type)?(ae=N(ae,fe.props),Ym(ae,fe),ae.return=ue,ae):(ae=px(fe.type,fe.key,fe.props,null,ue.mode,De),Ym(ae,fe),ae.return=ue,ae)}function he(ue,ae,fe,De){return ae===null||ae.tag!==4||ae.stateNode.containerInfo!==fe.containerInfo||ae.stateNode.implementation!==fe.implementation?(ae=_2(fe,ue.mode,De),ae.return=ue,ae):(ae=N(ae,fe.children||[]),ae.return=ue,ae)}function Ae(ue,ae,fe,De,_t){return ae===null||ae.tag!==7?(ae=af(fe,ue.mode,De,_t),ae.return=ue,ae):(ae=N(ae,fe),ae.return=ue,ae)}function Ee(ue,ae,fe){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return ae=S2(""+ae,ue.mode,fe),ae.return=ue,ae;if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case v:return fe=px(ae.type,ae.key,ae.props,null,ue.mode,fe),Ym(fe,ae),fe.return=ue,fe;case m:return ae=_2(ae,ue.mode,fe),ae.return=ue,ae;case L:return ae=uf(ae),Ee(ue,ae,fe)}if(G(ae)||V(ae))return ae=af(ae,ue.mode,fe,null),ae.return=ue,ae;if(typeof ae.then=="function")return Ee(ue,_x(ae),fe);if(ae.$$typeof===T)return Ee(ue,yx(ue,ae),fe);Tx(ue,ae)}return null}function pe(ue,ae,fe,De){var _t=ae!==null?ae.key:null;if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return _t!==null?null:W(ue,ae,""+fe,De);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case v:return fe.key===_t?Q(ue,ae,fe,De):null;case m:return fe.key===_t?he(ue,ae,fe,De):null;case L:return fe=uf(fe),pe(ue,ae,fe,De)}if(G(fe)||V(fe))return _t!==null?null:Ae(ue,ae,fe,De,null);if(typeof fe.then=="function")return pe(ue,ae,_x(fe),De);if(fe.$$typeof===T)return pe(ue,ae,yx(ue,fe),De);Tx(ue,fe)}return null}function we(ue,ae,fe,De,_t){if(typeof De=="string"&&De!==""||typeof De=="number"||typeof De=="bigint")return ue=ue.get(fe)||null,W(ae,ue,""+De,_t);if(typeof De=="object"&&De!==null){switch(De.$$typeof){case v:return ue=ue.get(De.key===null?fe:De.key)||null,Q(ae,ue,De,_t);case m:return ue=ue.get(De.key===null?fe:De.key)||null,he(ae,ue,De,_t);case L:return De=uf(De),we(ue,ae,fe,De,_t)}if(G(De)||V(De))return ue=ue.get(fe)||null,Ae(ae,ue,De,_t,null);if(typeof De.then=="function")return we(ue,ae,fe,_x(De),_t);if(De.$$typeof===T)return we(ue,ae,fe,yx(ae,De),_t);Tx(ae,De)}return null}function ft(ue,ae,fe,De){for(var _t=null,Lr=null,yt=ae,er=ae=0,br=null;yt!==null&&er<fe.length;er++){yt.index>er?(br=yt,yt=null):br=yt.sibling;var Er=pe(ue,yt,fe[er],De);if(Er===null){yt===null&&(yt=br);break}f&&yt&&Er.alternate===null&&p(ue,yt),ae=D(Er,ae,er),Lr===null?_t=Er:Lr.sibling=Er,Lr=Er,yt=br}if(er===fe.length)return y(ue,yt),Sr&&mu(ue,er),_t;if(yt===null){for(;er<fe.length;er++)yt=Ee(ue,fe[er],De),yt!==null&&(ae=D(yt,ae,er),Lr===null?_t=yt:Lr.sibling=yt,Lr=yt);return Sr&&mu(ue,er),_t}for(yt=S(yt);er<fe.length;er++)br=we(yt,ue,er,fe[er],De),br!==null&&(f&&br.alternate!==null&&yt.delete(br.key===null?er:br.key),ae=D(br,ae,er),Lr===null?_t=br:Lr.sibling=br,Lr=br);return f&&yt.forEach(function(Bc){return p(ue,Bc)}),Sr&&mu(ue,er),_t}function Lt(ue,ae,fe,De){if(fe==null)throw Error(a(151));for(var _t=null,Lr=null,yt=ae,er=ae=0,br=null,Er=fe.next();yt!==null&&!Er.done;er++,Er=fe.next()){yt.index>er?(br=yt,yt=null):br=yt.sibling;var Bc=pe(ue,yt,Er.value,De);if(Bc===null){yt===null&&(yt=br);break}f&&yt&&Bc.alternate===null&&p(ue,yt),ae=D(Bc,ae,er),Lr===null?_t=Bc:Lr.sibling=Bc,Lr=Bc,yt=br}if(Er.done)return y(ue,yt),Sr&&mu(ue,er),_t;if(yt===null){for(;!Er.done;er++,Er=fe.next())Er=Ee(ue,Er.value,De),Er!==null&&(ae=D(Er,ae,er),Lr===null?_t=Er:Lr.sibling=Er,Lr=Er);return Sr&&mu(ue,er),_t}for(yt=S(yt);!Er.done;er++,Er=fe.next())Er=we(yt,ue,er,Er.value,De),Er!==null&&(f&&Er.alternate!==null&&yt.delete(Er.key===null?er:Er.key),ae=D(Er,ae,er),Lr===null?_t=Er:Lr.sibling=Er,Lr=Er);return f&&yt.forEach(function(Bee){return p(ue,Bee)}),Sr&&mu(ue,er),_t}function aa(ue,ae,fe,De){if(typeof fe=="object"&&fe!==null&&fe.type===x&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case v:e:{for(var _t=fe.key;ae!==null;){if(ae.key===_t){if(_t=fe.type,_t===x){if(ae.tag===7){y(ue,ae.sibling),De=N(ae,fe.props.children),De.return=ue,ue=De;break e}}else if(ae.elementType===_t||typeof _t=="object"&&_t!==null&&_t.$$typeof===L&&uf(_t)===ae.type){y(ue,ae.sibling),De=N(ae,fe.props),Ym(De,fe),De.return=ue,ue=De;break e}y(ue,ae);break}else p(ue,ae);ae=ae.sibling}fe.type===x?(De=af(fe.props.children,ue.mode,De,fe.key),De.return=ue,ue=De):(De=px(fe.type,fe.key,fe.props,null,ue.mode,De),Ym(De,fe),De.return=ue,ue=De)}return B(ue);case m:e:{for(_t=fe.key;ae!==null;){if(ae.key===_t)if(ae.tag===4&&ae.stateNode.containerInfo===fe.containerInfo&&ae.stateNode.implementation===fe.implementation){y(ue,ae.sibling),De=N(ae,fe.children||[]),De.return=ue,ue=De;break e}else{y(ue,ae);break}else p(ue,ae);ae=ae.sibling}De=_2(fe,ue.mode,De),De.return=ue,ue=De}return B(ue);case L:return fe=uf(fe),aa(ue,ae,fe,De)}if(G(fe))return ft(ue,ae,fe,De);if(V(fe)){if(_t=V(fe),typeof _t!="function")throw Error(a(150));return fe=_t.call(fe),Lt(ue,ae,fe,De)}if(typeof fe.then=="function")return aa(ue,ae,_x(fe),De);if(fe.$$typeof===T)return aa(ue,ae,yx(ue,fe),De);Tx(ue,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,ae!==null&&ae.tag===6?(y(ue,ae.sibling),De=N(ae,fe),De.return=ue,ue=De):(y(ue,ae),De=S2(fe,ue.mode,De),De.return=ue,ue=De),B(ue)):y(ue,ae)}return function(ue,ae,fe,De){try{Wm=0;var _t=aa(ue,ae,fe,De);return dv=null,_t}catch(yt){if(yt===cv||yt===bx)throw yt;var Lr=wo(29,yt,null,ue.mode);return Lr.lanes=De,Lr.return=ue,Lr}finally{}}}var df=EP(!0),RP=EP(!1),Sc=!1;function I2(f){f.updateQueue={baseState:f.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function j2(f,p){f=f.updateQueue,p.updateQueue===f&&(p.updateQueue={baseState:f.baseState,firstBaseUpdate:f.firstBaseUpdate,lastBaseUpdate:f.lastBaseUpdate,shared:f.shared,callbacks:null})}function _c(f){return{lane:f,tag:0,payload:null,callback:null,next:null}}function Tc(f,p,y){var S=f.updateQueue;if(S===null)return null;if(S=S.shared,(Pr&2)!==0){var N=S.pending;return N===null?p.next=p:(p.next=N.next,N.next=p),S.pending=p,p=vx(f),mP(f,null,y),p}return hx(f,S,p,y),vx(f)}function Xm(f,p,y){if(p=p.updateQueue,p!==null&&(p=p.shared,(y&4194048)!==0)){var S=p.lanes;S&=f.pendingLanes,y|=S,p.lanes=y,Da(f,y)}}function O2(f,p){var y=f.updateQueue,S=f.alternate;if(S!==null&&(S=S.updateQueue,y===S)){var N=null,D=null;if(y=y.firstBaseUpdate,y!==null){do{var B={lane:y.lane,tag:y.tag,payload:y.payload,callback:null,next:null};D===null?N=D=B:D=D.next=B,y=y.next}while(y!==null);D===null?N=D=p:D=D.next=p}else N=D=p;y={baseState:S.baseState,firstBaseUpdate:N,lastBaseUpdate:D,shared:S.shared,callbacks:S.callbacks},f.updateQueue=y;return}f=y.lastBaseUpdate,f===null?y.firstBaseUpdate=p:f.next=p,y.lastBaseUpdate=p}var z2=!1;function qm(){if(z2){var f=uv;if(f!==null)throw f}}function Zm(f,p,y,S){z2=!1;var N=f.updateQueue;Sc=!1;var D=N.firstBaseUpdate,B=N.lastBaseUpdate,W=N.shared.pending;if(W!==null){N.shared.pending=null;var Q=W,he=Q.next;Q.next=null,B===null?D=he:B.next=he,B=Q;var Ae=f.alternate;Ae!==null&&(Ae=Ae.updateQueue,W=Ae.lastBaseUpdate,W!==B&&(W===null?Ae.firstBaseUpdate=he:W.next=he,Ae.lastBaseUpdate=Q))}if(D!==null){var Ee=N.baseState;B=0,Ae=he=Q=null,W=D;do{var pe=W.lane&-536870913,we=pe!==W.lane;if(we?(xr&pe)===pe:(S&pe)===pe){pe!==0&&pe===lv&&(z2=!0),Ae!==null&&(Ae=Ae.next={lane:0,tag:W.tag,payload:W.payload,callback:null,next:null});e:{var ft=f,Lt=W;pe=p;var aa=y;switch(Lt.tag){case 1:if(ft=Lt.payload,typeof ft=="function"){Ee=ft.call(aa,Ee,pe);break e}Ee=ft;break e;case 3:ft.flags=ft.flags&-65537|128;case 0:if(ft=Lt.payload,pe=typeof ft=="function"?ft.call(aa,Ee,pe):ft,pe==null)break e;Ee=d({},Ee,pe);break e;case 2:Sc=!0}}pe=W.callback,pe!==null&&(f.flags|=64,we&&(f.flags|=8192),we=N.callbacks,we===null?N.callbacks=[pe]:we.push(pe))}else we={lane:pe,tag:W.tag,payload:W.payload,callback:W.callback,next:null},Ae===null?(he=Ae=we,Q=Ee):Ae=Ae.next=we,B|=pe;if(W=W.next,W===null){if(W=N.shared.pending,W===null)break;we=W,W=we.next,we.next=null,N.lastBaseUpdate=we,N.shared.pending=null}}while(!0);Ae===null&&(Q=Ee),N.baseState=Q,N.firstBaseUpdate=he,N.lastBaseUpdate=Ae,D===null&&(N.shared.lanes=0),Mc|=B,f.lanes=B,f.memoizedState=Ee}}function PP(f,p){if(typeof f!="function")throw Error(a(191,f));f.call(p)}function IP(f,p){var y=f.callbacks;if(y!==null)for(f.callbacks=null,f=0;f<y.length;f++)PP(y[f],p)}var fv=H(null),Cx=H(0);function jP(f,p){f=Nu,te(Cx,f),te(fv,p),Nu=f|p.baseLanes}function B2(){te(Cx,Nu),te(fv,fv.current)}function V2(){Nu=Cx.current,Z(fv),Z(Cx)}var So=H(null),Zo=null;function Cc(f){var p=f.alternate;te(ln,ln.current&1),te(So,f),Zo===null&&(p===null||fv.current!==null||p.memoizedState!==null)&&(Zo=f)}function F2(f){te(ln,ln.current),te(So,f),Zo===null&&(Zo=f)}function OP(f){f.tag===22?(te(ln,ln.current),te(So,f),Zo===null&&(Zo=f)):kc()}function kc(){te(ln,ln.current),te(So,So.current)}function _o(f){Z(So),Zo===f&&(Zo=null),Z(ln)}var ln=H(0);function kx(f){for(var p=f;p!==null;){if(p.tag===13){var y=p.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||YT(y)||XT(y)))return p}else if(p.tag===19&&(p.memoizedProps.revealOrder==="forwards"||p.memoizedProps.revealOrder==="backwards"||p.memoizedProps.revealOrder==="unstable_legacy-backwards"||p.memoizedProps.revealOrder==="together")){if((p.flags&128)!==0)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===f)break;for(;p.sibling===null;){if(p.return===null||p.return===f)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var xu=0,Kt=null,ta=null,Sn=null,Nx=!1,hv=!1,ff=!1,Ax=0,Km=0,vv=null,MJ=0;function Xa(){throw Error(a(321))}function G2(f,p){if(p===null)return!1;for(var y=0;y<p.length&&y<f.length;y++)if(!Ht(f[y],p[y]))return!1;return!0}function H2(f,p,y,S,N,D){return xu=D,Kt=p,p.memoizedState=null,p.updateQueue=null,p.lanes=0,O.H=f===null||f.memoizedState===null?bI:nT,ff=!1,D=y(S,N),ff=!1,hv&&(D=BP(p,y,S,N)),zP(f),D}function zP(f){O.H=eg;var p=ta!==null&&ta.next!==null;if(xu=0,Sn=ta=Kt=null,Nx=!1,Km=0,vv=null,p)throw Error(a(300));f===null||_n||(f=f.dependencies,f!==null&&gx(f)&&(_n=!0))}function BP(f,p,y,S){Kt=f;var N=0;do{if(hv&&(vv=null),Km=0,hv=!1,25<=N)throw Error(a(301));if(N+=1,Sn=ta=null,f.updateQueue!=null){var D=f.updateQueue;D.lastEffect=null,D.events=null,D.stores=null,D.memoCache!=null&&(D.memoCache.index=0)}O.H=wI,D=p(y,S)}while(hv);return D}function DJ(){var f=O.H,p=f.useState()[0];return p=typeof p.then=="function"?Qm(p):p,f=f.useState()[0],(ta!==null?ta.memoizedState:null)!==f&&(Kt.flags|=1024),p}function U2(){var f=Ax!==0;return Ax=0,f}function $2(f,p,y){p.updateQueue=f.updateQueue,p.flags&=-2053,f.lanes&=~y}function W2(f){if(Nx){for(f=f.memoizedState;f!==null;){var p=f.queue;p!==null&&(p.pending=null),f=f.next}Nx=!1}xu=0,Sn=ta=Kt=null,hv=!1,Km=Ax=0,vv=null}function Gi(){var f={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Sn===null?Kt.memoizedState=Sn=f:Sn=Sn.next=f,Sn}function un(){if(ta===null){var f=Kt.alternate;f=f!==null?f.memoizedState:null}else f=ta.next;var p=Sn===null?Kt.memoizedState:Sn.next;if(p!==null)Sn=p,ta=f;else{if(f===null)throw Kt.alternate===null?Error(a(467)):Error(a(310));ta=f,f={memoizedState:ta.memoizedState,baseState:ta.baseState,baseQueue:ta.baseQueue,queue:ta.queue,next:null},Sn===null?Kt.memoizedState=Sn=f:Sn=Sn.next=f}return Sn}function Mx(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qm(f){var p=Km;return Km+=1,vv===null&&(vv=[]),f=MP(vv,f,p),p=Kt,(Sn===null?p.memoizedState:Sn.next)===null&&(p=p.alternate,O.H=p===null||p.memoizedState===null?bI:nT),f}function Dx(f){if(f!==null&&typeof f=="object"){if(typeof f.then=="function")return Qm(f);if(f.$$typeof===T)return di(f)}throw Error(a(438,String(f)))}function Y2(f){var p=null,y=Kt.updateQueue;if(y!==null&&(p=y.memoCache),p==null){var S=Kt.alternate;S!==null&&(S=S.updateQueue,S!==null&&(S=S.memoCache,S!=null&&(p={data:S.data.map(function(N){return N.slice()}),index:0})))}if(p==null&&(p={data:[],index:0}),y===null&&(y=Mx(),Kt.updateQueue=y),y.memoCache=p,y=p.data[p.index],y===void 0)for(y=p.data[p.index]=Array(f),S=0;S<f;S++)y[S]=P;return p.index++,y}function bu(f,p){return typeof p=="function"?p(f):p}function Lx(f){var p=un();return X2(p,ta,f)}function X2(f,p,y){var S=f.queue;if(S===null)throw Error(a(311));S.lastRenderedReducer=y;var N=f.baseQueue,D=S.pending;if(D!==null){if(N!==null){var B=N.next;N.next=D.next,D.next=B}p.baseQueue=N=D,S.pending=null}if(D=f.baseState,N===null)f.memoizedState=D;else{p=N.next;var W=B=null,Q=null,he=p,Ae=!1;do{var Ee=he.lane&-536870913;if(Ee!==he.lane?(xr&Ee)===Ee:(xu&Ee)===Ee){var pe=he.revertLane;if(pe===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null}),Ee===lv&&(Ae=!0);else if((xu&pe)===pe){he=he.next,pe===lv&&(Ae=!0);continue}else Ee={lane:0,revertLane:he.revertLane,gesture:null,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},Q===null?(W=Q=Ee,B=D):Q=Q.next=Ee,Kt.lanes|=pe,Mc|=pe;Ee=he.action,ff&&y(D,Ee),D=he.hasEagerState?he.eagerState:y(D,Ee)}else pe={lane:Ee,revertLane:he.revertLane,gesture:he.gesture,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},Q===null?(W=Q=pe,B=D):Q=Q.next=pe,Kt.lanes|=Ee,Mc|=Ee;he=he.next}while(he!==null&&he!==p);if(Q===null?B=D:Q.next=W,!Ht(D,f.memoizedState)&&(_n=!0,Ae&&(y=uv,y!==null)))throw y;f.memoizedState=D,f.baseState=B,f.baseQueue=Q,S.lastRenderedState=D}return N===null&&(S.lanes=0),[f.memoizedState,S.dispatch]}function q2(f){var p=un(),y=p.queue;if(y===null)throw Error(a(311));y.lastRenderedReducer=f;var S=y.dispatch,N=y.pending,D=p.memoizedState;if(N!==null){y.pending=null;var B=N=N.next;do D=f(D,B.action),B=B.next;while(B!==N);Ht(D,p.memoizedState)||(_n=!0),p.memoizedState=D,p.baseQueue===null&&(p.baseState=D),y.lastRenderedState=D}return[D,S]}function VP(f,p,y){var S=Kt,N=un(),D=Sr;if(D){if(y===void 0)throw Error(a(407));y=y()}else y=p();var B=!Ht((ta||N).memoizedState,y);if(B&&(N.memoizedState=y,_n=!0),N=N.queue,Q2(HP.bind(null,S,N,f),[f]),N.getSnapshot!==p||B||Sn!==null&&Sn.memoizedState.tag&1){if(S.flags|=2048,pv(9,{destroy:void 0},GP.bind(null,S,N,y,p),null),da===null)throw Error(a(349));D||(xu&127)!==0||FP(S,p,y)}return y}function FP(f,p,y){f.flags|=16384,f={getSnapshot:p,value:y},p=Kt.updateQueue,p===null?(p=Mx(),Kt.updateQueue=p,p.stores=[f]):(y=p.stores,y===null?p.stores=[f]:y.push(f))}function GP(f,p,y,S){p.value=y,p.getSnapshot=S,UP(p)&&$P(f)}function HP(f,p,y){return y(function(){UP(p)&&$P(f)})}function UP(f){var p=f.getSnapshot;f=f.value;try{var y=p();return!Ht(f,y)}catch{return!0}}function $P(f){var p=rf(f,2);p!==null&&io(p,f,2)}function Z2(f){var p=Gi();if(typeof f=="function"){var y=f;if(f=y(),ff){Hr(!0);try{y()}finally{Hr(!1)}}}return p.memoizedState=p.baseState=f,p.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bu,lastRenderedState:f},p}function WP(f,p,y,S){return f.baseState=y,X2(f,ta,typeof S=="function"?S:bu)}function LJ(f,p,y,S,N){if(Px(f))throw Error(a(485));if(f=p.action,f!==null){var D={payload:N,action:f,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){D.listeners.push(B)}};O.T!==null?y(!0):D.isTransition=!1,S(D),y=p.pending,y===null?(D.next=p.pending=D,YP(p,D)):(D.next=y.next,p.pending=y.next=D)}}function YP(f,p){var y=p.action,S=p.payload,N=f.state;if(p.isTransition){var D=O.T,B={};O.T=B;try{var W=y(N,S),Q=O.S;Q!==null&&Q(B,W),XP(f,p,W)}catch(he){K2(f,p,he)}finally{D!==null&&B.types!==null&&(D.types=B.types),O.T=D}}else try{D=y(N,S),XP(f,p,D)}catch(he){K2(f,p,he)}}function XP(f,p,y){y!==null&&typeof y=="object"&&typeof y.then=="function"?y.then(function(S){qP(f,p,S)},function(S){return K2(f,p,S)}):qP(f,p,y)}function qP(f,p,y){p.status="fulfilled",p.value=y,ZP(p),f.state=y,p=f.pending,p!==null&&(y=p.next,y===p?f.pending=null:(y=y.next,p.next=y,YP(f,y)))}function K2(f,p,y){var S=f.pending;if(f.pending=null,S!==null){S=S.next;do p.status="rejected",p.reason=y,ZP(p),p=p.next;while(p!==S)}f.action=null}function ZP(f){f=f.listeners;for(var p=0;p<f.length;p++)(0,f[p])()}function KP(f,p){return p}function QP(f,p){if(Sr){var y=da.formState;if(y!==null){e:{var S=Kt;if(Sr){if(Na){t:{for(var N=Na,D=qo;N.nodeType!==8;){if(!D){N=null;break t}if(N=Ko(N.nextSibling),N===null){N=null;break t}}D=N.data,N=D==="F!"||D==="F"?N:null}if(N){Na=Ko(N.nextSibling),S=N.data==="F!";break e}}bc(S)}S=!1}S&&(p=y[0])}}return y=Gi(),y.memoizedState=y.baseState=p,S={pending:null,lanes:0,dispatch:null,lastRenderedReducer:KP,lastRenderedState:p},y.queue=S,y=gI.bind(null,Kt,S),S.dispatch=y,S=Z2(!1),D=aT.bind(null,Kt,!1,S.queue),S=Gi(),N={state:p,dispatch:null,action:f,pending:null},S.queue=N,y=LJ.bind(null,Kt,N,D,y),N.dispatch=y,S.memoizedState=f,[p,y,!1]}function JP(f){var p=un();return eI(p,ta,f)}function eI(f,p,y){if(p=X2(f,p,KP)[0],f=Lx(bu)[0],typeof p=="object"&&p!==null&&typeof p.then=="function")try{var S=Qm(p)}catch(B){throw B===cv?bx:B}else S=p;p=un();var N=p.queue,D=N.dispatch;return y!==p.memoizedState&&(Kt.flags|=2048,pv(9,{destroy:void 0},EJ.bind(null,N,y),null)),[S,D,f]}function EJ(f,p){f.action=p}function tI(f){var p=un(),y=ta;if(y!==null)return eI(p,y,f);un(),p=p.memoizedState,y=un();var S=y.queue.dispatch;return y.memoizedState=f,[p,S,!1]}function pv(f,p,y,S){return f={tag:f,create:y,deps:S,inst:p,next:null},p=Kt.updateQueue,p===null&&(p=Mx(),Kt.updateQueue=p),y=p.lastEffect,y===null?p.lastEffect=f.next=f:(S=y.next,y.next=f,f.next=S,p.lastEffect=f),f}function rI(){return un().memoizedState}function Ex(f,p,y,S){var N=Gi();Kt.flags|=f,N.memoizedState=pv(1|p,{destroy:void 0},y,S===void 0?null:S)}function Rx(f,p,y,S){var N=un();S=S===void 0?null:S;var D=N.memoizedState.inst;ta!==null&&S!==null&&G2(S,ta.memoizedState.deps)?N.memoizedState=pv(p,D,y,S):(Kt.flags|=f,N.memoizedState=pv(1|p,D,y,S))}function aI(f,p){Ex(8390656,8,f,p)}function Q2(f,p){Rx(2048,8,f,p)}function RJ(f){Kt.flags|=4;var p=Kt.updateQueue;if(p===null)p=Mx(),Kt.updateQueue=p,p.events=[f];else{var y=p.events;y===null?p.events=[f]:y.push(f)}}function nI(f){var p=un().memoizedState;return RJ({ref:p,nextImpl:f}),function(){if((Pr&2)!==0)throw Error(a(440));return p.impl.apply(void 0,arguments)}}function iI(f,p){return Rx(4,2,f,p)}function oI(f,p){return Rx(4,4,f,p)}function sI(f,p){if(typeof p=="function"){f=f();var y=p(f);return function(){typeof y=="function"?y():p(null)}}if(p!=null)return f=f(),p.current=f,function(){p.current=null}}function lI(f,p,y){y=y!=null?y.concat([f]):null,Rx(4,4,sI.bind(null,p,f),y)}function J2(){}function uI(f,p){var y=un();p=p===void 0?null:p;var S=y.memoizedState;return p!==null&&G2(p,S[1])?S[0]:(y.memoizedState=[f,p],f)}function cI(f,p){var y=un();p=p===void 0?null:p;var S=y.memoizedState;if(p!==null&&G2(p,S[1]))return S[0];if(S=f(),ff){Hr(!0);try{f()}finally{Hr(!1)}}return y.memoizedState=[S,p],S}function eT(f,p,y){return y===void 0||(xu&1073741824)!==0&&(xr&261930)===0?f.memoizedState=p:(f.memoizedState=y,f=dj(),Kt.lanes|=f,Mc|=f,y)}function dI(f,p,y,S){return Ht(y,p)?y:fv.current!==null?(f=eT(f,y,S),Ht(f,p)||(_n=!0),f):(xu&42)===0||(xu&1073741824)!==0&&(xr&261930)===0?(_n=!0,f.memoizedState=y):(f=dj(),Kt.lanes|=f,Mc|=f,p)}function fI(f,p,y,S,N){var D=U.p;U.p=D!==0&&8>D?D:8;var B=O.T,W={};O.T=W,aT(f,!1,p,y);try{var Q=N(),he=O.S;if(he!==null&&he(W,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var Ae=AJ(Q,S);Jm(f,p,Ae,ko(f))}else Jm(f,p,S,ko(f))}catch(Ee){Jm(f,p,{then:function(){},status:"rejected",reason:Ee},ko())}finally{U.p=D,B!==null&&W.types!==null&&(B.types=W.types),O.T=B}}function PJ(){}function tT(f,p,y,S){if(f.tag!==5)throw Error(a(476));var N=hI(f).queue;fI(f,N,p,$,y===null?PJ:function(){return vI(f),y(S)})}function hI(f){var p=f.memoizedState;if(p!==null)return p;p={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bu,lastRenderedState:$},next:null};var y={};return p.next={memoizedState:y,baseState:y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bu,lastRenderedState:y},next:null},f.memoizedState=p,f=f.alternate,f!==null&&(f.memoizedState=p),p}function vI(f){var p=hI(f);p.next===null&&(p=f.alternate.memoizedState),Jm(f,p.next.queue,{},ko())}function rT(){return di(mg)}function pI(){return un().memoizedState}function mI(){return un().memoizedState}function IJ(f){for(var p=f.return;p!==null;){switch(p.tag){case 24:case 3:var y=ko();f=_c(y);var S=Tc(p,f,y);S!==null&&(io(S,p,y),Xm(S,p,y)),p={cache:L2()},f.payload=p;return}p=p.return}}function jJ(f,p,y){var S=ko();y={lane:S,revertLane:0,gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},Px(f)?yI(p,y):(y=b2(f,p,y,S),y!==null&&(io(y,f,S),xI(y,p,S)))}function gI(f,p,y){var S=ko();Jm(f,p,y,S)}function Jm(f,p,y,S){var N={lane:S,revertLane:0,gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null};if(Px(f))yI(p,N);else{var D=f.alternate;if(f.lanes===0&&(D===null||D.lanes===0)&&(D=p.lastRenderedReducer,D!==null))try{var B=p.lastRenderedState,W=D(B,y);if(N.hasEagerState=!0,N.eagerState=W,Ht(W,B))return hx(f,p,N,0),da===null&&fx(),!1}catch{}finally{}if(y=b2(f,p,N,S),y!==null)return io(y,f,S),xI(y,p,S),!0}return!1}function aT(f,p,y,S){if(S={lane:2,revertLane:IT(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},Px(f)){if(p)throw Error(a(479))}else p=b2(f,y,S,2),p!==null&&io(p,f,2)}function Px(f){var p=f.alternate;return f===Kt||p!==null&&p===Kt}function yI(f,p){hv=Nx=!0;var y=f.pending;y===null?p.next=p:(p.next=y.next,y.next=p),f.pending=p}function xI(f,p,y){if((y&4194048)!==0){var S=p.lanes;S&=f.pendingLanes,y|=S,p.lanes=y,Da(f,y)}}var eg={readContext:di,use:Dx,useCallback:Xa,useContext:Xa,useEffect:Xa,useImperativeHandle:Xa,useLayoutEffect:Xa,useInsertionEffect:Xa,useMemo:Xa,useReducer:Xa,useRef:Xa,useState:Xa,useDebugValue:Xa,useDeferredValue:Xa,useTransition:Xa,useSyncExternalStore:Xa,useId:Xa,useHostTransitionStatus:Xa,useFormState:Xa,useActionState:Xa,useOptimistic:Xa,useMemoCache:Xa,useCacheRefresh:Xa};eg.useEffectEvent=Xa;var bI={readContext:di,use:Dx,useCallback:function(f,p){return Gi().memoizedState=[f,p===void 0?null:p],f},useContext:di,useEffect:aI,useImperativeHandle:function(f,p,y){y=y!=null?y.concat([f]):null,Ex(4194308,4,sI.bind(null,p,f),y)},useLayoutEffect:function(f,p){return Ex(4194308,4,f,p)},useInsertionEffect:function(f,p){Ex(4,2,f,p)},useMemo:function(f,p){var y=Gi();p=p===void 0?null:p;var S=f();if(ff){Hr(!0);try{f()}finally{Hr(!1)}}return y.memoizedState=[S,p],S},useReducer:function(f,p,y){var S=Gi();if(y!==void 0){var N=y(p);if(ff){Hr(!0);try{y(p)}finally{Hr(!1)}}}else N=p;return S.memoizedState=S.baseState=N,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:f,lastRenderedState:N},S.queue=f,f=f.dispatch=jJ.bind(null,Kt,f),[S.memoizedState,f]},useRef:function(f){var p=Gi();return f={current:f},p.memoizedState=f},useState:function(f){f=Z2(f);var p=f.queue,y=gI.bind(null,Kt,p);return p.dispatch=y,[f.memoizedState,y]},useDebugValue:J2,useDeferredValue:function(f,p){var y=Gi();return eT(y,f,p)},useTransition:function(){var f=Z2(!1);return f=fI.bind(null,Kt,f.queue,!0,!1),Gi().memoizedState=f,[!1,f]},useSyncExternalStore:function(f,p,y){var S=Kt,N=Gi();if(Sr){if(y===void 0)throw Error(a(407));y=y()}else{if(y=p(),da===null)throw Error(a(349));(xr&127)!==0||FP(S,p,y)}N.memoizedState=y;var D={value:y,getSnapshot:p};return N.queue=D,aI(HP.bind(null,S,D,f),[f]),S.flags|=2048,pv(9,{destroy:void 0},GP.bind(null,S,D,y,p),null),y},useId:function(){var f=Gi(),p=da.identifierPrefix;if(Sr){var y=ml,S=pl;y=(S&~(1<<32-ye(S)-1)).toString(32)+y,p="_"+p+"R_"+y,y=Ax++,0<y&&(p+="H"+y.toString(32)),p+="_"}else y=MJ++,p="_"+p+"r_"+y.toString(32)+"_";return f.memoizedState=p},useHostTransitionStatus:rT,useFormState:QP,useActionState:QP,useOptimistic:function(f){var p=Gi();p.memoizedState=p.baseState=f;var y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return p.queue=y,p=aT.bind(null,Kt,!0,y),y.dispatch=p,[f,p]},useMemoCache:Y2,useCacheRefresh:function(){return Gi().memoizedState=IJ.bind(null,Kt)},useEffectEvent:function(f){var p=Gi(),y={impl:f};return p.memoizedState=y,function(){if((Pr&2)!==0)throw Error(a(440));return y.impl.apply(void 0,arguments)}}},nT={readContext:di,use:Dx,useCallback:uI,useContext:di,useEffect:Q2,useImperativeHandle:lI,useInsertionEffect:iI,useLayoutEffect:oI,useMemo:cI,useReducer:Lx,useRef:rI,useState:function(){return Lx(bu)},useDebugValue:J2,useDeferredValue:function(f,p){var y=un();return dI(y,ta.memoizedState,f,p)},useTransition:function(){var f=Lx(bu)[0],p=un().memoizedState;return[typeof f=="boolean"?f:Qm(f),p]},useSyncExternalStore:VP,useId:pI,useHostTransitionStatus:rT,useFormState:JP,useActionState:JP,useOptimistic:function(f,p){var y=un();return WP(y,ta,f,p)},useMemoCache:Y2,useCacheRefresh:mI};nT.useEffectEvent=nI;var wI={readContext:di,use:Dx,useCallback:uI,useContext:di,useEffect:Q2,useImperativeHandle:lI,useInsertionEffect:iI,useLayoutEffect:oI,useMemo:cI,useReducer:q2,useRef:rI,useState:function(){return q2(bu)},useDebugValue:J2,useDeferredValue:function(f,p){var y=un();return ta===null?eT(y,f,p):dI(y,ta.memoizedState,f,p)},useTransition:function(){var f=q2(bu)[0],p=un().memoizedState;return[typeof f=="boolean"?f:Qm(f),p]},useSyncExternalStore:VP,useId:pI,useHostTransitionStatus:rT,useFormState:tI,useActionState:tI,useOptimistic:function(f,p){var y=un();return ta!==null?WP(y,ta,f,p):(y.baseState=f,[f,y.queue.dispatch])},useMemoCache:Y2,useCacheRefresh:mI};wI.useEffectEvent=nI;function iT(f,p,y,S){p=f.memoizedState,y=y(S,p),y=y==null?p:d({},p,y),f.memoizedState=y,f.lanes===0&&(f.updateQueue.baseState=y)}var oT={enqueueSetState:function(f,p,y){f=f._reactInternals;var S=ko(),N=_c(S);N.payload=p,y!=null&&(N.callback=y),p=Tc(f,N,S),p!==null&&(io(p,f,S),Xm(p,f,S))},enqueueReplaceState:function(f,p,y){f=f._reactInternals;var S=ko(),N=_c(S);N.tag=1,N.payload=p,y!=null&&(N.callback=y),p=Tc(f,N,S),p!==null&&(io(p,f,S),Xm(p,f,S))},enqueueForceUpdate:function(f,p){f=f._reactInternals;var y=ko(),S=_c(y);S.tag=2,p!=null&&(S.callback=p),p=Tc(f,S,y),p!==null&&(io(p,f,y),Xm(p,f,y))}};function SI(f,p,y,S,N,D,B){return f=f.stateNode,typeof f.shouldComponentUpdate=="function"?f.shouldComponentUpdate(S,D,B):p.prototype&&p.prototype.isPureReactComponent?!ki(y,S)||!ki(N,D):!0}function _I(f,p,y,S){f=p.state,typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps(y,S),typeof p.UNSAFE_componentWillReceiveProps=="function"&&p.UNSAFE_componentWillReceiveProps(y,S),p.state!==f&&oT.enqueueReplaceState(p,p.state,null)}function hf(f,p){var y=p;if("ref"in p){y={};for(var S in p)S!=="ref"&&(y[S]=p[S])}if(f=f.defaultProps){y===p&&(y=d({},y));for(var N in f)y[N]===void 0&&(y[N]=f[N])}return y}function TI(f){gc(f)}function CI(f){console.error(f)}function kI(f){gc(f)}function Ix(f,p){try{var y=f.onUncaughtError;y(p.value,{componentStack:p.stack})}catch(S){setTimeout(function(){throw S})}}function NI(f,p,y){try{var S=f.onCaughtError;S(y.value,{componentStack:y.stack,errorBoundary:p.tag===1?p.stateNode:null})}catch(N){setTimeout(function(){throw N})}}function sT(f,p,y){return y=_c(y),y.tag=3,y.payload={element:null},y.callback=function(){Ix(f,p)},y}function AI(f){return f=_c(f),f.tag=3,f}function MI(f,p,y,S){var N=y.type.getDerivedStateFromError;if(typeof N=="function"){var D=S.value;f.payload=function(){return N(D)},f.callback=function(){NI(p,y,S)}}var B=y.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(f.callback=function(){NI(p,y,S),typeof N!="function"&&(Dc===null?Dc=new Set([this]):Dc.add(this));var W=S.stack;this.componentDidCatch(S.value,{componentStack:W!==null?W:""})})}function OJ(f,p,y,S,N){if(y.flags|=32768,S!==null&&typeof S=="object"&&typeof S.then=="function"){if(p=y.alternate,p!==null&&sv(p,y,N,!0),y=So.current,y!==null){switch(y.tag){case 31:case 13:return Zo===null?Yx():y.alternate===null&&qa===0&&(qa=3),y.flags&=-257,y.flags|=65536,y.lanes=N,S===Sx?y.flags|=16384:(p=y.updateQueue,p===null?y.updateQueue=new Set([S]):p.add(S),ET(f,S,N)),!1;case 22:return y.flags|=65536,S===Sx?y.flags|=16384:(p=y.updateQueue,p===null?(p={transitions:null,markerInstances:null,retryQueue:new Set([S])},y.updateQueue=p):(y=p.retryQueue,y===null?p.retryQueue=new Set([S]):y.add(S)),ET(f,S,N)),!1}throw Error(a(435,y.tag))}return ET(f,S,N),Yx(),!1}if(Sr)return p=So.current,p!==null?((p.flags&65536)===0&&(p.flags|=256),p.flags|=65536,p.lanes=N,S!==k2&&(f=Error(a(422),{cause:S}),Hm(Wo(f,y)))):(S!==k2&&(p=Error(a(423),{cause:S}),Hm(Wo(p,y))),f=f.current.alternate,f.flags|=65536,N&=-N,f.lanes|=N,S=Wo(S,y),N=sT(f.stateNode,S,N),O2(f,N),qa!==4&&(qa=2)),!1;var D=Error(a(520),{cause:S});if(D=Wo(D,y),lg===null?lg=[D]:lg.push(D),qa!==4&&(qa=2),p===null)return!0;S=Wo(S,y),y=p;do{switch(y.tag){case 3:return y.flags|=65536,f=N&-N,y.lanes|=f,f=sT(y.stateNode,S,f),O2(y,f),!1;case 1:if(p=y.type,D=y.stateNode,(y.flags&128)===0&&(typeof p.getDerivedStateFromError=="function"||D!==null&&typeof D.componentDidCatch=="function"&&(Dc===null||!Dc.has(D))))return y.flags|=65536,N&=-N,y.lanes|=N,N=AI(N),MI(N,f,y,S),O2(y,N),!1}y=y.return}while(y!==null);return!1}var lT=Error(a(461)),_n=!1;function fi(f,p,y,S){p.child=f===null?RP(p,null,y,S):df(p,f.child,y,S)}function DI(f,p,y,S,N){y=y.render;var D=p.ref;if("ref"in S){var B={};for(var W in S)W!=="ref"&&(B[W]=S[W])}else B=S;return sf(p),S=H2(f,p,y,B,D,N),W=U2(),f!==null&&!_n?($2(f,p,N),wu(f,p,N)):(Sr&&W&&T2(p),p.flags|=1,fi(f,p,S,N),p.child)}function LI(f,p,y,S,N){if(f===null){var D=y.type;return typeof D=="function"&&!w2(D)&&D.defaultProps===void 0&&y.compare===null?(p.tag=15,p.type=D,EI(f,p,D,S,N)):(f=px(y.type,null,S,p,p.mode,N),f.ref=p.ref,f.return=p,p.child=f)}if(D=f.child,!mT(f,N)){var B=D.memoizedProps;if(y=y.compare,y=y!==null?y:ki,y(B,S)&&f.ref===p.ref)return wu(f,p,N)}return p.flags|=1,f=pu(D,S),f.ref=p.ref,f.return=p,p.child=f}function EI(f,p,y,S,N){if(f!==null){var D=f.memoizedProps;if(ki(D,S)&&f.ref===p.ref)if(_n=!1,p.pendingProps=S=D,mT(f,N))(f.flags&131072)!==0&&(_n=!0);else return p.lanes=f.lanes,wu(f,p,N)}return uT(f,p,y,S,N)}function RI(f,p,y,S){var N=S.children,D=f!==null?f.memoizedState:null;if(f===null&&p.stateNode===null&&(p.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),S.mode==="hidden"){if((p.flags&128)!==0){if(D=D!==null?D.baseLanes|y:y,f!==null){for(S=p.child=f.child,N=0;S!==null;)N=N|S.lanes|S.childLanes,S=S.sibling;S=N&~D}else S=0,p.child=null;return PI(f,p,D,y,S)}if((y&536870912)!==0)p.memoizedState={baseLanes:0,cachePool:null},f!==null&&xx(p,D!==null?D.cachePool:null),D!==null?jP(p,D):B2(),OP(p);else return S=p.lanes=536870912,PI(f,p,D!==null?D.baseLanes|y:y,y,S)}else D!==null?(xx(p,D.cachePool),jP(p,D),kc(),p.memoizedState=null):(f!==null&&xx(p,null),B2(),kc());return fi(f,p,N,y),p.child}function tg(f,p){return f!==null&&f.tag===22||p.stateNode!==null||(p.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.sibling}function PI(f,p,y,S,N){var D=R2();return D=D===null?null:{parent:wn._currentValue,pool:D},p.memoizedState={baseLanes:y,cachePool:D},f!==null&&xx(p,null),B2(),OP(p),f!==null&&sv(f,p,S,!0),p.childLanes=N,null}function jx(f,p){return p=zx({mode:p.mode,children:p.children},f.mode),p.ref=f.ref,f.child=p,p.return=f,p}function II(f,p,y){return df(p,f.child,null,y),f=jx(p,p.pendingProps),f.flags|=2,_o(p),p.memoizedState=null,f}function zJ(f,p,y){var S=p.pendingProps,N=(p.flags&128)!==0;if(p.flags&=-129,f===null){if(Sr){if(S.mode==="hidden")return f=jx(p,S),p.lanes=536870912,tg(null,f);if(F2(p),(f=Na)?(f=Yj(f,qo),f=f!==null&&f.data==="&"?f:null,f!==null&&(p.memoizedState={dehydrated:f,treeContext:yc!==null?{id:pl,overflow:ml}:null,retryLane:536870912,hydrationErrors:null},y=yP(f),y.return=p,p.child=y,ci=p,Na=null)):f=null,f===null)throw bc(p);return p.lanes=536870912,null}return jx(p,S)}var D=f.memoizedState;if(D!==null){var B=D.dehydrated;if(F2(p),N)if(p.flags&256)p.flags&=-257,p=II(f,p,y);else if(p.memoizedState!==null)p.child=f.child,p.flags|=128,p=null;else throw Error(a(558));else if(_n||sv(f,p,y,!1),N=(y&f.childLanes)!==0,_n||N){if(S=da,S!==null&&(B=Tr(S,y),B!==0&&B!==D.retryLane))throw D.retryLane=B,rf(f,B),io(S,f,B),lT;Yx(),p=II(f,p,y)}else f=D.treeContext,Na=Ko(B.nextSibling),ci=p,Sr=!0,xc=null,qo=!1,f!==null&&wP(p,f),p=jx(p,S),p.flags|=4096;return p}return f=pu(f.child,{mode:S.mode,children:S.children}),f.ref=p.ref,p.child=f,f.return=p,f}function Ox(f,p){var y=p.ref;if(y===null)f!==null&&f.ref!==null&&(p.flags|=4194816);else{if(typeof y!="function"&&typeof y!="object")throw Error(a(284));(f===null||f.ref!==y)&&(p.flags|=4194816)}}function uT(f,p,y,S,N){return sf(p),y=H2(f,p,y,S,void 0,N),S=U2(),f!==null&&!_n?($2(f,p,N),wu(f,p,N)):(Sr&&S&&T2(p),p.flags|=1,fi(f,p,y,N),p.child)}function jI(f,p,y,S,N,D){return sf(p),p.updateQueue=null,y=BP(p,S,y,N),zP(f),S=U2(),f!==null&&!_n?($2(f,p,D),wu(f,p,D)):(Sr&&S&&T2(p),p.flags|=1,fi(f,p,y,D),p.child)}function OI(f,p,y,S,N){if(sf(p),p.stateNode===null){var D=av,B=y.contextType;typeof B=="object"&&B!==null&&(D=di(B)),D=new y(S,D),p.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,D.updater=oT,p.stateNode=D,D._reactInternals=p,D=p.stateNode,D.props=S,D.state=p.memoizedState,D.refs={},I2(p),B=y.contextType,D.context=typeof B=="object"&&B!==null?di(B):av,D.state=p.memoizedState,B=y.getDerivedStateFromProps,typeof B=="function"&&(iT(p,y,B,S),D.state=p.memoizedState),typeof y.getDerivedStateFromProps=="function"||typeof D.getSnapshotBeforeUpdate=="function"||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(B=D.state,typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount(),B!==D.state&&oT.enqueueReplaceState(D,D.state,null),Zm(p,S,D,N),qm(),D.state=p.memoizedState),typeof D.componentDidMount=="function"&&(p.flags|=4194308),S=!0}else if(f===null){D=p.stateNode;var W=p.memoizedProps,Q=hf(y,W);D.props=Q;var he=D.context,Ae=y.contextType;B=av,typeof Ae=="object"&&Ae!==null&&(B=di(Ae));var Ee=y.getDerivedStateFromProps;Ae=typeof Ee=="function"||typeof D.getSnapshotBeforeUpdate=="function",W=p.pendingProps!==W,Ae||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(W||he!==B)&&_I(p,D,S,B),Sc=!1;var pe=p.memoizedState;D.state=pe,Zm(p,S,D,N),qm(),he=p.memoizedState,W||pe!==he||Sc?(typeof Ee=="function"&&(iT(p,y,Ee,S),he=p.memoizedState),(Q=Sc||SI(p,y,Q,S,pe,he,B))?(Ae||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount()),typeof D.componentDidMount=="function"&&(p.flags|=4194308)):(typeof D.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=S,p.memoizedState=he),D.props=S,D.state=he,D.context=B,S=Q):(typeof D.componentDidMount=="function"&&(p.flags|=4194308),S=!1)}else{D=p.stateNode,j2(f,p),B=p.memoizedProps,Ae=hf(y,B),D.props=Ae,Ee=p.pendingProps,pe=D.context,he=y.contextType,Q=av,typeof he=="object"&&he!==null&&(Q=di(he)),W=y.getDerivedStateFromProps,(he=typeof W=="function"||typeof D.getSnapshotBeforeUpdate=="function")||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(B!==Ee||pe!==Q)&&_I(p,D,S,Q),Sc=!1,pe=p.memoizedState,D.state=pe,Zm(p,S,D,N),qm();var we=p.memoizedState;B!==Ee||pe!==we||Sc||f!==null&&f.dependencies!==null&&gx(f.dependencies)?(typeof W=="function"&&(iT(p,y,W,S),we=p.memoizedState),(Ae=Sc||SI(p,y,Ae,S,pe,we,Q)||f!==null&&f.dependencies!==null&&gx(f.dependencies))?(he||typeof D.UNSAFE_componentWillUpdate!="function"&&typeof D.componentWillUpdate!="function"||(typeof D.componentWillUpdate=="function"&&D.componentWillUpdate(S,we,Q),typeof D.UNSAFE_componentWillUpdate=="function"&&D.UNSAFE_componentWillUpdate(S,we,Q)),typeof D.componentDidUpdate=="function"&&(p.flags|=4),typeof D.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof D.componentDidUpdate!="function"||B===f.memoizedProps&&pe===f.memoizedState||(p.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||B===f.memoizedProps&&pe===f.memoizedState||(p.flags|=1024),p.memoizedProps=S,p.memoizedState=we),D.props=S,D.state=we,D.context=Q,S=Ae):(typeof D.componentDidUpdate!="function"||B===f.memoizedProps&&pe===f.memoizedState||(p.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||B===f.memoizedProps&&pe===f.memoizedState||(p.flags|=1024),S=!1)}return D=S,Ox(f,p),S=(p.flags&128)!==0,D||S?(D=p.stateNode,y=S&&typeof y.getDerivedStateFromError!="function"?null:D.render(),p.flags|=1,f!==null&&S?(p.child=df(p,f.child,null,N),p.child=df(p,null,y,N)):fi(f,p,y,N),p.memoizedState=D.state,f=p.child):f=wu(f,p,N),f}function zI(f,p,y,S){return nf(),p.flags|=256,fi(f,p,y,S),p.child}var cT={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dT(f){return{baseLanes:f,cachePool:NP()}}function fT(f,p,y){return f=f!==null?f.childLanes&~y:0,p&&(f|=Co),f}function BI(f,p,y){var S=p.pendingProps,N=!1,D=(p.flags&128)!==0,B;if((B=D)||(B=f!==null&&f.memoizedState===null?!1:(ln.current&2)!==0),B&&(N=!0,p.flags&=-129),B=(p.flags&32)!==0,p.flags&=-33,f===null){if(Sr){if(N?Cc(p):kc(),(f=Na)?(f=Yj(f,qo),f=f!==null&&f.data!=="&"?f:null,f!==null&&(p.memoizedState={dehydrated:f,treeContext:yc!==null?{id:pl,overflow:ml}:null,retryLane:536870912,hydrationErrors:null},y=yP(f),y.return=p,p.child=y,ci=p,Na=null)):f=null,f===null)throw bc(p);return XT(f)?p.lanes=32:p.lanes=536870912,null}var W=S.children;return S=S.fallback,N?(kc(),N=p.mode,W=zx({mode:"hidden",children:W},N),S=af(S,N,y,null),W.return=p,S.return=p,W.sibling=S,p.child=W,S=p.child,S.memoizedState=dT(y),S.childLanes=fT(f,B,y),p.memoizedState=cT,tg(null,S)):(Cc(p),hT(p,W))}var Q=f.memoizedState;if(Q!==null&&(W=Q.dehydrated,W!==null)){if(D)p.flags&256?(Cc(p),p.flags&=-257,p=vT(f,p,y)):p.memoizedState!==null?(kc(),p.child=f.child,p.flags|=128,p=null):(kc(),W=S.fallback,N=p.mode,S=zx({mode:"visible",children:S.children},N),W=af(W,N,y,null),W.flags|=2,S.return=p,W.return=p,S.sibling=W,p.child=S,df(p,f.child,null,y),S=p.child,S.memoizedState=dT(y),S.childLanes=fT(f,B,y),p.memoizedState=cT,p=tg(null,S));else if(Cc(p),XT(W)){if(B=W.nextSibling&&W.nextSibling.dataset,B)var he=B.dgst;B=he,S=Error(a(419)),S.stack="",S.digest=B,Hm({value:S,source:null,stack:null}),p=vT(f,p,y)}else if(_n||sv(f,p,y,!1),B=(y&f.childLanes)!==0,_n||B){if(B=da,B!==null&&(S=Tr(B,y),S!==0&&S!==Q.retryLane))throw Q.retryLane=S,rf(f,S),io(B,f,S),lT;YT(W)||Yx(),p=vT(f,p,y)}else YT(W)?(p.flags|=192,p.child=f.child,p=null):(f=Q.treeContext,Na=Ko(W.nextSibling),ci=p,Sr=!0,xc=null,qo=!1,f!==null&&wP(p,f),p=hT(p,S.children),p.flags|=4096);return p}return N?(kc(),W=S.fallback,N=p.mode,Q=f.child,he=Q.sibling,S=pu(Q,{mode:"hidden",children:S.children}),S.subtreeFlags=Q.subtreeFlags&65011712,he!==null?W=pu(he,W):(W=af(W,N,y,null),W.flags|=2),W.return=p,S.return=p,S.sibling=W,p.child=S,tg(null,S),S=p.child,W=f.child.memoizedState,W===null?W=dT(y):(N=W.cachePool,N!==null?(Q=wn._currentValue,N=N.parent!==Q?{parent:Q,pool:Q}:N):N=NP(),W={baseLanes:W.baseLanes|y,cachePool:N}),S.memoizedState=W,S.childLanes=fT(f,B,y),p.memoizedState=cT,tg(f.child,S)):(Cc(p),y=f.child,f=y.sibling,y=pu(y,{mode:"visible",children:S.children}),y.return=p,y.sibling=null,f!==null&&(B=p.deletions,B===null?(p.deletions=[f],p.flags|=16):B.push(f)),p.child=y,p.memoizedState=null,y)}function hT(f,p){return p=zx({mode:"visible",children:p},f.mode),p.return=f,f.child=p}function zx(f,p){return f=wo(22,f,null,p),f.lanes=0,f}function vT(f,p,y){return df(p,f.child,null,y),f=hT(p,p.pendingProps.children),f.flags|=2,p.memoizedState=null,f}function VI(f,p,y){f.lanes|=p;var S=f.alternate;S!==null&&(S.lanes|=p),M2(f.return,p,y)}function pT(f,p,y,S,N,D){var B=f.memoizedState;B===null?f.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:S,tail:y,tailMode:N,treeForkCount:D}:(B.isBackwards=p,B.rendering=null,B.renderingStartTime=0,B.last=S,B.tail=y,B.tailMode=N,B.treeForkCount=D)}function FI(f,p,y){var S=p.pendingProps,N=S.revealOrder,D=S.tail;S=S.children;var B=ln.current,W=(B&2)!==0;if(W?(B=B&1|2,p.flags|=128):B&=1,te(ln,B),fi(f,p,S,y),S=Sr?Gm:0,!W&&f!==null&&(f.flags&128)!==0)e:for(f=p.child;f!==null;){if(f.tag===13)f.memoizedState!==null&&VI(f,y,p);else if(f.tag===19)VI(f,y,p);else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===p)break e;for(;f.sibling===null;){if(f.return===null||f.return===p)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}switch(N){case"forwards":for(y=p.child,N=null;y!==null;)f=y.alternate,f!==null&&kx(f)===null&&(N=y),y=y.sibling;y=N,y===null?(N=p.child,p.child=null):(N=y.sibling,y.sibling=null),pT(p,!1,N,y,D,S);break;case"backwards":case"unstable_legacy-backwards":for(y=null,N=p.child,p.child=null;N!==null;){if(f=N.alternate,f!==null&&kx(f)===null){p.child=N;break}f=N.sibling,N.sibling=y,y=N,N=f}pT(p,!0,y,null,D,S);break;case"together":pT(p,!1,null,null,void 0,S);break;default:p.memoizedState=null}return p.child}function wu(f,p,y){if(f!==null&&(p.dependencies=f.dependencies),Mc|=p.lanes,(y&p.childLanes)===0)if(f!==null){if(sv(f,p,y,!1),(y&p.childLanes)===0)return null}else return null;if(f!==null&&p.child!==f.child)throw Error(a(153));if(p.child!==null){for(f=p.child,y=pu(f,f.pendingProps),p.child=y,y.return=p;f.sibling!==null;)f=f.sibling,y=y.sibling=pu(f,f.pendingProps),y.return=p;y.sibling=null}return p.child}function mT(f,p){return(f.lanes&p)!==0?!0:(f=f.dependencies,!!(f!==null&&gx(f)))}function BJ(f,p,y){switch(p.tag){case 3:Ce(p,p.stateNode.containerInfo),wc(p,wn,f.memoizedState.cache),nf();break;case 27:case 5:Be(p);break;case 4:Ce(p,p.stateNode.containerInfo);break;case 10:wc(p,p.type,p.memoizedProps.value);break;case 31:if(p.memoizedState!==null)return p.flags|=128,F2(p),null;break;case 13:var S=p.memoizedState;if(S!==null)return S.dehydrated!==null?(Cc(p),p.flags|=128,null):(y&p.child.childLanes)!==0?BI(f,p,y):(Cc(p),f=wu(f,p,y),f!==null?f.sibling:null);Cc(p);break;case 19:var N=(f.flags&128)!==0;if(S=(y&p.childLanes)!==0,S||(sv(f,p,y,!1),S=(y&p.childLanes)!==0),N){if(S)return FI(f,p,y);p.flags|=128}if(N=p.memoizedState,N!==null&&(N.rendering=null,N.tail=null,N.lastEffect=null),te(ln,ln.current),S)break;return null;case 22:return p.lanes=0,RI(f,p,y,p.pendingProps);case 24:wc(p,wn,f.memoizedState.cache)}return wu(f,p,y)}function GI(f,p,y){if(f!==null)if(f.memoizedProps!==p.pendingProps)_n=!0;else{if(!mT(f,y)&&(p.flags&128)===0)return _n=!1,BJ(f,p,y);_n=(f.flags&131072)!==0}else _n=!1,Sr&&(p.flags&1048576)!==0&&bP(p,Gm,p.index);switch(p.lanes=0,p.tag){case 16:e:{var S=p.pendingProps;if(f=uf(p.elementType),p.type=f,typeof f=="function")w2(f)?(S=hf(f,S),p.tag=1,p=OI(null,p,f,S,y)):(p.tag=0,p=uT(null,p,f,S,y));else{if(f!=null){var N=f.$$typeof;if(N===C){p.tag=11,p=DI(null,p,f,S,y);break e}else if(N===M){p.tag=14,p=LI(null,p,f,S,y);break e}}throw p=F(f)||f,Error(a(306,p,""))}}return p;case 0:return uT(f,p,p.type,p.pendingProps,y);case 1:return S=p.type,N=hf(S,p.pendingProps),OI(f,p,S,N,y);case 3:e:{if(Ce(p,p.stateNode.containerInfo),f===null)throw Error(a(387));S=p.pendingProps;var D=p.memoizedState;N=D.element,j2(f,p),Zm(p,S,null,y);var B=p.memoizedState;if(S=B.cache,wc(p,wn,S),S!==D.cache&&D2(p,[wn],y,!0),qm(),S=B.element,D.isDehydrated)if(D={element:S,isDehydrated:!1,cache:B.cache},p.updateQueue.baseState=D,p.memoizedState=D,p.flags&256){p=zI(f,p,S,y);break e}else if(S!==N){N=Wo(Error(a(424)),p),Hm(N),p=zI(f,p,S,y);break e}else{switch(f=p.stateNode.containerInfo,f.nodeType){case 9:f=f.body;break;default:f=f.nodeName==="HTML"?f.ownerDocument.body:f}for(Na=Ko(f.firstChild),ci=p,Sr=!0,xc=null,qo=!0,y=RP(p,null,S,y),p.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling}else{if(nf(),S===N){p=wu(f,p,y);break e}fi(f,p,S,y)}p=p.child}return p;case 26:return Ox(f,p),f===null?(y=Jj(p.type,null,p.pendingProps,null))?p.memoizedState=y:Sr||(y=p.type,f=p.pendingProps,S=eb(me.current).createElement(y),S[Ze]=p,S[wr]=f,hi(S,y,f),fr(S),p.stateNode=S):p.memoizedState=Jj(p.type,f.memoizedProps,p.pendingProps,f.memoizedState),null;case 27:return Be(p),f===null&&Sr&&(S=p.stateNode=Zj(p.type,p.pendingProps,me.current),ci=p,qo=!0,N=Na,Pc(p.type)?(qT=N,Na=Ko(S.firstChild)):Na=N),fi(f,p,p.pendingProps.children,y),Ox(f,p),f===null&&(p.flags|=4194304),p.child;case 5:return f===null&&Sr&&((N=S=Na)&&(S=pee(S,p.type,p.pendingProps,qo),S!==null?(p.stateNode=S,ci=p,Na=Ko(S.firstChild),qo=!1,N=!0):N=!1),N||bc(p)),Be(p),N=p.type,D=p.pendingProps,B=f!==null?f.memoizedProps:null,S=D.children,UT(N,D)?S=null:B!==null&&UT(N,B)&&(p.flags|=32),p.memoizedState!==null&&(N=H2(f,p,DJ,null,null,y),mg._currentValue=N),Ox(f,p),fi(f,p,S,y),p.child;case 6:return f===null&&Sr&&((f=y=Na)&&(y=mee(y,p.pendingProps,qo),y!==null?(p.stateNode=y,ci=p,Na=null,f=!0):f=!1),f||bc(p)),null;case 13:return BI(f,p,y);case 4:return Ce(p,p.stateNode.containerInfo),S=p.pendingProps,f===null?p.child=df(p,null,S,y):fi(f,p,S,y),p.child;case 11:return DI(f,p,p.type,p.pendingProps,y);case 7:return fi(f,p,p.pendingProps,y),p.child;case 8:return fi(f,p,p.pendingProps.children,y),p.child;case 12:return fi(f,p,p.pendingProps.children,y),p.child;case 10:return S=p.pendingProps,wc(p,p.type,S.value),fi(f,p,S.children,y),p.child;case 9:return N=p.type._context,S=p.pendingProps.children,sf(p),N=di(N),S=S(N),p.flags|=1,fi(f,p,S,y),p.child;case 14:return LI(f,p,p.type,p.pendingProps,y);case 15:return EI(f,p,p.type,p.pendingProps,y);case 19:return FI(f,p,y);case 31:return zJ(f,p,y);case 22:return RI(f,p,y,p.pendingProps);case 24:return sf(p),S=di(wn),f===null?(N=R2(),N===null&&(N=da,D=L2(),N.pooledCache=D,D.refCount++,D!==null&&(N.pooledCacheLanes|=y),N=D),p.memoizedState={parent:S,cache:N},I2(p),wc(p,wn,N)):((f.lanes&y)!==0&&(j2(f,p),Zm(p,null,null,y),qm()),N=f.memoizedState,D=p.memoizedState,N.parent!==S?(N={parent:S,cache:S},p.memoizedState=N,p.lanes===0&&(p.memoizedState=p.updateQueue.baseState=N),wc(p,wn,S)):(S=D.cache,wc(p,wn,S),S!==N.cache&&D2(p,[wn],y,!0))),fi(f,p,p.pendingProps.children,y),p.child;case 29:throw p.pendingProps}throw Error(a(156,p.tag))}function Su(f){f.flags|=4}function gT(f,p,y,S,N){if((p=(f.mode&32)!==0)&&(p=!1),p){if(f.flags|=16777216,(N&335544128)===N)if(f.stateNode.complete)f.flags|=8192;else if(pj())f.flags|=8192;else throw cf=Sx,P2}else f.flags&=-16777217}function HI(f,p){if(p.type!=="stylesheet"||(p.state.loading&4)!==0)f.flags&=-16777217;else if(f.flags|=16777216,!nO(p))if(pj())f.flags|=8192;else throw cf=Sx,P2}function Bx(f,p){p!==null&&(f.flags|=4),f.flags&16384&&(p=f.tag!==22?Mr():536870912,f.lanes|=p,xv|=p)}function rg(f,p){if(!Sr)switch(f.tailMode){case"hidden":p=f.tail;for(var y=null;p!==null;)p.alternate!==null&&(y=p),p=p.sibling;y===null?f.tail=null:y.sibling=null;break;case"collapsed":y=f.tail;for(var S=null;y!==null;)y.alternate!==null&&(S=y),y=y.sibling;S===null?p||f.tail===null?f.tail=null:f.tail.sibling=null:S.sibling=null}}function Aa(f){var p=f.alternate!==null&&f.alternate.child===f.child,y=0,S=0;if(p)for(var N=f.child;N!==null;)y|=N.lanes|N.childLanes,S|=N.subtreeFlags&65011712,S|=N.flags&65011712,N.return=f,N=N.sibling;else for(N=f.child;N!==null;)y|=N.lanes|N.childLanes,S|=N.subtreeFlags,S|=N.flags,N.return=f,N=N.sibling;return f.subtreeFlags|=S,f.childLanes=y,p}function VJ(f,p,y){var S=p.pendingProps;switch(C2(p),p.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Aa(p),null;case 1:return Aa(p),null;case 3:return y=p.stateNode,S=null,f!==null&&(S=f.memoizedState.cache),p.memoizedState.cache!==S&&(p.flags|=2048),yu(wn),ge(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(f===null||f.child===null)&&(ov(p)?Su(p):f===null||f.memoizedState.isDehydrated&&(p.flags&256)===0||(p.flags|=1024,N2())),Aa(p),null;case 26:var N=p.type,D=p.memoizedState;return f===null?(Su(p),D!==null?(Aa(p),HI(p,D)):(Aa(p),gT(p,N,null,S,y))):D?D!==f.memoizedState?(Su(p),Aa(p),HI(p,D)):(Aa(p),p.flags&=-16777217):(f=f.memoizedProps,f!==S&&Su(p),Aa(p),gT(p,N,f,S,y)),null;case 27:if(_e(p),y=me.current,N=p.type,f!==null&&p.stateNode!=null)f.memoizedProps!==S&&Su(p);else{if(!S){if(p.stateNode===null)throw Error(a(166));return Aa(p),null}f=ie.current,ov(p)?SP(p):(f=Zj(N,S,y),p.stateNode=f,Su(p))}return Aa(p),null;case 5:if(_e(p),N=p.type,f!==null&&p.stateNode!=null)f.memoizedProps!==S&&Su(p);else{if(!S){if(p.stateNode===null)throw Error(a(166));return Aa(p),null}if(D=ie.current,ov(p))SP(p);else{var B=eb(me.current);switch(D){case 1:D=B.createElementNS("http://www.w3.org/2000/svg",N);break;case 2:D=B.createElementNS("http://www.w3.org/1998/Math/MathML",N);break;default:switch(N){case"svg":D=B.createElementNS("http://www.w3.org/2000/svg",N);break;case"math":D=B.createElementNS("http://www.w3.org/1998/Math/MathML",N);break;case"script":D=B.createElement("div"),D.innerHTML="<script><\/script>",D=D.removeChild(D.firstChild);break;case"select":D=typeof S.is=="string"?B.createElement("select",{is:S.is}):B.createElement("select"),S.multiple?D.multiple=!0:S.size&&(D.size=S.size);break;default:D=typeof S.is=="string"?B.createElement(N,{is:S.is}):B.createElement(N)}}D[Ze]=p,D[wr]=S;e:for(B=p.child;B!==null;){if(B.tag===5||B.tag===6)D.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===p)break e;for(;B.sibling===null;){if(B.return===null||B.return===p)break e;B=B.return}B.sibling.return=B.return,B=B.sibling}p.stateNode=D;e:switch(hi(D,N,S),N){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}S&&Su(p)}}return Aa(p),gT(p,p.type,f===null?null:f.memoizedProps,p.pendingProps,y),null;case 6:if(f&&p.stateNode!=null)f.memoizedProps!==S&&Su(p);else{if(typeof S!="string"&&p.stateNode===null)throw Error(a(166));if(f=me.current,ov(p)){if(f=p.stateNode,y=p.memoizedProps,S=null,N=ci,N!==null)switch(N.tag){case 27:case 5:S=N.memoizedProps}f[Ze]=p,f=!!(f.nodeValue===y||S!==null&&S.suppressHydrationWarning===!0||Bj(f.nodeValue,y)),f||bc(p,!0)}else f=eb(f).createTextNode(S),f[Ze]=p,p.stateNode=f}return Aa(p),null;case 31:if(y=p.memoizedState,f===null||f.memoizedState!==null){if(S=ov(p),y!==null){if(f===null){if(!S)throw Error(a(318));if(f=p.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(557));f[Ze]=p}else nf(),(p.flags&128)===0&&(p.memoizedState=null),p.flags|=4;Aa(p),f=!1}else y=N2(),f!==null&&f.memoizedState!==null&&(f.memoizedState.hydrationErrors=y),f=!0;if(!f)return p.flags&256?(_o(p),p):(_o(p),null);if((p.flags&128)!==0)throw Error(a(558))}return Aa(p),null;case 13:if(S=p.memoizedState,f===null||f.memoizedState!==null&&f.memoizedState.dehydrated!==null){if(N=ov(p),S!==null&&S.dehydrated!==null){if(f===null){if(!N)throw Error(a(318));if(N=p.memoizedState,N=N!==null?N.dehydrated:null,!N)throw Error(a(317));N[Ze]=p}else nf(),(p.flags&128)===0&&(p.memoizedState=null),p.flags|=4;Aa(p),N=!1}else N=N2(),f!==null&&f.memoizedState!==null&&(f.memoizedState.hydrationErrors=N),N=!0;if(!N)return p.flags&256?(_o(p),p):(_o(p),null)}return _o(p),(p.flags&128)!==0?(p.lanes=y,p):(y=S!==null,f=f!==null&&f.memoizedState!==null,y&&(S=p.child,N=null,S.alternate!==null&&S.alternate.memoizedState!==null&&S.alternate.memoizedState.cachePool!==null&&(N=S.alternate.memoizedState.cachePool.pool),D=null,S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(D=S.memoizedState.cachePool.pool),D!==N&&(S.flags|=2048)),y!==f&&y&&(p.child.flags|=8192),Bx(p,p.updateQueue),Aa(p),null);case 4:return ge(),f===null&&BT(p.stateNode.containerInfo),Aa(p),null;case 10:return yu(p.type),Aa(p),null;case 19:if(Z(ln),S=p.memoizedState,S===null)return Aa(p),null;if(N=(p.flags&128)!==0,D=S.rendering,D===null)if(N)rg(S,!1);else{if(qa!==0||f!==null&&(f.flags&128)!==0)for(f=p.child;f!==null;){if(D=kx(f),D!==null){for(p.flags|=128,rg(S,!1),f=D.updateQueue,p.updateQueue=f,Bx(p,f),p.subtreeFlags=0,f=y,y=p.child;y!==null;)gP(y,f),y=y.sibling;return te(ln,ln.current&1|2),Sr&&mu(p,S.treeForkCount),p.child}f=f.sibling}S.tail!==null&&dr()>Ux&&(p.flags|=128,N=!0,rg(S,!1),p.lanes=4194304)}else{if(!N)if(f=kx(D),f!==null){if(p.flags|=128,N=!0,f=f.updateQueue,p.updateQueue=f,Bx(p,f),rg(S,!0),S.tail===null&&S.tailMode==="hidden"&&!D.alternate&&!Sr)return Aa(p),null}else 2*dr()-S.renderingStartTime>Ux&&y!==536870912&&(p.flags|=128,N=!0,rg(S,!1),p.lanes=4194304);S.isBackwards?(D.sibling=p.child,p.child=D):(f=S.last,f!==null?f.sibling=D:p.child=D,S.last=D)}return S.tail!==null?(f=S.tail,S.rendering=f,S.tail=f.sibling,S.renderingStartTime=dr(),f.sibling=null,y=ln.current,te(ln,N?y&1|2:y&1),Sr&&mu(p,S.treeForkCount),f):(Aa(p),null);case 22:case 23:return _o(p),V2(),S=p.memoizedState!==null,f!==null?f.memoizedState!==null!==S&&(p.flags|=8192):S&&(p.flags|=8192),S?(y&536870912)!==0&&(p.flags&128)===0&&(Aa(p),p.subtreeFlags&6&&(p.flags|=8192)):Aa(p),y=p.updateQueue,y!==null&&Bx(p,y.retryQueue),y=null,f!==null&&f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(y=f.memoizedState.cachePool.pool),S=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(S=p.memoizedState.cachePool.pool),S!==y&&(p.flags|=2048),f!==null&&Z(lf),null;case 24:return y=null,f!==null&&(y=f.memoizedState.cache),p.memoizedState.cache!==y&&(p.flags|=2048),yu(wn),Aa(p),null;case 25:return null;case 30:return null}throw Error(a(156,p.tag))}function FJ(f,p){switch(C2(p),p.tag){case 1:return f=p.flags,f&65536?(p.flags=f&-65537|128,p):null;case 3:return yu(wn),ge(),f=p.flags,(f&65536)!==0&&(f&128)===0?(p.flags=f&-65537|128,p):null;case 26:case 27:case 5:return _e(p),null;case 31:if(p.memoizedState!==null){if(_o(p),p.alternate===null)throw Error(a(340));nf()}return f=p.flags,f&65536?(p.flags=f&-65537|128,p):null;case 13:if(_o(p),f=p.memoizedState,f!==null&&f.dehydrated!==null){if(p.alternate===null)throw Error(a(340));nf()}return f=p.flags,f&65536?(p.flags=f&-65537|128,p):null;case 19:return Z(ln),null;case 4:return ge(),null;case 10:return yu(p.type),null;case 22:case 23:return _o(p),V2(),f!==null&&Z(lf),f=p.flags,f&65536?(p.flags=f&-65537|128,p):null;case 24:return yu(wn),null;case 25:return null;default:return null}}function UI(f,p){switch(C2(p),p.tag){case 3:yu(wn),ge();break;case 26:case 27:case 5:_e(p);break;case 4:ge();break;case 31:p.memoizedState!==null&&_o(p);break;case 13:_o(p);break;case 19:Z(ln);break;case 10:yu(p.type);break;case 22:case 23:_o(p),V2(),f!==null&&Z(lf);break;case 24:yu(wn)}}function ag(f,p){try{var y=p.updateQueue,S=y!==null?y.lastEffect:null;if(S!==null){var N=S.next;y=N;do{if((y.tag&f)===f){S=void 0;var D=y.create,B=y.inst;S=D(),B.destroy=S}y=y.next}while(y!==N)}}catch(W){Wr(p,p.return,W)}}function Nc(f,p,y){try{var S=p.updateQueue,N=S!==null?S.lastEffect:null;if(N!==null){var D=N.next;S=D;do{if((S.tag&f)===f){var B=S.inst,W=B.destroy;if(W!==void 0){B.destroy=void 0,N=p;var Q=y,he=W;try{he()}catch(Ae){Wr(N,Q,Ae)}}}S=S.next}while(S!==D)}}catch(Ae){Wr(p,p.return,Ae)}}function $I(f){var p=f.updateQueue;if(p!==null){var y=f.stateNode;try{IP(p,y)}catch(S){Wr(f,f.return,S)}}}function WI(f,p,y){y.props=hf(f.type,f.memoizedProps),y.state=f.memoizedState;try{y.componentWillUnmount()}catch(S){Wr(f,p,S)}}function ng(f,p){try{var y=f.ref;if(y!==null){switch(f.tag){case 26:case 27:case 5:var S=f.stateNode;break;case 30:S=f.stateNode;break;default:S=f.stateNode}typeof y=="function"?f.refCleanup=y(S):y.current=S}}catch(N){Wr(f,p,N)}}function gl(f,p){var y=f.ref,S=f.refCleanup;if(y!==null)if(typeof S=="function")try{S()}catch(N){Wr(f,p,N)}finally{f.refCleanup=null,f=f.alternate,f!=null&&(f.refCleanup=null)}else if(typeof y=="function")try{y(null)}catch(N){Wr(f,p,N)}else y.current=null}function YI(f){var p=f.type,y=f.memoizedProps,S=f.stateNode;try{e:switch(p){case"button":case"input":case"select":case"textarea":y.autoFocus&&S.focus();break e;case"img":y.src?S.src=y.src:y.srcSet&&(S.srcset=y.srcSet)}}catch(N){Wr(f,f.return,N)}}function yT(f,p,y){try{var S=f.stateNode;uee(S,f.type,y,p),S[wr]=p}catch(N){Wr(f,f.return,N)}}function XI(f){return f.tag===5||f.tag===3||f.tag===26||f.tag===27&&Pc(f.type)||f.tag===4}function xT(f){e:for(;;){for(;f.sibling===null;){if(f.return===null||XI(f.return))return null;f=f.return}for(f.sibling.return=f.return,f=f.sibling;f.tag!==5&&f.tag!==6&&f.tag!==18;){if(f.tag===27&&Pc(f.type)||f.flags&2||f.child===null||f.tag===4)continue e;f.child.return=f,f=f.child}if(!(f.flags&2))return f.stateNode}}function bT(f,p,y){var S=f.tag;if(S===5||S===6)f=f.stateNode,p?(y.nodeType===9?y.body:y.nodeName==="HTML"?y.ownerDocument.body:y).insertBefore(f,p):(p=y.nodeType===9?y.body:y.nodeName==="HTML"?y.ownerDocument.body:y,p.appendChild(f),y=y._reactRootContainer,y!=null||p.onclick!==null||(p.onclick=Ya));else if(S!==4&&(S===27&&Pc(f.type)&&(y=f.stateNode,p=null),f=f.child,f!==null))for(bT(f,p,y),f=f.sibling;f!==null;)bT(f,p,y),f=f.sibling}function Vx(f,p,y){var S=f.tag;if(S===5||S===6)f=f.stateNode,p?y.insertBefore(f,p):y.appendChild(f);else if(S!==4&&(S===27&&Pc(f.type)&&(y=f.stateNode),f=f.child,f!==null))for(Vx(f,p,y),f=f.sibling;f!==null;)Vx(f,p,y),f=f.sibling}function qI(f){var p=f.stateNode,y=f.memoizedProps;try{for(var S=f.type,N=p.attributes;N.length;)p.removeAttributeNode(N[0]);hi(p,S,y),p[Ze]=f,p[wr]=y}catch(D){Wr(f,f.return,D)}}var _u=!1,Tn=!1,wT=!1,ZI=typeof WeakSet=="function"?WeakSet:Set,ti=null;function GJ(f,p){if(f=f.containerInfo,GT=sb,f=vu(f),pc(f)){if("selectionStart"in f)var y={start:f.selectionStart,end:f.selectionEnd};else e:{y=(y=f.ownerDocument)&&y.defaultView||window;var S=y.getSelection&&y.getSelection();if(S&&S.rangeCount!==0){y=S.anchorNode;var N=S.anchorOffset,D=S.focusNode;S=S.focusOffset;try{y.nodeType,D.nodeType}catch{y=null;break e}var B=0,W=-1,Q=-1,he=0,Ae=0,Ee=f,pe=null;t:for(;;){for(var we;Ee!==y||N!==0&&Ee.nodeType!==3||(W=B+N),Ee!==D||S!==0&&Ee.nodeType!==3||(Q=B+S),Ee.nodeType===3&&(B+=Ee.nodeValue.length),(we=Ee.firstChild)!==null;)pe=Ee,Ee=we;for(;;){if(Ee===f)break t;if(pe===y&&++he===N&&(W=B),pe===D&&++Ae===S&&(Q=B),(we=Ee.nextSibling)!==null)break;Ee=pe,pe=Ee.parentNode}Ee=we}y=W===-1||Q===-1?null:{start:W,end:Q}}else y=null}y=y||{start:0,end:0}}else y=null;for(HT={focusedElem:f,selectionRange:y},sb=!1,ti=p;ti!==null;)if(p=ti,f=p.child,(p.subtreeFlags&1028)!==0&&f!==null)f.return=p,ti=f;else for(;ti!==null;){switch(p=ti,D=p.alternate,f=p.flags,p.tag){case 0:if((f&4)!==0&&(f=p.updateQueue,f=f!==null?f.events:null,f!==null))for(y=0;y<f.length;y++)N=f[y],N.ref.impl=N.nextImpl;break;case 11:case 15:break;case 1:if((f&1024)!==0&&D!==null){f=void 0,y=p,N=D.memoizedProps,D=D.memoizedState,S=y.stateNode;try{var ft=hf(y.type,N);f=S.getSnapshotBeforeUpdate(ft,D),S.__reactInternalSnapshotBeforeUpdate=f}catch(Lt){Wr(y,y.return,Lt)}}break;case 3:if((f&1024)!==0){if(f=p.stateNode.containerInfo,y=f.nodeType,y===9)WT(f);else if(y===1)switch(f.nodeName){case"HEAD":case"HTML":case"BODY":WT(f);break;default:f.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((f&1024)!==0)throw Error(a(163))}if(f=p.sibling,f!==null){f.return=p.return,ti=f;break}ti=p.return}}function KI(f,p,y){var S=y.flags;switch(y.tag){case 0:case 11:case 15:Cu(f,y),S&4&&ag(5,y);break;case 1:if(Cu(f,y),S&4)if(f=y.stateNode,p===null)try{f.componentDidMount()}catch(B){Wr(y,y.return,B)}else{var N=hf(y.type,p.memoizedProps);p=p.memoizedState;try{f.componentDidUpdate(N,p,f.__reactInternalSnapshotBeforeUpdate)}catch(B){Wr(y,y.return,B)}}S&64&&$I(y),S&512&&ng(y,y.return);break;case 3:if(Cu(f,y),S&64&&(f=y.updateQueue,f!==null)){if(p=null,y.child!==null)switch(y.child.tag){case 27:case 5:p=y.child.stateNode;break;case 1:p=y.child.stateNode}try{IP(f,p)}catch(B){Wr(y,y.return,B)}}break;case 27:p===null&&S&4&&qI(y);case 26:case 5:Cu(f,y),p===null&&S&4&&YI(y),S&512&&ng(y,y.return);break;case 12:Cu(f,y);break;case 31:Cu(f,y),S&4&&ej(f,y);break;case 13:Cu(f,y),S&4&&tj(f,y),S&64&&(f=y.memoizedState,f!==null&&(f=f.dehydrated,f!==null&&(y=KJ.bind(null,y),gee(f,y))));break;case 22:if(S=y.memoizedState!==null||_u,!S){p=p!==null&&p.memoizedState!==null||Tn,N=_u;var D=Tn;_u=S,(Tn=p)&&!D?ku(f,y,(y.subtreeFlags&8772)!==0):Cu(f,y),_u=N,Tn=D}break;case 30:break;default:Cu(f,y)}}function QI(f){var p=f.alternate;p!==null&&(f.alternate=null,QI(p)),f.child=null,f.deletions=null,f.sibling=null,f.tag===5&&(p=f.stateNode,p!==null&&Zn(p)),f.stateNode=null,f.return=null,f.dependencies=null,f.memoizedProps=null,f.memoizedState=null,f.pendingProps=null,f.stateNode=null,f.updateQueue=null}var Ea=null,to=!1;function Tu(f,p,y){for(y=y.child;y!==null;)JI(f,p,y),y=y.sibling}function JI(f,p,y){if(Ar&&typeof Ar.onCommitFiberUnmount=="function")try{Ar.onCommitFiberUnmount(gr,y)}catch{}switch(y.tag){case 26:Tn||gl(y,p),Tu(f,p,y),y.memoizedState?y.memoizedState.count--:y.stateNode&&(y=y.stateNode,y.parentNode.removeChild(y));break;case 27:Tn||gl(y,p);var S=Ea,N=to;Pc(y.type)&&(Ea=y.stateNode,to=!1),Tu(f,p,y),hg(y.stateNode),Ea=S,to=N;break;case 5:Tn||gl(y,p);case 6:if(S=Ea,N=to,Ea=null,Tu(f,p,y),Ea=S,to=N,Ea!==null)if(to)try{(Ea.nodeType===9?Ea.body:Ea.nodeName==="HTML"?Ea.ownerDocument.body:Ea).removeChild(y.stateNode)}catch(D){Wr(y,p,D)}else try{Ea.removeChild(y.stateNode)}catch(D){Wr(y,p,D)}break;case 18:Ea!==null&&(to?(f=Ea,$j(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,y.stateNode),Nv(f)):$j(Ea,y.stateNode));break;case 4:S=Ea,N=to,Ea=y.stateNode.containerInfo,to=!0,Tu(f,p,y),Ea=S,to=N;break;case 0:case 11:case 14:case 15:Nc(2,y,p),Tn||Nc(4,y,p),Tu(f,p,y);break;case 1:Tn||(gl(y,p),S=y.stateNode,typeof S.componentWillUnmount=="function"&&WI(y,p,S)),Tu(f,p,y);break;case 21:Tu(f,p,y);break;case 22:Tn=(S=Tn)||y.memoizedState!==null,Tu(f,p,y),Tn=S;break;default:Tu(f,p,y)}}function ej(f,p){if(p.memoizedState===null&&(f=p.alternate,f!==null&&(f=f.memoizedState,f!==null))){f=f.dehydrated;try{Nv(f)}catch(y){Wr(p,p.return,y)}}}function tj(f,p){if(p.memoizedState===null&&(f=p.alternate,f!==null&&(f=f.memoizedState,f!==null&&(f=f.dehydrated,f!==null))))try{Nv(f)}catch(y){Wr(p,p.return,y)}}function HJ(f){switch(f.tag){case 31:case 13:case 19:var p=f.stateNode;return p===null&&(p=f.stateNode=new ZI),p;case 22:return f=f.stateNode,p=f._retryCache,p===null&&(p=f._retryCache=new ZI),p;default:throw Error(a(435,f.tag))}}function Fx(f,p){var y=HJ(f);p.forEach(function(S){if(!y.has(S)){y.add(S);var N=QJ.bind(null,f,S);S.then(N,N)}})}function ro(f,p){var y=p.deletions;if(y!==null)for(var S=0;S<y.length;S++){var N=y[S],D=f,B=p,W=B;e:for(;W!==null;){switch(W.tag){case 27:if(Pc(W.type)){Ea=W.stateNode,to=!1;break e}break;case 5:Ea=W.stateNode,to=!1;break e;case 3:case 4:Ea=W.stateNode.containerInfo,to=!0;break e}W=W.return}if(Ea===null)throw Error(a(160));JI(D,B,N),Ea=null,to=!1,D=N.alternate,D!==null&&(D.return=null),N.return=null}if(p.subtreeFlags&13886)for(p=p.child;p!==null;)rj(p,f),p=p.sibling}var Es=null;function rj(f,p){var y=f.alternate,S=f.flags;switch(f.tag){case 0:case 11:case 14:case 15:ro(p,f),ao(f),S&4&&(Nc(3,f,f.return),ag(3,f),Nc(5,f,f.return));break;case 1:ro(p,f),ao(f),S&512&&(Tn||y===null||gl(y,y.return)),S&64&&_u&&(f=f.updateQueue,f!==null&&(S=f.callbacks,S!==null&&(y=f.shared.hiddenCallbacks,f.shared.hiddenCallbacks=y===null?S:y.concat(S))));break;case 26:var N=Es;if(ro(p,f),ao(f),S&512&&(Tn||y===null||gl(y,y.return)),S&4){var D=y!==null?y.memoizedState:null;if(S=f.memoizedState,y===null)if(S===null)if(f.stateNode===null){e:{S=f.type,y=f.memoizedProps,N=N.ownerDocument||N;t:switch(S){case"title":D=N.getElementsByTagName("title")[0],(!D||D[Sa]||D[Ze]||D.namespaceURI==="http://www.w3.org/2000/svg"||D.hasAttribute("itemprop"))&&(D=N.createElement(S),N.head.insertBefore(D,N.querySelector("head > title"))),hi(D,S,y),D[Ze]=f,fr(D),S=D;break e;case"link":var B=rO("link","href",N).get(S+(y.href||""));if(B){for(var W=0;W<B.length;W++)if(D=B[W],D.getAttribute("href")===(y.href==null||y.href===""?null:y.href)&&D.getAttribute("rel")===(y.rel==null?null:y.rel)&&D.getAttribute("title")===(y.title==null?null:y.title)&&D.getAttribute("crossorigin")===(y.crossOrigin==null?null:y.crossOrigin)){B.splice(W,1);break t}}D=N.createElement(S),hi(D,S,y),N.head.appendChild(D);break;case"meta":if(B=rO("meta","content",N).get(S+(y.content||""))){for(W=0;W<B.length;W++)if(D=B[W],D.getAttribute("content")===(y.content==null?null:""+y.content)&&D.getAttribute("name")===(y.name==null?null:y.name)&&D.getAttribute("property")===(y.property==null?null:y.property)&&D.getAttribute("http-equiv")===(y.httpEquiv==null?null:y.httpEquiv)&&D.getAttribute("charset")===(y.charSet==null?null:y.charSet)){B.splice(W,1);break t}}D=N.createElement(S),hi(D,S,y),N.head.appendChild(D);break;default:throw Error(a(468,S))}D[Ze]=f,fr(D),S=D}f.stateNode=S}else aO(N,f.type,f.stateNode);else f.stateNode=tO(N,S,f.memoizedProps);else D!==S?(D===null?y.stateNode!==null&&(y=y.stateNode,y.parentNode.removeChild(y)):D.count--,S===null?aO(N,f.type,f.stateNode):tO(N,S,f.memoizedProps)):S===null&&f.stateNode!==null&&yT(f,f.memoizedProps,y.memoizedProps)}break;case 27:ro(p,f),ao(f),S&512&&(Tn||y===null||gl(y,y.return)),y!==null&&S&4&&yT(f,f.memoizedProps,y.memoizedProps);break;case 5:if(ro(p,f),ao(f),S&512&&(Tn||y===null||gl(y,y.return)),f.flags&32){N=f.stateNode;try{ct(N,"")}catch(ft){Wr(f,f.return,ft)}}S&4&&f.stateNode!=null&&(N=f.memoizedProps,yT(f,N,y!==null?y.memoizedProps:N)),S&1024&&(wT=!0);break;case 6:if(ro(p,f),ao(f),S&4){if(f.stateNode===null)throw Error(a(162));S=f.memoizedProps,y=f.stateNode;try{y.nodeValue=S}catch(ft){Wr(f,f.return,ft)}}break;case 3:if(ab=null,N=Es,Es=tb(p.containerInfo),ro(p,f),Es=N,ao(f),S&4&&y!==null&&y.memoizedState.isDehydrated)try{Nv(p.containerInfo)}catch(ft){Wr(f,f.return,ft)}wT&&(wT=!1,aj(f));break;case 4:S=Es,Es=tb(f.stateNode.containerInfo),ro(p,f),ao(f),Es=S;break;case 12:ro(p,f),ao(f);break;case 31:ro(p,f),ao(f),S&4&&(S=f.updateQueue,S!==null&&(f.updateQueue=null,Fx(f,S)));break;case 13:ro(p,f),ao(f),f.child.flags&8192&&f.memoizedState!==null!=(y!==null&&y.memoizedState!==null)&&(Hx=dr()),S&4&&(S=f.updateQueue,S!==null&&(f.updateQueue=null,Fx(f,S)));break;case 22:N=f.memoizedState!==null;var Q=y!==null&&y.memoizedState!==null,he=_u,Ae=Tn;if(_u=he||N,Tn=Ae||Q,ro(p,f),Tn=Ae,_u=he,ao(f),S&8192)e:for(p=f.stateNode,p._visibility=N?p._visibility&-2:p._visibility|1,N&&(y===null||Q||_u||Tn||vf(f)),y=null,p=f;;){if(p.tag===5||p.tag===26){if(y===null){Q=y=p;try{if(D=Q.stateNode,N)B=D.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{W=Q.stateNode;var Ee=Q.memoizedProps.style,pe=Ee!=null&&Ee.hasOwnProperty("display")?Ee.display:null;W.style.display=pe==null||typeof pe=="boolean"?"":(""+pe).trim()}}catch(ft){Wr(Q,Q.return,ft)}}}else if(p.tag===6){if(y===null){Q=p;try{Q.stateNode.nodeValue=N?"":Q.memoizedProps}catch(ft){Wr(Q,Q.return,ft)}}}else if(p.tag===18){if(y===null){Q=p;try{var we=Q.stateNode;N?Wj(we,!0):Wj(Q.stateNode,!1)}catch(ft){Wr(Q,Q.return,ft)}}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===f)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===f)break e;for(;p.sibling===null;){if(p.return===null||p.return===f)break e;y===p&&(y=null),p=p.return}y===p&&(y=null),p.sibling.return=p.return,p=p.sibling}S&4&&(S=f.updateQueue,S!==null&&(y=S.retryQueue,y!==null&&(S.retryQueue=null,Fx(f,y))));break;case 19:ro(p,f),ao(f),S&4&&(S=f.updateQueue,S!==null&&(f.updateQueue=null,Fx(f,S)));break;case 30:break;case 21:break;default:ro(p,f),ao(f)}}function ao(f){var p=f.flags;if(p&2){try{for(var y,S=f.return;S!==null;){if(XI(S)){y=S;break}S=S.return}if(y==null)throw Error(a(160));switch(y.tag){case 27:var N=y.stateNode,D=xT(f);Vx(f,D,N);break;case 5:var B=y.stateNode;y.flags&32&&(ct(B,""),y.flags&=-33);var W=xT(f);Vx(f,W,B);break;case 3:case 4:var Q=y.stateNode.containerInfo,he=xT(f);bT(f,he,Q);break;default:throw Error(a(161))}}catch(Ae){Wr(f,f.return,Ae)}f.flags&=-3}p&4096&&(f.flags&=-4097)}function aj(f){if(f.subtreeFlags&1024)for(f=f.child;f!==null;){var p=f;aj(p),p.tag===5&&p.flags&1024&&p.stateNode.reset(),f=f.sibling}}function Cu(f,p){if(p.subtreeFlags&8772)for(p=p.child;p!==null;)KI(f,p.alternate,p),p=p.sibling}function vf(f){for(f=f.child;f!==null;){var p=f;switch(p.tag){case 0:case 11:case 14:case 15:Nc(4,p,p.return),vf(p);break;case 1:gl(p,p.return);var y=p.stateNode;typeof y.componentWillUnmount=="function"&&WI(p,p.return,y),vf(p);break;case 27:hg(p.stateNode);case 26:case 5:gl(p,p.return),vf(p);break;case 22:p.memoizedState===null&&vf(p);break;case 30:vf(p);break;default:vf(p)}f=f.sibling}}function ku(f,p,y){for(y=y&&(p.subtreeFlags&8772)!==0,p=p.child;p!==null;){var S=p.alternate,N=f,D=p,B=D.flags;switch(D.tag){case 0:case 11:case 15:ku(N,D,y),ag(4,D);break;case 1:if(ku(N,D,y),S=D,N=S.stateNode,typeof N.componentDidMount=="function")try{N.componentDidMount()}catch(he){Wr(S,S.return,he)}if(S=D,N=S.updateQueue,N!==null){var W=S.stateNode;try{var Q=N.shared.hiddenCallbacks;if(Q!==null)for(N.shared.hiddenCallbacks=null,N=0;N<Q.length;N++)PP(Q[N],W)}catch(he){Wr(S,S.return,he)}}y&&B&64&&$I(D),ng(D,D.return);break;case 27:qI(D);case 26:case 5:ku(N,D,y),y&&S===null&&B&4&&YI(D),ng(D,D.return);break;case 12:ku(N,D,y);break;case 31:ku(N,D,y),y&&B&4&&ej(N,D);break;case 13:ku(N,D,y),y&&B&4&&tj(N,D);break;case 22:D.memoizedState===null&&ku(N,D,y),ng(D,D.return);break;case 30:break;default:ku(N,D,y)}p=p.sibling}}function ST(f,p){var y=null;f!==null&&f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(y=f.memoizedState.cachePool.pool),f=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(f=p.memoizedState.cachePool.pool),f!==y&&(f!=null&&f.refCount++,y!=null&&Um(y))}function _T(f,p){f=null,p.alternate!==null&&(f=p.alternate.memoizedState.cache),p=p.memoizedState.cache,p!==f&&(p.refCount++,f!=null&&Um(f))}function Rs(f,p,y,S){if(p.subtreeFlags&10256)for(p=p.child;p!==null;)nj(f,p,y,S),p=p.sibling}function nj(f,p,y,S){var N=p.flags;switch(p.tag){case 0:case 11:case 15:Rs(f,p,y,S),N&2048&&ag(9,p);break;case 1:Rs(f,p,y,S);break;case 3:Rs(f,p,y,S),N&2048&&(f=null,p.alternate!==null&&(f=p.alternate.memoizedState.cache),p=p.memoizedState.cache,p!==f&&(p.refCount++,f!=null&&Um(f)));break;case 12:if(N&2048){Rs(f,p,y,S),f=p.stateNode;try{var D=p.memoizedProps,B=D.id,W=D.onPostCommit;typeof W=="function"&&W(B,p.alternate===null?"mount":"update",f.passiveEffectDuration,-0)}catch(Q){Wr(p,p.return,Q)}}else Rs(f,p,y,S);break;case 31:Rs(f,p,y,S);break;case 13:Rs(f,p,y,S);break;case 23:break;case 22:D=p.stateNode,B=p.alternate,p.memoizedState!==null?D._visibility&2?Rs(f,p,y,S):ig(f,p):D._visibility&2?Rs(f,p,y,S):(D._visibility|=2,mv(f,p,y,S,(p.subtreeFlags&10256)!==0||!1)),N&2048&&ST(B,p);break;case 24:Rs(f,p,y,S),N&2048&&_T(p.alternate,p);break;default:Rs(f,p,y,S)}}function mv(f,p,y,S,N){for(N=N&&((p.subtreeFlags&10256)!==0||!1),p=p.child;p!==null;){var D=f,B=p,W=y,Q=S,he=B.flags;switch(B.tag){case 0:case 11:case 15:mv(D,B,W,Q,N),ag(8,B);break;case 23:break;case 22:var Ae=B.stateNode;B.memoizedState!==null?Ae._visibility&2?mv(D,B,W,Q,N):ig(D,B):(Ae._visibility|=2,mv(D,B,W,Q,N)),N&&he&2048&&ST(B.alternate,B);break;case 24:mv(D,B,W,Q,N),N&&he&2048&&_T(B.alternate,B);break;default:mv(D,B,W,Q,N)}p=p.sibling}}function ig(f,p){if(p.subtreeFlags&10256)for(p=p.child;p!==null;){var y=f,S=p,N=S.flags;switch(S.tag){case 22:ig(y,S),N&2048&&ST(S.alternate,S);break;case 24:ig(y,S),N&2048&&_T(S.alternate,S);break;default:ig(y,S)}p=p.sibling}}var og=8192;function gv(f,p,y){if(f.subtreeFlags&og)for(f=f.child;f!==null;)ij(f,p,y),f=f.sibling}function ij(f,p,y){switch(f.tag){case 26:gv(f,p,y),f.flags&og&&f.memoizedState!==null&&Mee(y,Es,f.memoizedState,f.memoizedProps);break;case 5:gv(f,p,y);break;case 3:case 4:var S=Es;Es=tb(f.stateNode.containerInfo),gv(f,p,y),Es=S;break;case 22:f.memoizedState===null&&(S=f.alternate,S!==null&&S.memoizedState!==null?(S=og,og=16777216,gv(f,p,y),og=S):gv(f,p,y));break;default:gv(f,p,y)}}function oj(f){var p=f.alternate;if(p!==null&&(f=p.child,f!==null)){p.child=null;do p=f.sibling,f.sibling=null,f=p;while(f!==null)}}function sg(f){var p=f.deletions;if((f.flags&16)!==0){if(p!==null)for(var y=0;y<p.length;y++){var S=p[y];ti=S,lj(S,f)}oj(f)}if(f.subtreeFlags&10256)for(f=f.child;f!==null;)sj(f),f=f.sibling}function sj(f){switch(f.tag){case 0:case 11:case 15:sg(f),f.flags&2048&&Nc(9,f,f.return);break;case 3:sg(f);break;case 12:sg(f);break;case 22:var p=f.stateNode;f.memoizedState!==null&&p._visibility&2&&(f.return===null||f.return.tag!==13)?(p._visibility&=-3,Gx(f)):sg(f);break;default:sg(f)}}function Gx(f){var p=f.deletions;if((f.flags&16)!==0){if(p!==null)for(var y=0;y<p.length;y++){var S=p[y];ti=S,lj(S,f)}oj(f)}for(f=f.child;f!==null;){switch(p=f,p.tag){case 0:case 11:case 15:Nc(8,p,p.return),Gx(p);break;case 22:y=p.stateNode,y._visibility&2&&(y._visibility&=-3,Gx(p));break;default:Gx(p)}f=f.sibling}}function lj(f,p){for(;ti!==null;){var y=ti;switch(y.tag){case 0:case 11:case 15:Nc(8,y,p);break;case 23:case 22:if(y.memoizedState!==null&&y.memoizedState.cachePool!==null){var S=y.memoizedState.cachePool.pool;S!=null&&S.refCount++}break;case 24:Um(y.memoizedState.cache)}if(S=y.child,S!==null)S.return=y,ti=S;else e:for(y=f;ti!==null;){S=ti;var N=S.sibling,D=S.return;if(QI(S),S===y){ti=null;break e}if(N!==null){N.return=D,ti=N;break e}ti=D}}}var UJ={getCacheForType:function(f){var p=di(wn),y=p.data.get(f);return y===void 0&&(y=f(),p.data.set(f,y)),y},cacheSignal:function(){return di(wn).controller.signal}},$J=typeof WeakMap=="function"?WeakMap:Map,Pr=0,da=null,hr=null,xr=0,$r=0,To=null,Ac=!1,yv=!1,TT=!1,Nu=0,qa=0,Mc=0,pf=0,CT=0,Co=0,xv=0,lg=null,no=null,kT=!1,Hx=0,uj=0,Ux=1/0,$x=null,Dc=null,Hn=0,Lc=null,bv=null,Au=0,NT=0,AT=null,cj=null,ug=0,MT=null;function ko(){return(Pr&2)!==0&&xr!==0?xr&-xr:O.T!==null?IT():Dr()}function dj(){if(Co===0)if((xr&536870912)===0||Sr){var f=bt;bt<<=1,(bt&3932160)===0&&(bt=262144),Co=f}else Co=536870912;return f=So.current,f!==null&&(f.flags|=32),Co}function io(f,p,y){(f===da&&($r===2||$r===9)||f.cancelPendingCommit!==null)&&(wv(f,0),Ec(f,xr,Co,!1)),za(f,y),((Pr&2)===0||f!==da)&&(f===da&&((Pr&2)===0&&(pf|=y),qa===4&&Ec(f,xr,Co,!1)),yl(f))}function fj(f,p,y){if((Pr&6)!==0)throw Error(a(327));var S=!y&&(p&127)===0&&(p&f.expiredLanes)===0||_r(f,p),N=S?XJ(f,p):LT(f,p,!0),D=S;do{if(N===0){yv&&!S&&Ec(f,p,0,!1);break}else{if(y=f.current.alternate,D&&!WJ(y)){N=LT(f,p,!1),D=!1;continue}if(N===2){if(D=p,f.errorRecoveryDisabledLanes&D)var B=0;else B=f.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){p=B;e:{var W=f;N=lg;var Q=W.current.memoizedState.isDehydrated;if(Q&&(wv(W,B).flags|=256),B=LT(W,B,!1),B!==2){if(TT&&!Q){W.errorRecoveryDisabledLanes|=D,pf|=D,N=4;break e}D=no,no=N,D!==null&&(no===null?no=D:no.push.apply(no,D))}N=B}if(D=!1,N!==2)continue}}if(N===1){wv(f,0),Ec(f,p,0,!0);break}e:{switch(S=f,D=N,D){case 0:case 1:throw Error(a(345));case 4:if((p&4194048)!==p)break;case 6:Ec(S,p,Co,!Ac);break e;case 2:no=null;break;case 3:case 5:break;default:throw Error(a(329))}if((p&62914560)===p&&(N=Hx+300-dr(),10<N)){if(Ec(S,p,Co,!Ac),nr(S,0,!0)!==0)break e;Au=p,S.timeoutHandle=Hj(hj.bind(null,S,y,no,$x,kT,p,Co,pf,xv,Ac,D,"Throttled",-0,0),N);break e}hj(S,y,no,$x,kT,p,Co,pf,xv,Ac,D,null,-0,0)}}break}while(!0);yl(f)}function hj(f,p,y,S,N,D,B,W,Q,he,Ae,Ee,pe,we){if(f.timeoutHandle=-1,Ee=p.subtreeFlags,Ee&8192||(Ee&16785408)===16785408){Ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ya},ij(p,D,Ee);var ft=(D&62914560)===D?Hx-dr():(D&4194048)===D?uj-dr():0;if(ft=Dee(Ee,ft),ft!==null){Au=D,f.cancelPendingCommit=ft(wj.bind(null,f,p,D,y,S,N,B,W,Q,Ae,Ee,null,pe,we)),Ec(f,D,B,!he);return}}wj(f,p,D,y,S,N,B,W,Q)}function WJ(f){for(var p=f;;){var y=p.tag;if((y===0||y===11||y===15)&&p.flags&16384&&(y=p.updateQueue,y!==null&&(y=y.stores,y!==null)))for(var S=0;S<y.length;S++){var N=y[S],D=N.getSnapshot;N=N.value;try{if(!Ht(D(),N))return!1}catch{return!1}}if(y=p.child,p.subtreeFlags&16384&&y!==null)y.return=p,p=y;else{if(p===f)break;for(;p.sibling===null;){if(p.return===null||p.return===f)return!0;p=p.return}p.sibling.return=p.return,p=p.sibling}}return!0}function Ec(f,p,y,S){p&=~CT,p&=~pf,f.suspendedLanes|=p,f.pingedLanes&=~p,S&&(f.warmLanes|=p),S=f.expirationTimes;for(var N=p;0<N;){var D=31-ye(N),B=1<<D;S[D]=-1,N&=~B}y!==0&&ut(f,y,p)}function Wx(){return(Pr&6)===0?(cg(0),!1):!0}function DT(){if(hr!==null){if($r===0)var f=hr.return;else f=hr,gu=of=null,W2(f),dv=null,Wm=0,f=hr;for(;f!==null;)UI(f.alternate,f),f=f.return;hr=null}}function wv(f,p){var y=f.timeoutHandle;y!==-1&&(f.timeoutHandle=-1,fee(y)),y=f.cancelPendingCommit,y!==null&&(f.cancelPendingCommit=null,y()),Au=0,DT(),da=f,hr=y=pu(f.current,null),xr=p,$r=0,To=null,Ac=!1,yv=_r(f,p),TT=!1,xv=Co=CT=pf=Mc=qa=0,no=lg=null,kT=!1,(p&8)!==0&&(p|=p&32);var S=f.entangledLanes;if(S!==0)for(f=f.entanglements,S&=p;0<S;){var N=31-ye(S),D=1<<N;p|=f[N],S&=~D}return Nu=p,fx(),y}function vj(f,p){Kt=null,O.H=eg,p===cv||p===bx?(p=DP(),$r=3):p===P2?(p=DP(),$r=4):$r=p===lT?8:p!==null&&typeof p=="object"&&typeof p.then=="function"?6:1,To=p,hr===null&&(qa=1,Ix(f,Wo(p,f.current)))}function pj(){var f=So.current;return f===null?!0:(xr&4194048)===xr?Zo===null:(xr&62914560)===xr||(xr&536870912)!==0?f===Zo:!1}function mj(){var f=O.H;return O.H=eg,f===null?eg:f}function gj(){var f=O.A;return O.A=UJ,f}function Yx(){qa=4,Ac||(xr&4194048)!==xr&&So.current!==null||(yv=!0),(Mc&134217727)===0&&(pf&134217727)===0||da===null||Ec(da,xr,Co,!1)}function LT(f,p,y){var S=Pr;Pr|=2;var N=mj(),D=gj();(da!==f||xr!==p)&&($x=null,wv(f,p)),p=!1;var B=qa;e:do try{if($r!==0&&hr!==null){var W=hr,Q=To;switch($r){case 8:DT(),B=6;break e;case 3:case 2:case 9:case 6:So.current===null&&(p=!0);var he=$r;if($r=0,To=null,Sv(f,W,Q,he),y&&yv){B=0;break e}break;default:he=$r,$r=0,To=null,Sv(f,W,Q,he)}}YJ(),B=qa;break}catch(Ae){vj(f,Ae)}while(!0);return p&&f.shellSuspendCounter++,gu=of=null,Pr=S,O.H=N,O.A=D,hr===null&&(da=null,xr=0,fx()),B}function YJ(){for(;hr!==null;)yj(hr)}function XJ(f,p){var y=Pr;Pr|=2;var S=mj(),N=gj();da!==f||xr!==p?($x=null,Ux=dr()+500,wv(f,p)):yv=_r(f,p);e:do try{if($r!==0&&hr!==null){p=hr;var D=To;t:switch($r){case 1:$r=0,To=null,Sv(f,p,D,1);break;case 2:case 9:if(AP(D)){$r=0,To=null,xj(p);break}p=function(){$r!==2&&$r!==9||da!==f||($r=7),yl(f)},D.then(p,p);break e;case 3:$r=7;break e;case 4:$r=5;break e;case 7:AP(D)?($r=0,To=null,xj(p)):($r=0,To=null,Sv(f,p,D,7));break;case 5:var B=null;switch(hr.tag){case 26:B=hr.memoizedState;case 5:case 27:var W=hr;if(B?nO(B):W.stateNode.complete){$r=0,To=null;var Q=W.sibling;if(Q!==null)hr=Q;else{var he=W.return;he!==null?(hr=he,Xx(he)):hr=null}break t}}$r=0,To=null,Sv(f,p,D,5);break;case 6:$r=0,To=null,Sv(f,p,D,6);break;case 8:DT(),qa=6;break e;default:throw Error(a(462))}}qJ();break}catch(Ae){vj(f,Ae)}while(!0);return gu=of=null,O.H=S,O.A=N,Pr=y,hr!==null?0:(da=null,xr=0,fx(),qa)}function qJ(){for(;hr!==null&&!Fe();)yj(hr)}function yj(f){var p=GI(f.alternate,f,Nu);f.memoizedProps=f.pendingProps,p===null?Xx(f):hr=p}function xj(f){var p=f,y=p.alternate;switch(p.tag){case 15:case 0:p=jI(y,p,p.pendingProps,p.type,void 0,xr);break;case 11:p=jI(y,p,p.pendingProps,p.type.render,p.ref,xr);break;case 5:W2(p);default:UI(y,p),p=hr=gP(p,Nu),p=GI(y,p,Nu)}f.memoizedProps=f.pendingProps,p===null?Xx(f):hr=p}function Sv(f,p,y,S){gu=of=null,W2(p),dv=null,Wm=0;var N=p.return;try{if(OJ(f,N,p,y,xr)){qa=1,Ix(f,Wo(y,f.current)),hr=null;return}}catch(D){if(N!==null)throw hr=N,D;qa=1,Ix(f,Wo(y,f.current)),hr=null;return}p.flags&32768?(Sr||S===1?f=!0:yv||(xr&536870912)!==0?f=!1:(Ac=f=!0,(S===2||S===9||S===3||S===6)&&(S=So.current,S!==null&&S.tag===13&&(S.flags|=16384))),bj(p,f)):Xx(p)}function Xx(f){var p=f;do{if((p.flags&32768)!==0){bj(p,Ac);return}f=p.return;var y=VJ(p.alternate,p,Nu);if(y!==null){hr=y;return}if(p=p.sibling,p!==null){hr=p;return}hr=p=f}while(p!==null);qa===0&&(qa=5)}function bj(f,p){do{var y=FJ(f.alternate,f);if(y!==null){y.flags&=32767,hr=y;return}if(y=f.return,y!==null&&(y.flags|=32768,y.subtreeFlags=0,y.deletions=null),!p&&(f=f.sibling,f!==null)){hr=f;return}hr=f=y}while(f!==null);qa=6,hr=null}function wj(f,p,y,S,N,D,B,W,Q){f.cancelPendingCommit=null;do qx();while(Hn!==0);if((Pr&6)!==0)throw Error(a(327));if(p!==null){if(p===f.current)throw Error(a(177));if(D=p.lanes|p.childLanes,D|=x2,la(f,y,D,B,W,Q),f===da&&(hr=da=null,xr=0),bv=p,Lc=f,Au=y,NT=D,AT=N,cj=S,(p.subtreeFlags&10256)!==0||(p.flags&10256)!==0?(f.callbackNode=null,f.callbackPriority=0,JJ(rn,function(){return kj(),null})):(f.callbackNode=null,f.callbackPriority=0),S=(p.flags&13878)!==0,(p.subtreeFlags&13878)!==0||S){S=O.T,O.T=null,N=U.p,U.p=2,B=Pr,Pr|=4;try{GJ(f,p,y)}finally{Pr=B,U.p=N,O.T=S}}Hn=1,Sj(),_j(),Tj()}}function Sj(){if(Hn===1){Hn=0;var f=Lc,p=bv,y=(p.flags&13878)!==0;if((p.subtreeFlags&13878)!==0||y){y=O.T,O.T=null;var S=U.p;U.p=2;var N=Pr;Pr|=4;try{rj(p,f);var D=HT,B=vu(f.containerInfo),W=D.focusedElem,Q=D.selectionRange;if(B!==W&&W&&W.ownerDocument&&hl(W.ownerDocument.documentElement,W)){if(Q!==null&&pc(W)){var he=Q.start,Ae=Q.end;if(Ae===void 0&&(Ae=he),"selectionStart"in W)W.selectionStart=he,W.selectionEnd=Math.min(Ae,W.value.length);else{var Ee=W.ownerDocument||document,pe=Ee&&Ee.defaultView||window;if(pe.getSelection){var we=pe.getSelection(),ft=W.textContent.length,Lt=Math.min(Q.start,ft),aa=Q.end===void 0?Lt:Math.min(Q.end,ft);!we.extend&&Lt>aa&&(B=aa,aa=Lt,Lt=B);var ue=sn(W,Lt),ae=sn(W,aa);if(ue&&ae&&(we.rangeCount!==1||we.anchorNode!==ue.node||we.anchorOffset!==ue.offset||we.focusNode!==ae.node||we.focusOffset!==ae.offset)){var fe=Ee.createRange();fe.setStart(ue.node,ue.offset),we.removeAllRanges(),Lt>aa?(we.addRange(fe),we.extend(ae.node,ae.offset)):(fe.setEnd(ae.node,ae.offset),we.addRange(fe))}}}}for(Ee=[],we=W;we=we.parentNode;)we.nodeType===1&&Ee.push({element:we,left:we.scrollLeft,top:we.scrollTop});for(typeof W.focus=="function"&&W.focus(),W=0;W<Ee.length;W++){var De=Ee[W];De.element.scrollLeft=De.left,De.element.scrollTop=De.top}}sb=!!GT,HT=GT=null}finally{Pr=N,U.p=S,O.T=y}}f.current=p,Hn=2}}function _j(){if(Hn===2){Hn=0;var f=Lc,p=bv,y=(p.flags&8772)!==0;if((p.subtreeFlags&8772)!==0||y){y=O.T,O.T=null;var S=U.p;U.p=2;var N=Pr;Pr|=4;try{KI(f,p.alternate,p)}finally{Pr=N,U.p=S,O.T=y}}Hn=3}}function Tj(){if(Hn===4||Hn===3){Hn=0,Mt();var f=Lc,p=bv,y=Au,S=cj;(p.subtreeFlags&10256)!==0||(p.flags&10256)!==0?Hn=5:(Hn=0,bv=Lc=null,Cj(f,f.pendingLanes));var N=f.pendingLanes;if(N===0&&(Dc=null),Ba(y),p=p.stateNode,Ar&&typeof Ar.onCommitFiberRoot=="function")try{Ar.onCommitFiberRoot(gr,p,void 0,(p.current.flags&128)===128)}catch{}if(S!==null){p=O.T,N=U.p,U.p=2,O.T=null;try{for(var D=f.onRecoverableError,B=0;B<S.length;B++){var W=S[B];D(W.value,{componentStack:W.stack})}}finally{O.T=p,U.p=N}}(Au&3)!==0&&qx(),yl(f),N=f.pendingLanes,(y&261930)!==0&&(N&42)!==0?f===MT?ug++:(ug=0,MT=f):ug=0,cg(0)}}function Cj(f,p){(f.pooledCacheLanes&=p)===0&&(p=f.pooledCache,p!=null&&(f.pooledCache=null,Um(p)))}function qx(){return Sj(),_j(),Tj(),kj()}function kj(){if(Hn!==5)return!1;var f=Lc,p=NT;NT=0;var y=Ba(Au),S=O.T,N=U.p;try{U.p=32>y?32:y,O.T=null,y=AT,AT=null;var D=Lc,B=Au;if(Hn=0,bv=Lc=null,Au=0,(Pr&6)!==0)throw Error(a(331));var W=Pr;if(Pr|=4,sj(D.current),nj(D,D.current,B,y),Pr=W,cg(0,!1),Ar&&typeof Ar.onPostCommitFiberRoot=="function")try{Ar.onPostCommitFiberRoot(gr,D)}catch{}return!0}finally{U.p=N,O.T=S,Cj(f,p)}}function Nj(f,p,y){p=Wo(y,p),p=sT(f.stateNode,p,2),f=Tc(f,p,2),f!==null&&(za(f,2),yl(f))}function Wr(f,p,y){if(f.tag===3)Nj(f,f,y);else for(;p!==null;){if(p.tag===3){Nj(p,f,y);break}else if(p.tag===1){var S=p.stateNode;if(typeof p.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(Dc===null||!Dc.has(S))){f=Wo(y,f),y=AI(2),S=Tc(p,y,2),S!==null&&(MI(y,S,p,f),za(S,2),yl(S));break}}p=p.return}}function ET(f,p,y){var S=f.pingCache;if(S===null){S=f.pingCache=new $J;var N=new Set;S.set(p,N)}else N=S.get(p),N===void 0&&(N=new Set,S.set(p,N));N.has(y)||(TT=!0,N.add(y),f=ZJ.bind(null,f,p,y),p.then(f,f))}function ZJ(f,p,y){var S=f.pingCache;S!==null&&S.delete(p),f.pingedLanes|=f.suspendedLanes&y,f.warmLanes&=~y,da===f&&(xr&y)===y&&(qa===4||qa===3&&(xr&62914560)===xr&&300>dr()-Hx?(Pr&2)===0&&wv(f,0):CT|=y,xv===xr&&(xv=0)),yl(f)}function Aj(f,p){p===0&&(p=Mr()),f=rf(f,p),f!==null&&(za(f,p),yl(f))}function KJ(f){var p=f.memoizedState,y=0;p!==null&&(y=p.retryLane),Aj(f,y)}function QJ(f,p){var y=0;switch(f.tag){case 31:case 13:var S=f.stateNode,N=f.memoizedState;N!==null&&(y=N.retryLane);break;case 19:S=f.stateNode;break;case 22:S=f.stateNode._retryCache;break;default:throw Error(a(314))}S!==null&&S.delete(p),Aj(f,y)}function JJ(f,p){return Nr(f,p)}var Zx=null,_v=null,RT=!1,Kx=!1,PT=!1,Rc=0;function yl(f){f!==_v&&f.next===null&&(_v===null?Zx=_v=f:_v=_v.next=f),Kx=!0,RT||(RT=!0,tee())}function cg(f,p){if(!PT&&Kx){PT=!0;do for(var y=!1,S=Zx;S!==null;){if(f!==0){var N=S.pendingLanes;if(N===0)var D=0;else{var B=S.suspendedLanes,W=S.pingedLanes;D=(1<<31-ye(42|f)+1)-1,D&=N&~(B&~W),D=D&201326741?D&201326741|1:D?D|2:0}D!==0&&(y=!0,Ej(S,D))}else D=xr,D=nr(S,S===da?D:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(D&3)===0||_r(S,D)||(y=!0,Ej(S,D));S=S.next}while(y);PT=!1}}function eee(){Mj()}function Mj(){Kx=RT=!1;var f=0;Rc!==0&&dee()&&(f=Rc);for(var p=dr(),y=null,S=Zx;S!==null;){var N=S.next,D=Dj(S,p);D===0?(S.next=null,y===null?Zx=N:y.next=N,N===null&&(_v=y)):(y=S,(f!==0||(D&3)!==0)&&(Kx=!0)),S=N}Hn!==0&&Hn!==5||cg(f),Rc!==0&&(Rc=0)}function Dj(f,p){for(var y=f.suspendedLanes,S=f.pingedLanes,N=f.expirationTimes,D=f.pendingLanes&-62914561;0<D;){var B=31-ye(D),W=1<<B,Q=N[B];Q===-1?((W&y)===0||(W&S)!==0)&&(N[B]=ma(W,p)):Q<=p&&(f.expiredLanes|=W),D&=~W}if(p=da,y=xr,y=nr(f,f===p?y:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),S=f.callbackNode,y===0||f===p&&($r===2||$r===9)||f.cancelPendingCommit!==null)return S!==null&&S!==null&&rr(S),f.callbackNode=null,f.callbackPriority=0;if((y&3)===0||_r(f,y)){if(p=y&-y,p===f.callbackPriority)return p;switch(S!==null&&rr(S),Ba(y)){case 2:case 8:y=va;break;case 32:y=rn;break;case 268435456:y=En;break;default:y=rn}return S=Lj.bind(null,f),y=Nr(y,S),f.callbackPriority=p,f.callbackNode=y,p}return S!==null&&S!==null&&rr(S),f.callbackPriority=2,f.callbackNode=null,2}function Lj(f,p){if(Hn!==0&&Hn!==5)return f.callbackNode=null,f.callbackPriority=0,null;var y=f.callbackNode;if(qx()&&f.callbackNode!==y)return null;var S=xr;return S=nr(f,f===da?S:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),S===0?null:(fj(f,S,p),Dj(f,dr()),f.callbackNode!=null&&f.callbackNode===y?Lj.bind(null,f):null)}function Ej(f,p){if(qx())return null;fj(f,p,!0)}function tee(){hee(function(){(Pr&6)!==0?Nr(sa,eee):Mj()})}function IT(){if(Rc===0){var f=lv;f===0&&(f=Pt,Pt<<=1,(Pt&261888)===0&&(Pt=256)),Rc=f}return Rc}function Rj(f){return f==null||typeof f=="symbol"||typeof f=="boolean"?null:typeof f=="function"?f:Ts(""+f)}function Pj(f,p){var y=p.ownerDocument.createElement("input");return y.name=p.name,y.value=p.value,f.id&&y.setAttribute("form",f.id),p.parentNode.insertBefore(y,p),f=new FormData(f),y.parentNode.removeChild(y),f}function ree(f,p,y,S,N){if(p==="submit"&&y&&y.stateNode===N){var D=Rj((N[wr]||null).action),B=S.submitter;B&&(p=(p=B[wr]||null)?Rj(p.formAction):B.getAttribute("formAction"),p!==null&&(D=p,B=null));var W=new Vi("action","action",null,S,N);f.push({event:W,listeners:[{instance:null,listener:function(){if(S.defaultPrevented){if(Rc!==0){var Q=B?Pj(N,B):new FormData(N);tT(y,{pending:!0,data:Q,method:N.method,action:D},null,Q)}}else typeof D=="function"&&(W.preventDefault(),Q=B?Pj(N,B):new FormData(N),tT(y,{pending:!0,data:Q,method:N.method,action:D},D,Q))},currentTarget:N}]})}}for(var jT=0;jT<rv.length;jT++){var OT=rv[jT],aee=OT.toLowerCase(),nee=OT[0].toUpperCase()+OT.slice(1);ea(aee,"on"+nee)}ea(qe,"onAnimationEnd"),ea(lt,"onAnimationIteration"),ea(It,"onAnimationStart"),ea("dblclick","onDoubleClick"),ea("focusin","onFocus"),ea("focusout","onBlur"),ea(Ga,"onTransitionRun"),ea(Gn,"onTransitionStart"),ea(ka,"onTransitionCancel"),ea(tf,"onTransitionEnd"),Qr("onMouseEnter",["mouseout","mouseover"]),Qr("onMouseLeave",["mouseout","mouseover"]),Qr("onPointerEnter",["pointerout","pointerover"]),Qr("onPointerLeave",["pointerout","pointerover"]),Pn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Pn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var dg="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),iee=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(dg));function Ij(f,p){p=(p&4)!==0;for(var y=0;y<f.length;y++){var S=f[y],N=S.event;S=S.listeners;e:{var D=void 0;if(p)for(var B=S.length-1;0<=B;B--){var W=S[B],Q=W.instance,he=W.currentTarget;if(W=W.listener,Q!==D&&N.isPropagationStopped())break e;D=W,N.currentTarget=he;try{D(N)}catch(Ae){gc(Ae)}N.currentTarget=null,D=Q}else for(B=0;B<S.length;B++){if(W=S[B],Q=W.instance,he=W.currentTarget,W=W.listener,Q!==D&&N.isPropagationStopped())break e;D=W,N.currentTarget=he;try{D(N)}catch(Ae){gc(Ae)}N.currentTarget=null,D=Q}}}}function vr(f,p){var y=p[tt];y===void 0&&(y=p[tt]=new Set);var S=f+"__bubble";y.has(S)||(jj(p,f,2,!1),y.add(S))}function zT(f,p,y){var S=0;p&&(S|=4),jj(y,f,S,p)}var Qx="_reactListening"+Math.random().toString(36).slice(2);function BT(f){if(!f[Qx]){f[Qx]=!0,Vo.forEach(function(y){y!=="selectionchange"&&(iee.has(y)||zT(y,!1,f),zT(y,!0,f))});var p=f.nodeType===9?f:f.ownerDocument;p===null||p[Qx]||(p[Qx]=!0,zT("selectionchange",!1,p))}}function jj(f,p,y,S){switch(dO(p)){case 2:var N=Ree;break;case 8:N=Pee;break;default:N=eC}y=N.bind(null,p,y,f),N=void 0,!zn||p!=="touchstart"&&p!=="touchmove"&&p!=="wheel"||(N=!0),S?N!==void 0?f.addEventListener(p,y,{capture:!0,passive:N}):f.addEventListener(p,y,!0):N!==void 0?f.addEventListener(p,y,{passive:N}):f.addEventListener(p,y,!1)}function VT(f,p,y,S,N){var D=S;if((p&1)===0&&(p&2)===0&&S!==null)e:for(;;){if(S===null)return;var B=S.tag;if(B===3||B===4){var W=S.stateNode.containerInfo;if(W===N)break;if(B===4)for(B=S.return;B!==null;){var Q=B.tag;if((Q===3||Q===4)&&B.stateNode.containerInfo===N)return;B=B.return}for(;W!==null;){if(B=Ur(W),B===null)return;if(Q=B.tag,Q===5||Q===6||Q===26||Q===27){S=D=B;continue e}W=W.parentNode}}S=S.return}il(function(){var he=D,Ae=Ue(y),Ee=[];e:{var pe=Ls.get(f);if(pe!==void 0){var we=Vi,ft=f;switch(f){case"keypress":if(Fo(y)===0)break e;case"keydown":case"keyup":we=Ns;break;case"focusin":ft="focus",we=Cs;break;case"focusout":ft="blur",we=Cs;break;case"beforeblur":case"afterblur":we=Cs;break;case"click":if(y.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":we=yr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=ga;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=uu;break;case qe:case lt:case It:we=Uo;break;case tf:we=Qd;break;case"scroll":case"scrollend":we=ol;break;case"wheel":we=Dm;break;case"copy":case"cut":case"paste":we=Mm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=lu;break;case"toggle":case"beforetoggle":we=ll}var Lt=(p&4)!==0,aa=!Lt&&(f==="scroll"||f==="scrollend"),ue=Lt?pe!==null?pe+"Capture":null:pe;Lt=[];for(var ae=he,fe;ae!==null;){var De=ae;if(fe=De.stateNode,De=De.tag,De!==5&&De!==26&&De!==27||fe===null||ue===null||(De=eo(ae,ue),De!=null&&Lt.push(fg(ae,De,fe))),aa)break;ae=ae.return}0<Lt.length&&(pe=new we(pe,ft,null,y,Ae),Ee.push({event:pe,listeners:Lt}))}}if((p&7)===0){e:{if(pe=f==="mouseover"||f==="pointerover",we=f==="mouseout"||f==="pointerout",pe&&y!==go&&(ft=y.relatedTarget||y.fromElement)&&(Ur(ft)||ft[le]))break e;if((we||pe)&&(pe=Ae.window===Ae?Ae:(pe=Ae.ownerDocument)?pe.defaultView||pe.parentWindow:window,we?(ft=y.relatedTarget||y.toElement,we=he,ft=ft?Ur(ft):null,ft!==null&&(aa=i(ft),Lt=ft.tag,ft!==aa||Lt!==5&&Lt!==27&&Lt!==6)&&(ft=null)):(we=null,ft=he),we!==ft)){if(Lt=yr,De="onMouseLeave",ue="onMouseEnter",ae="mouse",(f==="pointerout"||f==="pointerover")&&(Lt=lu,De="onPointerLeave",ue="onPointerEnter",ae="pointer"),aa=we==null?pe:Kr(we),fe=ft==null?pe:Kr(ft),pe=new Lt(De,ae+"leave",we,y,Ae),pe.target=aa,pe.relatedTarget=fe,De=null,Ur(Ae)===he&&(Lt=new Lt(ue,ae+"enter",ft,y,Ae),Lt.target=fe,Lt.relatedTarget=aa,De=Lt),aa=De,we&&ft)t:{for(Lt=oee,ue=we,ae=ft,fe=0,De=ue;De;De=Lt(De))fe++;De=0;for(var _t=ae;_t;_t=Lt(_t))De++;for(;0<fe-De;)ue=Lt(ue),fe--;for(;0<De-fe;)ae=Lt(ae),De--;for(;fe--;){if(ue===ae||ae!==null&&ue===ae.alternate){Lt=ue;break t}ue=Lt(ue),ae=Lt(ae)}Lt=null}else Lt=null;we!==null&&Oj(Ee,pe,we,Lt,!1),ft!==null&&aa!==null&&Oj(Ee,aa,ft,Lt,!0)}}e:{if(pe=he?Kr(he):window,we=pe.nodeName&&pe.nodeName.toLowerCase(),we==="select"||we==="input"&&pe.type==="file")var Lr=Le;else if(hu(pe))if(Re)Lr=Om;else{Lr=Im;var yt=Ds}else we=pe.nodeName,!we||we.toLowerCase()!=="input"||pe.type!=="checkbox"&&pe.type!=="radio"?he&&Xe(he.elementType)&&(Lr=Le):Lr=jm;if(Lr&&(Lr=Lr(f,he))){cl(Ee,Lr,y,Ae);break e}yt&&yt(f,pe,he),f==="focusout"&&he&&pe.type==="number"&&he.memoizedProps.value!=null&&J(pe,"number",pe.value)}switch(yt=he?Kr(he):window,f){case"focusin":(hu(yt)||yt.contentEditable==="true")&&(mc=yt,Bm=he,ef=null);break;case"focusout":ef=Bm=mc=null;break;case"mousedown":Vm=!0;break;case"contextmenu":case"mouseup":case"dragend":Vm=!1,Fm(Ee,y,Ae);break;case"selectionchange":if(y2)break;case"keydown":case"keyup":Fm(Ee,y,Ae)}var er;if(du)e:{switch(f){case"compositionstart":var br="onCompositionStart";break e;case"compositionend":br="onCompositionEnd";break e;case"compositionupdate":br="onCompositionUpdate";break e}br=void 0}else Ms?Jd(f,y)&&(br="onCompositionEnd"):f==="keydown"&&y.keyCode===229&&(br="onCompositionStart");br&&(ul&&y.locale!=="ko"&&(Ms||br!=="onCompositionStart"?br==="onCompositionEnd"&&Ms&&(er=ca()):(Ta=Ae,Bn="value"in Ta?Ta.value:Ta.textContent,Ms=!0)),yt=Jx(he,br),0<yt.length&&(br=new ui(br,f,null,y,Ae),Ee.push({event:br,listeners:yt}),er?br.data=er:(er=ev(y),er!==null&&(br.data=er)))),(er=hc?Em(f,y):Rm(f,y))&&(br=Jx(he,"onBeforeInput"),0<br.length&&(yt=new ui("onBeforeInput","beforeinput",null,y,Ae),Ee.push({event:yt,listeners:br}),yt.data=er)),ree(Ee,f,he,y,Ae)}Ij(Ee,p)})}function fg(f,p,y){return{instance:f,listener:p,currentTarget:y}}function Jx(f,p){for(var y=p+"Capture",S=[];f!==null;){var N=f,D=N.stateNode;if(N=N.tag,N!==5&&N!==26&&N!==27||D===null||(N=eo(f,y),N!=null&&S.unshift(fg(f,N,D)),N=eo(f,p),N!=null&&S.push(fg(f,N,D))),f.tag===3)return S;f=f.return}return[]}function oee(f){if(f===null)return null;do f=f.return;while(f&&f.tag!==5&&f.tag!==27);return f||null}function Oj(f,p,y,S,N){for(var D=p._reactName,B=[];y!==null&&y!==S;){var W=y,Q=W.alternate,he=W.stateNode;if(W=W.tag,Q!==null&&Q===S)break;W!==5&&W!==26&&W!==27||he===null||(Q=he,N?(he=eo(y,D),he!=null&&B.unshift(fg(y,he,Q))):N||(he=eo(y,D),he!=null&&B.push(fg(y,he,Q)))),y=y.return}B.length!==0&&f.push({event:p,listeners:B})}var see=/\r\n?/g,lee=/\u0000|\uFFFD/g;function zj(f){return(typeof f=="string"?f:""+f).replace(see,`
`).replace(lee,"")}function Bj(f,p){return p=zj(p),zj(f)===p}function ra(f,p,y,S,N,D){switch(y){case"children":typeof S=="string"?p==="body"||p==="textarea"&&S===""||ct(f,S):(typeof S=="number"||typeof S=="bigint")&&p!=="body"&&ct(f,""+S);break;case"className":In(f,"class",S);break;case"tabIndex":In(f,"tabindex",S);break;case"dir":case"role":case"viewBox":case"width":case"height":In(f,y,S);break;case"style":Qn(f,S,D);break;case"data":if(p!=="object"){In(f,"data",S);break}case"src":case"href":if(S===""&&(p!=="a"||y!=="href")){f.removeAttribute(y);break}if(S==null||typeof S=="function"||typeof S=="symbol"||typeof S=="boolean"){f.removeAttribute(y);break}S=Ts(""+S),f.setAttribute(y,S);break;case"action":case"formAction":if(typeof S=="function"){f.setAttribute(y,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof D=="function"&&(y==="formAction"?(p!=="input"&&ra(f,p,"name",N.name,N,null),ra(f,p,"formEncType",N.formEncType,N,null),ra(f,p,"formMethod",N.formMethod,N,null),ra(f,p,"formTarget",N.formTarget,N,null)):(ra(f,p,"encType",N.encType,N,null),ra(f,p,"method",N.method,N,null),ra(f,p,"target",N.target,N,null)));if(S==null||typeof S=="symbol"||typeof S=="boolean"){f.removeAttribute(y);break}S=Ts(""+S),f.setAttribute(y,S);break;case"onClick":S!=null&&(f.onclick=Ya);break;case"onScroll":S!=null&&vr("scroll",f);break;case"onScrollEnd":S!=null&&vr("scrollend",f);break;case"dangerouslySetInnerHTML":if(S!=null){if(typeof S!="object"||!("__html"in S))throw Error(a(61));if(y=S.__html,y!=null){if(N.children!=null)throw Error(a(60));f.innerHTML=y}}break;case"multiple":f.multiple=S&&typeof S!="function"&&typeof S!="symbol";break;case"muted":f.muted=S&&typeof S!="function"&&typeof S!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(S==null||typeof S=="function"||typeof S=="boolean"||typeof S=="symbol"){f.removeAttribute("xlink:href");break}y=Ts(""+S),f.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",y);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":S!=null&&typeof S!="function"&&typeof S!="symbol"?f.setAttribute(y,""+S):f.removeAttribute(y);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":S&&typeof S!="function"&&typeof S!="symbol"?f.setAttribute(y,""):f.removeAttribute(y);break;case"capture":case"download":S===!0?f.setAttribute(y,""):S!==!1&&S!=null&&typeof S!="function"&&typeof S!="symbol"?f.setAttribute(y,S):f.removeAttribute(y);break;case"cols":case"rows":case"size":case"span":S!=null&&typeof S!="function"&&typeof S!="symbol"&&!isNaN(S)&&1<=S?f.setAttribute(y,S):f.removeAttribute(y);break;case"rowSpan":case"start":S==null||typeof S=="function"||typeof S=="symbol"||isNaN(S)?f.removeAttribute(y):f.setAttribute(y,S);break;case"popover":vr("beforetoggle",f),vr("toggle",f),yn(f,"popover",S);break;case"xlinkActuate":Wa(f,"http://www.w3.org/1999/xlink","xlink:actuate",S);break;case"xlinkArcrole":Wa(f,"http://www.w3.org/1999/xlink","xlink:arcrole",S);break;case"xlinkRole":Wa(f,"http://www.w3.org/1999/xlink","xlink:role",S);break;case"xlinkShow":Wa(f,"http://www.w3.org/1999/xlink","xlink:show",S);break;case"xlinkTitle":Wa(f,"http://www.w3.org/1999/xlink","xlink:title",S);break;case"xlinkType":Wa(f,"http://www.w3.org/1999/xlink","xlink:type",S);break;case"xmlBase":Wa(f,"http://www.w3.org/XML/1998/namespace","xml:base",S);break;case"xmlLang":Wa(f,"http://www.w3.org/XML/1998/namespace","xml:lang",S);break;case"xmlSpace":Wa(f,"http://www.w3.org/XML/1998/namespace","xml:space",S);break;case"is":yn(f,"is",S);break;case"innerText":case"textContent":break;default:(!(2<y.length)||y[0]!=="o"&&y[0]!=="O"||y[1]!=="n"&&y[1]!=="N")&&(y=jn.get(y)||y,yn(f,y,S))}}function FT(f,p,y,S,N,D){switch(y){case"style":Qn(f,S,D);break;case"dangerouslySetInnerHTML":if(S!=null){if(typeof S!="object"||!("__html"in S))throw Error(a(61));if(y=S.__html,y!=null){if(N.children!=null)throw Error(a(60));f.innerHTML=y}}break;case"children":typeof S=="string"?ct(f,S):(typeof S=="number"||typeof S=="bigint")&&ct(f,""+S);break;case"onScroll":S!=null&&vr("scroll",f);break;case"onScrollEnd":S!=null&&vr("scrollend",f);break;case"onClick":S!=null&&(f.onclick=Ya);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bi.hasOwnProperty(y))e:{if(y[0]==="o"&&y[1]==="n"&&(N=y.endsWith("Capture"),p=y.slice(2,N?y.length-7:void 0),D=f[wr]||null,D=D!=null?D[y]:null,typeof D=="function"&&f.removeEventListener(p,D,N),typeof S=="function")){typeof D!="function"&&D!==null&&(y in f?f[y]=null:f.hasAttribute(y)&&f.removeAttribute(y)),f.addEventListener(p,S,N);break e}y in f?f[y]=S:S===!0?f.setAttribute(y,""):yn(f,y,S)}}}function hi(f,p,y){switch(p){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":vr("error",f),vr("load",f);var S=!1,N=!1,D;for(D in y)if(y.hasOwnProperty(D)){var B=y[D];if(B!=null)switch(D){case"src":S=!0;break;case"srcSet":N=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,p));default:ra(f,p,D,B,y,null)}}N&&ra(f,p,"srcSet",y.srcSet,y,null),S&&ra(f,p,"src",y.src,y,null);return;case"input":vr("invalid",f);var W=D=B=N=null,Q=null,he=null;for(S in y)if(y.hasOwnProperty(S)){var Ae=y[S];if(Ae!=null)switch(S){case"name":N=Ae;break;case"type":B=Ae;break;case"checked":Q=Ae;break;case"defaultChecked":he=Ae;break;case"value":D=Ae;break;case"defaultValue":W=Ae;break;case"children":case"dangerouslySetInnerHTML":if(Ae!=null)throw Error(a(137,p));break;default:ra(f,p,S,Ae,y,null)}}Si(f,D,W,Q,he,B,N,!1);return;case"select":vr("invalid",f),S=B=D=null;for(N in y)if(y.hasOwnProperty(N)&&(W=y[N],W!=null))switch(N){case"value":D=W;break;case"defaultValue":B=W;break;case"multiple":S=W;default:ra(f,p,N,W,y,null)}p=D,y=B,f.multiple=!!S,p!=null?Me(f,!!S,p,!1):y!=null&&Me(f,!!S,y,!0);return;case"textarea":vr("invalid",f),D=N=S=null;for(B in y)if(y.hasOwnProperty(B)&&(W=y[B],W!=null))switch(B){case"value":S=W;break;case"defaultValue":N=W;break;case"children":D=W;break;case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(91));break;default:ra(f,p,B,W,y,null)}de(f,S,N,D);return;case"option":for(Q in y)if(y.hasOwnProperty(Q)&&(S=y[Q],S!=null))switch(Q){case"selected":f.selected=S&&typeof S!="function"&&typeof S!="symbol";break;default:ra(f,p,Q,S,y,null)}return;case"dialog":vr("beforetoggle",f),vr("toggle",f),vr("cancel",f),vr("close",f);break;case"iframe":case"object":vr("load",f);break;case"video":case"audio":for(S=0;S<dg.length;S++)vr(dg[S],f);break;case"image":vr("error",f),vr("load",f);break;case"details":vr("toggle",f);break;case"embed":case"source":case"link":vr("error",f),vr("load",f);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(he in y)if(y.hasOwnProperty(he)&&(S=y[he],S!=null))switch(he){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,p));default:ra(f,p,he,S,y,null)}return;default:if(Xe(p)){for(Ae in y)y.hasOwnProperty(Ae)&&(S=y[Ae],S!==void 0&&FT(f,p,Ae,S,y,void 0));return}}for(W in y)y.hasOwnProperty(W)&&(S=y[W],S!=null&&ra(f,p,W,S,y,null))}function uee(f,p,y,S){switch(p){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var N=null,D=null,B=null,W=null,Q=null,he=null,Ae=null;for(we in y){var Ee=y[we];if(y.hasOwnProperty(we)&&Ee!=null)switch(we){case"checked":break;case"value":break;case"defaultValue":Q=Ee;default:S.hasOwnProperty(we)||ra(f,p,we,null,S,Ee)}}for(var pe in S){var we=S[pe];if(Ee=y[pe],S.hasOwnProperty(pe)&&(we!=null||Ee!=null))switch(pe){case"type":D=we;break;case"name":N=we;break;case"checked":he=we;break;case"defaultChecked":Ae=we;break;case"value":B=we;break;case"defaultValue":W=we;break;case"children":case"dangerouslySetInnerHTML":if(we!=null)throw Error(a(137,p));break;default:we!==Ee&&ra(f,p,pe,we,S,Ee)}}_s(f,B,W,Q,he,Ae,D,N);return;case"select":we=B=W=pe=null;for(D in y)if(Q=y[D],y.hasOwnProperty(D)&&Q!=null)switch(D){case"value":break;case"multiple":we=Q;default:S.hasOwnProperty(D)||ra(f,p,D,null,S,Q)}for(N in S)if(D=S[N],Q=y[N],S.hasOwnProperty(N)&&(D!=null||Q!=null))switch(N){case"value":pe=D;break;case"defaultValue":W=D;break;case"multiple":B=D;default:D!==Q&&ra(f,p,N,D,S,Q)}p=W,y=B,S=we,pe!=null?Me(f,!!y,pe,!1):!!S!=!!y&&(p!=null?Me(f,!!y,p,!0):Me(f,!!y,y?[]:"",!1));return;case"textarea":we=pe=null;for(W in y)if(N=y[W],y.hasOwnProperty(W)&&N!=null&&!S.hasOwnProperty(W))switch(W){case"value":break;case"children":break;default:ra(f,p,W,null,S,N)}for(B in S)if(N=S[B],D=y[B],S.hasOwnProperty(B)&&(N!=null||D!=null))switch(B){case"value":pe=N;break;case"defaultValue":we=N;break;case"children":break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(a(91));break;default:N!==D&&ra(f,p,B,N,S,D)}re(f,pe,we);return;case"option":for(var ft in y)if(pe=y[ft],y.hasOwnProperty(ft)&&pe!=null&&!S.hasOwnProperty(ft))switch(ft){case"selected":f.selected=!1;break;default:ra(f,p,ft,null,S,pe)}for(Q in S)if(pe=S[Q],we=y[Q],S.hasOwnProperty(Q)&&pe!==we&&(pe!=null||we!=null))switch(Q){case"selected":f.selected=pe&&typeof pe!="function"&&typeof pe!="symbol";break;default:ra(f,p,Q,pe,S,we)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Lt in y)pe=y[Lt],y.hasOwnProperty(Lt)&&pe!=null&&!S.hasOwnProperty(Lt)&&ra(f,p,Lt,null,S,pe);for(he in S)if(pe=S[he],we=y[he],S.hasOwnProperty(he)&&pe!==we&&(pe!=null||we!=null))switch(he){case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(a(137,p));break;default:ra(f,p,he,pe,S,we)}return;default:if(Xe(p)){for(var aa in y)pe=y[aa],y.hasOwnProperty(aa)&&pe!==void 0&&!S.hasOwnProperty(aa)&&FT(f,p,aa,void 0,S,pe);for(Ae in S)pe=S[Ae],we=y[Ae],!S.hasOwnProperty(Ae)||pe===we||pe===void 0&&we===void 0||FT(f,p,Ae,pe,S,we);return}}for(var ue in y)pe=y[ue],y.hasOwnProperty(ue)&&pe!=null&&!S.hasOwnProperty(ue)&&ra(f,p,ue,null,S,pe);for(Ee in S)pe=S[Ee],we=y[Ee],!S.hasOwnProperty(Ee)||pe===we||pe==null&&we==null||ra(f,p,Ee,pe,S,we)}function Vj(f){switch(f){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function cee(){if(typeof performance.getEntriesByType=="function"){for(var f=0,p=0,y=performance.getEntriesByType("resource"),S=0;S<y.length;S++){var N=y[S],D=N.transferSize,B=N.initiatorType,W=N.duration;if(D&&W&&Vj(B)){for(B=0,W=N.responseEnd,S+=1;S<y.length;S++){var Q=y[S],he=Q.startTime;if(he>W)break;var Ae=Q.transferSize,Ee=Q.initiatorType;Ae&&Vj(Ee)&&(Q=Q.responseEnd,B+=Ae*(Q<W?1:(W-he)/(Q-he)))}if(--S,p+=8*(D+B)/(N.duration/1e3),f++,10<f)break}}if(0<f)return p/f/1e6}return navigator.connection&&(f=navigator.connection.downlink,typeof f=="number")?f:5}var GT=null,HT=null;function eb(f){return f.nodeType===9?f:f.ownerDocument}function Fj(f){switch(f){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Gj(f,p){if(f===0)switch(p){case"svg":return 1;case"math":return 2;default:return 0}return f===1&&p==="foreignObject"?0:f}function UT(f,p){return f==="textarea"||f==="noscript"||typeof p.children=="string"||typeof p.children=="number"||typeof p.children=="bigint"||typeof p.dangerouslySetInnerHTML=="object"&&p.dangerouslySetInnerHTML!==null&&p.dangerouslySetInnerHTML.__html!=null}var $T=null;function dee(){var f=window.event;return f&&f.type==="popstate"?f===$T?!1:($T=f,!0):($T=null,!1)}var Hj=typeof setTimeout=="function"?setTimeout:void 0,fee=typeof clearTimeout=="function"?clearTimeout:void 0,Uj=typeof Promise=="function"?Promise:void 0,hee=typeof queueMicrotask=="function"?queueMicrotask:typeof Uj<"u"?function(f){return Uj.resolve(null).then(f).catch(vee)}:Hj;function vee(f){setTimeout(function(){throw f})}function Pc(f){return f==="head"}function $j(f,p){var y=p,S=0;do{var N=y.nextSibling;if(f.removeChild(y),N&&N.nodeType===8)if(y=N.data,y==="/$"||y==="/&"){if(S===0){f.removeChild(N),Nv(p);return}S--}else if(y==="$"||y==="$?"||y==="$~"||y==="$!"||y==="&")S++;else if(y==="html")hg(f.ownerDocument.documentElement);else if(y==="head"){y=f.ownerDocument.head,hg(y);for(var D=y.firstChild;D;){var B=D.nextSibling,W=D.nodeName;D[Sa]||W==="SCRIPT"||W==="STYLE"||W==="LINK"&&D.rel.toLowerCase()==="stylesheet"||y.removeChild(D),D=B}}else y==="body"&&hg(f.ownerDocument.body);y=N}while(y);Nv(p)}function Wj(f,p){var y=f;f=0;do{var S=y.nextSibling;if(y.nodeType===1?p?(y._stashedDisplay=y.style.display,y.style.display="none"):(y.style.display=y._stashedDisplay||"",y.getAttribute("style")===""&&y.removeAttribute("style")):y.nodeType===3&&(p?(y._stashedText=y.nodeValue,y.nodeValue=""):y.nodeValue=y._stashedText||""),S&&S.nodeType===8)if(y=S.data,y==="/$"){if(f===0)break;f--}else y!=="$"&&y!=="$?"&&y!=="$~"&&y!=="$!"||f++;y=S}while(y)}function WT(f){var p=f.firstChild;for(p&&p.nodeType===10&&(p=p.nextSibling);p;){var y=p;switch(p=p.nextSibling,y.nodeName){case"HTML":case"HEAD":case"BODY":WT(y),Zn(y);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(y.rel.toLowerCase()==="stylesheet")continue}f.removeChild(y)}}function pee(f,p,y,S){for(;f.nodeType===1;){var N=y;if(f.nodeName.toLowerCase()!==p.toLowerCase()){if(!S&&(f.nodeName!=="INPUT"||f.type!=="hidden"))break}else if(S){if(!f[Sa])switch(p){case"meta":if(!f.hasAttribute("itemprop"))break;return f;case"link":if(D=f.getAttribute("rel"),D==="stylesheet"&&f.hasAttribute("data-precedence"))break;if(D!==N.rel||f.getAttribute("href")!==(N.href==null||N.href===""?null:N.href)||f.getAttribute("crossorigin")!==(N.crossOrigin==null?null:N.crossOrigin)||f.getAttribute("title")!==(N.title==null?null:N.title))break;return f;case"style":if(f.hasAttribute("data-precedence"))break;return f;case"script":if(D=f.getAttribute("src"),(D!==(N.src==null?null:N.src)||f.getAttribute("type")!==(N.type==null?null:N.type)||f.getAttribute("crossorigin")!==(N.crossOrigin==null?null:N.crossOrigin))&&D&&f.hasAttribute("async")&&!f.hasAttribute("itemprop"))break;return f;default:return f}}else if(p==="input"&&f.type==="hidden"){var D=N.name==null?null:""+N.name;if(N.type==="hidden"&&f.getAttribute("name")===D)return f}else return f;if(f=Ko(f.nextSibling),f===null)break}return null}function mee(f,p,y){if(p==="")return null;for(;f.nodeType!==3;)if((f.nodeType!==1||f.nodeName!=="INPUT"||f.type!=="hidden")&&!y||(f=Ko(f.nextSibling),f===null))return null;return f}function Yj(f,p){for(;f.nodeType!==8;)if((f.nodeType!==1||f.nodeName!=="INPUT"||f.type!=="hidden")&&!p||(f=Ko(f.nextSibling),f===null))return null;return f}function YT(f){return f.data==="$?"||f.data==="$~"}function XT(f){return f.data==="$!"||f.data==="$?"&&f.ownerDocument.readyState!=="loading"}function gee(f,p){var y=f.ownerDocument;if(f.data==="$~")f._reactRetry=p;else if(f.data!=="$?"||y.readyState!=="loading")p();else{var S=function(){p(),y.removeEventListener("DOMContentLoaded",S)};y.addEventListener("DOMContentLoaded",S),f._reactRetry=S}}function Ko(f){for(;f!=null;f=f.nextSibling){var p=f.nodeType;if(p===1||p===3)break;if(p===8){if(p=f.data,p==="$"||p==="$!"||p==="$?"||p==="$~"||p==="&"||p==="F!"||p==="F")break;if(p==="/$"||p==="/&")return null}}return f}var qT=null;function Xj(f){f=f.nextSibling;for(var p=0;f;){if(f.nodeType===8){var y=f.data;if(y==="/$"||y==="/&"){if(p===0)return Ko(f.nextSibling);p--}else y!=="$"&&y!=="$!"&&y!=="$?"&&y!=="$~"&&y!=="&"||p++}f=f.nextSibling}return null}function qj(f){f=f.previousSibling;for(var p=0;f;){if(f.nodeType===8){var y=f.data;if(y==="$"||y==="$!"||y==="$?"||y==="$~"||y==="&"){if(p===0)return f;p--}else y!=="/$"&&y!=="/&"||p++}f=f.previousSibling}return null}function Zj(f,p,y){switch(p=eb(y),f){case"html":if(f=p.documentElement,!f)throw Error(a(452));return f;case"head":if(f=p.head,!f)throw Error(a(453));return f;case"body":if(f=p.body,!f)throw Error(a(454));return f;default:throw Error(a(451))}}function hg(f){for(var p=f.attributes;p.length;)f.removeAttributeNode(p[0]);Zn(f)}var Qo=new Map,Kj=new Set;function tb(f){return typeof f.getRootNode=="function"?f.getRootNode():f.nodeType===9?f:f.ownerDocument}var Mu=U.d;U.d={f:yee,r:xee,D:bee,C:wee,L:See,m:_ee,X:Cee,S:Tee,M:kee};function yee(){var f=Mu.f(),p=Wx();return f||p}function xee(f){var p=Rn(f);p!==null&&p.tag===5&&p.type==="form"?vI(p):Mu.r(f)}var Tv=typeof document>"u"?null:document;function Qj(f,p,y){var S=Tv;if(S&&typeof p=="string"&&p){var N=_a(p);N='link[rel="'+f+'"][href="'+N+'"]',typeof y=="string"&&(N+='[crossorigin="'+y+'"]'),Kj.has(N)||(Kj.add(N),f={rel:f,crossOrigin:y,href:p},S.querySelector(N)===null&&(p=S.createElement("link"),hi(p,"link",f),fr(p),S.head.appendChild(p)))}}function bee(f){Mu.D(f),Qj("dns-prefetch",f,null)}function wee(f,p){Mu.C(f,p),Qj("preconnect",f,p)}function See(f,p,y){Mu.L(f,p,y);var S=Tv;if(S&&f&&p){var N='link[rel="preload"][as="'+_a(p)+'"]';p==="image"&&y&&y.imageSrcSet?(N+='[imagesrcset="'+_a(y.imageSrcSet)+'"]',typeof y.imageSizes=="string"&&(N+='[imagesizes="'+_a(y.imageSizes)+'"]')):N+='[href="'+_a(f)+'"]';var D=N;switch(p){case"style":D=Cv(f);break;case"script":D=kv(f)}Qo.has(D)||(f=d({rel:"preload",href:p==="image"&&y&&y.imageSrcSet?void 0:f,as:p},y),Qo.set(D,f),S.querySelector(N)!==null||p==="style"&&S.querySelector(vg(D))||p==="script"&&S.querySelector(pg(D))||(p=S.createElement("link"),hi(p,"link",f),fr(p),S.head.appendChild(p)))}}function _ee(f,p){Mu.m(f,p);var y=Tv;if(y&&f){var S=p&&typeof p.as=="string"?p.as:"script",N='link[rel="modulepreload"][as="'+_a(S)+'"][href="'+_a(f)+'"]',D=N;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":D=kv(f)}if(!Qo.has(D)&&(f=d({rel:"modulepreload",href:f},p),Qo.set(D,f),y.querySelector(N)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(y.querySelector(pg(D)))return}S=y.createElement("link"),hi(S,"link",f),fr(S),y.head.appendChild(S)}}}function Tee(f,p,y){Mu.S(f,p,y);var S=Tv;if(S&&f){var N=$a(S).hoistableStyles,D=Cv(f);p=p||"default";var B=N.get(D);if(!B){var W={loading:0,preload:null};if(B=S.querySelector(vg(D)))W.loading=5;else{f=d({rel:"stylesheet",href:f,"data-precedence":p},y),(y=Qo.get(D))&&ZT(f,y);var Q=B=S.createElement("link");fr(Q),hi(Q,"link",f),Q._p=new Promise(function(he,Ae){Q.onload=he,Q.onerror=Ae}),Q.addEventListener("load",function(){W.loading|=1}),Q.addEventListener("error",function(){W.loading|=2}),W.loading|=4,rb(B,p,S)}B={type:"stylesheet",instance:B,count:1,state:W},N.set(D,B)}}}function Cee(f,p){Mu.X(f,p);var y=Tv;if(y&&f){var S=$a(y).hoistableScripts,N=kv(f),D=S.get(N);D||(D=y.querySelector(pg(N)),D||(f=d({src:f,async:!0},p),(p=Qo.get(N))&&KT(f,p),D=y.createElement("script"),fr(D),hi(D,"link",f),y.head.appendChild(D)),D={type:"script",instance:D,count:1,state:null},S.set(N,D))}}function kee(f,p){Mu.M(f,p);var y=Tv;if(y&&f){var S=$a(y).hoistableScripts,N=kv(f),D=S.get(N);D||(D=y.querySelector(pg(N)),D||(f=d({src:f,async:!0,type:"module"},p),(p=Qo.get(N))&&KT(f,p),D=y.createElement("script"),fr(D),hi(D,"link",f),y.head.appendChild(D)),D={type:"script",instance:D,count:1,state:null},S.set(N,D))}}function Jj(f,p,y,S){var N=(N=me.current)?tb(N):null;if(!N)throw Error(a(446));switch(f){case"meta":case"title":return null;case"style":return typeof y.precedence=="string"&&typeof y.href=="string"?(p=Cv(y.href),y=$a(N).hoistableStyles,S=y.get(p),S||(S={type:"style",instance:null,count:0,state:null},y.set(p,S)),S):{type:"void",instance:null,count:0,state:null};case"link":if(y.rel==="stylesheet"&&typeof y.href=="string"&&typeof y.precedence=="string"){f=Cv(y.href);var D=$a(N).hoistableStyles,B=D.get(f);if(B||(N=N.ownerDocument||N,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},D.set(f,B),(D=N.querySelector(vg(f)))&&!D._p&&(B.instance=D,B.state.loading=5),Qo.has(f)||(y={rel:"preload",as:"style",href:y.href,crossOrigin:y.crossOrigin,integrity:y.integrity,media:y.media,hrefLang:y.hrefLang,referrerPolicy:y.referrerPolicy},Qo.set(f,y),D||Nee(N,f,y,B.state))),p&&S===null)throw Error(a(528,""));return B}if(p&&S!==null)throw Error(a(529,""));return null;case"script":return p=y.async,y=y.src,typeof y=="string"&&p&&typeof p!="function"&&typeof p!="symbol"?(p=kv(y),y=$a(N).hoistableScripts,S=y.get(p),S||(S={type:"script",instance:null,count:0,state:null},y.set(p,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,f))}}function Cv(f){return'href="'+_a(f)+'"'}function vg(f){return'link[rel="stylesheet"]['+f+"]"}function eO(f){return d({},f,{"data-precedence":f.precedence,precedence:null})}function Nee(f,p,y,S){f.querySelector('link[rel="preload"][as="style"]['+p+"]")?S.loading=1:(p=f.createElement("link"),S.preload=p,p.addEventListener("load",function(){return S.loading|=1}),p.addEventListener("error",function(){return S.loading|=2}),hi(p,"link",y),fr(p),f.head.appendChild(p))}function kv(f){return'[src="'+_a(f)+'"]'}function pg(f){return"script[async]"+f}function tO(f,p,y){if(p.count++,p.instance===null)switch(p.type){case"style":var S=f.querySelector('style[data-href~="'+_a(y.href)+'"]');if(S)return p.instance=S,fr(S),S;var N=d({},y,{"data-href":y.href,"data-precedence":y.precedence,href:null,precedence:null});return S=(f.ownerDocument||f).createElement("style"),fr(S),hi(S,"style",N),rb(S,y.precedence,f),p.instance=S;case"stylesheet":N=Cv(y.href);var D=f.querySelector(vg(N));if(D)return p.state.loading|=4,p.instance=D,fr(D),D;S=eO(y),(N=Qo.get(N))&&ZT(S,N),D=(f.ownerDocument||f).createElement("link"),fr(D);var B=D;return B._p=new Promise(function(W,Q){B.onload=W,B.onerror=Q}),hi(D,"link",S),p.state.loading|=4,rb(D,y.precedence,f),p.instance=D;case"script":return D=kv(y.src),(N=f.querySelector(pg(D)))?(p.instance=N,fr(N),N):(S=y,(N=Qo.get(D))&&(S=d({},y),KT(S,N)),f=f.ownerDocument||f,N=f.createElement("script"),fr(N),hi(N,"link",S),f.head.appendChild(N),p.instance=N);case"void":return null;default:throw Error(a(443,p.type))}else p.type==="stylesheet"&&(p.state.loading&4)===0&&(S=p.instance,p.state.loading|=4,rb(S,y.precedence,f));return p.instance}function rb(f,p,y){for(var S=y.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),N=S.length?S[S.length-1]:null,D=N,B=0;B<S.length;B++){var W=S[B];if(W.dataset.precedence===p)D=W;else if(D!==N)break}D?D.parentNode.insertBefore(f,D.nextSibling):(p=y.nodeType===9?y.head:y,p.insertBefore(f,p.firstChild))}function ZT(f,p){f.crossOrigin==null&&(f.crossOrigin=p.crossOrigin),f.referrerPolicy==null&&(f.referrerPolicy=p.referrerPolicy),f.title==null&&(f.title=p.title)}function KT(f,p){f.crossOrigin==null&&(f.crossOrigin=p.crossOrigin),f.referrerPolicy==null&&(f.referrerPolicy=p.referrerPolicy),f.integrity==null&&(f.integrity=p.integrity)}var ab=null;function rO(f,p,y){if(ab===null){var S=new Map,N=ab=new Map;N.set(y,S)}else N=ab,S=N.get(y),S||(S=new Map,N.set(y,S));if(S.has(f))return S;for(S.set(f,null),y=y.getElementsByTagName(f),N=0;N<y.length;N++){var D=y[N];if(!(D[Sa]||D[Ze]||f==="link"&&D.getAttribute("rel")==="stylesheet")&&D.namespaceURI!=="http://www.w3.org/2000/svg"){var B=D.getAttribute(p)||"";B=f+B;var W=S.get(B);W?W.push(D):S.set(B,[D])}}return S}function aO(f,p,y){f=f.ownerDocument||f,f.head.insertBefore(y,p==="title"?f.querySelector("head > title"):null)}function Aee(f,p,y){if(y===1||p.itemProp!=null)return!1;switch(f){case"meta":case"title":return!0;case"style":if(typeof p.precedence!="string"||typeof p.href!="string"||p.href==="")break;return!0;case"link":if(typeof p.rel!="string"||typeof p.href!="string"||p.href===""||p.onLoad||p.onError)break;switch(p.rel){case"stylesheet":return f=p.disabled,typeof p.precedence=="string"&&f==null;default:return!0}case"script":if(p.async&&typeof p.async!="function"&&typeof p.async!="symbol"&&!p.onLoad&&!p.onError&&p.src&&typeof p.src=="string")return!0}return!1}function nO(f){return!(f.type==="stylesheet"&&(f.state.loading&3)===0)}function Mee(f,p,y,S){if(y.type==="stylesheet"&&(typeof S.media!="string"||matchMedia(S.media).matches!==!1)&&(y.state.loading&4)===0){if(y.instance===null){var N=Cv(S.href),D=p.querySelector(vg(N));if(D){p=D._p,p!==null&&typeof p=="object"&&typeof p.then=="function"&&(f.count++,f=nb.bind(f),p.then(f,f)),y.state.loading|=4,y.instance=D,fr(D);return}D=p.ownerDocument||p,S=eO(S),(N=Qo.get(N))&&ZT(S,N),D=D.createElement("link"),fr(D);var B=D;B._p=new Promise(function(W,Q){B.onload=W,B.onerror=Q}),hi(D,"link",S),y.instance=D}f.stylesheets===null&&(f.stylesheets=new Map),f.stylesheets.set(y,p),(p=y.state.preload)&&(y.state.loading&3)===0&&(f.count++,y=nb.bind(f),p.addEventListener("load",y),p.addEventListener("error",y))}}var QT=0;function Dee(f,p){return f.stylesheets&&f.count===0&&ob(f,f.stylesheets),0<f.count||0<f.imgCount?function(y){var S=setTimeout(function(){if(f.stylesheets&&ob(f,f.stylesheets),f.unsuspend){var D=f.unsuspend;f.unsuspend=null,D()}},6e4+p);0<f.imgBytes&&QT===0&&(QT=62500*cee());var N=setTimeout(function(){if(f.waitingForImages=!1,f.count===0&&(f.stylesheets&&ob(f,f.stylesheets),f.unsuspend)){var D=f.unsuspend;f.unsuspend=null,D()}},(f.imgBytes>QT?50:800)+p);return f.unsuspend=y,function(){f.unsuspend=null,clearTimeout(S),clearTimeout(N)}}:null}function nb(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ob(this,this.stylesheets);else if(this.unsuspend){var f=this.unsuspend;this.unsuspend=null,f()}}}var ib=null;function ob(f,p){f.stylesheets=null,f.unsuspend!==null&&(f.count++,ib=new Map,p.forEach(Lee,f),ib=null,nb.call(f))}function Lee(f,p){if(!(p.state.loading&4)){var y=ib.get(f);if(y)var S=y.get(null);else{y=new Map,ib.set(f,y);for(var N=f.querySelectorAll("link[data-precedence],style[data-precedence]"),D=0;D<N.length;D++){var B=N[D];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(y.set(B.dataset.precedence,B),S=B)}S&&y.set(null,S)}N=p.instance,B=N.getAttribute("data-precedence"),D=y.get(B)||S,D===S&&y.set(null,N),y.set(B,N),this.count++,S=nb.bind(this),N.addEventListener("load",S),N.addEventListener("error",S),D?D.parentNode.insertBefore(N,D.nextSibling):(f=f.nodeType===9?f.head:f,f.insertBefore(N,f.firstChild)),p.state.loading|=4}}var mg={$$typeof:T,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function Eee(f,p,y,S,N,D,B,W,Q){this.tag=1,this.containerInfo=f,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Zr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zr(0),this.hiddenUpdates=Zr(null),this.identifierPrefix=S,this.onUncaughtError=N,this.onCaughtError=D,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function iO(f,p,y,S,N,D,B,W,Q,he,Ae,Ee){return f=new Eee(f,p,y,B,Q,he,Ae,Ee,W),p=1,D===!0&&(p|=24),D=wo(3,null,null,p),f.current=D,D.stateNode=f,p=L2(),p.refCount++,f.pooledCache=p,p.refCount++,D.memoizedState={element:S,isDehydrated:y,cache:p},I2(D),f}function oO(f){return f?(f=av,f):av}function sO(f,p,y,S,N,D){N=oO(N),S.context===null?S.context=N:S.pendingContext=N,S=_c(p),S.payload={element:y},D=D===void 0?null:D,D!==null&&(S.callback=D),y=Tc(f,S,p),y!==null&&(io(y,f,p),Xm(y,f,p))}function lO(f,p){if(f=f.memoizedState,f!==null&&f.dehydrated!==null){var y=f.retryLane;f.retryLane=y!==0&&y<p?y:p}}function JT(f,p){lO(f,p),(f=f.alternate)&&lO(f,p)}function uO(f){if(f.tag===13||f.tag===31){var p=rf(f,67108864);p!==null&&io(p,f,67108864),JT(f,67108864)}}function cO(f){if(f.tag===13||f.tag===31){var p=ko();p=lr(p);var y=rf(f,p);y!==null&&io(y,f,p),JT(f,p)}}var sb=!0;function Ree(f,p,y,S){var N=O.T;O.T=null;var D=U.p;try{U.p=2,eC(f,p,y,S)}finally{U.p=D,O.T=N}}function Pee(f,p,y,S){var N=O.T;O.T=null;var D=U.p;try{U.p=8,eC(f,p,y,S)}finally{U.p=D,O.T=N}}function eC(f,p,y,S){if(sb){var N=tC(S);if(N===null)VT(f,p,S,lb,y),fO(f,S);else if(jee(N,f,p,y,S))S.stopPropagation();else if(fO(f,S),p&4&&-1<Iee.indexOf(f)){for(;N!==null;){var D=Rn(N);if(D!==null)switch(D.tag){case 3:if(D=D.stateNode,D.current.memoizedState.isDehydrated){var B=Zt(D.pendingLanes);if(B!==0){var W=D;for(W.pendingLanes|=2,W.entangledLanes|=2;B;){var Q=1<<31-ye(B);W.entanglements[1]|=Q,B&=~Q}yl(D),(Pr&6)===0&&(Ux=dr()+500,cg(0))}}break;case 31:case 13:W=rf(D,2),W!==null&&io(W,D,2),Wx(),JT(D,2)}if(D=tC(S),D===null&&VT(f,p,S,lb,y),D===N)break;N=D}N!==null&&S.stopPropagation()}else VT(f,p,S,null,y)}}function tC(f){return f=Ue(f),rC(f)}var lb=null;function rC(f){if(lb=null,f=Ur(f),f!==null){var p=i(f);if(p===null)f=null;else{var y=p.tag;if(y===13){if(f=o(p),f!==null)return f;f=null}else if(y===31){if(f=s(p),f!==null)return f;f=null}else if(y===3){if(p.stateNode.current.memoizedState.isDehydrated)return p.tag===3?p.stateNode.containerInfo:null;f=null}else p!==f&&(f=null)}}return lb=f,null}function dO(f){switch(f){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ar()){case sa:return 2;case va:return 8;case rn:case wa:return 32;case En:return 268435456;default:return 32}default:return 32}}var aC=!1,Ic=null,jc=null,Oc=null,gg=new Map,yg=new Map,zc=[],Iee="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function fO(f,p){switch(f){case"focusin":case"focusout":Ic=null;break;case"dragenter":case"dragleave":jc=null;break;case"mouseover":case"mouseout":Oc=null;break;case"pointerover":case"pointerout":gg.delete(p.pointerId);break;case"gotpointercapture":case"lostpointercapture":yg.delete(p.pointerId)}}function xg(f,p,y,S,N,D){return f===null||f.nativeEvent!==D?(f={blockedOn:p,domEventName:y,eventSystemFlags:S,nativeEvent:D,targetContainers:[N]},p!==null&&(p=Rn(p),p!==null&&uO(p)),f):(f.eventSystemFlags|=S,p=f.targetContainers,N!==null&&p.indexOf(N)===-1&&p.push(N),f)}function jee(f,p,y,S,N){switch(p){case"focusin":return Ic=xg(Ic,f,p,y,S,N),!0;case"dragenter":return jc=xg(jc,f,p,y,S,N),!0;case"mouseover":return Oc=xg(Oc,f,p,y,S,N),!0;case"pointerover":var D=N.pointerId;return gg.set(D,xg(gg.get(D)||null,f,p,y,S,N)),!0;case"gotpointercapture":return D=N.pointerId,yg.set(D,xg(yg.get(D)||null,f,p,y,S,N)),!0}return!1}function hO(f){var p=Ur(f.target);if(p!==null){var y=i(p);if(y!==null){if(p=y.tag,p===13){if(p=o(y),p!==null){f.blockedOn=p,Va(f.priority,function(){cO(y)});return}}else if(p===31){if(p=s(y),p!==null){f.blockedOn=p,Va(f.priority,function(){cO(y)});return}}else if(p===3&&y.stateNode.current.memoizedState.isDehydrated){f.blockedOn=y.tag===3?y.stateNode.containerInfo:null;return}}}f.blockedOn=null}function ub(f){if(f.blockedOn!==null)return!1;for(var p=f.targetContainers;0<p.length;){var y=tC(f.nativeEvent);if(y===null){y=f.nativeEvent;var S=new y.constructor(y.type,y);go=S,y.target.dispatchEvent(S),go=null}else return p=Rn(y),p!==null&&uO(p),f.blockedOn=y,!1;p.shift()}return!0}function vO(f,p,y){ub(f)&&y.delete(p)}function Oee(){aC=!1,Ic!==null&&ub(Ic)&&(Ic=null),jc!==null&&ub(jc)&&(jc=null),Oc!==null&&ub(Oc)&&(Oc=null),gg.forEach(vO),yg.forEach(vO)}function cb(f,p){f.blockedOn===p&&(f.blockedOn=null,aC||(aC=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Oee)))}var db=null;function pO(f){db!==f&&(db=f,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){db===f&&(db=null);for(var p=0;p<f.length;p+=3){var y=f[p],S=f[p+1],N=f[p+2];if(typeof S!="function"){if(rC(S||y)===null)continue;break}var D=Rn(y);D!==null&&(f.splice(p,3),p-=3,tT(D,{pending:!0,data:N,method:y.method,action:S},S,N))}}))}function Nv(f){function p(Q){return cb(Q,f)}Ic!==null&&cb(Ic,f),jc!==null&&cb(jc,f),Oc!==null&&cb(Oc,f),gg.forEach(p),yg.forEach(p);for(var y=0;y<zc.length;y++){var S=zc[y];S.blockedOn===f&&(S.blockedOn=null)}for(;0<zc.length&&(y=zc[0],y.blockedOn===null);)hO(y),y.blockedOn===null&&zc.shift();if(y=(f.ownerDocument||f).$$reactFormReplay,y!=null)for(S=0;S<y.length;S+=3){var N=y[S],D=y[S+1],B=N[wr]||null;if(typeof D=="function")B||pO(y);else if(B){var W=null;if(D&&D.hasAttribute("formAction")){if(N=D,B=D[wr]||null)W=B.formAction;else if(rC(N)!==null)continue}else W=B.action;typeof W=="function"?y[S+1]=W:(y.splice(S,3),S-=3),pO(y)}}}function mO(){function f(D){D.canIntercept&&D.info==="react-transition"&&D.intercept({handler:function(){return new Promise(function(B){return N=B})},focusReset:"manual",scroll:"manual"})}function p(){N!==null&&(N(),N=null),S||setTimeout(y,20)}function y(){if(!S&&!navigation.transition){var D=navigation.currentEntry;D&&D.url!=null&&navigation.navigate(D.url,{state:D.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var S=!1,N=null;return navigation.addEventListener("navigate",f),navigation.addEventListener("navigatesuccess",p),navigation.addEventListener("navigateerror",p),setTimeout(y,100),function(){S=!0,navigation.removeEventListener("navigate",f),navigation.removeEventListener("navigatesuccess",p),navigation.removeEventListener("navigateerror",p),N!==null&&(N(),N=null)}}}function nC(f){this._internalRoot=f}fb.prototype.render=nC.prototype.render=function(f){var p=this._internalRoot;if(p===null)throw Error(a(409));var y=p.current,S=ko();sO(y,S,f,p,null,null)},fb.prototype.unmount=nC.prototype.unmount=function(){var f=this._internalRoot;if(f!==null){this._internalRoot=null;var p=f.containerInfo;sO(f.current,2,null,f,null,null),Wx(),p[le]=null}};function fb(f){this._internalRoot=f}fb.prototype.unstable_scheduleHydration=function(f){if(f){var p=Dr();f={blockedOn:null,target:f,priority:p};for(var y=0;y<zc.length&&p!==0&&p<zc[y].priority;y++);zc.splice(y,0,f),y===0&&hO(f)}};var gO=e.version;if(gO!=="19.2.4")throw Error(a(527,gO,"19.2.4"));U.findDOMNode=function(f){var p=f._reactInternals;if(p===void 0)throw typeof f.render=="function"?Error(a(188)):(f=Object.keys(f).join(","),Error(a(268,f)));return f=u(p),f=f!==null?c(f):null,f=f===null?null:f.stateNode,f};var zee={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hb=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hb.isDisabled&&hb.supportsFiber)try{gr=hb.inject(zee),Ar=hb}catch{}}return wg.createRoot=function(f,p){if(!n(f))throw Error(a(299));var y=!1,S="",N=TI,D=CI,B=kI;return p!=null&&(p.unstable_strictMode===!0&&(y=!0),p.identifierPrefix!==void 0&&(S=p.identifierPrefix),p.onUncaughtError!==void 0&&(N=p.onUncaughtError),p.onCaughtError!==void 0&&(D=p.onCaughtError),p.onRecoverableError!==void 0&&(B=p.onRecoverableError)),p=iO(f,1,!1,null,null,y,S,null,N,D,B,mO),f[le]=p.current,BT(f),new nC(p)},wg.hydrateRoot=function(f,p,y){if(!n(f))throw Error(a(299));var S=!1,N="",D=TI,B=CI,W=kI,Q=null;return y!=null&&(y.unstable_strictMode===!0&&(S=!0),y.identifierPrefix!==void 0&&(N=y.identifierPrefix),y.onUncaughtError!==void 0&&(D=y.onUncaughtError),y.onCaughtError!==void 0&&(B=y.onCaughtError),y.onRecoverableError!==void 0&&(W=y.onRecoverableError),y.formState!==void 0&&(Q=y.formState)),p=iO(f,1,!0,p,y??null,S,N,Q,D,B,W,mO),p.context=oO(null),y=p.current,S=ko(),S=lr(S),N=_c(S),N.callback=null,Tc(y,N,S),y=S,p.current.lanes=y,za(p,y),yl(p),f[le]=p.current,BT(f),new fb(p)},wg.version="19.2.4",wg}var NO;function Yee(){if(NO)return sC.exports;NO=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),sC.exports=Wee(),sC.exports}var Xee=Yee();/**
* react-router v7.13.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/var AO="popstate";function MO(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function qee(t={}){function e(a,n){var u;let i=(u=n.state)==null?void 0:u.masked,{pathname:o,search:s,hash:l}=i||a.location;return EA("",{pathname:o,search:s,hash:l},n.state&&n.state.usr||null,n.state&&n.state.key||"default",i?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,n){return typeof n=="string"?n:Y0(n)}return Kee(e,r,null,t)}function ja(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function ys(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Zee(){return Math.random().toString(36).substring(2,10)}function DO(t,e){return{usr:t.state,key:t.key,idx:e,masked:t.unstable_mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function EA(t,e,r=null,a,n){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?om(e):e,state:r,key:e&&e.key||a||Zee(),unstable_mask:n}}function Y0({pathname:t="/",search:e="",hash:r=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function om(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substring(r),t=t.substring(0,r));let a=t.indexOf("?");a>=0&&(e.search=t.substring(a),t=t.substring(0,a)),t&&(e.pathname=t)}return e}function Kee(t,e,r,a={}){let{window:n=document.defaultView,v5Compat:i=!1}=a,o=n.history,s="POP",l=null,u=c();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function c(){return(o.state||{idx:null}).idx}function d(){s="POP";let b=c(),w=b==null?null:b-u;u=b,l&&l({action:s,location:x.location,delta:w})}function h(b,w){s="PUSH";let _=MO(b)?b:EA(x.location,b,w);u=c()+1;let T=DO(_,u),C=x.createHref(_.unstable_mask||_);try{o.pushState(T,"",C)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;n.location.assign(C)}i&&l&&l({action:s,location:x.location,delta:1})}function v(b,w){s="REPLACE";let _=MO(b)?b:EA(x.location,b,w);u=c();let T=DO(_,u),C=x.createHref(_.unstable_mask||_);o.replaceState(T,"",C),i&&l&&l({action:s,location:x.location,delta:0})}function m(b){return Qee(b)}let x={get action(){return s},get location(){return t(n,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return n.addEventListener(AO,d),l=b,()=>{n.removeEventListener(AO,d),l=null}},createHref(b){return e(n,b)},createURL:m,encodeLocation(b){let w=m(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:v,go(b){return o.go(b)}};return x}function Qee(t,e=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),ja(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Y0(t);return a=a.replace(/ $/,"%20"),!e&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function aG(t,e,r="/"){return Jee(t,e,r,!1)}function Jee(t,e,r,a){let n=typeof e=="string"?om(e):e,i=Ku(n.pathname||"/",r);if(i==null)return null;let o=nG(t);ete(o);let s=null;for(let l=0;s==null&&l<o.length;++l){let u=dte(i);s=ute(o[l],u,a)}return s}function nG(t,e=[],r=[],a="",n=!1){let i=(o,s,l=n,u)=>{let c={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(a)&&l)return;ja(c.relativePath.startsWith(a),`Absolute route path "${c.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(a.length)}let d=Gl([a,c.relativePath]),h=r.concat(c);o.children&&o.children.length>0&&(ja(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),nG(o.children,e,h,d,l)),!(o.path==null&&!o.index)&&e.push({path:d,score:ste(d,o.index),routesMeta:h})};return t.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,s);else for(let u of iG(o.path))i(o,s,!0,u)}),e}function iG(t){let e=t.split("/");if(e.length===0)return[];let[r,...a]=e,n=r.endsWith("?"),i=r.replace(/\?$/,"");if(a.length===0)return n?[i,""]:[i];let o=iG(a.join("/")),s=[];return s.push(...o.map(l=>l===""?i:[i,l].join("/"))),n&&s.push(...o),s.map(l=>t.startsWith("/")&&l===""?"/":l)}function ete(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:lte(e.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var tte=/^:[\w-]+$/,rte=3,ate=2,nte=1,ite=10,ote=-2,LO=t=>t==="*";function ste(t,e){let r=t.split("/"),a=r.length;return r.some(LO)&&(a+=ote),e&&(a+=ate),r.filter(n=>!LO(n)).reduce((n,i)=>n+(tte.test(i)?rte:i===""?nte:ite),a)}function lte(t,e){return t.length===e.length&&t.slice(0,-1).every((a,n)=>a===e[n])?t[t.length-1]-e[e.length-1]:0}function ute(t,e,r=!1){let{routesMeta:a}=t,n={},i="/",o=[];for(let s=0;s<a.length;++s){let l=a[s],u=s===a.length-1,c=i==="/"?e:e.slice(i.length)||"/",d=Ew({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),h=l.route;if(!d&&u&&r&&!a[a.length-1].route.index&&(d=Ew({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;Object.assign(n,d.params),o.push({params:n,pathname:Gl([i,d.pathname]),pathnameBase:pte(Gl([i,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(i=Gl([i,d.pathnameBase]))}return o}function Ew(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,a]=cte(t.path,t.caseSensitive,t.end),n=e.match(r);if(!n)return null;let i=n[0],o=i.replace(/(.)\/+$/,"$1"),s=n.slice(1);return{params:a.reduce((u,{paramName:c,isOptional:d},h)=>{if(c==="*"){let m=s[h]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const v=s[h];return d&&!v?u[c]=void 0:u[c]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:t}}function cte(t,e=!1,r=!0){ys(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let a=[],n="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l,u,c)=>{if(a.push({paramName:s,isOptional:l!=null}),l){let d=c.charAt(u+o.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(a.push({paramName:"*"}),n+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":t!==""&&t!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,e?void 0:"i"),a]}function dte(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return ys(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function Ku(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,a=t.charAt(r);return a&&a!=="/"?null:t.slice(r)||"/"}var fte=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function hte(t,e="/"){let{pathname:r,search:a="",hash:n=""}=typeof t=="string"?om(t):t,i;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?i=EO(r.substring(1),"/"):i=EO(r,e)):i=e,{pathname:i,search:mte(a),hash:gte(n)}}function EO(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function dC(t,e,r,a){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function vte(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function UL(t){let e=vte(t);return e.map((r,a)=>a===e.length-1?r.pathname:r.pathnameBase)}function v_(t,e,r,a=!1){let n;typeof t=="string"?n=om(t):(n={...t},ja(!n.pathname||!n.pathname.includes("?"),dC("?","pathname","search",n)),ja(!n.pathname||!n.pathname.includes("#"),dC("#","pathname","hash",n)),ja(!n.search||!n.search.includes("#"),dC("#","search","hash",n)));let i=t===""||n.pathname==="",o=i?"/":n.pathname,s;if(o==null)s=r;else{let d=e.length-1;if(!a&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;n.pathname=h.join("/")}s=d>=0?e[d]:"/"}let l=hte(n,s),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var Gl=t=>t.join("/").replace(/\/\/+/g,"/"),pte=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),mte=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,gte=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,yte=class{constructor(t,e,r,a=!1){this.status=t,this.statusText=e||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function xte(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function bte(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var oG=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function sG(t,e){let r=t;if(typeof r!="string"||!fte.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(oG)try{let i=new URL(window.location.href),o=r.startsWith("//")?new URL(i.protocol+r):new URL(r),s=Ku(o.pathname,e);o.origin===i.origin&&s!=null?r=s+o.search+o.hash:n=!0}catch{ys(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var lG=["POST","PUT","PATCH","DELETE"];new Set(lG);var wte=["GET",...lG];new Set(wte);var sm=E.createContext(null);sm.displayName="DataRouter";var p_=E.createContext(null);p_.displayName="DataRouterState";var Ste=E.createContext(!1),uG=E.createContext({isTransitioning:!1});uG.displayName="ViewTransition";var _te=E.createContext(new Map);_te.displayName="Fetchers";var Tte=E.createContext(null);Tte.displayName="Await";var Oo=E.createContext(null);Oo.displayName="Navigation";var jy=E.createContext(null);jy.displayName="Location";var el=E.createContext({outlet:null,matches:[],isDataRoute:!1});el.displayName="Route";var $L=E.createContext(null);$L.displayName="RouteError";var cG="REACT_ROUTER_ERROR",Cte="REDIRECT",kte="ROUTE_ERROR_RESPONSE";function Nte(t){if(t.startsWith(`${cG}:${Cte}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function Ate(t){if(t.startsWith(`${cG}:${kte}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new yte(e.status,e.statusText,e.data)}catch{}}function Mte(t,{relative:e}={}){ja(lm(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=E.useContext(Oo),{hash:n,pathname:i,search:o}=Oy(t,{relative:e}),s=i;return r!=="/"&&(s=i==="/"?r:Gl([r,i])),a.createHref({pathname:s,search:o,hash:n})}function lm(){return E.useContext(jy)!=null}function po(){return ja(lm(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(jy).location}var dG="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fG(t){E.useContext(Oo).static||E.useLayoutEffect(t)}function ru(){let{isDataRoute:t}=E.useContext(el);return t?Ute():Dte()}function Dte(){ja(lm(),"useNavigate() may be used only in the context of a <Router> component.");let t=E.useContext(sm),{basename:e,navigator:r}=E.useContext(Oo),{matches:a}=E.useContext(el),{pathname:n}=po(),i=JSON.stringify(UL(a)),o=E.useRef(!1);return fG(()=>{o.current=!0}),E.useCallback((l,u={})=>{if(ys(o.current,dG),!o.current)return;if(typeof l=="number"){r.go(l);return}let c=v_(l,JSON.parse(i),n,u.relative==="path");t==null&&e!=="/"&&(c.pathname=c.pathname==="/"?e:Gl([e,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[e,r,i,n,t])}var Lte=E.createContext(null);function Ete(t){let e=E.useContext(el).outlet;return E.useMemo(()=>e&&E.createElement(Lte.Provider,{value:t},e),[e,t])}function Oy(t,{relative:e}={}){let{matches:r}=E.useContext(el),{pathname:a}=po(),n=JSON.stringify(UL(r));return E.useMemo(()=>v_(t,JSON.parse(n),a,e==="path"),[t,n,a,e])}function Rte(t,e){return hG(t,e)}function hG(t,e,r){var b;ja(lm(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=E.useContext(Oo),{matches:n}=E.useContext(el),i=n[n.length-1],o=i?i.params:{},s=i?i.pathname:"/",l=i?i.pathnameBase:"/",u=i&&i.route;{let w=u&&u.path||"";pG(s,!u||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${w}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let c=po(),d;if(e){let w=typeof e=="string"?om(e):e;ja(l==="/"||((b=w.pathname)==null?void 0:b.startsWith(l)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${w.pathname}" was given in the \`location\` prop.`),d=w}else d=c;let h=d.pathname||"/",v=h;if(l!=="/"){let w=l.replace(/^\//,"").split("/");v="/"+h.replace(/^\//,"").split("/").slice(w.length).join("/")}let m=aG(t,{pathname:v});ys(u||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),ys(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=zte(m&&m.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:Gl([l,a.encodeLocation?a.encodeLocation(w.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Gl([l,a.encodeLocation?a.encodeLocation(w.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),n,r);return e&&x?E.createElement(jy.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...d},navigationType:"POP"}},x):x}function Pte(){let t=Hte(),e=xte(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},i={padding:"2px 4px",backgroundColor:a},o=null;return console.error("Error handled by React Router default ErrorBoundary:",t),o=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:i},"ErrorBoundary")," or"," ",E.createElement("code",{style:i},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},e),r?E.createElement("pre",{style:n},r):null,o)}var Ite=E.createElement(Pte,null),vG=class extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const r=Ate(t.digest);r&&(t=r)}let e=t!==void 0?E.createElement(el.Provider,{value:this.props.routeContext},E.createElement($L.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?E.createElement(jte,{error:t},e):e}};vG.contextType=Ste;var fC=new WeakMap;function jte({children:t,error:e}){let{basename:r}=E.useContext(Oo);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let a=Nte(e.digest);if(a){let n=fC.get(e);if(n)throw n;let i=sG(a.location,r);if(oG&&!fC.get(e))if(i.isExternal||a.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:a.replace}));throw fC.set(e,o),o}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return t}function Ote({routeContext:t,match:e,children:r}){let a=E.useContext(sm);return a&&a.static&&a.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=e.route.id),E.createElement(el.Provider,{value:t},r)}function zte(t,e=[],r){let a=r==null?void 0:r.state;if(t==null){if(!a)return null;if(a.errors)t=a.matches;else if(e.length===0&&!a.initialized&&a.matches.length>0)t=a.matches;else return null}let n=t,i=a==null?void 0:a.errors;if(i!=null){let c=n.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);ja(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),n=n.slice(0,Math.min(n.length,c+1))}let o=!1,s=-1;if(r&&a){o=a.renderFallback;for(let c=0;c<n.length;c++){let d=n[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(s=c),d.route.id){let{loaderData:h,errors:v}=a,m=d.route.loader&&!h.hasOwnProperty(d.route.id)&&(!v||v[d.route.id]===void 0);if(d.route.lazy||m){r.isStatic&&(o=!0),s>=0?n=n.slice(0,s+1):n=[n[0]];break}}}}let l=r==null?void 0:r.onError,u=a&&l?(c,d)=>{var h,v;l(c,{location:a.location,params:((v=(h=a.matches)==null?void 0:h[0])==null?void 0:v.params)??{},unstable_pattern:bte(a.matches),errorInfo:d})}:void 0;return n.reduceRight((c,d,h)=>{let v,m=!1,x=null,b=null;a&&(v=i&&d.route.id?i[d.route.id]:void 0,x=d.route.errorElement||Ite,o&&(s<0&&h===0?(pG("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,b=null):s===h&&(m=!0,b=d.route.hydrateFallbackElement||null)));let w=e.concat(n.slice(0,h+1)),_=()=>{let T;return v?T=x:m?T=b:d.route.Component?T=E.createElement(d.route.Component,null):d.route.element?T=d.route.element:T=c,E.createElement(Ote,{match:d,routeContext:{outlet:c,matches:w,isDataRoute:a!=null},children:T})};return a&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?E.createElement(vG,{location:a.location,revalidation:a.revalidation,component:x,error:v,children:_(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:u}):_()},null)}function WL(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bte(t){let e=E.useContext(sm);return ja(e,WL(t)),e}function Vte(t){let e=E.useContext(p_);return ja(e,WL(t)),e}function Fte(t){let e=E.useContext(el);return ja(e,WL(t)),e}function YL(t){let e=Fte(t),r=e.matches[e.matches.length-1];return ja(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function Gte(){return YL("useRouteId")}function Hte(){var a;let t=E.useContext($L),e=Vte("useRouteError"),r=YL("useRouteError");return t!==void 0?t:(a=e.errors)==null?void 0:a[r]}function Ute(){let{router:t}=Bte("useNavigate"),e=YL("useNavigate"),r=E.useRef(!1);return fG(()=>{r.current=!0}),E.useCallback(async(n,i={})=>{ys(r.current,dG),r.current&&(typeof n=="number"?await t.navigate(n):await t.navigate(n,{fromRouteId:e,...i}))},[t,e])}var RO={};function pG(t,e,r){!e&&!RO[t]&&(RO[t]=!0,ys(!1,r))}E.memo($te);function $te({routes:t,future:e,state:r,isStatic:a,onError:n}){return hG(t,void 0,{state:r,isStatic:a,onError:n})}function XL({to:t,replace:e,state:r,relative:a}){ja(lm(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n}=E.useContext(Oo);ys(!n,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=E.useContext(el),{pathname:o}=po(),s=ru(),l=v_(t,UL(i),o,a==="path"),u=JSON.stringify(l);return E.useEffect(()=>{s(JSON.parse(u),{replace:e,state:r,relative:a})},[s,u,a,e,r]),null}function PO(t){return Ete(t.context)}function kl(t){ja(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Wte({basename:t="/",children:e=null,location:r,navigationType:a="POP",navigator:n,static:i=!1,unstable_useTransitions:o}){ja(!lm(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=t.replace(/^\/*/,"/"),l=E.useMemo(()=>({basename:s,navigator:n,static:i,unstable_useTransitions:o,future:{}}),[s,n,i,o]);typeof r=="string"&&(r=om(r));let{pathname:u="/",search:c="",hash:d="",state:h=null,key:v="default",unstable_mask:m}=r,x=E.useMemo(()=>{let b=Ku(u,s);return b==null?null:{location:{pathname:b,search:c,hash:d,state:h,key:v,unstable_mask:m},navigationType:a}},[s,u,c,d,h,v,a,m]);return ys(x!=null,`<Router basename="${s}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:E.createElement(Oo.Provider,{value:l},E.createElement(jy.Provider,{children:e,value:x}))}function Yte({children:t,location:e}){return Rte(RA(t),e)}function RA(t,e=[]){let r=[];return E.Children.forEach(t,(a,n)=>{if(!E.isValidElement(a))return;let i=[...e,n];if(a.type===E.Fragment){r.push.apply(r,RA(a.props.children,i));return}ja(a.type===kl,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ja(!a.props.index||!a.props.children,"An index route cannot have child routes.");let o={id:a.props.id||i.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(o.children=RA(a.props.children,i)),r.push(o)}),r}var q1="get",Z1="application/x-www-form-urlencoded";function m_(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function Xte(t){return m_(t)&&t.tagName.toLowerCase()==="button"}function qte(t){return m_(t)&&t.tagName.toLowerCase()==="form"}function Zte(t){return m_(t)&&t.tagName.toLowerCase()==="input"}function Kte(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Qte(t,e){return t.button===0&&(!e||e==="_self")&&!Kte(t)}function PA(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,r)=>{let a=t[r];return e.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function Jte(t,e){let r=PA(t);return e&&e.forEach((a,n)=>{r.has(n)||e.getAll(n).forEach(i=>{r.append(n,i)})}),r}var vb=null;function ere(){if(vb===null)try{new FormData(document.createElement("form"),0),vb=!1}catch{vb=!0}return vb}var tre=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function hC(t){return t!=null&&!tre.has(t)?(ys(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Z1}"`),null):t}function rre(t,e){let r,a,n,i,o;if(qte(t)){let s=t.getAttribute("action");a=s?Ku(s,e):null,r=t.getAttribute("method")||q1,n=hC(t.getAttribute("enctype"))||Z1,i=new FormData(t)}else if(Xte(t)||Zte(t)&&(t.type==="submit"||t.type==="image")){let s=t.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=t.getAttribute("formaction")||s.getAttribute("action");if(a=l?Ku(l,e):null,r=t.getAttribute("formmethod")||s.getAttribute("method")||q1,n=hC(t.getAttribute("formenctype"))||hC(s.getAttribute("enctype"))||Z1,i=new FormData(s,t),!ere()){let{name:u,type:c,value:d}=t;if(c==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,d)}}else{if(m_(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=q1,a=null,n=Z1,o=t}return i&&n==="text/plain"&&(o=i,i=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:i,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qL(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function are(t,e,r,a){let n=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${a}`:n.pathname=`${n.pathname}.${a}`:n.pathname==="/"?n.pathname=`_root.${a}`:e&&Ku(n.pathname,e)==="/"?n.pathname=`${e.replace(/\/$/,"")}/_root.${a}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${a}`,n}async function nre(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ire(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function ore(t,e,r){let a=await Promise.all(t.map(async n=>{let i=e.routes[n.route.id];if(i){let o=await nre(i,r);return o.links?o.links():[]}return[]}));return cre(a.flat(1).filter(ire).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function IO(t,e,r,a,n,i){let o=(l,u)=>r[u]?l.route.id!==r[u].route.id:!0,s=(l,u)=>{var c;return r[u].pathname!==l.pathname||((c=r[u].route.path)==null?void 0:c.endsWith("*"))&&r[u].params["*"]!==l.params["*"]};return i==="assets"?e.filter((l,u)=>o(l,u)||s(l,u)):i==="data"?e.filter((l,u)=>{var d;let c=a.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(o(l,u)||s(l,u))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:((d=r[0])==null?void 0:d.params)||{},nextUrl:new URL(t,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function sre(t,e,{includeHydrateFallback:r}={}){return lre(t.map(a=>{let n=e.routes[a.route.id];if(!n)return[];let i=[n.module];return n.clientActionModule&&(i=i.concat(n.clientActionModule)),n.clientLoaderModule&&(i=i.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(i=i.concat(n.hydrateFallbackModule)),n.imports&&(i=i.concat(n.imports)),i}).flat(1))}function lre(t){return[...new Set(t)]}function ure(t){let e={},r=Object.keys(t).sort();for(let a of r)e[a]=t[a];return e}function cre(t,e){let r=new Set;return new Set(e),t.reduce((a,n)=>{let i=JSON.stringify(ure(n));return r.has(i)||(r.add(i),a.push({key:i,link:n})),a},[])}function mG(){let t=E.useContext(sm);return qL(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function dre(){let t=E.useContext(p_);return qL(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var ZL=E.createContext(void 0);ZL.displayName="FrameworkContext";function gG(){let t=E.useContext(ZL);return qL(t,"You must render this element inside a <HydratedRouter> element"),t}function fre(t,e){let r=E.useContext(ZL),[a,n]=E.useState(!1),[i,o]=E.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=e,h=E.useRef(null);E.useEffect(()=>{if(t==="render"&&o(!0),t==="viewport"){let x=w=>{w.forEach(_=>{o(_.isIntersecting)})},b=new IntersectionObserver(x,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[t]),E.useEffect(()=>{if(a){let x=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(x)}}},[a]);let v=()=>{n(!0)},m=()=>{n(!1),o(!1)};return r?t!=="intent"?[i,h,{}]:[i,h,{onFocus:Sg(s,v),onBlur:Sg(l,m),onMouseEnter:Sg(u,v),onMouseLeave:Sg(c,m),onTouchStart:Sg(d,v)}]:[!1,h,{}]}function Sg(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function hre({page:t,...e}){let{router:r}=mG(),a=E.useMemo(()=>aG(r.routes,t,r.basename),[r.routes,t,r.basename]);return a?E.createElement(pre,{page:t,matches:a,...e}):null}function vre(t){let{manifest:e,routeModules:r}=gG(),[a,n]=E.useState([]);return E.useEffect(()=>{let i=!1;return ore(t,e,r).then(o=>{i||n(o)}),()=>{i=!0}},[t,e,r]),a}function pre({page:t,matches:e,...r}){let a=po(),{future:n,manifest:i,routeModules:o}=gG(),{basename:s}=mG(),{loaderData:l,matches:u}=dre(),c=E.useMemo(()=>IO(t,e,u,i,a,"data"),[t,e,u,i,a]),d=E.useMemo(()=>IO(t,e,u,i,a,"assets"),[t,e,u,i,a]),h=E.useMemo(()=>{if(t===a.pathname+a.search+a.hash)return[];let x=new Set,b=!1;if(e.forEach(_=>{var C;let T=i.routes[_.route.id];!T||!T.hasLoader||(!c.some(k=>k.route.id===_.route.id)&&_.route.id in l&&((C=o[_.route.id])!=null&&C.shouldRevalidate)||T.hasClientLoader?b=!0:x.add(_.route.id))}),x.size===0)return[];let w=are(t,s,n.unstable_trailingSlashAwareDataRequests,"data");return b&&x.size>0&&w.searchParams.set("_routes",e.filter(_=>x.has(_.route.id)).map(_=>_.route.id).join(",")),[w.pathname+w.search]},[s,n.unstable_trailingSlashAwareDataRequests,l,a,i,c,e,t,o]),v=E.useMemo(()=>sre(d,i),[d,i]),m=vre(d);return E.createElement(E.Fragment,null,h.map(x=>E.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...r})),v.map(x=>E.createElement("link",{key:x,rel:"modulepreload",href:x,...r})),m.map(({key:x,link:b})=>E.createElement("link",{key:x,nonce:r.nonce,...b,crossOrigin:b.crossOrigin??r.crossOrigin})))}function mre(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var gre=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{gre&&(window.__reactRouterVersion="7.13.1")}catch{}function yre({basename:t,children:e,unstable_useTransitions:r,window:a}){let n=E.useRef();n.current==null&&(n.current=qee({window:a,v5Compat:!0}));let i=n.current,[o,s]=E.useState({action:i.action,location:i.location}),l=E.useCallback(u=>{r===!1?s(u):E.startTransition(()=>s(u))},[r]);return E.useLayoutEffect(()=>i.listen(l),[i,l]),E.createElement(Wte,{basename:t,children:e,location:o.location,navigationType:o.action,navigator:i,unstable_useTransitions:r})}var yG=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hh=E.forwardRef(function({onClick:e,discover:r="render",prefetch:a="none",relative:n,reloadDocument:i,replace:o,unstable_mask:s,state:l,target:u,to:c,preventScrollReset:d,viewTransition:h,unstable_defaultShouldRevalidate:v,...m},x){let{basename:b,navigator:w,unstable_useTransitions:_}=E.useContext(Oo),T=typeof c=="string"&&yG.test(c),C=sG(c,b);c=C.to;let k=Mte(c,{relative:n}),A=po(),M=null;if(s){let G=v_(s,[],A.unstable_mask?A.unstable_mask.pathname:"/",!0);b!=="/"&&(G.pathname=G.pathname==="/"?b:Gl([b,G.pathname])),M=w.createHref(G)}let[L,R,P]=fre(a,m),j=Sre(c,{replace:o,unstable_mask:s,state:l,target:u,preventScrollReset:d,relative:n,viewTransition:h,unstable_defaultShouldRevalidate:v,unstable_useTransitions:_});function V(G){e&&e(G),G.defaultPrevented||j(G)}let I=!(C.isExternal||i),F=E.createElement("a",{...m,...P,href:(I?M:void 0)||C.absoluteURL||k,onClick:I?V:e,ref:mre(x,R),target:u,"data-discover":!T&&r==="render"?"true":void 0});return L&&!T?E.createElement(E.Fragment,null,F,E.createElement(hre,{page:k})):F});hh.displayName="Link";var xre=E.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:a="",end:n=!1,style:i,to:o,viewTransition:s,children:l,...u},c){let d=Oy(o,{relative:u.relative}),h=po(),v=E.useContext(p_),{navigator:m,basename:x}=E.useContext(Oo),b=v!=null&&Nre(d)&&s===!0,w=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,_=h.pathname,T=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(_=_.toLowerCase(),T=T?T.toLowerCase():null,w=w.toLowerCase()),T&&x&&(T=Ku(T,x)||T);const C=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let k=_===w||!n&&_.startsWith(w)&&_.charAt(C)==="/",A=T!=null&&(T===w||!n&&T.startsWith(w)&&T.charAt(w.length)==="/"),M={isActive:k,isPending:A,isTransitioning:b},L=k?e:void 0,R;typeof a=="function"?R=a(M):R=[a,k?"active":null,A?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let P=typeof i=="function"?i(M):i;return E.createElement(hh,{...u,"aria-current":L,className:R,ref:c,style:P,to:o,viewTransition:s},typeof l=="function"?l(M):l)});xre.displayName="NavLink";var bre=E.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:a,replace:n,state:i,method:o=q1,action:s,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:h,...v},m)=>{let{unstable_useTransitions:x}=E.useContext(Oo),b=Cre(),w=kre(s,{relative:u}),_=o.toLowerCase()==="get"?"get":"post",T=typeof s=="string"&&yG.test(s),C=k=>{if(l&&l(k),k.defaultPrevented)return;k.preventDefault();let A=k.nativeEvent.submitter,M=(A==null?void 0:A.getAttribute("formmethod"))||o,L=()=>b(A||k.currentTarget,{fetcherKey:e,method:M,navigate:r,replace:n,state:i,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:h});x&&r!==!1?E.startTransition(()=>L()):L()};return E.createElement("form",{ref:m,method:_,action:w,onSubmit:a?l:C,...v,"data-discover":!T&&t==="render"?"true":void 0})});bre.displayName="Form";function wre(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xG(t){let e=E.useContext(sm);return ja(e,wre(t)),e}function Sre(t,{target:e,replace:r,unstable_mask:a,state:n,preventScrollReset:i,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:l,unstable_useTransitions:u}={}){let c=ru(),d=po(),h=Oy(t,{relative:o});return E.useCallback(v=>{if(Qte(v,e)){v.preventDefault();let m=r!==void 0?r:Y0(d)===Y0(h),x=()=>c(t,{replace:m,unstable_mask:a,state:n,preventScrollReset:i,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:l});u?E.startTransition(()=>x()):x()}},[d,c,h,r,a,n,e,t,i,o,s,l,u])}function bG(t){ys(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let e=E.useRef(PA(t)),r=E.useRef(!1),a=po(),n=E.useMemo(()=>Jte(a.search,r.current?null:e.current),[a.search]),i=ru(),o=E.useCallback((s,l)=>{const u=PA(typeof s=="function"?s(new URLSearchParams(n)):s);r.current=!0,i("?"+u,l)},[i,n]);return[n,o]}var _re=0,Tre=()=>`__${String(++_re)}__`;function Cre(){let{router:t}=xG("useSubmit"),{basename:e}=E.useContext(Oo),r=Gte(),a=t.fetch,n=t.navigate;return E.useCallback(async(i,o={})=>{let{action:s,method:l,encType:u,formData:c,body:d}=rre(i,e);if(o.navigate===!1){let h=o.fetcherKey||Tre();await a(h,r,o.action||s,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:c,body:d,formMethod:o.method||l,formEncType:o.encType||u,flushSync:o.flushSync})}else await n(o.action||s,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:c,body:d,formMethod:o.method||l,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[a,n,e,r])}function kre(t,{relative:e}={}){let{basename:r}=E.useContext(Oo),a=E.useContext(el);ja(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),i={...Oy(t||".",{relative:e})},o=po();if(t==null){i.search=o.search;let s=new URLSearchParams(i.search),l=s.getAll("index");if(l.some(c=>c==="")){s.delete("index"),l.filter(d=>d).forEach(d=>s.append("index",d));let c=s.toString();i.search=c?`?${c}`:""}}return(!t||t===".")&&n.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:Gl([r,i.pathname])),Y0(i)}function Nre(t,{relative:e}={}){let r=E.useContext(uG);ja(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=xG("useViewTransitionState"),n=Oy(t,{relative:e});if(!r.isTransitioning)return!1;let i=Ku(r.currentLocation.pathname,a)||r.currentLocation.pathname,o=Ku(r.nextLocation.pathname,a)||r.nextLocation.pathname;return Ew(n.pathname,o)!=null||Ew(n.pathname,i)!=null}var X0=rG();/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Are=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Mre=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,a)=>a?a.toUpperCase():r.toLowerCase()),jO=t=>{const e=Mre(t);return e.charAt(0).toUpperCase()+e.slice(1)},wG=(...t)=>t.filter((e,r,a)=>!!e&&e.trim()!==""&&a.indexOf(e)===r).join(" ").trim(),Dre=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var Lre={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ere=E.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:n="",children:i,iconNode:o,...s},l)=>E.createElement("svg",{ref:l,...Lre,width:e,height:e,stroke:t,strokeWidth:a?Number(r)*24/Number(e):r,className:wG("lucide",n),...!i&&!Dre(s)&&{"aria-hidden":"true"},...s},[...o.map(([u,c])=>E.createElement(u,c)),...Array.isArray(i)?i:[i]]));/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Je=(t,e)=>{const r=E.forwardRef(({className:a,...n},i)=>E.createElement(Ere,{ref:i,iconNode:e,className:wG(`lucide-${Are(jO(t))}`,`lucide-${t}`,a),...n}));return r.displayName=jO(t),r};/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rre=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],SG=Je("activity",Rre);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pre=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ire=Je("arrow-left",Pre);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jre=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],pb=Je("arrow-right-left",jre);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ore=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],zre=Je("arrow-up",Ore);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bre=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]],Vre=Je("badge-dollar-sign",Bre);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fre=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],OO=Je("bell",Fre);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Gre=[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2",key:"1ksdt3"}],["path",{d:"M22 13a18.15 18.15 0 0 1-20 0",key:"12hx5q"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],g_=Je("briefcase-business",Gre);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hre=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],Ure=Je("briefcase",Hre);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $re=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],q0=Je("building-2",$re);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wre=[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]],zO=Je("building",Wre);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Yre=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m9 16 2 2 4-4",key:"19s6y9"}]],Xre=Je("calendar-check",Yre);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qre=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],Zre=Je("calendar-days",qre);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Kre=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],_G=Je("calendar",Kre);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qre=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],BO=Je("camera",Qre);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jre=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],TG=Je("chart-column",Jre);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eae=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],tae=Je("chart-pie",eae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rae=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Fu=Je("check",rae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const aae=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],zy=Je("chevron-down",aae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nae=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],VO=Je("chevron-right",nae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const iae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ip=Je("circle-check",iae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]],sae=Je("circle-dollar-sign",oae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],CG=Je("circle-question-mark",lae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uae=[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],cae=Je("circle-user-round",uae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dae=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],fae=Je("clipboard-list",dae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hae=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],kG=Je("clock",hae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vae=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],IA=Je("dollar-sign",vae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pae=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],By=Je("download",pae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mae=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],gae=Je("ellipsis-vertical",mae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yae=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],xae=Je("external-link",yae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bae=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],vC=Je("eye-off",bae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wae=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],pC=Je("eye",wae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sae=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],um=Je("file-text",Sae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _ae=[["path",{d:"M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17",key:"geh8rc"}],["path",{d:"m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",key:"1fto5m"}],["path",{d:"m2 16 6 6",key:"1pfhp9"}],["circle",{cx:"16",cy:"9",r:"2.9",key:"1n0dlu"}],["circle",{cx:"6",cy:"5",r:"3",key:"151irh"}]],Tae=Je("hand-coins",_ae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cae=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],NG=Je("hash",Cae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kae=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Nae=Je("house",kae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Aae=[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z",key:"1m329m"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]],Mae=Je("landmark",Aae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Dae=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],Lae=Je("list-filter",Dae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Eae=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],Rae=Je("list-todo",Eae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pae=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Iae=Je("log-out",Pae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jae=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Oae=Je("mail",jae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zae=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],KL=Je("map-pin",zae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bae=[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]],Vae=Je("map-pinned",Bae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fae=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],Gae=Je("megaphone",Fae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hae=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],Uae=Je("mic",Hae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $ae=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],jA=Je("moon",$ae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wae=[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]],AG=Je("notebook-pen",Wae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Yae=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Xae=Je("package",Yae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qae=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],y_=Je("paperclip",qae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Zae=[["path",{d:"M13 2a9 9 0 0 1 9 9",key:"1itnx2"}],["path",{d:"M13 6a5 5 0 0 1 5 5",key:"11nki7"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Kae=Je("phone-call",Zae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qae=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],MG=Je("phone",Qae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jae=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Rw=Je("plus",Jae);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ene=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],C0=Je("refresh-cw",ene);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tne=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],rne=Je("rocket",tne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ane=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],nne=Je("rotate-ccw",ane);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ine=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Qu=Je("search",ine);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const one=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],sne=Je("send",one);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lne=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],une=Je("settings",lne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cne=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],dne=Je("shield-alert",cne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fne=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],DG=Je("shield",fne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hne=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],vne=Je("shopping-cart",hne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pne=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],mne=Je("square",pne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gne=[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]],yne=Je("store",gne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xne=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],OA=Je("sun",xne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bne=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],wne=Je("tag",bne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sne=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],_ne=Je("target",Sne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tne=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],FO=Je("trash-2",Tne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cne=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],LG=Je("trending-up",Cne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kne=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],EG=Je("triangle-alert",kne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Nne=[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]],Ane=Je("trophy",Nne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mne=[["path",{d:"M2 21a8 8 0 0 1 13.292-6",key:"bjp14o"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M19 16v6",key:"tddt3s"}],["path",{d:"M22 19h-6",key:"vcuq98"}]],Dne=Je("user-round-plus",Mne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lne=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Pw=Je("user",Lne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ene=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],x_=Je("users",Ene);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rne=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],Pne=Je("wallet",Rne);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ine=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Oa=Je("x",Ine);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jne=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],One=Je("zap",jne);function RG(t){var e,r,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(e=0;e<n;e++)t[e]&&(r=RG(t[e]))&&(a&&(a+=" "),a+=r)}else for(r in t)t[r]&&(a&&(a+=" "),a+=r);return a}function zne(){for(var t,e,r=0,a="",n=arguments.length;r<n;r++)(t=arguments[r])&&(e=RG(t))&&(a&&(a+=" "),a+=e);return a}const Bne=(t,e)=>{const r=new Array(t.length+e.length);for(let a=0;a<t.length;a++)r[a]=t[a];for(let a=0;a<e.length;a++)r[t.length+a]=e[a];return r},Vne=(t,e)=>({classGroupId:t,validator:e}),PG=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),Iw="-",GO=[],Fne="arbitrary..",Gne=t=>{const e=Une(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=t;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Hne(o);const s=o.split(Iw),l=s[0]===""&&s.length>1?1:0;return IG(s,l,e)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=a[o],u=r[o];return l?u?Bne(u,l):l:u||GO}return r[o]||GO}}},IG=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const n=t[e],i=r.nextPart.get(n);if(i){const u=IG(t,e+1,i);if(u)return u}const o=r.validators;if(o===null)return;const s=e===0?t.join(Iw):t.slice(e).join(Iw),l=o.length;for(let u=0;u<l;u++){const c=o[u];if(c.validator(s))return c.classGroupId}},Hne=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),a=e.slice(0,r);return a?Fne+a:void 0})(),Une=t=>{const{theme:e,classGroups:r}=t;return $ne(r,e)},$ne=(t,e)=>{const r=PG();for(const a in t){const n=t[a];QL(n,r,a,e)}return r},QL=(t,e,r,a)=>{const n=t.length;for(let i=0;i<n;i++){const o=t[i];Wne(o,e,r,a)}},Wne=(t,e,r,a)=>{if(typeof t=="string"){Yne(t,e,r);return}if(typeof t=="function"){Xne(t,e,r,a);return}qne(t,e,r,a)},Yne=(t,e,r)=>{const a=t===""?e:jG(e,t);a.classGroupId=r},Xne=(t,e,r,a)=>{if(Zne(t)){QL(t(a),e,r,a);return}e.validators===null&&(e.validators=[]),e.validators.push(Vne(r,t))},qne=(t,e,r,a)=>{const n=Object.entries(t),i=n.length;for(let o=0;o<i;o++){const[s,l]=n[o];QL(l,jG(e,s),r,a)}},jG=(t,e)=>{let r=t;const a=e.split(Iw),n=a.length;for(let i=0;i<n;i++){const o=a[i];let s=r.nextPart.get(o);s||(s=PG(),r.nextPart.set(o,s)),r=s}return r},Zne=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Kne=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),a=Object.create(null);const n=(i,o)=>{r[i]=o,e++,e>t&&(e=0,a=r,r=Object.create(null))};return{get(i){let o=r[i];if(o!==void 0)return o;if((o=a[i])!==void 0)return n(i,o),o},set(i,o){i in r?r[i]=o:n(i,o)}}},zA="!",HO=":",Qne=[],UO=(t,e,r,a,n)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:a,isExternal:n}),Jne=t=>{const{prefix:e,experimentalParseClassName:r}=t;let a=n=>{const i=[];let o=0,s=0,l=0,u;const c=n.length;for(let x=0;x<c;x++){const b=n[x];if(o===0&&s===0){if(b===HO){i.push(n.slice(l,x)),l=x+1;continue}if(b==="/"){u=x;continue}}b==="["?o++:b==="]"?o--:b==="("?s++:b===")"&&s--}const d=i.length===0?n:n.slice(l);let h=d,v=!1;d.endsWith(zA)?(h=d.slice(0,-1),v=!0):d.startsWith(zA)&&(h=d.slice(1),v=!0);const m=u&&u>l?u-l:void 0;return UO(i,v,h,m)};if(e){const n=e+HO,i=a;a=o=>o.startsWith(n)?i(o.slice(n.length)):UO(Qne,!1,o,void 0,!0)}if(r){const n=a;a=i=>r({className:i,parseClassName:n})}return a},eie=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,a)=>{e.set(r,1e6+a)}),r=>{const a=[];let n=[];for(let i=0;i<r.length;i++){const o=r[i],s=o[0]==="[",l=e.has(o);s||l?(n.length>0&&(n.sort(),a.push(...n),n=[]),a.push(o)):n.push(o)}return n.length>0&&(n.sort(),a.push(...n)),a}},tie=t=>({cache:Kne(t.cacheSize),parseClassName:Jne(t),sortModifiers:eie(t),...Gne(t)}),rie=/\s+/,aie=(t,e)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:n,sortModifiers:i}=e,o=[],s=t.trim().split(rie);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:d,modifiers:h,hasImportantModifier:v,baseClassName:m,maybePostfixModifierPosition:x}=r(c);if(d){l=c+(l.length>0?" "+l:l);continue}let b=!!x,w=a(b?m.substring(0,x):m);if(!w){if(!b){l=c+(l.length>0?" "+l:l);continue}if(w=a(m),!w){l=c+(l.length>0?" "+l:l);continue}b=!1}const _=h.length===0?"":h.length===1?h[0]:i(h).join(":"),T=v?_+zA:_,C=T+w;if(o.indexOf(C)>-1)continue;o.push(C);const k=n(w,b);for(let A=0;A<k.length;++A){const M=k[A];o.push(T+M)}l=c+(l.length>0?" "+l:l)}return l},nie=(...t)=>{let e=0,r,a,n="";for(;e<t.length;)(r=t[e++])&&(a=OG(r))&&(n&&(n+=" "),n+=a);return n},OG=t=>{if(typeof t=="string")return t;let e,r="";for(let a=0;a<t.length;a++)t[a]&&(e=OG(t[a]))&&(r&&(r+=" "),r+=e);return r},iie=(t,...e)=>{let r,a,n,i;const o=l=>{const u=e.reduce((c,d)=>d(c),t());return r=tie(u),a=r.cache.get,n=r.cache.set,i=s,s(l)},s=l=>{const u=a(l);if(u)return u;const c=aie(l,r);return n(l,c),c};return i=o,(...l)=>i(nie(...l))},oie=[],Un=t=>{const e=r=>r[t]||oie;return e.isThemeGetter=!0,e},zG=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,BG=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sie=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,lie=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uie=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cie=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,die=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fie=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vc=t=>sie.test(t),sr=t=>!!t&&!Number.isNaN(Number(t)),Fc=t=>!!t&&Number.isInteger(Number(t)),mC=t=>t.endsWith("%")&&sr(t.slice(0,-1)),Du=t=>lie.test(t),VG=()=>!0,hie=t=>uie.test(t)&&!cie.test(t),JL=()=>!1,vie=t=>die.test(t),pie=t=>fie.test(t),mie=t=>!ht(t)&&!mt(t),gie=t=>Vd(t,HG,JL),ht=t=>zG.test(t),mf=t=>Vd(t,UG,hie),$O=t=>Vd(t,Cie,sr),yie=t=>Vd(t,WG,VG),xie=t=>Vd(t,$G,JL),WO=t=>Vd(t,FG,JL),bie=t=>Vd(t,GG,pie),mb=t=>Vd(t,YG,vie),mt=t=>BG.test(t),_g=t=>Fh(t,UG),wie=t=>Fh(t,$G),YO=t=>Fh(t,FG),Sie=t=>Fh(t,HG),_ie=t=>Fh(t,GG),gb=t=>Fh(t,YG,!0),Tie=t=>Fh(t,WG,!0),Vd=(t,e,r)=>{const a=zG.exec(t);return a?a[1]?e(a[1]):r(a[2]):!1},Fh=(t,e,r=!1)=>{const a=BG.exec(t);return a?a[1]?e(a[1]):r:!1},FG=t=>t==="position"||t==="percentage",GG=t=>t==="image"||t==="url",HG=t=>t==="length"||t==="size"||t==="bg-size",UG=t=>t==="length",Cie=t=>t==="number",$G=t=>t==="family-name",WG=t=>t==="number"||t==="weight",YG=t=>t==="shadow",kie=()=>{const t=Un("color"),e=Un("font"),r=Un("text"),a=Un("font-weight"),n=Un("tracking"),i=Un("leading"),o=Un("breakpoint"),s=Un("container"),l=Un("spacing"),u=Un("radius"),c=Un("shadow"),d=Un("inset-shadow"),h=Un("text-shadow"),v=Un("drop-shadow"),m=Un("blur"),x=Un("perspective"),b=Un("aspect"),w=Un("ease"),_=Un("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...C(),mt,ht],A=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],L=()=>[mt,ht,l],R=()=>[Vc,"full","auto",...L()],P=()=>[Fc,"none","subgrid",mt,ht],j=()=>["auto",{span:["full",Fc,mt,ht]},Fc,mt,ht],V=()=>[Fc,"auto",mt,ht],I=()=>["auto","min","max","fr",mt,ht],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...L()],U=()=>[Vc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],$=()=>[Vc,"screen","full","dvw","lvw","svw","min","max","fit",...L()],K=()=>[Vc,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],q=()=>[t,mt,ht],H=()=>[...C(),YO,WO,{position:[mt,ht]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",Sie,gie,{size:[mt,ht]}],ie=()=>[mC,_g,mf],ce=()=>["","none","full",u,mt,ht],me=()=>["",sr,_g,mf],ze=()=>["solid","dashed","dotted","double"],Ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[sr,mC,YO,WO],Be=()=>["","none",m,mt,ht],_e=()=>["none",sr,mt,ht],Oe=()=>["none",sr,mt,ht],xt=()=>[sr,mt,ht],Ye=()=>[Vc,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Du],breakpoint:[Du],color:[VG],container:[Du],"drop-shadow":[Du],ease:["in","out","in-out"],font:[mie],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Du],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Du],shadow:[Du],spacing:["px",sr],text:[Du],"text-shadow":[Du],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Vc,ht,mt,b]}],container:["container"],columns:[{columns:[sr,ht,mt,s]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{"inset-s":R(),start:R()}],end:[{"inset-e":R(),end:R()}],"inset-bs":[{"inset-bs":R()}],"inset-be":[{"inset-be":R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[Fc,"auto",mt,ht]}],basis:[{basis:[Vc,"full","auto",s,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[sr,Vc,"auto","initial","none",ht]}],grow:[{grow:["",sr,mt,ht]}],shrink:[{shrink:["",sr,mt,ht]}],order:[{order:[Fc,"first","last","none",mt,ht]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],"inline-size":[{inline:["auto",...$()]}],"min-inline-size":[{"min-inline":["auto",...$()]}],"max-inline-size":[{"max-inline":["none",...$()]}],"block-size":[{block:["auto",...K()]}],"min-block-size":[{"min-block":["auto",...K()]}],"max-block-size":[{"max-block":["none",...K()]}],w:[{w:[s,"screen",...U()]}],"min-w":[{"min-w":[s,"screen","none",...U()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",r,_g,mf]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Tie,yie]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",mC,ht]}],"font-family":[{font:[wie,xie,e]}],"font-features":[{"font-features":[ht]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,mt,ht]}],"line-clamp":[{"line-clamp":[sr,"none",mt,$O]}],leading:[{leading:[i,...L()]}],"list-image":[{"list-image":["none",mt,ht]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",mt,ht]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ze(),"wavy"]}],"text-decoration-thickness":[{decoration:[sr,"from-font","auto",mt,mf]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[sr,"auto",mt,ht]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",mt,ht]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",mt,ht]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fc,mt,ht],radial:["",mt,ht],conic:[Fc,mt,ht]},_ie,bie]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ze(),"hidden","none"]}],"divide-style":[{divide:[...ze(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-bs":[{"border-bs":q()}],"border-color-be":[{"border-be":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...ze(),"none","hidden"]}],"outline-offset":[{"outline-offset":[sr,mt,ht]}],"outline-w":[{outline:["",sr,_g,mf]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",c,gb,mb]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",d,gb,mb]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[sr,mf]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",h,gb,mb]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[sr,mt,ht]}],"mix-blend":[{"mix-blend":[...Ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[sr]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[mt,ht]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[sr]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",mt,ht]}],filter:[{filter:["","none",mt,ht]}],blur:[{blur:Be()}],brightness:[{brightness:[sr,mt,ht]}],contrast:[{contrast:[sr,mt,ht]}],"drop-shadow":[{"drop-shadow":["","none",v,gb,mb]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",sr,mt,ht]}],"hue-rotate":[{"hue-rotate":[sr,mt,ht]}],invert:[{invert:["",sr,mt,ht]}],saturate:[{saturate:[sr,mt,ht]}],sepia:[{sepia:["",sr,mt,ht]}],"backdrop-filter":[{"backdrop-filter":["","none",mt,ht]}],"backdrop-blur":[{"backdrop-blur":Be()}],"backdrop-brightness":[{"backdrop-brightness":[sr,mt,ht]}],"backdrop-contrast":[{"backdrop-contrast":[sr,mt,ht]}],"backdrop-grayscale":[{"backdrop-grayscale":["",sr,mt,ht]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[sr,mt,ht]}],"backdrop-invert":[{"backdrop-invert":["",sr,mt,ht]}],"backdrop-opacity":[{"backdrop-opacity":[sr,mt,ht]}],"backdrop-saturate":[{"backdrop-saturate":[sr,mt,ht]}],"backdrop-sepia":[{"backdrop-sepia":["",sr,mt,ht]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",mt,ht]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[sr,"initial",mt,ht]}],ease:[{ease:["linear","initial",w,mt,ht]}],delay:[{delay:[sr,mt,ht]}],animate:[{animate:["none",_,mt,ht]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,mt,ht]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:Oe()}],"scale-x":[{"scale-x":Oe()}],"scale-y":[{"scale-y":Oe()}],"scale-z":[{"scale-z":Oe()}],"scale-3d":["scale-3d"],skew:[{skew:xt()}],"skew-x":[{"skew-x":xt()}],"skew-y":[{"skew-y":xt()}],transform:[{transform:[mt,ht,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ye()}],"translate-x":[{"translate-x":Ye()}],"translate-y":[{"translate-y":Ye()}],"translate-z":[{"translate-z":Ye()}],"translate-none":["translate-none"],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",mt,ht]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",mt,ht]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[sr,_g,mf,$O]}],stroke:[{stroke:["none",...q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Nie=iie(kie);function Ne(...t){return Nie(zne(t))}const Aie={theme:"system",setTheme:()=>null},XG=E.createContext(Aie);function Mie({children:t,defaultTheme:e="system",storageKey:r="crm-ui-theme",...a}){const[n,i]=E.useState(()=>localStorage.getItem(r)||e);E.useEffect(()=>{const s=window.document.documentElement;if(s.classList.remove("light","dark"),n==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";s.classList.add(l);return}s.classList.add(n)},[n]);const o={theme:n,setTheme:s=>{localStorage.setItem(r,s),i(s)}};return g.jsx(XG.Provider,{...a,value:o,children:t})}const qG=()=>{const t=E.useContext(XG);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t},eE=E.createContext({});function tE(t){const e=E.useRef(null);return e.current===null&&(e.current=t()),e.current}const Die=typeof window<"u",ZG=Die?E.useLayoutEffect:E.useEffect,b_=E.createContext(null);function rE(t,e){t.indexOf(e)===-1&&t.push(e)}function jw(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}const Xl=(t,e,r)=>r>e?e:r<t?t:r;let aE=()=>{};const Dd={},KG=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function QG(t){return typeof t=="object"&&t!==null}const JG=t=>/^0[^.\s]+$/u.test(t);function eH(t){let e;return()=>(e===void 0&&(e=t()),e)}const ms=t=>t,Lie=(t,e)=>r=>e(t(r)),Vy=(...t)=>t.reduce(Lie),Z0=(t,e,r)=>{const a=e-t;return a===0?1:(r-t)/a};class nE{constructor(){this.subscriptions=[]}add(e){return rE(this.subscriptions,e),()=>jw(this.subscriptions,e)}notify(e,r,a){const n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](e,r,a);else for(let i=0;i<n;i++){const o=this.subscriptions[i];o&&o(e,r,a)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Po=t=>t*1e3,hs=t=>t/1e3;function tH(t,e){return e?t*(1e3/e):0}const rH=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,Eie=1e-7,Rie=12;function Pie(t,e,r,a,n){let i,o,s=0;do o=e+(r-e)/2,i=rH(o,a,n)-t,i>0?r=o:e=o;while(Math.abs(i)>Eie&&++s<Rie);return o}function Fy(t,e,r,a){if(t===e&&r===a)return ms;const n=i=>Pie(i,0,1,t,r);return i=>i===0||i===1?i:rH(n(i),e,a)}const aH=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,nH=t=>e=>1-t(1-e),iH=Fy(.33,1.53,.69,.99),iE=nH(iH),oH=aH(iE),sH=t=>t>=1?1:(t*=2)<1?.5*iE(t):.5*(2-Math.pow(2,-10*(t-1))),oE=t=>1-Math.sin(Math.acos(t)),lH=nH(oE),uH=aH(oE),Iie=Fy(.42,0,1,1),jie=Fy(0,0,.58,1),cH=Fy(.42,0,.58,1),Oie=t=>Array.isArray(t)&&typeof t[0]!="number",dH=t=>Array.isArray(t)&&typeof t[0]=="number",zie={linear:ms,easeIn:Iie,easeInOut:cH,easeOut:jie,circIn:oE,circInOut:uH,circOut:lH,backIn:iE,backInOut:oH,backOut:iH,anticipate:sH},Bie=t=>typeof t=="string",XO=t=>{if(dH(t)){aE(t.length===4);const[e,r,a,n]=t;return Fy(e,r,a,n)}else if(Bie(t))return zie[t];return t},yb=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Vie(t,e){let r=new Set,a=new Set,n=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(s)}const u={schedule:(c,d=!1,h=!1)=>{const m=h&&n?r:a;return d&&o.add(c),m.add(c),c},cancel:c=>{a.delete(c),o.delete(c)},process:c=>{if(s=c,n){i=!0;return}n=!0;const d=r;r=a,a=d,r.forEach(l),r.clear(),n=!1,i&&(i=!1,u.process(c))}};return u}const Fie=40;function fH(t,e){let r=!1,a=!0;const n={delta:0,timestamp:0,isProcessing:!1},i=()=>r=!0,o=yb.reduce((T,C)=>(T[C]=Vie(i),T),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:v,postRender:m}=o,x=()=>{const T=Dd.useManualTiming,C=T?n.timestamp:performance.now();r=!1,T||(n.delta=a?1e3/60:Math.max(Math.min(C-n.timestamp,Fie),1)),n.timestamp=C,n.isProcessing=!0,s.process(n),l.process(n),u.process(n),c.process(n),d.process(n),h.process(n),v.process(n),m.process(n),n.isProcessing=!1,r&&e&&(a=!1,t(x))},b=()=>{r=!0,a=!0,n.isProcessing||t(x)};return{schedule:yb.reduce((T,C)=>{const k=o[C];return T[C]=(A,M=!1,L=!1)=>(r||b(),k.schedule(A,M,L)),T},{}),cancel:T=>{for(let C=0;C<yb.length;C++)o[yb[C]].cancel(T)},state:n,steps:o}}const{schedule:ba,cancel:Ld,state:vi,steps:gC}=fH(typeof requestAnimationFrame<"u"?requestAnimationFrame:ms,!0);let K1;function Gie(){K1=void 0}const Xi={now:()=>(K1===void 0&&Xi.set(vi.isProcessing||Dd.useManualTiming?vi.timestamp:performance.now()),K1),set:t=>{K1=t,queueMicrotask(Gie)}},hH=t=>e=>typeof e=="string"&&e.startsWith(t),vH=hH("--"),Hie=hH("var(--"),sE=t=>Hie(t)?Uie.test(t.split("/*")[0].trim()):!1,Uie=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qO(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const cm={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},K0={...cm,transform:t=>Xl(0,1,t)},xb={...cm,default:1},k0=t=>Math.round(t*1e5)/1e5,lE=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $ie(t){return t==null}const Wie=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,uE=(t,e)=>r=>!!(typeof r=="string"&&Wie.test(r)&&r.startsWith(t)||e&&!$ie(r)&&Object.prototype.hasOwnProperty.call(r,e)),pH=(t,e,r)=>a=>{if(typeof a!="string")return a;const[n,i,o,s]=a.match(lE);return{[t]:parseFloat(n),[e]:parseFloat(i),[r]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},Yie=t=>Xl(0,255,t),yC={...cm,transform:t=>Math.round(Yie(t))},ah={test:uE("rgb","red"),parse:pH("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:a=1})=>"rgba("+yC.transform(t)+", "+yC.transform(e)+", "+yC.transform(r)+", "+k0(K0.transform(a))+")"};function Xie(t){let e="",r="",a="",n="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),a=t.substring(5,7),n=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),a=t.substring(3,4),n=t.substring(4,5),e+=e,r+=r,a+=a,n+=n),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(a,16),alpha:n?parseInt(n,16)/255:1}}const BA={test:uE("#"),parse:Xie,transform:ah.transform},Gy=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Jc=Gy("deg"),Hl=Gy("%"),vt=Gy("px"),qie=Gy("vh"),Zie=Gy("vw"),ZO={...Hl,parse:t=>Hl.parse(t)/100,transform:t=>Hl.transform(t*100)},up={test:uE("hsl","hue"),parse:pH("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:a=1})=>"hsla("+Math.round(t)+", "+Hl.transform(k0(e))+", "+Hl.transform(k0(r))+", "+k0(K0.transform(a))+")"},Nn={test:t=>ah.test(t)||BA.test(t)||up.test(t),parse:t=>ah.test(t)?ah.parse(t):up.test(t)?up.parse(t):BA.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ah.transform(t):up.transform(t),getAnimatableNone:t=>{const e=Nn.parse(t);return e.alpha=0,Nn.transform(e)}},Kie=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Qie(t){var e,r;return isNaN(t)&&typeof t=="string"&&(((e=t.match(lE))==null?void 0:e.length)||0)+(((r=t.match(Kie))==null?void 0:r.length)||0)>0}const mH="number",gH="color",Jie="var",eoe="var(",KO="${}",toe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function jp(t){const e=t.toString(),r=[],a={color:[],number:[],var:[]},n=[];let i=0;const s=e.replace(toe,l=>(Nn.test(l)?(a.color.push(i),n.push(gH),r.push(Nn.parse(l))):l.startsWith(eoe)?(a.var.push(i),n.push(Jie),r.push(l)):(a.number.push(i),n.push(mH),r.push(parseFloat(l))),++i,KO)).split(KO);return{values:r,split:s,indexes:a,types:n}}function roe(t){return jp(t).values}function yH({split:t,types:e}){const r=t.length;return a=>{let n="";for(let i=0;i<r;i++)if(n+=t[i],a[i]!==void 0){const o=e[i];o===mH?n+=k0(a[i]):o===gH?n+=Nn.transform(a[i]):n+=a[i]}return n}}function aoe(t){return yH(jp(t))}const noe=t=>typeof t=="number"?0:Nn.test(t)?Nn.getAnimatableNone(t):t,ioe=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:noe(t);function ooe(t){const e=jp(t);return yH(e)(e.values.map((a,n)=>ioe(a,e.split[n])))}const Us={test:Qie,parse:roe,createTransformer:aoe,getAnimatableNone:ooe};function xC(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function soe({hue:t,saturation:e,lightness:r,alpha:a}){t/=360,e/=100,r/=100;let n=0,i=0,o=0;if(!e)n=i=o=r;else{const s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=xC(l,s,t+1/3),i=xC(l,s,t),o=xC(l,s,t-1/3)}return{red:Math.round(n*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:a}}function Ow(t,e){return r=>r>0?e:t}const Ua=(t,e,r)=>t+(e-t)*r,bC=(t,e,r)=>{const a=t*t,n=r*(e*e-a)+a;return n<0?0:Math.sqrt(n)},loe=[BA,ah,up],uoe=t=>loe.find(e=>e.test(t));function QO(t){const e=uoe(t);if(!e)return!1;let r=e.parse(t);return e===up&&(r=soe(r)),r}const JO=(t,e)=>{const r=QO(t),a=QO(e);if(!r||!a)return Ow(t,e);const n={...r};return i=>(n.red=bC(r.red,a.red,i),n.green=bC(r.green,a.green,i),n.blue=bC(r.blue,a.blue,i),n.alpha=Ua(r.alpha,a.alpha,i),ah.transform(n))},VA=new Set(["none","hidden"]);function coe(t,e){return VA.has(t)?r=>r<=0?t:e:r=>r>=1?e:t}function doe(t,e){return r=>Ua(t,e,r)}function cE(t){return typeof t=="number"?doe:typeof t=="string"?sE(t)?Ow:Nn.test(t)?JO:voe:Array.isArray(t)?xH:typeof t=="object"?Nn.test(t)?JO:foe:Ow}function xH(t,e){const r=[...t],a=r.length,n=t.map((i,o)=>cE(i)(i,e[o]));return i=>{for(let o=0;o<a;o++)r[o]=n[o](i);return r}}function foe(t,e){const r={...t,...e},a={};for(const n in r)t[n]!==void 0&&e[n]!==void 0&&(a[n]=cE(t[n])(t[n],e[n]));return n=>{for(const i in a)r[i]=a[i](n);return r}}function hoe(t,e){const r=[],a={color:0,var:0,number:0};for(let n=0;n<e.values.length;n++){const i=e.types[n],o=t.indexes[i][a[i]],s=t.values[o]??0;r[n]=s,a[i]++}return r}const voe=(t,e)=>{const r=Us.createTransformer(e),a=jp(t),n=jp(e);return a.indexes.var.length===n.indexes.var.length&&a.indexes.color.length===n.indexes.color.length&&a.indexes.number.length>=n.indexes.number.length?VA.has(t)&&!n.values.length||VA.has(e)&&!a.values.length?coe(t,e):Vy(xH(hoe(a,n),n.values),r):Ow(t,e)};function bH(t,e,r){return typeof t=="number"&&typeof e=="number"&&typeof r=="number"?Ua(t,e,r):cE(t)(t,e)}const poe=t=>{const e=({timestamp:r})=>t(r);return{start:(r=!0)=>ba.update(e,r),stop:()=>Ld(e),now:()=>vi.isProcessing?vi.timestamp:Xi.now()}},wH=(t,e,r=10)=>{let a="";const n=Math.max(Math.round(e/r),2);for(let i=0;i<n;i++)a+=Math.round(t(i/(n-1))*1e4)/1e4+", ";return`linear(${a.substring(0,a.length-2)})`},zw=2e4;function dE(t){let e=0;const r=50;let a=t.next(e);for(;!a.done&&e<zw;)e+=r,a=t.next(e);return e>=zw?1/0:e}function moe(t,e=100,r){const a=r({...t,keyframes:[0,e]}),n=Math.min(dE(a),zw);return{type:"keyframes",ease:i=>a.next(n*i).value/e,duration:hs(n)}}const Ka={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function FA(t,e){return t*Math.sqrt(1-e*e)}const goe=12;function yoe(t,e,r){let a=r;for(let n=1;n<goe;n++)a=a-t(a)/e(a);return a}const wC=.001;function xoe({duration:t=Ka.duration,bounce:e=Ka.bounce,velocity:r=Ka.velocity,mass:a=Ka.mass}){let n,i,o=1-e;o=Xl(Ka.minDamping,Ka.maxDamping,o),t=Xl(Ka.minDuration,Ka.maxDuration,hs(t)),o<1?(n=u=>{const c=u*o,d=c*t,h=c-r,v=FA(u,o),m=Math.exp(-d);return wC-h/v*m},i=u=>{const d=u*o*t,h=d*r+r,v=Math.pow(o,2)*Math.pow(u,2)*t,m=Math.exp(-d),x=FA(Math.pow(u,2),o);return(-n(u)+wC>0?-1:1)*((h-v)*m)/x}):(n=u=>{const c=Math.exp(-u*t),d=(u-r)*t+1;return-wC+c*d},i=u=>{const c=Math.exp(-u*t),d=(r-u)*(t*t);return c*d});const s=5/t,l=yoe(n,i,s);if(t=Po(t),isNaN(l))return{stiffness:Ka.stiffness,damping:Ka.damping,duration:t};{const u=Math.pow(l,2)*a;return{stiffness:u,damping:o*2*Math.sqrt(a*u),duration:t}}}const boe=["duration","bounce"],woe=["stiffness","damping","mass"];function e3(t,e){return e.some(r=>t[r]!==void 0)}function Soe(t){let e={velocity:Ka.velocity,stiffness:Ka.stiffness,damping:Ka.damping,mass:Ka.mass,isResolvedFromDuration:!1,...t};if(!e3(t,woe)&&e3(t,boe))if(e.velocity=0,t.visualDuration){const r=t.visualDuration,a=2*Math.PI/(r*1.2),n=a*a,i=2*Xl(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:Ka.mass,stiffness:n,damping:i}}else{const r=xoe({...t,velocity:0});e={...e,...r,mass:Ka.mass},e.isResolvedFromDuration=!0}return e}function Bw(t=Ka.visualDuration,e=Ka.bounce){const r=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:a,restDelta:n}=r;const i=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:u,mass:c,duration:d,velocity:h,isResolvedFromDuration:v}=Soe({...r,velocity:-hs(r.velocity||0)}),m=h||0,x=u/(2*Math.sqrt(l*c)),b=o-i,w=hs(Math.sqrt(l/c)),_=Math.abs(b)<5;a||(a=_?Ka.restSpeed.granular:Ka.restSpeed.default),n||(n=_?Ka.restDelta.granular:Ka.restDelta.default);let T,C,k,A,M,L;if(x<1)k=FA(w,x),A=(m+x*w*b)/k,T=P=>{const j=Math.exp(-x*w*P);return o-j*(A*Math.sin(k*P)+b*Math.cos(k*P))},M=x*w*A+b*k,L=x*w*b-A*k,C=P=>Math.exp(-x*w*P)*(M*Math.sin(k*P)+L*Math.cos(k*P));else if(x===1){T=j=>o-Math.exp(-w*j)*(b+(m+w*b)*j);const P=m+w*b;C=j=>Math.exp(-w*j)*(w*P*j-m)}else{const P=w*Math.sqrt(x*x-1);T=F=>{const G=Math.exp(-x*w*F),O=Math.min(P*F,300);return o-G*((m+x*w*b)*Math.sinh(O)+P*b*Math.cosh(O))/P};const j=(m+x*w*b)/P,V=x*w*j-b*P,I=x*w*b-j*P;C=F=>{const G=Math.exp(-x*w*F),O=Math.min(P*F,300);return G*(V*Math.sinh(O)+I*Math.cosh(O))}}const R={calculatedDuration:v&&d||null,velocity:P=>Po(C(P)),next:P=>{if(!v&&x<1){const V=Math.exp(-x*w*P),I=Math.sin(k*P),F=Math.cos(k*P),G=o-V*(A*I+b*F),O=Po(V*(M*I+L*F));return s.done=Math.abs(O)<=a&&Math.abs(o-G)<=n,s.value=s.done?o:G,s}const j=T(P);if(v)s.done=P>=d;else{const V=Po(C(P));s.done=Math.abs(V)<=a&&Math.abs(o-j)<=n}return s.value=s.done?o:j,s},toString:()=>{const P=Math.min(dE(R),zw),j=wH(V=>R.next(P*V).value,P,30);return P+"ms "+j},toTransition:()=>{}};return R}Bw.applyToOptions=t=>{const e=moe(t,100,Bw);return t.ease=e.ease,t.duration=Po(e.duration),t.type="keyframes",t};const _oe=5;function SH(t,e,r){const a=Math.max(e-_oe,0);return tH(r-t(a),e-a)}function GA({keyframes:t,velocity:e=0,power:r=.8,timeConstant:a=325,bounceDamping:n=10,bounceStiffness:i=500,modifyTarget:o,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=t[0],h={done:!1,value:d},v=L=>s!==void 0&&L<s||l!==void 0&&L>l,m=L=>s===void 0?l:l===void 0||Math.abs(s-L)<Math.abs(l-L)?s:l;let x=r*e;const b=d+x,w=o===void 0?b:o(b);w!==b&&(x=w-d);const _=L=>-x*Math.exp(-L/a),T=L=>w+_(L),C=L=>{const R=_(L),P=T(L);h.done=Math.abs(R)<=u,h.value=h.done?w:P};let k,A;const M=L=>{v(h.value)&&(k=L,A=Bw({keyframes:[h.value,m(h.value)],velocity:SH(T,L,h.value),damping:n,stiffness:i,restDelta:u,restSpeed:c}))};return M(0),{calculatedDuration:null,next:L=>{let R=!1;return!A&&k===void 0&&(R=!0,C(L),M(L)),k!==void 0&&L>=k?A.next(L-k):(!R&&C(L),h)}}}function Toe(t,e,r){const a=[],n=r||Dd.mix||bH,i=t.length-1;for(let o=0;o<i;o++){let s=n(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||ms:e;s=Vy(l,s)}a.push(s)}return a}function Coe(t,e,{clamp:r=!0,ease:a,mixer:n}={}){const i=t.length;if(aE(i===e.length),i===1)return()=>e[0];if(i===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=Toe(e,a,n),l=s.length,u=c=>{if(o&&c<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(c<t[d+1]);d++);const h=Z0(t[d],t[d+1],c);return s[d](h)};return r?c=>u(Xl(t[0],t[i-1],c)):u}function koe(t,e){const r=t[t.length-1];for(let a=1;a<=e;a++){const n=Z0(0,e,a);t.push(Ua(r,1,n))}}function Noe(t){const e=[0];return koe(e,t.length-1),e}function Aoe(t,e){return t.map(r=>r*e)}function Moe(t,e){return t.map(()=>e||cH).splice(0,t.length-1)}function N0({duration:t=300,keyframes:e,times:r,ease:a="easeInOut"}){const n=Oie(a)?a.map(XO):XO(a),i={done:!1,value:e[0]},o=Aoe(r&&r.length===e.length?r:Noe(e),t),s=Coe(o,e,{ease:Array.isArray(n)?n:Moe(e,n)});return{calculatedDuration:t,next:l=>(i.value=s(l),i.done=l>=t,i)}}const Doe=t=>t!==null;function fE(t,{repeat:e,repeatType:r="loop"},a,n=1){const i=t.filter(Doe),s=n<0||e&&r!=="loop"&&e%2===1?0:i.length-1;return!s||a===void 0?i[s]:a}const Loe={decay:GA,inertia:GA,tween:N0,keyframes:N0,spring:Bw};function _H(t){typeof t.type=="string"&&(t.type=Loe[t.type])}class hE{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,r){return this.finished.then(e,r)}}const Eoe=t=>t/100;class vE extends hE{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var a,n;const{motionValue:r}=this.options;r&&r.updatedAt!==Xi.now()&&this.tick(Xi.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(n=(a=this.options).onStop)==null||n.call(a))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;_H(e);const{type:r=N0,repeat:a=0,repeatDelay:n=0,repeatType:i,velocity:o=0}=e;let{keyframes:s}=e;const l=r||N0;l!==N0&&typeof s[0]!="number"&&(this.mixKeyframes=Vy(Eoe,bH(s[0],s[1])),s=[0,100]);const u=l({...e,keyframes:s});i==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...s].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=dE(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+n,this.totalDuration=this.resolvedDuration*(a+1)-n,this.generator=u}updateTime(e){const r=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(e,r=!1){const{generator:a,totalDuration:n,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return a.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:v,type:m,onUpdate:x,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),r?this.currentTime=e:this.updateTime(e);const w=this.currentTime-u*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?w<0:w>n;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let T=this.currentTime,C=a;if(d){const L=Math.min(this.currentTime,n)/s;let R=Math.floor(L),P=L%1;!P&&L>=1&&(P=1),P===1&&R--,R=Math.min(R,d+1),!!(R%2)&&(h==="reverse"?(P=1-P,v&&(P-=v/s)):h==="mirror"&&(C=o)),T=Xl(0,1,P)*s}const k=_?{done:!1,value:c[0]}:C.next(T);i&&!_&&(k.value=i(k.value));let{done:A}=k;!_&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return M&&m!==GA&&(k.value=fE(c,this.options,b,this.speed)),x&&x(k.value),M&&this.finish(),k}then(e,r){return this.finished.then(e,r)}get duration(){return hs(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+hs(e)}get time(){return hs(this.currentTime)}set time(e){e=Po(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const r=this.generator.next(e).value;return SH(a=>this.generator.next(a).value,e,r)}get speed(){return this.playbackSpeed}set speed(e){const r=this.playbackSpeed!==e;r&&this.driver&&this.updateTime(Xi.now()),this.playbackSpeed=e,r&&this.driver&&(this.time=hs(this.currentTime))}play(){var n,i;if(this.isStopped)return;const{driver:e=poe,startTime:r}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(i=(n=this.options).onPlay)==null||i.call(n);const a=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=a):this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime||(this.startTime=r??a),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Xi.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(e=this.options).onComplete)==null||r.call(e)}cancel(){var e,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(e=this.options).onCancel)==null||r.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),e.observe(this)}}function Roe(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const nh=t=>t*180/Math.PI,HA=t=>{const e=nh(Math.atan2(t[1],t[0]));return UA(e)},Poe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:HA,rotateZ:HA,skewX:t=>nh(Math.atan(t[1])),skewY:t=>nh(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},UA=t=>(t=t%360,t<0&&(t+=360),t),t3=HA,r3=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),a3=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ioe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:r3,scaleY:a3,scale:t=>(r3(t)+a3(t))/2,rotateX:t=>UA(nh(Math.atan2(t[6],t[5]))),rotateY:t=>UA(nh(Math.atan2(-t[2],t[0]))),rotateZ:t3,rotate:t3,skewX:t=>nh(Math.atan(t[4])),skewY:t=>nh(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function $A(t){return t.includes("scale")?1:0}function WA(t,e){if(!t||t==="none")return $A(e);const r=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let a,n;if(r)a=Ioe,n=r;else{const s=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);a=Poe,n=s}if(!n)return $A(e);const i=a[e],o=n[1].split(",").map(Ooe);return typeof i=="function"?i(o):o[i]}const joe=(t,e)=>{const{transform:r="none"}=getComputedStyle(t);return WA(r,e)};function Ooe(t){return parseFloat(t.trim())}const dm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fm=new Set(dm),n3=t=>t===cm||t===vt,zoe=new Set(["x","y","z"]),Boe=dm.filter(t=>!zoe.has(t));function Voe(t){const e=[];return Boe.forEach(r=>{const a=t.getValue(r);a!==void 0&&(e.push([r,a.get()]),a.set(r.startsWith("scale")?1:0))}),e}const ud={width:({x:t},{paddingLeft:e="0",paddingRight:r="0",boxSizing:a})=>{const n=t.max-t.min;return a==="border-box"?n:n-parseFloat(e)-parseFloat(r)},height:({y:t},{paddingTop:e="0",paddingBottom:r="0",boxSizing:a})=>{const n=t.max-t.min;return a==="border-box"?n:n-parseFloat(e)-parseFloat(r)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>WA(e,"x"),y:(t,{transform:e})=>WA(e,"y")};ud.translateX=ud.x;ud.translateY=ud.y;const vh=new Set;let YA=!1,XA=!1,qA=!1;function TH(){if(XA){const t=Array.from(vh).filter(a=>a.needsMeasurement),e=new Set(t.map(a=>a.element)),r=new Map;e.forEach(a=>{const n=Voe(a);n.length&&(r.set(a,n),a.render())}),t.forEach(a=>a.measureInitialState()),e.forEach(a=>{a.render();const n=r.get(a);n&&n.forEach(([i,o])=>{var s;(s=a.getValue(i))==null||s.set(o)})}),t.forEach(a=>a.measureEndState()),t.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}XA=!1,YA=!1,vh.forEach(t=>t.complete(qA)),vh.clear()}function CH(){vh.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(XA=!0)})}function Foe(){qA=!0,CH(),TH(),qA=!1}class pE{constructor(e,r,a,n,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=r,this.name=a,this.motionValue=n,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(vh.add(this),YA||(YA=!0,ba.read(CH),ba.resolveKeyframes(TH))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:r,element:a,motionValue:n}=this;if(e[0]===null){const i=n==null?void 0:n.get(),o=e[e.length-1];if(i!==void 0)e[0]=i;else if(a&&r){const s=a.readValue(r,o);s!=null&&(e[0]=s)}e[0]===void 0&&(e[0]=o),n&&i===void 0&&n.set(e[0])}Roe(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),vh.delete(this)}cancel(){this.state==="scheduled"&&(vh.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Goe=t=>t.startsWith("--");function kH(t,e,r){Goe(e)?t.style.setProperty(e,r):t.style[e]=r}const Hoe={};function NH(t,e){const r=eH(t);return()=>Hoe[e]??r()}const Uoe=NH(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),AH=NH(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),u0=([t,e,r,a])=>`cubic-bezier(${t}, ${e}, ${r}, ${a})`,i3={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:u0([0,.65,.55,1]),circOut:u0([.55,0,1,.45]),backIn:u0([.31,.01,.66,-.59]),backOut:u0([.33,1.53,.69,.99])};function MH(t,e){if(t)return typeof t=="function"?AH()?wH(t,e):"ease-out":dH(t)?u0(t):Array.isArray(t)?t.map(r=>MH(r,e)||i3.easeOut):i3[t]}function $oe(t,e,r,{delay:a=0,duration:n=300,repeat:i=0,repeatType:o="loop",ease:s="easeOut",times:l}={},u=void 0){const c={[e]:r};l&&(c.offset=l);const d=MH(s,n);Array.isArray(d)&&(c.easing=d);const h={delay:a,duration:n,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),t.animate(c,h)}function DH(t){return typeof t=="function"&&"applyToOptions"in t}function Woe({type:t,...e}){return DH(t)&&AH()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class LH extends hE{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:r,name:a,keyframes:n,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:s,onComplete:l}=e;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=e,aE(typeof e.type!="string");const u=Woe(e);this.animation=$oe(r,a,n,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const c=fE(n,this.options,s,this.speed);this.updateMotionValue&&this.updateMotionValue(c),kH(r,a,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,r;(r=(e=this.animation).finish)==null||r.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var r,a,n;const e=(r=this.options)==null?void 0:r.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((n=(a=this.animation).commitStyles)==null||n.call(a))}get duration(){var r,a;const e=((a=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:a.call(r).duration)||0;return hs(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+hs(e)}get time(){return hs(Number(this.animation.currentTime)||0)}set time(e){const r=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Po(e),r&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:r,rangeEnd:a,observe:n}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Uoe()?(this.animation.timeline=e,r&&(this.animation.rangeStart=r),a&&(this.animation.rangeEnd=a),ms):n(this)}}const EH={anticipate:sH,backInOut:oH,circInOut:uH};function Yoe(t){return t in EH}function Xoe(t){typeof t.ease=="string"&&Yoe(t.ease)&&(t.ease=EH[t.ease])}const SC=10;class qoe extends LH{constructor(e){Xoe(e),_H(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:r,onUpdate:a,onComplete:n,element:i,...o}=this.options;if(!r)return;if(e!==void 0){r.set(e);return}const s=new vE({...o,autoplay:!1}),l=Math.max(SC,Xi.now()-this.startTime),u=Xl(0,SC,l-SC),c=s.sample(l).value,{name:d}=this.options;i&&d&&kH(i,d,c),r.setWithVelocity(s.sample(Math.max(0,l-u)).value,c,u),s.stop()}}const o3=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Us.test(t)||t==="0")&&!t.startsWith("url("));function Zoe(t){const e=t[0];if(t.length===1)return!0;for(let r=0;r<t.length;r++)if(t[r]!==e)return!0}function Koe(t,e,r,a){const n=t[0];if(n===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],o=o3(n,e),s=o3(i,e);return!o||!s?!1:Zoe(t)||(r==="spring"||DH(r))&&a}function ZA(t){t.duration=0,t.type="keyframes"}const Qoe=new Set(["opacity","clipPath","filter","transform"]),Joe=eH(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ese(t){var c;const{motionValue:e,name:r,repeatDelay:a,repeatType:n,damping:i,type:o}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Joe()&&r&&Qoe.has(r)&&(r!=="transform"||!u)&&!l&&!a&&n!=="mirror"&&i!==0&&o!=="inertia"}const tse=40;class rse extends hE{constructor({autoplay:e=!0,delay:r=0,type:a="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:o="loop",keyframes:s,name:l,motionValue:u,element:c,...d}){var m;super(),this.stop=()=>{var x,b;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Xi.now();const h={autoplay:e,delay:r,type:a,repeat:n,repeatDelay:i,repeatType:o,name:l,motionValue:u,element:c,...d},v=(c==null?void 0:c.KeyframeResolver)||pE;this.keyframeResolver=new v(s,(x,b,w)=>this.onKeyframesResolved(x,b,h,!w),l,u,c),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(e,r,a,n){var w,_;this.keyframeResolver=void 0;const{name:i,type:o,velocity:s,delay:l,isHandoff:u,onUpdate:c}=a;this.resolvedAt=Xi.now();let d=!0;Koe(e,i,o,s)||(d=!1,(Dd.instantAnimations||!l)&&(c==null||c(fE(e,a,r))),e[0]=e[e.length-1],ZA(a),a.repeat=0);const v={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>tse?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...a,keyframes:e},m=d&&!u&&ese(v),x=(_=(w=v.motionValue)==null?void 0:w.owner)==null?void 0:_.current,b=m?new qoe({...v,element:x}):new vE(v);b.finished.then(()=>{this.notifyFinished()}).catch(ms),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(e,r){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),Foe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function RH(t,e,r,a=0,n=1){const i=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,s=(o-1)*a;return typeof r=="function"?r(i,o):n===1?i*a:s-i*a}const ase=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function nse(t){const e=ase.exec(t);if(!e)return[,];const[,r,a,n]=e;return[`--${r??a}`,n]}function PH(t,e,r=1){const[a,n]=nse(t);if(!a)return;const i=window.getComputedStyle(e).getPropertyValue(a);if(i){const o=i.trim();return KG(o)?parseFloat(o):o}return sE(n)?PH(n,e,r+1):n}const ise={type:"spring",stiffness:500,damping:25,restSpeed:10},ose=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),sse={type:"keyframes",duration:.8},lse={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},use=(t,{keyframes:e})=>e.length>2?sse:fm.has(t)?t.startsWith("scale")?ose(e[1]):ise:lse,cse=t=>t!==null;function dse(t,{repeat:e,repeatType:r="loop"},a){const n=t.filter(cse),i=e&&r!=="loop"&&e%2===1?0:n.length-1;return n[i]}function IH(t,e){if(t!=null&&t.inherit&&e){const{inherit:r,...a}=t;return{...e,...a}}return t}function mE(t,e){const r=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return r!==t?IH(r,t):r}function fse({when:t,delay:e,delayChildren:r,staggerChildren:a,staggerDirection:n,repeat:i,repeatType:o,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const gE=(t,e,r,a={},n,i)=>o=>{const s=mE(a,t)||{},l=s.delay||a.delay||0;let{elapsed:u=0}=a;u=u-Po(l);const c={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:e.getVelocity(),...s,delay:-u,onUpdate:h=>{e.set(h),s.onUpdate&&s.onUpdate(h)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:t,motionValue:e,element:i?void 0:n};fse(s)||Object.assign(c,use(t,c)),c.duration&&(c.duration=Po(c.duration)),c.repeatDelay&&(c.repeatDelay=Po(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(ZA(c),c.delay===0&&(d=!0)),(Dd.instantAnimations||Dd.skipAnimations||n!=null&&n.shouldSkipAnimations)&&(d=!0,ZA(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!i&&e.get()!==void 0){const h=dse(c.keyframes,s);if(h!==void 0){ba.update(()=>{c.onUpdate(h),c.onComplete()});return}}return s.isSync?new vE(c):new rse(c)};function s3(t){const e=[{},{}];return t==null||t.values.forEach((r,a)=>{e[0][a]=r.get(),e[1][a]=r.getVelocity()}),e}function yE(t,e,r,a){if(typeof e=="function"){const[n,i]=s3(a);e=e(r!==void 0?r:t.custom,n,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[n,i]=s3(a);e=e(r!==void 0?r:t.custom,n,i)}return e}function ph(t,e,r){const a=t.getProps();return yE(a,e,r!==void 0?r:a.custom,t)}const jH=new Set(["width","height","top","left","right","bottom",...dm]),l3=30,hse=t=>!isNaN(parseFloat(t));class vse{constructor(e,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=a=>{var i;const n=Xi.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=r.owner}setCurrent(e){this.current=e,this.updatedAt=Xi.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=hse(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new nE);const a=this.events[e].add(r);return e==="change"?()=>{a(),ba.read(()=>{this.events.change.getSize()||this.stop()})}:a}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,r,a){this.set(r),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-a}jump(e,r=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Xi.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>l3)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,l3);return tH(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,r;(e=this.dependents)==null||e.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Op(t,e){return new vse(t,e)}const KA=t=>Array.isArray(t);function pse(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Op(r))}function mse(t){return KA(t)?t[t.length-1]||0:t}function gse(t,e){const r=ph(t,e);let{transitionEnd:a={},transition:n={},...i}=r||{};i={...i,...a};for(const o in i){const s=mse(i[o]);pse(t,o,s)}}const gi=t=>!!(t&&t.getVelocity);function yse(t){return!!(gi(t)&&t.add)}function QA(t,e){const r=t.getValue("willChange");if(yse(r))return r.add(e);if(!r&&Dd.WillChange){const a=new Dd.WillChange("auto");t.addValue("willChange",a),a.add(e)}}function xE(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const xse="framerAppearId",OH="data-"+xE(xse);function zH(t){return t.props[OH]}function bse({protectedKeys:t,needsAnimating:e},r){const a=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,a}function BH(t,e,{delay:r=0,transitionOverride:a,type:n}={}){let{transition:i,transitionEnd:o,...s}=e;const l=t.getDefaultTransition();i=i?IH(i,l):l;const u=i==null?void 0:i.reduceMotion;a&&(i=a);const c=[],d=n&&t.animationState&&t.animationState.getState()[n];for(const h in s){const v=t.getValue(h,t.latestValues[h]??null),m=s[h];if(m===void 0||d&&bse(d,h))continue;const x={delay:r,...mE(i||{},h)},b=v.get();if(b!==void 0&&!v.isAnimating&&!Array.isArray(m)&&m===b&&!x.velocity)continue;let w=!1;if(window.MotionHandoffAnimation){const C=zH(t);if(C){const k=window.MotionHandoffAnimation(C,h,ba);k!==null&&(x.startTime=k,w=!0)}}QA(t,h);const _=u??t.shouldReduceMotion;v.start(gE(h,v,m,_&&jH.has(h)?{type:!1}:x,t,w));const T=v.animation;T&&c.push(T)}if(o){const h=()=>ba.update(()=>{o&&gse(t,o)});c.length?Promise.all(c).then(h):h()}return c}function JA(t,e,r={}){var l;const a=ph(t,e,r.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:n=t.getDefaultTransition()||{}}=a||{};r.transitionOverride&&(n=r.transitionOverride);const i=a?()=>Promise.all(BH(t,a,r)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:h}=n;return wse(t,e,u,c,d,h,r)}:()=>Promise.resolve(),{when:s}=n;if(s){const[u,c]=s==="beforeChildren"?[i,o]:[o,i];return u().then(()=>c())}else return Promise.all([i(),o(r.delay)])}function wse(t,e,r=0,a=0,n=0,i=1,o){const s=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),s.push(JA(l,e,{...o,delay:r+(typeof a=="function"?0:a)+RH(t.variantChildren,l,a,n,i)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(s)}function Sse(t,e,r={}){t.notify("AnimationStart",e);let a;if(Array.isArray(e)){const n=e.map(i=>JA(t,i,r));a=Promise.all(n)}else if(typeof e=="string")a=JA(t,e,r);else{const n=typeof e=="function"?ph(t,e,r.custom):e;a=Promise.all(BH(t,n,r))}return a.then(()=>{t.notify("AnimationComplete",e)})}const _se={test:t=>t==="auto",parse:t=>t},VH=t=>e=>e.test(t),FH=[cm,vt,Hl,Jc,Zie,qie,_se],u3=t=>FH.find(VH(t));function Tse(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||JG(t):!0}const Cse=new Set(["brightness","contrast","saturate","opacity"]);function kse(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[a]=r.match(lE)||[];if(!a)return t;const n=r.replace(a,"");let i=Cse.has(e)?1:0;return a!==r&&(i*=100),e+"("+i+n+")"}const Nse=/\b([a-z-]*)\(.*?\)/gu,eM={...Us,getAnimatableNone:t=>{const e=t.match(Nse);return e?e.map(kse).join(" "):t}},tM={...Us,getAnimatableNone:t=>{const e=Us.parse(t);return Us.createTransformer(t)(e.map(a=>typeof a=="number"?0:typeof a=="object"?{...a,alpha:1}:a))}},c3={...cm,transform:Math.round},Ase={rotate:Jc,rotateX:Jc,rotateY:Jc,rotateZ:Jc,scale:xb,scaleX:xb,scaleY:xb,scaleZ:xb,skew:Jc,skewX:Jc,skewY:Jc,distance:vt,translateX:vt,translateY:vt,translateZ:vt,x:vt,y:vt,z:vt,perspective:vt,transformPerspective:vt,opacity:K0,originX:ZO,originY:ZO,originZ:vt},bE={borderWidth:vt,borderTopWidth:vt,borderRightWidth:vt,borderBottomWidth:vt,borderLeftWidth:vt,borderRadius:vt,borderTopLeftRadius:vt,borderTopRightRadius:vt,borderBottomRightRadius:vt,borderBottomLeftRadius:vt,width:vt,maxWidth:vt,height:vt,maxHeight:vt,top:vt,right:vt,bottom:vt,left:vt,inset:vt,insetBlock:vt,insetBlockStart:vt,insetBlockEnd:vt,insetInline:vt,insetInlineStart:vt,insetInlineEnd:vt,padding:vt,paddingTop:vt,paddingRight:vt,paddingBottom:vt,paddingLeft:vt,paddingBlock:vt,paddingBlockStart:vt,paddingBlockEnd:vt,paddingInline:vt,paddingInlineStart:vt,paddingInlineEnd:vt,margin:vt,marginTop:vt,marginRight:vt,marginBottom:vt,marginLeft:vt,marginBlock:vt,marginBlockStart:vt,marginBlockEnd:vt,marginInline:vt,marginInlineStart:vt,marginInlineEnd:vt,fontSize:vt,backgroundPositionX:vt,backgroundPositionY:vt,...Ase,zIndex:c3,fillOpacity:K0,strokeOpacity:K0,numOctaves:c3},Mse={...bE,color:Nn,backgroundColor:Nn,outlineColor:Nn,fill:Nn,stroke:Nn,borderColor:Nn,borderTopColor:Nn,borderRightColor:Nn,borderBottomColor:Nn,borderLeftColor:Nn,filter:eM,WebkitFilter:eM,mask:tM,WebkitMask:tM},GH=t=>Mse[t],Dse=new Set([eM,tM]);function HH(t,e){let r=GH(t);return Dse.has(r)||(r=Us),r.getAnimatableNone?r.getAnimatableNone(e):void 0}const Lse=new Set(["auto","none","0"]);function Ese(t,e,r){let a=0,n;for(;a<t.length&&!n;){const i=t[a];typeof i=="string"&&!Lse.has(i)&&jp(i).values.length&&(n=t[a]),a++}if(n&&r)for(const i of e)t[i]=HH(r,n)}class Rse extends pE{constructor(e,r,a,n,i){super(e,r,a,n,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:r,name:a}=this;if(!r||!r.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let d=e[c];if(typeof d=="string"&&(d=d.trim(),sE(d))){const h=PH(d,r.current);h!==void 0&&(e[c]=h),c===e.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!jH.has(a)||e.length!==2)return;const[n,i]=e,o=u3(n),s=u3(i),l=qO(n),u=qO(i);if(l!==u&&ud[a]){this.needsMeasurement=!0;return}if(o!==s)if(n3(o)&&n3(s))for(let c=0;c<e.length;c++){const d=e[c];typeof d=="string"&&(e[c]=parseFloat(d))}else ud[a]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:r}=this,a=[];for(let n=0;n<e.length;n++)(e[n]===null||Tse(e[n]))&&a.push(n);a.length&&Ese(e,a,r)}measureInitialState(){const{element:e,unresolvedKeyframes:r,name:a}=this;if(!e||!e.current)return;a==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ud[a](e.measureViewportBox(),window.getComputedStyle(e.current)),r[0]=this.measuredOrigin;const n=r[r.length-1];n!==void 0&&e.getValue(a,n).jump(n,!1)}measureEndState(){var s;const{element:e,name:r,unresolvedKeyframes:a}=this;if(!e||!e.current)return;const n=e.getValue(r);n&&n.jump(this.measuredOrigin,!1);const i=a.length-1,o=a[i];a[i]=ud[r](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(s=this.removedTransforms)!=null&&s.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Pse=new Set(["opacity","clipPath","filter","transform"]);function UH(t,e,r){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let a=document;const n=(r==null?void 0:r[t])??a.querySelectorAll(t);return n?Array.from(n):[]}return Array.from(t).filter(a=>a!=null)}const $H=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Q1(t){return QG(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:wE}=fH(queueMicrotask,!1),zs={x:!1,y:!1};function WH(){return zs.x||zs.y}function Ise(t){return t==="x"||t==="y"?zs[t]?null:(zs[t]=!0,()=>{zs[t]=!1}):zs.x||zs.y?null:(zs.x=zs.y=!0,()=>{zs.x=zs.y=!1})}function YH(t,e){const r=UH(t),a=new AbortController,n={passive:!0,...e,signal:a.signal};return[r,n,()=>a.abort()]}function jse(t){return!(t.pointerType==="touch"||WH())}function Ose(t,e,r={}){const[a,n,i]=YH(t,r);return a.forEach(o=>{let s=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",m)},d=b=>{u&&(u(b),u=void 0),c()},h=b=>{s=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,d(b))},v=()=>{s=!0,window.addEventListener("pointerup",h,n),window.addEventListener("pointercancel",h,n)},m=b=>{if(b.pointerType!=="touch"){if(s){l=!0;return}d(b)}},x=b=>{if(!jse(b))return;l=!1;const w=e(o,b);typeof w=="function"&&(u=w,o.addEventListener("pointerleave",m,n))};o.addEventListener("pointerenter",x,n),o.addEventListener("pointerdown",v,n)}),i}const XH=(t,e)=>e?t===e?!0:XH(t,e.parentElement):!1,SE=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,zse=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Bse(t){return zse.has(t.tagName)||t.isContentEditable===!0}const Vse=new Set(["INPUT","SELECT","TEXTAREA"]);function Fse(t){return Vse.has(t.tagName)||t.isContentEditable===!0}const J1=new WeakSet;function d3(t){return e=>{e.key==="Enter"&&t(e)}}function _C(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Gse=(t,e)=>{const r=t.currentTarget;if(!r)return;const a=d3(()=>{if(J1.has(r))return;_C(r,"down");const n=d3(()=>{_C(r,"up")}),i=()=>_C(r,"cancel");r.addEventListener("keyup",n,e),r.addEventListener("blur",i,e)});r.addEventListener("keydown",a,e),r.addEventListener("blur",()=>r.removeEventListener("keydown",a),e)};function f3(t){return SE(t)&&!WH()}const h3=new WeakSet;function Hse(t,e,r={}){const[a,n,i]=YH(t,r),o=s=>{const l=s.currentTarget;if(!f3(s)||h3.has(s))return;J1.add(l),r.stopPropagation&&h3.add(s);const u=e(l,s),c=(v,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),J1.has(l)&&J1.delete(l),f3(v)&&typeof u=="function"&&u(v,{success:m})},d=v=>{c(v,l===window||l===document||r.useGlobalTarget||XH(l,v.target))},h=v=>{c(v,!1)};window.addEventListener("pointerup",d,n),window.addEventListener("pointercancel",h,n)};return a.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",o,n),Q1(s)&&(s.addEventListener("focus",u=>Gse(u,n)),!Bse(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function _E(t){return QG(t)&&"ownerSVGElement"in t}const ew=new WeakMap;let ed;const qH=(t,e,r)=>(a,n)=>n&&n[0]?n[0][t+"Size"]:_E(a)&&"getBBox"in a?a.getBBox()[e]:a[r],Use=qH("inline","width","offsetWidth"),$se=qH("block","height","offsetHeight");function Wse({target:t,borderBoxSize:e}){var r;(r=ew.get(t))==null||r.forEach(a=>{a(t,{get width(){return Use(t,e)},get height(){return $se(t,e)}})})}function Yse(t){t.forEach(Wse)}function Xse(){typeof ResizeObserver>"u"||(ed=new ResizeObserver(Yse))}function qse(t,e){ed||Xse();const r=UH(t);return r.forEach(a=>{let n=ew.get(a);n||(n=new Set,ew.set(a,n)),n.add(e),ed==null||ed.observe(a)}),()=>{r.forEach(a=>{const n=ew.get(a);n==null||n.delete(e),n!=null&&n.size||ed==null||ed.unobserve(a)})}}const tw=new Set;let cp;function Zse(){cp=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};tw.forEach(e=>e(t))},window.addEventListener("resize",cp)}function Kse(t){return tw.add(t),cp||Zse(),()=>{tw.delete(t),!tw.size&&typeof cp=="function"&&(window.removeEventListener("resize",cp),cp=void 0)}}function v3(t,e){return typeof t=="function"?Kse(t):qse(t,e)}function Qse(t){return _E(t)&&t.tagName==="svg"}const Jse=[...FH,Nn,Us],ele=t=>Jse.find(VH(t)),p3=()=>({translate:0,scale:1,origin:0,originPoint:0}),dp=()=>({x:p3(),y:p3()}),m3=()=>({min:0,max:0}),$n=()=>({x:m3(),y:m3()}),tle=new WeakMap;function w_(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Q0(t){return typeof t=="string"||Array.isArray(t)}const TE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],CE=["initial",...TE];function S_(t){return w_(t.animate)||CE.some(e=>Q0(t[e]))}function ZH(t){return!!(S_(t)||t.variants)}function rle(t,e,r){for(const a in e){const n=e[a],i=r[a];if(gi(n))t.addValue(a,n);else if(gi(i))t.addValue(a,Op(n,{owner:t}));else if(i!==n)if(t.hasValue(a)){const o=t.getValue(a);o.liveStyle===!0?o.jump(n):o.hasAnimated||o.set(n)}else{const o=t.getStaticValue(a);t.addValue(a,Op(o!==void 0?o:n,{owner:t}))}}for(const a in r)e[a]===void 0&&t.removeValue(a);return e}const rM={current:null},KH={current:!1},ale=typeof window<"u";function nle(){if(KH.current=!0,!!ale)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>rM.current=t.matches;t.addEventListener("change",e),e()}else rM.current=!1}const g3=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Vw={};function QH(t){Vw=t}function ile(){return Vw}class ole{scrapeMotionValuesFromProps(e,r,a){return{}}constructor({parent:e,props:r,presenceContext:a,reducedMotionConfig:n,skipAnimations:i,blockInitialAnimation:o,visualState:s},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=pE,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const v=Xi.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,ba.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=s;this.latestValues=u,this.baseTarget={...u},this.initialValues=r.initial?{...u}:{},this.renderState=c,this.parent=e,this.props=r,this.presenceContext=a,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=S_(r),this.isVariantNode=ZH(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(r,{},this);for(const v in h){const m=h[v];u[v]!==void 0&&gi(m)&&m.set(u[v])}}mount(e){var r,a;if(this.hasBeenMounted)for(const n in this.initialValues)(r=this.values.get(n))==null||r.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,tle.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(KH.current||nle(),this.shouldReduceMotion=rM.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(a=this.parent)==null||a.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),Ld(this.notifyUpdate),Ld(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const r in this.events)this.events[r].clear();for(const r in this.features){const a=this.features[r];a&&(a.unmount(),a.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,r){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),r.accelerate&&Pse.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:s,times:l,ease:u,duration:c}=r.accelerate,d=new LH({element:this.current,name:e,keyframes:s,times:l,ease:u,duration:Po(c)}),h=o(d);this.valueSubscriptions.set(e,()=>{h(),d.cancel()});return}const a=fm.has(e);a&&this.onBindTransform&&this.onBindTransform();const n=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&ba.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,r)),this.valueSubscriptions.set(e,()=>{n(),i&&i(),r.owner&&r.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Vw){const r=Vw[e];if(!r)continue;const{isEnabled:a,Feature:n}=r;if(!this.features[e]&&n&&a(this.props)&&(this.features[e]=new n(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$n()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}update(e,r){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let a=0;a<g3.length;a++){const n=g3[a];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i="on"+n,o=e[i];o&&(this.propEventSubscriptions[n]=this.on(n,o))}this.prevMotionValues=rle(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(e),()=>r.variantChildren.delete(e)}addValue(e,r){const a=this.values.get(e);r!==a&&(a&&this.removeValue(e),this.bindToMotionValue(e,r),this.values.set(e,r),this.latestValues[e]=r.get())}removeValue(e){this.values.delete(e);const r=this.valueSubscriptions.get(e);r&&(r(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let a=this.values.get(e);return a===void 0&&r!==void 0&&(a=Op(r===null?void 0:r,{owner:this}),this.addValue(e,a)),a}readValue(e,r){let a=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return a!=null&&(typeof a=="string"&&(KG(a)||JG(a))?a=parseFloat(a):!ele(a)&&Us.test(r)&&(a=HH(e,r)),this.setBaseTarget(e,gi(a)?a.get():a)),gi(a)?a.get():a}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var i;const{initial:r}=this.props;let a;if(typeof r=="string"||typeof r=="object"){const o=yE(this.props,r,(i=this.presenceContext)==null?void 0:i.custom);o&&(a=o[e])}if(r&&a!==void 0)return a;const n=this.getBaseTargetFromProps(this.props,e);return n!==void 0&&!gi(n)?n:this.initialValues[e]!==void 0&&a===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new nE),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r)}scheduleRenderMicrotask(){wE.render(this.render)}}class JH extends ole{constructor(){super(...arguments),this.KeyframeResolver=Rse}sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){const a=e.style;return a?a[r]:void 0}removeValueFromRenderState(e,{vars:r,style:a}){delete r[e],delete a[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;gi(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class Fd{constructor(e){this.isMounted=!1,this.node=e}update(){}}function eU({top:t,left:e,right:r,bottom:a}){return{x:{min:e,max:r},y:{min:t,max:a}}}function sle({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function lle(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),a=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:a.y,right:a.x}}function TC(t){return t===void 0||t===1}function aM({scale:t,scaleX:e,scaleY:r}){return!TC(t)||!TC(e)||!TC(r)}function Uf(t){return aM(t)||tU(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function tU(t){return y3(t.x)||y3(t.y)}function y3(t){return t&&t!=="0%"}function Fw(t,e,r){const a=t-r,n=e*a;return r+n}function x3(t,e,r,a,n){return n!==void 0&&(t=Fw(t,n,a)),Fw(t,r,a)+e}function nM(t,e=0,r=1,a,n){t.min=x3(t.min,e,r,a,n),t.max=x3(t.max,e,r,a,n)}function rU(t,{x:e,y:r}){nM(t.x,e.translate,e.scale,e.originPoint),nM(t.y,r.translate,r.scale,r.originPoint)}const b3=.999999999999,w3=1.0000000000001;function ule(t,e,r,a=!1){var s;const n=r.length;if(!n)return;e.x=e.y=1;let i,o;for(let l=0;l<n;l++){i=r[l],o=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(a&&i.options.layoutScroll&&i.scroll&&i!==i.root&&hp(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,rU(t,o)),a&&Uf(i.latestValues)&&hp(t,i.latestValues,(s=i.layout)==null?void 0:s.layoutBox))}e.x<w3&&e.x>b3&&(e.x=1),e.y<w3&&e.y>b3&&(e.y=1)}function fp(t,e){t.min=t.min+e,t.max=t.max+e}function S3(t,e,r,a,n=.5){const i=Ua(t.min,t.max,n);nM(t,e,r,i,a)}function _3(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function hp(t,e,r){const a=r??t;S3(t.x,_3(e.x,a.x),e.scaleX,e.scale,e.originX),S3(t.y,_3(e.y,a.y),e.scaleY,e.scale,e.originY)}function aU(t,e){return eU(lle(t.getBoundingClientRect(),e))}function cle(t,e,r){const a=aU(t,r),{scroll:n}=e;return n&&(fp(a.x,n.offset.x),fp(a.y,n.offset.y)),a}const dle={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fle=dm.length;function hle(t,e,r){let a="",n=!0;for(let i=0;i<fle;i++){const o=dm[i],s=t[o];if(s===void 0)continue;let l=!0;if(typeof s=="number")l=s===(o.startsWith("scale")?1:0);else{const u=parseFloat(s);l=o.startsWith("scale")?u===1:u===0}if(!l||r){const u=$H(s,bE[o]);if(!l){n=!1;const c=dle[o]||o;a+=`${c}(${u}) `}r&&(e[o]=u)}}return a=a.trim(),r?a=r(e,n?"":a):n&&(a="none"),a}function kE(t,e,r){const{style:a,vars:n,transformOrigin:i}=t;let o=!1,s=!1;for(const l in e){const u=e[l];if(fm.has(l)){o=!0;continue}else if(vH(l)){n[l]=u;continue}else{const c=$H(u,bE[l]);l.startsWith("origin")?(s=!0,i[l]=c):a[l]=c}}if(e.transform||(o||r?a.transform=hle(e,t.transform,r):a.transform&&(a.transform="none")),s){const{originX:l="50%",originY:u="50%",originZ:c=0}=i;a.transformOrigin=`${l} ${u} ${c}`}}function nU(t,{style:e,vars:r},a,n){const i=t.style;let o;for(o in e)i[o]=e[o];n==null||n.applyProjectionStyles(i,a);for(o in r)i.setProperty(o,r[o])}function T3(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Tg={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(vt.test(t))t=parseFloat(t);else return t;const r=T3(t,e.target.x),a=T3(t,e.target.y);return`${r}% ${a}%`}},vle={correct:(t,{treeScale:e,projectionDelta:r})=>{const a=t,n=Us.parse(t);if(n.length>5)return a;const i=Us.createTransformer(t),o=typeof n[0]!="number"?1:0,s=r.x.scale*e.x,l=r.y.scale*e.y;n[0+o]/=s,n[1+o]/=l;const u=Ua(s,l,.5);return typeof n[2+o]=="number"&&(n[2+o]/=u),typeof n[3+o]=="number"&&(n[3+o]/=u),i(n)}},iM={borderRadius:{...Tg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Tg,borderTopRightRadius:Tg,borderBottomLeftRadius:Tg,borderBottomRightRadius:Tg,boxShadow:vle};function iU(t,{layout:e,layoutId:r}){return fm.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!iM[t]||t==="opacity")}function NE(t,e,r){var o;const a=t.style,n=e==null?void 0:e.style,i={};if(!a)return i;for(const s in a)(gi(a[s])||n&&gi(n[s])||iU(s,t)||((o=r==null?void 0:r.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(i[s]=a[s]);return i}function ple(t){return window.getComputedStyle(t)}class mle extends JH{constructor(){super(...arguments),this.type="html",this.renderInstance=nU}readValueFromInstance(e,r){var a;if(fm.has(r))return(a=this.projection)!=null&&a.isProjecting?$A(r):joe(e,r);{const n=ple(e),i=(vH(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return aU(e,r)}build(e,r,a){kE(e,r,a.transformTemplate)}scrapeMotionValuesFromProps(e,r,a){return NE(e,r,a)}}const gle={offset:"stroke-dashoffset",array:"stroke-dasharray"},yle={offset:"strokeDashoffset",array:"strokeDasharray"};function xle(t,e,r=1,a=0,n=!0){t.pathLength=1;const i=n?gle:yle;t[i.offset]=`${-a}`,t[i.array]=`${e} ${r}`}const ble=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function oU(t,{attrX:e,attrY:r,attrScale:a,pathLength:n,pathSpacing:i=1,pathOffset:o=0,...s},l,u,c){if(kE(t,s,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h}=t;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const v of ble)d[v]!==void 0&&(h[v]=d[v],delete d[v]);e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),a!==void 0&&(d.scale=a),n!==void 0&&xle(d,n,i,o,!1)}const sU=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),lU=t=>typeof t=="string"&&t.toLowerCase()==="svg";function wle(t,e,r,a){nU(t,e,void 0,a);for(const n in e.attrs)t.setAttribute(sU.has(n)?n:xE(n),e.attrs[n])}function uU(t,e,r){const a=NE(t,e,r);for(const n in t)if(gi(t[n])||gi(e[n])){const i=dm.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;a[i]=t[n]}return a}class Sle extends JH{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$n}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(fm.has(r)){const a=GH(r);return a&&a.default||0}return r=sU.has(r)?r:xE(r),e.getAttribute(r)}scrapeMotionValuesFromProps(e,r,a){return uU(e,r,a)}build(e,r,a){oU(e,r,this.isSVGTag,a.transformTemplate,a.style)}renderInstance(e,r,a,n){wle(e,r,a,n)}mount(e){this.isSVGTag=lU(e.tagName),super.mount(e)}}const _le=CE.length;function cU(t){if(!t)return;if(!t.isControllingVariants){const r=t.parent?cU(t.parent)||{}:{};return t.props.initial!==void 0&&(r.initial=t.props.initial),r}const e={};for(let r=0;r<_le;r++){const a=CE[r],n=t.props[a];(Q0(n)||n===!1)&&(e[a]=n)}return e}function dU(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let a=0;a<r;a++)if(e[a]!==t[a])return!1;return!0}const Tle=[...TE].reverse(),Cle=TE.length;function kle(t){return e=>Promise.all(e.map(({animation:r,options:a})=>Sse(t,r,a)))}function Nle(t){let e=kle(t),r=C3(),a=!0,n=!1;const i=u=>(c,d)=>{var v;const h=ph(t,d,u==="exit"?(v=t.presenceContext)==null?void 0:v.custom:void 0);if(h){const{transition:m,transitionEnd:x,...b}=h;c={...c,...b,...x}}return c};function o(u){e=u(t)}function s(u){const{props:c}=t,d=cU(t.parent)||{},h=[],v=new Set;let m={},x=1/0;for(let w=0;w<Cle;w++){const _=Tle[w],T=r[_],C=c[_]!==void 0?c[_]:d[_],k=Q0(C),A=_===u?T.isActive:null;A===!1&&(x=w);let M=C===d[_]&&C!==c[_]&&k;if(M&&(a||n)&&t.manuallyAnimateOnMount&&(M=!1),T.protectedKeys={...m},!T.isActive&&A===null||!C&&!T.prevProp||w_(C)||typeof C=="boolean")continue;if(_==="exit"&&T.isActive&&A!==!0){T.prevResolvedValues&&(m={...m,...T.prevResolvedValues});continue}const L=Ale(T.prevProp,C);let R=L||_===u&&T.isActive&&!M&&k||w>x&&k,P=!1;const j=Array.isArray(C)?C:[C];let V=j.reduce(i(_),{});A===!1&&(V={});const{prevResolvedValues:I={}}=T,F={...I,...V},G=$=>{R=!0,v.has($)&&(P=!0,v.delete($)),T.needsAnimating[$]=!0;const K=t.getValue($);K&&(K.liveStyle=!1)};for(const $ in F){const K=V[$],q=I[$];if(m.hasOwnProperty($))continue;let H=!1;KA(K)&&KA(q)?H=!dU(K,q):H=K!==q,H?K!=null?G($):v.add($):K!==void 0&&v.has($)?G($):T.protectedKeys[$]=!0}T.prevProp=C,T.prevResolvedValues=V,T.isActive&&(m={...m,...V}),(a||n)&&t.blockInitialAnimation&&(R=!1);const O=M&&L;R&&(!O||P)&&h.push(...j.map($=>{const K={type:_};if(typeof $=="string"&&(a||n)&&!O&&t.manuallyAnimateOnMount&&t.parent){const{parent:q}=t,H=ph(q,$);if(q.enteringChildren&&H){const{delayChildren:Z}=H.transition||{};K.delay=RH(q.enteringChildren,t,Z)}}return{animation:$,options:K}}))}if(v.size){const w={};if(typeof c.initial!="boolean"){const _=ph(t,Array.isArray(c.initial)?c.initial[0]:c.initial);_&&_.transition&&(w.transition=_.transition)}v.forEach(_=>{const T=t.getBaseTarget(_),C=t.getValue(_);C&&(C.liveStyle=!0),w[_]=T??null}),h.push({animation:w})}let b=!!h.length;return a&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(b=!1),a=!1,n=!1,b?e(h):Promise.resolve()}function l(u,c){var h;if(r[u].isActive===c)return Promise.resolve();(h=t.variantChildren)==null||h.forEach(v=>{var m;return(m=v.animationState)==null?void 0:m.setActive(u,c)}),r[u].isActive=c;const d=s(u);for(const v in r)r[v].protectedKeys={};return d}return{animateChanges:s,setActive:l,setAnimateFunction:o,getState:()=>r,reset:()=>{r=C3(),n=!0}}}function Ale(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!dU(e,t):!1}function gf(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function C3(){return{animate:gf(!0),whileInView:gf(),whileHover:gf(),whileTap:gf(),whileDrag:gf(),whileFocus:gf(),exit:gf()}}function oM(t,e){t.min=e.min,t.max=e.max}function Ps(t,e){oM(t.x,e.x),oM(t.y,e.y)}function k3(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const fU=1e-4,Mle=1-fU,Dle=1+fU,hU=.01,Lle=0-hU,Ele=0+hU;function qi(t){return t.max-t.min}function Rle(t,e,r){return Math.abs(t-e)<=r}function N3(t,e,r,a=.5){t.origin=a,t.originPoint=Ua(e.min,e.max,t.origin),t.scale=qi(r)/qi(e),t.translate=Ua(r.min,r.max,t.origin)-t.originPoint,(t.scale>=Mle&&t.scale<=Dle||isNaN(t.scale))&&(t.scale=1),(t.translate>=Lle&&t.translate<=Ele||isNaN(t.translate))&&(t.translate=0)}function A0(t,e,r,a){N3(t.x,e.x,r.x,a?a.originX:void 0),N3(t.y,e.y,r.y,a?a.originY:void 0)}function A3(t,e,r){t.min=r.min+e.min,t.max=t.min+qi(e)}function Ple(t,e,r){A3(t.x,e.x,r.x),A3(t.y,e.y,r.y)}function M3(t,e,r){t.min=e.min-r.min,t.max=t.min+qi(e)}function Gw(t,e,r){M3(t.x,e.x,r.x),M3(t.y,e.y,r.y)}function D3(t,e,r,a,n){return t-=e,t=Fw(t,1/r,a),n!==void 0&&(t=Fw(t,1/n,a)),t}function Ile(t,e=0,r=1,a=.5,n,i=t,o=t){if(Hl.test(e)&&(e=parseFloat(e),e=Ua(o.min,o.max,e/100)-o.min),typeof e!="number")return;let s=Ua(i.min,i.max,a);t===i&&(s-=e),t.min=D3(t.min,e,r,s,n),t.max=D3(t.max,e,r,s,n)}function L3(t,e,[r,a,n],i,o){Ile(t,e[r],e[a],e[n],e.scale,i,o)}const jle=["x","scaleX","originX"],Ole=["y","scaleY","originY"];function E3(t,e,r,a){L3(t.x,e,jle,r?r.x:void 0,a?a.x:void 0),L3(t.y,e,Ole,r?r.y:void 0,a?a.y:void 0)}function R3(t){return t.translate===0&&t.scale===1}function vU(t){return R3(t.x)&&R3(t.y)}function P3(t,e){return t.min===e.min&&t.max===e.max}function zle(t,e){return P3(t.x,e.x)&&P3(t.y,e.y)}function I3(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function pU(t,e){return I3(t.x,e.x)&&I3(t.y,e.y)}function j3(t){return qi(t.x)/qi(t.y)}function O3(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Ml(t){return[t("x"),t("y")]}function Ble(t,e,r){let a="";const n=t.x.translate/e.x,i=t.y.translate/e.y,o=(r==null?void 0:r.z)||0;if((n||i||o)&&(a=`translate3d(${n}px, ${i}px, ${o}px) `),(e.x!==1||e.y!==1)&&(a+=`scale(${1/e.x}, ${1/e.y}) `),r){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:h,skewX:v,skewY:m}=r;u&&(a=`perspective(${u}px) ${a}`),c&&(a+=`rotate(${c}deg) `),d&&(a+=`rotateX(${d}deg) `),h&&(a+=`rotateY(${h}deg) `),v&&(a+=`skewX(${v}deg) `),m&&(a+=`skewY(${m}deg) `)}const s=t.x.scale*e.x,l=t.y.scale*e.y;return(s!==1||l!==1)&&(a+=`scale(${s}, ${l})`),a||"none"}const mU=["TopLeft","TopRight","BottomLeft","BottomRight"],Vle=mU.length,z3=t=>typeof t=="string"?parseFloat(t):t,B3=t=>typeof t=="number"||vt.test(t);function Fle(t,e,r,a,n,i){n?(t.opacity=Ua(0,r.opacity??1,Gle(a)),t.opacityExit=Ua(e.opacity??1,0,Hle(a))):i&&(t.opacity=Ua(e.opacity??1,r.opacity??1,a));for(let o=0;o<Vle;o++){const s=`border${mU[o]}Radius`;let l=V3(e,s),u=V3(r,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||B3(l)===B3(u)?(t[s]=Math.max(Ua(z3(l),z3(u),a),0),(Hl.test(u)||Hl.test(l))&&(t[s]+="%")):t[s]=u}(e.rotate||r.rotate)&&(t.rotate=Ua(e.rotate||0,r.rotate||0,a))}function V3(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Gle=gU(0,.5,lH),Hle=gU(.5,.95,ms);function gU(t,e,r){return a=>a<t?0:a>e?1:r(Z0(t,e,a))}function Ule(t,e,r){const a=gi(t)?t:Op(t);return a.start(gE("",a,e,r)),a.animation}function J0(t,e,r,a={passive:!0}){return t.addEventListener(e,r,a),()=>t.removeEventListener(e,r)}const $le=(t,e)=>t.depth-e.depth;class Wle{constructor(){this.children=[],this.isDirty=!1}add(e){rE(this.children,e),this.isDirty=!0}remove(e){jw(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort($le),this.isDirty=!1,this.children.forEach(e)}}function Yle(t,e){const r=Xi.now(),a=({timestamp:n})=>{const i=n-r;i>=e&&(Ld(a),t(i-e))};return ba.setup(a,!0),()=>Ld(a)}function rw(t){return gi(t)?t.get():t}class Xle{constructor(){this.members=[]}add(e){rE(this.members,e);for(let r=this.members.length-1;r>=0;r--){const a=this.members[r];if(a===e||a===this.lead||a===this.prevLead)continue;const n=a.instance;(!n||n.isConnected===!1)&&!a.snapshot&&(jw(this.members,a),a.unmount())}e.scheduleRender()}remove(e){if(jw(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){var r;for(let a=this.members.indexOf(e)-1;a>=0;a--){const n=this.members[a];if(n.isPresent!==!1&&((r=n.instance)==null?void 0:r.isConnected)!==!1)return this.promote(n),!0}return!1}promote(e,r){var n;const a=this.lead;if(e!==a&&(this.prevLead=a,this.lead=e,e.show(),a)){a.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=a.options,{layoutDependency:o}=e.options;(i===void 0||i!==o)&&(e.resumeFrom=a,r&&(a.preserveOpacity=!0),a.snapshot&&(e.snapshot=a.snapshot,e.snapshot.latestValues=a.animationValues||a.latestValues),(n=e.root)!=null&&n.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,a,n,i,o;(a=(r=e.options).onExitComplete)==null||a.call(r),(o=(n=e.resumingFrom)==null?void 0:(i=n.options).onExitComplete)==null||o.call(i)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const aw={hasAnimatedSinceResize:!0,hasEverUpdated:!1},CC=["","X","Y","Z"],qle=1e3;let Zle=0;function kC(t,e,r,a){const{latestValues:n}=e;n[t]&&(r[t]=n[t],e.setStaticValue(t,0),a&&(a[t]=0))}function yU(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const r=zH(e);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:n,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",ba,!(n||i))}const{parent:a}=t;a&&!a.hasCheckedOptimisedAppear&&yU(a)}function xU({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:a,resetTransform:n}){return class{constructor(o={},s=e==null?void 0:e()){this.id=Zle++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Jle),this.nodes.forEach(aue),this.nodes.forEach(nue),this.nodes.forEach(eue)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Wle)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new nE),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){const l=this.eventHandlers.get(o);l&&l.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=_E(o)&&!Qse(o),this.instance=o;const{layoutId:s,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),t){let c,d=0;const h=()=>this.root.updateBlockedByResize=!1;ba.read(()=>{d=window.innerWidth}),t(o,()=>{const v=window.innerWidth;v!==d&&(d=v,this.root.updateBlockedByResize=!0,c&&c(),c=Yle(h,250),aw.hasAnimatedSinceResize&&(aw.hasAnimatedSinceResize=!1,this.nodes.forEach(H3)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&u&&(s||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||uue,{onLayoutAnimationStart:x,onLayoutAnimationComplete:b}=u.getProps(),w=!this.targetLayout||!pU(this.targetLayout,v),_=!d&&h;if(this.options.layoutRoot||this.resumeFrom||_||d&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...mE(m,"layout"),onPlay:x,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(c,_)}else d||H3(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ld(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(iue),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&yU(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(F3);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(G3);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(rue),this.nodes.forEach(Kle),this.nodes.forEach(Qle)):this.nodes.forEach(G3),this.clearAllSnapshots();const s=Xi.now();vi.delta=Xl(0,1e3/60,s-vi.timestamp),vi.timestamp=s,vi.isProcessing=!0,gC.update.process(vi),gC.preRender.process(vi),gC.render.process(vi),vi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,wE.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tue),this.sharedNodes.forEach(oue)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ba.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ba.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!qi(this.snapshot.measuredBox.x)&&!qi(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=$n(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s&&this.instance){const l=a(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!n)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!vU(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(s||Uf(this.latestValues)||c)&&(n(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return o&&(l=this.removeTransform(l)),cue(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return $n();const s=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(due))){const{scroll:c}=this.root;c&&(fp(s.x,c.offset.x),fp(s.y,c.offset.y))}return s}removeElementScroll(o){var l;const s=$n();if(Ps(s,o),(l=this.scroll)!=null&&l.wasRoot)return s;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:h}=c;c!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&Ps(s,o),fp(s.x,d.offset.x),fp(s.y,d.offset.y))}return s}applyTransform(o,s=!1){var u,c;const l=$n();Ps(l,o);for(let d=0;d<this.path.length;d++){const h=this.path[d];!s&&h.options.layoutScroll&&h.scroll&&h!==h.root&&hp(l,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),Uf(h.latestValues)&&hp(l,h.latestValues,(u=h.layout)==null?void 0:u.layoutBox)}return Uf(this.latestValues)&&hp(l,this.latestValues,(c=this.layout)==null?void 0:c.layoutBox),l}removeTransform(o){var l;const s=$n();Ps(s,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!Uf(c.latestValues))continue;let d;c.instance&&(aM(c.latestValues)&&c.updateSnapshot(),d=$n(),Ps(d,c.measurePageBox())),E3(s,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,d)}return Uf(this.latestValues)&&E3(s,this.latestValues),s}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==vi.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var v;const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!this.layout||!(c||d))return;this.resolvedRelativeTargetAt=vi.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$n(),this.targetWithTransforms=$n()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ple(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ps(this.target,this.layout.layoutBox),rU(this.target,this.targetDelta)):Ps(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||aM(this.parent.latestValues)||tU(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,s,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$n(),this.relativeTargetOrigin=$n(),Gw(this.relativeTargetOrigin,s,l),Ps(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const o=this.getLead(),s=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===vi.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;Ps(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;ule(this.layoutCorrected,this.treeScale,this.path,s),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=$n());const{target:v}=o;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(k3(this.prevProjectionDelta.x,this.projectionDelta.x),k3(this.prevProjectionDelta.y,this.projectionDelta.y)),A0(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!O3(this.projectionDelta.x,this.prevProjectionDelta.x)||!O3(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var s;if((s=this.options.visualElement)==null||s.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=dp(),this.projectionDelta=dp(),this.projectionDeltaWithTransform=dp()}setAnimationOrigin(o,s=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=dp();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const h=$n(),v=l?l.source:void 0,m=this.layout?this.layout.source:void 0,x=v!==m,b=this.getStack(),w=!b||b.members.length<=1,_=!!(x&&!w&&this.options.crossfade===!0&&!this.path.some(lue));this.animationProgress=0;let T;this.mixTargetDelta=C=>{const k=C/1e3;U3(d.x,o.x,k),U3(d.y,o.y,k),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gw(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sue(this.relativeTarget,this.relativeTargetOrigin,h,k),T&&zle(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=$n()),Ps(T,this.relativeTarget)),x&&(this.animationValues=c,Fle(c,u,this.latestValues,k,_,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var s,l,u;this.notifyListeners("animationStart"),(s=this.currentAnimation)==null||s.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Ld(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ba.update(()=>{aw.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Op(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ule(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(qle),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:c}=o;if(!(!s||!l||!u)){if(this!==o&&this.layout&&u&&bU(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||$n();const d=qi(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=qi(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Ps(s,l),hp(s,c),A0(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Xle),this.sharedNodes.get(o).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())==null?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())==null?void 0:s.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const u={};l.z&&kC("z",o,u,this.animationValues);for(let c=0;c<CC.length;c++)kC(`rotate${CC[c]}`,o,u,this.animationValues),kC(`skew${CC[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=rw(s==null?void 0:s.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=rw(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!Uf(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=Ble(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:h,y:v}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${v.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in iM){if(c[m]===void 0)continue;const{correct:x,applyTo:b,isCSSVariable:w}=iM[m],_=d==="none"?c[m]:x(c[m],u);if(b){const T=b.length;for(let C=0;C<T;C++)o[b[C]]=_}else w?this.options.visualElement.renderState.vars[m]=_:o[m]=_}this.options.layoutId&&(o.pointerEvents=u===this?rw(s==null?void 0:s.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var s;return(s=o.currentAnimation)==null?void 0:s.stop()}),this.root.nodes.forEach(F3),this.root.sharedNodes.clear()}}}function Kle(t){t.updateLayout()}function Qle(t){var r;const e=((r=t.resumeFrom)==null?void 0:r.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:a,measuredBox:n}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;if(i==="size")Ml(d=>{const h=o?e.measuredBox[d]:e.layoutBox[d],v=qi(h);h.min=a[d].min,h.max=h.min+v});else if(i==="x"||i==="y"){const d=i==="x"?"y":"x";oM(o?e.measuredBox[d]:e.layoutBox[d],a[d])}else bU(i,e.layoutBox,a)&&Ml(d=>{const h=o?e.measuredBox[d]:e.layoutBox[d],v=qi(a[d]);h.max=h.min+v,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+v)});const s=dp();A0(s,a,e.layoutBox);const l=dp();o?A0(l,t.applyTransform(n,!0),e.measuredBox):A0(l,a,e.layoutBox);const u=!vU(s);let c=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:v}=d;if(h&&v){const m=$n();Gw(m,e.layoutBox,h.layoutBox);const x=$n();Gw(x,a,v.layoutBox),pU(m,x)||(c=!0),d.options.layoutRoot&&(t.relativeTarget=x,t.relativeTargetOrigin=m,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:a,snapshot:e,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:a}=t.options;a&&a()}t.options.transition=void 0}function Jle(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function eue(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function tue(t){t.clearSnapshot()}function F3(t){t.clearMeasurements()}function G3(t){t.isLayoutDirty=!1}function rue(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function H3(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function aue(t){t.resolveTargetDelta()}function nue(t){t.calcProjection()}function iue(t){t.resetSkewAndRotation()}function oue(t){t.removeLeadSnapshot()}function U3(t,e,r){t.translate=Ua(e.translate,0,r),t.scale=Ua(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function $3(t,e,r,a){t.min=Ua(e.min,r.min,a),t.max=Ua(e.max,r.max,a)}function sue(t,e,r,a){$3(t.x,e.x,r.x,a),$3(t.y,e.y,r.y,a)}function lue(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const uue={duration:.45,ease:[.4,0,.1,1]},W3=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Y3=W3("applewebkit/")&&!W3("chrome/")?Math.round:ms;function X3(t){t.min=Y3(t.min),t.max=Y3(t.max)}function cue(t){X3(t.x),X3(t.y)}function bU(t,e,r){return t==="position"||t==="preserve-aspect"&&!Rle(j3(e),j3(r),.2)}function due(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const fue=xU({attachResizeListener:(t,e)=>J0(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),NC={current:void 0},wU=xU({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!NC.current){const t=new fue({});t.mount(window),t.setOptions({layoutScroll:!0}),NC.current=t}return NC.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),AE=E.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function q3(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function hue(...t){return e=>{let r=!1;const a=t.map(n=>{const i=q3(n,e);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let n=0;n<a.length;n++){const i=a[n];typeof i=="function"?i():q3(t[n],null)}}}}function vue(...t){return E.useCallback(hue(...t),t)}class pue extends E.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(Q1(r)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const a=r.offsetParent,n=Q1(a)&&a.offsetWidth||0,i=Q1(a)&&a.offsetHeight||0,o=getComputedStyle(r),s=this.props.sizeRef.current;s.height=parseFloat(o.height),s.width=parseFloat(o.width),s.top=r.offsetTop,s.left=r.offsetLeft,s.right=n-s.width-s.left,s.bottom=i-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function mue({children:t,isPresent:e,anchorX:r,anchorY:a,root:n,pop:i}){var h;const o=E.useId(),s=E.useRef(null),l=E.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=E.useContext(AE),c=((h=t.props)==null?void 0:h.ref)??(t==null?void 0:t.ref),d=vue(s,c);return E.useInsertionEffect(()=>{const{width:v,height:m,top:x,left:b,right:w,bottom:_}=l.current;if(e||i===!1||!s.current||!v||!m)return;const T=r==="left"?`left: ${b}`:`right: ${w}`,C=a==="bottom"?`bottom: ${_}`:`top: ${x}`;s.current.dataset.motionPopId=o;const k=document.createElement("style");u&&(k.nonce=u);const A=n??document.head;return A.appendChild(k),k.sheet&&k.sheet.insertRule(`
[data-motion-pop-id="${o}"] {
position: absolute !important;
width: ${v}px !important;
height: ${m}px !important;
${T}px !important;
${C}px !important;
}
`),()=>{var M;(M=s.current)==null||M.removeAttribute("data-motion-pop-id"),A.contains(k)&&A.removeChild(k)}},[e]),g.jsx(pue,{isPresent:e,childRef:s,sizeRef:l,pop:i,children:i===!1?t:E.cloneElement(t,{ref:d})})}const gue=({children:t,initial:e,isPresent:r,onExitComplete:a,custom:n,presenceAffectsLayout:i,mode:o,anchorX:s,anchorY:l,root:u})=>{const c=tE(yue),d=E.useId();let h=!0,v=E.useMemo(()=>(h=!1,{id:d,initial:e,isPresent:r,custom:n,onExitComplete:m=>{c.set(m,!0);for(const x of c.values())if(!x)return;a&&a()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[r,c,a]);return i&&h&&(v={...v}),E.useMemo(()=>{c.forEach((m,x)=>c.set(x,!1))},[r]),E.useEffect(()=>{!r&&!c.size&&a&&a()},[r]),t=g.jsx(mue,{pop:o==="popLayout",isPresent:r,anchorX:s,anchorY:l,root:u,children:t}),g.jsx(b_.Provider,{value:v,children:t})};function yue(){return new Map}function SU(t=!0){const e=E.useContext(b_);if(e===null)return[!0,null];const{isPresent:r,onExitComplete:a,register:n}=e,i=E.useId();E.useEffect(()=>{if(t)return n(i)},[t]);const o=E.useCallback(()=>t&&a&&a(i),[i,a,t]);return!r&&a?[!1,o]:[!0]}const bb=t=>t.key||"";function Z3(t){const e=[];return E.Children.forEach(t,r=>{E.isValidElement(r)&&e.push(r)}),e}const co=({children:t,custom:e,initial:r=!0,onExitComplete:a,presenceAffectsLayout:n=!0,mode:i="sync",propagate:o=!1,anchorX:s="left",anchorY:l="top",root:u})=>{const[c,d]=SU(o),h=E.useMemo(()=>Z3(t),[t]),v=o&&!c?[]:h.map(bb),m=E.useRef(!0),x=E.useRef(h),b=tE(()=>new Map),w=E.useRef(new Set),[_,T]=E.useState(h),[C,k]=E.useState(h);ZG(()=>{m.current=!1,x.current=h;for(let L=0;L<C.length;L++){const R=bb(C[L]);v.includes(R)?(b.delete(R),w.current.delete(R)):b.get(R)!==!0&&b.set(R,!1)}},[C,v.length,v.join("-")]);const A=[];if(h!==_){let L=[...h];for(let R=0;R<C.length;R++){const P=C[R],j=bb(P);v.includes(j)||(L.splice(R,0,P),A.push(P))}return i==="wait"&&A.length&&(L=A),k(Z3(L)),T(h),null}const{forceRender:M}=E.useContext(eE);return g.jsx(g.Fragment,{children:C.map(L=>{const R=bb(L),P=o&&!c?!1:h===C||v.includes(R),j=()=>{if(w.current.has(R))return;if(b.has(R))w.current.add(R),b.set(R,!0);else return;let V=!0;b.forEach(I=>{I||(V=!1)}),V&&(M==null||M(),k(x.current),o&&(d==null||d()),a&&a())};return g.jsx(gue,{isPresent:P,initial:!m.current||r?void 0:!1,custom:e,presenceAffectsLayout:n,mode:i,root:u,onExitComplete:P?void 0:j,anchorX:s,anchorY:l,children:L},R)})})},_U=E.createContext({strict:!1}),K3={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Q3=!1;function xue(){if(Q3)return;const t={};for(const e in K3)t[e]={isEnabled:r=>K3[e].some(a=>!!r[a])};QH(t),Q3=!0}function TU(){return xue(),ile()}function bue(t){const e=TU();for(const r in t)e[r]={...e[r],...t[r]};QH(e)}const wue=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Hw(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||wue.has(t)}let CU=t=>!Hw(t);function Sue(t){typeof t=="function"&&(CU=e=>e.startsWith("on")?!Hw(e):t(e))}try{Sue(require("@emotion/is-prop-valid").default)}catch{}function _ue(t,e,r){const a={};for(const n in t)n==="values"&&typeof t.values=="object"||gi(t[n])||(CU(n)||r===!0&&Hw(n)||!e&&!Hw(n)||t.draggable&&n.startsWith("onDrag"))&&(a[n]=t[n]);return a}const __=E.createContext({});function Tue(t,e){if(S_(t)){const{initial:r,animate:a}=t;return{initial:r===!1||Q0(r)?r:void 0,animate:Q0(a)?a:void 0}}return t.inherit!==!1?e:{}}function Cue(t){const{initial:e,animate:r}=Tue(t,E.useContext(__));return E.useMemo(()=>({initial:e,animate:r}),[J3(e),J3(r)])}function J3(t){return Array.isArray(t)?t.join(" "):t}const ME=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function kU(t,e,r){for(const a in e)!gi(e[a])&&!iU(a,r)&&(t[a]=e[a])}function kue({transformTemplate:t},e){return E.useMemo(()=>{const r=ME();return kE(r,e,t),Object.assign({},r.vars,r.style)},[e])}function Nue(t,e){const r=t.style||{},a={};return kU(a,r,t),Object.assign(a,kue(t,e)),a}function Aue(t,e){const r={},a=Nue(t,e);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=a,r}const NU=()=>({...ME(),attrs:{}});function Mue(t,e,r,a){const n=E.useMemo(()=>{const i=NU();return oU(i,e,lU(a),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};kU(i,t.style,t),n.style={...i,...n.style}}return n}const Due=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function DE(t){return typeof t!="string"||t.includes("-")?!1:!!(Due.indexOf(t)>-1||/[A-Z]/u.test(t))}function Lue(t,e,r,{latestValues:a},n,i=!1,o){const l=(o??DE(t)?Mue:Aue)(e,a,n,t),u=_ue(e,typeof t=="string",i),c=t!==E.Fragment?{...u,...l,ref:r}:{},{children:d}=e,h=E.useMemo(()=>gi(d)?d.get():d,[d]);return E.createElement(t,{...c,children:h})}function Eue({scrapeMotionValuesFromProps:t,createRenderState:e},r,a,n){return{latestValues:Rue(r,a,n,t),renderState:e()}}function Rue(t,e,r,a){const n={},i=a(t,{});for(const h in i)n[h]=rw(i[h]);let{initial:o,animate:s}=t;const l=S_(t),u=ZH(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),s===void 0&&(s=e.animate));let c=r?r.initial===!1:!1;c=c||o===!1;const d=c?s:o;if(d&&typeof d!="boolean"&&!w_(d)){const h=Array.isArray(d)?d:[d];for(let v=0;v<h.length;v++){const m=yE(t,h[v]);if(m){const{transitionEnd:x,transition:b,...w}=m;for(const _ in w){let T=w[_];if(Array.isArray(T)){const C=c?T.length-1:0;T=T[C]}T!==null&&(n[_]=T)}for(const _ in x)n[_]=x[_]}}}return n}const AU=t=>(e,r)=>{const a=E.useContext(__),n=E.useContext(b_),i=()=>Eue(t,e,a,n);return r?i():tE(i)},Pue=AU({scrapeMotionValuesFromProps:NE,createRenderState:ME}),Iue=AU({scrapeMotionValuesFromProps:uU,createRenderState:NU}),jue=Symbol.for("motionComponentSymbol");function Oue(t,e,r){const a=E.useRef(r);E.useInsertionEffect(()=>{a.current=r});const n=E.useRef(null);return E.useCallback(i=>{var s;i&&((s=t.onMount)==null||s.call(t,i));const o=a.current;if(typeof o=="function")if(i){const l=o(i);typeof l=="function"&&(n.current=l)}else n.current?(n.current(),n.current=null):o(i);else o&&(o.current=i);e&&(i?e.mount(i):e.unmount())},[e])}const MU=E.createContext({});function rp(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function zue(t,e,r,a,n,i){var T,C;const{visualElement:o}=E.useContext(__),s=E.useContext(_U),l=E.useContext(b_),u=E.useContext(AE),c=u.reducedMotion,d=u.skipAnimations,h=E.useRef(null),v=E.useRef(!1);a=a||s.renderer,!h.current&&a&&(h.current=a(t,{visualState:e,parent:o,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:d,isSVG:i}),v.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,x=E.useContext(MU);m&&!m.projection&&n&&(m.type==="html"||m.type==="svg")&&Bue(h.current,r,n,x);const b=E.useRef(!1);E.useInsertionEffect(()=>{m&&b.current&&m.update(r,l)});const w=r[OH],_=E.useRef(!!w&&typeof window<"u"&&!((T=window.MotionHandoffIsComplete)!=null&&T.call(window,w))&&((C=window.MotionHasOptimisedAnimation)==null?void 0:C.call(window,w)));return ZG(()=>{v.current=!0,m&&(b.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),_.current&&m.animationState&&m.animationState.animateChanges())}),E.useEffect(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)==null||k.call(window,w)}),_.current=!1),m.enteringChildren=void 0)}),m}function Bue(t,e,r,a){const{layoutId:n,layout:i,drag:o,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new r(t.latestValues,e["data-framer-portal-id"]?void 0:DU(t.parent)),t.projection.setOptions({layoutId:n,layout:i,alwaysMeasureLayout:!!o||s&&rp(s),visualElement:t,animationType:typeof i=="string"?i:"both",initialPromotionConfig:a,crossfade:c,layoutScroll:l,layoutRoot:u})}function DU(t){if(t)return t.options.allowProjection!==!1?t.projection:DU(t.parent)}function AC(t,{forwardMotionProps:e=!1,type:r}={},a,n){a&&bue(a);const i=r?r==="svg":DE(t),o=i?Iue:Pue;function s(u,c){let d;const h={...E.useContext(AE),...u,layoutId:Vue(u)},{isStatic:v}=h,m=Cue(u),x=o(u,v);if(!v&&typeof window<"u"){Fue();const b=Gue(h);d=b.MeasureLayout,m.visualElement=zue(t,x,h,n,b.ProjectionNode,i)}return g.jsxs(__.Provider,{value:m,children:[d&&m.visualElement?g.jsx(d,{visualElement:m.visualElement,...h}):null,Lue(t,u,Oue(x,m.visualElement,c),x,v,e,i)]})}s.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=E.forwardRef(s);return l[jue]=t,l}function Vue({layoutId:t}){const e=E.useContext(eE).id;return e&&t!==void 0?e+"-"+t:t}function Fue(t,e){E.useContext(_U).strict}function Gue(t){const e=TU(),{drag:r,layout:a}=e;if(!r&&!a)return{};const n={...r,...a};return{MeasureLayout:r!=null&&r.isEnabled(t)||a!=null&&a.isEnabled(t)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function Hue(t,e){if(typeof Proxy>"u")return AC;const r=new Map,a=(i,o)=>AC(i,o,t,e),n=(i,o)=>a(i,o);return new Proxy(n,{get:(i,o)=>o==="create"?a:(r.has(o)||r.set(o,AC(o,void 0,t,e)),r.get(o))})}const Uue=(t,e)=>e.isSVG??DE(t)?new Sle(e):new mle(e,{allowProjection:t!==E.Fragment});class $ue extends Fd{constructor(e){super(e),e.animationState||(e.animationState=Nle(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();w_(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:r}=this.node.prevProps||{};e!==r&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let Wue=0;class Yue extends Fd{constructor(){super(...arguments),this.id=Wue++,this.isExitComplete=!1}update(){var i;if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:r}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===a)return;if(e&&a===!1){if(this.isExitComplete){const{initial:o,custom:s}=this.node.getProps();if(typeof o=="string"){const l=ph(this.node,o,s);if(l){const{transition:u,transitionEnd:c,...d}=l;for(const h in d)(i=this.node.getValue(h))==null||i.jump(d[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const n=this.node.animationState.setActive("exit",!e);r&&!e&&n.then(()=>{this.isExitComplete=!0,r(this.id)})}mount(){const{register:e,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Xue={animation:{Feature:$ue},exit:{Feature:Yue}};function Hy(t){return{point:{x:t.pageX,y:t.pageY}}}const que=t=>e=>SE(e)&&t(e,Hy(e));function M0(t,e,r,a){return J0(t,e,que(r),a)}const LU=({current:t})=>t?t.ownerDocument.defaultView:null,e4=(t,e)=>Math.abs(t-e);function Zue(t,e){const r=e4(t.x,e.x),a=e4(t.y,e.y);return Math.sqrt(r**2+a**2)}const t4=new Set(["auto","scroll"]);class EU{constructor(e,r,{transformPagePoint:a,contextWindow:n=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=v=>{this.handleScroll(v.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=wb(this.lastRawMoveEventInfo,this.transformPagePoint));const v=MC(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,x=Zue(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!x)return;const{point:b}=v,{timestamp:w}=vi;this.history.push({...b,timestamp:w});const{onStart:_,onMove:T}=this.handlers;m||(_&&_(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,v)},this.handlePointerMove=(v,m)=>{this.lastMoveEvent=v,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=wb(m,this.transformPagePoint),ba.update(this.updatePoint,!0)},this.handlePointerUp=(v,m)=>{this.end();const{onEnd:x,onSessionEnd:b,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=MC(v.type==="pointercancel"?this.lastMoveEventInfo:wb(m,this.transformPagePoint),this.history);this.startEvent&&x&&x(v,_),b&&b(v,_)},!SE(e))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=a,this.distanceThreshold=o,this.contextWindow=n||window;const l=Hy(e),u=wb(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=vi;this.history=[{...c,timestamp:d}];const{onSessionStart:h}=r;h&&h(e,MC(u,this.history)),this.removeListeners=Vy(M0(this.contextWindow,"pointermove",this.handlePointerMove),M0(this.contextWindow,"pointerup",this.handlePointerUp),M0(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(e){let r=e.parentElement;for(;r;){const a=getComputedStyle(r);(t4.has(a.overflowX)||t4.has(a.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const r=this.scrollPositions.get(e);if(!r)return;const a=e===window,n=a?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:n.x-r.x,y:n.y-r.y};i.x===0&&i.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,n),ba.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ld(this.updatePoint)}}function wb(t,e){return e?{point:e(t.point)}:t}function r4(t,e){return{x:t.x-e.x,y:t.y-e.y}}function MC({point:t},e){return{point:t,delta:r4(t,RU(e)),offset:r4(t,Kue(e)),velocity:Que(e,.1)}}function Kue(t){return t[0]}function RU(t){return t[t.length-1]}function Que(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,a=null;const n=RU(t);for(;r>=0&&(a=t[r],!(n.timestamp-a.timestamp>Po(e)));)r--;if(!a)return{x:0,y:0};a===t[0]&&t.length>2&&n.timestamp-a.timestamp>Po(e)*2&&(a=t[1]);const i=hs(n.timestamp-a.timestamp);if(i===0)return{x:0,y:0};const o={x:(n.x-a.x)/i,y:(n.y-a.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Jue(t,{min:e,max:r},a){return e!==void 0&&t<e?t=a?Ua(e,t,a.min):Math.max(t,e):r!==void 0&&t>r&&(t=a?Ua(r,t,a.max):Math.min(t,r)),t}function a4(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function ece(t,{top:e,left:r,bottom:a,right:n}){return{x:a4(t.x,r,n),y:a4(t.y,e,a)}}function n4(t,e){let r=e.min-t.min,a=e.max-t.max;return e.max-e.min<t.max-t.min&&([r,a]=[a,r]),{min:r,max:a}}function tce(t,e){return{x:n4(t.x,e.x),y:n4(t.y,e.y)}}function rce(t,e){let r=.5;const a=qi(t),n=qi(e);return n>a?r=Z0(e.min,e.max-a,t.min):a>n&&(r=Z0(t.min,t.max-n,e.min)),Xl(0,1,r)}function ace(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const sM=.35;function nce(t=sM){return t===!1?t=0:t===!0&&(t=sM),{x:i4(t,"left","right"),y:i4(t,"top","bottom")}}function i4(t,e,r){return{min:o4(t,e),max:o4(t,r)}}function o4(t,e){return typeof t=="number"?t:t[e]||0}const ice=new WeakMap;class oce{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$n(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:r=!1,distanceThreshold:a}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=d=>{r&&this.snapToCursor(Hy(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:v,dragPropagation:m,onDragStart:x}=this.getProps();if(v&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ise(v),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ml(w=>{let _=this.getAxisMotionValue(w).get()||0;if(Hl.test(_)){const{projection:T}=this.visualElement;if(T&&T.layout){const C=T.layout.layoutBox[w];C&&(_=qi(C)*(parseFloat(_)/100))}}this.originPoint[w]=_}),x&&ba.update(()=>x(d,h),!1,!0),QA(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},s=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:v,dragDirectionLock:m,onDirectionLock:x,onDrag:b}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:w}=h;if(m&&this.currentDirection===null){this.currentDirection=lce(w),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",h.point,w),this.updateAxis("y",h.point,w),this.visualElement.render(),b&&ba.update(()=>b(d,h),!1,!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new EU(e,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:a,contextWindow:LU(this.visualElement),element:this.visualElement.current})}stop(e,r){const a=e||this.latestPointerEvent,n=r||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!n||!a)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&ba.postRender(()=>s(a,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:r}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:a}=this.getProps();!a&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,r,a){const{drag:n}=this.getProps();if(!a||!Sb(e,n,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+a[e];this.constraints&&this.constraints[e]&&(o=Jue(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:e,dragElastic:r}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,n=this.constraints;e&&rp(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&a?this.constraints=ece(a.layoutBox,e):this.constraints=!1,this.elastic=nce(r),n!==this.constraints&&!rp(e)&&a&&this.constraints&&!this.hasMutatedConstraints&&Ml(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=ace(a.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!rp(e))return!1;const a=e.current,{projection:n}=this.visualElement;if(!n||!n.layout)return!1;const i=cle(a,n.root,this.visualElement.getTransformPagePoint());let o=tce(n.layout.layoutBox,i);if(r){const s=r(sle(o));this.hasMutatedConstraints=!!s,s&&(o=eU(s))}return o}startAnimation(e){const{drag:r,dragMomentum:a,dragElastic:n,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Ml(c=>{if(!Sb(c,r,this.currentDirection))return;let d=l&&l[c]||{};(o===!0||o===c)&&(d={min:0,max:0});const h=n?200:1e6,v=n?40:1e7,m={type:"inertia",velocity:a?e[c]:0,bounceStiffness:h,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(s)}startAxisValueAnimation(e,r){const a=this.getAxisMotionValue(e);return QA(this.visualElement,e),a.start(gE(e,a,0,r,this.visualElement,!1))}stopAnimation(){Ml(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const r=`_drag${e.toUpperCase()}`,a=this.visualElement.getProps(),n=a[r];return n||this.visualElement.getValue(e,(a.initial?a.initial[e]:void 0)||0)}snapToCursor(e){Ml(r=>{const{drag:a}=this.getProps();if(!Sb(r,a,this.currentDirection))return;const{projection:n}=this.visualElement,i=this.getAxisMotionValue(r);if(n&&n.layout){const{min:o,max:s}=n.layout.layoutBox[r],l=i.get()||0;i.set(e[r]-Ua(o,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:r}=this.getProps(),{projection:a}=this.visualElement;if(!rp(r)||!a||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};Ml(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const l=s.get();n[o]=rce({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ml(o=>{if(!Sb(o,e,null))return;const s=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];s.set(Ua(l,u,n[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;ice.set(this.visualElement,this);const e=this.visualElement.current,r=M0(e,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),h=u.target,v=h!==e&&Fse(h);c&&d&&!v&&this.start(u)});let a;const n=()=>{const{dragConstraints:u}=this.getProps();rp(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),a||(a=sce(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ba.read(n);const s=J0(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ml(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[d].translate))}),this.visualElement.render())}));return()=>{s(),r(),o(),l&&l(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:a=!1,dragPropagation:n=!1,dragConstraints:i=!1,dragElastic:o=sM,dragMomentum:s=!0}=e;return{...e,drag:r,dragDirectionLock:a,dragPropagation:n,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function s4(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function sce(t,e,r){const a=v3(t,s4(r)),n=v3(e,s4(r));return()=>{a(),n()}}function Sb(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function lce(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}class uce extends Fd{constructor(e){super(e),this.removeGroupControls=ms,this.removeListeners=ms,this.controls=new oce(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ms}update(){const{dragControls:e}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};e!==r&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const DC=t=>(e,r)=>{t&&ba.update(()=>t(e,r),!1,!0)};class cce extends Fd{constructor(){super(...arguments),this.removePointerDownListener=ms}onPointerDown(e){this.session=new EU(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:LU(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:r,onPan:a,onPanEnd:n}=this.node.getProps();return{onSessionStart:DC(e),onStart:DC(r),onMove:DC(a),onEnd:(i,o)=>{delete this.session,n&&ba.postRender(()=>n(i,o))}}}mount(){this.removePointerDownListener=M0(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let LC=!1;class dce extends E.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:a,layoutId:n}=this.props,{projection:i}=e;i&&(r.group&&r.group.add(i),a&&a.register&&n&&a.register(i),LC&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),aw.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:a,drag:n,isPresent:i}=this.props,{projection:o}=a;return o&&(o.isPresent=i,e.layoutDependency!==r&&o.setOptions({...o.options,layoutDependency:r}),LC=!0,n||e.layoutDependency!==r||r===void 0||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||ba.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),wE.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:a}=this.props,{projection:n}=e;LC=!0,n&&(n.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(n),a&&a.deregister&&a.deregister(n))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function PU(t){const[e,r]=SU(),a=E.useContext(eE);return g.jsx(dce,{...t,layoutGroup:a,switchLayoutGroup:E.useContext(MU),isPresent:e,safeToRemove:r})}const fce={pan:{Feature:cce},drag:{Feature:uce,ProjectionNode:wU,MeasureLayout:PU}};function l4(t,e,r){const{props:a}=t;t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",r==="Start");const n="onHover"+r,i=a[n];i&&ba.postRender(()=>i(e,Hy(e)))}class hce extends Fd{mount(){const{current:e}=this.node;e&&(this.unmount=Ose(e,(r,a)=>(l4(this.node,a,"Start"),n=>l4(this.node,n,"End"))))}unmount(){}}class vce extends Fd{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Vy(J0(this.node.current,"focus",()=>this.onFocus()),J0(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function u4(t,e,r){const{props:a}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&a.whileTap&&t.animationState.setActive("whileTap",r==="Start");const n="onTap"+(r==="End"?"":r),i=a[n];i&&ba.postRender(()=>i(e,Hy(e)))}class pce extends Fd{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:r,propagate:a}=this.node.props;this.unmount=Hse(e,(n,i)=>(u4(this.node,i,"Start"),(o,{success:s})=>u4(this.node,o,s?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:(a==null?void 0:a.tap)===!1})}unmount(){}}const lM=new WeakMap,EC=new WeakMap,mce=t=>{const e=lM.get(t.target);e&&e(t)},gce=t=>{t.forEach(mce)};function yce({root:t,...e}){const r=t||document;EC.has(r)||EC.set(r,{});const a=EC.get(r),n=JSON.stringify(e);return a[n]||(a[n]=new IntersectionObserver(gce,{root:t,...e})),a[n]}function xce(t,e,r){const a=yce(e);return lM.set(t,r),a.observe(t),()=>{lM.delete(t),a.unobserve(t)}}const bce={some:0,all:1};class wce extends Fd{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:r,margin:a,amount:n="some",once:i}=e,o={root:r?r.current:void 0,rootMargin:a,threshold:typeof n=="number"?n:bce[n]},s=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),h=u?c:d;h&&h(l)};return xce(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:r}=this.node;["amount","margin","root"].some(Sce(e,r))&&this.startObserver()}unmount(){}}function Sce({viewport:t={}},{viewport:e={}}={}){return r=>t[r]!==e[r]}const _ce={inView:{Feature:wce},tap:{Feature:pce},focus:{Feature:vce},hover:{Feature:hce}},Tce={layout:{ProjectionNode:wU,MeasureLayout:PU}},Cce={...Xue,..._ce,...fce,...Tce},Xt=Hue(Cce,Uue),uM="__custom__:";function kce(t){return Array.from(new Set((t??[]).map(e=>e==null?void 0:e.trim()).filter(e=>!!e)))}function RC(t,e){const r=kce(t),a=e==null?void 0:e.trim();return a&&r.push(`${uM}${encodeURIComponent(a)}`),r.join(",")}function cM(t){const e={values:[],customText:""};return t!=null&&t.trim()&&(t.split(",").map(r=>r.trim()).filter(Boolean).forEach(r=>{if(r.startsWith(uM)){e.customText=decodeURIComponent(r.slice(uM.length));return}e.values.push(r)}),e.values=Array.from(new Set(e.values))),e}function IU(t){const{channelAttributeCustom:e,...r}=t;return{...r,city:t.city,certificationLevel:t.certificationLevel,channelIndustry:RC(t.channelIndustry),channelAttribute:RC(t.channelAttribute,e),internalAttribute:RC(t.internalAttribute)}}const dM="/login",jU=120*1e3,OU=60*1e3,zU="auth-cache:current-user",BU="auth-cache:profile-overview",VU="auth-cache:my-permissions",D0=new Map,c0=new Map;let nw=null,Cg=null;const Nce=["登录已失效","重新登录","未登录","未获取到当前登录用户","禁止查询他人数据","禁止操作他人数据","unauthorized","authorization"];function FU(t){return t==="0"||t==="200"||t===0||t===200}function LE(){nw!==null&&(window.clearTimeout(nw),nw=null)}function Ace(t){try{const[,e]=t.split(".");if(!e)return null;const r=e.replace(/-/g,"+").replace(/_/g,"/").padEnd(Math.ceil(e.length/4)*4,"=");return JSON.parse(atob(r))}catch{return null}}function EE(t){return t?Ace(t):null}function RE(t){const e=EE(t);return!e||typeof e.exp!="number"||!Number.isFinite(e.exp)?null:e.exp*1e3}function GU(t,e=Date.now()){const r=RE(t);return r===null?!0:r<=e}function Mce(t,e=Date.now()){const r=RE(t);return r===null?!0:r-e<=OU}function Dce(){const t=new URL(window.location.href);t.pathname===dM&&t.searchParams.get("timeout")==="1"||window.location.replace(`${dM}?timeout=1`)}function fM(t){const e=localStorage.getItem("accessToken");e&&t.set("Authorization",`Bearer ${e}`);const r=PE();r!==void 0&&t.set("X-User-Id",String(r));const a=localStorage.getItem("activeTenantId");return a!=null&&a.trim()&&t.set("X-Tenant-Id",a.trim()),t}function ey(){zp(),Dce()}function HU(t){localStorage.setItem("accessToken",t.accessToken),localStorage.setItem("refreshToken",t.refreshToken),t.availableTenants&&localStorage.setItem("availableTenants",JSON.stringify(t.availableTenants));const e=EE(t.accessToken);(e==null?void 0:e.tenantId)!==void 0&&localStorage.setItem("activeTenantId",String(e.tenantId)),iw()}async function UU(){if(Cg)return Cg;const t=localStorage.getItem("refreshToken");return t?(Cg=Bt("/api/sys/auth/refresh",{method:"POST",body:JSON.stringify({refreshToken:t})}).then(e=>{if(!e.accessToken||!e.refreshToken)throw new Error("刷新登录态失败");return HU(e),e.accessToken}).catch(()=>null).finally(()=>{Cg=null}),Cg):null}async function Uw(t=!1){const e=localStorage.getItem("accessToken");if(!t&&e&&!Mce(e))return e;const r=await UU();return r||(!e||GU(e)||t?(ey(),null):e)}function iw(){LE();const t=localStorage.getItem("accessToken");if(!t)return;const e=RE(t);if(e===null||e<=Date.now()){Uw(!0);return}const r=Math.max(0,e-Date.now()-OU);nw=window.setTimeout(()=>{Uw(!0)},r)}function $U(t,e){const r=t.trim(),a=(e||"").toLowerCase(),n=a.includes("application/json")||a.includes("+json")||r.startsWith("{")||r.startsWith("[");if(!r||!n)return null;try{return JSON.parse(r)}catch{return null}}function Lce(t){var n,i;const e=t.match(/<title[^>]*>([^<]+)<\/title>/i);if((n=e==null?void 0:e[1])!=null&&n.trim())return e[1].trim();const r=t.match(/<h[1-6][^>]*>([^<]+)<\/h[1-6]>/i);return(i=r==null?void 0:r[1])!=null&&i.trim()?r[1].trim():t.replace(/<script[\s\S]*?<\/script>/gi," ").replace(/<style[\s\S]*?<\/style>/gi," ").replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim()||null}function WU(t,e,r){var i,o;const a=((i=r==null?void 0:r.msg)==null?void 0:i.trim())||((o=r==null?void 0:r.message)==null?void 0:o.trim());if(a)return a;const n=t.trim();return n?n.startsWith("<")?Lce(n)||`请求失败(${e})`:n.length>300?n.slice(0,300):n:`请求失败(${e})`}function Ece(t){return(t==null?void 0:t.trim().toLowerCase())||""}function PC(t){const e=Ece(t);return e?Nce.some(r=>e.includes(r.toLowerCase())):!1}function Rce(t){if(!t.redirected||!t.url)return!1;try{return new URL(t.url,window.location.origin).pathname===dM}catch{return!1}}function $w(t,e,r){return t.status===401||Rce(t)?!0:PC(e)||PC(r==null?void 0:r.msg)||PC(r==null?void 0:r.message)}async function Bt(t,e,r=!1){const a=new Headers(e==null?void 0:e.headers);if(!a.has("Content-Type")&&(e!=null&&e.body)&&!(e.body instanceof FormData)&&a.set("Content-Type","application/json"),r){if(!await Uw())throw new Error("登录已失效,请重新登录");fM(a)}const n=await fetch(t,{...e,headers:a});if(r&&$w(n))throw ey(),new Error("登录已失效,请重新登录");const i=await n.text(),o=$U(i,n.headers.get("content-type")),s=WU(i,n.status,o);if(r&&$w(n,s,o))throw ey(),new Error("登录已失效,请重新登录");if(!n.ok)throw new Error(s);if(!o)throw new Error(i.trim()?s:"接口返回为空");if(!FU(o.code))throw new Error(s);return o.data}async function YU(t,e){if(!await Uw())throw new Error("登录已失效,请重新登录");const a=await fetch(t,{...e,headers:fM(new Headers(e==null?void 0:e.headers))});if($w(a)){if(await UU()){const i=await fetch(t,{...e,headers:fM(new Headers(e==null?void 0:e.headers))});if(!$w(i))return i}throw ey(),new Error("登录已失效,请重新登录")}return a}function XU(){const t=localStorage.getItem("accessToken");return!!t&&!GU(t)||!!localStorage.getItem("refreshToken")}function zp(){LE(),localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),localStorage.removeItem("username"),localStorage.removeItem("availableTenants"),localStorage.removeItem("activeTenantId"),sessionStorage.removeItem("userProfile"),T_()}function qU(t,e){T_(),localStorage.setItem("username",e),HU(t)}function PE(){try{const t=sessionStorage.getItem("userProfile");if(t){const e=JSON.parse(t),r=c4(e.userId);if(r)return r}}catch{}try{const t=localStorage.getItem("accessToken");if(!t)return;const e=EE(t),r=c4(e.userId);if(r)return r}catch{return}}function c4(t){if(typeof t=="string"&&t.trim())return t.trim();if(typeof t=="number"&&Number.isSafeInteger(t)&&t>0)return t}function IE(){return PE()}function Pce(){const t=()=>{document.visibilityState!=="hidden"&&iw()},e=r=>{(!r.key||r.key==="accessToken")&&iw()};return iw(),document.addEventListener("visibilitychange",t),window.addEventListener("focus",t),window.addEventListener("storage",e),()=>{LE(),document.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t),window.removeEventListener("storage",e)}}async function Ice(){return Bt("/api/sys/auth/captcha")}async function jce(t){return Bt("/api/sys/auth/login",{method:"POST",body:JSON.stringify(t)})}async function Oce(t){return Bt("/api/wecom/sso/exchange",{method:"POST",body:JSON.stringify(t)})}async function zce(t){const e=new URLSearchParams({url:t});return Bt(`/api/wecom/sso/js-sdk-config?${e.toString()}`,void 0,!0)}async function Bce(t,e){const r=new URLSearchParams({key:t});return r.set("defaultValue",e),Bt(`/api/sys/api/params/value?${r.toString()}`)}async function Vce(){return Bt("/api/sys/api/open/platform/config")}async function mh(){return VE(zU,async()=>{const t=await Bt("/api/sys/api/users/me",void 0,!0);return a$(t),t})}async function Fce(){T_();const t=await Bt("/api/sys/api/users/me",void 0,!0);return a$(t),t}async function ZU(){return VE(VU,()=>Bt("/api/sys/api/permissions/me",void 0,!0))}function KU(t,e){if(!t||!e.length)return!0;const r=e.some(n=>n.startsWith("menu:")),a=e.some(n=>!n.startsWith("menu:")&&n.includes(":"));return t.startsWith("menu:")?!r||e.includes(t):!a||e.includes(t)}async function Gce(){return Bt("/api/dashboard/home",void 0,!0)}async function d4(t,e){const r=e?`?dimension=${encodeURIComponent(e)}`:"";return Bt(`/api/dashboard/analytics-cards/${encodeURIComponent(t)}${r}`,void 0,!0)}async function Hce(t){return Bt(`/api/dashboard/todos/${t}/complete`,{method:"POST"},!0)}async function Uce(t){return Bt(`/api/dashboard/messages/${t}/read`,{method:"POST"},!0)}async function ow(){return VE(BU,()=>Bt("/api/profile/overview",void 0,!0))}async function $ce(t){const e=await Bt("/api/sys/api/users/profile",{method:"PUT",body:JSON.stringify(t)},!0);return T_(),e}async function Wce(t){return Bt("/api/sys/api/users/password",{method:"PUT",body:JSON.stringify(t)},!0)}async function Yce(t,e){const r=new URLSearchParams({fromUserId:String(t),toUserId:String(e)});return Bt(`/api/owner-transfer/preview?${r.toString()}`,void 0,!0)}async function QU(){return Bt("/api/owner-transfer/target-users",void 0,!0)}async function Xce(t){return Bt("/api/owner-transfer/execute",{method:"POST",body:JSON.stringify(t)},!0)}async function JU(){return Bt("/api/work/overview",void 0,!0)}async function qce(){return Bt("/api/work/daily-report-requirement",void 0,!0)}async function Zce(t){const e=new URLSearchParams,r=(t==null?void 0:t.trim())||"";r&&e.set("keyword",r);const a=e.toString();try{const s=await Bt(`/api/work/report-message-users${a?`?${a}`:""}`,void 0,!0);if(s!=null&&s.length)return s}catch{}const i=(await QU()).map(s=>({userId:s.userId,name:s.displayName||s.username||`用户${s.userId}`,username:s.username}));if(!r)return i;const o=r.toLowerCase();return i.filter(s=>s.name.toLowerCase().includes(o)||(s.username||"").toLowerCase().includes(o))}async function Kce(t,e=1,r=8){const a=new URLSearchParams({type:t,page:String(e),size:String(r)});return Bt(`/api/work/history?${a.toString()}`,void 0,!0)}async function e$(t){return Bt(`/api/work/history/reports/${t}`,void 0,!0)}function t$(t){const e=new URLSearchParams;Object.entries(t??{}).forEach(([a,n])=>{const i=n==null?void 0:n.trim();i&&e.set(a,i)});const r=e.toString();return r?`?${r}`:""}async function Qce(t){return Bt(`/api/work/checkins/export-data${t$(t)}`,void 0,!0)}async function Jce(t){return Bt(`/api/work/daily-reports/export-data${t$(t)}`,void 0,!0)}async function ede(t,e){return Bt(`/api/work/reverse-geocode?lat=${t}&lon=${e}`,void 0,!0)}async function tde(t){return Bt("/api/work/checkins",{method:"POST",body:JSON.stringify(t)},!0)}async function rde(t){const e=new FormData;return e.append("file",t),Bt("/api/work/checkin-photos",{method:"POST",body:e},!0)}async function ade(t,e){const r=localStorage.getItem("accessToken"),a=PE(),n=localStorage.getItem("activeTenantId");return new Promise((i,o)=>{const s=new XMLHttpRequest;s.open("POST","/api/work/report-attachments"),r&&s.setRequestHeader("Authorization",`Bearer ${r}`),a!==void 0&&s.setRequestHeader("X-User-Id",String(a)),n!=null&&n.trim()&&s.setRequestHeader("X-Tenant-Id",n.trim()),s.upload.onprogress=u=>{!u.lengthComputable||!(e!=null&&e.onProgress)||e.onProgress(Math.min(100,Math.round(u.loaded/u.total*100)))},s.onerror=()=>o(new Error("附件上传失败,请稍后重试")),s.onabort=()=>o(new Error("附件上传已取消")),s.onload=()=>{const u=s.responseText||"",c=$U(u,s.getResponseHeader("content-type")),d=WU(u,s.status,c);if(s.status===401||s.status>=300&&s.status<400){ey(),o(new Error("登录已失效,请重新登录"));return}if(s.status<200||s.status>=300){o(new Error(d));return}if(!c||!FU(c.code)){o(new Error(d));return}i(c.data)};const l=new FormData;l.append("file",t),s.send(l)})}async function nde(t){const e=new FormData;return e.append("file",t),Bt("/api/work/report-speech/transcribe",{method:"POST",body:e},!0)}async function ide(t){return Bt("/api/work/daily-reports",{method:"POST",body:JSON.stringify(t)},!0)}async function vp(t,e,r=!0,a,n){const i=new URLSearchParams;t&&t.trim()&&i.set("keyword",t.trim()),e&&e.trim()&&e!=="全部"&&i.set("stage",e.trim()),i.set("includeDetails",String(r)),a!==void 0&&i.set("limit",String(a)),n!==void 0&&i.set("archived",String(n));const o=i.toString();return Bt(`/api/opportunities/overview${o?`?${o}`:""}`,void 0,!0)}async function ode(t){return Bt(`/api/opportunities/${t}`,void 0,!0)}async function pp(){return Bt("/api/opportunities/meta",void 0,!0)}async function sde(){return Bt("/api/opportunities/oms/pre-sales",void 0,!0)}async function r$(t){return Bt("/api/opportunities",{method:"POST",body:JSON.stringify(t)},!0)}async function lde(t,e){return Bt(`/api/opportunities/${t}`,{method:"PUT",body:JSON.stringify(e)},!0)}async function ude(t,e){return Bt(`/api/opportunities/${t}/push-oms`,{method:"POST",body:JSON.stringify(e??{})},!0)}async function mp(t,e=!0,r){const a=new URLSearchParams;t&&t.trim()&&a.set("keyword",t.trim()),a.set("includeDetails",String(e)),r!==void 0&&a.set("limit",String(r));const n=a.toString();return Bt(`/api/expansion/overview${n?`?${n}`:""}`,void 0,!0)}async function cde(t){const e=new URLSearchParams;t!=null&&t.keyword&&t.keyword.trim()&&e.set("keyword",t.keyword.trim()),e.set("limit",String(t.limit));const r=e.toString();return Bt(`/api/expansion/opportunity-form-options${r?`?${r}`:""}`,void 0,!0)}async function jE(){return Bt("/api/expansion/meta",void 0,!0)}async function OE(t){const e=new URLSearchParams({provinceName:t});return Bt(`/api/expansion/areas/cities?${e.toString()}`,void 0,!0)}async function Ww(t,e){const r=new URLSearchParams({employeeNo:t});return Bt(`/api/expansion/sales/duplicate-check?${r.toString()}`,void 0,!0)}async function Yw(t,e){const r=new URLSearchParams({channelName:t});return Bt(`/api/expansion/channel/duplicate-check?${r.toString()}`,void 0,!0)}async function zE(t){return Bt("/api/expansion/sales",{method:"POST",body:JSON.stringify(t)},!0)}async function BE(t){return Bt("/api/expansion/channel",{method:"POST",body:JSON.stringify(IU(t))},!0)}async function dde(t,e){return Bt(`/api/expansion/sales/${t}`,{method:"PUT",body:JSON.stringify(e)},!0)}async function fde(t,e){return Bt(`/api/expansion/channel/${t}`,{method:"PUT",body:JSON.stringify(IU(e))},!0)}function hde(t){const e=D0.get(t);if(e&&e.expiresAt>Date.now())return e.value;D0.delete(t);try{const r=sessionStorage.getItem(t);if(!r)return null;const a=JSON.parse(r);return!a.expiresAt||a.expiresAt<=Date.now()?(sessionStorage.removeItem(t),null):(D0.set(t,{expiresAt:a.expiresAt,value:a.value}),a.value??null)}catch{return sessionStorage.removeItem(t),null}}function vde(t,e,r=jU){const a={expiresAt:Date.now()+r,value:e};D0.set(t,a);try{sessionStorage.setItem(t,JSON.stringify(a))}catch{}}function T_(){[zU,BU,VU].forEach(t=>{D0.delete(t),c0.delete(t);try{sessionStorage.removeItem(t)}catch{}})}function a$(t){try{sessionStorage.setItem("userProfile",JSON.stringify(t))}catch{}}async function VE(t,e,r=jU){const a=hde(t);if(a)return a;const n=c0.get(t);if(n)return n;const i=e().then(o=>(vde(t,o,r),c0.delete(t),o)).catch(o=>{throw c0.delete(t),o});return c0.set(t,i),i}function au(){const[t,e]=E.useState(()=>typeof window>"u"?!1:window.matchMedia("(max-width: 767px)").matches);return E.useEffect(()=>{if(typeof window>"u")return;const r=window.matchMedia("(max-width: 767px)"),a=()=>e(r.matches);return a(),typeof r.addEventListener=="function"?(r.addEventListener("change",a),()=>r.removeEventListener("change",a)):(r.addListener(a),()=>r.removeListener(a))},[]),t}function Gd(){return E.useMemo(()=>typeof navigator>"u"?!1:navigator.userAgent.toLowerCase().includes("wxwork"),[])}function f4({mobile:t=!1}){return g.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[g.jsx("img",{src:"/crm-favicon.svg",alt:"紫光汇智CRM 图标",className:Ne("shrink-0 rounded-2xl shadow-sm ring-1 ring-violet-200/60",t?"h-7 w-7 rounded-xl":"h-9 w-9")}),g.jsx("span",{className:Ne("truncate bg-gradient-to-r from-violet-600 to-indigo-600 bg-clip-text font-bold text-transparent",t?"text-sm uppercase tracking-[0.12em]":"text-lg"),children:"汇智CRM"})]})}const _b=[{name:"首页",path:"/",icon:Nae},{name:"拓展",path:"/expansion",icon:x_},{name:"商机",path:"/opportunities",icon:Ure},{name:"工作",path:"/work",defaultPath:"/work/checkin",icon:Xre,children:[{name:"打卡",path:"/work/checkin"},{name:"日报",path:"/work/report"}]},{name:"我的",path:"/profile",icon:Pw}];function h4(t=new Date){return t.getHours()>=18}function pde(){const t=po(),e=ru(),{theme:r,setTheme:a}=qG(),[n,i]=E.useState(!1),[o,s]=E.useState(h4()),[l,u]=E.useState(""),c=E.useRef(null),d=au(),h=Gd(),v=d&&h,m=k=>t.pathname===k||k!=="/"&&t.pathname.startsWith(`${k}/`),x=_b.find(k=>m(k.path))??_b[0],b=x.path,w=x.path==="/";E.useEffect(()=>{let k=!1;async function A(){var M;if(!w){i(!1);return}try{const L=await JU();k||i(!((M=L.todayReport)!=null&&M.status))}catch{k||i(!1)}}return A(),()=>{k=!0}},[w]),E.useEffect(()=>{const k=()=>s(h4());k();const A=window.setInterval(k,60*1e3);return()=>{window.clearInterval(A)}},[]),E.useEffect(()=>()=>{c.current&&window.clearTimeout(c.current)},[]);const _=w,T=w&&o&&n,C=k=>{if(!T){e("/work/report");return}k.preventDefault(),u("今日日报尚未提交"),c.current&&window.clearTimeout(c.current),c.current=window.setTimeout(()=>{u(""),e("/work/report")},900)};return g.jsxs("div",{className:"flex min-h-dvh overflow-x-hidden bg-slate-50 text-slate-900 transition-colors duration-300 dark:bg-slate-950 dark:text-slate-50 md:h-screen md:overflow-hidden",children:[g.jsxs("aside",{className:"hidden w-64 flex-col border-r border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 md:flex transition-colors duration-300",children:[g.jsxs("div",{className:"flex h-16 items-center justify-between border-b border-slate-200 dark:border-slate-800 px-6",children:[g.jsx(f4,{}),g.jsx("button",{onClick:()=>a(r==="dark"?"light":"dark"),className:"rounded-full p-2 text-slate-500 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800 transition-colors",children:r==="dark"?g.jsx(OA,{className:"h-4 w-4"}):g.jsx(jA,{className:"h-4 w-4"})})]}),g.jsx("nav",{className:"flex-1 space-y-2 p-4",children:_b.map(k=>{const A=m(k.path);return g.jsx("div",{className:"space-y-1",children:g.jsxs(hh,{to:k.defaultPath??k.path,className:Ne("flex items-center gap-3 rounded-xl px-3 py-3 text-sm font-medium transition-all duration-200",A?"bg-violet-50 dark:bg-violet-500/10 text-violet-600 dark:text-violet-400 shadow-sm":"text-slate-600 dark:text-slate-400 hover:bg-slate-100 dark:hover:bg-slate-800/50 hover:text-slate-900 dark:hover:text-slate-50"),children:[g.jsx(k.icon,{className:Ne("h-5 w-5 transition-transform",A&&"scale-110")}),k.name]})},k.name)})})]}),g.jsx("main",{className:"relative min-w-0 flex-1 overflow-x-hidden overflow-y-visible pb-[calc(6.5rem+env(safe-area-inset-bottom))] md:overflow-y-auto md:pb-0",children:g.jsxs("div",{className:"mx-auto w-full max-w-5xl px-4 py-4 md:px-8 md:py-8",children:[g.jsxs("header",{className:Ne("sticky top-0 z-30 -mx-4 mb-4 flex items-center justify-between gap-3 border-b border-slate-200 px-4 pb-3.5 pt-[calc(0.9rem+env(safe-area-inset-top))] dark:border-slate-800 md:hidden",v?"bg-white dark:bg-slate-950":"bg-white/90 backdrop-blur-xl transition-colors duration-300 dark:bg-slate-950/90"),children:[g.jsx("div",{className:"min-w-0 flex-1 pr-2",children:g.jsx(f4,{mobile:!0})}),g.jsxs("div",{className:"flex shrink-0 items-center gap-2.5",children:[_?g.jsxs("div",{className:"relative",children:[g.jsxs("button",{type:"button",onClick:C,className:Ne("relative inline-flex h-9 w-9 items-center justify-center rounded-full border text-slate-500 shadow-sm transition-colors hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800",v?"border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-900":"border-slate-200/80 bg-white/80 dark:border-slate-700 dark:bg-slate-900/70"),"aria-label":T?"今日日报未提交,前往日报":"日报提醒,前往日报",title:T?"今日日报未提交":"日报提醒",children:[g.jsx(OO,{className:"h-4 w-4"}),T?g.jsx("span",{className:"absolute right-1.5 top-1.5 h-2 w-2 rounded-full bg-rose-500 ring-2 ring-white dark:ring-slate-950"}):null]}),l?g.jsx("div",{className:"absolute right-0 top-[calc(100%+8px)] whitespace-nowrap rounded-xl bg-slate-900 px-3 py-2 text-xs font-medium text-white shadow-lg dark:bg-slate-100 dark:text-slate-900",children:l}):null]}):null,g.jsx("button",{onClick:()=>a(r==="dark"?"light":"dark"),className:Ne("inline-flex h-9 w-9 items-center justify-center rounded-full border text-slate-500 shadow-sm transition-colors hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800",v?"border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-900":"border-slate-200/80 bg-white/80 dark:border-slate-700 dark:bg-slate-900/70"),"aria-label":r==="dark"?"切换亮色模式":"切换暗色模式",children:r==="dark"?g.jsx(OA,{className:"h-4 w-4"}):g.jsx(jA,{className:"h-4 w-4"})})]})]}),_?g.jsx("div",{className:"mb-4 hidden justify-end md:flex",children:g.jsxs(hh,{to:"/work/report",className:"relative inline-flex h-10 w-10 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-600 shadow-sm transition-colors hover:border-violet-300 hover:text-violet-600 dark:border-slate-800 dark:bg-slate-900/60 dark:text-slate-300 dark:hover:border-violet-500/40 dark:hover:text-violet-300","aria-label":T?"今日日报未提交,前往日报":"日报提醒,前往日报",title:T?"今日日报未提交":"日报提醒",children:[g.jsx(OO,{className:"h-4 w-4"}),T?g.jsx("span",{className:"absolute right-2.5 top-2.5 h-2 w-2 rounded-full bg-rose-500 ring-2 ring-white dark:ring-slate-900"}):null]})}):null,d?g.jsx("div",{children:g.jsx(PO,{})},b):g.jsx(co,{mode:"wait",children:g.jsx(Xt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:g.jsx(PO,{})},b)})]})}),g.jsx("nav",{className:Ne("fixed bottom-0 left-0 right-0 z-30 flex h-[calc(4rem+env(safe-area-inset-bottom))] border-t border-slate-200 px-2 pb-[env(safe-area-inset-bottom)] dark:border-slate-800 md:hidden",v?"bg-white dark:bg-slate-900":"bg-white/80 backdrop-blur-xl transition-colors duration-300 dark:bg-slate-900/80"),children:_b.map(k=>{const A=m(k.path);return g.jsxs(hh,{to:k.defaultPath??k.path,className:Ne("flex min-w-0 flex-1 flex-col items-center justify-center gap-1 px-1 text-[10px] font-medium transition-all duration-200",A?"text-violet-600 dark:text-violet-400":"text-slate-500 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-50"),children:[g.jsx("div",{className:Ne("flex h-8 w-8 items-center justify-center rounded-full transition-all duration-200",A?"bg-violet-100 dark:bg-violet-500/20":"bg-transparent"),children:g.jsx(k.icon,{className:Ne("h-5 w-5",A&&"fill-violet-100 dark:fill-violet-500/20")})}),g.jsx("span",{className:"truncate",children:k.name})]},k.name)})})]})}/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var hM=function(t,e){return hM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(r[n]=a[n])},hM(t,e)};function se(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");hM(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var mde=(function(){function t(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return t})(),gde=(function(){function t(){this.browser=new mde,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return t})(),Ut=new gde;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Ut.wxa=!0,Ut.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Ut.worker=!0:!Ut.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Ut.node=!0,Ut.svgSupported=!0):yde(navigator.userAgent,Ut);function yde(t,e){var r=e.browser,a=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),i=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);a&&(r.firefox=!0,r.version=a[1]),n&&(r.ie=!0,r.version=n[1]),i&&(r.edge=!0,r.version=i[1],r.newEdge=+i[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}}var FE=12,n$="sans-serif",Ju=FE+"px "+n$,xde=20,bde=100,wde="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Sde(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r<t.length;r++){var a=String.fromCharCode(r+32),n=(t.charCodeAt(r)-xde)/bde;e[a]=n}return e}var _de=Sde(wde),qs={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var t,e;return function(r,a){if(!t){var n=qs.createCanvas();t=n&&n.getContext("2d")}if(t)return e!==a&&(e=t.font=a||Ju),t.measureText(r);r=r||"",a=a||Ju;var i=/((?:\d+)?\.?\d*)px/.exec(a),o=i&&+i[1]||FE,s=0;if(a.indexOf("mono")>=0)s=o*r.length;else for(var l=0;l<r.length;l++){var u=_de[r[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(t,e,r){var a=new Image;return a.onload=e,a.onerror=r,a.src=t,a}},i$=ql(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),o$=ql(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),hm=Object.prototype.toString,C_=Array.prototype,Tde=C_.forEach,Cde=C_.filter,GE=C_.slice,kde=C_.map,v4=(function(){}).constructor,Tb=v4?v4.prototype:null,HE="__proto__",Nde=2311;function s$(){return Nde++}function UE(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];typeof console<"u"&&console.error.apply(console,t)}function et(t){if(t==null||typeof t!="object")return t;var e=t,r=hm.call(t);if(r==="[object Array]"){if(!L0(t)){e=[];for(var a=0,n=t.length;a<n;a++)e[a]=et(t[a])}}else if(o$[r]){if(!L0(t)){var i=t.constructor;if(i.from)e=i.from(t);else{e=new i(t.length);for(var a=0,n=t.length;a<n;a++)e[a]=t[a]}}}else if(!i$[r]&&!L0(t)&&!Bp(t)){e={};for(var o in t)t.hasOwnProperty(o)&&o!==HE&&(e[o]=et(t[o]))}return e}function Ct(t,e,r){if(!it(e)||!it(t))return r?et(e):t;for(var a in e)if(e.hasOwnProperty(a)&&a!==HE){var n=t[a],i=e[a];it(i)&&it(n)&&!be(i)&&!be(n)&&!Bp(i)&&!Bp(n)&&!p4(i)&&!p4(n)&&!L0(i)&&!L0(n)?Ct(n,i,r):(r||!(a in t))&&(t[a]=et(e[a]))}return t}function $E(t,e){for(var r=t[0],a=1,n=t.length;a<n;a++)r=Ct(r,t[a],e);return r}function ve(t,e){if(Object.assign)Object.assign(t,e);else for(var r in e)e.hasOwnProperty(r)&&r!==HE&&(t[r]=e[r]);return t}function nt(t,e,r){for(var a=Wt(e),n=0,i=a.length;n<i;n++){var o=a[n];(r?e[o]!=null:t[o]==null)&&(t[o]=e[o])}return t}function St(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,a=t.length;r<a;r++)if(t[r]===e)return r}return-1}function Ade(t,e){var r=t.prototype;function a(){}a.prototype=e.prototype,t.prototype=new a;for(var n in r)r.hasOwnProperty(n)&&(t.prototype[n]=r[n]);t.prototype.constructor=t,t.superClass=e}function gn(t,e,r){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var a=Object.getOwnPropertyNames(e),n=0;n<a.length;n++){var i=a[n];i!=="constructor"&&(r?e[i]!=null:t[i]==null)&&(t[i]=e[i])}else nt(t,e,r)}function Ri(t){return!t||typeof t=="string"?!1:typeof t.length=="number"}function z(t,e,r){if(t&&e)if(t.forEach&&t.forEach===Tde)t.forEach(e,r);else if(t.length===+t.length)for(var a=0,n=t.length;a<n;a++)e.call(r,t[a],a,t);else for(var i in t)t.hasOwnProperty(i)&&e.call(r,t[i],i,t)}function Se(t,e,r){if(!t)return[];if(!e)return WE(t);if(t.map&&t.map===kde)return t.map(e,r);for(var a=[],n=0,i=t.length;n<i;n++)a.push(e.call(r,t[n],n,t));return a}function ql(t,e,r,a){if(t&&e){for(var n=0,i=t.length;n<i;n++)r=e.call(a,r,t[n],n,t);return r}}function mr(t,e,r){if(!t)return[];if(!e)return WE(t);if(t.filter&&t.filter===Cde)return t.filter(e,r);for(var a=[],n=0,i=t.length;n<i;n++)e.call(r,t[n],n,t)&&a.push(t[n]);return a}function Gh(t,e,r){if(t&&e){for(var a=0,n=t.length;a<n;a++)if(e.call(r,t[a],a,t))return t[a]}}function Wt(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}function Mde(t,e){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];return function(){return t.apply(e,r.concat(GE.call(arguments)))}}var je=Tb&&Ke(Tb.bind)?Tb.call.bind(Tb.bind):Mde;function wt(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return function(){return t.apply(this,e.concat(GE.call(arguments)))}}function be(t){return Array.isArray?Array.isArray(t):hm.call(t)==="[object Array]"}function Ke(t){return typeof t=="function"}function Ie(t){return typeof t=="string"}function vM(t){return hm.call(t)==="[object String]"}function qt(t){return typeof t=="number"}function it(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function p4(t){return!!i$[hm.call(t)]}function vo(t){return!!o$[hm.call(t)]}function Bp(t){return typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.ownerDocument=="object"}function k_(t){return t.colorStops!=null}function Dde(t){return t.image!=null}function Lde(t){return hm.call(t)==="[object RegExp]"}function Ei(t){return t!==t}function yi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0,a=t.length;r<a;r++)if(t[r]!=null)return t[r]}function $e(t,e){return t??e}function Io(t,e,r){return t??e??r}function WE(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return GE.apply(t,e)}function N_(t){if(typeof t=="number")return[t,t,t,t];var e=t.length;return e===2?[t[0],t[1],t[0],t[1]]:e===3?[t[0],t[1],t[2],t[1]]:t}function Pi(t,e){if(!t)throw new Error(e)}function vs(t){return t==null?null:typeof t.trim=="function"?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var l$="__ec_primitive__";function Xw(t){t[l$]=!0}function L0(t){return t[l$]}var Ede=(function(){function t(){this.data={}}return t.prototype.delete=function(e){var r=this.has(e);return r&&delete this.data[e],r},t.prototype.has=function(e){return this.data.hasOwnProperty(e)},t.prototype.get=function(e){return this.data[e]},t.prototype.set=function(e,r){return this.data[e]=r,this},t.prototype.keys=function(){return Wt(this.data)},t.prototype.forEach=function(e){var r=this.data;for(var a in r)r.hasOwnProperty(a)&&e(r[a],a)},t})(),u$=typeof Map=="function";function Rde(){return u$?new Map:new Ede}var Pde=(function(){function t(e){var r=be(e);this.data=Rde();var a=this;e instanceof t?e.each(n):e&&z(e,n);function n(i,o){r?a.set(i,o):a.set(o,i)}}return t.prototype.hasKey=function(e){return this.data.has(e)},t.prototype.get=function(e){return this.data.get(e)},t.prototype.set=function(e,r){return this.data.set(e,r),r},t.prototype.each=function(e,r){this.data.forEach(function(a,n){e.call(r,a,n)})},t.prototype.keys=function(){var e=this.data.keys();return u$?Array.from(e):e},t.prototype.removeKey=function(e){this.data.delete(e)},t})();function He(t){return new Pde(t)}function ty(t,e){for(var r=new t.constructor(t.length+e.length),a=0;a<t.length;a++)r[a]=t[a];for(var n=t.length,a=0;a<e.length;a++)r[a+n]=e[a];return r}function A_(t,e){var r;if(Object.create)r=Object.create(t);else{var a=function(){};a.prototype=t,r=new a}return e&&ve(r,e),r}function c$(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function Ve(t,e){return t.hasOwnProperty(e)}function en(){}var sw=180/Math.PI;/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var pM=function(t,e){return pM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(r[n]=a[n])},pM(t,e)};function ia(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");pM(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function Hh(t,e){return t==null&&(t=0),e==null&&(e=0),[t,e]}function Ui(t,e){return t[0]=e[0],t[1]=e[1],t}function Uu(t){return[t[0],t[1]]}function YE(t,e,r){return t[0]=e,t[1]=r,t}function m4(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function mM(t,e,r,a){return t[0]=e[0]+r[0]*a,t[1]=e[1]+r[1]*a,t}function ih(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function gM(t){return Math.sqrt(Ide(t))}function Ide(t){return t[0]*t[0]+t[1]*t[1]}function lw(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function vm(t,e){var r=gM(e);return r===0?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function yM(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var cd=yM;function jde(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var gh=jde;function uw(t,e,r,a){return t[0]=e[0]+a*(r[0]-e[0]),t[1]=e[1]+a*(r[1]-e[1]),t}function tn(t,e,r){var a=e[0],n=e[1];return t[0]=r[0]*a+r[2]*n+r[4],t[1]=r[1]*a+r[3]*n+r[5],t}function dd(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function fd(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}var Av=(function(){function t(e,r){this.target=e,this.topTarget=r&&r.topTarget}return t})(),Ode=(function(){function t(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(e){for(var r=e.target;r&&!r.draggable;)r=r.parent||r.__hostTarget;r&&(this._draggingTarget=r,r.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Av(r,e),"dragstart",e.event))},t.prototype._drag=function(e){var r=this._draggingTarget;if(r){var a=e.offsetX,n=e.offsetY,i=a-this._x,o=n-this._y;this._x=a,this._y=n,r.drift(i,o,e),this.handler.dispatchToElement(new Av(r,e),"drag",e.event);var s=this.handler.findHover(a,n,r).target,l=this._dropTarget;this._dropTarget=s,r!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Av(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new Av(s,e),"dragenter",e.event))}},t.prototype._dragEnd=function(e){var r=this._draggingTarget;r&&(r.dragging=!1),this.handler.dispatchToElement(new Av(r,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Av(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},t})(),ws=(function(){function t(e){e&&(this._$eventProcessor=e)}return t.prototype.on=function(e,r,a,n){this._$handlers||(this._$handlers={});var i=this._$handlers;if(typeof r=="function"&&(n=a,a=r,r=null),!a||!e)return this;var o=this._$eventProcessor;r!=null&&o&&o.normalizeQuery&&(r=o.normalizeQuery(r)),i[e]||(i[e]=[]);for(var s=0;s<i[e].length;s++)if(i[e][s].h===a)return this;var l={h:a,query:r,ctx:n||this,callAtLast:a.zrEventfulCallAtLast},u=i[e].length-1,c=i[e][u];return c&&c.callAtLast?i[e].splice(u,0,l):i[e].push(l),this},t.prototype.isSilent=function(e){var r=this._$handlers;return!r||!r[e]||!r[e].length},t.prototype.off=function(e,r){var a=this._$handlers;if(!a)return this;if(!e)return this._$handlers={},this;if(r){if(a[e]){for(var n=[],i=0,o=a[e].length;i<o;i++)a[e][i].h!==r&&n.push(a[e][i]);a[e]=n}a[e]&&a[e].length===0&&delete a[e]}else delete a[e];return this},t.prototype.trigger=function(e){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];if(!this._$handlers)return this;var n=this._$handlers[e],i=this._$eventProcessor;if(n)for(var o=r.length,s=n.length,l=0;l<s;l++){var u=n[l];if(!(i&&i.filter&&u.query!=null&&!i.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,r[0]);break;case 2:u.h.call(u.ctx,r[0],r[1]);break;default:u.h.apply(u.ctx,r);break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},t.prototype.triggerWithContext=function(e){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];if(!this._$handlers)return this;var n=this._$handlers[e],i=this._$eventProcessor;if(n)for(var o=r.length,s=r[o-1],l=n.length,u=0;u<l;u++){var c=n[u];if(!(i&&i.filter&&c.query!=null&&!i.filter(e,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,r[0]);break;case 2:c.h.call(s,r[0],r[1]);break;default:c.h.apply(s,r.slice(1,o-1));break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},t})(),zde=Math.log(2);function xM(t,e,r,a,n,i){var o=a+"-"+n,s=t.length;if(i.hasOwnProperty(o))return i[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~n)/zde);return t[r][l]}for(var u=a|1<<r,c=r+1;a&1<<c;)c++;for(var d=0,h=0,v=0;h<s;h++){var m=1<<h;m&n||(d+=(v%2?-1:1)*t[r][h]*xM(t,e-1,c,u,n|m,i),v++)}return i[o]=d,d}function g4(t,e){var r=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],a={},n=xM(r,8,0,0,0,a);if(n!==0){for(var i=[],o=0;o<8;o++)for(var s=0;s<8;s++)i[s]==null&&(i[s]=0),i[s]+=((o+s)%2?-1:1)*xM(r,7,o===0?1:0,1<<o,1<<s,a)/n*e[o];return function(l,u,c){var d=u*i[6]+c*i[7]+1;l[0]=(u*i[0]+c*i[1]+i[2])/d,l[1]=(u*i[3]+c*i[4]+i[5])/d}}}var qw="___zrEVENTSAVED",IC=[];function Bde(t,e,r,a,n){return bM(IC,e,a,n,!0)&&bM(t,r,IC[0],IC[1])}function Vde(t,e){t&&r(t),e&&r(e);function r(a){var n=a[qw];n&&(n.clearMarkers&&n.clearMarkers(),delete a[qw])}}function bM(t,e,r,a,n){if(e.getBoundingClientRect&&Ut.domSupported&&!d$(e)){var i=e[qw]||(e[qw]={}),o=Fde(e,i),s=Gde(o,i,n);if(s)return s(t,r,a),!0}return!1}function Fde(t,e){var r=e.markers;if(r)return r;r=e.markers=[];for(var a=["left","right"],n=["top","bottom"],i=0;i<4;i++){var o=document.createElement("div"),s=o.style,l=i%2,u=(i>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",n[u]+":0",a[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return e.clearMarkers=function(){z(r,function(c){c.parentNode&&c.parentNode.removeChild(c)})},r}function Gde(t,e,r){for(var a=r?"invTrans":"trans",n=e[a],i=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),d=2*u,h=c.left,v=c.top;o.push(h,v),l=l&&i&&h===i[d]&&v===i[d+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&n?n:(e.srcCoords=o,e[a]=r?g4(s,o):g4(o,s))}function d$(t){return t.nodeName.toUpperCase()==="CANVAS"}var Hde=/([&<>"'])/g,Ude={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Yi(t){return t==null?"":(t+"").replace(Hde,function(e,r){return Ude[r]})}var $de=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,jC=[],Wde=Ut.browser.firefox&&+Ut.browser.version.split(".")[0]<39;function wM(t,e,r,a){return r=r||{},a?y4(t,e,r):Wde&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):y4(t,e,r),r}function y4(t,e,r){if(Ut.domSupported&&t.getBoundingClientRect){var a=e.clientX,n=e.clientY;if(d$(t)){var i=t.getBoundingClientRect();r.zrX=a-i.left,r.zrY=n-i.top;return}else if(bM(jC,t,a,n)){r.zrX=jC[0],r.zrY=jC[1];return}}r.zrX=r.zrY=0}function XE(t){return t||window.event}function ns(t,e,r){if(e=XE(e),e.zrX!=null)return e;var a=e.type,n=a&&a.indexOf("touch")>=0;if(n){var o=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&wM(t,o,e,r)}else{wM(t,e,e,r);var i=Yde(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&$de.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function Yde(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,a=t.deltaY;if(r==null||a==null)return e;var n=Math.abs(a!==0?a:r),i=a>0?-1:a<0?1:r>0?-1:1;return 3*n*i}function SM(t,e,r,a){t.addEventListener(e,r,a)}function Xde(t,e,r,a){t.removeEventListener(e,r,a)}var ec=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function x4(t){return t.which===2||t.which===3}var qde=(function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,a){return this._doTrack(e,r,a),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,a){var n=e.touches;if(n){for(var i={points:[],touches:[],target:r,event:e},o=0,s=n.length;o<s;o++){var l=n[o],u=wM(a,l,{});i.points.push([u.zrX,u.zrY]),i.touches.push(l)}this._track.push(i)}},t.prototype._recognize=function(e){for(var r in OC)if(OC.hasOwnProperty(r)){var a=OC[r](this._track,e);if(a)return a}},t})();function b4(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function Zde(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var OC={pinch:function(t,e){var r=t.length;if(r){var a=(t[r-1]||{}).points,n=(t[r-2]||{}).points||a;if(n&&n.length>1&&a&&a.length>1){var i=b4(a)/b4(n);!isFinite(i)&&(i=1),e.pinchScale=i;var o=Zde(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function oi(){return[1,0,0,1,0,0]}function M_(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function D_(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Ul(t,e,r){var a=e[0]*r[0]+e[2]*r[1],n=e[1]*r[0]+e[3]*r[1],i=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=a,t[1]=n,t[2]=i,t[3]=o,t[4]=s,t[5]=l,t}function Zl(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function Hd(t,e,r,a){a===void 0&&(a=[0,0]);var n=e[0],i=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(r),d=Math.cos(r);return t[0]=n*d+s*c,t[1]=-n*c+s*d,t[2]=i*d+l*c,t[3]=-i*c+d*l,t[4]=d*(o-a[0])+c*(u-a[1])+a[0],t[5]=d*(u-a[1])-c*(o-a[0])+a[1],t}function qE(t,e,r){var a=r[0],n=r[1];return t[0]=e[0]*a,t[1]=e[1]*n,t[2]=e[2]*a,t[3]=e[3]*n,t[4]=e[4]*a,t[5]=e[5]*n,t}function Zs(t,e){var r=e[0],a=e[2],n=e[4],i=e[1],o=e[3],s=e[5],l=r*o-i*a;return l?(l=1/l,t[0]=o*l,t[1]=-i*l,t[2]=-a*l,t[3]=r*l,t[4]=(a*s-o*n)*l,t[5]=(i*n-r*s)*l,t):null}function Kde(t){var e=oi();return D_(e,t),e}var at=(function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,a=this.y-e.y;return Math.sqrt(r*r+a*a)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,a=this.y-e.y;return r*r+a*a},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,a=this.y;return this.x=e[0]*r+e[2]*a+e[4],this.y=e[1]*r+e[3]*a+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,a){e.x=r,e.y=a},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,a){e.x=r.x+a.x,e.y=r.y+a.y},t.sub=function(e,r,a){e.x=r.x-a.x,e.y=r.y-a.y},t.scale=function(e,r,a){e.x=r.x*a,e.y=r.y*a},t.scaleAndAdd=function(e,r,a,n){e.x=r.x+a.x*n,e.y=r.y+a.y*n},t.lerp=function(e,r,a,n){var i=1-n;e.x=i*r.x+n*a.x,e.y=i*r.y+n*a.y},t})(),oh=Math.min,gp=Math.max,_M=Math.abs,w4=["x","y"],Qde=["width","height"],yf=new at,xf=new at,bf=new at,wf=new at,Do=f$(),d0=Do.minTv,TM=Do.maxTv,E0=[0,0],ot=(function(){function t(e,r,a,n){t.set(this,e,r,a,n)}return t.set=function(e,r,a,n,i){return n<0&&(r=r+n,n=-n),i<0&&(a=a+i,i=-i),e.x=r,e.y=a,e.width=n,e.height=i,e},t.prototype.union=function(e){var r=oh(e.x,this.x),a=oh(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=gp(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=gp(e.y+e.height,this.y+this.height)-a:this.height=e.height,this.x=r,this.y=a},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,a=e.width/r.width,n=e.height/r.height,i=oi();return Zl(i,i,[-r.x,-r.y]),qE(i,i,[a,n]),Zl(i,i,[e.x,e.y]),i},t.prototype.intersect=function(e,r,a){return t.intersect(this,e,r,a)},t.intersect=function(e,r,a,n){a&&at.set(a,0,0);var i=n&&n.outIntersectRect||null,o=n&&n.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!e||!r)return!1;e instanceof t||(e=t.set(Jde,e.x,e.y,e.width,e.height)),r instanceof t||(r=t.set(efe,r.x,r.y,r.width,r.height));var s=!!a;Do.reset(n,s);var l=Do.touchThreshold,u=e.x+l,c=e.x+e.width-l,d=e.y+l,h=e.y+e.height-l,v=r.x+l,m=r.x+r.width-l,x=r.y+l,b=r.y+r.height-l;if(u>c||d>h||v>m||x>b)return!1;var w=!(c<v||m<u||h<x||b<d);return(s||i)&&(E0[0]=1/0,E0[1]=0,S4(u,c,v,m,0,s,i,o),S4(d,h,x,b,1,s,i,o),s&&at.copy(a,w?Do.useDir?Do.dirMinTv:d0:TM)),w},t.contain=function(e,r,a){return r>=e.x&&r<=e.x+e.width&&a>=e.y&&a<=e.y+e.height},t.prototype.contain=function(e,r){return t.contain(this,e,r)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){return e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height,e},t.applyTransform=function(e,r,a){if(!a){e!==r&&t.copy(e,r);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var n=a[0],i=a[3],o=a[4],s=a[5];e.x=r.x*n+o,e.y=r.y*i+s,e.width=r.width*n,e.height=r.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}yf.x=bf.x=r.x,yf.y=wf.y=r.y,xf.x=wf.x=r.x+r.width,xf.y=bf.y=r.y+r.height,yf.transform(a),wf.transform(a),xf.transform(a),bf.transform(a),e.x=oh(yf.x,xf.x,bf.x,wf.x),e.y=oh(yf.y,xf.y,bf.y,wf.y);var l=gp(yf.x,xf.x,bf.x,wf.x),u=gp(yf.y,xf.y,bf.y,wf.y);e.width=l-e.x,e.height=u-e.y},t})(),Jde=new ot(0,0,0,0),efe=new ot(0,0,0,0);function S4(t,e,r,a,n,i,o,s){var l=_M(e-r),u=_M(a-t),c=oh(l,u),d=w4[n],h=w4[1-n],v=Qde[n];e<r||a<t?l<u?(i&&(TM[d]=-l),s&&(o[d]=e,o[v]=0)):(i&&(TM[d]=u),s&&(o[d]=t,o[v]=0)):(o&&(o[d]=gp(t,r),o[v]=oh(e,a)-o[d]),i&&(c<E0[0]||Do.useDir)&&(E0[0]=oh(c,E0[0]),(l<u||!Do.bidirectional)&&(d0[d]=l,d0[h]=0,Do.useDir&&Do.calcDirMTV()),(l>=u||!Do.bidirectional)&&(d0[d]=-u,d0[h]=0,Do.useDir&&Do.calcDirMTV())))}function f$(){var t=0,e=new at,r=new at,a={minTv:new at,maxTv:new at,useDir:!1,dirMinTv:new at,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){a.touchThreshold=0,i&&i.touchThreshold!=null&&(a.touchThreshold=gp(0,i.touchThreshold)),a.negativeSize=!1,o&&(a.minTv.set(1/0,1/0),a.maxTv.set(0,0),a.useDir=!1,i&&i.direction!=null&&(a.useDir=!0,a.dirMinTv.copy(a.minTv),r.copy(a.minTv),t=i.direction,a.bidirectional=i.bidirectional==null||!!i.bidirectional,a.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var i=a.minTv,o=a.dirMinTv,s=i.y*i.y+i.x*i.x,l=Math.sin(t),u=Math.cos(t),c=l*i.y+u*i.x;if(n(c)){n(i.x)&&n(i.y)&&o.set(0,0);return}if(r.x=s*u/c,r.y=s*l/c,n(r.x)&&n(r.y)){o.set(0,0);return}(a.bidirectional||e.dot(r)>0)&&r.len()<o.len()&&o.copy(r)}};function n(i){return _M(i)<1e-10}return a}var h$="silent";function tfe(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:rfe}}function rfe(){ec(this.event)}var afe=(function(t){ia(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.handler=null,r}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e})(ws),kg=(function(){function t(e,r){this.x=e,this.y=r}return t})(),nfe=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],zC=new ot(0,0,0,0),v$=(function(t){ia(e,t);function e(r,a,n,i,o){var s=t.call(this)||this;return s._hovered=new kg(0,0),s.storage=r,s.painter=a,s.painterRoot=i,s._pointerSize=o,n=n||new afe,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new Ode(s),s}return e.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(z(nfe,function(a){r.on&&r.on(a,this[a],this)},this),r.handler=this),this.proxy=r},e.prototype.mousemove=function(r){var a=r.zrX,n=r.zrY,i=p$(this,a,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new kg(a,n):this.findHover(a,n),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),u&&u!==s&&this.dispatchToElement(l,"mouseover",r)},e.prototype.mouseout=function(r){var a=r.zrEventControl;a!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),a!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},e.prototype.resize=function(){this._hovered=new kg(0,0)},e.prototype.dispatch=function(r,a){var n=this[r];n&&n.call(this,a)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(r){var a=this.proxy;a.setCursor&&a.setCursor(r)},e.prototype.dispatchToElement=function(r,a,n){r=r||{};var i=r.target;if(!(i&&i.silent)){for(var o="on"+a,s=tfe(a,r,n);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(a,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(a,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(a,s)}))}},e.prototype.findHover=function(r,a,n){var i=this.storage.getDisplayList(),o=new kg(r,a);if(_4(i,o,r,a,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new ot(r-u,a-u,l,l),d=i.length-1;d>=0;d--){var h=i[d];h!==n&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(zC.copy(h.getBoundingRect()),h.transform&&zC.applyTransform(h.transform),zC.intersect(c)&&s.push(h))}if(s.length)for(var v=4,m=Math.PI/12,x=Math.PI*2,b=0;b<u;b+=v)for(var w=0;w<x;w+=m){var _=r+b*Math.cos(w),T=a+b*Math.sin(w);if(_4(s,o,_,T,n),o.target)return o}}return o},e.prototype.processGesture=function(r,a){this._gestureMgr||(this._gestureMgr=new qde);var n=this._gestureMgr;a==="start"&&n.clear();var i=n.recognize(r,this.findHover(r.zrX,r.zrY,null).target,this.proxy.dom);if(a==="end"&&n.clear(),i){var o=i.type;r.gestureEvent=o;var s=new kg;s.target=i.target,this.dispatchToElement(s,o,i.event)}},e})(ws);z(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){v$.prototype[t]=function(e){var r=e.zrX,a=e.zrY,n=p$(this,r,a),i,o;if((t!=="mouseup"||!n)&&(i=this.findHover(r,a),o=i.target),t==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(t==="mouseup")this._upEl=o;else if(t==="click"){if(this._downEl!==this._upEl||!this._downPoint||cd(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}});function ife(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var a=t,n=void 0,i=!1;a;){if(a.ignoreClip&&(i=!0),!i){var o=a.getClipPath();if(o&&!o.contain(e,r))return!1}a.silent&&(n=!0);var s=a.__hostTarget;a=s?a.ignoreHostSilent?null:s:a.parent}return n?h$:!0}return!1}function _4(t,e,r,a,n){for(var i=t.length-1;i>=0;i--){var o=t[i],s=void 0;if(o!==n&&!o.ignore&&(s=ife(o,r,a))&&(!e.topTarget&&(e.topTarget=o),s!==h$)){e.target=o;break}}}function p$(t,e,r){var a=t.painter;return e<0||e>a.getWidth()||r<0||r>a.getHeight()}var m$=32,Ng=7;function ofe(t){for(var e=0;t>=m$;)e|=t&1,t>>=1;return t+e}function T4(t,e,r,a){var n=e+1;if(n===r)return 1;if(a(t[n++],t[e])<0){for(;n<r&&a(t[n],t[n-1])<0;)n++;sfe(t,e,n)}else for(;n<r&&a(t[n],t[n-1])>=0;)n++;return n-e}function sfe(t,e,r){for(r--;e<r;){var a=t[e];t[e++]=t[r],t[r--]=a}}function C4(t,e,r,a,n){for(a===e&&a++;a<r;a++){for(var i=t[a],o=e,s=a,l;o<s;)l=o+s>>>1,n(i,t[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=i}}function BC(t,e,r,a,n,i){var o=0,s=0,l=1;if(i(t,e[r+n])>0){for(s=a-n;l<s&&i(t,e[r+n+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;l<s&&i(t,e[r+n-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o<l;){var c=o+(l-o>>>1);i(t,e[r+c])>0?o=c+1:l=c}return l}function VC(t,e,r,a,n,i){var o=0,s=0,l=1;if(i(t,e[r+n])<0){for(s=n+1;l<s&&i(t,e[r+n-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=a-n;l<s&&i(t,e[r+n+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o<l;){var c=o+(l-o>>>1);i(t,e[r+c])<0?l=c:o=c+1}return l}function lfe(t,e){var r=Ng,a,n,i=0,o=[];a=[],n=[];function s(v,m){a[i]=v,n[i]=m,i+=1}function l(){for(;i>1;){var v=i-2;if(v>=1&&n[v-1]<=n[v]+n[v+1]||v>=2&&n[v-2]<=n[v]+n[v-1])n[v-1]<n[v+1]&&v--;else if(n[v]>n[v+1])break;c(v)}}function u(){for(;i>1;){var v=i-2;v>0&&n[v-1]<n[v+1]&&v--,c(v)}}function c(v){var m=a[v],x=n[v],b=a[v+1],w=n[v+1];n[v]=x+w,v===i-3&&(a[v+1]=a[v+2],n[v+1]=n[v+2]),i--;var _=VC(t[b],t,m,x,0,e);m+=_,x-=_,x!==0&&(w=BC(t[m+x-1],t,b,w,w-1,e),w!==0&&(x<=w?d(m,x,b,w):h(m,x,b,w)))}function d(v,m,x,b){var w=0;for(w=0;w<m;w++)o[w]=t[v+w];var _=0,T=x,C=v;if(t[C++]=t[T++],--b===0){for(w=0;w<m;w++)t[C+w]=o[_+w];return}if(m===1){for(w=0;w<b;w++)t[C+w]=t[T+w];t[C+b]=o[_];return}for(var k=r,A,M,L;;){A=0,M=0,L=!1;do if(e(t[T],o[_])<0){if(t[C++]=t[T++],M++,A=0,--b===0){L=!0;break}}else if(t[C++]=o[_++],A++,M=0,--m===1){L=!0;break}while((A|M)<k);if(L)break;do{if(A=VC(t[T],o,_,m,0,e),A!==0){for(w=0;w<A;w++)t[C+w]=o[_+w];if(C+=A,_+=A,m-=A,m<=1){L=!0;break}}if(t[C++]=t[T++],--b===0){L=!0;break}if(M=BC(o[_],t,T,b,0,e),M!==0){for(w=0;w<M;w++)t[C+w]=t[T+w];if(C+=M,T+=M,b-=M,b===0){L=!0;break}}if(t[C++]=o[_++],--m===1){L=!0;break}k--}while(A>=Ng||M>=Ng);if(L)break;k<0&&(k=0),k+=2}if(r=k,r<1&&(r=1),m===1){for(w=0;w<b;w++)t[C+w]=t[T+w];t[C+b]=o[_]}else{if(m===0)throw new Error;for(w=0;w<m;w++)t[C+w]=o[_+w]}}function h(v,m,x,b){var w=0;for(w=0;w<b;w++)o[w]=t[x+w];var _=v+m-1,T=b-1,C=x+b-1,k=0,A=0;if(t[C--]=t[_--],--m===0){for(k=C-(b-1),w=0;w<b;w++)t[k+w]=o[w];return}if(b===1){for(C-=m,_-=m,A=C+1,k=_+1,w=m-1;w>=0;w--)t[A+w]=t[k+w];t[C]=o[T];return}for(var M=r;;){var L=0,R=0,P=!1;do if(e(o[T],t[_])<0){if(t[C--]=t[_--],L++,R=0,--m===0){P=!0;break}}else if(t[C--]=o[T--],R++,L=0,--b===1){P=!0;break}while((L|R)<M);if(P)break;do{if(L=m-VC(o[T],t,v,m,m-1,e),L!==0){for(C-=L,_-=L,m-=L,A=C+1,k=_+1,w=L-1;w>=0;w--)t[A+w]=t[k+w];if(m===0){P=!0;break}}if(t[C--]=o[T--],--b===1){P=!0;break}if(R=b-BC(t[_],o,0,b,b-1,e),R!==0){for(C-=R,T-=R,b-=R,A=C+1,k=T+1,w=0;w<R;w++)t[A+w]=o[k+w];if(b<=1){P=!0;break}}if(t[C--]=t[_--],--m===0){P=!0;break}M--}while(L>=Ng||R>=Ng);if(P)break;M<0&&(M=0),M+=2}if(r=M,r<1&&(r=1),b===1){for(C-=m,_-=m,A=C+1,k=_+1,w=m-1;w>=0;w--)t[A+w]=t[k+w];t[C]=o[T]}else{if(b===0)throw new Error;for(k=C-(b-1),w=0;w<b;w++)t[k+w]=o[w]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function cw(t,e,r,a){r||(r=0),a||(a=t.length);var n=a-r;if(!(n<2)){var i=0;if(n<m$){i=T4(t,r,a,e),C4(t,r,a,r+i,e);return}var o=lfe(t,e),s=ofe(n);do{if(i=T4(t,r,a,e),i<s){var l=n;l>s&&(l=s),C4(t,r,r+l,r+i,e),i=l}o.pushRun(r,i),o.mergeRuns(),n-=i,r+=i}while(n!==0);o.forceMergeRuns()}}var Lo=1,f0=2,ap=4,k4=!1;function FC(){k4||(k4=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function N4(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var ufe=(function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=N4}return t.prototype.traverse=function(e,r){for(var a=0;a<this._roots.length;a++)this._roots[a].traverse(e,r)},t.prototype.getDisplayList=function(e,r){r=r||!1;var a=this._displayList;return(e||!a.length)&&this.updateDisplayList(r),a},t.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var r=this._roots,a=this._displayList,n=0,i=r.length;n<i;n++)this._updateAndAddDisplayable(r[n],null,e);a.length=this._displayListLen,cw(a,N4)},t.prototype._updateAndAddDisplayable=function(e,r,a){if(!(e.ignore&&!a)){e.beforeUpdate(),e.update(),e.afterUpdate();var n=e.getClipPath(),i=r&&r.length,o=0,s=e.__clipPaths;if(!e.ignoreClip&&(i||n)){if(s||(s=e.__clipPaths=[]),i)for(var l=0;l<r.length;l++)s[o++]=r[l];for(var u=n,c=e;u;)u.parent=c,u.updateTransform(),s[o++]=u,c=u,u=u.getClipPath()}if(s&&(s.length=o),e.childrenRef){for(var d=e.childrenRef(),h=0;h<d.length;h++){var v=d[h];e.__dirty&&(v.__dirty|=Lo),this._updateAndAddDisplayable(v,s,a)}e.__dirty=0}else{var m=e;isNaN(m.z)&&(FC(),m.z=0),isNaN(m.z2)&&(FC(),m.z2=0),isNaN(m.zlevel)&&(FC(),m.zlevel=0),this._displayList[this._displayListLen++]=m}var x=e.getDecalElement&&e.getDecalElement();x&&this._updateAndAddDisplayable(x,s,a);var b=e.getTextGuideLine();b&&this._updateAndAddDisplayable(b,s,a);var w=e.getTextContent();w&&this._updateAndAddDisplayable(w,s,a)}},t.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},t.prototype.delRoot=function(e){if(e instanceof Array){for(var r=0,a=e.length;r<a;r++)this.delRoot(e[r]);return}var n=St(this._roots,e);n>=0&&this._roots.splice(n,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t})(),Zw;Zw=Ut.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var R0={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)))},elasticOut:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/a)+1)},elasticInOut:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-R0.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?R0.bounceIn(t*2)*.5:R0.bounceOut(t*2-1)*.5+.5}},Cb=Math.pow,_d=Math.sqrt,Kw=1e-8,g$=1e-4,A4=_d(3),kb=1/3,Ll=Hh(),ls=Hh(),Cp=Hh();function hd(t){return t>-Kw&&t<Kw}function y$(t){return t>Kw||t<-Kw}function Wn(t,e,r,a,n){var i=1-n;return i*i*(i*t+3*n*e)+n*n*(n*a+3*i*r)}function M4(t,e,r,a,n){var i=1-n;return 3*(((e-t)*i+2*(r-e)*n)*i+(a-r)*n*n)}function Qw(t,e,r,a,n,i){var o=a+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-n,c=s*s-3*o*l,d=s*l-9*o*u,h=l*l-3*s*u,v=0;if(hd(c)&&hd(d))if(hd(s))i[0]=0;else{var m=-l/s;m>=0&&m<=1&&(i[v++]=m)}else{var x=d*d-4*c*h;if(hd(x)){var b=d/c,m=-s/o+b,w=-b/2;m>=0&&m<=1&&(i[v++]=m),w>=0&&w<=1&&(i[v++]=w)}else if(x>0){var _=_d(x),T=c*s+1.5*o*(-d+_),C=c*s+1.5*o*(-d-_);T<0?T=-Cb(-T,kb):T=Cb(T,kb),C<0?C=-Cb(-C,kb):C=Cb(C,kb);var m=(-s-(T+C))/(3*o);m>=0&&m<=1&&(i[v++]=m)}else{var k=(2*c*s-3*o*d)/(2*_d(c*c*c)),A=Math.acos(k)/3,M=_d(c),L=Math.cos(A),m=(-s-2*M*L)/(3*o),w=(-s+M*(L+A4*Math.sin(A)))/(3*o),R=(-s+M*(L-A4*Math.sin(A)))/(3*o);m>=0&&m<=1&&(i[v++]=m),w>=0&&w<=1&&(i[v++]=w),R>=0&&R<=1&&(i[v++]=R)}}return v}function x$(t,e,r,a,n){var i=6*r-12*e+6*t,o=9*e+3*a-3*t-9*r,s=3*e-3*t,l=0;if(hd(o)){if(y$(i)){var u=-s/i;u>=0&&u<=1&&(n[l++]=u)}}else{var c=i*i-4*o*s;if(hd(c))n[0]=-i/(2*o);else if(c>0){var d=_d(c),u=(-i+d)/(2*o),h=(-i-d)/(2*o);u>=0&&u<=1&&(n[l++]=u),h>=0&&h<=1&&(n[l++]=h)}}return l}function Ed(t,e,r,a,n,i){var o=(e-t)*n+t,s=(r-e)*n+e,l=(a-r)*n+r,u=(s-o)*n+o,c=(l-s)*n+s,d=(c-u)*n+u;i[0]=t,i[1]=o,i[2]=u,i[3]=d,i[4]=d,i[5]=c,i[6]=l,i[7]=a}function b$(t,e,r,a,n,i,o,s,l,u,c){var d,h=.005,v=1/0,m,x,b,w;Ll[0]=l,Ll[1]=u;for(var _=0;_<1;_+=.05)ls[0]=Wn(t,r,n,o,_),ls[1]=Wn(e,a,i,s,_),b=gh(Ll,ls),b<v&&(d=_,v=b);v=1/0;for(var T=0;T<32&&!(h<g$);T++)m=d-h,x=d+h,ls[0]=Wn(t,r,n,o,m),ls[1]=Wn(e,a,i,s,m),b=gh(ls,Ll),m>=0&&b<v?(d=m,v=b):(Cp[0]=Wn(t,r,n,o,x),Cp[1]=Wn(e,a,i,s,x),w=gh(Cp,Ll),x<=1&&w<v?(d=x,v=w):h*=.5);return c&&(c[0]=Wn(t,r,n,o,d),c[1]=Wn(e,a,i,s,d)),_d(v)}function cfe(t,e,r,a,n,i,o,s,l){for(var u=t,c=e,d=0,h=1/l,v=1;v<=l;v++){var m=v*h,x=Wn(t,r,n,o,m),b=Wn(e,a,i,s,m),w=x-u,_=b-c;d+=Math.sqrt(w*w+_*_),u=x,c=b}return d}function ii(t,e,r,a){var n=1-a;return n*(n*t+2*a*e)+a*a*r}function CM(t,e,r,a){return 2*((1-a)*(e-t)+a*(r-e))}function dfe(t,e,r,a,n){var i=t-2*e+r,o=2*(e-t),s=t-a,l=0;if(hd(i)){if(y$(o)){var u=-s/o;u>=0&&u<=1&&(n[l++]=u)}}else{var c=o*o-4*i*s;if(hd(c)){var u=-o/(2*i);u>=0&&u<=1&&(n[l++]=u)}else if(c>0){var d=_d(c),u=(-o+d)/(2*i),h=(-o-d)/(2*i);u>=0&&u<=1&&(n[l++]=u),h>=0&&h<=1&&(n[l++]=h)}}return l}function w$(t,e,r){var a=t+r-2*e;return a===0?.5:(t-e)/a}function ry(t,e,r,a,n){var i=(e-t)*a+t,o=(r-e)*a+e,s=(o-i)*a+i;n[0]=t,n[1]=i,n[2]=s,n[3]=s,n[4]=o,n[5]=r}function S$(t,e,r,a,n,i,o,s,l){var u,c=.005,d=1/0;Ll[0]=o,Ll[1]=s;for(var h=0;h<1;h+=.05){ls[0]=ii(t,r,n,h),ls[1]=ii(e,a,i,h);var v=gh(Ll,ls);v<d&&(u=h,d=v)}d=1/0;for(var m=0;m<32&&!(c<g$);m++){var x=u-c,b=u+c;ls[0]=ii(t,r,n,x),ls[1]=ii(e,a,i,x);var v=gh(ls,Ll);if(x>=0&&v<d)u=x,d=v;else{Cp[0]=ii(t,r,n,b),Cp[1]=ii(e,a,i,b);var w=gh(Cp,Ll);b<=1&&w<d?(u=b,d=w):c*=.5}}return l&&(l[0]=ii(t,r,n,u),l[1]=ii(e,a,i,u)),_d(d)}function ffe(t,e,r,a,n,i,o){for(var s=t,l=e,u=0,c=1/o,d=1;d<=o;d++){var h=d*c,v=ii(t,r,n,h),m=ii(e,a,i,h),x=v-s,b=m-l;u+=Math.sqrt(x*x+b*b),s=v,l=m}return u}var hfe=/cubic-bezier\(([0-9,\.e ]+)\)/;function ZE(t){var e=t&&hfe.exec(t);if(e){var r=e[1].split(","),a=+vs(r[0]),n=+vs(r[1]),i=+vs(r[2]),o=+vs(r[3]);if(isNaN(a+n+i+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Qw(0,a,i,1,l,s)&&Wn(0,n,o,1,s[0])}}}var vfe=(function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||en,this.ondestroy=e.ondestroy||en,this.onrestart=e.onrestart||en,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var a=this._life,n=e-this._startTime-this._pausedTime,i=n/a;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=n%a;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Ke(e)?e:R0[e]||ZE(e)},t})(),_$=(function(){function t(e){this.value=e}return t})(),pfe=(function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new _$(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,a=e.next;r?r.next=a:this.head=a,a?a.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t})(),Vp=(function(){function t(e){this._list=new pfe,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var a=this._list,n=this._map,i=null;if(n[e]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete n[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new _$(r),s.key=e,a.insertEntry(s),n[e]=s}return i},t.prototype.get=function(e){var r=this._map[e],a=this._list;if(r!=null)return r!==a.tail&&(a.remove(r),a.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t})(),D4={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function $s(t){return t=Math.round(t),t<0?0:t>255?255:t}function mfe(t){return t=Math.round(t),t<0?0:t>360?360:t}function ay(t){return t<0?0:t>1?1:t}function GC(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?$s(parseFloat(e)/100*255):$s(parseInt(e,10))}function Td(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?ay(parseFloat(e)/100):ay(parseFloat(e))}function HC(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function vd(t,e,r){return t+(e-t)*r}function as(t,e,r,a,n){return t[0]=e,t[1]=r,t[2]=a,t[3]=n,t}function kM(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var T$=new Vp(20),Nb=null;function Mv(t,e){Nb&&kM(Nb,e),Nb=T$.put(t,Nb||e.slice())}function ho(t,e){if(t){e=e||[];var r=T$.get(t);if(r)return kM(e,r);t=t+"";var a=t.replace(/ /g,"").toLowerCase();if(a in D4)return kM(e,D4[a]),Mv(t,e),e;var n=a.length;if(a.charAt(0)==="#"){if(n===4||n===5){var i=parseInt(a.slice(1,4),16);if(!(i>=0&&i<=4095)){as(e,0,0,0,1);return}return as(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,n===5?parseInt(a.slice(4),16)/15:1),Mv(t,e),e}else if(n===7||n===9){var i=parseInt(a.slice(1,7),16);if(!(i>=0&&i<=16777215)){as(e,0,0,0,1);return}return as(e,(i&16711680)>>16,(i&65280)>>8,i&255,n===9?parseInt(a.slice(7),16)/255:1),Mv(t,e),e}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===n){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?as(e,+u[0],+u[1],+u[2],1):as(e,0,0,0,1);c=Td(u.pop());case"rgb":if(u.length>=3)return as(e,GC(u[0]),GC(u[1]),GC(u[2]),u.length===3?c:Td(u[3])),Mv(t,e),e;as(e,0,0,0,1);return;case"hsla":if(u.length!==4){as(e,0,0,0,1);return}return u[3]=Td(u[3]),NM(u,e),Mv(t,e),e;case"hsl":if(u.length!==3){as(e,0,0,0,1);return}return NM(u,e),Mv(t,e),e;default:return}}as(e,0,0,0,1)}}function NM(t,e){var r=(parseFloat(t[0])%360+360)%360/360,a=Td(t[1]),n=Td(t[2]),i=n<=.5?n*(a+1):n+a-n*a,o=n*2-i;return e=e||[],as(e,$s(HC(o,i,r+1/3)*255),$s(HC(o,i,r)*255),$s(HC(o,i,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function gfe(t){if(t){var e=t[0]/255,r=t[1]/255,a=t[2]/255,n=Math.min(e,r,a),i=Math.max(e,r,a),o=i-n,s=(i+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+n):u=o/(2-i-n);var c=((i-e)/6+o/2)/o,d=((i-r)/6+o/2)/o,h=((i-a)/6+o/2)/o;e===i?l=h-d:r===i?l=1/3+c-h:a===i&&(l=2/3+d-c),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return t[3]!=null&&v.push(t[3]),v}}function AM(t,e){var r=ho(t);if(r){for(var a=0;a<3;a++)e<0?r[a]=r[a]*(1-e)|0:r[a]=(255-r[a])*e+r[a]|0,r[a]>255?r[a]=255:r[a]<0&&(r[a]=0);return $l(r,r.length===4?"rgba":"rgb")}}function UC(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var a=t*(e.length-1),n=Math.floor(a),i=Math.ceil(a),o=e[n],s=e[i],l=a-n;return r[0]=$s(vd(o[0],s[0],l)),r[1]=$s(vd(o[1],s[1],l)),r[2]=$s(vd(o[2],s[2],l)),r[3]=ay(vd(o[3],s[3],l)),r}}function yfe(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var a=t*(e.length-1),n=Math.floor(a),i=Math.ceil(a),o=ho(e[n]),s=ho(e[i]),l=a-n,u=$l([$s(vd(o[0],s[0],l)),$s(vd(o[1],s[1],l)),$s(vd(o[2],s[2],l)),ay(vd(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:n,rightIndex:i,value:a}:u}}function Cd(t,e,r,a){var n=ho(t);if(t)return n=gfe(n),e!=null&&(n[0]=mfe(Ke(e)?e(n[0]):e)),r!=null&&(n[1]=Td(Ke(r)?r(n[1]):r)),a!=null&&(n[2]=Td(Ke(a)?a(n[2]):a)),$l(NM(n),"rgba")}function Jw(t,e){var r=ho(t);if(r&&e!=null)return r[3]=ay(e),$l(r,"rgba")}function $l(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function eS(t,e){var r=ho(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}var L4=new Vp(100);function MM(t){if(Ie(t)){var e=L4.get(t);return e||(e=AM(t,-.1),L4.put(t,e)),e}else if(k_(t)){var r=ve({},t);return r.colorStops=Se(t.colorStops,function(a){return{offset:a.offset,color:AM(a.color,-.1)}}),r}return t}var tS=Math.round;function ny(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=ho(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e??1}}var E4=1e-4;function pd(t){return t<E4&&t>-E4}function Ab(t){return tS(t*1e3)/1e3}function DM(t){return tS(t*1e4)/1e4}function xfe(t){return"matrix("+Ab(t[0])+","+Ab(t[1])+","+Ab(t[2])+","+Ab(t[3])+","+DM(t[4])+","+DM(t[5])+")"}var bfe={left:"start",right:"end",center:"middle",middle:"middle"};function wfe(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function Sfe(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function _fe(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function C$(t){return t&&!!t.image}function Tfe(t){return t&&!!t.svgElement}function KE(t){return C$(t)||Tfe(t)}function k$(t){return t.type==="linear"}function N$(t){return t.type==="radial"}function A$(t){return t&&(t.type==="linear"||t.type==="radial")}function L_(t){return"url(#"+t+")"}function M$(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function D$(t){var e=t.x||0,r=t.y||0,a=(t.rotation||0)*sw,n=$e(t.scaleX,1),i=$e(t.scaleY,1),o=t.skewX||0,s=t.skewY||0,l=[];return(e||r)&&l.push("translate("+e+"px,"+r+"px)"),a&&l.push("rotate("+a+")"),(n!==1||i!==1)&&l.push("scale("+n+","+i+")"),(o||s)&&l.push("skew("+tS(o*sw)+"deg, "+tS(s*sw)+"deg)"),l.join(" ")}var Cfe=(function(){return Ut.hasGlobalWindow&&Ke(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}})(),LM=Array.prototype.slice;function zu(t,e,r){return(e-t)*r+t}function $C(t,e,r,a){for(var n=e.length,i=0;i<n;i++)t[i]=zu(e[i],r[i],a);return t}function kfe(t,e,r,a){for(var n=e.length,i=n&&e[0].length,o=0;o<n;o++){t[o]||(t[o]=[]);for(var s=0;s<i;s++)t[o][s]=zu(e[o][s],r[o][s],a)}return t}function Mb(t,e,r,a){for(var n=e.length,i=0;i<n;i++)t[i]=e[i]+r[i]*a;return t}function R4(t,e,r,a){for(var n=e.length,i=n&&e[0].length,o=0;o<n;o++){t[o]||(t[o]=[]);for(var s=0;s<i;s++)t[o][s]=e[o][s]+r[o][s]*a}return t}function Nfe(t,e){for(var r=t.length,a=e.length,n=r>a?e:t,i=Math.min(r,a),o=n[i-1]||{color:[0,0,0,0],offset:0},s=i;s<Math.max(r,a);s++)n.push({offset:o.offset,color:o.color.slice()})}function Afe(t,e,r){var a=t,n=e;if(!(!a.push||!n.push)){var i=a.length,o=n.length;if(i!==o){var s=i>o;if(s)a.length=o;else for(var l=i;l<o;l++)a.push(r===1?n[l]:LM.call(n[l]))}for(var u=a[0]&&a[0].length,l=0;l<a.length;l++)if(r===1)isNaN(a[l])&&(a[l]=n[l]);else for(var c=0;c<u;c++)isNaN(a[l][c])&&(a[l][c]=n[l][c])}}function P0(t){if(Ri(t)){var e=t.length;if(Ri(t[0])){for(var r=[],a=0;a<e;a++)r.push(LM.call(t[a]));return r}return LM.call(t)}return t}function dw(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=t[3]==null?1:t[3],"rgba("+t.join(",")+")"}function Mfe(t){return Ri(t&&t[0])?2:1}var Db=0,fw=1,L$=2,h0=3,EM=4,RM=5,P4=6;function I4(t){return t===EM||t===RM}function Lb(t){return t===fw||t===L$}var Ag=[0,0,0,0],Dfe=(function(){function t(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,a){this._needsSort=!0;var n=this.keyframes,i=n.length,o=!1,s=P4,l=r;if(Ri(r)){var u=Mfe(r);s=u,(u===1&&!qt(r[0])||u===2&&!qt(r[0][0]))&&(o=!0)}else if(qt(r)&&!Ei(r))s=Db;else if(Ie(r))if(!isNaN(+r))s=Db;else{var c=ho(r);c&&(l=c,s=h0)}else if(k_(r)){var d=ve({},l);d.colorStops=Se(r.colorStops,function(v){return{offset:v.offset,color:ho(v.color)}}),k$(r)?s=EM:N$(r)&&(s=RM),l=d}i===0?this.valType=s:(s!==this.valType||s===P4)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:r,percent:0};return a&&(h.easing=a,h.easingFunc=Ke(a)?a:R0[a]||ZE(a)),n.push(h),h},t.prototype.prepare=function(e,r){var a=this.keyframes;this._needsSort&&a.sort(function(x,b){return x.time-b.time});for(var n=this.valType,i=a.length,o=a[i-1],s=this.discrete,l=Lb(n),u=I4(n),c=0;c<i;c++){var d=a[c],h=d.value,v=o.value;d.percent=d.time/e,s||(l&&c!==i-1?Afe(h,v,n):u&&Nfe(h.colorStops,v.colorStops))}if(!s&&n!==RM&&r&&this.needsAnimate()&&r.needsAnimate()&&n===r.valType&&!r._finished){this._additiveTrack=r;for(var m=a[0].value,c=0;c<i;c++)n===Db?a[c].additiveValue=a[c].value-m:n===h0?a[c].additiveValue=Mb([],a[c].value,m,-1):Lb(n)&&(a[c].additiveValue=n===fw?Mb([],a[c].value,m,-1):R4([],a[c].value,m,-1))}},t.prototype.step=function(e,r){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var a=this._additiveTrack!=null,n=a?"additiveValue":"value",i=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=i===h0,c,d=this._lastFr,h=Math.min,v,m;if(s===1)v=m=o[0];else{if(r<0)c=0;else if(r<this._lastFrP){var x=h(d+1,s-1);for(c=x;c>=0&&!(o[c].percent<=r);c--);c=h(c,s-2)}else{for(c=d;c<s&&!(o[c].percent>r);c++);c=h(c-1,s-2)}m=o[c+1],v=o[c]}if(v&&m){this._lastFr=c,this._lastFrP=r;var b=m.percent-v.percent,w=b===0?1:h((r-v.percent)/b,1);m.easingFunc&&(w=m.easingFunc(w));var _=a?this._additiveValue:u?Ag:e[l];if((Lb(i)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)e[l]=w<1?v.rawValue:m.rawValue;else if(Lb(i))i===fw?$C(_,v[n],m[n],w):kfe(_,v[n],m[n],w);else if(I4(i)){var T=v[n],C=m[n],k=i===EM;e[l]={type:k?"linear":"radial",x:zu(T.x,C.x,w),y:zu(T.y,C.y,w),colorStops:Se(T.colorStops,function(M,L){var R=C.colorStops[L];return{offset:zu(M.offset,R.offset,w),color:dw($C([],M.color,R.color,w))}}),global:C.global},k?(e[l].x2=zu(T.x2,C.x2,w),e[l].y2=zu(T.y2,C.y2,w)):e[l].r=zu(T.r,C.r,w)}else if(u)$C(_,v[n],m[n],w),a||(e[l]=dw(_));else{var A=zu(v[n],m[n],w);a?this._additiveValue=A:e[l]=A}a&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,a=this.propName,n=this._additiveValue;r===Db?e[a]=e[a]+n:r===h0?(ho(e[a],Ag),Mb(Ag,Ag,n,1),e[a]=dw(Ag)):r===fw?Mb(e[a],e[a],n,1):r===L$&&R4(e[a],e[a],n,1)},t})(),QE=(function(){function t(e,r,a,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&n){UE("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=a}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,a){return this.whenWithKeys(e,r,Wt(r),a)},t.prototype.whenWithKeys=function(e,r,a,n){for(var i=this._tracks,o=0;o<a.length;o++){var s=a[o],l=i[s];if(!l){l=i[s]=new Dfe(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var d=c.keyframes,h=d[d.length-1];u=h&&h.value,c.valType===h0&&u&&(u=dw(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,P0(u),n),this._trackKeys.push(s)}l.addKeyframe(e,P0(r[s]),n)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,a=0;a<r;a++)e[a].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,r=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,r)for(var a=0;a<r.length;a++)r[a].call(this)},t.prototype._setTracksFinished=function(){for(var e=this._tracks,r=this._trackKeys,a=0;a<r.length;a++)e[r[a]].setFinished()},t.prototype._getAdditiveTrack=function(e){var r,a=this._additiveAnimators;if(a)for(var n=0;n<a.length;n++){var i=a[n].getTrack(e);i&&(r=i)}return r},t.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var r=this,a=[],n=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(n,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var d=u[c-1];d&&(r._target[s.propName]=d.rawValue),s.setFinished()}else a.push(s)}if(a.length||this._force){var h=new vfe({life:n,loop:this._loop,delay:this._delay||0,onframe:function(v){r._started=2;var m=r._additiveAnimators;if(m){for(var x=!1,b=0;b<m.length;b++)if(m[b]._clip){x=!0;break}x||(r._additiveAnimators=null)}for(var b=0;b<a.length;b++)a[b].step(r._target,v);var w=r._onframeCbs;if(w)for(var b=0;b<w.length;b++)w[b](r._target,v)},ondestroy:function(){r._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),e&&h.setEasing(e)}else this._doneCallback();return this}},t.prototype.stop=function(e){if(this._clip){var r=this._clip;e&&r.onframe(1),this._abortedCallback()}},t.prototype.delay=function(e){return this._delay=e,this},t.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},t.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},t.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(e){return this._tracks[e]},t.prototype.getTracks=function(){var e=this;return Se(this._trackKeys,function(r){return e._tracks[r]})},t.prototype.stopTracks=function(e,r){if(!e.length||!this._clip)return!0;for(var a=this._tracks,n=this._trackKeys,i=0;i<e.length;i++){var o=a[e[i]];o&&!o.isFinished()&&(r?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,i=0;i<n.length;i++)if(!a[n[i]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},t.prototype.saveTo=function(e,r,a){if(e){r=r||this._trackKeys;for(var n=0;n<r.length;n++){var i=r[n],o=this._tracks[i];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[a?0:s.length-1];l&&(e[i]=P0(l.rawValue))}}}},t.prototype.__changeFinalValue=function(e,r){r=r||Wt(e);for(var a=0;a<r.length;a++){var n=r[a],i=this._tracks[n];if(i){var o=i.keyframes;if(o.length>1){var s=o.pop();i.addKeyframe(s.time,e[n]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},t})();function yp(){return new Date().getTime()}var Lfe=(function(t){ia(e,t);function e(r){var a=t.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,r=r||{},a.stage=r.stage||{},a}return e.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},e.prototype.addAnimator=function(r){r.animation=this;var a=r.getClip();a&&this.addClip(a)},e.prototype.removeClip=function(r){if(r.animation){var a=r.prev,n=r.next;a?a.next=n:this._head=n,n?n.prev=a:this._tail=a,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var a=r.getClip();a&&this.removeClip(a),r.animation=null},e.prototype.update=function(r){for(var a=yp()-this._pausedTime,n=a-this._time,i=this._head;i;){var o=i.next,s=i.step(a,n);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=a,r||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function a(){r._running&&(Zw(a),!r._paused&&r.update())}Zw(a)},e.prototype.start=function(){this._running||(this._time=yp(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=yp(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=yp()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var a=r.next;r.prev=r.next=r.animation=null,r=a}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,a){a=a||{},this.start();var n=new QE(r,a.loop);return this.addAnimator(n),n},e})(ws),Efe=300,WC=Ut.domSupported,YC=(function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=Se(t,function(n){var i=n.replace("mouse","pointer");return r.hasOwnProperty(i)?i:n});return{mouse:t,touch:e,pointer:a}})(),j4={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},O4=!1;function PM(t){var e=t.pointerType;return e==="pen"||e==="touch"}function Rfe(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function XC(t){t&&(t.zrByTouch=!0)}function Pfe(t,e){return ns(t.dom,new Ife(t,e),!0)}function E$(t,e){for(var r=e,a=!1;r&&r.nodeType!==9&&!(a=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return a}var Ife=(function(){function t(e,r){this.stopPropagation=en,this.stopImmediatePropagation=en,this.preventDefault=en,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t})(),Bs={mousedown:function(t){t=ns(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=ns(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=ns(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=ns(this.dom,t);var e=t.toElement||t.relatedTarget;E$(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){O4=!0,t=ns(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){O4||(t=ns(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=ns(this.dom,t),XC(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Bs.mousemove.call(this,t),Bs.mousedown.call(this,t)},touchmove:function(t){t=ns(this.dom,t),XC(t),this.handler.processGesture(t,"change"),Bs.mousemove.call(this,t)},touchend:function(t){t=ns(this.dom,t),XC(t),this.handler.processGesture(t,"end"),Bs.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<Efe&&Bs.click.call(this,t)},pointerdown:function(t){Bs.mousedown.call(this,t)},pointermove:function(t){PM(t)||Bs.mousemove.call(this,t)},pointerup:function(t){Bs.mouseup.call(this,t)},pointerout:function(t){PM(t)||Bs.mouseout.call(this,t)}};z(["click","dblclick","contextmenu"],function(t){Bs[t]=function(e){e=ns(this.dom,e),this.trigger(t,e)}});var IM={pointermove:function(t){PM(t)||IM.mousemove.call(this,t)},pointerup:function(t){IM.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function jfe(t,e){var r=e.domHandlers;Ut.pointerEventsSupported?z(YC.pointer,function(a){hw(e,a,function(n){r[a].call(t,n)})}):(Ut.touchEventsSupported&&z(YC.touch,function(a){hw(e,a,function(n){r[a].call(t,n),Rfe(e)})}),z(YC.mouse,function(a){hw(e,a,function(n){n=XE(n),e.touching||r[a].call(t,n)})}))}function Ofe(t,e){Ut.pointerEventsSupported?z(j4.pointer,r):Ut.touchEventsSupported||z(j4.mouse,r);function r(a){function n(i){i=XE(i),E$(t,i.target)||(i=Pfe(t,i),e.domHandlers[a].call(t,i))}hw(e,a,n,{capture:!0})}}function hw(t,e,r,a){t.mounted[e]=r,t.listenerOpts[e]=a,SM(t.domTarget,e,r,a)}function qC(t){var e=t.mounted;for(var r in e)e.hasOwnProperty(r)&&Xde(t.domTarget,r,e[r],t.listenerOpts[r]);t.mounted={}}var z4=(function(){function t(e,r){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=r}return t})(),zfe=(function(t){ia(e,t);function e(r,a){var n=t.call(this)||this;return n.__pointerCapturing=!1,n.dom=r,n.painterRoot=a,n._localHandlerScope=new z4(r,Bs),WC&&(n._globalHandlerScope=new z4(document,IM)),jfe(n,n._localHandlerScope),n}return e.prototype.dispose=function(){qC(this._localHandlerScope),WC&&qC(this._globalHandlerScope)},e.prototype.setCursor=function(r){this.dom.style&&(this.dom.style.cursor=r||"default")},e.prototype.__togglePointerCapture=function(r){if(this.__mayPointerCapture=null,WC&&+this.__pointerCapturing^+r){this.__pointerCapturing=r;var a=this._globalHandlerScope;r?Ofe(this,a):qC(a)}},e})(ws),R$=1;Ut.hasGlobalWindow&&(R$=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var rS=R$,jM=.4,OM="#333",zM="#ccc",Bfe="#eee",B4=M_,V4=5e-5;function Sf(t){return t>V4||t<-V4}var _f=[],Dv=[],ZC=oi(),KC=Math.abs,Gu=(function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return Sf(this.rotation)||Sf(this.x)||Sf(this.y)||Sf(this.scaleX-1)||Sf(this.scaleY-1)||Sf(this.skewX)||Sf(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),a=this.transform;if(!(r||e)){a&&(B4(a),this.invTransform=null);return}a=a||oi(),r?this.getLocalTransform(a):B4(a),e&&(r?Ul(a,e,a):D_(a,e)),this.transform=a,this._resolveGlobalScaleRatio(a)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(_f);var a=_f[0]<0?-1:1,n=_f[1]<0?-1:1,i=((_f[0]-a)*r+a)/_f[0]||0,o=((_f[1]-n)*r+n)/_f[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||oi(),Zs(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],n=Math.atan2(e[1],e[0]),i=Math.PI/2+n-Math.atan2(e[3],e[2]);a=Math.sqrt(a)*Math.cos(i),r=Math.sqrt(r),this.skewX=i,this.skewY=0,this.rotation=-n,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=a,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||oi(),Ul(Dv,e.invTransform,r),r=Dv);var a=this.originX,n=this.originY;(a||n)&&(ZC[4]=a,ZC[5]=n,Ul(Dv,r,ZC),Dv[4]-=a,Dv[5]-=n,r=Dv),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var a=[e,r],n=this.invTransform;return n&&tn(a,a,n),a},t.prototype.transformCoordToGlobal=function(e,r){var a=[e,r],n=this.transform;return n&&tn(a,a,n),a},t.prototype.getLineScale=function(){var e=this.transform;return e&&KC(e[0]-1)>1e-10&&KC(e[3]-1)>1e-10?Math.sqrt(KC(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){aS(this,e)},t.getLocalTransform=function(e,r){r=r||[];var a=e.originX||0,n=e.originY||0,i=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,d=e.y,h=e.skewX?Math.tan(e.skewX):0,v=e.skewY?Math.tan(-e.skewY):0;if(a||n||s||l){var m=a+s,x=n+l;r[4]=-m*i-h*x*o,r[5]=-x*o-v*m*i}else r[4]=r[5]=0;return r[0]=i,r[3]=o,r[1]=v*i,r[2]=h*o,u&&Hd(r,r,u),r[4]+=a+c,r[5]+=n+d,r},t.initDefaultProps=(function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0})(),t})(),Kl=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function aS(t,e){for(var r=0;r<Kl.length;r++){var a=Kl[r];t[a]=e[a]}}function Wl(t){Eb||(Eb=new Vp(100)),t=t||Ju;var e=Eb.get(t);return e||(e={font:t,strWidthCache:new Vp(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:qs.measureText("国",t).width,asciiCharWidth:qs.measureText("a",t).width},Eb.put(t,e)),e}var Eb;function Vfe(t){if(!(QC>=F4)){t=t||Ju;for(var e=[],r=+new Date,a=0;a<=127;a++)e[a]=qs.measureText(String.fromCharCode(a),t).width;var n=+new Date-r;return n>16?QC=F4:n>2&&QC++,e}}var QC=0,F4=5;function P$(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=Vfe(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function Yl(t,e){var r=t.strWidthCache,a=r.get(e);return a==null&&(a=qs.measureText(e,t.font).width,r.put(e,a)),a}function G4(t,e,r,a){var n=Yl(Wl(e),t),i=Uy(e),o=Fp(0,n,r),s=yh(0,i,a),l=new ot(o,s,n,i);return l}function E_(t,e,r,a){var n=((t||"")+"").split(`
`),i=n.length;if(i===1)return G4(n[0],e,r,a);for(var o=new ot(0,0,0,0),s=0;s<n.length;s++){var l=G4(n[s],e,r,a);s===0?o.copy(l):o.union(l)}return o}function Fp(t,e,r,a){return r==="right"?a?t+=e:t-=e:r==="center"&&(a?t+=e/2:t-=e/2),t}function yh(t,e,r,a){return r==="middle"?a?t+=e/2:t-=e/2:r==="bottom"&&(a?t+=e:t-=e),t}function Uy(t){return Wl(t).stWideCharWidth}function Ks(t,e){return typeof t=="string"?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function nS(t,e,r){var a=e.position||"inside",n=e.distance!=null?e.distance:5,i=r.height,o=r.width,s=i/2,l=r.x,u=r.y,c="left",d="top";if(a instanceof Array)l+=Ks(a[0],r.width),u+=Ks(a[1],r.height),c=null,d=null;else switch(a){case"left":l-=n,u+=s,c="right",d="middle";break;case"right":l+=n+o,u+=s,d="middle";break;case"top":l+=o/2,u-=n,c="center",d="bottom";break;case"bottom":l+=o/2,u+=i+n,c="center";break;case"inside":l+=o/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=n,u+=s,d="middle";break;case"insideRight":l+=o-n,u+=s,c="right",d="middle";break;case"insideTop":l+=o/2,u+=n,c="center";break;case"insideBottom":l+=o/2,u+=i-n,c="center",d="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,c="right";break;case"insideBottomLeft":l+=n,u+=i-n,d="bottom";break;case"insideBottomRight":l+=o-n,u+=i-n,c="right",d="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=c,t.verticalAlign=d,t}var JC="__zr_normal__",ek=Kl.concat(["ignore"]),Ffe=ql(Kl,function(t,e){return t[e]=!0,t},{ignore:!1}),Lv={},Gfe=new ot(0,0,0,0),Rb=[],R_=(function(){function t(e){this.id=s$(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,a){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var a=this.textConfig,n=a.local,i=r.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=n?this:null;var u=!1;i.copyTransform(r);var c=a.position!=null,d=a.autoOverflowArea,h=void 0;if((d||c)&&(h=Gfe,a.layoutRect?h.copy(a.layoutRect):h.copy(this.getBoundingRect()),n||h.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Lv,a,h):nS(Lv,a,h),i.x=Lv.x,i.y=Lv.y,o=Lv.align,s=Lv.verticalAlign;var v=a.origin;if(v&&a.rotation!=null){var m=void 0,x=void 0;v==="center"?(m=h.width*.5,x=h.height*.5):(m=Ks(v[0],h.width),x=Ks(v[1],h.height)),u=!0,i.originX=-i.x+m+(n?0:h.x),i.originY=-i.y+x+(n?0:h.y)}}a.rotation!=null&&(i.rotation=a.rotation);var b=a.offset;b&&(i.x+=b[0],i.y+=b[1],u||(i.originX=-b[0],i.originY=-b[1]));var w=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(d){var _=w.overflowRect=w.overflowRect||new ot(0,0,0,0);i.getLocalTransform(Rb),Zs(Rb,Rb),ot.copy(_,h),_.applyTransform(Rb)}else w.overflowRect=null;var T=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,C=void 0,k=void 0,A=void 0;T&&this.canBeInsideText()?(C=a.insideFill,k=a.insideStroke,(C==null||C==="auto")&&(C=this.getInsideTextFill()),(k==null||k==="auto")&&(k=this.getInsideTextStroke(C),A=!0)):(C=a.outsideFill,k=a.outsideStroke,(C==null||C==="auto")&&(C=this.getOutsideFill()),(k==null||k==="auto")&&(k=this.getOutsideStroke(C),A=!0)),C=C||"#000",(C!==w.fill||k!==w.stroke||A!==w.autoStroke||o!==w.align||s!==w.verticalAlign)&&(l=!0,w.fill=C,w.stroke=k,w.autoStroke=A,w.align=o,w.verticalAlign=s,r.setDefaultTextStyle(w)),r.__dirty|=Lo,l&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?zM:OM},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),a=typeof r=="string"&&ho(r);a||(a=[255,255,255,1]);for(var n=a[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)a[o]=a[o]*n+(i?0:255)*(1-n);return a[3]=1,$l(a,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},ve(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(it(e))for(var a=e,n=Wt(a),i=0;i<n.length;i++){var o=n[i];this.attrKV(o,e[o])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var r=this._normalState,a=0;a<this.animators.length;a++){var n=this.animators[a],i=n.__fromStateTransition;if(!(n.getLoop()||i&&i!==JC)){var o=n.targetName,s=o?r[o]:r;n.saveTo(s)}}},t.prototype._innerSaveToNormal=function(e){var r=this._normalState;r||(r=this._normalState={}),e.textConfig&&!r.textConfig&&(r.textConfig=this.textConfig),this._savePrimaryToNormal(e,r,ek)},t.prototype._savePrimaryToNormal=function(e,r,a){for(var n=0;n<a.length;n++){var i=a[n];e[i]!=null&&!(i in r)&&(r[i]=this[i])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(JC,!1,e)},t.prototype.useState=function(e,r,a,n){var i=e===JC,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(St(s,e)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!i){UE("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||n);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!a&&!this.__inHover&&l&&l.duration>0,l);var d=this._textContent,h=this._textGuide;return d&&d.useState(e,r,a,c),h&&h.useState(e,r,a,c),i?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Lo),u}}},t.prototype.useStates=function(e,r,a){if(!e.length)this.clearStates();else{var n=[],i=this.currentStates,o=e.length,s=o===i.length;if(s){for(var l=0;l<o;l++)if(e[l]!==i[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=e[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,e)),c||(c=this.states[u]),c&&n.push(c)}var d=n[o-1],h=!!(d&&d.hoverLayer||a);h&&this._toggleHoverLayerFlag(!0);var v=this._mergeStates(n),m=this.stateTransition;this.saveCurrentToNormalState(v),this._applyStateObj(e.join(","),v,this._normalState,!1,!r&&!this.__inHover&&m&&m.duration>0,m);var x=this._textContent,b=this._textGuide;x&&x.useStates(e,r,h),b&&b.useStates(e,r,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Lo)}},t.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var r=e.__hostTarget;e=r?e.ignoreHostSilent?null:r:e.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var r=this.animators[e];r.targetName&&r.changeTarget(this[r.targetName])}},t.prototype.removeState=function(e){var r=St(this.currentStates,e);if(r>=0){var a=this.currentStates.slice();a.splice(r,1),this.useStates(a)}},t.prototype.replaceState=function(e,r,a){var n=this.currentStates.slice(),i=St(n,e),o=St(n,r)>=0;i>=0?o?n.splice(i,1):n[i]=r:a&&!o&&n.push(r),this.useStates(n)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},a,n=0;n<e.length;n++){var i=e[n];ve(r,i),i.textConfig&&(a=a||{},ve(a,i.textConfig))}return a&&(r.textConfig=a),r},t.prototype._applyStateObj=function(e,r,a,n,i,o){var s=!(r&&n);r&&r.textConfig?(this.textConfig=ve({},n?this.textConfig:a.textConfig),ve(this.textConfig,r.textConfig)):s&&a.textConfig&&(this.textConfig=a.textConfig);for(var l={},u=!1,c=0;c<ek.length;c++){var d=ek[c],h=i&&Ffe[d];r&&r[d]!=null?h?(u=!0,l[d]=r[d]):this[d]=r[d]:s&&a[d]!=null&&(h?(u=!0,l[d]=a[d]):this[d]=a[d])}if(!i)for(var c=0;c<this.animators.length;c++){var v=this.animators[c],m=v.targetName;v.getLoop()||v.__changeFinalValue(m?(r||a)[m]:r||a)}u&&this._transitionState(e,l,o)},t.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var r=this.__zr;r&&e.addSelfToZr(r),e.__zr=r,e.__hostTarget=this}},t.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},t.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(e){var r=this._textContent;r!==e&&(r&&r!==e&&this.removeTextContent(),e.innerTransformable=new Gu,this._attachComponent(e),this._textContent=e,this.markRedraw())},t.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),ve(this.textConfig,e),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=Lo;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var r=this._textContent,a=this._textGuide;r&&(r.__inHover=e),a&&(a.__inHover=e)},t.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var r=this.animators;if(r)for(var a=0;a<r.length;a++)e.animation.addAnimator(r[a]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var r=this.animators;if(r)for(var a=0;a<r.length;a++)e.animation.removeAnimator(r[a]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},t.prototype.animate=function(e,r,a){var n=e?this[e]:this,i=new QE(n,r,a);return e&&(i.targetName=e),this.addAnimator(i,e),i},t.prototype.addAnimator=function(e,r){var a=this.__zr,n=this;e.during(function(){n.updateDuringAnimation(r)}).done(function(){var i=n.animators,o=St(i,e);o>=0&&i.splice(o,1)}),this.animators.push(e),a&&a.animation.addAnimator(e),a&&a.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var a=this.animators,n=a.length,i=[],o=0;o<n;o++){var s=a[o];!e||e===s.scope?s.stop(r):i.push(s)}return this.animators=i,this},t.prototype.animateTo=function(e,r,a){tk(this,e,r,a)},t.prototype.animateFrom=function(e,r,a){tk(this,e,r,a,!0)},t.prototype._transitionState=function(e,r,a,n){for(var i=tk(this,r,a,n),o=0;o<i.length;o++)i[o].__fromStateTransition=e},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=(function(){var e=t.prototype;e.type="element",e.name="",e.ignore=e.silent=e.ignoreHostSilent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=Lo;function r(a,n,i,o){Object.defineProperty(e,a,{get:function(){if(!this[n]){var l=this[n]=[];s(this,l)}return this[n]},set:function(l){this[i]=l[0],this[o]=l[1],this[n]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[i]},set:function(c){l[i]=c}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(c){l[o]=c}})}}Object.defineProperty&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))})(),t})();gn(R_,ws);gn(R_,Gu);function tk(t,e,r,a,n){r=r||{};var i=[];I$(t,"",t,e,r,a,i,n);var o=i.length,s=!1,l=r.done,u=r.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},d=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),i.length>0&&r.during&&i[0].during(function(m,x){r.during(x)});for(var h=0;h<i.length;h++){var v=i[h];c&&v.done(c),d&&v.aborted(d),r.force&&v.duration(r.duration),v.start(r.easing)}return i}function rk(t,e,r){for(var a=0;a<r;a++)t[a]=e[a]}function Hfe(t){return Ri(t[0])}function Ufe(t,e,r){if(Ri(e[r]))if(Ri(t[r])||(t[r]=[]),vo(e[r])){var a=e[r].length;t[r].length!==a&&(t[r]=new e[r].constructor(a),rk(t[r],e[r],a))}else{var n=e[r],i=t[r],o=n.length;if(Hfe(n))for(var s=n[0].length,l=0;l<o;l++)i[l]?rk(i[l],n[l],s):i[l]=Array.prototype.slice.call(n[l]);else rk(i,n,o);i.length=n.length}else t[r]=e[r]}function $fe(t,e){return t===e||Ri(t)&&Ri(e)&&Wfe(t,e)}function Wfe(t,e){var r=t.length;if(r!==e.length)return!1;for(var a=0;a<r;a++)if(t[a]!==e[a])return!1;return!0}function I$(t,e,r,a,n,i,o,s){for(var l=Wt(a),u=n.duration,c=n.delay,d=n.additive,h=n.setToFinal,v=!it(i),m=t.animators,x=[],b=0;b<l.length;b++){var w=l[b],_=a[w];if(_!=null&&r[w]!=null&&(v||i[w]))if(it(_)&&!Ri(_)&&!k_(_)){if(e){s||(r[w]=_,t.updateDuringAnimation(e));continue}I$(t,w,r[w],_,n,i&&i[w],o,s)}else x.push(w);else s||(r[w]=_,t.updateDuringAnimation(e),x.push(w))}var T=x.length;if(!d&&T)for(var C=0;C<m.length;C++){var k=m[C];if(k.targetName===e){var A=k.stopTracks(x);if(A){var M=St(m,k);m.splice(M,1)}}}if(n.force||(x=mr(x,function(j){return!$fe(a[j],r[j])}),T=x.length),T>0||n.force&&!o.length){var L=void 0,R=void 0,P=void 0;if(s){R={},h&&(L={});for(var C=0;C<T;C++){var w=x[C];R[w]=r[w],h?L[w]=a[w]:r[w]=a[w]}}else if(h){P={};for(var C=0;C<T;C++){var w=x[C];P[w]=P0(r[w]),Ufe(r,a,w)}}var k=new QE(r,!1,!1,d?mr(m,function(V){return V.targetName===e}):null);k.targetName=e,n.scope&&(k.scope=n.scope),h&&L&&k.whenWithKeys(0,L,x),P&&k.whenWithKeys(0,P,x),k.whenWithKeys(u??500,s?R:a,x).delay(c||0),t.addAnimator(k,e),o.push(k)}}var Qe=(function(t){ia(e,t);function e(r){var a=t.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(r),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(r){return this._children[r]},e.prototype.childOfName=function(r){for(var a=this._children,n=0;n<a.length;n++)if(a[n].name===r)return a[n]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(r){return r&&r!==this&&r.parent!==this&&(this._children.push(r),this._doAdd(r)),this},e.prototype.addBefore=function(r,a){if(r&&r!==this&&r.parent!==this&&a&&a.parent===this){var n=this._children,i=n.indexOf(a);i>=0&&(n.splice(i,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,a){var n=St(this._children,r);return n>=0&&this.replaceAt(a,n),this},e.prototype.replaceAt=function(r,a){var n=this._children,i=n[a];if(r&&r!==this&&r.parent!==this&&r!==i){n[a]=r,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var a=this.__zr;a&&a!==r.__zr&&r.addSelfToZr(a),a&&a.refresh()},e.prototype.remove=function(r){var a=this.__zr,n=this._children,i=St(n,r);return i<0?this:(n.splice(i,1),r.parent=null,a&&r.removeSelfFromZr(a),a&&a.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,a=this.__zr,n=0;n<r.length;n++){var i=r[n];a&&i.removeSelfFromZr(a),i.parent=null}return r.length=0,this},e.prototype.eachChild=function(r,a){for(var n=this._children,i=0;i<n.length;i++){var o=n[i];r.call(a,o,i)}return this},e.prototype.traverse=function(r,a){for(var n=0;n<this._children.length;n++){var i=this._children[n],o=r.call(a,i);i.isGroup&&!o&&i.traverse(r,a)}return this},e.prototype.addSelfToZr=function(r){t.prototype.addSelfToZr.call(this,r);for(var a=0;a<this._children.length;a++){var n=this._children[a];n.addSelfToZr(r)}},e.prototype.removeSelfFromZr=function(r){t.prototype.removeSelfFromZr.call(this,r);for(var a=0;a<this._children.length;a++){var n=this._children[a];n.removeSelfFromZr(r)}},e.prototype.getBoundingRect=function(r){for(var a=new ot(0,0,0,0),n=r||this._children,i=[],o=null,s=0;s<n.length;s++){var l=n[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(i);c?(ot.applyTransform(a,u,c),o=o||a.clone(),o.union(a)):(o=o||u.clone(),o.union(u))}}return o||a},e})(R_);Qe.prototype.type="group";/*!
* ZRender, a high performance 2d drawing library.
*
* Copyright (c) 2013, Baidu Inc.
* All rights reserved.
*
* LICENSE
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
*/var vw={},j$={};function Yfe(t){delete j$[t]}function Xfe(t){if(!t)return!1;if(typeof t=="string")return eS(t,1)<jM;if(t.colorStops){for(var e=t.colorStops,r=0,a=e.length,n=0;n<a;n++)r+=eS(e[n].color,1);return r/=a,r<jM}return!1}var qfe=(function(){function t(e,r,a){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,a=a||{},this.dom=r,this.id=e;var i=new ufe,o=a.renderer||"canvas";vw[o]||(o=Wt(vw)[0]),a.useDirtyRect=a.useDirtyRect==null?!1:a.useDirtyRect;var s=new vw[o](r,i,a,e),l=a.ssr||s.ssrOnly;this.storage=i,this.painter=s;var u=!Ut.node&&!Ut.worker&&!l?new zfe(s.getViewportRoot(),s.root):null,c=a.useCoarsePointer,d=c==null||c==="auto"?Ut.touchEventsSupported:!!c,h=44,v;d&&(v=$e(a.pointerSize,h)),this.handler=new v$(i,s,u,s.root,v),this.animation=new Lfe({stage:{update:l?null:function(){return n._flush(!0)}}}),l||this.animation.start()}return t.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},t.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(e,r){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,r),this.refresh())},t.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=Xfe(e))},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(e){this._darkMode=e},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},t.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},t.prototype.flush=function(){this._disposed||this._flush(!1)},t.prototype._flush=function(e){var r,a=yp();this._needsRefresh&&(r=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(r=!0,this.refreshHoverImmediately());var n=yp();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:n-a})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},t.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){if(!this._disposed)return this.handler.findHover(e,r)},t.prototype.on=function(e,r,a){return this._disposed||this.handler.on(e,r,a),this},t.prototype.off=function(e,r){this._disposed||this.handler.off(e,r)},t.prototype.trigger=function(e,r){this._disposed||this.handler.trigger(e,r)},t.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),r=0;r<e.length;r++)e[r]instanceof Qe&&e[r].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},t.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,Yfe(this.id))},t})();function H4(t,e){var r=new qfe(s$(),t,e);return j$[r.id]=r,r}function Zfe(t,e){vw[t]=e}var BM;function Kfe(t){if(typeof BM=="function")return BM(t)}function Qfe(t){BM=t}var U4=1e-4,O$=20;function Jfe(t){return t.replace(/^\s+|\s+$/g,"")}var jo=Math.min,Ja=Math.max,jl=Math.abs;function pr(t,e,r,a){var n=e[0],i=e[1],o=r[0],s=r[1],l=i-n,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(a)if(l>0){if(t<=n)return o;if(t>=i)return s}else{if(t>=n)return o;if(t<=i)return s}else{if(t===n)return o;if(t===i)return s}return(t-n)/l*u+o}var Pe=ehe;function ehe(t,e,r){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return iS(t,e,r)}function iS(t,e,r){return Ie(t)?Jfe(t).match(/%$/)?parseFloat(t)/100*e+(r||0):parseFloat(t):t==null?NaN:+t}function dn(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),O$),t=(+t).toFixed(e),r?t:+t}function ps(t){return t.sort(function(e,r){return e-r}),t}function Ol(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return the(t)}function the(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),a=r>0?+e.slice(r+1):0,n=r>0?r:e.length,i=e.indexOf("."),o=i<0?0:n-1-i;return Math.max(0,o-a)}function z$(t,e){var r=Math.log,a=Math.LN10,n=Math.floor(r(t[1]-t[0])/a),i=Math.round(r(jl(e[1]-e[0]))/a),o=Math.min(Math.max(-n+i,0),20);return isFinite(o)?o:20}function rhe(t,e){var r=ql(t,function(v,m){return v+(isNaN(m)?0:m)},0);if(r===0)return[];for(var a=Math.pow(10,e),n=Se(t,function(v){return(isNaN(v)?0:v)/r*a*100}),i=a*100,o=Se(n,function(v){return Math.floor(v)}),s=ql(o,function(v,m){return v+m},0),l=Se(n,function(v,m){return v-o[m]});s<i;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,h=l.length;d<h;++d)l[d]>u&&(u=l[d],c=d);++o[c],l[c]=0,++s}return Se(o,function(v){return v/a})}function ahe(t,e){var r=Math.max(Ol(t),Ol(e)),a=t+e;return r>O$?a:dn(a,r)}var $4=9007199254740991;function B$(t){var e=Math.PI*2;return(t%e+e)%e}function iy(t){return t>-U4&&t<U4}var nhe=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Uh(t){if(t instanceof Date)return t;if(Ie(t)){var e=nhe.exec(t);if(!e)return new Date(NaN);if(e[8]){var r=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(r-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,r,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(t==null)return new Date(NaN);return new Date(Math.round(t))}function ihe(t){return Math.pow(10,JE(t))}function JE(t){if(t===0)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function V$(t,e){var r=JE(t),a=Math.pow(10,r),n=t/a,i;return n<1.5?i=1:n<2.5?i=2:n<4?i=3:n<7?i=5:i=10,t=i*a,r>=-20?+t.toFixed(r<0?-r:0):t}function ak(t,e){var r=(t.length-1)*e+1,a=Math.floor(r),n=+t[a-1],i=r-a;return i?n+i*(t[a]-n):n}function W4(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,a=0;a<t.length;){for(var n=t[a].interval,i=t[a].close,o=0;o<2;o++)n[o]<=e&&(n[o]=e,i[o]=o?1:1-r),e=n[o],r=i[o];n[0]===n[1]&&i[0]*i[1]!==1?t.splice(a,1):a++}return t;function s(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&s(l,u,1))}}function tc(t){var e=parseFloat(t);return e==t&&(e!==0||!Ie(t)||t.indexOf("x")<=0)?e:NaN}function F$(t){return!isNaN(tc(t))}function G$(){return Math.round(Math.random()*9)}function H$(t,e){return e===0?t:H$(e,t%e)}function Y4(t,e){return t==null?e:e==null?t:t*e/H$(t,e)}var ohe="[ECharts] ",she=typeof console<"u"&&console.warn&&console.log;function lhe(t,e,r){she&&console[t](ohe+e)}function U$(t,e){lhe("error",t)}function cr(t){throw new Error(t)}function X4(t,e,r){return(e-t)*r+t}var $$="series\0",W$="\0_ec_\0";function Ir(t){return t instanceof Array?t:t==null?[]:[t]}function Mh(t,e,r){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var a=0,n=r.length;a<n;a++){var i=r[a];!t.emphasis[e].hasOwnProperty(i)&&t[e].hasOwnProperty(i)&&(t.emphasis[e][i]=t[e][i])}}}var q4=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function pm(t){return it(t)&&!be(t)&&!(t instanceof Date)?t.value:t}function uhe(t){return it(t)&&!(t instanceof Array)}function Y$(t,e,r){var a=r==="normalMerge",n=r==="replaceMerge",i=r==="replaceAll";t=t||[],e=(e||[]).slice();var o=He();z(e,function(l,u){if(!it(l)){e[u]=null;return}});var s=che(t,o,r);return(a||n)&&dhe(s,t,o,e),a&&fhe(s,e),a||n?hhe(s,e,n):i&&vhe(s,e),phe(s),s}function che(t,e,r){var a=[];if(r==="replaceAll")return a;for(var n=0;n<t.length;n++){var i=t[n];i&&i.id!=null&&e.set(i.id,n),a.push({existing:r==="replaceMerge"||oy(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return a}function dhe(t,e,r,a){z(a,function(n,i){if(!(!n||n.id==null)){var o=I0(n.id),s=r.get(o);if(s!=null){var l=t[s];Pi(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=n,l.existing=e[s],a[i]=null}}})}function fhe(t,e){z(e,function(r,a){if(!(!r||r.name==null))for(var n=0;n<t.length;n++){var i=t[n].existing;if(!t[n].newOption&&i&&(i.id==null||r.id==null)&&!oy(r)&&!oy(i)&&X$("name",i,r)){t[n].newOption=r,e[a]=null;return}}})}function hhe(t,e,r){z(e,function(a){if(a){for(var n,i=0;(n=t[i])&&(n.newOption||oy(n.existing)||n.existing&&a.id!=null&&!X$("id",a,n.existing));)i++;n?(n.newOption=a,n.brandNew=r):t.push({newOption:a,brandNew:r,existing:null,keyInfo:null}),i++}})}function vhe(t,e){z(e,function(r){t.push({newOption:r,brandNew:!0,existing:null,keyInfo:null})})}function phe(t){var e=He();z(t,function(r){var a=r.existing;a&&e.set(a.id,r)}),z(t,function(r){var a=r.newOption;Pi(!a||a.id==null||!e.get(a.id)||e.get(a.id)===r,"id duplicates: "+(a&&a.id)),a&&a.id!=null&&e.set(a.id,r),!r.keyInfo&&(r.keyInfo={})}),z(t,function(r,a){var n=r.existing,i=r.newOption,o=r.keyInfo;if(it(i)){if(o.name=i.name!=null?I0(i.name):n?n.name:$$+a,n)o.id=I0(n.id);else if(i.id!=null)o.id=I0(i.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,r)}})}function X$(t,e,r){var a=An(e[t],null),n=An(r[t],null);return a!=null&&n!=null&&a===n}function I0(t){return An(t,"")}function An(t,e){return t==null?e:Ie(t)?t:qt(t)||vM(t)?t+"":e}function e5(t){var e=t.name;return!!(e&&e.indexOf($$))}function oy(t){return t&&t.id!=null&&I0(t.id).indexOf(W$)===0}function mhe(t){return W$+t}function ghe(t,e,r){z(t,function(a){var n=a.newOption;it(n)&&(a.keyInfo.mainType=e,a.keyInfo.subType=yhe(e,n,a.existing,r))})}function yhe(t,e,r,a){var n=e.type?e.type:r?r.subType:a.determineSubType(t,e);return n}function xhe(t,e){var r={},a={};return n(t||[],r),n(e||[],a,r),[i(r),i(a)];function n(o,s,l){for(var u=0,c=o.length;u<c;u++){var d=An(o[u].seriesId,null);if(d==null)return;for(var h=Ir(o[u].dataIndex),v=l&&l[d],m=0,x=h.length;m<x;m++){var b=h[m];v&&v[b]?v[b]=null:(s[d]||(s[d]={}))[b]=1}}}function i(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var c=i(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function Dh(t,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return be(e.dataIndex)?Se(e.dataIndex,function(r){return t.indexOfRawIndex(r)}):t.indexOfRawIndex(e.dataIndex);if(e.name!=null)return be(e.name)?Se(e.name,function(r){return t.indexOfName(r)}):t.indexOfName(e.name)}function jt(){var t="__ec_inner_"+bhe++;return function(e){return e[t]||(e[t]={})}}var bhe=G$();function kp(t,e,r){var a=t5(e,r),n=a.mainTypeSpecified,i=a.queryOptionMap,o=a.others,s=o,l=r?r.defaultMainType:null;return!n&&l&&i.set(l,{}),i.each(function(u,c){var d=mm(t,c,u,{useDefault:l===c,enableAll:r&&r.enableAll!=null?r.enableAll:!0,enableNone:r&&r.enableNone!=null?r.enableNone:!0});s[c+"Models"]=d.models,s[c+"Model"]=d.models[0]}),s}function t5(t,e){var r;if(Ie(t)){var a={};a[t+"Index"]=0,r=a}else r=t;var n=He(),i={},o=!1;return z(r,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){i[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],d=(u[2]||"").toLowerCase();if(!(!c||!d||e&&e.includeMainTypes&&St(e.includeMainTypes,c)<0)){o=o||!!c;var h=n.get(c)||n.set(c,{});h[d]=s}}),{mainTypeSpecified:o,queryOptionMap:n,others:i}}var Ia={useDefault:!0,enableAll:!1,enableNone:!1},whe={useDefault:!1,enableAll:!0,enableNone:!0};function mm(t,e,r,a){a=a||Ia;var n=r.index,i=r.id,o=r.name,s={models:null,specified:n!=null||i!=null||o!=null};if(!s.specified){var l=void 0;return s.models=a.useDefault&&(l=t.getComponent(e))?[l]:[],s}if(n==="none"||n===!1){if(a.enableNone)return s.models=[],s;n=-1}return n==="all"&&(a.enableAll?n=i=o=null:n=-1),s.models=t.queryComponents({mainType:e,index:n,id:i,name:o}),s}function q$(t,e,r){t.setAttribute?t.setAttribute(e,r):t[e]=r}function She(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function _he(t){return t==="auto"?Ut.domSupported?"html":"richText":t||"html"}function VM(t,e){var r=He(),a=[];return z(t,function(n){var i=e(n);(r.get(i)||(a.push(i),r.set(i,[]))).push(n)}),{keys:a,buckets:r}}function Z$(t,e,r,a,n){var i=e==null||e==="auto";if(a==null)return a;if(qt(a)){var o=X4(r||0,a,n);return dn(o,i?Math.max(Ol(r||0),Ol(a)):e)}else{if(Ie(a))return n<1?r:a;for(var s=[],l=r,u=a,c=Math.max(l?l.length:0,u.length),d=0;d<c;++d){var h=t.getDimensionInfo(d);if(h&&h.type==="ordinal")s[d]=(n<1&&l?l:u)[d];else{var v=l&&l[d]?l[d]:0,m=u[d],o=X4(v,m,n);s[d]=dn(o,i?Math.max(Ol(v),Ol(m)):e)}}return s}}var kd=(function(){function t(){}return t.prototype.reset=function(e,r,a,n){return this._list=e,this._step=n=n||1,this._idx=r,this._end=a??(n>0?e.length:0),this.item=null,this.key=NaN,this},t.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},t})();function nk(t){t.option=t.parentModel=t.ecModel=null}var The=".",Tf="___EC__COMPONENT__CONTAINER___",K$="___EC__EXTENDED_CLASS___";function zl(t){var e={main:"",sub:""};if(t){var r=t.split(The);e.main=r[0]||"",e.sub=r[1]||""}return e}function Che(t){Pi(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function khe(t){return!!(t&&t[K$])}function r5(t,e){t.$constructor=t,t.extend=function(r){var a=this,n;return Nhe(a)?n=(function(i){se(o,i);function o(){return i.apply(this,arguments)||this}return o})(a):(n=function(){(r.$constructor||a).apply(this,arguments)},Ade(n,this)),ve(n.prototype,r),n[K$]=!0,n.extend=this.extend,n.superCall=Dhe,n.superApply=Lhe,n.superClass=a,n}}function Nhe(t){return Ke(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function Q$(t,e){t.extend=e.extend}var Ahe=Math.round(Math.random()*10);function Mhe(t){var e=["__\0is_clz",Ahe++].join("_");t.prototype[e]=!0,t.isInstance=function(r){return!!(r&&r[e])}}function Dhe(t,e){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];return this.superClass.prototype[e].apply(t,r)}function Lhe(t,e,r){return this.superClass.prototype[e].apply(t,r)}function P_(t){var e={};t.registerClass=function(a){var n=a.type||a.prototype.type;if(n){Che(n),a.prototype.type=n;var i=zl(n);if(!i.sub)e[i.main]=a;else if(i.sub!==Tf){var o=r(i);o[i.sub]=a}}return a},t.getClass=function(a,n,i){var o=e[a];if(o&&o[Tf]&&(o=n?o[n]:null),i&&!o)throw new Error(n?"Component "+a+"."+(n||"")+" is used but not imported.":a+".type should be specified.");return o},t.getClassesByMainType=function(a){var n=zl(a),i=[],o=e[n.main];return o&&o[Tf]?z(o,function(s,l){l!==Tf&&i.push(s)}):i.push(o),i},t.hasClass=function(a){var n=zl(a);return!!e[n.main]},t.getAllClassMainTypes=function(){var a=[];return z(e,function(n,i){a.push(i)}),a},t.hasSubTypes=function(a){var n=zl(a),i=e[n.main];return i&&i[Tf]};function r(a){var n=e[a.main];return(!n||!n[Tf])&&(n=e[a.main]={},n[Tf]=!0),n}}function Lh(t,e){for(var r=0;r<t.length;r++)t[r][1]||(t[r][1]=t[r][0]);return e=e||!1,function(a,n,i){for(var o={},s=0;s<t.length;s++){var l=t[s][1];if(!(n&&St(n,l)>=0||i&&St(i,l)<0)){var u=a.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var Ehe=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Rhe=Lh(Ehe),Phe=(function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return Rhe(this,e,r)},t})(),FM=new Vp(50);function Ihe(t){if(typeof t=="string"){var e=FM.get(t);return e&&e.image}else return t}function a5(t,e,r,a,n){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var i=FM.get(t),o={hostEl:r,cb:a,cbPayload:n};return i?(e=i.image,!I_(e)&&i.pending.push(o)):(e=qs.loadImage(t,Z4,Z4),e.__zrImageSrc=t,FM.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function Z4(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var r=t.pending[e],a=r.cb;a&&a(this,r.cbPayload),r.hostEl.dirty()}t.pending.length=0}function I_(t){return t&&t.width&&t.height}var ik=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function jhe(t,e,r,a,n,i){if(!r){t.text="",t.isTruncated=!1;return}var o=(e+"").split(`
`);i=J$(r,a,n,i);for(var s=!1,l={},u=0,c=o.length;u<c;u++)eW(l,o[u],i),o[u]=l.textLine,s=s||l.isTruncated;t.text=o.join(`
`),t.isTruncated=s}function J$(t,e,r,a){a=a||{};var n=ve({},a);r=$e(r,"..."),n.maxIterations=$e(a.maxIterations,2);var i=n.minChar=$e(a.minChar,0),o=n.fontMeasureInfo=Wl(e),s=o.asciiCharWidth;n.placeholder=$e(a.placeholder,"");for(var l=t=Math.max(0,t-1),u=0;u<i&&l>=s;u++)l-=s;var c=Yl(o,r);return c>l&&(r="",c=0),l=t-c,n.ellipsis=r,n.ellipsisWidth=c,n.contentWidth=l,n.containerWidth=t,n}function eW(t,e,r){var a=r.containerWidth,n=r.contentWidth,i=r.fontMeasureInfo;if(!a){t.textLine="",t.isTruncated=!1;return}var o=Yl(i,e);if(o<=a){t.textLine=e,t.isTruncated=!1;return}for(var s=0;;s++){if(o<=n||s>=r.maxIterations){e+=r.ellipsis;break}var l=s===0?Ohe(e,n,i):o>0?Math.floor(e.length*n/o):0;e=e.substr(0,l),o=Yl(i,e)}e===""&&(e=r.placeholder),t.textLine=e,t.isTruncated=!0}function Ohe(t,e,r){for(var a=0,n=0,i=t.length;n<i&&a<e;n++)a+=P$(r,t.charCodeAt(n));return n}function zhe(t,e,r,a){var n=n5(t),i=e.overflow,o=e.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=e.font,c=i==="truncate",d=Uy(u),h=$e(e.lineHeight,d),v=e.lineOverflow==="truncate",m=!1,x=e.width;x==null&&r!=null&&(x=r-s);var b=e.height;b==null&&a!=null&&(b=a-l);var w;x!=null&&(i==="break"||i==="breakAll")?w=n?tW(n,e.font,x,i==="breakAll",0).lines:[]:w=n?n.split(`
`):[];var _=w.length*h;if(b==null&&(b=_),_>b&&v){var T=Math.floor(b/h);m=m||w.length>T,w=w.slice(0,T),_=w.length*h}if(n&&c&&x!=null)for(var C=J$(x,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),k={},A=0;A<w.length;A++)eW(k,w[A],C),w[A]=k.textLine,m=m||k.isTruncated;for(var M=b,L=0,R=Wl(u),A=0;A<w.length;A++)L=Math.max(Yl(R,w[A]),L);x==null&&(x=L);var P=x;return M+=l,P+=s,{lines:w,height:b,outerWidth:P,outerHeight:M,lineHeight:h,calculatedLineHeight:d,contentWidth:L,contentHeight:_,width:x,isTruncated:m}}var Bhe=(function(){function t(){}return t})(),K4=(function(){function t(e){this.tokens=[],e&&(this.tokens=e)}return t})(),Vhe=(function(){function t(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return t})();function Fhe(t,e,r,a,n){var i=new Vhe,o=n5(t);if(!o)return i;var s=e.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,c=e.width;c==null&&r!=null&&(c=r-l);var d=e.height;d==null&&a!=null&&(d=a-u);for(var h=e.overflow,v=(h==="break"||h==="breakAll")&&c!=null?{width:c,accumWidth:0,breakAll:h==="breakAll"}:null,m=ik.lastIndex=0,x;(x=ik.exec(o))!=null;){var b=x.index;b>m&&ok(i,o.substring(m,b),e,v),ok(i,x[2],e,v,x[1]),m=ik.lastIndex}m<o.length&&ok(i,o.substring(m,o.length),e,v);var w=[],_=0,T=0,C=h==="truncate",k=e.lineOverflow==="truncate",A={};function M(me,ze,Ce){me.width=ze,me.lineHeight=Ce,_+=Ce,T=Math.max(T,ze)}e:for(var L=0;L<i.lines.length;L++){for(var R=i.lines[L],P=0,j=0,V=0;V<R.tokens.length;V++){var I=R.tokens[V],F=I.styleName&&e.rich[I.styleName]||{},G=I.textPadding=F.padding,O=G?G[1]+G[3]:0,U=I.font=F.font||e.font;I.contentHeight=Uy(U);var $=$e(F.height,I.contentHeight);if(I.innerHeight=$,G&&($+=G[0]+G[2]),I.height=$,I.lineHeight=Io(F.lineHeight,e.lineHeight,$),I.align=F&&F.align||n,I.verticalAlign=F&&F.verticalAlign||"middle",k&&d!=null&&_+I.lineHeight>d){var K=i.lines.length;V>0?(R.tokens=R.tokens.slice(0,V),M(R,j,P),i.lines=i.lines.slice(0,L+1)):i.lines=i.lines.slice(0,L),i.isTruncated=i.isTruncated||i.lines.length<K;break e}var q=F.width,H=q==null||q==="auto";if(typeof q=="string"&&q.charAt(q.length-1)==="%")I.percentWidth=q,w.push(I),I.contentWidth=Yl(Wl(U),I.text);else{if(H){var Z=F.backgroundColor,te=Z&&Z.image;te&&(te=Ihe(te),I_(te)&&(I.width=Math.max(I.width,te.width*$/te.height)))}var ie=C&&c!=null?c-j:null;ie!=null&&ie<I.width?!H||ie<O?(I.text="",I.width=I.contentWidth=0):(jhe(A,I.text,ie-O,U,e.ellipsis,{minChar:e.truncateMinChar}),I.text=A.text,i.isTruncated=i.isTruncated||A.isTruncated,I.width=I.contentWidth=Yl(Wl(U),I.text)):I.contentWidth=Yl(Wl(U),I.text)}I.width+=O,j+=I.width,F&&(P=Math.max(P,I.lineHeight))}M(R,j,P)}i.outerWidth=i.width=$e(c,T),i.outerHeight=i.height=$e(d,_),i.contentHeight=_,i.contentWidth=T,i.outerWidth+=l,i.outerHeight+=u;for(var L=0;L<w.length;L++){var I=w[L],ce=I.percentWidth;I.width=parseInt(ce,10)/100*i.width}return i}function ok(t,e,r,a,n){var i=e==="",o=n&&r.rich[n]||{},s=t.lines,l=o.font||r.font,u=!1,c,d;if(a){var h=o.padding,v=h?h[1]+h[3]:0;if(o.width!=null&&o.width!=="auto"){var m=Ks(o.width,a.width)+v;s.length>0&&m+a.accumWidth>a.width&&(c=e.split(`
`),u=!0),a.accumWidth=m}else{var x=tW(e,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=x.accumWidth+v,d=x.linesWidths,c=x.lines}}c||(c=e.split(`
`));for(var b=Wl(l),w=0;w<c.length;w++){var _=c[w],T=new Bhe;if(T.styleName=n,T.text=_,T.isLineHolder=!_&&!i,typeof o.width=="number"?T.width=o.width:T.width=d?d[w]:Yl(b,_),!w&&!u){var C=(s[s.length-1]||(s[0]=new K4)).tokens,k=C.length;k===1&&C[0].isLineHolder?C[0]=T:(_||!k||i)&&C.push(T)}else s.push(new K4([T]))}}function Ghe(t){var e=t.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var Hhe=ql(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function Uhe(t){return Ghe(t)?!!Hhe[t]:!0}function tW(t,e,r,a,n){for(var i=[],o=[],s="",l="",u=0,c=0,d=Wl(e),h=0;h<t.length;h++){var v=t.charAt(h);if(v===`
`){l&&(s+=l,c+=u),i.push(s),o.push(c),s="",l="",u=0,c=0;continue}var m=P$(d,v.charCodeAt(0)),x=a?!1:!Uhe(v);if(i.length?c+m>r:n+c+m>r){c?(s||l)&&(x?(s||(s=l,l="",u=0,c=u),i.push(s),o.push(c-u),l+=v,u+=m,s="",c=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(c),s=v,c=m)):x?(i.push(l),o.push(u),l=v,u=m):(i.push(v),o.push(m));continue}c+=m,x?(l+=v,u+=m):(l&&(s+=l,l="",u=0),s+=v)}return l&&(s+=l),s&&(i.push(s),o.push(c)),i.length===1&&(c+=n),{accumWidth:c,lines:i,linesWidths:o}}function Q4(t,e,r,a,n,i){if(t.baseX=r,t.baseY=a,t.outerWidth=t.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;ot.set(J4,Fp(r,o,n),yh(a,s,i),o,s),ot.intersect(e,J4,null,ez);var l=ez.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=Fp(l.x,l.width,n,!0),t.baseY=yh(l.y,l.height,i,!0)}}var J4=new ot(0,0,0,0),ez={outIntersectRect:{},clamp:!0};function n5(t){return t!=null?t+="":t=""}function $he(t){var e=n5(t.text),r=t.font,a=Yl(Wl(r),e),n=Uy(r);return GM(t,a,n,null)}function GM(t,e,r,a){var n=new ot(Fp(t.x||0,e,t.textAlign),yh(t.y||0,r,t.textBaseline),e,r),i=a??(rW(t)?t.lineWidth:0);return i>0&&(n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i),n}function rW(t){var e=t.stroke;return e!=null&&e!=="none"&&t.lineWidth>0}var HM="__zr_style_"+Math.round(Math.random()*10),xh={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},j_={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};xh[HM]=!0;var tz=["z","z2","invisible"],Whe=["invisible"],xs=(function(t){ia(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var a=Wt(r),n=0;n<a.length;n++){var i=a[n];i==="style"?this.useStyle(r[i]):t.prototype.attrKV.call(this,i,r[i])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(r,a,n,i){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Yhe(this,r,a)||o&&!o[0]&&!o[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(i&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(r,a){return this.rectContain(r,a)},e.prototype.traverse=function(r,a){r.call(a,this)},e.prototype.rectContain=function(r,a){var n=this.transformCoordToLocal(r,a),i=this.getBoundingRect();return i.contain(n[0],n[1])},e.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var a=this.transform,n=this.getBoundingRect(),i=this.style,o=i.shadowBlur||0,s=i.shadowOffsetX||0,l=i.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new ot(0,0,0,0)),a?ot.applyTransform(r,n,a):r.copy(n),(o||s||l)&&(r.width+=o*2+Math.abs(s),r.height+=o*2+Math.abs(l),r.x=Math.min(r.x,r.x+s-o),r.y=Math.min(r.y,r.y+l-o));var u=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-u),r.y=Math.floor(r.y-u),r.width=Math.ceil(r.width+1+u*2),r.height=Math.ceil(r.height+1+u*2))}return r},e.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new ot(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(r){return this.animate("style",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(r,a){r!=="style"?t.prototype.attrKV.call(this,r,a):this.style?this.setStyle(a):this.useStyle(a)},e.prototype.setStyle=function(r,a){return typeof r=="string"?this.style[r]=a:ve(this.style,r),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=f0,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&f0)},e.prototype.styleUpdated=function(){this.__dirty&=~f0},e.prototype.createStyle=function(r){return A_(xh,r)},e.prototype.useStyle=function(r){r[HM]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},e.prototype.isStyleObject=function(r){return r[HM]},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var a=this._normalState;r.style&&!a.style&&(a.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(r,a,tz)},e.prototype._applyStateObj=function(r,a,n,i,o,s){t.prototype._applyStateObj.call(this,r,a,n,i,o,s);var l=!(a&&i),u;if(a&&a.style?o?i?u=a.style:(u=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(u,a.style)):(u=this._mergeStyle(this.createStyle(),i?this.style:n.style),this._mergeStyle(u,a.style)):l&&(u=n.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var d=Wt(c),h=0;h<d.length;h++){var v=d[h];v in u&&(u[v]=u[v],this.style[v]=c[v])}for(var m=Wt(u),h=0;h<m.length;h++){var v=m[h];this.style[v]=this.style[v]}this._transitionState(r,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var x=this.__inHover?Whe:tz,h=0;h<x.length;h++){var v=x[h];a&&a[v]!=null?this[v]=a[v]:l&&n[v]!=null&&(this[v]=n[v])}},e.prototype._mergeStates=function(r){for(var a=t.prototype._mergeStates.call(this,r),n,i=0;i<r.length;i++){var o=r[i];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(a.style=n),a},e.prototype._mergeStyle=function(r,a){return ve(r,a),r},e.prototype.getAnimationStyleProps=function(){return j_},e.initDefaultProps=(function(){var r=e.prototype;r.type="displayable",r.invisible=!1,r.z=0,r.z2=0,r.zlevel=0,r.culling=!1,r.cursor="pointer",r.rectHover=!1,r.incremental=!1,r._rect=null,r.dirtyRectTolerance=0,r.__dirty=Lo|f0})(),e})(R_),sk=new ot(0,0,0,0),lk=new ot(0,0,0,0);function Yhe(t,e,r){return sk.copy(t.getBoundingRect()),t.transform&&sk.applyTransform(t.transform),lk.width=e,lk.height=r,!sk.intersect(lk)}var lo=Math.min,uo=Math.max,uk=Math.sin,ck=Math.cos,Cf=Math.PI*2,Pb=Hh(),Ib=Hh(),jb=Hh();function O_(t,e,r){if(t.length!==0){for(var a=t[0],n=a[0],i=a[0],o=a[1],s=a[1],l=1;l<t.length;l++)a=t[l],n=lo(n,a[0]),i=uo(i,a[0]),o=lo(o,a[1]),s=uo(s,a[1]);e[0]=n,e[1]=o,r[0]=i,r[1]=s}}function rz(t,e,r,a,n,i){n[0]=lo(t,r),n[1]=lo(e,a),i[0]=uo(t,r),i[1]=uo(e,a)}var az=[],nz=[];function Xhe(t,e,r,a,n,i,o,s,l,u){var c=x$,d=Wn,h=c(t,r,n,o,az);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var v=0;v<h;v++){var m=d(t,r,n,o,az[v]);l[0]=lo(m,l[0]),u[0]=uo(m,u[0])}h=c(e,a,i,s,nz);for(var v=0;v<h;v++){var x=d(e,a,i,s,nz[v]);l[1]=lo(x,l[1]),u[1]=uo(x,u[1])}l[0]=lo(t,l[0]),u[0]=uo(t,u[0]),l[0]=lo(o,l[0]),u[0]=uo(o,u[0]),l[1]=lo(e,l[1]),u[1]=uo(e,u[1]),l[1]=lo(s,l[1]),u[1]=uo(s,u[1])}function qhe(t,e,r,a,n,i,o,s){var l=w$,u=ii,c=uo(lo(l(t,r,n),1),0),d=uo(lo(l(e,a,i),1),0),h=u(t,r,n,c),v=u(e,a,i,d);o[0]=lo(t,n,h),o[1]=lo(e,i,v),s[0]=uo(t,n,h),s[1]=uo(e,i,v)}function Zhe(t,e,r,a,n,i,o,s,l){var u=dd,c=fd,d=Math.abs(n-i);if(d%Cf<1e-4&&d>1e-4){s[0]=t-r,s[1]=e-a,l[0]=t+r,l[1]=e+a;return}if(Pb[0]=ck(n)*r+t,Pb[1]=uk(n)*a+e,Ib[0]=ck(i)*r+t,Ib[1]=uk(i)*a+e,u(s,Pb,Ib),c(l,Pb,Ib),n=n%Cf,n<0&&(n=n+Cf),i=i%Cf,i<0&&(i=i+Cf),n>i&&!o?i+=Cf:n<i&&o&&(n+=Cf),o){var h=i;i=n,n=h}for(var v=0;v<i;v+=Math.PI/2)v>n&&(jb[0]=ck(v)*r+t,jb[1]=uk(v)*a+e,u(s,jb,s),c(l,jb,l))}var Vr={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},kf=[],Nf=[],xl=[],Gc=[],bl=[],wl=[],dk=Math.min,fk=Math.max,Af=Math.cos,Mf=Math.sin,Lu=Math.abs,UM=Math.PI,td=UM*2,hk=typeof Float32Array<"u",Mg=[];function vk(t){var e=Math.round(t/UM*1e8)/1e8;return e%2*UM}function z_(t,e){var r=vk(t[0]);r<0&&(r+=td);var a=r-t[0],n=t[1];n+=a,!e&&n-r>=td?n=r+td:e&&r-n>=td?n=r-td:!e&&r>n?n=r+(td-vk(r-n)):e&&r<n&&(n=r-(td-vk(n-r))),t[0]=r,t[1]=n}var Ql=(function(){function t(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(e,r,a){a=a||0,a>0&&(this._ux=Lu(a/rS/e)||0,this._uy=Lu(a/rS/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(Vr.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var a=Lu(e-this._xi),n=Lu(r-this._yi),i=a>this._ux||n>this._uy;if(this.addData(Vr.L,e,r),this._ctx&&i&&this._ctx.lineTo(e,r),i)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=a*a+n*n;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,a,n,i,o){return this._drawPendingPt(),this.addData(Vr.C,e,r,a,n,i,o),this._ctx&&this._ctx.bezierCurveTo(e,r,a,n,i,o),this._xi=i,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,a,n){return this._drawPendingPt(),this.addData(Vr.Q,e,r,a,n),this._ctx&&this._ctx.quadraticCurveTo(e,r,a,n),this._xi=a,this._yi=n,this},t.prototype.arc=function(e,r,a,n,i,o){this._drawPendingPt(),Mg[0]=n,Mg[1]=i,z_(Mg,o),n=Mg[0],i=Mg[1];var s=i-n;return this.addData(Vr.A,e,r,a,a,n,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,a,n,i,o),this._xi=Af(i)*a+e,this._yi=Mf(i)*a+r,this},t.prototype.arcTo=function(e,r,a,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,a,n,i),this},t.prototype.rect=function(e,r,a,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,a,n),this.addData(Vr.R,e,r,a,n),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(Vr.Z);var e=this._ctx,r=this._x0,a=this._y0;return e&&e.closePath(),this._xi=r,this._yi=a,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){if(this._saveData){var r=e.length;!(this.data&&this.data.length===r)&&hk&&(this.data=new Float32Array(r));for(var a=0;a<r;a++)this.data[a]=e[a];this._len=r}},t.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var r=e.length,a=0,n=this._len,i=0;i<r;i++)a+=e[i].len();var o=this.data;if(hk&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(n+a),n>0&&o))for(var s=0;s<n;s++)this.data[s]=o[s];for(var i=0;i<r;i++)for(var l=e[i].data,s=0;s<l.length;s++)this.data[n++]=l[s];this._len=n}},t.prototype.addData=function(e,r,a,n,i,o,s,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var d=0;d<arguments.length;d++)c[this._len++]=arguments[d]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r<this._len;r++)e[r]=this.data[r];this.data=e}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,hk&&this._len>11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){xl[0]=xl[1]=bl[0]=bl[1]=Number.MAX_VALUE,Gc[0]=Gc[1]=wl[0]=wl[1]=-Number.MAX_VALUE;var e=this.data,r=0,a=0,n=0,i=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(r=e[o],a=e[o+1],n=r,i=a),s){case Vr.M:r=n=e[o++],a=i=e[o++],bl[0]=n,bl[1]=i,wl[0]=n,wl[1]=i;break;case Vr.L:rz(r,a,e[o],e[o+1],bl,wl),r=e[o++],a=e[o++];break;case Vr.C:Xhe(r,a,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],bl,wl),r=e[o++],a=e[o++];break;case Vr.Q:qhe(r,a,e[o++],e[o++],e[o],e[o+1],bl,wl),r=e[o++],a=e[o++];break;case Vr.A:var u=e[o++],c=e[o++],d=e[o++],h=e[o++],v=e[o++],m=e[o++]+v;o+=1;var x=!e[o++];l&&(n=Af(v)*d+u,i=Mf(v)*h+c),Zhe(u,c,d,h,v,m,x,bl,wl),r=Af(m)*d+u,a=Mf(m)*h+c;break;case Vr.R:n=r=e[o++],i=a=e[o++];var b=e[o++],w=e[o++];rz(n,i,n+b,i+w,bl,wl);break;case Vr.Z:r=n,a=i;break}dd(xl,xl,bl),fd(Gc,Gc,wl)}return o===0&&(xl[0]=xl[1]=Gc[0]=Gc[1]=0),new ot(xl[0],xl[1],Gc[0]-xl[0],Gc[1]-xl[1])},t.prototype._calculateLength=function(){var e=this.data,r=this._len,a=this._ux,n=this._uy,i=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,d=0,h=0;h<r;){var v=e[h++],m=h===1;m&&(i=e[h],o=e[h+1],s=i,l=o);var x=-1;switch(v){case Vr.M:i=s=e[h++],o=l=e[h++];break;case Vr.L:{var b=e[h++],w=e[h++],_=b-i,T=w-o;(Lu(_)>a||Lu(T)>n||h===r-1)&&(x=Math.sqrt(_*_+T*T),i=b,o=w);break}case Vr.C:{var C=e[h++],k=e[h++],b=e[h++],w=e[h++],A=e[h++],M=e[h++];x=cfe(i,o,C,k,b,w,A,M,10),i=A,o=M;break}case Vr.Q:{var C=e[h++],k=e[h++],b=e[h++],w=e[h++];x=ffe(i,o,C,k,b,w,10),i=b,o=w;break}case Vr.A:var L=e[h++],R=e[h++],P=e[h++],j=e[h++],V=e[h++],I=e[h++],F=I+V;h+=1,m&&(s=Af(V)*P+L,l=Mf(V)*j+R),x=fk(P,j)*dk(td,Math.abs(I)),i=Af(F)*P+L,o=Mf(F)*j+R;break;case Vr.R:{s=i=e[h++],l=o=e[h++];var G=e[h++],O=e[h++];x=G*2+O*2;break}case Vr.Z:{var _=s-i,T=l-o;x=Math.sqrt(_*_+T*T),i=s,o=l;break}}x>=0&&(u[d++]=x,c+=x)}return this._pathLen=c,c},t.prototype.rebuildPath=function(e,r){var a=this.data,n=this._ux,i=this._uy,o=this._len,s,l,u,c,d,h,v=r<1,m,x,b=0,w=0,_,T=0,C,k;if(!(v&&(this._pathSegLen||this._calculateLength(),m=this._pathSegLen,x=this._pathLen,_=r*x,!_)))e:for(var A=0;A<o;){var M=a[A++],L=A===1;switch(L&&(u=a[A],c=a[A+1],s=u,l=c),M!==Vr.L&&T>0&&(e.lineTo(C,k),T=0),M){case Vr.M:s=u=a[A++],l=c=a[A++],e.moveTo(u,c);break;case Vr.L:{d=a[A++],h=a[A++];var R=Lu(d-u),P=Lu(h-c);if(R>n||P>i){if(v){var j=m[w++];if(b+j>_){var V=(_-b)/j;e.lineTo(u*(1-V)+d*V,c*(1-V)+h*V);break e}b+=j}e.lineTo(d,h),u=d,c=h,T=0}else{var I=R*R+P*P;I>T&&(C=d,k=h,T=I)}break}case Vr.C:{var F=a[A++],G=a[A++],O=a[A++],U=a[A++],$=a[A++],K=a[A++];if(v){var j=m[w++];if(b+j>_){var V=(_-b)/j;Ed(u,F,O,$,V,kf),Ed(c,G,U,K,V,Nf),e.bezierCurveTo(kf[1],Nf[1],kf[2],Nf[2],kf[3],Nf[3]);break e}b+=j}e.bezierCurveTo(F,G,O,U,$,K),u=$,c=K;break}case Vr.Q:{var F=a[A++],G=a[A++],O=a[A++],U=a[A++];if(v){var j=m[w++];if(b+j>_){var V=(_-b)/j;ry(u,F,O,V,kf),ry(c,G,U,V,Nf),e.quadraticCurveTo(kf[1],Nf[1],kf[2],Nf[2]);break e}b+=j}e.quadraticCurveTo(F,G,O,U),u=O,c=U;break}case Vr.A:var q=a[A++],H=a[A++],Z=a[A++],te=a[A++],ie=a[A++],ce=a[A++],me=a[A++],ze=!a[A++],Ce=Z>te?Z:te,ge=Lu(Z-te)>.001,Be=ie+ce,_e=!1;if(v){var j=m[w++];b+j>_&&(Be=ie+ce*(_-b)/j,_e=!0),b+=j}if(ge&&e.ellipse?e.ellipse(q,H,Z,te,me,ie,Be,ze):e.arc(q,H,Ce,ie,Be,ze),_e)break e;L&&(s=Af(ie)*Z+q,l=Mf(ie)*te+H),u=Af(Be)*Z+q,c=Mf(Be)*te+H;break;case Vr.R:s=u=a[A],l=c=a[A+1],d=a[A++],h=a[A++];var Oe=a[A++],xt=a[A++];if(v){var j=m[w++];if(b+j>_){var Ye=_-b;e.moveTo(d,h),e.lineTo(d+dk(Ye,Oe),h),Ye-=Oe,Ye>0&&e.lineTo(d+Oe,h+dk(Ye,xt)),Ye-=xt,Ye>0&&e.lineTo(d+fk(Oe-Ye,0),h+xt),Ye-=Oe,Ye>0&&e.lineTo(d,h+fk(xt-Ye,0));break e}b+=j}e.rect(d,h,Oe,xt);break;case Vr.Z:if(v){var j=m[w++];if(b+j>_){var V=(_-b)/j;e.lineTo(u*(1-V)+s*V,c*(1-V)+l*V);break e}b+=j}e.closePath(),u=s,c=l}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=Vr,t.initDefaultProps=(function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0})(),t})();function id(t,e,r,a,n,i,o){if(n===0)return!1;var s=n,l=0,u=t;if(o>e+s&&o>a+s||o<e-s&&o<a-s||i>t+s&&i>r+s||i<t-s&&i<r-s)return!1;if(t!==r)l=(e-a)/(t-r),u=(t*a-r*e)/(t-r);else return Math.abs(i-t)<=s/2;var c=l*i-o+u,d=c*c/(l*l+1);return d<=s/2*s/2}function Khe(t,e,r,a,n,i,o,s,l,u,c){if(l===0)return!1;var d=l;if(c>e+d&&c>a+d&&c>i+d&&c>s+d||c<e-d&&c<a-d&&c<i-d&&c<s-d||u>t+d&&u>r+d&&u>n+d&&u>o+d||u<t-d&&u<r-d&&u<n-d&&u<o-d)return!1;var h=b$(t,e,r,a,n,i,o,s,u,c,null);return h<=d/2}function aW(t,e,r,a,n,i,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>a+u&&l>i+u||l<e-u&&l<a-u&&l<i-u||s>t+u&&s>r+u&&s>n+u||s<t-u&&s<r-u&&s<n-u)return!1;var c=S$(t,e,r,a,n,i,s,l,null);return c<=u/2}var iz=Math.PI*2;function Eo(t){return t%=iz,t<0&&(t+=iz),t}var Dg=Math.PI*2;function Qhe(t,e,r,a,n,i,o,s,l){if(o===0)return!1;var u=o;s-=t,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>r||c+u<r)return!1;if(Math.abs(a-n)%Dg<1e-4)return!0;if(i){var d=a;a=Eo(n),n=Eo(d)}else a=Eo(a),n=Eo(n);a>n&&(n+=Dg);var h=Math.atan2(l,s);return h<0&&(h+=Dg),h>=a&&h<=n||h+Dg>=a&&h+Dg<=n}function Bu(t,e,r,a,n,i){if(i>e&&i>a||i<e&&i<a||a===e)return 0;var o=(i-e)/(a-e),s=a<e?1:-1;(o===1||o===0)&&(s=a<e?.5:-.5);var l=o*(r-t)+t;return l===n?1/0:l>n?s:0}var Hc=Ql.CMD,Df=Math.PI*2,Jhe=1e-4;function eve(t,e){return Math.abs(t-e)<Jhe}var $i=[-1,-1,-1],os=[-1,-1];function tve(){var t=os[0];os[0]=os[1],os[1]=t}function rve(t,e,r,a,n,i,o,s,l,u){if(u>e&&u>a&&u>i&&u>s||u<e&&u<a&&u<i&&u<s)return 0;var c=Qw(e,a,i,s,u,$i);if(c===0)return 0;for(var d=0,h=-1,v=void 0,m=void 0,x=0;x<c;x++){var b=$i[x],w=b===0||b===1?.5:1,_=Wn(t,r,n,o,b);_<l||(h<0&&(h=x$(e,a,i,s,os),os[1]<os[0]&&h>1&&tve(),v=Wn(e,a,i,s,os[0]),h>1&&(m=Wn(e,a,i,s,os[1]))),h===2?b<os[0]?d+=v<e?w:-w:b<os[1]?d+=m<v?w:-w:d+=s<m?w:-w:b<os[0]?d+=v<e?w:-w:d+=s<v?w:-w)}return d}function ave(t,e,r,a,n,i,o,s){if(s>e&&s>a&&s>i||s<e&&s<a&&s<i)return 0;var l=dfe(e,a,i,s,$i);if(l===0)return 0;var u=w$(e,a,i);if(u>=0&&u<=1){for(var c=0,d=ii(e,a,i,u),h=0;h<l;h++){var v=$i[h]===0||$i[h]===1?.5:1,m=ii(t,r,n,$i[h]);m<o||($i[h]<u?c+=d<e?v:-v:c+=i<d?v:-v)}return c}else{var v=$i[0]===0||$i[0]===1?.5:1,m=ii(t,r,n,$i[0]);return m<o?0:i<e?v:-v}}function nve(t,e,r,a,n,i,o,s){if(s-=e,s>r||s<-r)return 0;var l=Math.sqrt(r*r-s*s);$i[0]=-l,$i[1]=l;var u=Math.abs(a-n);if(u<1e-4)return 0;if(u>=Df-1e-4){a=0,n=Df;var c=i?1:-1;return o>=$i[0]+t&&o<=$i[1]+t?c:0}if(a>n){var d=a;a=n,n=d}a<0&&(a+=Df,n+=Df);for(var h=0,v=0;v<2;v++){var m=$i[v];if(m+t>o){var x=Math.atan2(s,m),c=i?1:-1;x<0&&(x=Df+x),(x>=a&&x<=n||x+Df>=a&&x+Df<=n)&&(x>Math.PI/2&&x<Math.PI*1.5&&(c=-c),h+=c)}}return h}function nW(t,e,r,a,n){for(var i=t.data,o=t.len(),s=0,l=0,u=0,c=0,d=0,h,v,m=0;m<o;){var x=i[m++],b=m===1;switch(x===Hc.M&&m>1&&(r||(s+=Bu(l,u,c,d,a,n))),b&&(l=i[m],u=i[m+1],c=l,d=u),x){case Hc.M:c=i[m++],d=i[m++],l=c,u=d;break;case Hc.L:if(r){if(id(l,u,i[m],i[m+1],e,a,n))return!0}else s+=Bu(l,u,i[m],i[m+1],a,n)||0;l=i[m++],u=i[m++];break;case Hc.C:if(r){if(Khe(l,u,i[m++],i[m++],i[m++],i[m++],i[m],i[m+1],e,a,n))return!0}else s+=rve(l,u,i[m++],i[m++],i[m++],i[m++],i[m],i[m+1],a,n)||0;l=i[m++],u=i[m++];break;case Hc.Q:if(r){if(aW(l,u,i[m++],i[m++],i[m],i[m+1],e,a,n))return!0}else s+=ave(l,u,i[m++],i[m++],i[m],i[m+1],a,n)||0;l=i[m++],u=i[m++];break;case Hc.A:var w=i[m++],_=i[m++],T=i[m++],C=i[m++],k=i[m++],A=i[m++];m+=1;var M=!!(1-i[m++]);h=Math.cos(k)*T+w,v=Math.sin(k)*C+_,b?(c=h,d=v):s+=Bu(l,u,h,v,a,n);var L=(a-w)*C/T+w;if(r){if(Qhe(w,_,C,k,k+A,M,e,L,n))return!0}else s+=nve(w,_,C,k,k+A,M,L,n);l=Math.cos(k+A)*T+w,u=Math.sin(k+A)*C+_;break;case Hc.R:c=l=i[m++],d=u=i[m++];var R=i[m++],P=i[m++];if(h=c+R,v=d+P,r){if(id(c,d,h,d,e,a,n)||id(h,d,h,v,e,a,n)||id(h,v,c,v,e,a,n)||id(c,v,c,d,e,a,n))return!0}else s+=Bu(h,d,h,v,a,n),s+=Bu(c,v,c,d,a,n);break;case Hc.Z:if(r){if(id(l,u,c,d,e,a,n))return!0}else s+=Bu(l,u,c,d,a,n);l=c,u=d;break}}return!r&&!eve(u,d)&&(s+=Bu(l,u,c,d,a,n)||0),s!==0}function ive(t,e,r){return nW(t,0,!1,e,r)}function ove(t,e,r,a){return nW(t,e,!0,r,a)}var oS=nt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},xh),sve={style:nt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},j_.style)},pk=Kl.concat(["invisible","culling","z","z2","zlevel","parent"]),zt=(function(t){ia(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var a=this.style;if(a.decal){var n=this._decalEl=this._decalEl||new e;n.buildPath===e.prototype.buildPath&&(n.buildPath=function(l){r.buildPath(l,r.shape)}),n.silent=!0;var i=n.style;for(var o in a)i[o]!==a[o]&&(i[o]=a[o]);i.fill=a.fill?a.decal:null,i.decal=null,i.shadowColor=null,a.strokeFirst&&(i.stroke=null);for(var s=0;s<pk.length;++s)n[pk[s]]=this[pk[s]];n.__dirty|=Lo}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(r){var a=Wt(r);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var i=0;i<a.length;i++){var o=a[i],s=r[o];o==="style"?this.style?ve(this.style,s):this.useStyle(s):o==="shape"?ve(this.shape,s):t.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var r=this.style.fill;if(r!=="none"){if(Ie(r)){var a=eS(r,0);return a>.5?OM:a>.2?Bfe:zM}else if(r)return zM}return OM},e.prototype.getInsideTextStroke=function(r){var a=this.style.fill;if(Ie(a)){var n=this.__zr,i=!!(n&&n.isDarkMode()),o=eS(r,0)<jM;if(i===o)return a}},e.prototype.buildPath=function(r,a,n){},e.prototype.pathUpdated=function(){this.__dirty&=~ap},e.prototype.getUpdatedPathProxy=function(r){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,r),this.path},e.prototype.createPathProxy=function(){this.path=new Ql(!1)},e.prototype.hasStroke=function(){var r=this.style,a=r.stroke;return!(a==null||a==="none"||!(r.lineWidth>0))},e.prototype.hasFill=function(){var r=this.style,a=r.fill;return a!=null&&a!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,a=this.style,n=!r;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&ap)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||n){s.copy(r);var l=a.strokeNoScale?this.getLineScale():1,u=a.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},e.prototype.contain=function(r,a){var n=this.transformCoordToLocal(r,a),i=this.getBoundingRect(),o=this.style;if(r=n[0],a=n[1],i.contain(r,a)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),ove(s,l/u,r,a)))return!0}if(this.hasFill())return ive(s,r,a)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=ap,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,a){r==="shape"?this.setShape(a):t.prototype.attrKV.call(this,r,a)},e.prototype.setShape=function(r,a){var n=this.shape;return n||(n=this.shape={}),typeof r=="string"?n[r]=a:ve(n,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&ap)},e.prototype.createStyle=function(r){return A_(oS,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var a=this._normalState;r.shape&&!a.shape&&(a.shape=ve({},this.shape))},e.prototype._applyStateObj=function(r,a,n,i,o,s){t.prototype._applyStateObj.call(this,r,a,n,i,o,s);var l=!(a&&i),u;if(a&&a.shape?o?i?u=a.shape:(u=ve({},n.shape),ve(u,a.shape)):(u=ve({},i?this.shape:n.shape),ve(u,a.shape)):l&&(u=n.shape),u)if(o){this.shape=ve({},this.shape);for(var c={},d=Wt(u),h=0;h<d.length;h++){var v=d[h];typeof u[v]=="object"?this.shape[v]=u[v]:c[v]=u[v]}this._transitionState(r,{shape:c},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(r){for(var a=t.prototype._mergeStates.call(this,r),n,i=0;i<r.length;i++){var o=r[i];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(a.shape=n),a},e.prototype.getAnimationStyleProps=function(){return sve},e.prototype.isZeroArea=function(){return!1},e.extend=function(r){var a=(function(i){ia(o,i);function o(s){var l=i.call(this,s)||this;return r.init&&r.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return et(r.style)},o.prototype.getDefaultShape=function(){return et(r.shape)},o})(e);for(var n in r)typeof r[n]=="function"&&(a.prototype[n]=r[n]);return a},e.initDefaultProps=(function(){var r=e.prototype;r.type="path",r.strokeContainThreshold=5,r.segmentIgnoreThreshold=0,r.subPixelOptimize=!1,r.autoBatch=!1,r.__dirty=Lo|f0|ap})(),e})(xs),lve=nt({strokeFirst:!0,font:Ju,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},oS),Gp=(function(t){ia(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.hasStroke=function(){return rW(this.style)},e.prototype.hasFill=function(){var r=this.style,a=r.fill;return a!=null&&a!=="none"},e.prototype.createStyle=function(r){return A_(lve,r)},e.prototype.setBoundingRect=function(r){this._rect=r},e.prototype.getBoundingRect=function(){return this._rect||(this._rect=$he(this.style)),this._rect},e.initDefaultProps=(function(){var r=e.prototype;r.dirtyRectTolerance=10})(),e})(xs);Gp.prototype.type="tspan";var uve=nt({x:0,y:0},xh),cve={style:nt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},j_.style)};function dve(t){return!!(t&&typeof t!="string"&&t.width&&t.height)}var li=(function(t){ia(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createStyle=function(r){return A_(uve,r)},e.prototype._getSize=function(r){var a=this.style,n=a[r];if(n!=null)return n;var i=dve(a.image)?a.image:this.__image;if(!i)return 0;var o=r==="width"?"height":"width",s=a[o];return s==null?i[r]:i[r]/i[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return cve},e.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new ot(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},e})(xs);li.prototype.type="image";function fve(t,e){var r=e.x,a=e.y,n=e.width,i=e.height,o=e.r,s,l,u,c;n<0&&(r=r+n,n=-n),i<0&&(a=a+i,i=-i),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var d;s+l>n&&(d=s+l,s*=n/d,l*=n/d),u+c>n&&(d=u+c,u*=n/d,c*=n/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),s+c>i&&(d=s+c,s*=i/d,c*=i/d),t.moveTo(r+s,a),t.lineTo(r+n-l,a),l!==0&&t.arc(r+n-l,a+l,l,-Math.PI/2,0),t.lineTo(r+n,a+i-u),u!==0&&t.arc(r+n-u,a+i-u,u,0,Math.PI/2),t.lineTo(r+c,a+i),c!==0&&t.arc(r+c,a+i-c,c,Math.PI/2,Math.PI),t.lineTo(r,a+s),s!==0&&t.arc(r+s,a+s,s,Math.PI,Math.PI*1.5)}var xp=Math.round;function B_(t,e,r){if(e){var a=e.x1,n=e.x2,i=e.y1,o=e.y2;t.x1=a,t.x2=n,t.y1=i,t.y2=o;var s=r&&r.lineWidth;return s&&(xp(a*2)===xp(n*2)&&(t.x1=t.x2=Ro(a,s,!0)),xp(i*2)===xp(o*2)&&(t.y1=t.y2=Ro(i,s,!0))),t}}function iW(t,e,r){if(e){var a=e.x,n=e.y,i=e.width,o=e.height;t.x=a,t.y=n,t.width=i,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=Ro(a,s,!0),t.y=Ro(n,s,!0),t.width=Math.max(Ro(a+i,s,!1)-t.x,i===0?0:1),t.height=Math.max(Ro(n+o,s,!1)-t.y,o===0?0:1)),t}}function Ro(t,e,r){if(!e)return t;var a=xp(t*2);return(a+xp(e))%2===0?a/2:(a+(r?1:-1))/2}var hve=(function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t})(),vve={},Et=(function(t){ia(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new hve},e.prototype.buildPath=function(r,a){var n,i,o,s;if(this.subPixelOptimize){var l=iW(vve,a,this.style);n=l.x,i=l.y,o=l.width,s=l.height,l.r=a.r,a=l}else n=a.x,i=a.y,o=a.width,s=a.height;a.r?fve(r,a):r.rect(n,i,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e})(zt);Et.prototype.type="rect";var oz={fill:"#000"},sz=2,Sl={},pve={style:nt({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},j_.style)},Qt=(function(t){ia(e,t);function e(r){var a=t.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=oz,a.attr(r),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r<this._children.length;r++){var a=this._children[r];a.zlevel=this.zlevel,a.z=this.z,a.z2=this.z2,a.culling=this.culling,a.cursor=this.cursor,a.invisible=this.invisible}},e.prototype.updateTransform=function(){var r=this.innerTransformable;r?(r.updateTransform(),r.transform&&(this.transform=r.transform)):t.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(r){var a=this.innerTransformable;return a?a.getLocalTransform(r):t.prototype.getLocalTransform.call(this,r)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,yve(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(r){t.prototype.addSelfToZr.call(this,r);for(var a=0;a<this._children.length;a++)this._children[a].__zr=r},e.prototype.removeSelfFromZr=function(r){t.prototype.removeSelfFromZr.call(this,r);for(var a=0;a<this._children.length;a++)this._children[a].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var r=new ot(0,0,0,0),a=this._children,n=[],i=null,o=0;o<a.length;o++){var s=a[o],l=s.getBoundingRect(),u=s.getLocalTransform(n);u?(r.copy(l),r.applyTransform(u),i=i||r.clone(),i.union(r)):(i=i||l.clone(),i.union(l))}this._rect=i||r}return this._rect},e.prototype.setDefaultTextStyle=function(r){this._defaultStyle=r||oz},e.prototype.setTextContent=function(r){},e.prototype._mergeStyle=function(r,a){if(!a)return r;var n=a.rich,i=r.rich||n&&{};return ve(r,a),n&&i?(this._mergeRich(i,n),r.rich=i):i&&(r.rich=i),r},e.prototype._mergeRich=function(r,a){for(var n=Wt(a),i=0;i<n.length;i++){var o=n[i];r[o]=r[o]||{},ve(r[o],a[o])}},e.prototype.getAnimationStyleProps=function(){return pve},e.prototype._getOrCreateChild=function(r){var a=this._children[this._childCursor];return(!a||!(a instanceof r))&&(a=new r),this._children[this._childCursor++]=a,a.__zr=this.__zr,a.parent=this,a},e.prototype._updatePlainTexts=function(){var r=this.style,a=r.font||Ju,n=r.padding,i=this._defaultStyle,o=r.x||0,s=r.y||0,l=r.align||i.align||"left",u=r.verticalAlign||i.verticalAlign||"top";Q4(Sl,i.overflowRect,o,s,l,u),o=Sl.baseX,s=Sl.baseY;var c=vz(r),d=zhe(c,r,Sl.outerWidth,Sl.outerHeight),h=mk(r),v=!!r.backgroundColor,m=d.outerHeight,x=d.outerWidth,b=d.lines,w=d.lineHeight;this.isTruncated=!!d.isTruncated;var _=o,T=yh(s,d.contentHeight,u);if(h||n){var C=Fp(o,x,l),k=yh(s,m,u);h&&this._renderBackground(r,r,C,k,x,m)}T+=w/2,n&&(_=hz(o,l,n),u==="top"?T+=n[0]:u==="bottom"&&(T-=n[2]));for(var A=0,M=!1,L=!1,R=fz("fill"in r?r.fill:(L=!0,i.fill)),P=dz("stroke"in r?r.stroke:!v&&(!i.autoStroke||L)?(A=sz,M=!0,i.stroke):null),j=r.textShadowBlur>0,V=0;V<b.length;V++){var I=this._getOrCreateChild(Gp),F=I.createStyle();I.useStyle(F),F.text=b[V],F.x=_,F.y=T,F.textAlign=l,F.textBaseline="middle",F.opacity=r.opacity,F.strokeFirst=!0,j&&(F.shadowBlur=r.textShadowBlur||0,F.shadowColor=r.textShadowColor||"transparent",F.shadowOffsetX=r.textShadowOffsetX||0,F.shadowOffsetY=r.textShadowOffsetY||0),F.stroke=P,F.fill=R,P&&(F.lineWidth=r.lineWidth||A,F.lineDash=r.lineDash,F.lineDashOffset=r.lineDashOffset||0),F.font=a,uz(F,r),T+=w,I.setBoundingRect(GM(F,d.contentWidth,d.calculatedLineHeight,M?0:null))}},e.prototype._updateRichTexts=function(){var r=this.style,a=this._defaultStyle,n=r.align||a.align,i=r.verticalAlign||a.verticalAlign,o=r.x||0,s=r.y||0;Q4(Sl,a.overflowRect,o,s,n,i),o=Sl.baseX,s=Sl.baseY;var l=vz(r),u=Fhe(l,r,Sl.outerWidth,Sl.outerHeight,n),c=u.width,d=u.outerWidth,h=u.outerHeight,v=r.padding;this.isTruncated=!!u.isTruncated;var m=Fp(o,d,n),x=yh(s,h,i),b=m,w=x;v&&(b+=v[3],w+=v[0]);var _=b+c;mk(r)&&this._renderBackground(r,r,m,x,d,h);for(var T=!!r.backgroundColor,C=0;C<u.lines.length;C++){for(var k=u.lines[C],A=k.tokens,M=A.length,L=k.lineHeight,R=k.width,P=0,j=b,V=_,I=M-1,F=void 0;P<M&&(F=A[P],!F.align||F.align==="left");)this._placeToken(F,r,L,w,j,"left",T),R-=F.width,j+=F.width,P++;for(;I>=0&&(F=A[I],F.align==="right");)this._placeToken(F,r,L,w,V,"right",T),R-=F.width,V-=F.width,I--;for(j+=(c-(j-b)-(_-V)-R)/2;P<=I;)F=A[P],this._placeToken(F,r,L,w,j+F.width/2,"center",T),j+=F.width,P++;w+=L}},e.prototype._placeToken=function(r,a,n,i,o,s,l){var u=a.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,d=i+n/2;c==="top"?d=i+r.height/2:c==="bottom"&&(d=i+n-r.height/2);var h=!r.isLineHolder&&mk(u);h&&this._renderBackground(u,a,s==="right"?o-r.width:s==="center"?o-r.width/2:o,d-r.height/2,r.width,r.height);var v=!!u.backgroundColor,m=r.textPadding;m&&(o=hz(o,s,m),d-=r.height/2-m[0]-r.innerHeight/2);var x=this._getOrCreateChild(Gp),b=x.createStyle();x.useStyle(b);var w=this._defaultStyle,_=!1,T=0,C=!1,k=fz("fill"in u?u.fill:"fill"in a?a.fill:(_=!0,w.fill)),A=dz("stroke"in u?u.stroke:"stroke"in a?a.stroke:!v&&!l&&(!w.autoStroke||_)?(T=sz,C=!0,w.stroke):null),M=u.textShadowBlur>0||a.textShadowBlur>0;b.text=r.text,b.x=o,b.y=d,M&&(b.shadowBlur=u.textShadowBlur||a.textShadowBlur||0,b.shadowColor=u.textShadowColor||a.textShadowColor||"transparent",b.shadowOffsetX=u.textShadowOffsetX||a.textShadowOffsetX||0,b.shadowOffsetY=u.textShadowOffsetY||a.textShadowOffsetY||0),b.textAlign=s,b.textBaseline="middle",b.font=r.font||Ju,b.opacity=Io(u.opacity,a.opacity,1),uz(b,u),A&&(b.lineWidth=Io(u.lineWidth,a.lineWidth,T),b.lineDash=$e(u.lineDash,a.lineDash),b.lineDashOffset=a.lineDashOffset||0,b.stroke=A),k&&(b.fill=k),x.setBoundingRect(GM(b,r.contentWidth,r.contentHeight,C?0:null))},e.prototype._renderBackground=function(r,a,n,i,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,d=l&&l.image,h=l&&!d,v=r.borderRadius,m=this,x,b;if(h||r.lineHeight||u&&c){x=this._getOrCreateChild(Et),x.useStyle(x.createStyle()),x.style.fill=null;var w=x.shape;w.x=n,w.y=i,w.width=o,w.height=s,w.r=v,x.dirtyShape()}if(h){var _=x.style;_.fill=l||null,_.fillOpacity=$e(r.fillOpacity,1)}else if(d){b=this._getOrCreateChild(li),b.onload=function(){m.dirtyStyle()};var T=b.style;T.image=l.image,T.x=n,T.y=i,T.width=o,T.height=s}if(u&&c){var _=x.style;_.lineWidth=u,_.stroke=c,_.strokeOpacity=$e(r.strokeOpacity,1),_.lineDash=r.borderDash,_.lineDashOffset=r.borderDashOffset||0,x.strokeContainThreshold=0,x.hasFill()&&x.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var C=(x||b).style;C.shadowBlur=r.shadowBlur||0,C.shadowColor=r.shadowColor||"transparent",C.shadowOffsetX=r.shadowOffsetX||0,C.shadowOffsetY=r.shadowOffsetY||0,C.opacity=Io(r.opacity,a.opacity,1)},e.makeFont=function(r){var a="";return sW(r)&&(a=[r.fontStyle,r.fontWeight,oW(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),a&&vs(a)||r.textFont||r.font},e})(xs),mve={left:!0,right:1,center:1},gve={top:1,bottom:1,middle:1},lz=["fontStyle","fontWeight","fontSize","fontFamily"];function oW(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?FE+"px":t+"px"}function uz(t,e){for(var r=0;r<lz.length;r++){var a=lz[r],n=e[a];n!=null&&(t[a]=n)}}function sW(t){return t.fontSize!=null||t.fontFamily||t.fontWeight}function yve(t){return cz(t),z(t.rich,cz),t}function cz(t){if(t){t.font=Qt.makeFont(t);var e=t.align;e==="middle"&&(e="center"),t.align=e==null||mve[e]?e:"left";var r=t.verticalAlign;r==="center"&&(r="middle"),t.verticalAlign=r==null||gve[r]?r:"top";var a=t.padding;a&&(t.padding=N_(t.padding))}}function dz(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function fz(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function hz(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function vz(t){var e=t.text;return e!=null&&(e+=""),e}function mk(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var dt=jt(),$M=function(t,e,r,a){if(a){var n=dt(a);n.dataIndex=r,n.dataType=e,n.seriesIndex=t,n.ssrType="chart",a.type==="group"&&a.traverse(function(i){var o=dt(i);o.seriesIndex=t,o.dataIndex=r,o.dataType=e,o.ssrType="chart"})}},pz=1,mz={},lW=jt(),i5=jt(),o5=0,$y=1,V_=2,Qi=["emphasis","blur","select"],sy=["normal","emphasis","blur","select"],gm=10,xve=9,bh="highlight",pw="downplay",sS="select",WM="unselect",lS="toggleSelect",s5="selectchanged";function Ev(t){return t!=null&&t!=="none"}function F_(t,e,r){t.onHoverStateChange&&(t.hoverState||0)!==r&&t.onHoverStateChange(e),t.hoverState=r}function uW(t){F_(t,"emphasis",V_)}function cW(t){t.hoverState===V_&&F_(t,"normal",o5)}function l5(t){F_(t,"blur",$y)}function dW(t){t.hoverState===$y&&F_(t,"normal",o5)}function bve(t){t.selected=!0}function wve(t){t.selected=!1}function gz(t,e,r){e(t,r)}function sc(t,e,r){gz(t,e,r),t.isGroup&&t.traverse(function(a){gz(a,e,r)})}function uS(t,e){switch(e){case"emphasis":t.hoverState=V_;break;case"normal":t.hoverState=o5;break;case"blur":t.hoverState=$y;break;case"select":t.selected=!0}}function Sve(t,e,r,a){for(var n=t.style,i={},o=0;o<e.length;o++){var s=e[o],l=n[s];i[s]=l??(a&&a[s])}for(var o=0;o<t.animators.length;o++){var u=t.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(r)<0&&u.targetName==="style"&&u.saveTo(i,e)}return i}function _ve(t,e,r,a){var n=r&&St(r,"select")>=0,i=!1;if(t instanceof zt){var o=lW(t),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(Ev(s)||Ev(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(i=!0,a=ve({},a),u=ve({},u),u.fill=s):!Ev(u.fill)&&Ev(s)?(i=!0,a=ve({},a),u=ve({},u),u.fill=MM(s)):!Ev(u.stroke)&&Ev(l)&&(i||(a=ve({},a),u=ve({},u)),u.stroke=MM(l)),a.style=u}}if(a&&a.z2==null){i||(a=ve({},a));var c=t.z2EmphasisLift;a.z2=t.z2+(c??gm)}return a}function Tve(t,e,r){if(r&&r.z2==null){r=ve({},r);var a=t.z2SelectLift;r.z2=t.z2+(a??xve)}return r}function Cve(t,e,r){var a=St(t.currentStates,e)>=0,n=t.style.opacity,i=a?null:Sve(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=ve({},r),o=ve({opacity:a?n:i.opacity*.1},o),r.style=o),r}function gk(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return _ve(this,t,e,r);if(t==="blur")return Cve(this,t,r);if(t==="select")return Tve(this,t,r)}return r}function Eh(t){t.stateProxy=gk;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=gk),r&&(r.stateProxy=gk)}function yz(t,e){!pW(t,e)&&!t.__highByOuter&&sc(t,uW)}function xz(t,e){!pW(t,e)&&!t.__highByOuter&&sc(t,cW)}function rc(t,e){t.__highByOuter|=1<<(e||0),sc(t,uW)}function ac(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&sc(t,cW)}function fW(t){sc(t,l5)}function u5(t){sc(t,dW)}function hW(t){sc(t,bve)}function vW(t){sc(t,wve)}function pW(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function mW(t){var e=t.getModel(),r=[],a=[];e.eachComponent(function(n,i){var o=i5(i),s=n==="series",l=s?t.getViewOfSeriesModel(i):t.getViewOfComponentModel(i);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){dW(u)}),s&&r.push(i)),o.isBlured=!1}),z(a,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(r,!1,e)})}function YM(t,e,r,a){var n=a.getModel();r=r||"coordinateSystem";function i(u,c){for(var d=0;d<c.length;d++){var h=u.getItemGraphicEl(c[d]);h&&u5(h)}}if(t!=null&&!(!e||e==="none")){var o=n.getSeriesByIndex(t),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];n.eachSeries(function(u){var c=o===u,d=u.coordinateSystem;d&&d.master&&(d=d.master);var h=d&&s?d===s:c;if(!(r==="series"&&!c||r==="coordinateSystem"&&!h||e==="series"&&c)){var v=a.getViewOfSeriesModel(u);if(v.group.traverse(function(b){b.__highByOuter&&c&&e==="self"||l5(b)}),Ri(e))i(u.getData(),e);else if(it(e))for(var m=Wt(e),x=0;x<m.length;x++)i(u.getData(m[x]),e[m[x]]);l.push(u),i5(u).isBlured=!0}}),n.eachComponent(function(u,c){if(u!=="series"){var d=a.getViewOfComponentModel(c);d&&d.toggleBlurSeries&&d.toggleBlurSeries(l,!0,n)}})}}function XM(t,e,r){if(!(t==null||e==null)){var a=r.getModel().getComponent(t,e);if(a){i5(a).isBlured=!0;var n=r.getViewOfComponentModel(a);!n||!n.focusBlurEnabled||n.group.traverse(function(i){l5(i)})}}}function kve(t,e,r){var a=t.seriesIndex,n=t.getData(e.dataType);if(n){var i=Dh(n,e);i=(be(i)?i[0]:i)||0;var o=n.getItemGraphicEl(i);if(!o)for(var s=n.count(),l=0;!o&&l<s;)o=n.getItemGraphicEl(l++);if(o){var u=dt(o);YM(a,u.focus,u.blurScope,r)}else{var c=t.get(["emphasis","focus"]),d=t.get(["emphasis","blurScope"]);c!=null&&YM(a,c,d,r)}}}function c5(t,e,r,a){var n={focusSelf:!1,dispatchers:null};if(t==null||t==="series"||e==null||r==null)return n;var i=a.getModel().getComponent(t,e);if(!i)return n;var o=a.getViewOfComponentModel(i);if(!o||!o.findHighDownDispatchers)return n;for(var s=o.findHighDownDispatchers(r),l,u=0;u<s.length;u++)if(dt(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function Nve(t,e,r){var a=dt(t),n=c5(a.componentMainType,a.componentIndex,a.componentHighDownName,r),i=n.dispatchers,o=n.focusSelf;i?(o&&XM(a.componentMainType,a.componentIndex,r),z(i,function(s){return yz(s,e)})):(YM(a.seriesIndex,a.focus,a.blurScope,r),a.focus==="self"&&XM(a.componentMainType,a.componentIndex,r),yz(t,e))}function Ave(t,e,r){mW(r);var a=dt(t),n=c5(a.componentMainType,a.componentIndex,a.componentHighDownName,r).dispatchers;n?z(n,function(i){return xz(i,e)}):xz(t,e)}function Mve(t,e,r){if(ZM(e)){var a=e.dataType,n=t.getData(a),i=Dh(n,e);be(i)||(i=[i]),t[e.type===lS?"toggleSelect":e.type===sS?"select":"unselect"](i,a)}}function bz(t){var e=t.getAllData();z(e,function(r){var a=r.data,n=r.type;a.eachItemGraphicEl(function(i,o){t.isSelected(o,n)?hW(i):vW(i)})})}function Dve(t){var e=[];return t.eachSeries(function(r){var a=r.getAllData();z(a,function(n){n.data;var i=n.type,o=r.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:r.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function wh(t,e,r){sh(t,!0),sc(t,Eh),qM(t,e,r)}function Lve(t){sh(t,!1)}function fa(t,e,r,a){a?Lve(t):wh(t,e,r)}function qM(t,e,r){var a=dt(t);e!=null?(a.focus=e,a.blurScope=r):a.focus&&(a.focus=null)}var wz=["emphasis","blur","select"],Eve={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Mn(t,e,r,a){r=r||"itemStyle";for(var n=0;n<wz.length;n++){var i=wz[n],o=e.getModel([i,r]),s=t.ensureState(i);s.style=a?a(o):o[Eve[r]]()}}function sh(t,e){var r=e===!1,a=t;t.highDownSilentOnTouch&&(a.__highDownSilentOnTouch=t.highDownSilentOnTouch),(!r||a.__highDownDispatcher)&&(a.__highByOuter=a.__highByOuter||0,a.__highDownDispatcher=!r)}function ly(t){return!!(t&&t.__highDownDispatcher)}function Rve(t,e,r){var a=dt(t);a.componentMainType=e.mainType,a.componentIndex=e.componentIndex,a.componentHighDownName=r}function Pve(t){var e=mz[t];return e==null&&pz<=32&&(e=mz[t]=pz++),e}function ZM(t){var e=t.type;return e===sS||e===WM||e===lS}function Sz(t){var e=t.type;return e===bh||e===pw}function Ive(t){var e=lW(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var r=t.states.select||{};e.selectFill=r.style&&r.style.fill||null,e.selectStroke=r.style&&r.style.stroke||null}var Rv=Ql.CMD,jve=[[],[],[]],_z=Math.sqrt,Ove=Math.atan2;function gW(t,e){if(e){var r=t.data,a=t.len(),n,i,o,s,l,u,c=Rv.M,d=Rv.C,h=Rv.L,v=Rv.R,m=Rv.A,x=Rv.Q;for(o=0,s=0;o<a;){switch(n=r[o++],s=o,i=0,n){case c:i=1;break;case h:i=1;break;case d:i=3;break;case x:i=2;break;case m:var b=e[4],w=e[5],_=_z(e[0]*e[0]+e[1]*e[1]),T=_z(e[2]*e[2]+e[3]*e[3]),C=Ove(-e[1]/T,e[0]/_);r[o]*=_,r[o++]+=b,r[o]*=T,r[o++]+=w,r[o++]*=_,r[o++]*=T,r[o++]+=C,r[o++]+=C,o+=2,s=o;break;case v:u[0]=r[o++],u[1]=r[o++],tn(u,u,e),r[s++]=u[0],r[s++]=u[1],u[0]+=r[o++],u[1]+=r[o++],tn(u,u,e),r[s++]=u[0],r[s++]=u[1]}for(l=0;l<i;l++){var k=jve[l];k[0]=r[o++],k[1]=r[o++],tn(k,k,e),r[s++]=k[0],r[s++]=k[1]}}t.increaseVersion()}}var yk=Math.sqrt,Ob=Math.sin,zb=Math.cos,Lg=Math.PI;function Tz(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function KM(t,e){return(t[0]*e[0]+t[1]*e[1])/(Tz(t)*Tz(e))}function Cz(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(KM(t,e))}function kz(t,e,r,a,n,i,o,s,l,u,c){var d=l*(Lg/180),h=zb(d)*(t-r)/2+Ob(d)*(e-a)/2,v=-1*Ob(d)*(t-r)/2+zb(d)*(e-a)/2,m=h*h/(o*o)+v*v/(s*s);m>1&&(o*=yk(m),s*=yk(m));var x=(n===i?-1:1)*yk((o*o*(s*s)-o*o*(v*v)-s*s*(h*h))/(o*o*(v*v)+s*s*(h*h)))||0,b=x*o*v/s,w=x*-s*h/o,_=(t+r)/2+zb(d)*b-Ob(d)*w,T=(e+a)/2+Ob(d)*b+zb(d)*w,C=Cz([1,0],[(h-b)/o,(v-w)/s]),k=[(h-b)/o,(v-w)/s],A=[(-1*h-b)/o,(-1*v-w)/s],M=Cz(k,A);if(KM(k,A)<=-1&&(M=Lg),KM(k,A)>=1&&(M=0),M<0){var L=Math.round(M/Lg*1e6)/1e6;M=Lg*2+L%2*Lg}c.addData(u,_,T,o,s,C,M,d,i)}var zve=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Bve=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Vve(t){var e=new Ql;if(!t)return e;var r=0,a=0,n=r,i=a,o,s=Ql.CMD,l=t.match(zve);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),h=void 0,v=c.match(Bve)||[],m=v.length,x=0;x<m;x++)v[x]=parseFloat(v[x]);for(var b=0;b<m;){var w=void 0,_=void 0,T=void 0,C=void 0,k=void 0,A=void 0,M=void 0,L=r,R=a,P=void 0,j=void 0;switch(d){case"l":r+=v[b++],a+=v[b++],h=s.L,e.addData(h,r,a);break;case"L":r=v[b++],a=v[b++],h=s.L,e.addData(h,r,a);break;case"m":r+=v[b++],a+=v[b++],h=s.M,e.addData(h,r,a),n=r,i=a,d="l";break;case"M":r=v[b++],a=v[b++],h=s.M,e.addData(h,r,a),n=r,i=a,d="L";break;case"h":r+=v[b++],h=s.L,e.addData(h,r,a);break;case"H":r=v[b++],h=s.L,e.addData(h,r,a);break;case"v":a+=v[b++],h=s.L,e.addData(h,r,a);break;case"V":a=v[b++],h=s.L,e.addData(h,r,a);break;case"C":h=s.C,e.addData(h,v[b++],v[b++],v[b++],v[b++],v[b++],v[b++]),r=v[b-2],a=v[b-1];break;case"c":h=s.C,e.addData(h,v[b++]+r,v[b++]+a,v[b++]+r,v[b++]+a,v[b++]+r,v[b++]+a),r+=v[b-2],a+=v[b-1];break;case"S":w=r,_=a,P=e.len(),j=e.data,o===s.C&&(w+=r-j[P-4],_+=a-j[P-3]),h=s.C,L=v[b++],R=v[b++],r=v[b++],a=v[b++],e.addData(h,w,_,L,R,r,a);break;case"s":w=r,_=a,P=e.len(),j=e.data,o===s.C&&(w+=r-j[P-4],_+=a-j[P-3]),h=s.C,L=r+v[b++],R=a+v[b++],r+=v[b++],a+=v[b++],e.addData(h,w,_,L,R,r,a);break;case"Q":L=v[b++],R=v[b++],r=v[b++],a=v[b++],h=s.Q,e.addData(h,L,R,r,a);break;case"q":L=v[b++]+r,R=v[b++]+a,r+=v[b++],a+=v[b++],h=s.Q,e.addData(h,L,R,r,a);break;case"T":w=r,_=a,P=e.len(),j=e.data,o===s.Q&&(w+=r-j[P-4],_+=a-j[P-3]),r=v[b++],a=v[b++],h=s.Q,e.addData(h,w,_,r,a);break;case"t":w=r,_=a,P=e.len(),j=e.data,o===s.Q&&(w+=r-j[P-4],_+=a-j[P-3]),r+=v[b++],a+=v[b++],h=s.Q,e.addData(h,w,_,r,a);break;case"A":T=v[b++],C=v[b++],k=v[b++],A=v[b++],M=v[b++],L=r,R=a,r=v[b++],a=v[b++],h=s.A,kz(L,R,r,a,A,M,T,C,k,h,e);break;case"a":T=v[b++],C=v[b++],k=v[b++],A=v[b++],M=v[b++],L=r,R=a,r+=v[b++],a+=v[b++],h=s.A,kz(L,R,r,a,A,M,T,C,k,h,e);break}}(d==="z"||d==="Z")&&(h=s.Z,e.addData(h),r=n,a=i),o=h}return e.toStatic(),e}var yW=(function(t){ia(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.applyTransform=function(r){},e})(zt);function xW(t){return t.setData!=null}function bW(t,e){var r=Vve(t),a=ve({},e);return a.buildPath=function(n){var i=xW(n);if(i&&n.canSave()){n.appendPath(r);var o=n.getContext();o&&n.rebuildPath(o,1)}else{var o=i?n.getContext():n;o&&r.rebuildPath(o,1)}},a.applyTransform=function(n){gW(r,n),this.dirtyShape()},a}function wW(t,e){return new yW(bW(t,e))}function Fve(t,e){var r=bW(t,e),a=(function(n){ia(i,n);function i(o){var s=n.call(this,o)||this;return s.applyTransform=r.applyTransform,s.buildPath=r.buildPath,s}return i})(yW);return a}function Gve(t,e){for(var r=[],a=t.length,n=0;n<a;n++){var i=t[n];r.push(i.getUpdatedPathProxy(!0))}var o=new zt(e);return o.createPathProxy(),o.buildPath=function(s){if(xW(s)){s.appendPath(r);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function d5(t,e){e=e||{};var r=new zt;return t.shape&&r.setShape(t.shape),r.setStyle(t.style),e.bakeTransform?gW(r.path,t.getComputedTransform()):e.toLocal?r.setLocalTransform(t.getComputedTransform()):r.copyTransform(t),r.buildPath=t.buildPath,r.applyTransform=r.applyTransform,r.z=t.z,r.z2=t.z2,r.zlevel=t.zlevel,r}var Hve=(function(){function t(){this.cx=0,this.cy=0,this.r=0}return t})(),lc=(function(t){ia(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Hve},e.prototype.buildPath=function(r,a){r.moveTo(a.cx+a.r,a.cy),r.arc(a.cx,a.cy,a.r,0,Math.PI*2)},e})(zt);lc.prototype.type="circle";var Uve=(function(){function t(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return t})(),G_=(function(t){ia(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Uve},e.prototype.buildPath=function(r,a){var n=.5522848,i=a.cx,o=a.cy,s=a.rx,l=a.ry,u=s*n,c=l*n;r.moveTo(i-s,o),r.bezierCurveTo(i-s,o-c,i-u,o-l,i,o-l),r.bezierCurveTo(i+u,o-l,i+s,o-c,i+s,o),r.bezierCurveTo(i+s,o+c,i+u,o+l,i,o+l),r.bezierCurveTo(i-u,o+l,i-s,o+c,i-s,o),r.closePath()},e})(zt);G_.prototype.type="ellipse";var SW=Math.PI,xk=SW*2,Lf=Math.sin,Pv=Math.cos,$ve=Math.acos,Mi=Math.atan2,Nz=Math.abs,j0=Math.sqrt,v0=Math.max,_l=Math.min,Os=1e-4;function Wve(t,e,r,a,n,i,o,s){var l=r-t,u=a-e,c=o-n,d=s-i,h=d*l-c*u;if(!(h*h<Os))return h=(c*(e-i)-d*(t-n))/h,[t+h*l,e+h*u]}function Bb(t,e,r,a,n,i,o){var s=t-r,l=e-a,u=(o?i:-i)/j0(s*s+l*l),c=u*l,d=-u*s,h=t+c,v=e+d,m=r+c,x=a+d,b=(h+m)/2,w=(v+x)/2,_=m-h,T=x-v,C=_*_+T*T,k=n-i,A=h*x-m*v,M=(T<0?-1:1)*j0(v0(0,k*k*C-A*A)),L=(A*T-_*M)/C,R=(-A*_-T*M)/C,P=(A*T+_*M)/C,j=(-A*_+T*M)/C,V=L-b,I=R-w,F=P-b,G=j-w;return V*V+I*I>F*F+G*G&&(L=P,R=j),{cx:L,cy:R,x0:-c,y0:-d,x1:L*(n/k-1),y1:R*(n/k-1)}}function Yve(t){var e;if(be(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function Xve(t,e){var r,a=v0(e.r,0),n=v0(e.r0||0,0),i=a>0,o=n>0;if(!(!i&&!o)){if(i||(a=n,n=0),n>a){var s=a;a=n,n=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,d=e.cy,h=!!e.clockwise,v=Nz(u-l),m=v>xk&&v%xk;if(m>Os&&(v=m),!(a>Os))t.moveTo(c,d);else if(v>xk-Os)t.moveTo(c+a*Pv(l),d+a*Lf(l)),t.arc(c,d,a,l,u,!h),n>Os&&(t.moveTo(c+n*Pv(u),d+n*Lf(u)),t.arc(c,d,n,u,l,h));else{var x=void 0,b=void 0,w=void 0,_=void 0,T=void 0,C=void 0,k=void 0,A=void 0,M=void 0,L=void 0,R=void 0,P=void 0,j=void 0,V=void 0,I=void 0,F=void 0,G=a*Pv(l),O=a*Lf(l),U=n*Pv(u),$=n*Lf(u),K=v>Os;if(K){var q=e.cornerRadius;q&&(r=Yve(q),x=r[0],b=r[1],w=r[2],_=r[3]);var H=Nz(a-n)/2;if(T=_l(H,w),C=_l(H,_),k=_l(H,x),A=_l(H,b),R=M=v0(T,C),P=L=v0(k,A),(M>Os||L>Os)&&(j=a*Pv(u),V=a*Lf(u),I=n*Pv(l),F=n*Lf(l),v<SW)){var Z=Wve(G,O,I,F,j,V,U,$);if(Z){var te=G-Z[0],ie=O-Z[1],ce=j-Z[0],me=V-Z[1],ze=1/Lf($ve((te*ce+ie*me)/(j0(te*te+ie*ie)*j0(ce*ce+me*me)))/2),Ce=j0(Z[0]*Z[0]+Z[1]*Z[1]);R=_l(M,(a-Ce)/(ze+1)),P=_l(L,(n-Ce)/(ze-1))}}}if(!K)t.moveTo(c+G,d+O);else if(R>Os){var ge=_l(w,R),Be=_l(_,R),_e=Bb(I,F,G,O,a,ge,h),Oe=Bb(j,V,U,$,a,Be,h);t.moveTo(c+_e.cx+_e.x0,d+_e.cy+_e.y0),R<M&&ge===Be?t.arc(c+_e.cx,d+_e.cy,R,Mi(_e.y0,_e.x0),Mi(Oe.y0,Oe.x0),!h):(ge>0&&t.arc(c+_e.cx,d+_e.cy,ge,Mi(_e.y0,_e.x0),Mi(_e.y1,_e.x1),!h),t.arc(c,d,a,Mi(_e.cy+_e.y1,_e.cx+_e.x1),Mi(Oe.cy+Oe.y1,Oe.cx+Oe.x1),!h),Be>0&&t.arc(c+Oe.cx,d+Oe.cy,Be,Mi(Oe.y1,Oe.x1),Mi(Oe.y0,Oe.x0),!h))}else t.moveTo(c+G,d+O),t.arc(c,d,a,l,u,!h);if(!(n>Os)||!K)t.lineTo(c+U,d+$);else if(P>Os){var ge=_l(x,P),Be=_l(b,P),_e=Bb(U,$,j,V,n,-Be,h),Oe=Bb(G,O,I,F,n,-ge,h);t.lineTo(c+_e.cx+_e.x0,d+_e.cy+_e.y0),P<L&&ge===Be?t.arc(c+_e.cx,d+_e.cy,P,Mi(_e.y0,_e.x0),Mi(Oe.y0,Oe.x0),!h):(Be>0&&t.arc(c+_e.cx,d+_e.cy,Be,Mi(_e.y0,_e.x0),Mi(_e.y1,_e.x1),!h),t.arc(c,d,n,Mi(_e.cy+_e.y1,_e.cx+_e.x1),Mi(Oe.cy+Oe.y1,Oe.cx+Oe.x1),h),ge>0&&t.arc(c+Oe.cx,d+Oe.cy,ge,Mi(Oe.y1,Oe.x1),Mi(Oe.y0,Oe.x0),!h))}else t.lineTo(c+U,d+$),t.arc(c,d,n,u,l,h)}t.closePath()}}}var qve=(function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return t})(),Ii=(function(t){ia(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new qve},e.prototype.buildPath=function(r,a){Xve(r,a)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e})(zt);Ii.prototype.type="sector";var Zve=(function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t})(),Wy=(function(t){ia(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Zve},e.prototype.buildPath=function(r,a){var n=a.cx,i=a.cy,o=Math.PI*2;r.moveTo(n+a.r,i),r.arc(n,i,a.r,0,o,!1),r.moveTo(n+a.r0,i),r.arc(n,i,a.r0,0,o,!0)},e})(zt);Wy.prototype.type="ring";function Kve(t,e,r,a){var n=[],i=[],o=[],s=[],l,u,c,d;if(a){c=[1/0,1/0],d=[-1/0,-1/0];for(var h=0,v=t.length;h<v;h++)dd(c,c,t[h]),fd(d,d,t[h]);dd(c,c,a[0]),fd(d,d,a[1])}for(var h=0,v=t.length;h<v;h++){var m=t[h];if(r)l=t[h?h-1:v-1],u=t[(h+1)%v];else if(h===0||h===v-1){n.push(Uu(t[h]));continue}else l=t[h-1],u=t[h+1];ih(i,u,l),lw(i,i,e);var x=yM(m,l),b=yM(m,u),w=x+b;w!==0&&(x/=w,b/=w),lw(o,i,-x),lw(s,i,b);var _=m4([],m,o),T=m4([],m,s);a&&(fd(_,_,c),dd(_,_,d),fd(T,T,c),dd(T,T,d)),n.push(_),n.push(T)}return r&&n.push(n.shift()),n}function _W(t,e,r){var a=e.smooth,n=e.points;if(n&&n.length>=2){if(a){var i=Kve(n,a,r,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(r?o:o-1);s++){var l=i[s*2],u=i[s*2+1],c=n[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{t.moveTo(n[0][0],n[0][1]);for(var s=1,d=n.length;s<d;s++)t.lineTo(n[s][0],n[s][1])}r&&t.closePath()}}var Qve=(function(){function t(){this.points=null,this.smooth=0,this.smoothConstraint=null}return t})(),ji=(function(t){ia(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Qve},e.prototype.buildPath=function(r,a){_W(r,a,!0)},e})(zt);ji.prototype.type="polygon";var Jve=(function(){function t(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return t})(),xi=(function(t){ia(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Jve},e.prototype.buildPath=function(r,a){_W(r,a,!1)},e})(zt);xi.prototype.type="polyline";var epe={},tpe=(function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t})(),fn=(function(t){ia(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new tpe},e.prototype.buildPath=function(r,a){var n,i,o,s;if(this.subPixelOptimize){var l=B_(epe,a,this.style);n=l.x1,i=l.y1,o=l.x2,s=l.y2}else n=a.x1,i=a.y1,o=a.x2,s=a.y2;var u=a.percent;u!==0&&(r.moveTo(n,i),u<1&&(o=n*(1-u)+o*u,s=i*(1-u)+s*u),r.lineTo(o,s))},e.prototype.pointAt=function(r){var a=this.shape;return[a.x1*(1-r)+a.x2*r,a.y1*(1-r)+a.y2*r]},e})(zt);fn.prototype.type="line";var oo=[],rpe=(function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return t})();function Az(t,e,r){var a=t.cpx2,n=t.cpy2;return a!=null||n!=null?[(r?M4:Wn)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?M4:Wn)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?CM:ii)(t.x1,t.cpx1,t.x2,e),(r?CM:ii)(t.y1,t.cpy1,t.y2,e)]}var Yy=(function(t){ia(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new rpe},e.prototype.buildPath=function(r,a){var n=a.x1,i=a.y1,o=a.x2,s=a.y2,l=a.cpx1,u=a.cpy1,c=a.cpx2,d=a.cpy2,h=a.percent;h!==0&&(r.moveTo(n,i),c==null||d==null?(h<1&&(ry(n,l,o,h,oo),l=oo[1],o=oo[2],ry(i,u,s,h,oo),u=oo[1],s=oo[2]),r.quadraticCurveTo(l,u,o,s)):(h<1&&(Ed(n,l,c,o,h,oo),l=oo[1],c=oo[2],o=oo[3],Ed(i,u,d,s,h,oo),u=oo[1],d=oo[2],s=oo[3]),r.bezierCurveTo(l,u,c,d,o,s)))},e.prototype.pointAt=function(r){return Az(this.shape,r,!1)},e.prototype.tangentAt=function(r){var a=Az(this.shape,r,!0);return vm(a,a)},e})(zt);Yy.prototype.type="bezier-curve";var ape=(function(){function t(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t})(),H_=(function(t){ia(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ape},e.prototype.buildPath=function(r,a){var n=a.cx,i=a.cy,o=Math.max(a.r,0),s=a.startAngle,l=a.endAngle,u=a.clockwise,c=Math.cos(s),d=Math.sin(s);r.moveTo(c*o+n,d*o+i),r.arc(n,i,o,s,l,!u)},e})(zt);H_.prototype.type="arc";var U_=(function(t){ia(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="compound",r}return e.prototype._updatePathDirty=function(){for(var r=this.shape.paths,a=this.shapeChanged(),n=0;n<r.length;n++)a=a||r[n].shapeChanged();a&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var r=this.shape.paths||[],a=this.getGlobalScale(),n=0;n<r.length;n++)r[n].path||r[n].createPathProxy(),r[n].path.setScale(a[0],a[1],r[n].segmentIgnoreThreshold)},e.prototype.buildPath=function(r,a){for(var n=a.paths||[],i=0;i<n.length;i++)n[i].buildPath(r,n[i].shape,!0)},e.prototype.afterBrush=function(){for(var r=this.shape.paths||[],a=0;a<r.length;a++)r[a].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),zt.prototype.getBoundingRect.call(this)},e})(zt),TW=(function(){function t(e){this.colorStops=e||[]}return t.prototype.addColorStop=function(e,r){this.colorStops.push({offset:e,color:r})},t})(),ym=(function(t){ia(e,t);function e(r,a,n,i,o,s){var l=t.call(this,o)||this;return l.x=r??0,l.y=a??0,l.x2=n??1,l.y2=i??0,l.type="linear",l.global=s||!1,l}return e})(TW),CW=(function(t){ia(e,t);function e(r,a,n,i,o){var s=t.call(this,i)||this;return s.x=r??.5,s.y=a??.5,s.r=n??.5,s.type="radial",s.global=o||!1,s}return e})(TW),bk=Math.min,npe=Math.max,Vb=Math.abs,Ef=[0,0],Rf=[0,0],ni=f$(),Fb=ni.minTv,Gb=ni.maxTv,kW=(function(){function t(e,r){this._corners=[],this._axes=[],this._origin=[0,0];for(var a=0;a<4;a++)this._corners[a]=new at;for(var a=0;a<2;a++)this._axes[a]=new at;e&&this.fromBoundingRect(e,r)}return t.prototype.fromBoundingRect=function(e,r){var a=this._corners,n=this._axes,i=e.x,o=e.y,s=i+e.width,l=o+e.height;if(a[0].set(i,o),a[1].set(s,o),a[2].set(s,l),a[3].set(i,l),r)for(var u=0;u<4;u++)a[u].transform(r);at.sub(n[0],a[1],a[0]),at.sub(n[1],a[3],a[0]),n[0].normalize(),n[1].normalize();for(var u=0;u<2;u++)this._origin[u]=n[u].dot(a[0])},t.prototype.intersect=function(e,r,a){var n=!0,i=!r;return r&&at.set(r,0,0),ni.reset(a,!i),!this._intersectCheckOneSide(this,e,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(n=!1,i)||!i&&!ni.negativeSize&&at.copy(r,n?ni.useDir?ni.dirMinTv:Fb:Gb),n},t.prototype._intersectCheckOneSide=function(e,r,a,n){for(var i=!0,o=0;o<2;o++){var s=e._axes[o];if(e._getProjMinMaxOnAxis(o,e._corners,Ef),e._getProjMinMaxOnAxis(o,r._corners,Rf),ni.negativeSize||Ef[1]<Rf[0]||Ef[0]>Rf[1]){if(i=!1,ni.negativeSize||a)return i;var l=Vb(Rf[0]-Ef[1]),u=Vb(Ef[0]-Rf[1]);bk(l,u)>Gb.len()&&(l<u?at.scale(Gb,s,-l*n):at.scale(Gb,s,u*n))}else if(!a){var l=Vb(Rf[0]-Ef[1]),u=Vb(Ef[0]-Rf[1]);(ni.useDir||bk(l,u)<Fb.len())&&((l<u||!ni.bidirectional)&&(at.scale(Fb,s,l*n),ni.useDir&&ni.calcDirMTV()),(l>=u||!ni.bidirectional)&&(at.scale(Fb,s,-u*n),ni.useDir&&ni.calcDirMTV()))}}return i},t.prototype._getProjMinMaxOnAxis=function(e,r,a){for(var n=this._axes[e],i=this._origin,o=r[0].dot(n)+i[e],s=o,l=o,u=1;u<r.length;u++){var c=r[u].dot(n)+i[e];s=bk(c,s),l=npe(c,l)}a[0]=s+ni.touchThreshold,a[1]=l-ni.touchThreshold,ni.negativeSize=a[1]<a[0]},t})(),ipe=[],ope=(function(t){ia(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.notClear=!0,r.incremental=!0,r._displayables=[],r._temporaryDisplayables=[],r._cursor=0,r}return e.prototype.traverse=function(r,a){r.call(a,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(r,a){a?this._temporaryDisplayables.push(r):this._displayables.push(r),this.markRedraw()},e.prototype.addDisplayables=function(r,a){a=a||!1;for(var n=0;n<r.length;n++)this.addDisplayable(r[n],a)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(r){for(var a=this._cursor;a<this._displayables.length;a++)r&&r(this._displayables[a]);for(var a=0;a<this._temporaryDisplayables.length;a++)r&&r(this._temporaryDisplayables[a])},e.prototype.update=function(){this.updateTransform();for(var r=this._cursor;r<this._displayables.length;r++){var a=this._displayables[r];a.parent=this,a.update(),a.parent=null}for(var r=0;r<this._temporaryDisplayables.length;r++){var a=this._temporaryDisplayables[r];a.parent=this,a.update(),a.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var r=new ot(1/0,1/0,-1/0,-1/0),a=0;a<this._displayables.length;a++){var n=this._displayables[a],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(ipe)),r.union(i)}this._rect=r}return this._rect},e.prototype.contain=function(r,a){var n=this.transformCoordToLocal(r,a),i=this.getBoundingRect();if(i.contain(n[0],n[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(r,a))return!0}return!1},e})(xs),NW=jt();function xm(t,e,r,a,n){var i;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();i=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=t==="update";if(s){var u=void 0,c=void 0,d=void 0;a?(u=$e(a.duration,200),c=$e(a.easing,"cubicOut"),d=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),d=e.getShallow(l?"animationDelayUpdate":"animationDelay")),i&&(i.duration!=null&&(u=i.duration),i.easing!=null&&(c=i.easing),i.delay!=null&&(d=i.delay)),Ke(d)&&(d=d(r,n)),Ke(u)&&(u=u(r));var h={duration:u||0,delay:d,easing:c};return h}else return null}function f5(t,e,r,a,n,i,o){var s=!1,l;Ke(n)?(o=i,i=n,n=null):it(n)&&(i=n.cb,o=n.during,s=n.isFrom,l=n.removeOpt,n=n.dataIndex);var u=t==="leave";u||e.stopAnimation("leave");var c=xm(t,a,n,u?l||{}:null,a&&a.getAnimationDelayParams?a.getAnimationDelayParams(e,n):null);if(c&&c.duration>0){var d=c.duration,h=c.delay,v=c.easing,m={duration:d,delay:h||0,easing:v,done:i,force:!!i||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,m):e.animateTo(r,m)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),i&&i()}function tr(t,e,r,a,n,i){f5("update",t,e,r,a,n,i)}function na(t,e,r,a,n,i){f5("enter",t,e,r,a,n,i)}function Np(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++){var r=t.animators[e];if(r.scope==="leave")return!0}return!1}function Rd(t,e,r,a,n,i){Np(t)||f5("leave",t,e,r,a,n,i)}function Mz(t,e,r,a){t.removeTextContent(),t.removeTextGuideLine(),Rd(t,{style:{opacity:0}},e,r,a)}function $u(t,e,r){function a(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(n){n.isGroup||Mz(n,e,r,a)}):Mz(t,e,r,a)}function bs(t){NW(t).oldStyle=t.style}function spe(t){return NW(t).oldStyle}var QM={},gt=["x","y"],vn=["width","height"];function lpe(t){return zt.extend(t)}var upe=Fve;function cpe(t,e){return upe(t,e)}function tl(t,e){QM[t]=e}function cS(t){if(QM.hasOwnProperty(t))return QM[t]}function uy(t,e,r,a){var n=wW(t,e);return r&&(a==="center"&&(r=MW(r,n.getBoundingRect())),DW(n,r)),n}function AW(t,e,r){var a=new li({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(n){if(r==="center"){var i={width:n.width,height:n.height};a.setStyle(MW(e,i))}}});return a}function MW(t,e){var r=e.width/e.height,a=t.height*r,n;a<=t.width?n=t.height:(a=t.width,n=a/r);var i=t.x+t.width/2,o=t.y+t.height/2;return{x:i-a/2,y:o-n/2,width:a,height:n}}var ds=Gve;function DW(t,e){if(t.applyTransform){var r=t.getBoundingRect(),a=r.calculateTransform(e);t.applyTransform(a)}}function Hp(t,e){return B_(t,t,{lineWidth:e}),t}function dpe(t,e){return iW(t,t,e),t}var mw=Ro;function Sh(t,e){for(var r=M_([]);t&&t!==e;)Ul(r,t.getLocalTransform(),r),t=t.parent;return r}function Ws(t,e,r){return e&&!Ri(e)&&(e=Gu.getLocalTransform(e)),r&&(e=Zs([],e)),tn([],t,e)}function $_(t,e,r){var a=e[4]===0||e[5]===0||e[0]===0?1:jl(2*e[4]/e[0]),n=e[4]===0||e[5]===0||e[2]===0?1:jl(2*e[4]/e[2]),i=[t==="left"?-a:t==="right"?a:0,t==="top"?-n:t==="bottom"?n:0];return i=Ws(i,e,r),jl(i[0])>jl(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function Dz(t){return!t.isGroup}function fpe(t){return t.shape!=null}function Xy(t,e,r){if(!t||!e)return;function a(o){var s={};return o.traverse(function(l){Dz(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return fpe(o)&&(s.shape=et(o.shape)),s}var i=a(t);e.traverse(function(o){if(Dz(o)&&o.anid){var s=i[o.anid];if(s){var l=n(o);o.attr(n(s)),tr(o,l,r,dt(o).dataIndex)}}})}function LW(t,e){return Se(t,function(r){var a=r[0];a=Ja(a,e.x),a=jo(a,e.x+e.width);var n=r[1];return n=Ja(n,e.y),n=jo(n,e.y+e.height),[a,n]})}function hpe(t,e){var r=Ja(t.x,e.x),a=jo(t.x+t.width,e.x+e.width),n=Ja(t.y,e.y),i=jo(t.y+t.height,e.y+e.height);if(a>=r&&i>=n)return{x:r,y:n,width:a-r,height:i-n}}function qy(t,e,r){var a=ve({rectHover:!0},e),n=a.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(n.image=t.slice(8),nt(n,r),new li(a)):uy(t.replace("path://",""),a,r,"center")}function p0(t,e,r,a,n){for(var i=0,o=n[n.length-1];i<n.length;i++){var s=n[i];if(EW(t,e,r,a,s[0],s[1],o[0],o[1]))return!0;o=s}}function EW(t,e,r,a,n,i,o,s){var l=r-t,u=a-e,c=o-n,d=s-i,h=wk(c,d,l,u);if(vpe(h))return!1;var v=t-n,m=e-i,x=wk(v,m,l,u)/h;if(x<0||x>1)return!1;var b=wk(v,m,c,d)/h;return!(b<0||b>1)}function wk(t,e,r,a){return t*a-r*e}function vpe(t){return t<=1e-6&&t>=-1e-6}function Rh(t,e,r,a,n){return e==null||(qt(e)?ya[0]=ya[1]=ya[2]=ya[3]=e:(ya[0]=e[0],ya[1]=e[1],ya[2]=e[2],ya[3]=e[3]),a&&(ya[0]=Ja(0,ya[0]),ya[1]=Ja(0,ya[1]),ya[2]=Ja(0,ya[2]),ya[3]=Ja(0,ya[3])),r&&(ya[0]=-ya[0],ya[1]=-ya[1],ya[2]=-ya[2],ya[3]=-ya[3]),Lz(t,ya,"x","width",3,1,n&&n[0]||0),Lz(t,ya,"y","height",0,2,n&&n[1]||0)),t}var ya=[0,0,0,0];function Lz(t,e,r,a,n,i,o){var s=e[i]+e[n],l=t[a];t[a]+=s,o=Ja(0,jo(o,l)),t[a]<o?(t[a]=o,t[r]+=e[n]>=0?-e[n]:e[i]>=0?l+e[i]:jl(s)>1e-8?(l-o)*e[n]/s:0):t[r]-=e[n]}function uc(t){var e=t.itemTooltipOption,r=t.componentModel,a=t.itemName,n=Ie(e)?{formatter:e}:e,i=r.mainType,o=r.componentIndex,s={componentType:i,name:a,$vars:["name"]};s[i+"Index"]=o;var l=t.formatterParamsExtra;l&&z(Wt(l),function(c){Ve(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=dt(t.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:a,option:nt({content:a,encodeHTMLContent:!0,formatterParams:s},n)}}function JM(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function Ud(t,e){if(t)if(be(t))for(var r=0;r<t.length;r++)JM(t[r],e);else JM(t,e)}function h5(t){return!t||jl(t[1])<Hb&&jl(t[2])<Hb||jl(t[0])<Hb&&jl(t[3])<Hb}var Hb=1e-5;function cy(t,e){return t?ot.copy(t,e):e.clone()}function v5(t,e){return e?D_(t||oi(),e):void 0}function Ph(t){return{z:t.get("z")||0,zlevel:t.get("zlevel")||0}}function RW(t){var e=-1/0,r=1/0;JM(t,function(i){a(i),a(i.getTextContent()),a(i.getTextGuideLine())});function a(i){if(!(!i||i.isGroup)){var o=i.currentStates;if(o.length)for(var s=0;s<o.length;s++)n(i.states[o[s]]);n(i)}}function n(i){if(i){var o=i.z2;o>e&&(e=o),o<r&&(r=o)}}return r>e&&(r=e=0),{min:r,max:e}}function W_(t,e,r){PW(t,e,r,-1/0)}function PW(t,e,r,a){if(t.ignoreModelZ)return a;var n=t.getTextContent(),i=t.getTextGuideLine(),o=t.isGroup;if(o)for(var s=t.childrenRef(),l=0;l<s.length;l++)a=Ja(PW(s[l],e,r,a),a);else t.z=e,t.zlevel=r,a=Ja(t.z2||0,a);if(n&&(n.z=e,n.zlevel=r,isFinite(a)&&(n.z2=a+2)),i){var u=t.textGuideLineConfig;i.z=e,i.zlevel=r,isFinite(a)&&(i.z2=a+(u&&u.showAbove?1:-1))}return a}tl("circle",lc);tl("ellipse",G_);tl("sector",Ii);tl("ring",Wy);tl("polygon",ji);tl("polyline",xi);tl("rect",Et);tl("line",fn);tl("bezierCurve",Yy);tl("arc",H_);const $h=Object.freeze(Object.defineProperty({__proto__:null,Arc:H_,BezierCurve:Yy,BoundingRect:ot,Circle:lc,CompoundPath:U_,Ellipse:G_,Group:Qe,Image:li,IncrementalDisplayable:ope,Line:fn,LinearGradient:ym,OrientedBoundingRect:kW,Path:zt,Point:at,Polygon:ji,Polyline:xi,RadialGradient:CW,Rect:Et,Ring:Wy,Sector:Ii,Text:Qt,WH:vn,XY:gt,applyTransform:Ws,calcZ2Range:RW,clipPointsByRect:LW,clipRectByRect:hpe,createIcon:qy,ensureCopyRect:cy,ensureCopyTransform:v5,expandOrShrinkRect:Rh,extendPath:cpe,extendShape:lpe,getShapeClass:cS,getTransform:Sh,groupTransition:Xy,initProps:na,isBoundingRectAxisAligned:h5,isElementRemoved:Np,lineLineIntersect:EW,linePolygonIntersect:p0,makeImage:AW,makePath:uy,mergePath:ds,registerShape:tl,removeElement:Rd,removeElementWithFadeOut:$u,resizePath:DW,retrieveZInfo:Ph,setTooltipConfig:uc,subPixelOptimize:mw,subPixelOptimizeLine:Hp,subPixelOptimizeRect:dpe,transformDirection:$_,traverseElements:Ud,traverseUpdateZ:W_,updateProps:tr},Symbol.toStringTag,{value:"Module"}));var Y_={};function IW(t,e){for(var r=0;r<Qi.length;r++){var a=Qi[r],n=e[a],i=t.ensureState(a);i.style=i.style||{},i.style.text=n}var o=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(o,!0)}function eD(t,e,r){var a=t.labelFetcher,n=t.labelDataIndex,i=t.labelDimIndex,o=e.normal,s;a&&(s=a.getFormattedLabel(n,"normal",null,i,o&&o.get("formatter"),r!=null?{interpolatedValue:r}:null)),s==null&&(s=Ke(t.defaultText)?t.defaultText(n,t,r):t.defaultText);for(var l={normal:s},u=0;u<Qi.length;u++){var c=Qi[u],d=e[c];l[c]=$e(a?a.getFormattedLabel(n,c,null,i,d&&d.get("formatter")):null,s)}return l}function qn(t,e,r,a){r=r||Y_;for(var n=t instanceof Qt,i=!1,o=0;o<sy.length;o++){var s=e[sy[o]];if(s&&s.getShallow("show")){i=!0;break}}var l=n?t:t.getTextContent();if(i){n||(l||(l=new Qt,t.setTextContent(l)),t.stateProxy&&(l.stateProxy=t.stateProxy));var u=eD(r,e),c=e.normal,d=!!c.getShallow("show"),h=Fr(c,a&&a.normal,r,!1,!n);h.text=u.normal,n||t.setTextConfig(dS(c,r,!1));for(var o=0;o<Qi.length;o++){var v=Qi[o],s=e[v];if(s){var m=l.ensureState(v),x=!!$e(s.getShallow("show"),d);if(x!==d&&(m.ignore=!x),m.style=Fr(s,a&&a[v],r,!0,!n),m.style.text=u[v],!n){var b=t.ensureState(v);b.textConfig=dS(s,r,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(h.x=l.style.x),l.style.y!=null&&(h.y=l.style.y),l.ignore=!d,l.useStyle(h),l.dirty(),r.enableTextSetter&&(bm(l).setLabelText=function(w){var _=eD(r,e,w);IW(l,_)})}else l&&(l.ignore=!0);t.dirty()}function Dn(t,e){e=e||"label";for(var r={normal:t.getModel(e)},a=0;a<Qi.length;a++){var n=Qi[a];r[n]=t.getModel([n,e])}return r}function Fr(t,e,r,a,n){var i={};return ppe(i,t,r,a,n),e&&ve(i,e),i}function dS(t,e,r){e=e||{};var a={},n,i=t.getShallow("rotate"),o=$e(t.getShallow("distance"),r?null:5),s=t.getShallow("offset");return n=t.getShallow("position")||(r?null:"inside"),n==="outside"&&(n=e.defaultOutsidePosition||"top"),n!=null&&(a.position=n),s!=null&&(a.offset=s),i!=null&&(i*=Math.PI/180,a.rotation=i),o!=null&&(a.distance=o),a.outsideFill=t.get("color")==="inherit"?e.inheritColor||null:"auto",e.autoOverflowArea!=null&&(a.autoOverflowArea=e.autoOverflowArea),e.layoutRect!=null&&(a.layoutRect=e.layoutRect),a}function ppe(t,e,r,a,n){r=r||Y_;var i=e.ecModel,o=i&&i.option.textStyle,s=mpe(e),l;if(s){l={};var u="richInheritPlainLabel",c=$e(e.get(u),i?i.get(u):void 0);for(var d in s)if(s.hasOwnProperty(d)){var h=e.getModel(["rich",d]);Iz(l[d]={},h,o,e,c,r,a,n,!1,!0)}}l&&(t.rich=l);var v=e.get("overflow");v&&(t.overflow=v);var m=e.get("lineOverflow");m&&(t.lineOverflow=m);var x=t,b=e.get("minMargin");if(b!=null)b=qt(b)?b/2:0,x.margin=[b,b,b,b],x.__marginType=bp.minMargin;else{var w=e.get("textMargin");w!=null&&(x.margin=N_(w),x.__marginType=bp.textMargin)}Iz(t,e,o,null,null,r,a,n,!0,!1)}function mpe(t){for(var e;t&&t!==t.ecModel;){var r=(t.option||Y_).rich;if(r){e=e||{};for(var a=Wt(r),n=0;n<a.length;n++){var i=a[n];e[i]=1}}t=t.parentModel}return e}var Ez=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Rz=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Pz=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Iz(t,e,r,a,n,i,o,s,l,u){r=!o&&r||Y_;var c=i&&i.inheritColor,d=e.getShallow("color"),h=e.getShallow("textBorderColor"),v=$e(e.getShallow("opacity"),r.opacity);(d==="inherit"||d==="auto")&&(c?d=c:d=null),(h==="inherit"||h==="auto")&&(c?h=c:h=null),s||(d=d||r.color,h=h||r.textBorderColor),d!=null&&(t.fill=d),h!=null&&(t.stroke=h);var m=$e(e.getShallow("textBorderWidth"),r.textBorderWidth);m!=null&&(t.lineWidth=m);var x=$e(e.getShallow("textBorderType"),r.textBorderType);x!=null&&(t.lineDash=x);var b=$e(e.getShallow("textBorderDashOffset"),r.textBorderDashOffset);b!=null&&(t.lineDashOffset=b),!o&&v==null&&!u&&(v=i&&i.defaultOpacity),v!=null&&(t.opacity=v),!o&&!s&&t.fill==null&&i.inheritColor&&(t.fill=i.inheritColor);for(var w=0;w<Ez.length;w++){var _=Ez[w],T=n!==!1&&a?Io(e.getShallow(_),a.getShallow(_),r[_]):$e(e.getShallow(_),r[_]);T!=null&&(t[_]=T)}for(var w=0;w<Rz.length;w++){var _=Rz[w],T=e.getShallow(_);T!=null&&(t[_]=T)}if(t.verticalAlign==null){var C=e.getShallow("baseline");C!=null&&(t.verticalAlign=C)}if(!l||!i.disableBox){for(var w=0;w<Pz.length;w++){var _=Pz[w],T=e.getShallow(_);T!=null&&(t[_]=T)}var k=e.getShallow("borderType");k!=null&&(t.borderDash=k),(t.backgroundColor==="auto"||t.backgroundColor==="inherit")&&c&&(t.backgroundColor=c),(t.borderColor==="auto"||t.borderColor==="inherit")&&c&&(t.borderColor=c)}}function p5(t,e){var r=e&&e.getModel("textStyle");return vs([t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}var bm=jt();function jW(t,e,r,a){if(t){var n=bm(t);n.prevValue=n.value,n.value=r;var i=e.normal;n.valueAnimation=i.get("valueAnimation"),n.valueAnimation&&(n.precision=i.get("precision"),n.defaultInterpolatedText=a,n.statesModels=e)}}function OW(t,e,r,a,n){var i=bm(t);if(!i.valueAnimation||i.prevValue===i.value)return;var o=i.defaultInterpolatedText,s=$e(i.interpolatedValue,i.prevValue),l=i.value;function u(c){var d=Z$(r,i.precision,s,l,c);i.interpolatedValue=c===1?null:d;var h=eD({labelDataIndex:e,labelFetcher:n,defaultText:o?o(d):d+""},i.statesModels,d);IW(t,h)}t.percent=0,(i.prevValue==null?na:tr)(t,{percent:1},a,e,null,u)}var bp={minMargin:1,textMargin:2},gpe=["textStyle","color"],Sk=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],_k=new Qt,ype=(function(){function t(){}return t.prototype.getTextColor=function(e){var r=this.ecModel;return this.getShallow("color")||(!e&&r?r.get(gpe):null)},t.prototype.getFont=function(){return p5({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(e){for(var r={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},a=0;a<Sk.length;a++)r[Sk[a]]=this.getShallow(Sk[a]);return _k.useStyle(r),_k.update(),_k.getBoundingRect()},t})(),zW=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],xpe=Lh(zW),bpe=(function(){function t(){}return t.prototype.getLineStyle=function(e){return xpe(this,e)},t})(),BW=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],wpe=Lh(BW),Spe=(function(){function t(){}return t.prototype.getItemStyle=function(e,r){return wpe(this,e,r)},t})(),$t=(function(){function t(e,r,a){this.parentModel=r,this.ecModel=a,this.option=e}return t.prototype.init=function(e,r,a){},t.prototype.mergeOption=function(e,r){Ct(this.option,e,!0)},t.prototype.get=function(e,r){return e==null?this.option:this._doGet(this.parsePath(e),!r&&this.parentModel)},t.prototype.getShallow=function(e,r){var a=this.option,n=a==null?a:a[e];if(n==null&&!r){var i=this.parentModel;i&&(n=i.getShallow(e))}return n},t.prototype.getModel=function(e,r){var a=e!=null,n=a?this.parsePath(e):null,i=a?this._doGet(n):this.option;return r=r||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(n)),new t(i,r,this.ecModel)},t.prototype.isEmpty=function(){return this.option==null},t.prototype.restoreData=function(){},t.prototype.clone=function(){var e=this.constructor;return new e(et(this.option))},t.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},t.prototype.resolveParentPath=function(e){return e},t.prototype.isAnimationEnabled=function(){if(!Ut.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(e,r){var a=this.option;if(!e)return a;for(var n=0;n<e.length&&!(e[n]&&(a=a&&typeof a=="object"?a[e[n]]:null,a==null));n++);return a==null&&r&&(a=r._doGet(this.resolveParentPath(e),r.parentModel)),a},t})();r5($t);Mhe($t);gn($t,bpe);gn($t,Spe);gn($t,Phe);gn($t,ype);var _pe=Math.round(Math.random()*10);function wm(t){return[t||"",_pe++].join("_")}function Tpe(t){var e={};t.registerSubTypeDefaulter=function(r,a){var n=zl(r);e[n.main]=a},t.determineSubType=function(r,a){var n=a.type;if(!n){var i=zl(r).main;t.hasSubTypes(r)&&e[i]&&(n=e[i](a))}return n}}function Cpe(t,e){t.topologicalTravel=function(i,o,s,l){if(!i.length)return;var u=r(o),c=u.graph,d=u.noEntryList,h={};for(z(i,function(_){h[_]=!0});d.length;){var v=d.pop(),m=c[v],x=!!h[v];x&&(s.call(l,v,m.originalDeps.slice()),delete h[v]),z(m.successor,x?w:b)}z(h,function(){var _="";throw new Error(_)});function b(_){c[_].entryCount--,c[_].entryCount===0&&d.push(_)}function w(_){h[_]=!0,b(_)}};function r(i){var o={},s=[];return z(i,function(l){var u=a(o,l),c=u.originalDeps=e(l),d=n(c,i);u.entryCount=d.length,u.entryCount===0&&s.push(l),z(d,function(h){St(u.predecessor,h)<0&&u.predecessor.push(h);var v=a(o,h);St(v.successor,h)<0&&v.successor.push(l)})}),{graph:o,noEntryList:s}}function a(i,o){return i[o]||(i[o]={predecessor:[],successor:[]}),i[o]}function n(i,o){var s=[];return z(i,function(l){St(o,l)>=0&&s.push(l)}),s}}function $d(t,e){return Ct(Ct({},t,!0),e,!0)}const kpe={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},Npe={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType}",withoutName:"第{seriesId}个系列是一个{seriesType}",separator:{middle:"",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:"",end:""}}}};var fS="ZH",m5="EN",Ap=m5,gw={},g5={},VW=Ut.domSupported?(function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Ap).toUpperCase();return t.indexOf(fS)>-1?fS:Ap})():Ap;function FW(t,e){t=t.toUpperCase(),g5[t]=new $t(e),gw[t]=e}function Ape(t){if(Ie(t)){var e=gw[t.toUpperCase()]||{};return t===fS||t===m5?et(e):Ct(et(e),et(gw[Ap]),!1)}else return Ct(et(t),et(gw[Ap]),!1)}function tD(t){return g5[t]}function Mpe(){return g5[Ap]}FW(m5,kpe);FW(fS,Npe);var rD=null;function Dpe(t){rD||(rD=t)}function hn(){return rD}var y5=1e3,x5=y5*60,O0=x5*60,fs=O0*24,jz=fs*365,Lpe={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},yw={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},Epe="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Ub="{yyyy}-{MM}-{dd}",Oz={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ub,hour:Ub+" "+yw.hour,minute:Ub+" "+yw.minute,second:Ub+" "+yw.second,millisecond:Epe},Mo=["year","month","day","hour","minute","second","millisecond"],Rpe=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Ppe(t){return!Ie(t)&&!Ke(t)?Ipe(t):t}function Ipe(t){t=t||{};var e={},r=!0;return z(Mo,function(a){r&&(r=t[a]==null)}),z(Mo,function(a,n){var i=t[a];e[a]={};for(var o=null,s=n;s>=0;s--){var l=Mo[s],u=it(i)&&!be(i)?i[l]:i,c=void 0;be(u)?(c=u.slice(),o=c[0]||""):Ie(u)?(o=u,c=[o]):(o==null?o=yw[a]:Lpe[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),e[a][l]=c}}),e}function Uc(t,e){return t+="","0000".substr(0,e-t.length)+t}function z0(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function jpe(t){return t===z0(t)}function Ope(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function X_(t,e,r,a){var n=Uh(t),i=n[GW(r)](),o=n[b5(r)]()+1,s=Math.floor((o-1)/3)+1,l=n[w5(r)](),u=n["get"+(r?"UTC":"")+"Day"](),c=n[S5(r)](),d=(c-1)%12+1,h=n[_5(r)](),v=n[T5(r)](),m=n[C5(r)](),x=c>=12?"pm":"am",b=x.toUpperCase(),w=a instanceof $t?a:tD(a||VW)||Mpe(),_=w.getModel("time"),T=_.get("month"),C=_.get("monthAbbr"),k=_.get("dayOfWeek"),A=_.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,x+"").replace(/{A}/g,b+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Uc(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,T[o-1]).replace(/{MMM}/g,C[o-1]).replace(/{MM}/g,Uc(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Uc(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,k[u]).replace(/{ee}/g,A[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Uc(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Uc(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,Uc(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Uc(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Uc(m,3)).replace(/{S}/g,m+"")}function zpe(t,e,r,a,n){var i=null;if(Ie(r))i=r;else if(Ke(r)){var o={time:t.time,level:t.time.level},s=hn();s&&s.makeAxisLabelFormatterParamBreak(o,t.break),i=r(t.value,e,o)}else{var l=t.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var c=wp(t.value,n);i=r[c][c][0]}}return X_(new Date(t.value),i,n,a)}function wp(t,e){var r=Uh(t),a=r[b5(e)]()+1,n=r[w5(e)](),i=r[S5(e)](),o=r[_5(e)](),s=r[T5(e)](),l=r[C5(e)](),u=l===0,c=u&&s===0,d=c&&o===0,h=d&&i===0,v=h&&n===1,m=v&&a===1;return m?"year":v?"month":h?"day":d?"hour":c?"minute":u?"second":"millisecond"}function aD(t,e,r){switch(e){case"year":t[HW(r)](0);case"month":t[UW(r)](1);case"day":t[$W(r)](0);case"hour":t[WW(r)](0);case"minute":t[YW(r)](0);case"second":t[XW(r)](0)}return t}function GW(t){return t?"getUTCFullYear":"getFullYear"}function b5(t){return t?"getUTCMonth":"getMonth"}function w5(t){return t?"getUTCDate":"getDate"}function S5(t){return t?"getUTCHours":"getHours"}function _5(t){return t?"getUTCMinutes":"getMinutes"}function T5(t){return t?"getUTCSeconds":"getSeconds"}function C5(t){return t?"getUTCMilliseconds":"getMilliseconds"}function Bpe(t){return t?"setUTCFullYear":"setFullYear"}function HW(t){return t?"setUTCMonth":"setMonth"}function UW(t){return t?"setUTCDate":"setDate"}function $W(t){return t?"setUTCHours":"setHours"}function WW(t){return t?"setUTCMinutes":"setMinutes"}function YW(t){return t?"setUTCSeconds":"setSeconds"}function XW(t){return t?"setUTCMilliseconds":"setMilliseconds"}function qW(t){if(!F$(t))return Ie(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function ZW(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,a){return a.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Zy=N_;function nD(t,e,r){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(c){return c&&vs(c)?c:"-"}function i(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=t instanceof Date;if(o||s){var l=o?Uh(t):t;if(isNaN(+l)){if(s)return"-"}else return X_(l,a,r)}if(e==="ordinal")return vM(t)?n(t):qt(t)&&i(t)?t+"":"-";var u=tc(t);return i(u)?qW(u):vM(t)?n(t):typeof t=="boolean"?t+"":"-"}var zz=["a","b","c","d","e","f","g"],Tk=function(t,e){return"{"+t+(e??"")+"}"};function KW(t,e,r){be(e)||(e=[e]);var a=e.length;if(!a)return"";for(var n=e[0].$vars||[],i=0;i<n.length;i++){var o=zz[i];t=t.replace(Tk(o),Tk(o,0))}for(var s=0;s<a;s++)for(var l=0;l<n.length;l++){var u=e[s][n[l]];t=t.replace(Tk(zz[l],s),r?Yi(u):u)}return t}function Vpe(t,e,r){return z(e,function(a,n){t=t.replace("{"+n+"}",a)}),t}function Fpe(t,e){var r=Ie(t)?{color:t,extraCssText:e}:t||{},a=r.color,n=r.type;e=r.extraCssText;var i=r.renderMode||"html";if(!a)return"";if(i==="html")return n==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Yi(a)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Yi(a)+";"+(e||"")+'"></span>';var o=r.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function Ih(t,e){return e=e||"transparent",Ie(t)?t:it(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function hS(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var xw={},Ck={},Ky=(function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(e,r){this._nonSeriesBoxMasterList=a(xw),this._normalMasterList=a(Ck);function a(n,i){var o=[];return z(n,function(s,l){var u=s.create(e,r);o=o.concat(u||[])}),o}},t.prototype.update=function(e,r){z(this._normalMasterList,function(a){a.update&&a.update(e,r)})},t.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},t.register=function(e,r){if(e==="matrix"||e==="calendar"){xw[e]=r;return}Ck[e]=r},t.get=function(e){return Ck[e]||xw[e]},t})();function Gpe(t){return!!xw[t]}var iD={coord:1,coord2:2};function Hpe(t){QW.set(t.fullType,{getCoord2:void 0}).getCoord2=t.getCoord2}var QW=He();function Upe(t){var e=t.getShallow("coord",!0),r=iD.coord;if(e==null){var a=QW.get(t.type);a&&a.getCoord2&&(r=iD.coord2,e=a.getCoord2(t))}return{coord:e,from:r}}var El={none:0,dataCoordSys:1,boxCoordSys:2};function JW(t,e){var r=t.getShallow("coordinateSystem"),a=t.getShallow("coordinateSystemUsage",!0),n=El.none;if(r){var i=t.mainType==="series";a==null&&(a=i?"data":"box"),a==="data"?(n=El.dataCoordSys,i||(n=El.none)):a==="box"&&(n=El.boxCoordSys,!i&&!Gpe(r)&&(n=El.none))}return{coordSysType:r,kind:n}}function Qy(t){var e=t.targetModel,r=t.coordSysType,a=t.coordSysProvider,n=t.isDefaultDataCoordSys;t.allowNotFound;var i=JW(e),o=i.kind,s=i.coordSysType;if(n&&o!==El.dataCoordSys&&(o=El.dataCoordSys,s=r),o===El.none||s!==r)return!1;var l=a(r,e);return l?(o===El.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var eY=function(t,e){var r=e.getReferringComponents(t,Ia).models[0];return r&&r.coordinateSystem},bw=z,tY=["left","right","top","bottom","width","height"],lh=[["width","left","right"],["height","top","bottom"]];function k5(t,e,r,a,n){var i=0,o=0;a==null&&(a=1/0),n==null&&(n=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),d=e.childAt(u+1),h=d&&d.getBoundingRect(),v,m;if(t==="horizontal"){var x=c.width+(h?-h.x+c.x:0);v=i+x,v>a||l.newline?(i=0,v=x,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var b=c.height+(h?-h.y+c.y:0);m=o+b,m>n||l.newline?(i+=s+r,o=0,m=b,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),t==="horizontal"?i=v+r:o=m+r)})}var _h=k5;wt(k5,"vertical");wt(k5,"horizontal");function rY(t,e){return{left:t.getShallow("left",e),top:t.getShallow("top",e),right:t.getShallow("right",e),bottom:t.getShallow("bottom",e),width:t.getShallow("width",e),height:t.getShallow("height",e)}}function $pe(t,e){var r=Ln(t,e,{enableLayoutOnlyByCenter:!0}),a=t.getBoxLayoutParams(),n,i;if(r.type===m0.point)i=r.refPoint,n=ha(a,{width:e.getWidth(),height:e.getHeight()});else{var o=t.get("center"),s=be(o)?o:[o,o];n=ha(a,r.refContainer),i=r.boxCoordFrom===iD.coord2?r.refPoint:[Pe(s[0],n.width)+n.x,Pe(s[1],n.height)+n.y]}return{viewRect:n,center:i}}function aY(t,e){var r=$pe(t,e),a=r.viewRect,n=r.center,i=t.get("radius");be(i)||(i=[0,i]);var o=Pe(a.width,e.getWidth()),s=Pe(a.height,e.getHeight()),l=Math.min(o,s),u=Pe(i[0],l/2),c=Pe(i[1],l/2);return{cx:n[0],cy:n[1],r0:u,r:c,viewRect:a}}function ha(t,e,r){r=Zy(r||0);var a=e.width,n=e.height,i=Pe(t.left,a),o=Pe(t.top,n),s=Pe(t.right,a),l=Pe(t.bottom,n),u=Pe(t.width,a),c=Pe(t.height,n),d=r[2]+r[0],h=r[1]+r[3],v=t.aspect;switch(isNaN(u)&&(u=a-s-h-i),isNaN(c)&&(c=n-l-d-o),v!=null&&(isNaN(u)&&isNaN(c)&&(v>a/n?u=a*.8:c=n*.8),isNaN(u)&&(u=v*c),isNaN(c)&&(c=u/v)),isNaN(i)&&(i=a-s-u-h),isNaN(o)&&(o=n-l-c-d),t.left||t.right){case"center":i=a/2-u/2-r[3];break;case"right":i=a-u-h;break}switch(t.top||t.bottom){case"middle":case"center":o=n/2-c/2-r[0];break;case"bottom":o=n-c-d;break}i=i||0,o=o||0,isNaN(u)&&(u=a-h-i-(s||0)),isNaN(c)&&(c=n-d-o-(l||0));var m=new ot((e.x||0)+i+r[3],(e.y||0)+o+r[0],u,c);return m.margin=r,m}function nY(t,e,r){var a=t.getShallow("preserveAspect",!0);if(!a)return e;var n=e.width/e.height;if(Math.abs(Math.atan(r)-Math.atan(n))<1e-9)return e;var i=t.getShallow("preserveAspectAlign",!0),o=t.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=a==="cover";return n>r&&!l||n<r&&l?(s.width=e.height*r,i==="left"?s.left=0:i==="right"?s.right=0:s.left="center"):(s.height=e.width/r,o==="top"?s.top=0:o==="bottom"?s.bottom=0:s.top="middle"),ha(s,e)}var m0={rect:1,point:2};function Ln(t,e,r){var a,n,i,o=t.boxCoordinateSystem,s;if(o){var l=Upe(t),u=l.coord,c=l.from;if(o.dataToLayout){i=m0.rect,s=c;var d=o.dataToLayout(u);a=d.contentRect||d.rect}else r&&r.enableLayoutOnlyByCenter&&o.dataToPoint&&(i=m0.point,s=c,n=o.dataToPoint(u))}return i==null&&(i=m0.rect),i===m0.rect&&(a||(a={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),n=[a.x+a.width/2,a.y+a.height/2]),{type:i,refContainer:a,refPoint:n,boxCoordFrom:s}}function q_(t,e,r,a,n,i){var o=!n||!n.hv||n.hv[0],s=!n||!n.hv||n.hv[1],l=n&&n.boundingMode||"all";if(i=i||t,i.x=t.x,i.y=t.y,!o&&!s)return!1;var u;if(l==="raw")u=t.type==="group"?new ot(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var c=t.getLocalTransform();u=u.clone(),u.applyTransform(c)}var d=ha(nt({width:u.width,height:u.height},e),r,a),h=o?d.x-u.x:0,v=s?d.y-u.y:0;return l==="raw"?(i.x=h,i.y=v):(i.x+=h,i.y+=v),i===t&&t.markRedraw(),!0}function Wpe(t,e){return t[lh[e][0]]!=null||t[lh[e][1]]!=null&&t[lh[e][2]]!=null}function dy(t){var e=t.layoutMode||t.constructor.layoutMode;return it(e)?e:e?{type:e}:null}function Jl(t,e,r){var a=r&&r.ignoreSize;!be(a)&&(a=[a,a]);var n=o(lh[0],0),i=o(lh[1],1);l(lh[0],t,n),l(lh[1],t,i);function o(u,c){var d={},h=0,v={},m=0,x=2;if(bw(u,function(_){v[_]=t[_]}),bw(u,function(_){Ve(e,_)&&(d[_]=v[_]=e[_]),s(d,_)&&h++,s(v,_)&&m++}),a[c])return s(e,u[1])?v[u[2]]=null:s(e,u[2])&&(v[u[1]]=null),v;if(m===x||!h)return v;if(h>=x)return d;for(var b=0;b<u.length;b++){var w=u[b];if(!Ve(d,w)&&Ve(t,w)){d[w]=t[w];break}}return d}function s(u,c){return u[c]!=null&&u[c]!=="auto"}function l(u,c,d){bw(u,function(h){c[h]=d[h]})}}function Wh(t){return iY({},t)}function iY(t,e){return e&&t&&bw(tY,function(r){Ve(e,r)&&(t[r]=e[r])}),t}var Ype=jt(),Gt=(function(t){se(e,t);function e(r,a,n){var i=t.call(this,r,a,n)||this;return i.uid=wm("ec_cpt_model"),i}return e.prototype.init=function(r,a,n){this.mergeDefaultAndTheme(r,n)},e.prototype.mergeDefaultAndTheme=function(r,a){var n=dy(this),i=n?Wh(r):{},o=a.getTheme();Ct(r,o.get(this.mainType)),Ct(r,this.getDefaultOption()),n&&Jl(r,i,n)},e.prototype.mergeOption=function(r,a){Ct(this.option,r,!0);var n=dy(this);n&&Jl(this.option,r,n)},e.prototype.optionUpdated=function(r,a){},e.prototype.getDefaultOption=function(){var r=this.constructor;if(!khe(r))return r.defaultOption;var a=Ype(this);if(!a.defaultOption){for(var n=[],i=r;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var s={},l=n.length-1;l>=0;l--)s=Ct(s,n[l],!0);a.defaultOption=s}return a.defaultOption},e.prototype.getReferringComponents=function(r,a){var n=r+"Index",i=r+"Id";return mm(this.ecModel,r,{index:this.get(n,!0),id:this.get(i,!0)},a)},e.prototype.getBoxLayoutParams=function(){return rY(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=(function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0})(),e})($t);Q$(Gt,$t);P_(Gt);Tpe(Gt);Cpe(Gt,Xpe);function Xpe(t){var e=[];return z(Gt.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=Se(e,function(r){return zl(r).main}),t!=="dataset"&&St(e,"dataset")<=0&&e.unshift("dataset"),e}var ne={color:{},darkColor:{},size:{}},Za=ne.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};ve(Za,{primary:Za.neutral80,secondary:Za.neutral70,tertiary:Za.neutral60,quaternary:Za.neutral50,disabled:Za.neutral20,border:Za.neutral30,borderTint:Za.neutral20,borderShade:Za.neutral40,background:Za.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Za.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Za.neutral70,axisLineTint:Za.neutral40,axisTick:Za.neutral70,axisTickMinor:Za.neutral60,axisLabel:Za.neutral70,axisSplitLine:Za.neutral15,axisMinorSplitLine:Za.neutral05});for(var Pf in Za)if(Za.hasOwnProperty(Pf)){var Bz=Za[Pf];Pf==="theme"?ne.darkColor.theme=Za.theme.slice():Pf==="highlight"?ne.darkColor.highlight="rgba(255,231,130,0.4)":Pf.indexOf("accent")===0?ne.darkColor[Pf]=Cd(Bz,null,function(t){return t*.5},function(t){return Math.min(1,1.3-t)}):ne.darkColor[Pf]=Cd(Bz,null,function(t){return t*.9},function(t){return 1-Math.pow(t,1.5)})}ne.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var oY="";typeof navigator<"u"&&(oY=navigator.platform||"");var Iv="rgba(0, 0, 0, 0.2)",sY=ne.color.theme[0],qpe=Cd(sY,null,null,.9);const Zpe={darkMode:"auto",colorBy:"series",color:ne.color.theme,gradientColor:[qpe,sY],aria:{decal:{decals:[{color:Iv,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Iv,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Iv,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Iv,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Iv,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Iv,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:oY.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var lY=He(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),zo="original",si="arrayRows",Bo="objectRows",rl="keyedColumns",Nd="typedArray",uY="unknown",Ys="column",Yh="row",pi={Must:1,Might:2,Not:3},cY=jt();function Kpe(t){cY(t).datasetMap=He()}function dY(t,e,r){var a={},n=A5(e);if(!n||!t)return a;var i=[],o=[],s=e.ecModel,l=cY(s).datasetMap,u=n.uid+"_"+r.seriesLayoutBy,c,d;t=t.slice(),z(t,function(x,b){var w=it(x)?x:t[b]={name:x};w.type==="ordinal"&&c==null&&(c=b,d=m(w)),a[w.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:d,valueWayDim:0});z(t,function(x,b){var w=x.name,_=m(x);if(c==null){var T=h.valueWayDim;v(a[w],T,_),v(o,T,_),h.valueWayDim+=_}else if(c===b)v(a[w],0,_),v(i,0,_);else{var T=h.categoryWayDim;v(a[w],T,_),v(o,T,_),h.categoryWayDim+=_}});function v(x,b,w){for(var _=0;_<w;_++)x.push(b+_)}function m(x){var b=x.dimsDef;return b?b.length:1}return i.length&&(a.itemName=i),o.length&&(a.seriesName=o),a}function N5(t,e,r){var a={},n=A5(t);if(!n)return a;var i=e.sourceFormat,o=e.dimensionsDefine,s;(i===Bo||i===rl)&&z(o,function(c,d){(it(c)?c.name:c)==="name"&&(s=d)});var l=(function(){for(var c={},d={},h=[],v=0,m=Math.min(5,r);v<m;v++){var x=hY(e.data,i,e.seriesLayoutBy,o,e.startIndex,v);h.push(x);var b=x===pi.Not;if(b&&c.v==null&&v!==s&&(c.v=v),(c.n==null||c.n===c.v||!b&&h[c.n]===pi.Not)&&(c.n=v),w(c)&&h[c.n]!==pi.Not)return c;b||(x===pi.Might&&d.v==null&&v!==s&&(d.v=v),(d.n==null||d.n===d.v)&&(d.n=v))}function w(_){return _.v!=null&&_.n!=null}return w(c)?c:w(d)?d:null})();if(l){a.value=[l.v];var u=s??l.n;a.itemName=[u],a.seriesName=[u]}return a}function A5(t){var e=t.get("data",!0);if(!e)return mm(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},Ia).models[0]}function Qpe(t){return!t.get("transform",!0)&&!t.get("fromTransformResult",!0)?[]:mm(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},Ia).models}function fY(t,e){return hY(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function hY(t,e,r,a,n,i){var o,s=5;if(vo(t))return pi.Not;var l,u;if(a){var c=a[i];it(c)?(l=c.name,u=c.type):Ie(c)&&(l=c)}if(u!=null)return u==="ordinal"?pi.Must:pi.Not;if(e===si){var d=t;if(r===Yh){for(var h=d[i],v=0;v<(h||[]).length&&v<s;v++)if((o=C(h[n+v]))!=null)return o}else for(var v=0;v<d.length&&v<s;v++){var m=d[n+v];if(m&&(o=C(m[i]))!=null)return o}}else if(e===Bo){var x=t;if(!l)return pi.Not;for(var v=0;v<x.length&&v<s;v++){var b=x[v];if(b&&(o=C(b[l]))!=null)return o}}else if(e===rl){var w=t;if(!l)return pi.Not;var h=w[l];if(!h||vo(h))return pi.Not;for(var v=0;v<h.length&&v<s;v++)if((o=C(h[v]))!=null)return o}else if(e===zo)for(var _=t,v=0;v<_.length&&v<s;v++){var b=_[v],T=pm(b);if(!be(T))return pi.Not;if((o=C(T[i]))!=null)return o}function C(k){var A=Ie(k);if(k!=null&&Number.isFinite(Number(k))&&k!=="")return A?pi.Might:pi.Not;if(A&&k!=="-")return pi.Must}return pi.Not}var oD=He();function Jpe(t,e){Pi(oD.get(t)==null&&e),oD.set(t,e)}function eme(t,e,r){var a=oD.get(e);if(!a)return r;var n=a(t);return n?r.concat(n):r}var Vz=jt(),tme=jt(),M5=(function(){function t(){}return t.prototype.getColorFromPalette=function(e,r,a){var n=Ir(this.get("color",!0)),i=this.get("colorLayer",!0);return vY(this,Vz,n,i,e,r,a)},t.prototype.clearColorPalette=function(){ame(this,Vz)},t})();function sD(t,e,r,a){var n=Ir(t.get(["aria","decal","decals"]));return vY(t,tme,n,null,e,r,a)}function rme(t,e){for(var r=t.length,a=0;a<r;a++)if(t[a].length>e)return t[a];return t[r-1]}function vY(t,e,r,a,n,i,o){i=i||t;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var c=o==null||!a?r:rme(a,o);if(c=c||r,!(!c||!c.length)){var d=c[l];return n&&(u[n]=d),s.paletteIdx=(l+1)%c.length,d}}function ame(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var $b,Eg,Fz,Gz="\0_ec_inner",nme=1,D5=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,a,n,i,o,s){i=i||{},this.option=null,this._theme=new $t(i),this._locale=new $t(o),this._optionManager=s},e.prototype.setOption=function(r,a,n){var i=$z(a);this._optionManager.setOption(r,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(r,a){return this._resetOption(r,$z(a))},e.prototype._resetOption=function(r,a){var n=!1,i=this._optionManager;if(!r||r==="recreate"){var o=i.mountOption(r==="recreate");!this.option||r==="recreate"?Fz(this,o):(this.restoreData(),this._mergeOption(o,a)),n=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=i.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,a))}if(!r||r==="recreate"||r==="media"){var l=i.getMediaOption(this);l.length&&z(l,function(u){n=!0,this._mergeOption(u,a)},this)}return n},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,a){var n=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=He(),u=a&&a.replaceMergeMainTypeMap;Kpe(this),z(r,function(d,h){d!=null&&(Gt.hasClass(h)?h&&(s.push(h),l.set(h,!0)):n[h]=n[h]==null?et(d):Ct(n[h],d,!0))}),u&&u.each(function(d,h){Gt.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Gt.topologicalTravel(s,Gt.getAllClassMainTypes(),c,this);function c(d){var h=eme(this,d,Ir(r[d])),v=i.get(d),m=v?u&&u.get(d)?"replaceMerge":"normalMerge":"replaceAll",x=Y$(v,h,m);ghe(x,d,Gt),n[d]=null,i.set(d,null),o.set(d,0);var b=[],w=[],_=0,T;z(x,function(C,k){var A=C.existing,M=C.newOption;if(!M)A&&(A.mergeOption({},this),A.optionUpdated({},!1));else{var L=d==="series",R=Gt.getClass(d,C.keyInfo.subType,!L);if(!R)return;if(d==="tooltip"){if(T)return;T=!0}if(A&&A.constructor===R)A.name=C.keyInfo.name,A.mergeOption(M,this),A.optionUpdated(M,!1);else{var P=ve({componentIndex:k},C.keyInfo);A=new R(M,this,this,P),ve(A,P),C.brandNew&&(A.__requireNewView=!0),A.init(M,this,this),A.optionUpdated(null,!0)}}A?(b.push(A.option),w.push(A),_++):(b.push(void 0),w.push(void 0))},this),n[d]=b,i.set(d,w),o.set(d,_),d==="series"&&$b(this)}this._seriesIndices||$b(this)},e.prototype.getOption=function(){var r=et(this.option);return z(r,function(a,n){if(Gt.hasClass(n)){for(var i=Ir(a),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!oy(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,r[n]=i}}),delete r[Gz],r},e.prototype.setTheme=function(r){this._theme=new $t(r),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,a){var n=this._componentsMap.get(r);if(n){var i=n[a||0];if(i)return i;if(a==null){for(var o=0;o<n.length;o++)if(n[o])return n[o]}}},e.prototype.queryComponents=function(r){var a=r.mainType;if(!a)return[];var n=r.index,i=r.id,o=r.name,s=this._componentsMap.get(a);if(!s||!s.length)return[];var l;return n!=null?(l=[],z(Ir(n),function(u){s[u]&&l.push(s[u])})):i!=null?l=Hz("id",i,s):o!=null?l=Hz("name",o,s):l=mr(s,function(u){return!!u}),Uz(l,r)},e.prototype.findComponents=function(r){var a=r.query,n=r.mainType,i=s(a),o=i?this.queryComponents(i):mr(this._componentsMap.get(n),function(u){return!!u});return l(Uz(o,r));function s(u){var c=n+"Index",d=n+"Id",h=n+"Name";return u&&(u[c]!=null||u[d]!=null||u[h]!=null)?{mainType:n,index:u[c],id:u[d],name:u[h]}:null}function l(u){return r.filter?mr(u,r.filter):u}},e.prototype.eachComponent=function(r,a,n){var i=this._componentsMap;if(Ke(r)){var o=a,s=r;i.each(function(d,h){for(var v=0;d&&v<d.length;v++){var m=d[v];m&&s.call(o,h,m,m.componentIndex)}})}else for(var l=Ie(r)?i.get(r):it(r)?this.findComponents(r):null,u=0;l&&u<l.length;u++){var c=l[u];c&&a.call(n,c,c.componentIndex)}},e.prototype.getSeriesByName=function(r){var a=An(r,null);return mr(this._componentsMap.get("series"),function(n){return!!n&&a!=null&&n.name===a})},e.prototype.getSeriesByIndex=function(r){return this._componentsMap.get("series")[r]},e.prototype.getSeriesByType=function(r){return mr(this._componentsMap.get("series"),function(a){return!!a&&a.subType===r})},e.prototype.getSeries=function(){return mr(this._componentsMap.get("series"),function(r){return!!r})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(r,a){Eg(this),z(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];r.call(a,i,n)},this)},e.prototype.eachRawSeries=function(r,a){z(this._componentsMap.get("series"),function(n){n&&r.call(a,n,n.componentIndex)})},e.prototype.eachSeriesByType=function(r,a,n){Eg(this),z(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];o.subType===r&&a.call(n,o,i)},this)},e.prototype.eachRawSeriesByType=function(r,a,n){return z(this.getSeriesByType(r),a,n)},e.prototype.isSeriesFiltered=function(r){return Eg(this),this._seriesIndicesMap.get(r.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(r,a){Eg(this);var n=[];z(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];r.call(a,o,i)&&n.push(i)},this),this._seriesIndices=n,this._seriesIndicesMap=He(n)},e.prototype.restoreData=function(r){$b(this);var a=this._componentsMap,n=[];a.each(function(i,o){Gt.hasClass(o)&&n.push(o)}),Gt.topologicalTravel(n,Gt.getAllClassMainTypes(),function(i){z(a.get(i),function(o){o&&(i!=="series"||!ime(o,r))&&o.restoreData()})})},e.internalField=(function(){$b=function(r){var a=r._seriesIndices=[];z(r._componentsMap.get("series"),function(n){n&&a.push(n.componentIndex)}),r._seriesIndicesMap=He(a)},Eg=function(r){},Fz=function(r,a){r.option={},r.option[Gz]=nme,r._componentsMap=He({series:[]}),r._componentsCount=He();var n=a.aria;it(n)&&n.enabled==null&&(n.enabled=!0),ome(a,r._theme.option),Ct(a,Zpe,!1),r._mergeOption(a,null)}})(),e})($t);function ime(t,e){if(e){var r=e.seriesIndex,a=e.seriesId,n=e.seriesName;return r!=null&&t.componentIndex!==r||a!=null&&t.id!==a||n!=null&&t.name!==n}}function ome(t,e){var r=t.color&&!t.colorLayer;z(e,function(a,n){n==="colorLayer"&&r||n==="color"&&t.color||Gt.hasClass(n)||(typeof a=="object"?t[n]=t[n]?Ct(t[n],a,!1):et(a):t[n]==null&&(t[n]=a))})}function Hz(t,e,r){if(be(e)){var a=He();return z(e,function(i){if(i!=null){var o=An(i,null);o!=null&&a.set(i,!0)}}),mr(r,function(i){return i&&a.get(i[t])})}else{var n=An(e,null);return mr(r,function(i){return i&&n!=null&&i[t]===n})}}function Uz(t,e){return e.hasOwnProperty("subType")?mr(t,function(r){return r&&r.subType===e.subType}):t}function $z(t){var e=He();return t&&z(Ir(t.replaceMerge),function(r){e.set(r,!0)}),{replaceMergeMainTypeMap:e}}gn(D5,M5);var sme=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],pY=(function(){function t(e){z(sme,function(r){this[r]=je(e[r],e)},this)}return t})(),lme=/^(min|max)?(.+)$/,ume=(function(){function t(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return t.prototype.setOption=function(e,r,a){e&&(z(Ir(e.series),function(o){o&&o.data&&vo(o.data)&&Xw(o.data)}),z(Ir(e.dataset),function(o){o&&o.source&&vo(o.source)&&Xw(o.source)})),e=et(e);var n=this._optionBackup,i=cme(e,r,!n);this._newBaseOption=i.baseOption,n?(i.timelineOptions.length&&(n.timelineOptions=i.timelineOptions),i.mediaList.length&&(n.mediaList=i.mediaList),i.mediaDefault&&(n.mediaDefault=i.mediaDefault)):this._optionBackup=i},t.prototype.mountOption=function(e){var r=this._optionBackup;return this._timelineOptions=r.timelineOptions,this._mediaList=r.mediaList,this._mediaDefault=r.mediaDefault,this._currentMediaIndices=[],et(e?r.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(e){var r,a=this._timelineOptions;if(a.length){var n=e.getComponent("timeline");n&&(r=et(a[n.getCurrentIndex()]))}return r},t.prototype.getMediaOption=function(e){var r=this._api.getWidth(),a=this._api.getHeight(),n=this._mediaList,i=this._mediaDefault,o=[],s=[];if(!n.length&&!i)return s;for(var l=0,u=n.length;l<u;l++)dme(n[l].query,r,a)&&o.push(l);return!o.length&&i&&(o=[-1]),o.length&&!hme(o,this._currentMediaIndices)&&(s=Se(o,function(c){return et(c===-1?i.option:n[c].option)})),this._currentMediaIndices=o,s},t})();function cme(t,e,r){var a=[],n,i,o=t.baseOption,s=t.timeline,l=t.options,u=t.media,c=!!t.media,d=!!(l||s||o&&o.timeline);o?(i=o,i.timeline||(i.timeline=s)):((d||c)&&(t.options=t.media=null),i=t),c&&be(u)&&z(u,function(v){v&&v.option&&(v.query?a.push(v):n||(n=v))}),h(i),z(l,function(v){return h(v)}),z(a,function(v){return h(v.option)});function h(v){z(e,function(m){m(v,r)})}return{baseOption:i,timelineOptions:l||[],mediaDefault:n,mediaList:a}}function dme(t,e,r){var a={width:e,height:r,aspectratio:e/r},n=!0;return z(t,function(i,o){var s=o.match(lme);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();fme(a[u],i,l)||(n=!1)}}),n}function fme(t,e,r){return r==="min"?t>=e:r==="max"?t<=e:t===e}function hme(t,e){return t.join(",")===e.join(",")}var Is=z,fy=it,Wz=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function kk(t){var e=t&&t.itemStyle;if(e)for(var r=0,a=Wz.length;r<a;r++){var n=Wz[r],i=e.normal,o=e.emphasis;i&&i[n]&&(t[n]=t[n]||{},t[n].normal?Ct(t[n].normal,i[n]):t[n].normal=i[n],i[n]=null),o&&o[n]&&(t[n]=t[n]||{},t[n].emphasis?Ct(t[n].emphasis,o[n]):t[n].emphasis=o[n],o[n]=null)}}function Li(t,e,r){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var a=t[e].normal,n=t[e].emphasis;a&&(r?(t[e].normal=t[e].emphasis=null,nt(t[e],a)):t[e]=a),n&&(t.emphasis=t.emphasis||{},t.emphasis[e]=n,n.focus&&(t.emphasis.focus=n.focus),n.blurScope&&(t.emphasis.blurScope=n.blurScope))}}function g0(t){Li(t,"itemStyle"),Li(t,"lineStyle"),Li(t,"areaStyle"),Li(t,"label"),Li(t,"labelLine"),Li(t,"upperLabel"),Li(t,"edgeLabel")}function cn(t,e){var r=fy(t)&&t[e],a=fy(r)&&r.textStyle;if(a)for(var n=0,i=q4.length;n<i;n++){var o=q4[n];a.hasOwnProperty(o)&&(r[o]=a[o])}}function is(t){t&&(g0(t),cn(t,"label"),t.emphasis&&cn(t.emphasis,"label"))}function vme(t){if(fy(t)){kk(t),g0(t),cn(t,"label"),cn(t,"upperLabel"),cn(t,"edgeLabel"),t.emphasis&&(cn(t.emphasis,"label"),cn(t.emphasis,"upperLabel"),cn(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(kk(e),is(e));var r=t.markLine;r&&(kk(r),is(r));var a=t.markArea;a&&is(a);var n=t.data;if(t.type==="graph"){n=n||t.nodes;var i=t.links||t.edges;if(i&&!vo(i))for(var o=0;o<i.length;o++)is(i[o]);z(t.categories,function(u){g0(u)})}if(n&&!vo(n))for(var o=0;o<n.length;o++)is(n[o]);if(e=t.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)is(s[o]);if(r=t.markLine,r&&r.data)for(var l=r.data,o=0;o<l.length;o++)be(l[o])?(is(l[o][0]),is(l[o][1])):is(l[o]);t.type==="gauge"?(cn(t,"axisLabel"),cn(t,"title"),cn(t,"detail")):t.type==="treemap"?(Li(t.breadcrumb,"itemStyle"),z(t.levels,function(u){g0(u)})):t.type==="tree"&&g0(t.leaves)}}function Eu(t){return be(t)?t:t?[t]:[]}function Yz(t){return(be(t)?t[0]:t)||{}}function pme(t,e){Is(Eu(t.series),function(a){fy(a)&&vme(a)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),Is(r,function(a){Is(Eu(t[a]),function(n){n&&(cn(n,"axisLabel"),cn(n.axisPointer,"label"))})}),Is(Eu(t.parallel),function(a){var n=a&&a.parallelAxisDefault;cn(n,"axisLabel"),cn(n&&n.axisPointer,"label")}),Is(Eu(t.calendar),function(a){Li(a,"itemStyle"),cn(a,"dayLabel"),cn(a,"monthLabel"),cn(a,"yearLabel")}),Is(Eu(t.radar),function(a){cn(a,"name"),a.name&&a.axisName==null&&(a.axisName=a.name,delete a.name),a.nameGap!=null&&a.axisNameGap==null&&(a.axisNameGap=a.nameGap,delete a.nameGap)}),Is(Eu(t.geo),function(a){fy(a)&&(is(a),Is(Eu(a.regions),function(n){is(n)}))}),Is(Eu(t.timeline),function(a){is(a),Li(a,"label"),Li(a,"itemStyle"),Li(a,"controlStyle",!0);var n=a.data;be(n)&&z(n,function(i){it(i)&&(Li(i,"label"),Li(i,"itemStyle"))})}),Is(Eu(t.toolbox),function(a){Li(a,"iconStyle"),Is(a.feature,function(n){Li(n,"iconStyle")})}),cn(Yz(t.axisPointer),"label"),cn(Yz(t.tooltip).axisPointer,"label")}function mme(t,e){for(var r=e.split(","),a=t,n=0;n<r.length&&(a=a&&a[r[n]],a!=null);n++);return a}function gme(t,e,r,a){for(var n=e.split(","),i=t,o,s=0;s<n.length-1;s++)o=n[s],i[o]==null&&(i[o]={}),i=i[o];i[n[s]]==null&&(i[n[s]]=r)}function Xz(t){t&&z(yme,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var yme=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],xme=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Nk=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Rg(t){var e=t&&t.itemStyle;if(e)for(var r=0;r<Nk.length;r++){var a=Nk[r][1],n=Nk[r][0];e[a]!=null&&(e[n]=e[a])}}function qz(t){t&&t.alignTo==="edge"&&t.margin!=null&&t.edgeDistance==null&&(t.edgeDistance=t.margin)}function Zz(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function bme(t){t&&t.focusNodeAdjacency!=null&&(t.emphasis=t.emphasis||{},t.emphasis.focus==null&&(t.emphasis.focus="adjacency"))}function mY(t,e){if(t)for(var r=0;r<t.length;r++)e(t[r]),t[r]&&mY(t[r].children,e)}function gY(t,e){pme(t,e),t.series=Ir(t.series),z(t.series,function(r){if(it(r)){var a=r.type;if(a==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow);else if(a==="pie"||a==="gauge"){r.clockWise!=null&&(r.clockwise=r.clockWise),qz(r.label);var n=r.data;if(n&&!vo(n))for(var i=0;i<n.length;i++)qz(n[i]);r.hoverOffset!=null&&(r.emphasis=r.emphasis||{},(r.emphasis.scaleSize=null)&&(r.emphasis.scaleSize=r.hoverOffset))}else if(a==="gauge"){var o=mme(r,"pointer.color");o!=null&&gme(r,"itemStyle.color",o)}else if(a==="bar"){Rg(r),Rg(r.backgroundStyle),Rg(r.emphasis);var n=r.data;if(n&&!vo(n))for(var i=0;i<n.length;i++)typeof n[i]=="object"&&(Rg(n[i]),Rg(n[i]&&n[i].emphasis))}else if(a==="sunburst"){var s=r.highlightPolicy;s&&(r.emphasis=r.emphasis||{},r.emphasis.focus||(r.emphasis.focus=s)),Zz(r),mY(r.data,Zz)}else a==="graph"||a==="sankey"?bme(r):a==="map"&&(r.mapType&&!r.map&&(r.map=r.mapType),r.mapLocation&&nt(r,r.mapLocation));r.hoverAnimation!=null&&(r.emphasis=r.emphasis||{},r.emphasis&&r.emphasis.scale==null&&(r.emphasis.scale=r.hoverAnimation)),Xz(r)}}),t.dataRange&&(t.visualMap=t.dataRange),z(xme,function(r){var a=t[r];a&&(be(a)||(a=[a]),z(a,function(n){Xz(n)}))})}function wme(t){var e=He();t.eachSeries(function(r){var a=r.get("stack");if(a){var n=e.get(a)||e.set(a,[]),i=r.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;n.push(o)}}),e.each(function(r){if(r.length!==0){var a=r[0].seriesModel,n=a.get("stackOrder")||"seriesAsc";n==="seriesDesc"&&r.reverse(),z(r,function(i,o){i.data.setCalculationInfo("stackedOnSeries",o>0?r[o-1].seriesModel:null)}),Sme(r)}})}function Sme(t){z(t,function(e,r){var a=[],n=[NaN,NaN],i=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,c,d){var h=o.get(e.stackedDimension,d);if(isNaN(h))return n;var v,m;s?m=o.getRawIndex(d):v=o.get(e.stackedByDimension,d);for(var x=NaN,b=r-1;b>=0;b--){var w=t[b];if(s||(m=w.data.rawIndexOf(w.stackedByDimension,v)),m>=0){var _=w.data.getByRawIndex(w.stackResultDimension,m);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&h>=0&&_>0||l==="samesign"&&h<=0&&_<0){h=ahe(h,_),x=_;break}}}return a[0]=h,a[1]=x,a})})}var Z_=(function(){function t(e){this.data=e.data||(e.sourceFormat===rl?{}:[]),this.sourceFormat=e.sourceFormat||uY,this.seriesLayoutBy=e.seriesLayoutBy||Ys,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var a=0;a<r.length;a++){var n=r[a];n.type==null&&fY(this,a)===pi.Must&&(n.type="ordinal")}}return t})();function L5(t){return t instanceof Z_}function lD(t,e,r){r=r||yY(t);var a=e.seriesLayoutBy,n=Tme(t,r,a,e.sourceHeader,e.dimensions),i=new Z_({data:t,sourceFormat:r,seriesLayoutBy:a,dimensionsDefine:n.dimensionsDefine,startIndex:n.startIndex,dimensionsDetectedCount:n.dimensionsDetectedCount,metaRawOption:et(e)});return i}function E5(t){return new Z_({data:t,sourceFormat:vo(t)?Nd:zo})}function _me(t){return new Z_({data:t.data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:et(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})}function yY(t){var e=uY;if(vo(t))e=Nd;else if(be(t)){t.length===0&&(e=si);for(var r=0,a=t.length;r<a;r++){var n=t[r];if(n!=null){if(be(n)||vo(n)){e=si;break}else if(it(n)){e=Bo;break}}}}else if(it(t)){for(var i in t)if(Ve(t,i)&&Ri(t[i])){e=rl;break}}return e}function Tme(t,e,r,a,n){var i,o;if(!t)return{dimensionsDefine:Kz(n),startIndex:o,dimensionsDetectedCount:i};if(e===si){var s=t;a==="auto"||a==null?Qz(function(u){u!=null&&u!=="-"&&(Ie(u)?o==null&&(o=1):o=0)},r,s,10):o=qt(a)?a:a?1:0,!n&&o===1&&(n=[],Qz(function(u,c){n[c]=u!=null?u+"":""},r,s,1/0)),i=n?n.length:r===Yh?s.length:s[0]?s[0].length:null}else if(e===Bo)n||(n=Cme(t));else if(e===rl)n||(n=[],z(t,function(u,c){n.push(c)}));else if(e===zo){var l=pm(t[0]);i=be(l)&&l.length||1}return{startIndex:o,dimensionsDefine:Kz(n),dimensionsDetectedCount:i}}function Cme(t){for(var e=0,r;e<t.length&&!(r=t[e++]););if(r)return Wt(r)}function Kz(t){if(t){var e=He();return Se(t,function(r,a){r=it(r)?r:{name:r};var n={name:r.name,displayName:r.displayName,type:r.type};if(n.name==null)return n;n.name+="",n.displayName==null&&(n.displayName=n.name);var i=e.get(n.name);return i?n.name+="-"+i.count++:e.set(n.name,{count:1}),n})}}function Qz(t,e,r,a){if(e===Yh)for(var n=0;n<r.length&&n<a;n++)t(r[n]?r[n][0]:null,n);else for(var i=r[0]||[],n=0;n<i.length&&n<a;n++)t(i[n],n)}function xY(t){var e=t.sourceFormat;return e===Bo||e===rl}var If,jf,Of,zf,Jz,eB,bY=(function(){function t(e,r){var a=L5(e)?e:E5(e);this._source=a;var n=this._data=a.data,i=a.sourceFormat;a.seriesLayoutBy,i===Nd&&(this._offset=0,this._dimSize=r,this._data=n),eB(this,n,a)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(e,r){},t.prototype.appendData=function(e){},t.prototype.clean=function(){},t.protoInitialize=(function(){var e=t.prototype;e.pure=!1,e.persistent=!0})(),t.internalField=(function(){var e;eB=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,d=l.startIndex,h=l.dimensionsDefine,v=Jz[R5(u,c)];if(ve(o,v),u===Nd)o.getItem=r,o.count=n,o.fillStorage=a;else{var m=wY(u,c);o.getItem=je(m,null,s,d,h);var x=SY(u,c);o.count=je(x,null,s,d,h)}};var r=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,d=0;d<u;d++)s[d]=l[c+d];return s},a=function(o,s,l,u){for(var c=this._data,d=this._dimSize,h=0;h<d;h++){for(var v=u[h],m=v[0]==null?1/0:v[0],x=v[1]==null?-1/0:v[1],b=s-o,w=l[h],_=0;_<b;_++){var T=c[_*d+h];w[o+_]=T,T<m&&(m=T),T>x&&(x=T)}v[0]=m,v[1]=x}},n=function(){return this._data?this._data.length/this._dimSize:0};Jz=(e={},e[si+"_"+Ys]={pure:!0,appendData:i},e[si+"_"+Yh]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Bo]={pure:!0,appendData:i},e[rl]={pure:!0,appendData:function(o){var s=this._data;z(o,function(l,u){for(var c=s[u]||(s[u]=[]),d=0;d<(l||[]).length;d++)c.push(l[d])})}},e[zo]={appendData:i},e[Nd]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}})(),t})(),Wb=function(t){be(t)||U$("series.data or dataset.source must be an array.")};If={},If[si+"_"+Ys]=Wb,If[si+"_"+Yh]=Wb,If[Bo]=Wb,If[rl]=function(t,e){for(var r=0;r<e.length;r++){var a=e[r].name;a==null&&U$("dimension name must not be null/undefined.")}},If[zo]=Wb;var tB=function(t,e,r,a){return t[a]},kme=(jf={},jf[si+"_"+Ys]=function(t,e,r,a){return t[a+e]},jf[si+"_"+Yh]=function(t,e,r,a,n){a+=e;for(var i=n||[],o=t,s=0;s<o.length;s++){var l=o[s];i[s]=l?l[a]:null}return i},jf[Bo]=tB,jf[rl]=function(t,e,r,a,n){for(var i=n||[],o=0;o<r.length;o++){var s=r[o].name,l=s!=null?t[s]:null;i[o]=l?l[a]:null}return i},jf[zo]=tB,jf);function wY(t,e){var r=kme[R5(t,e)];return r}var rB=function(t,e,r){return t.length},Nme=(Of={},Of[si+"_"+Ys]=function(t,e,r){return Math.max(0,t.length-e)},Of[si+"_"+Yh]=function(t,e,r){var a=t[0];return a?Math.max(0,a.length-e):0},Of[Bo]=rB,Of[rl]=function(t,e,r){var a=r[0].name,n=a!=null?t[a]:null;return n?n.length:0},Of[zo]=rB,Of);function SY(t,e){var r=Nme[R5(t,e)];return r}var Ak=function(t,e,r){return t[e]},Ame=(zf={},zf[si]=Ak,zf[Bo]=function(t,e,r){return t[r]},zf[rl]=Ak,zf[zo]=function(t,e,r){var a=pm(t);return a instanceof Array?a[e]:a},zf[Nd]=Ak,zf);function _Y(t){var e=Ame[t];return e}function R5(t,e){return t===si?t+"_"+e:t}function Up(t,e,r){if(t){var a=t.getRawDataItem(e);if(a!=null){var n=t.getStore(),i=n.getSource().sourceFormat;if(r!=null){var o=t.getDimensionIndex(r),s=n.getDimensionProperty(o);return _Y(i)(a,o,s)}else{var l=a;return i===zo&&(l=pm(a)),l}}}}var Mme=/\{@(.+?)\}/g,K_=(function(){function t(){}return t.prototype.getDataParams=function(e,r){var a=this.getData(r),n=this.getRawValue(e,r),i=a.getRawIndex(e),o=a.getName(e),s=a.getRawDataItem(e),l=a.getItemVisual(e,"style"),u=l&&l[a.getItemVisual(e,"drawType")||"fill"],c=l&&l.stroke,d=this.mainType,h=d==="series",v=a.userOutput&&a.userOutput.get();return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:i,data:s,dataType:r,value:n,color:u,borderColor:c,dimensionNames:v?v.fullDimensions:null,encode:v?v.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(e,r,a,n,i,o){r=r||"normal";var s=this.getData(a),l=this.getDataParams(e,a);if(o&&(l.value=o.interpolatedValue),n!=null&&be(l.value)&&(l.value=l.value[n]),!i){var u=s.getItemModel(e);i=u.get(r==="normal"?["label","formatter"]:[r,"label","formatter"])}if(Ke(i))return l.status=r,l.dimensionIndex=n,i(l);if(Ie(i)){var c=KW(i,l);return c.replace(Mme,function(d,h){var v=h.length,m=h;m.charAt(0)==="["&&m.charAt(v-1)==="]"&&(m=+m.slice(1,v-1));var x=Up(s,e,m);if(o&&be(o.interpolatedValue)){var b=s.getDimensionIndex(m);b>=0&&(x=o.interpolatedValue[b])}return x!=null?x+"":""})}},t.prototype.getRawValue=function(e,r){return Up(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,a){},t})();function aB(t){var e,r;return it(t)?t.type&&(r=t):e=t,{text:e,frag:r}}function B0(t){return new Dme(t)}var Dme=(function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,a=e&&e.skip;if(this._dirty&&r){var n=this.context;n.data=n.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!a&&(i=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(i="reset");function c(_){return!(_>=1)&&(_=1),_}var d;(this._dirty||i==="reset")&&(this._dirty=!1,d=this._doReset(a)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,m=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!a&&(d||v<m)){var x=this._progress;if(be(x))for(var b=0;b<x.length;b++)this._doProgress(x[b],v,m,l,u);else this._doProgress(x,v,m,l,u)}this._dueIndex=m;var w=this._settedOutputEnd!=null?this._settedOutputEnd:m;this._outputDueEnd=w}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(e,r,a,n,i){nB.reset(r,a,n,i),this._callingProgress=e,this._callingProgress({start:r,end:a,count:a-r,next:nB.next},this.context)},t.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var r,a;!e&&this._reset&&(r=this._reset(this.context),r&&r.progress&&(a=r.forceFirstProgress,r=r.progress),be(r)&&!r.length&&(r=null)),this._progress=r,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),a},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},t})(),nB=(function(){var t,e,r,a,n,i={reset:function(l,u,c,d){e=l,t=u,r=c,a=d,n=Math.ceil(a/r),i.next=r>1&&a>0?s:o}};return i;function o(){return e<t?e++:null}function s(){var l=e%n*r+Math.ceil(e/n),u=e>=t?null:l<a?l:e;return e++,u}})();function Ad(t,e){var r=e&&e.type;return r==="ordinal"?t:(r==="time"&&!qt(t)&&t!=null&&t!=="-"&&(t=+Uh(t)),t==null||t===""?NaN:Number(t))}var Lme=He({number:function(t){return parseFloat(t)},time:function(t){return+Uh(t)},trim:function(t){return Ie(t)?vs(t):t}});function TY(t){return Lme.get(t)}var CY={lt:function(t,e){return t<e},lte:function(t,e){return t<=e},gt:function(t,e){return t>e},gte:function(t,e){return t>=e}},Eme=(function(){function t(e,r){if(!qt(r)){var a="";cr(a)}this._opFn=CY[e],this._rvalFloat=tc(r)}return t.prototype.evaluate=function(e){return qt(e)?this._opFn(e,this._rvalFloat):this._opFn(tc(e),this._rvalFloat)},t})(),kY=(function(){function t(e,r){var a=e==="desc";this._resultLT=a?1:-1,r==null&&(r=a?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var a=qt(e)?e:tc(e),n=qt(r)?r:tc(r),i=isNaN(a),o=isNaN(n);if(i&&(a=this._incomparable),o&&(n=this._incomparable),i&&o){var s=Ie(e),l=Ie(r);s&&(a=l?e:0),l&&(n=s?r:0)}return a<n?this._resultLT:a>n?-this._resultLT:0},t})(),Rme=(function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=tc(r)}return t.prototype.evaluate=function(e){var r=e===this._rval;if(!r){var a=typeof e;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(r=tc(e)===this._rvalFloat)}return this._isEQ?r:!r},t})();function Pme(t,e){return t==="eq"||t==="ne"?new Rme(t==="eq",e):Ve(CY,t)?new Eme(t,e):null}var Ime=(function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return Ad(e,r)},t})();function jme(t,e){var r=new Ime,a=t.data,n=r.sourceFormat=t.sourceFormat,i=t.startIndex,o="";t.seriesLayoutBy!==Ys&&cr(o);var s=[],l={},u=t.dimensionsDefine;if(u)z(u,function(x,b){var w=x.name,_={index:b,name:w,displayName:x.displayName};if(s.push(_),w!=null){var T="";Ve(l,w)&&cr(T),l[w]=_}});else for(var c=0;c<t.dimensionsDetectedCount;c++)s.push({index:c});var d=wY(n,Ys);e.__isBuiltIn&&(r.getRawDataItem=function(x){return d(a,i,s,x)},r.getRawData=je(Ome,null,t)),r.cloneRawData=je(zme,null,t);var h=SY(n,Ys);r.count=je(h,null,a,i,s);var v=_Y(n);r.retrieveValue=function(x,b){var w=d(a,i,s,x);return m(w,b)};var m=r.retrieveValueFromItem=function(x,b){if(x!=null){var w=s[b];if(w)return v(x,b,w.name)}};return r.getDimensionInfo=je(Bme,null,s,l),r.cloneAllDimensionInfo=je(Vme,null,s),r}function Ome(t){var e=t.sourceFormat;if(!P5(e)){var r="";cr(r)}return t.data}function zme(t){var e=t.sourceFormat,r=t.data;if(!P5(e)){var a="";cr(a)}if(e===si){for(var n=[],i=0,o=r.length;i<o;i++)n.push(r[i].slice());return n}else if(e===Bo){for(var n=[],i=0,o=r.length;i<o;i++)n.push(ve({},r[i]));return n}}function Bme(t,e,r){if(r!=null){if(qt(r)||!isNaN(r)&&!Ve(e,r))return t[r];if(Ve(e,r))return e[r]}}function Vme(t){return et(t)}var NY=He();function Fme(t){t=et(t);var e=t.type,r="";e||cr(r);var a=e.split(":");a.length!==2&&cr(r);var n=!1;a[0]==="echarts"&&(e=a[1],n=!0),t.__isBuiltIn=n,NY.set(e,t)}function Gme(t,e,r){var a=Ir(t),n=a.length,i="";n||cr(i);for(var o=0,s=n;o<s;o++){var l=a[o];e=Hme(l,e),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function Hme(t,e,r,a){var n="";e.length||cr(n),it(t)||cr(n);var i=t.type,o=NY.get(i);o||cr(n);var s=Se(e,function(u){return jme(u,o)}),l=Ir(o.transform({upstream:s[0],upstreamList:s,config:et(t.config)}));return Se(l,function(u,c){var d="";it(u)||cr(d),u.data||cr(d);var h=yY(u.data);P5(h)||cr(d);var v,m=e[0];if(m&&c===0&&!u.dimensions){var x=m.startIndex;x&&(u.data=m.data.slice(0,x).concat(u.data)),v={seriesLayoutBy:Ys,sourceHeader:x,dimensions:m.metaRawOption.dimensions}}else v={seriesLayoutBy:Ys,sourceHeader:0,dimensions:u.dimensions};return lD(u.data,v,null)})}function P5(t){return t===si||t===Bo}var Q_="undefined",Ume=typeof Uint32Array===Q_?Array:Uint32Array,$me=typeof Uint16Array===Q_?Array:Uint16Array,AY=typeof Int32Array===Q_?Array:Int32Array,iB=typeof Float64Array===Q_?Array:Float64Array,MY={float:iB,int:AY,ordinal:Array,number:Array,time:iB},Mk;function jv(t){return t>65535?Ume:$me}function Ov(){return[1/0,-1/0]}function Wme(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function oB(t,e,r,a,n){var i=MY[r||"float"];if(n){var o=t[e],s=o&&o.length;if(s!==a){for(var l=new i(a),u=0;u<s;u++)l[u]=o[u];t[e]=l}}else t[e]=new i(a)}var uD=(function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=He()}return t.prototype.initData=function(e,r,a){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var n=e.getSource(),i=this.defaultDimValueGetter=Mk[n.sourceFormat];this._dimValueGetter=a||i,this._rawExtent=[],xY(n),this._dimensions=Se(r,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,e.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(e,r){var a=this._calcDimNameToIdx,n=this._dimensions,i=a.get(e);if(i!=null){if(n[i].type===r)return i}else i=n.length;return n[i]={type:r},a.set(e,i),this._chunks[i]=new MY[r||"float"](this._rawCount),this._rawExtent[i]=Ov(),i},t.prototype.collectOrdinalMeta=function(e,r){var a=this._chunks[e],n=this._dimensions[e],i=this._rawExtent,o=n.ordinalOffset||0,s=a.length;o===0&&(i[e]=Ov());for(var l=i[e],u=o;u<s;u++){var c=a[u]=r.parseAndCollect(a[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}n.ordinalMeta=r,n.ordinalOffset=s,n.type="ordinal"},t.prototype.getOrdinalMeta=function(e){var r=this._dimensions[e],a=r.ordinalMeta;return a},t.prototype.getDimensionProperty=function(e){var r=this._dimensions[e];return r&&r.property},t.prototype.appendData=function(e){var r=this._provider,a=this.count();r.appendData(e);var n=r.count();return r.persistent||(n+=a),a<n&&this._initDataFromProvider(a,n,!0),[a,n]},t.prototype.appendValues=function(e,r){for(var a=this._chunks,n=this._dimensions,i=n.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,r||0),u=0;u<i;u++){var c=n[u];oB(a,u,c.type,l,!0)}for(var d=[],h=s;h<l;h++)for(var v=h-s,m=0;m<i;m++){var c=n[m],x=Mk.arrayRows.call(this,e[v]||d,c.property,v,m);a[m][h]=x;var b=o[m];x<b[0]&&(b[0]=x),x>b[1]&&(b[1]=x)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(e,r,a){for(var n=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Se(o,function(_){return _.property}),c=0;c<s;c++){var d=o[c];l[c]||(l[c]=Ov()),oB(i,c,d.type,r,a)}if(n.fillStorage)n.fillStorage(e,r,i,l);else for(var h=[],v=e;v<r;v++){h=n.getItem(v,h);for(var m=0;m<s;m++){var x=i[m],b=this._dimValueGetter(h,u[m],v,m);x[v]=b;var w=l[m];b<w[0]&&(w[0]=b),b>w[1]&&(w[1]=b)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r<this._count))return NaN;var a=this._chunks[e];return a?a[this.getRawIndex(r)]:NaN},t.prototype.getValues=function(e,r){var a=[],n=[];if(r==null){r=e,e=[];for(var i=0;i<this._dimensions.length;i++)n.push(i)}else n=e;for(var i=0,o=n.length;i<o;i++)a.push(this.get(n[i],r));return a},t.prototype.getByRawIndex=function(e,r){if(!(r>=0&&r<this._rawCount))return NaN;var a=this._chunks[e];return a?a[r]:NaN},t.prototype.getSum=function(e){var r=this._chunks[e],a=0;if(r)for(var n=0,i=this.count();n<i;n++){var o=this.get(e,n);isNaN(o)||(a+=o)}return a},t.prototype.getMedian=function(e){var r=[];this.each([e],function(i){isNaN(i)||r.push(i)});var a=r.sort(function(i,o){return i-o}),n=this.count();return n===0?0:n%2===1?a[(n-1)/2]:(a[n/2]+a[n/2-1])/2},t.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,a=r[e];if(a!=null&&a<this._count&&a===e)return e;for(var n=0,i=this._count-1;n<=i;){var o=(n+i)/2|0;if(r[o]<e)n=o+1;else if(r[o]>e)i=o-1;else return o}return-1},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var a=r.constructor,n=this._count;if(a===Array){e=new a(n);for(var i=0;i<n;i++)e[i]=r[i]}else e=new a(r.buffer,0,n)}else{var a=jv(this._rawCount);e=new a(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},t.prototype.filter=function(e,r){if(!this._count)return this;for(var a=this.clone(),n=a.count(),i=jv(a._rawCount),o=new i(n),s=[],l=e.length,u=0,c=e[0],d=a._chunks,h=0;h<n;h++){var v=void 0,m=a.getRawIndex(h);if(l===0)v=r(h);else if(l===1){var x=d[c][m];v=r(x,h)}else{for(var b=0;b<l;b++)s[b]=d[e[b]][m];s[b]=h,v=r.apply(null,s)}v&&(o[u++]=m)}return u<n&&(a._indices=o),a._count=u,a._extent=[],a._updateGetRawIdx(),a},t.prototype.selectRange=function(e){var r=this.clone(),a=r._count;if(!a)return this;var n=Wt(e),i=n.length;if(!i)return this;var o=r.count(),s=jv(r._rawCount),l=new s(o),u=0,c=n[0],d=e[c][0],h=e[c][1],v=r._chunks,m=!1;if(!r._indices){var x=0;if(i===1){for(var b=v[n[0]],w=0;w<a;w++){var _=b[w];(_>=d&&_<=h||isNaN(_))&&(l[u++]=x),x++}m=!0}else if(i===2){for(var b=v[n[0]],T=v[n[1]],C=e[n[1]][0],k=e[n[1]][1],w=0;w<a;w++){var _=b[w],A=T[w];(_>=d&&_<=h||isNaN(_))&&(A>=C&&A<=k||isNaN(A))&&(l[u++]=x),x++}m=!0}}if(!m)if(i===1)for(var w=0;w<o;w++){var M=r.getRawIndex(w),_=v[n[0]][M];(_>=d&&_<=h||isNaN(_))&&(l[u++]=M)}else for(var w=0;w<o;w++){for(var L=!0,M=r.getRawIndex(w),R=0;R<i;R++){var P=n[R],_=v[P][M];(_<e[P][0]||_>e[P][1])&&(L=!1)}L&&(l[u++]=r.getRawIndex(w))}return u<o&&(r._indices=l),r._count=u,r._extent=[],r._updateGetRawIdx(),r},t.prototype.map=function(e,r){var a=this.clone(e);return this._updateDims(a,e,r),a},t.prototype.modify=function(e,r){this._updateDims(this,e,r)},t.prototype._updateDims=function(e,r,a){for(var n=e._chunks,i=[],o=r.length,s=e.count(),l=[],u=e._rawExtent,c=0;c<r.length;c++)u[r[c]]=Ov();for(var d=0;d<s;d++){for(var h=e.getRawIndex(d),v=0;v<o;v++)l[v]=n[r[v]][h];l[o]=d;var m=a&&a.apply(null,l);if(m!=null){typeof m!="object"&&(i[0]=m,m=i);for(var c=0;c<m.length;c++){var x=r[c],b=m[c],w=u[x],_=n[x];_&&(_[h]=b),b<w[0]&&(w[0]=b),b>w[1]&&(w[1]=b)}}}},t.prototype.lttbDownSample=function(e,r){var a=this.clone([e],!0),n=a._chunks,i=n[e],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,d,h,v=new(jv(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var m=1;m<o-1;m+=l){for(var x=Math.min(m+l,o-1),b=Math.min(m+l*2,o),w=(b+x)/2,_=0,T=x;T<b;T++){var C=this.getRawIndex(T),k=i[C];isNaN(k)||(_+=k)}_/=b-x;var A=m,M=Math.min(m+l,o),L=m-1,R=i[u];c=-1,h=A;for(var P=-1,j=0,T=A;T<M;T++){var C=this.getRawIndex(T),k=i[C];if(isNaN(k)){j++,P<0&&(P=C);continue}d=Math.abs((L-w)*(k-R)-(L-T)*(_-R)),d>c&&(c=d,h=C)}j>0&&j<M-A&&(v[s++]=Math.min(P,h),h=Math.max(P,h)),v[s++]=h,u=h}return v[s++]=this.getRawIndex(o-1),a._count=s,a._indices=v,a.getRawIndex=this._getRawIdx,a},t.prototype.minmaxDownSample=function(e,r){for(var a=this.clone([e],!0),n=a._chunks,i=Math.floor(1/r),o=n[e],s=this.count(),l=new(jv(this._rawCount))(Math.ceil(s/i)*2),u=0,c=0;c<s;c+=i){var d=c,h=o[this.getRawIndex(d)],v=c,m=o[this.getRawIndex(v)],x=i;c+i>s&&(x=s-c);for(var b=0;b<x;b++){var w=this.getRawIndex(c+b),_=o[w];_<h&&(h=_,d=c+b),_>m&&(m=_,v=c+b)}var T=this.getRawIndex(d),C=this.getRawIndex(v);d<v?(l[u++]=T,l[u++]=C):(l[u++]=C,l[u++]=T)}return a._count=u,a._indices=l,a._updateGetRawIdx(),a},t.prototype.downSample=function(e,r,a,n){for(var i=this.clone([e],!0),o=i._chunks,s=[],l=Math.floor(1/r),u=o[e],c=this.count(),d=i._rawExtent[e]=Ov(),h=new(jv(this._rawCount))(Math.ceil(c/l)),v=0,m=0;m<c;m+=l){l>c-m&&(l=c-m,s.length=l);for(var x=0;x<l;x++){var b=this.getRawIndex(m+x);s[x]=u[b]}var w=a(s),_=this.getRawIndex(Math.min(m+n(s,w)||0,c-1));u[_]=w,w<d[0]&&(d[0]=w),w>d[1]&&(d[1]=w),h[v++]=_}return i._count=v,i._indices=h,i._updateGetRawIdx(),i},t.prototype.each=function(e,r){if(this._count)for(var a=e.length,n=this._chunks,i=0,o=this.count();i<o;i++){var s=this.getRawIndex(i);switch(a){case 0:r(i);break;case 1:r(n[e[0]][s],i);break;case 2:r(n[e[0]][s],n[e[1]][s],i);break;default:for(var l=0,u=[];l<a;l++)u[l]=n[e[l]][s];u[l]=i,r.apply(null,u)}}},t.prototype.getDataExtent=function(e){var r=this._chunks[e],a=Ov();if(!r)return a;var n=this.count(),i=!this._indices,o;if(i)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=a;for(var s=o[0],l=o[1],u=0;u<n;u++){var c=this.getRawIndex(u),d=r[c];d<s&&(s=d),d>l&&(l=d)}return o=[s,l],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var a=[],n=this._chunks,i=0;i<n.length;i++)a.push(n[i][r]);return a},t.prototype.clone=function(e,r){var a=new t,n=this._chunks,i=e&&ql(e,function(s,l){return s[l]=!0,s},{});if(i)for(var o=0;o<n.length;o++)a._chunks[o]=i[o]?Wme(n[o]):n[o];else a._chunks=n;return this._copyCommonProps(a),r||(a._indices=this._cloneIndices()),a._updateGetRawIdx(),a},t.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=et(this._extent),e._rawExtent=et(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,r=void 0;if(e===Array){var a=this._indices.length;r=new e(a);for(var n=0;n<a;n++)r[n]=this._indices[n]}else r=new e(this._indices);return r}return null},t.prototype._getRawIdxIdentity=function(e){return e},t.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=(function(){function e(r,a,n,i){return Ad(r[i],this._dimensions[i])}Mk={arrayRows:e,objectRows:function(r,a,n,i){return Ad(r[a],this._dimensions[i])},keyedColumns:e,original:function(r,a,n,i){var o=r&&(r.value==null?r:r.value);return Ad(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(r,a,n,i){return r[i]}}})(),t})(),DY=(function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),a=!!r.length,n,i;if(Yb(e)){var o=e,s=void 0,l=void 0,u=void 0;if(a){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,i=[c._getVersionSign()]}else s=o.get("data",!0),l=vo(s)?Nd:zo,i=[];var d=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},v=$e(d.seriesLayoutBy,h.seriesLayoutBy)||null,m=$e(d.sourceHeader,h.sourceHeader),x=$e(d.dimensions,h.dimensions),b=v!==h.seriesLayoutBy||!!m!=!!h.sourceHeader||x;n=b?[lD(s,{seriesLayoutBy:v,sourceHeader:m,dimensions:x},l)]:[]}else{var w=e;if(a){var _=this._applyTransform(r);n=_.sourceList,i=_.upstreamSignList}else{var T=w.get("source",!0);n=[lD(T,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(n,i)},t.prototype._applyTransform=function(e){var r=this._sourceHost,a=r.get("transform",!0),n=r.get("fromTransformResult",!0);if(n!=null){var i="";e.length!==1&&lB(i)}var o,s=[],l=[];return z(e,function(u){u.prepareSource();var c=u.getSource(n||0),d="";n!=null&&!c&&lB(d),s.push(c),l.push(u._getVersionSign())}),a?o=Gme(a,s,{datasetIndex:r.componentIndex}):n!=null&&(o=[_me(s[0])]),{sourceList:o,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r<e.length;r++){var a=e[r];if(a._isDirty()||this._upstreamSignList[r]!==a._getVersionSign())return!0}},t.prototype.getSource=function(e){e=e||0;var r=this._sourceList[e];if(!r){var a=this._getUpstreamSourceManagers();return a[0]&&a[0].getSource(e)}return r},t.prototype.getSharedDataStore=function(e){var r=e.makeStoreSchema();return this._innerGetDataStore(r.dimensions,e.source,r.hash)},t.prototype._innerGetDataStore=function(e,r,a){var n=0,i=this._storeList,o=i[n];o||(o=i[n]={});var s=o[a];if(!s){var l=this._getUpstreamSourceManagers()[0];Yb(this._sourceHost)&&l?s=l._innerGetDataStore(e,r,a):(s=new uD,s.initData(new bY(r,e.length),e)),o[a]=s}return s},t.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Yb(e)){var r=A5(e);return r?[r.getSourceManager()]:[]}else return Se(Qpe(e),function(a){return a.getSourceManager()})},t.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,r,a,n;if(Yb(e))r=e.get("seriesLayoutBy",!0),a=e.get("sourceHeader",!0),n=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=e;r=i.get("seriesLayoutBy",!0),a=i.get("sourceHeader",!0),n=i.get("dimensions",!0)}return{seriesLayoutBy:r,sourceHeader:a,dimensions:n}},t})();function sB(t){var e=t.option.transform;e&&Xw(t.option.transform)}function Yb(t){return t.mainType==="series"}function lB(t){throw new Error(t)}var Yme="line-height:1";function LY(t){var e=t.lineHeight;return e==null?Yme:"line-height:"+Yi(e+"")+"px"}function EY(t,e){var r=t.color||ne.color.tertiary,a=t.fontSize||12,n=t.fontWeight||"400",i=t.color||ne.color.secondary,o=t.fontSize||14,s=t.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+Yi(a+"")+"px;color:"+Yi(r)+";font-weight:"+Yi(n+""),valueStyle:"font-size:"+Yi(o+"")+"px;color:"+Yi(i)+";font-weight:"+Yi(s+"")}:{nameStyle:{fontSize:a,fill:r,fontWeight:n},valueStyle:{fontSize:o,fill:i,fontWeight:s}}}var Xme=[0,10,20,30],qme=["",`
`,`
`,`
`];function pn(t,e){return e.type=t,e}function cD(t){return t.type==="section"}function RY(t){return cD(t)?Zme:Kme}function PY(t){if(cD(t)){var e=0,r=t.blocks.length,a=r>1||r>0&&!t.noHeader;return z(t.blocks,function(n){var i=PY(n);i>=e&&(e=i+ +(a&&(!i||cD(n)&&!n.noHeader)))}),e}return 0}function Zme(t,e,r,a){var n=e.noHeader,i=Qme(PY(e)),o=[],s=e.blocks||[];Pi(!s||be(s)),s=s||[];var l=t.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Ve(u,l)){var c=new kY(u[l],null);s.sort(function(x,b){return c.evaluate(x.sortParam,b.sortParam)})}else l==="seriesDesc"&&s.reverse()}z(s,function(x,b){var w=e.valueFormatter,_=RY(x)(w?ve(ve({},t),{valueFormatter:w}):t,x,b>0?i.html:0,a);_!=null&&o.push(_)});var d=t.renderMode==="richText"?o.join(i.richText):dD(a,o.join(""),n?r:i.html);if(n)return d;var h=nD(e.header,"ordinal",t.useUTC),v=EY(a,t.renderMode).nameStyle,m=LY(a);return t.renderMode==="richText"?IY(t,h,v)+i.richText+d:dD(a,'<div style="'+v+";"+m+';">'+Yi(h)+"</div>"+d,r)}function Kme(t,e,r,a){var n=t.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,c=e.valueFormatter||t.valueFormatter||function(C){return C=be(C)?C:[C],Se(C,function(k,A){return nD(k,be(v)?v[A]:v,u)})};if(!(i&&o)){var d=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||ne.color.secondary,n),h=i?"":nD(l,"ordinal",u),v=e.valueType,m=o?[]:c(e.value,e.dataIndex),x=!s||!i,b=!s&&i,w=EY(a,n),_=w.nameStyle,T=w.valueStyle;return n==="richText"?(s?"":d)+(i?"":IY(t,h,_))+(o?"":tge(t,m,x,b,T)):dD(a,(s?"":d)+(i?"":Jme(h,!s,_))+(o?"":ege(m,x,b,T)),r)}}function uB(t,e,r,a,n,i){if(t){var o=RY(t),s={useUTC:n,renderMode:r,orderMode:a,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,i)}}function Qme(t){return{html:Xme[t],richText:qme[t]}}function dD(t,e,r){var a='<div style="clear:both"></div>',n="margin: "+r+"px 0 0",i=LY(t);return'<div style="'+n+";"+i+';">'+e+a+"</div>"}function Jme(t,e,r){var a=e?"margin-left:2px":"";return'<span style="'+r+";"+a+'">'+Yi(t)+"</span>"}function ege(t,e,r,a){var n=r?"10px":"20px",i=e?"float:right;margin-left:"+n:"";return t=be(t)?t:[t],'<span style="'+i+";"+a+'">'+Se(t,function(o){return Yi(o)}).join("&nbsp;&nbsp;")+"</span>"}function IY(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function tge(t,e,r,a,n){var i=[n],o=a?10:20;return r&&i.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(be(e)?e.join(" "):e,i)}function jY(t,e){var r=t.getData().getItemVisual(e,"style"),a=r[t.visualDrawType];return Ih(a)}function OY(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var Dk=(function(){function t(){this.richTextStyles={},this._nextStyleNameId=G$()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,a){var n=a==="richText"?this._generateStyleName():null,i=Fpe({color:r,type:e,renderMode:a,markerId:n});return Ie(i)?i:(this.richTextStyles[n]=i.style,i.content)},t.prototype.wrapRichTextStyle=function(e,r){var a={};be(r)?z(r,function(i){return ve(a,i)}):ve(a,r);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+e+"}"},t})();function zY(t){var e=t.series,r=t.dataIndex,a=t.multipleSeries,n=e.getData(),i=n.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(r),l=be(s),u=jY(e,r),c,d,h,v;if(o>1||l&&!o){var m=rge(s,e,r,i,u);c=m.inlineValues,d=m.inlineValueTypes,h=m.blocks,v=m.inlineValues[0]}else if(o){var x=n.getDimensionInfo(i[0]);v=c=Up(n,r,i[0]),d=x.type}else v=c=l?s[0]:s;var b=e5(e),w=b&&e.name||"",_=n.getName(r),T=a?w:_;return pn("section",{header:w,noHeader:a||!b,sortParam:v,blocks:[pn("nameValue",{markerType:"item",markerColor:u,name:T,noName:!vs(T),value:c,valueType:d,dataIndex:r})].concat(h||[])})}function rge(t,e,r,a,n){var i=e.getData(),o=ql(t,function(d,h,v){var m=i.getDimensionInfo(v);return d=d||m&&m.tooltip!==!1&&m.displayName!=null},!1),s=[],l=[],u=[];a.length?z(a,function(d){c(Up(i,r,d),d)}):z(t,c);function c(d,h){var v=i.getDimensionInfo(h);!v||v.otherDims.tooltip===!1||(o?u.push(pn("nameValue",{markerType:"subItem",markerColor:n,name:v.displayName,value:d,valueType:v.type})):(s.push(d),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var $c=jt();function Xb(t,e){return t.getName(e)||t.getId(e)}var ww="__universalTransitionEnabled",Gr=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,a,n){this.seriesIndex=this.componentIndex,this.dataTask=B0({count:nge,reset:ige}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,n);var i=$c(this).sourceManager=new DY(this);i.prepareSource();var o=this.getInitialData(r,n);dB(o,this),this.dataTask.context.data=o,$c(this).dataBeforeProcessed=o,cB(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,a){var n=dy(this),i=n?Wh(r):{},o=this.subType;Gt.hasClass(o)&&(o+="Series"),Ct(r,a.getTheme().get(this.subType)),Ct(r,this.getDefaultOption()),Mh(r,"label",["show"]),this.fillDataTextStyle(r.data),n&&Jl(r,i,n)},e.prototype.mergeOption=function(r,a){r=Ct(this.option,r,!0),this.fillDataTextStyle(r.data);var n=dy(this);n&&Jl(this.option,r,n);var i=$c(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(r,a);dB(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,$c(this).dataBeforeProcessed=o,cB(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!vo(r))for(var a=["show"],n=0;n<r.length;n++)r[n]&&r[n].label&&Mh(r[n],"label",a)},e.prototype.getInitialData=function(r,a){},e.prototype.appendData=function(r){var a=this.getRawData();a.appendData(r.data)},e.prototype.getData=function(r){var a=fD(this);if(a){var n=a.context.data;return r==null||!n.getLinkedData?n:n.getLinkedData(r)}else return $c(this).data},e.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},e.prototype.setData=function(r){var a=fD(this);if(a){var n=a.context;n.outputData=r,a!==this.dataTask&&(n.data=r)}$c(this).data=r},e.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return He(r)},e.prototype.getSourceManager=function(){return $c(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return $c(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},e.prototype.indicesOfNearest=function(r,a,n,i){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(r);if(!s||!l)return[];var u=l.dataToCoord(n);i==null&&(i=1/0);var c=[],d=1/0,h=-1,v=0;return o.each(a,function(m,x){var b=l.dataToCoord(m),w=u-b,_=Math.abs(w);_<=i&&((_<d||_===d&&w>=0&&h<0)&&(d=_,h=w,v=0),w===h&&(c[v++]=x))}),c.length=v,c},e.prototype.formatTooltip=function(r,a,n){return zY({series:this,dataIndex:r,multipleSeries:a})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Ut.node&&!(r&&r.ssr))return!1;var a=this.getShallow("animation");return a&&this.getData().count()>this.getShallow("animationThreshold")&&(a=!1),!!a},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,a,n){var i=this.ecModel,o=M5.prototype.getColorFromPalette.call(this,r,a,n);return o||(o=i.getColorFromPalette(r,a,n)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,a){this._innerSelect(this.getData(a),r)},e.prototype.unselect=function(r,a){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(a);if(i==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<r.length;s++){var l=r[s],u=Xb(o,l);n[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(r,a){for(var n=[],i=0;i<r.length;i++)n[0]=r[i],this.isSelected(r[i],a)?this.unselect(n,a):this.select(n,a)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,a=Wt(r),n=[],i=0;i<a.length;i++){var o=r[a[i]];o>=0&&n.push(o)}return n},e.prototype.isSelected=function(r,a){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(a);return(n==="all"||n[Xb(i,r)])&&!i.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[ww])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,a){var n,i,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){it(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var d=a[c],h=Xb(r,d);u[h]=!0,this._selectedDataIndicesMap[h]=r.getRawIndex(d)}}else if(s==="single"||s===!0){var v=a[l-1],h=Xb(r,v);o.selectedMap=(n={},n[h]=!0,n),this._selectedDataIndicesMap=(i={},i[h]=r.getRawIndex(v),i)}}},e.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var a=[];r.hasItemOption&&r.each(function(n){var i=r.getRawDataItem(n);i&&i.selected&&a.push(n)}),a.length>0&&this._innerSelect(r,a)}},e.registerClass=function(r){return Gt.registerClass(r)},e.protoInitialize=(function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"})(),e})(Gt);gn(Gr,K_);gn(Gr,M5);Q$(Gr,Gt);function cB(t){var e=t.name;e5(t)||(t.name=age(t)||e)}function age(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),a=[];return z(r,function(n){var i=e.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function nge(t){return t.model.getRawData().count()}function ige(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),oge}function oge(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function dB(t,e){z(ty(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,wt(sge,e))})}function sge(t,e){var r=fD(t);return r&&r.setOutputEnd((e||this).count()),e}function fD(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var a=r.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(t.uid))}return a}}var oa=(function(){function t(){this.group=new Qe,this.uid=wm("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,a,n){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,a,n){},t.prototype.updateLayout=function(e,r,a,n){},t.prototype.updateVisual=function(e,r,a,n){},t.prototype.toggleBlurSeries=function(e,r,a){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t})();r5(oa);P_(oa);function Sm(){var t=jt();return function(e){var r=t(e),a=e.pipelineContext,n=!!r.large,i=!!r.progressiveRender,o=r.large=!!(a&&a.large),s=r.progressiveRender=!!(a&&a.progressiveRender);return(n!==o||i!==s)&&"reset"}}var BY=jt(),lge=Sm(),Rr=(function(){function t(){this.group=new Qe,this.uid=wm("viewChart"),this.renderTask=B0({plan:uge,reset:cge}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,a,n){},t.prototype.highlight=function(e,r,a,n){var i=e.getData(n&&n.dataType);i&&hB(i,n,"emphasis")},t.prototype.downplay=function(e,r,a,n){var i=e.getData(n&&n.dataType);i&&hB(i,n,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,a,n){this.render(e,r,a,n)},t.prototype.updateLayout=function(e,r,a,n){this.render(e,r,a,n)},t.prototype.updateVisual=function(e,r,a,n){this.render(e,r,a,n)},t.prototype.eachRendered=function(e){Ud(this.group,e)},t.markUpdateMethod=function(e,r){BY(e).updateMethod=r},t.protoInitialize=(function(){var e=t.prototype;e.type="chart"})(),t})();function fB(t,e,r){t&&ly(t)&&(e==="emphasis"?rc:ac)(t,r)}function hB(t,e,r){var a=Dh(t,e),n=e&&e.highlightKey!=null?Pve(e.highlightKey):null;a!=null?z(Ir(a),function(i){fB(t.getItemGraphicEl(i),r,n)}):t.eachItemGraphicEl(function(i){fB(i,r,n)})}r5(Rr);P_(Rr);function uge(t){return lge(t.model)}function cge(t){var e=t.model,r=t.ecModel,a=t.api,n=t.payload,i=e.pipelineContext.progressiveRender,o=t.view,s=n&&BY(n).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,a,n),dge[l]}var dge={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},vS="\0__throttleOriginMethod",vB="\0__throttleRate",pB="\0__throttleType";function I5(t,e,r){var a,n=0,i=0,o=null,s,l,u,c;e=e||0;function d(){i=new Date().getTime(),o=null,t.apply(l,u||[])}var h=function(){for(var v=[],m=0;m<arguments.length;m++)v[m]=arguments[m];a=new Date().getTime(),l=this,u=v;var x=c||e,b=c||r;c=null,s=a-(b?n:i)-x,clearTimeout(o),b?o=setTimeout(d,x):s>=0?d():o=setTimeout(d,-s),n=a};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(v){c=v},h}function _m(t,e,r,a){var n=t[e];if(n){var i=n[vS]||n,o=n[pB],s=n[vB];if(s!==r||o!==a){if(r==null||!a)return t[e]=i;n=t[e]=I5(i,r,a==="debounce"),n[vS]=i,n[pB]=a,n[vB]=r}return n}}function hy(t,e){var r=t[e];r&&r[vS]&&(r.clear&&r.clear(),t[e]=r[vS])}var mB=jt(),gB={itemStyle:Lh(BW,!0),lineStyle:Lh(zW,!0)},fge={lineStyle:"stroke",itemStyle:"fill"};function VY(t,e){var r=t.visualStyleMapper||gB[e];return r||(console.warn("Unknown style type '"+e+"'."),gB.itemStyle)}function FY(t,e){var r=t.visualDrawType||fge[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var hge={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),a=t.visualStyleAccessPath||"itemStyle",n=t.getModel(a),i=VY(t,a),o=i(n),s=n.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=FY(t,a),u=o[l],c=Ke(u)?u:null,d=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||d){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Ke(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||Ke(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(v,m){var x=t.getDataParams(m),b=ve({},o);b[l]=c(x),v.setItemVisual(m,"style",b)}}}},Pg=new $t,vge={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),a=t.visualStyleAccessPath||"itemStyle",n=VY(t,a),i=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){Pg.option=l[a];var u=n(Pg),c=o.ensureUniqueItemVisual(s,"style");ve(c,u),Pg.option.decal&&(o.setItemVisual(s,"decal",Pg.option.decal),Pg.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},pge={performRawSeries:!0,overallReset:function(t){var e=He();t.eachSeries(function(r){var a=r.getColorBy();if(!r.isColorBySeries()){var n=r.type+"-"+a,i=e.get(n);i||(i={},e.set(n,i)),mB(r).scope=i}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var a=r.getRawData(),n={},i=r.getData(),o=mB(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=FY(r,s);i.each(function(u){var c=i.getRawIndex(u);n[c]=u}),a.each(function(u){var c=n[u],d=i.getItemVisual(c,"colorFromPalette");if(d){var h=i.ensureUniqueItemVisual(c,"style"),v=a.getName(u)||u+"",m=a.count();h[l]=r.getColorFromPalette(v,o,m)}})}})}},qb=Math.PI;function mge(t,e){e=e||{},nt(e,{text:"loading",textColor:ne.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:ne.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new Qe,a=new Et({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(a);var n=new Qt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new Et({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(i);var o;return e.showSpinner&&(o=new H_({shape:{startAngle:-qb/2,endAngle:-qb/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:qb*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:qb*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=n.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),i.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var GY=(function(){function t(e,r,a,n){this._stageTaskMap=He(),this.ecInstance=e,this.api=r,a=this._dataProcessorHandlers=a.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=a.concat(n)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(a){var n=a.overallTask;n&&n.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var a=this._pipelineMap.get(e.__pipeline.id),n=a.context,i=!r&&a.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>a.blockIndex,o=i?a.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var a=this._pipelineMap.get(e.uid),n=e.getData(),i=n.count(),o=a.progressiveEnabled&&r.incrementalPrepareRender&&i>=a.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},t.prototype.restorePipelines=function(e){var r=this,a=r._pipelineMap=He();e.eachSeries(function(n){var i=n.getProgressive(),o=n.uid;a.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:i&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),r._pipe(n,n.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),a=this.api;z(this._allHandlers,function(n){var i=e.get(n.uid)||e.set(n.uid,{}),o="";Pi(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,i,r,a),n.overallReset&&this._createOverallStageTask(n,i,r,a)},this)},t.prototype.prepareView=function(e,r,a,n){var i=e.renderTask,o=i.context;o.model=r,o.ecModel=a,o.api=n,i.__block=!e.incrementalPrepareRender,this._pipe(r,i)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,a){this._performStageTasks(this._visualHandlers,e,r,a)},t.prototype._performStageTasks=function(e,r,a,n){n=n||{};var i=!1,o=this;z(e,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),d=c.seriesTaskMap,h=c.overallTask;if(h){var v,m=h.agentStubMap;m.each(function(b){s(n,b)&&(b.dirty(),v=!0)}),v&&h.dirty(),o.updatePayload(h,a);var x=o.getPerformArgs(h,n.block);m.each(function(b){b.perform(x)}),h.perform(x)&&(i=!0)}else d&&d.each(function(b,w){s(n,b)&&b.dirty();var _=o.getPerformArgs(b,n.block);_.skip=!l.performRawSeries&&r.isSeriesFiltered(b.context.model),o.updatePayload(b,a),b.perform(_)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(a){r=a.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,a,n){var i=this,o=r.seriesTaskMap,s=r.seriesTaskMap=He(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?a.eachRawSeries(c):l?a.eachRawSeriesByType(l,c):u&&u(a,n).each(c);function c(d){var h=d.uid,v=s.set(h,o&&o.get(h)||B0({plan:wge,reset:Sge,count:Tge}));v.context={model:d,ecModel:a,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(d,v)}},t.prototype._createOverallStageTask=function(e,r,a,n){var i=this,o=r.overallTask=r.overallTask||B0({reset:gge});o.context={ecModel:a,api:n,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=He(),u=e.seriesType,c=e.getTargetSeries,d=!0,h=!1,v="";Pi(!e.createOnAllSeries,v),u?a.eachRawSeriesByType(u,m):c?c(a,n).each(m):(d=!1,z(a.getSeries(),m));function m(x){var b=x.uid,w=l.set(b,s&&s.get(b)||(h=!0,B0({reset:yge,onDirty:bge})));w.context={model:x,overallProgress:d},w.agent=o,w.__block=d,i._pipe(x,w)}h&&o.dirty()},t.prototype._pipe=function(e,r){var a=e.uid,n=this._pipelineMap.get(a);!n.head&&(n.head=r),n.tail&&n.tail.pipe(r),n.tail=r,r.__idxInPipeline=n.count++,r.__pipeline=n},t.wrapStageHandler=function(e,r){return Ke(e)&&(e={overallReset:e,seriesType:Cge(e)}),e.uid=wm("stageHandler"),r&&(e.visualType=r),e},t})();function gge(t){t.overallReset(t.ecModel,t.api,t.payload)}function yge(t){return t.overallProgress&&xge}function xge(){this.agent.dirty(),this.getDownstream().dirty()}function bge(){this.agent&&this.agent.dirty()}function wge(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Sge(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Ir(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?Se(e,function(r,a){return HY(a)}):_ge}var _ge=HY(0);function HY(t){return function(e,r){var a=r.data,n=r.resetDefines[t];if(n&&n.dataEach)for(var i=e.start;i<e.end;i++)n.dataEach(a,i);else n&&n.progress&&n.progress(e,a)}}function Tge(t){return t.data.count()}function Cge(t){pS=null;try{t(vy,UY)}catch{}return pS}var vy={},UY={},pS;$Y(vy,D5);$Y(UY,pY);vy.eachSeriesByType=vy.eachRawSeriesByType=function(t){pS=t};vy.eachComponent=function(t){t.mainType==="series"&&t.subType&&(pS=t.subType)};function $Y(t,e){for(var r in e.prototype)t[r]=en}var rt=ne.darkColor,kge=rt.background,Ig=function(){return{axisLine:{lineStyle:{color:rt.axisLine}},splitLine:{lineStyle:{color:rt.axisSplitLine}},splitArea:{areaStyle:{color:[rt.backgroundTint,rt.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:rt.axisMinorSplitLine}},axisLabel:{color:rt.axisLabel},axisName:{}}},yB={label:{color:rt.secondary},itemStyle:{borderColor:rt.borderTint},dividerLineStyle:{color:rt.border}},WY={darkMode:!0,color:rt.theme,backgroundColor:kge,axisPointer:{lineStyle:{color:rt.border},crossStyle:{color:rt.borderShade},label:{color:rt.tertiary}},legend:{textStyle:{color:rt.secondary},pageTextStyle:{color:rt.tertiary}},textStyle:{color:rt.secondary},title:{textStyle:{color:rt.primary},subtextStyle:{color:rt.quaternary}},toolbox:{iconStyle:{borderColor:rt.accent50}},tooltip:{backgroundColor:rt.neutral20,defaultBorderColor:rt.border,textStyle:{color:rt.tertiary}},dataZoom:{borderColor:rt.accent10,textStyle:{color:rt.tertiary},brushStyle:{color:rt.backgroundTint},handleStyle:{color:rt.neutral00,borderColor:rt.accent20},moveHandleStyle:{color:rt.accent40},emphasis:{handleStyle:{borderColor:rt.accent50}},dataBackground:{lineStyle:{color:rt.accent30},areaStyle:{color:rt.accent20}},selectedDataBackground:{lineStyle:{color:rt.accent50},areaStyle:{color:rt.accent30}}},visualMap:{textStyle:{color:rt.secondary},handleStyle:{borderColor:rt.neutral30}},timeline:{lineStyle:{color:rt.accent10},label:{color:rt.tertiary},controlStyle:{color:rt.accent30,borderColor:rt.accent30}},calendar:{itemStyle:{color:rt.neutral00,borderColor:rt.neutral20},dayLabel:{color:rt.tertiary},monthLabel:{color:rt.secondary},yearLabel:{color:rt.secondary}},matrix:{x:yB,y:yB,backgroundColor:{borderColor:rt.axisLine},body:{itemStyle:{borderColor:rt.borderTint}}},timeAxis:Ig(),logAxis:Ig(),valueAxis:Ig(),categoryAxis:Ig(),line:{symbol:"circle"},graph:{color:rt.theme},gauge:{title:{color:rt.secondary},axisLine:{lineStyle:{color:[[1,rt.neutral05]]}},axisLabel:{color:rt.axisLabel},detail:{color:rt.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:rt.background}},radar:(function(){var t=Ig();return t.axisName={color:rt.axisLabel},t.axisLine.lineStyle.color=rt.neutral20,t})(),treemap:{breadcrumb:{itemStyle:{color:rt.neutral20,textStyle:{color:rt.secondary}},emphasis:{itemStyle:{color:rt.neutral30}}}},sunburst:{itemStyle:{borderColor:rt.background}},map:{itemStyle:{borderColor:rt.border,areaColor:rt.neutral10},label:{color:rt.tertiary},emphasis:{label:{color:rt.primary},itemStyle:{areaColor:rt.highlight}},select:{label:{color:rt.primary},itemStyle:{areaColor:rt.highlight}}},geo:{itemStyle:{borderColor:rt.border,areaColor:rt.neutral10},emphasis:{label:{color:rt.primary},itemStyle:{areaColor:rt.highlight}},select:{label:{color:rt.primary},itemStyle:{color:rt.highlight}}}};WY.categoryAxis.splitLine.show=!1;var Nge=(function(){function t(){}return t.prototype.normalizeQuery=function(e){var r={},a={},n={};if(Ie(e)){var i=zl(e);r.mainType=i.main||null,r.subType=i.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};z(e,function(l,u){for(var c=!1,d=0;d<o.length;d++){var h=o[d],v=u.lastIndexOf(h);if(v>0&&v===u.length-h.length){var m=u.slice(0,v);m!=="data"&&(r.mainType=m,r[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(a[u]=l,c=!0),c||(n[u]=l)})}return{cptQuery:r,dataQuery:a,otherQuery:n}},t.prototype.filter=function(e,r){var a=this.eventInfo;if(!a)return!0;var n=a.targetEl,i=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,i,"name")&&c(u,i,"dataIndex")&&c(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,n,i));function c(d,h,v,m){return d[v]==null||h[m||v]===d[v]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t})(),hD=["symbol","symbolSize","symbolRotate","symbolOffset"],xB=hD.concat(["symbolKeepAspect"]),Age={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var a={},n={},i=!1,o=0;o<hD.length;o++){var s=hD[o],l=t.get(s);Ke(l)?(i=!0,n[s]=l):a[s]=l}if(a.symbol=a.symbol||t.defaultSymbol,r.setVisual(ve({legendIcon:t.legendIcon||a.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},a)),e.isSeriesFiltered(t))return;var u=Wt(n);function c(d,h){for(var v=t.getRawValue(h),m=t.getDataParams(h),x=0;x<u.length;x++){var b=u[x];d.setItemVisual(h,b,n[b](v,m))}}return{dataEach:i?c:null}}},Mge={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.hasSymbolVisual||e.isSeriesFiltered(t))return;var r=t.getData();function a(n,i){for(var o=n.getItemModel(i),s=0;s<xB.length;s++){var l=xB[s],u=o.getShallow(l,!0);u!=null&&n.setItemVisual(i,l,u)}}return{dataEach:r.hasItemOption?a:null}}};function j5(t,e,r){switch(r){case"color":var a=t.getItemVisual(e,"style");return a[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,r)}}function Jy(t,e){switch(e){case"color":var r=t.getVisual("style");return r[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function YY(t,e,r,a){switch(r){case"color":var n=t.ensureUniqueItemVisual(e,"style");n[t.getVisual("drawType")]=a,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=a;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,r,a);break}}function XY(t,e){function r(a,n){var i=[];return a.eachComponent({mainType:"series",subType:t,query:n},function(o){i.push(o.seriesIndex)}),i}z([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],function(a){e(a[0],function(n,i,o){n=ve({},n),o.dispatchAction(ve(n,{type:a[1],seriesIndex:r(i,n)}))})})}function zv(t,e,r,a,n){var i=t+e;r.isSilent(i)||a.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=n.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var d=o.getData(),h=Dh(d,n.fromActionPayload);r.trigger(i,{type:i,seriesId:o.id,name:be(h)?d.getName(h[0]):d.getName(h),selected:Ie(l)?l:ve({},l)})}})}function Dge(t,e,r){t.on("selectchanged",function(a){var n=r.getModel();a.isFromClick?(zv("map","selectchanged",e,n,a),zv("pie","selectchanged",e,n,a)):a.fromAction==="select"?(zv("map","selected",e,n,a),zv("pie","selected",e,n,a)):a.fromAction==="unselect"&&(zv("map","unselected",e,n,a),zv("pie","unselected",e,n,a))})}function uh(t,e,r){for(var a;t&&!(e(t)&&(a=t,r));)t=t.__hostTarget||t.parent;return a}var Lge=Math.round(Math.random()*9),Ege=typeof Object.defineProperty=="function",Rge=(function(){function t(){this._id="__ec_inner_"+Lge++}return t.prototype.get=function(e){return this._guard(e)[this._id]},t.prototype.set=function(e,r){var a=this._guard(e);return Ege?Object.defineProperty(a,this._id,{value:r,enumerable:!1,configurable:!0}):a[this._id]=r,this},t.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},t.prototype.has=function(e){return!!this._guard(e)[this._id]},t.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},t})(),Pge=zt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,a=e.cy,n=e.width/2,i=e.height/2;t.moveTo(r,a-i),t.lineTo(r+n,a+i),t.lineTo(r-n,a+i),t.closePath()}}),Ige=zt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,a=e.cy,n=e.width/2,i=e.height/2;t.moveTo(r,a-i),t.lineTo(r+n,a),t.lineTo(r,a+i),t.lineTo(r-n,a),t.closePath()}}),jge=zt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x,a=e.y,n=e.width/5*3,i=Math.max(n,e.height),o=n/2,s=o*o/(i-o),l=a-i+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,d=Math.sin(u),h=Math.cos(u),v=o*.6,m=o*.7;t.moveTo(r-c,l+s),t.arc(r,l,o,Math.PI-u,Math.PI*2+u),t.bezierCurveTo(r+c-d*v,l+s+h*v,r,a-m,r,a),t.bezierCurveTo(r,a-m,r-c+d*v,l+s+h*v,r-c,l+s),t.closePath()}}),Oge=zt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.height,a=e.width,n=e.x,i=e.y,o=a/3*2;t.moveTo(n,i),t.lineTo(n+o,i+r),t.lineTo(n,i+r/4*3),t.lineTo(n-o,i+r),t.lineTo(n,i),t.closePath()}}),zge={line:fn,rect:Et,roundRect:Et,square:Et,circle:lc,diamond:Ige,pin:jge,arrow:Oge,triangle:Pge},Bge={line:function(t,e,r,a,n){n.x1=t,n.y1=e+a/2,n.x2=t+r,n.y2=e+a/2},rect:function(t,e,r,a,n){n.x=t,n.y=e,n.width=r,n.height=a},roundRect:function(t,e,r,a,n){n.x=t,n.y=e,n.width=r,n.height=a,n.r=Math.min(r,a)/4},square:function(t,e,r,a,n){var i=Math.min(r,a);n.x=t,n.y=e,n.width=i,n.height=i},circle:function(t,e,r,a,n){n.cx=t+r/2,n.cy=e+a/2,n.r=Math.min(r,a)/2},diamond:function(t,e,r,a,n){n.cx=t+r/2,n.cy=e+a/2,n.width=r,n.height=a},pin:function(t,e,r,a,n){n.x=t+r/2,n.y=e+a/2,n.width=r,n.height=a},arrow:function(t,e,r,a,n){n.x=t+r/2,n.y=e+a/2,n.width=r,n.height=a},triangle:function(t,e,r,a,n){n.cx=t+r/2,n.cy=e+a/2,n.width=r,n.height=a}},mS={};z(zge,function(t,e){mS[e]=new t});var Vge=zt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,r){var a=nS(t,e,r),n=this.shape;return n&&n.symbolType==="pin"&&e.position==="inside"&&(a.y=r.y+r.height*.4),a},buildPath:function(t,e,r){var a=e.symbolType;if(a!=="none"){var n=mS[a];n||(a="rect",n=mS[a]),Bge[a](e.x,e.y,e.width,e.height,n.shape),n.buildPath(t,n.shape,r)}}});function Fge(t,e){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=t,r.fill=e||ne.color.neutral00,r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=t:r.fill=t,this.markRedraw()}}function mn(t,e,r,a,n,i,o){var s=t.indexOf("empty")===0;s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return t.indexOf("image://")===0?l=AW(t.slice(8),new ot(e,r,a,n),o?"center":"cover"):t.indexOf("path://")===0?l=uy(t.slice(7),{},new ot(e,r,a,n),o?"center":"cover"):l=new Vge({shape:{symbolType:t,x:e,y:r,width:a,height:n}}),l.__isEmptyBrush=s,l.setColor=Fge,i&&l.setColor(i),l}function Tm(t){return be(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function Xh(t,e){if(t!=null)return be(t)||(t=[t,t]),[Pe(t[0],e[0])||0,Pe($e(t[1],t[0]),e[1])||0]}function ch(t){return isFinite(t)}function Gge(t,e,r){var a=e.x==null?0:e.x,n=e.x2==null?1:e.x2,i=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(a=a*r.width+r.x,n=n*r.width+r.x,i=i*r.height+r.y,o=o*r.height+r.y),a=ch(a)?a:0,n=ch(n)?n:1,i=ch(i)?i:0,o=ch(o)?o:0;var s=t.createLinearGradient(a,i,n,o);return s}function Hge(t,e,r){var a=r.width,n=r.height,i=Math.min(a,n),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(o=o*a+r.x,s=s*n+r.y,l=l*i),o=ch(o)?o:.5,s=ch(s)?s:.5,l=l>=0&&ch(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function vD(t,e,r){for(var a=e.type==="radial"?Hge(t,e,r):Gge(t,e,r),n=e.colorStops,i=0;i<n.length;i++)a.addColorStop(n[i].offset,n[i].color);return a}function Uge(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!0;return!1}function Zb(t){return parseInt(t,10)}function Sp(t,e,r){var a=["width","height"][e],n=["clientWidth","clientHeight"][e],i=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(r[a]!=null&&r[a]!=="auto")return parseFloat(r[a]);var s=document.defaultView.getComputedStyle(t);return(t[n]||Zb(s[a])||Zb(t.style[a]))-(Zb(s[i])||0)-(Zb(s[o])||0)|0}function $ge(t,e){return!t||t==="solid"||!(e>0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:qt(t)?[t]:be(t)?t:null}function O5(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&$ge(e.lineDash,e.lineWidth),a=e.lineDashOffset;if(r){var n=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;n&&n!==1&&(r=Se(r,function(i){return i/n}),a/=n)}return[r,a]}var Wge=new Ql(!0);function gS(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function bB(t){return typeof t=="string"&&t!=="none"}function yS(t){var e=t.fill;return e!=null&&e!=="none"}function wB(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function SB(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function pD(t,e,r){var a=a5(e.image,e.__image,r);if(I_(a)){var n=t.createPattern(a,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*sw),i.scaleSelf(e.scaleX||1,e.scaleY||1),n.setTransform(i)}return n}}function Yge(t,e,r,a){var n,i=gS(r),o=yS(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||Wge,d=e.__dirty;if(!a){var h=r.fill,v=r.stroke,m=o&&!!h.colorStops,x=i&&!!v.colorStops,b=o&&!!h.image,w=i&&!!v.image,_=void 0,T=void 0,C=void 0,k=void 0,A=void 0;(m||x)&&(A=e.getBoundingRect()),m&&(_=d?vD(t,h,A):e.__canvasFillGradient,e.__canvasFillGradient=_),x&&(T=d?vD(t,v,A):e.__canvasStrokeGradient,e.__canvasStrokeGradient=T),b&&(C=d||!e.__canvasFillPattern?pD(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=C),w&&(k=d||!e.__canvasStrokePattern?pD(t,v,e):e.__canvasStrokePattern,e.__canvasStrokePattern=k),m?t.fillStyle=_:b&&(C?t.fillStyle=C:o=!1),x?t.strokeStyle=T:w&&(k?t.strokeStyle=k:i=!1)}var M=e.getGlobalScale();c.setScale(M[0],M[1],e.segmentIgnoreThreshold);var L,R;t.setLineDash&&r.lineDash&&(n=O5(e),L=n[0],R=n[1]);var P=!0;(u||d&ap)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),P=!1),c.reset(),e.buildPath(c,e.shape,a),c.toStatic(),e.pathUpdated()),P&&c.rebuildPath(t,l?s:1),L&&(t.setLineDash(L),t.lineDashOffset=R),a||(r.strokeFirst?(i&&SB(t,r),o&&wB(t,r)):(o&&wB(t,r),i&&SB(t,r))),L&&t.setLineDash([])}function Xge(t,e,r){var a=e.__image=a5(r.image,e.__image,e,e.onload);if(!(!a||!I_(a))){var n=r.x||0,i=r.y||0,o=e.getWidth(),s=e.getHeight(),l=a.width/a.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=a.width,s=a.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;t.drawImage(a,u,c,r.sWidth,r.sHeight,n,i,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,d=o-u,h=s-c;t.drawImage(a,u,c,d,h,n,i,o,s)}else t.drawImage(a,n,i,o,s)}}function qge(t,e,r){var a,n=r.text;if(n!=null&&(n+=""),n){t.font=r.font||Ju,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var i=void 0,o=void 0;t.setLineDash&&r.lineDash&&(a=O5(e),i=a[0],o=a[1]),i&&(t.setLineDash(i),t.lineDashOffset=o),r.strokeFirst?(gS(r)&&t.strokeText(n,r.x,r.y),yS(r)&&t.fillText(n,r.x,r.y)):(yS(r)&&t.fillText(n,r.x,r.y),gS(r)&&t.strokeText(n,r.x,r.y)),i&&t.setLineDash([])}}var _B=["shadowBlur","shadowOffsetX","shadowOffsetY"],TB=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function qY(t,e,r,a,n){var i=!1;if(!a&&(r=r||{},e===r))return!1;if(a||e.opacity!==r.opacity){fo(t,n),i=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?xh.opacity:o}(a||e.blend!==r.blend)&&(i||(fo(t,n),i=!0),t.globalCompositeOperation=e.blend||xh.blend);for(var s=0;s<_B.length;s++){var l=_B[s];(a||e[l]!==r[l])&&(i||(fo(t,n),i=!0),t[l]=t.dpr*(e[l]||0))}return(a||e.shadowColor!==r.shadowColor)&&(i||(fo(t,n),i=!0),t.shadowColor=e.shadowColor||xh.shadowColor),i}function CB(t,e,r,a,n){var i=py(e,n.inHover),o=a?null:r&&py(r,n.inHover)||{};if(i===o)return!1;var s=qY(t,i,o,a,n);if((a||i.fill!==o.fill)&&(s||(fo(t,n),s=!0),bB(i.fill)&&(t.fillStyle=i.fill)),(a||i.stroke!==o.stroke)&&(s||(fo(t,n),s=!0),bB(i.stroke)&&(t.strokeStyle=i.stroke)),(a||i.opacity!==o.opacity)&&(s||(fo(t,n),s=!0),t.globalAlpha=i.opacity==null?1:i.opacity),e.hasStroke()){var l=i.lineWidth,u=l/(i.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==u&&(s||(fo(t,n),s=!0),t.lineWidth=u)}for(var c=0;c<TB.length;c++){var d=TB[c],h=d[0];(a||i[h]!==o[h])&&(s||(fo(t,n),s=!0),t[h]=i[h]||d[1])}return s}function Zge(t,e,r,a,n){return qY(t,py(e,n.inHover),r&&py(r,n.inHover),a,n)}function ZY(t,e){var r=e.transform,a=t.dpr||1;r?t.setTransform(a*r[0],a*r[1],a*r[2],a*r[3],a*r[4],a*r[5]):t.setTransform(a,0,0,a,0,0)}function Kge(t,e,r){for(var a=!1,n=0;n<t.length;n++){var i=t[n];a=a||i.isZeroArea(),ZY(e,i),e.beginPath(),i.buildPath(e,i.shape),e.clip()}r.allClipped=a}function Qge(t,e){return t&&e?t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||t[4]!==e[4]||t[5]!==e[5]:!(!t&&!e)}var kB=1,NB=2,AB=3,MB=4;function Jge(t){var e=yS(t),r=gS(t);return!(t.lineDash||!(+e^+r)||e&&typeof t.fill!="string"||r&&typeof t.stroke!="string"||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}function fo(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function py(t,e){return e&&t.__hoverStyle||t.style}function KY(t,e){dh(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function dh(t,e,r,a){var n=e.transform;if(!e.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){e.__dirty&=~Lo,e.__isRendered=!1;return}var i=e.__clipPaths,o=r.prevElClipPaths,s=!1,l=!1;if((!o||Uge(i,o))&&(o&&o.length&&(fo(t,r),t.restore(),l=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),i&&i.length&&(fo(t,r),t.save(),Kge(i,t,r),s=!0),r.prevElClipPaths=i),r.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=r.prevEl;u||(l=s=!0);var c=e instanceof zt&&e.autoBatch&&Jge(e.style);s||Qge(n,u.transform)?(fo(t,r),ZY(t,e)):c||fo(t,r);var d=py(e,r.inHover);e instanceof zt?(r.lastDrawType!==kB&&(l=!0,r.lastDrawType=kB),CB(t,e,u,l,r),(!c||!r.batchFill&&!r.batchStroke)&&t.beginPath(),Yge(t,e,d,c),c&&(r.batchFill=d.fill||"",r.batchStroke=d.stroke||"")):e instanceof Gp?(r.lastDrawType!==AB&&(l=!0,r.lastDrawType=AB),CB(t,e,u,l,r),qge(t,e,d)):e instanceof li?(r.lastDrawType!==NB&&(l=!0,r.lastDrawType=NB),Zge(t,e,u,l,r),Xge(t,e,d)):e.getTemporalDisplayables&&(r.lastDrawType!==MB&&(l=!0,r.lastDrawType=MB),e0e(t,e,r)),c&&a&&fo(t,r),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),r.prevEl=e,e.__dirty=0,e.__isRendered=!0}function e0e(t,e,r){var a=e.getDisplayables(),n=e.getTemporalDisplayables();t.save();var i={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=e.getCursor(),s=a.length;o<s;o++){var l=a[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),dh(t,l,i,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}for(var u=0,c=n.length;u<c;u++){var l=n[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),dh(t,l,i,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}var Lk=new Rge,DB=new Vp(100),LB=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function $p(t,e){if(t==="none")return null;var r=e.getDevicePixelRatio(),a=e.getZr(),n=a.painter.type==="svg";t.dirty&&Lk.delete(t);var i=Lk.get(t);if(i)return i;var o=nt(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=n?1:1/r,Lk.set(t,s),t.dirty=!1,s;function l(u){for(var c=[r],d=!0,h=0;h<LB.length;++h){var v=o[LB[h]];if(v!=null&&!be(v)&&!Ie(v)&&!qt(v)&&typeof v!="boolean"){d=!1;break}c.push(v)}var m;if(d){m=c.join(",")+(n?"-svg":"");var x=DB.get(m);x&&(n?u.svgElement=x:u.image=x)}var b=JY(o.dashArrayX),w=t0e(o.dashArrayY),_=QY(o.symbol),T=r0e(b),C=eX(w),k=!n&&qs.createCanvas(),A=n&&{tag:"g",attrs:{},key:"dcl",children:[]},M=R(),L;k&&(k.width=M.width*r,k.height=M.height*r,L=k.getContext("2d")),P(),d&&DB.put(m,k||A),u.image=k,u.svgElement=A,u.svgWidth=M.width,u.svgHeight=M.height;function R(){for(var j=1,V=0,I=T.length;V<I;++V)j=Y4(j,T[V]);for(var F=1,V=0,I=_.length;V<I;++V)F=Y4(F,_[V].length);j*=F;var G=C*T.length*_.length;return{width:Math.max(1,Math.min(j,o.maxTileWidth)),height:Math.max(1,Math.min(G,o.maxTileHeight))}}function P(){L&&(L.clearRect(0,0,k.width,k.height),o.backgroundColor&&(L.fillStyle=o.backgroundColor,L.fillRect(0,0,k.width,k.height)));for(var j=0,V=0;V<w.length;++V)j+=w[V];if(j<=0)return;for(var I=-C,F=0,G=0,O=0;I<M.height;){if(F%2===0){for(var U=G/2%_.length,$=0,K=0,q=0;$<M.width*2;){for(var H=0,V=0;V<b[O].length;++V)H+=b[O][V];if(H<=0)break;if(K%2===0){var Z=(1-o.symbolSize)*.5,te=$+b[O][K]*Z,ie=I+w[F]*Z,ce=b[O][K]*o.symbolSize,me=w[F]*o.symbolSize,ze=q/2%_[U].length;Ce(te,ie,ce,me,_[U][ze])}$+=b[O][K],++q,++K,K===b[O].length&&(K=0)}++O,O===b.length&&(O=0)}I+=w[F],++G,++F,F===w.length&&(F=0)}function Ce(ge,Be,_e,Oe,xt){var Ye=n?1:r,st=mn(xt,ge*Ye,Be*Ye,_e*Ye,Oe*Ye,o.color,o.symbolKeepAspect);if(n){var We=a.painter.renderOneToVNode(st);We&&A.children.push(We)}else KY(L,st)}}}}function QY(t){if(!t||t.length===0)return[["rect"]];if(Ie(t))return[[t]];for(var e=!0,r=0;r<t.length;++r)if(!Ie(t[r])){e=!1;break}if(e)return QY([t]);for(var a=[],r=0;r<t.length;++r)Ie(t[r])?a.push([t[r]]):a.push(t[r]);return a}function JY(t){if(!t||t.length===0)return[[0,0]];if(qt(t)){var e=Math.ceil(t);return[[e,e]]}for(var r=!0,a=0;a<t.length;++a)if(!qt(t[a])){r=!1;break}if(r)return JY([t]);for(var n=[],a=0;a<t.length;++a)if(qt(t[a])){var e=Math.ceil(t[a]);n.push([e,e])}else{var e=Se(t[a],function(s){return Math.ceil(s)});e.length%2===1?n.push(e.concat(e)):n.push(e)}return n}function t0e(t){if(!t||typeof t=="object"&&t.length===0)return[0,0];if(qt(t)){var e=Math.ceil(t);return[e,e]}var r=Se(t,function(a){return Math.ceil(a)});return t.length%2?r.concat(r):r}function r0e(t){return Se(t,function(e){return eX(e)})}function eX(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return t.length%2===1?e*2:e}function a0e(t,e){t.eachRawSeries(function(r){if(!t.isSeriesFiltered(r)){var a=r.getData();a.hasItemVisual()&&a.each(function(o){var s=a.getItemVisual(o,"decal");if(s){var l=a.ensureUniqueItemVisual(o,"style");l.decal=$p(s,e)}});var n=a.getVisual("decal");if(n){var i=a.getVisual("style");i.decal=$p(n,e)}}})}var Vs=new ws,tX={};function n0e(t,e){tX[t]=e}function i0e(t){return tX[t]}var rX={};function o0e(t,e){rX[t]=e}function s0e(t){return rX[t]}var l0e=1,u0e=800,c0e=900,d0e=1e3,f0e=2e3,h0e=5e3,aX=1e3,v0e=1100,z5=2e3,nX=3e3,p0e=4e3,J_=4500,m0e=4600,g0e=5e3,y0e=6e3,iX=7e3,x0e={PROCESSOR:{FILTER:d0e,SERIES_FILTER:u0e,STATISTIC:h0e},VISUAL:{LAYOUT:aX,PROGRESSIVE_LAYOUT:v0e,GLOBAL:z5,CHART:nX,POST_CHART_LAYOUT:m0e,COMPONENT:p0e,BRUSH:g0e,CHART_ITEM:J_,ARIA:y0e,DECAL:iX}},Cn="__flagInMainProcess",Kb="__mainProcessVersion",ri="__pendingUpdate",Ek="__needsUpdateStatus",EB=/^[a-zA-Z0-9_]+$/,Rk="__connectUpdateStatus",RB=0,b0e=1,w0e=2;function oX(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.isDisposed()){this.id;return}return lX(this,t,e)}}function sX(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return lX(this,t,e)}}function lX(t,e,r){return r[0]=r[0]&&r[0].toLowerCase(),ws.prototype[e].apply(t,r)}var uX=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(ws),cX=uX.prototype;cX.on=sX("on");cX.off=sX("off");var Bf,Pk,Qb,Ru,Jb,Ik,jk,Bv,Vv,PB,IB,Ok,jB,e1,OB,dX,Jo,zB,Fv,fX=(function(t){se(e,t);function e(r,a,n){var i=t.call(this,new Nge)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],n=n||{},i._dom=r;var o="canvas",s="auto",l=!1;i[Kb]=1,n.ssr&&Qfe(function(h){var v=dt(h),m=v.dataIndex;if(m!=null){var x=He();return x.set("series_index",v.seriesIndex),x.set("data_index",m),v.ssrType&&x.set("ssr_type",v.ssrType),x}});var u=i._zr=H4(r,{renderer:n.renderer||o,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:$e(n.useDirtyRect,l),useCoarsePointer:$e(n.useCoarsePointer,s),pointerSize:n.pointerSize});i._ssr=n.ssr,i._throttledZrFlush=I5(je(u.flush,u),17),i._updateTheme(a),i._locale=Ape(n.locale||VW),i._coordSysMgr=new Ky;var c=i._api=OB(i);function d(h,v){return h.__prio-v.__prio}return cw(bS,d),cw(yD,d),i._scheduler=new GY(i,c,yD,bS),i._messageCenter=new uX,i._initEvents(),i.resize=je(i.resize,i),u.animation.on("frame",i._onframe,i),PB(u,i),IB(u,i),Xw(i),i}return e.prototype._onframe=function(){if(!this._disposed){zB(this);var r=this._scheduler;if(this[ri]){var a=this[ri].silent;this[Cn]=!0,Fv(this);try{Bf(this),Ru.update.call(this,null,this[ri].updateParams)}catch(l){throw this[Cn]=!1,this[ri]=null,l}this._zr.flush(),this[Cn]=!1,this[ri]=null,Bv.call(this,a),Vv.call(this,a)}else if(r.unfinished){var n=l0e,i=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(i),r.performDataProcessorTasks(i),Ik(this,i),r.performVisualTasks(i),e1(this,this._model,o,"remain",{}),n-=+new Date-s}while(n>0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,a,n){if(!this[Cn]){if(this._disposed){this.id;return}var i,o,s;if(it(a)&&(n=a.lazyUpdate,i=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[Cn]=!0,Fv(this),!this._model||a){var l=new ume(this._api),u=this._theme,c=this._model=new D5;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},xD);var d={seriesTransition:s,optionChanged:!0};if(n)this[ri]={silent:i,updateParams:d},this[Cn]=!1,this.getZr().wakeUp();else{try{Bf(this),Ru.update.call(this,null,d)}catch(h){throw this[ri]=null,this[Cn]=!1,h}this._ssr||this._zr.flush(),this[ri]=null,this[Cn]=!1,Bv.call(this,i),Vv.call(this,i)}}},e.prototype.setTheme=function(r,a){if(!this[Cn]){if(this._disposed){this.id;return}var n=this._model;if(n){var i=a&&a.silent,o=null;this[ri]&&(i==null&&(i=this[ri].silent),o=this[ri].updateParams,this[ri]=null),this[Cn]=!0,Fv(this);try{this._updateTheme(r),n.setTheme(this._theme),Bf(this),Ru.update.call(this,{type:"setTheme"},o)}catch(s){throw this[Cn]=!1,s}this[Cn]=!1,Bv.call(this,i),Vv.call(this,i)}}},e.prototype._updateTheme=function(r){Ie(r)&&(r=hX[r]),r&&(r=et(r),r&&gY(r,!0),this._theme=r)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ut.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var a=this._zr.painter;return a.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){var r=this._zr,a=r.storage.getDisplayList();return z(a,function(n){n.stopAnimation(null,!0)}),r.painter.toDataURL()},e.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var a=r.excludeComponents,n=this._model,i=[],o=this;z(a,function(l){n.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(i.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return z(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var a=r.type==="svg",n=this.group,i=Math.min,o=Math.max,s=1/0;if(BB[n]){var l=s,u=s,c=-s,d=-s,h=[],v=r&&r.pixelRatio||this.getDevicePixelRatio();z(V0,function(T,C){if(T.group===n){var k=a?T.getZr().painter.getSvgDom().innerHTML:T.renderToCanvas(et(r)),A=T.getDom().getBoundingClientRect();l=i(A.left,l),u=i(A.top,u),c=o(A.right,c),d=o(A.bottom,d),h.push({dom:k,left:A.left,top:A.top})}}),l*=v,u*=v,c*=v,d*=v;var m=c-l,x=d-u,b=qs.createCanvas(),w=H4(b,{renderer:a?"svg":"canvas"});if(w.resize({width:m,height:x}),a){var _="";return z(h,function(T){var C=T.left-l,k=T.top-u;_+='<g transform="translate('+C+","+k+')">'+T.dom+"</g>"}),w.painter.getSvgRoot().innerHTML=_,r.connectedBackgroundColor&&w.painter.setBackgroundColor(r.connectedBackgroundColor),w.refreshImmediately(),w.painter.toDataURL()}else return r.connectedBackgroundColor&&w.add(new Et({shape:{x:0,y:0,width:m,height:x},style:{fill:r.connectedBackgroundColor}})),z(h,function(T){var C=new li({style:{x:T.left*v-l,y:T.top*v-u,image:T.dom}});w.add(C)}),w.refreshImmediately(),b.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,a,n){return Jb(this,"convertToPixel",r,a,n)},e.prototype.convertToLayout=function(r,a,n){return Jb(this,"convertToLayout",r,a,n)},e.prototype.convertFromPixel=function(r,a,n){return Jb(this,"convertFromPixel",r,a,n)},e.prototype.containPixel=function(r,a){if(this._disposed){this.id;return}var n=this._model,i,o=kp(n,r);return z(o,function(s,l){l.indexOf("Models")>=0&&z(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)i=i||!!c.containPoint(a);else if(l==="seriesModels"){var d=this._chartsMap[u.__viewId];d&&d.containPoint&&(i=i||d.containPoint(a,u))}},this)},this),!!i},e.prototype.getVisual=function(r,a){var n=this._model,i=kp(n,r,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?j5(s,l,a):Jy(s,a)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;z(S0e,function(n){var i=function(o){var s=r.getModel(),l=o.target,u,c=n==="globalout";if(c?u={}:l&&uh(l,function(x){var b=dt(x);if(b&&b.dataIndex!=null){var w=b.dataModel||s.getSeriesByIndex(b.seriesIndex);return u=w&&w.getDataParams(b.dataIndex,b.dataType,l)||{},!0}else if(b.eventData)return u=ve({},b.eventData),!0},!0),u){var d=u.componentType,h=u.componentIndex;(d==="markLine"||d==="markPoint"||d==="markArea")&&(d="series",h=u.seriesIndex);var v=d&&h!=null&&s.getComponent(d,h),m=v&&r[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];u.event=o,u.type=n,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:v,view:m},r.trigger(n,u)}};i.zrEventfulCallAtLast=!0,r._zr.on(n,i,r)});var a=this._messageCenter;z(gD,function(n,i){a.on(i,function(o){r.trigger(i,o)})}),Dge(a,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&q$(this.getDom(),V5,"");var a=this,n=a._api,i=a._model;z(a._componentsViews,function(o){o.dispose(i,n)}),z(a._chartsViews,function(o){o.dispose(i,n)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete V0[a.id]},e.prototype.resize=function(r){if(!this[Cn]){if(this._disposed){this.id;return}this._zr.resize(r);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var n=a.resetOption("media"),i=r&&r.silent;this[ri]&&(i==null&&(i=this[ri].silent),n=!0,this[ri]=null),this[Cn]=!0,Fv(this);try{n&&Bf(this),Ru.update.call(this,{type:"resize",animation:ve({duration:0},r&&r.animation)})}catch(o){throw this[Cn]=!1,o}this[Cn]=!1,Bv.call(this,i),Vv.call(this,i)}}},e.prototype.showLoading=function(r,a){if(this._disposed){this.id;return}if(it(r)&&(a=r,r=""),r=r||"default",this.hideLoading(),!!bD[r]){var n=bD[r](this._api,a),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var a=ve({},r);return a.type=mD[r.type],a},e.prototype.dispatchAction=function(r,a){if(this._disposed){this.id;return}if(it(a)||(a={silent:!!a}),!!xS[r.type]&&this._model){if(this[Cn]){this._pendingActions.push(r);return}var n=a.silent;jk.call(this,r,n);var i=a.flush;i?this._zr.flush():i!==!1&&Ut.browser.weChat&&this._throttledZrFlush(),Bv.call(this,n),Vv.call(this,n)}},e.prototype.updateLabelLayout=function(){Vs.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){this.id;return}var a=r.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(a);i.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=(function(){Bf=function(d){var h=d._scheduler;h.restorePipelines(d._model),h.prepareStageTasks(),Pk(d,!0),Pk(d,!1),h.plan()},Pk=function(d,h){for(var v=d._model,m=d._scheduler,x=h?d._componentsViews:d._chartsViews,b=h?d._componentsMap:d._chartsMap,w=d._zr,_=d._api,T=0;T<x.length;T++)x[T].__alive=!1;h?v.eachComponent(function(A,M){A!=="series"&&C(M)}):v.eachSeries(C);function C(A){var M=A.__requireNewView;A.__requireNewView=!1;var L="_ec_"+A.id+"_"+A.type,R=!M&&b[L];if(!R){var P=zl(A.type),j=h?oa.getClass(P.main,P.sub):Rr.getClass(P.sub);R=new j,R.init(v,_),b[L]=R,x.push(R),w.add(R.group)}A.__viewId=R.__id=L,R.__alive=!0,R.__model=A,R.group.__ecComponentInfo={mainType:A.mainType,index:A.componentIndex},!h&&m.prepareView(R,A,v,_)}for(var T=0;T<x.length;){var k=x[T];k.__alive?T++:(!h&&k.renderTask.dispose(),w.remove(k.group),k.dispose(v,_),x.splice(T,1),b[k.__id]===k&&delete b[k.__id],k.__id=k.group.__ecComponentInfo=null)}},Qb=function(d,h,v,m,x){var b=d._model;if(b.setUpdatePayload(v),!m){z([].concat(d._componentsViews).concat(d._chartsViews),k);return}var w={};w[m+"Id"]=v[m+"Id"],w[m+"Index"]=v[m+"Index"],w[m+"Name"]=v[m+"Name"];var _={mainType:m,query:w};x&&(_.subType=x);var T=v.excludeSeriesId,C;T!=null&&(C=He(),z(Ir(T),function(A){var M=An(A,null);M!=null&&C.set(M,!0)})),b&&b.eachComponent(_,function(A){var M=C&&C.get(A.id)!=null;if(!M)if(Sz(v))if(A instanceof Gr)v.type===bh&&!v.notBlur&&!A.get(["emphasis","disabled"])&&kve(A,v,d._api);else{var L=c5(A.mainType,A.componentIndex,v.name,d._api),R=L.focusSelf,P=L.dispatchers;v.type===bh&&R&&!v.notBlur&&XM(A.mainType,A.componentIndex,d._api),P&&z(P,function(j){v.type===bh?rc(j):ac(j)})}else ZM(v)&&A instanceof Gr&&(Mve(A,v,d._api),bz(A),Jo(d))},d),b&&b.eachComponent(_,function(A){var M=C&&C.get(A.id)!=null;M||k(d[m==="series"?"_chartsMap":"_componentsMap"][A.__viewId])},d);function k(A){A&&A.__alive&&A[h]&&A[h](A.__model,b,d._api,v)}},Ru={prepareAndUpdate:function(d){Bf(this),Ru.update.call(this,d,d&&{optionChanged:d.newOption!=null})},update:function(d,h){var v=this._model,m=this._api,x=this._zr,b=this._coordSysMgr,w=this._scheduler;if(v){v.setUpdatePayload(d),w.restoreData(v,d),w.performSeriesTasks(v),b.create(v,m),w.performDataProcessorTasks(v,d),Ik(this,v),b.update(v,m),a(v),w.performVisualTasks(v,d);var _=v.get("backgroundColor")||"transparent";x.setBackgroundColor(_);var T=v.get("darkMode");T!=null&&T!=="auto"&&x.setDarkMode(T),Ok(this,v,m,d,h),Vs.trigger("afterupdate",v,m)}},updateTransform:function(d){var h=this,v=this._model,m=this._api;if(v){v.setUpdatePayload(d);var x=[];v.eachComponent(function(w,_){if(w!=="series"){var T=h.getViewOfComponentModel(_);if(T&&T.__alive)if(T.updateTransform){var C=T.updateTransform(_,v,m,d);C&&C.update&&x.push(T)}else x.push(T)}});var b=He();v.eachSeries(function(w){var _=h._chartsMap[w.__viewId];if(_.updateTransform){var T=_.updateTransform(w,v,m,d);T&&T.update&&b.set(w.uid,1)}else b.set(w.uid,1)}),a(v),this._scheduler.performVisualTasks(v,d,{setDirty:!0,dirtyMap:b}),e1(this,v,m,d,{},b),Vs.trigger("afterupdate",v,m)}},updateView:function(d){var h=this._model;h&&(h.setUpdatePayload(d),Rr.markUpdateMethod(d,"updateView"),a(h),this._scheduler.performVisualTasks(h,d,{setDirty:!0}),Ok(this,h,this._api,d,{}),Vs.trigger("afterupdate",h,this._api))},updateVisual:function(d){var h=this,v=this._model;v&&(v.setUpdatePayload(d),v.eachSeries(function(m){m.getData().clearAllVisual()}),Rr.markUpdateMethod(d,"updateVisual"),a(v),this._scheduler.performVisualTasks(v,d,{visualType:"visual",setDirty:!0}),v.eachComponent(function(m,x){if(m!=="series"){var b=h.getViewOfComponentModel(x);b&&b.__alive&&b.updateVisual(x,v,h._api,d)}}),v.eachSeries(function(m){var x=h._chartsMap[m.__viewId];x.updateVisual(m,v,h._api,d)}),Vs.trigger("afterupdate",v,this._api))},updateLayout:function(d){Ru.update.call(this,d)}};function r(d,h,v,m,x){if(d._disposed){d.id;return}for(var b=d._model,w=d._coordSysMgr.getCoordinateSystems(),_,T=kp(b,v),C=0;C<w.length;C++){var k=w[C];if(k[h]&&(_=k[h](b,T,m,x))!=null)return _}}Jb=r,Ik=function(d,h){var v=d._chartsMap,m=d._scheduler;h.eachSeries(function(x){m.updateStreamModes(x,v[x.__viewId])})},jk=function(d,h){var v=this,m=this.getModel(),x=d.type,b=d.escapeConnect,w=xS[x],_=(w.update||"update").split(":"),T=_.pop(),C=_[0]!=null&&zl(_[0]);this[Cn]=!0,Fv(this);var k=[d],A=!1;d.batch&&(A=!0,k=Se(d.batch,function(O){return O=nt(ve({},O),d),O.batch=null,O}));var M=[],L,R=[],P=w.nonRefinedEventType,j=ZM(d),V=Sz(d);if(V&&mW(this._api),z(k,function(O){var U=w.action(O,m,v._api);if(w.refineEvent?R.push(U):L=U,L=L||ve({},O),L.type=P,M.push(L),V){var $=t5(d),K=$.queryOptionMap,q=$.mainTypeSpecified,H=q?K.keys()[0]:"series";Qb(v,T,O,H),Jo(v)}else j?(Qb(v,T,O,"series"),Jo(v)):C&&Qb(v,T,O,C.main,C.sub)}),T!=="none"&&!V&&!j&&!C)try{this[ri]?(Bf(this),Ru.update.call(this,d),this[ri]=null):Ru[T].call(this,d)}catch(O){throw this[Cn]=!1,O}if(A?L={type:P,escapeConnect:b,batch:M}:L=M[0],this[Cn]=!1,!h){var I=void 0;if(w.refineEvent){var F=w.refineEvent(R,d,m,this._api).eventContent;Pi(it(F)),I=nt({type:w.refinedEventType},F),I.fromAction=d.type,I.fromActionPayload=d,I.escapeConnect=!0}var G=this._messageCenter;G.trigger(L.type,L),I&&G.trigger(I.type,I)}},Bv=function(d){for(var h=this._pendingActions;h.length;){var v=h.shift();jk.call(this,v,d)}},Vv=function(d){!d&&this.trigger("updated")},PB=function(d,h){d.on("rendered",function(v){h.trigger("rendered",v),d.animation.isFinished()&&!h[ri]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},IB=function(d,h){d.on("mouseover",function(v){var m=v.target,x=uh(m,ly);x&&(Nve(x,v,h._api),Jo(h))}).on("mouseout",function(v){var m=v.target,x=uh(m,ly);x&&(Ave(x,v,h._api),Jo(h))}).on("click",function(v){var m=v.target,x=uh(m,function(_){return dt(_).dataIndex!=null},!0);if(x){var b=x.selected?"unselect":"select",w=dt(x);h._api.dispatchAction({type:b,dataType:w.dataType,dataIndexInside:w.dataIndex,seriesIndex:w.seriesIndex,isFromClick:!0})}})};function a(d){d.clearColorPalette(),d.eachSeries(function(h){h.clearColorPalette()})}function n(d){var h=[],v=[],m=!1;if(d.eachComponent(function(_,T){var C=T.get("zlevel")||0,k=T.get("z")||0,A=T.getZLevelKey();m=m||!!A,(_==="series"?v:h).push({zlevel:C,z:k,idx:T.componentIndex,type:_,key:A})}),m){var x=h.concat(v),b,w;cw(x,function(_,T){return _.zlevel===T.zlevel?_.z-T.z:_.zlevel-T.zlevel}),z(x,function(_){var T=d.getComponent(_.type,_.idx),C=_.zlevel,k=_.key;b!=null&&(C=Math.max(b,C)),k?(C===b&&k!==w&&C++,w=k):w&&(C===b&&C++,w=""),b=C,T.setZLevel(C)})}}Ok=function(d,h,v,m,x){n(h),jB(d,h,v,m,x),z(d._chartsViews,function(b){b.__alive=!1}),e1(d,h,v,m,x),z(d._chartsViews,function(b){b.__alive||b.remove(h,v)})},jB=function(d,h,v,m,x,b){z(b||d._componentsViews,function(w){var _=w.__model;u(_,w),w.render(_,h,v,m),l(_,w),c(_,w)})},e1=function(d,h,v,m,x,b){var w=d._scheduler;x=ve(x||{},{updatedSeries:h.getSeries()}),Vs.trigger("series:beforeupdate",h,v,x);var _=!1;h.eachSeries(function(T){var C=d._chartsMap[T.__viewId];C.__alive=!0;var k=C.renderTask;w.updatePayload(k,m),u(T,C),b&&b.get(T.uid)&&k.dirty(),k.perform(w.getPerformArgs(k))&&(_=!0),C.group.silent=!!T.get("silent"),s(T,C),bz(T)}),w.unfinished=_||w.unfinished,Vs.trigger("series:layoutlabels",h,v,x),Vs.trigger("series:transition",h,v,x),h.eachSeries(function(T){var C=d._chartsMap[T.__viewId];l(T,C),c(T,C)}),o(d,h),Vs.trigger("series:afterupdate",h,v,x)},Jo=function(d){d[Ek]=!0,d.getZr().wakeUp()},Fv=function(d){d[Kb]=(d[Kb]+1)%1e3},zB=function(d){d[Ek]&&(d.getZr().storage.traverse(function(h){Np(h)||i(h)}),d[Ek]=!1)};function i(d){for(var h=[],v=d.currentStates,m=0;m<v.length;m++){var x=v[m];x==="emphasis"||x==="blur"||x==="select"||h.push(x)}d.selected&&d.states.select&&h.push("select"),d.hoverState===V_&&d.states.emphasis?h.push("emphasis"):d.hoverState===$y&&d.states.blur&&h.push("blur"),d.useStates(h)}function o(d,h){var v=d._zr,m=v.storage,x=0;m.traverse(function(b){b.isGroup||x++}),x>h.get("hoverLayerThreshold")&&!Ut.node&&!Ut.worker&&h.eachSeries(function(b){if(!b.preventUsingHoverLayer){var w=d._chartsMap[b.__viewId];w.__alive&&w.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function s(d,h){var v=d.get("blendMode")||null;h.eachRendered(function(m){m.isGroup||(m.style.blend=v)})}function l(d,h){if(!d.preventAutoZ){var v=Ph(d);h.eachRendered(function(m){return W_(m,v.z,v.zlevel),!0})}}function u(d,h){h.eachRendered(function(v){if(!Np(v)){var m=v.getTextContent(),x=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),m&&m.stateTransition&&(m.stateTransition=null),x&&x.stateTransition&&(x.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function c(d,h){var v=d.getModel("stateAnimation"),m=d.isAnimationEnabled(),x=v.get("duration"),b=x>0?{duration:x,delay:v.get("delay"),easing:v.get("easing")}:null;h.eachRendered(function(w){if(w.states&&w.states.emphasis){if(Np(w))return;if(w instanceof zt&&Ive(w),w.__dirty){var _=w.prevStates;_&&w.useStates(_)}if(m){w.stateTransition=b;var T=w.getTextContent(),C=w.getTextGuideLine();T&&(T.stateTransition=b),C&&(C.stateTransition=b)}w.__dirty&&i(w)}})}OB=function(d){return new((function(h){se(v,h);function v(){return h!==null&&h.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return d._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(m){for(;m;){var x=m.__ecComponentInfo;if(x!=null)return d._model.getComponent(x.mainType,x.index);m=m.parent}},v.prototype.enterEmphasis=function(m,x){rc(m,x),Jo(d)},v.prototype.leaveEmphasis=function(m,x){ac(m,x),Jo(d)},v.prototype.enterBlur=function(m){fW(m),Jo(d)},v.prototype.leaveBlur=function(m){u5(m),Jo(d)},v.prototype.enterSelect=function(m){hW(m),Jo(d)},v.prototype.leaveSelect=function(m){vW(m),Jo(d)},v.prototype.getModel=function(){return d.getModel()},v.prototype.getViewOfComponentModel=function(m){return d.getViewOfComponentModel(m)},v.prototype.getViewOfSeriesModel=function(m){return d.getViewOfSeriesModel(m)},v.prototype.getMainProcessVersion=function(){return d[Kb]},v})(pY))(d)},dX=function(d){function h(v,m){for(var x=0;x<v.length;x++){var b=v[x];b[Rk]=m}}z(mD,function(v,m){d._messageCenter.on(m,function(x){if(BB[d.group]&&d[Rk]!==RB){if(x&&x.escapeConnect)return;var b=d.makeActionFromEvent(x),w=[];z(V0,function(_){_!==d&&_.group===d.group&&w.push(_)}),h(w,RB),z(w,function(_){_[Rk]!==b0e&&_.dispatchAction(b)}),h(w,w0e)}})})}})(),e})(ws),B5=fX.prototype;B5.on=oX("on");B5.off=oX("off");B5.one=function(t,e,r){var a=this;function n(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];e&&e.apply&&e.apply(this,i),a.off(t,n)}this.on.call(this,t,n,r)};var S0e=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var xS={},mD={},gD={},yD=[],xD=[],bS=[],hX={},bD={},V0={},BB={},_0e=+new Date-0,V5="_echarts_instance_";function T0e(t,e,r){{var a=C0e(t);if(a)return a}var n=new fX(t,e,r);return n.id="ec_"+_0e++,V0[n.id]=n,q$(t,V5,n.id),dX(n),Vs.trigger("afterinit",n),n}function C0e(t){return V0[She(t,V5)]}function vX(t,e){hX[t]=e}function pX(t){St(xD,t)<0&&xD.push(t)}function mX(t,e){G5(yD,t,e,f0e)}function k0e(t){F5("afterinit",t)}function N0e(t){F5("afterupdate",t)}function F5(t,e){Vs.on(t,e)}function nu(t,e,r){var a,n,i,o,s;Ke(e)&&(r=e,e=""),it(t)?(a=t.type,n=t.event,o=t.update,s=t.publishNonRefinedEvent,r||(r=t.action),i=t.refineEvent):(a=t,n=e);function l(c){return c.toLowerCase()}n=l(n||a);var u=i?l(a):n;xS[a]||(Pi(EB.test(a)&&EB.test(n)),i&&Pi(n!==a),xS[a]={actionType:a,refinedEventType:n,nonRefinedEventType:u,update:o,action:r,refineEvent:i},gD[n]=1,i&&s&&(gD[u]=1),mD[u]=a)}function A0e(t,e){Ky.register(t,e)}function M0e(t,e){G5(bS,t,e,aX,"layout")}function qh(t,e){G5(bS,t,e,nX,"visual")}var VB=[];function G5(t,e,r,a,n){if((Ke(e)||it(e))&&(r=e,e=a),!(St(VB,r)>=0)){VB.push(r);var i=GY.wrapStageHandler(r,n);i.__prio=e,i.__raw=r,t.push(i)}}function gX(t,e){bD[t]=e}function D0e(t,e,r){var a=i0e("registerMap");a&&a(t,e,r)}var L0e=Fme;qh(z5,hge);qh(J_,vge);qh(J_,pge);qh(z5,Age);qh(J_,Mge);qh(iX,a0e);pX(gY);mX(c0e,wme);gX("default",mge);nu({type:bh,event:bh,update:bh},en);nu({type:pw,event:pw,update:pw},en);nu({type:sS,event:s5,update:sS,action:en,refineEvent:H5,publishNonRefinedEvent:!0});nu({type:WM,event:s5,update:WM,action:en,refineEvent:H5,publishNonRefinedEvent:!0});nu({type:lS,event:s5,update:lS,action:en,refineEvent:H5,publishNonRefinedEvent:!0});function H5(t,e,r,a){return{eventContent:{selected:Dve(r),isFromClick:e.isFromClick||!1}}}vX("default",{});vX("dark",WY);var FB=[],E0e={registerPreprocessor:pX,registerProcessor:mX,registerPostInit:k0e,registerPostUpdate:N0e,registerUpdateLifecycle:F5,registerAction:nu,registerCoordinateSystem:A0e,registerLayout:M0e,registerVisual:qh,registerTransform:L0e,registerLoading:gX,registerMap:D0e,registerImpl:n0e,PRIORITY:x0e,ComponentModel:Gt,ComponentView:oa,SeriesModel:Gr,ChartView:Rr,registerComponentModel:function(t){Gt.registerClass(t)},registerComponentView:function(t){oa.registerClass(t)},registerSeriesModel:function(t){Gr.registerClass(t)},registerChartView:function(t){Rr.registerClass(t)},registerCustomSeries:function(t,e){o0e(t,e)},registerSubTypeDefaulter:function(t,e){Gt.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Zfe(t,e)}};function Nt(t){if(be(t)){z(t,function(e){Nt(e)});return}St(FB,t)>=0||(FB.push(t),Ke(t)&&(t={install:t}),t.install(E0e))}function jg(t){return t==null?0:t.length||1}function GB(t){return t}var nc=(function(){function t(e,r,a,n,i,o){this._old=e,this._new=r,this._oldKeyGetter=a||GB,this._newKeyGetter=n||GB,this.context=i,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,a={},n=new Array(e.length),i=new Array(r.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(r,a,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=n[o],l=a[s],u=jg(l);if(u>1){var c=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(c,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,a)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,a={},n={},i=[],o=[];this._initIndexMap(e,a,i,"_oldKeyGetter"),this._initIndexMap(r,n,o,"_newKeyGetter");for(var s=0;s<i.length;s++){var l=i[s],u=a[l],c=n[l],d=jg(u),h=jg(c);if(d>1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),n[l]=null;else if(d===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),n[l]=null;else if(d===1&&h===1)this._update&&this._update(c,u),n[l]=null;else if(d>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),n[l]=null;else if(d>1)for(var v=0;v<d;v++)this._remove&&this._remove(u[v]);else this._remove&&this._remove(u)}this._performRestAdd(o,n)},t.prototype._performRestAdd=function(e,r){for(var a=0;a<e.length;a++){var n=e[a],i=r[n],o=jg(i);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(i[s]);else o===1&&this._add&&this._add(i);r[n]=null}},t.prototype._initIndexMap=function(e,r,a,n){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[n](e[o],o);if(i||(a[o]=s),!!r){var l=r[s],u=jg(l);u===0?(r[s]=o,i&&a.push(s)):u===1?r[s]=[l,o]:l.push(o)}}},t})(),R0e=(function(){function t(e,r){this._encode=e,this._schema=r}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t})();function P0e(t,e){var r={},a=r.encode={},n=He(),i=[],o=[],s={};z(t.dimensions,function(h){var v=t.getDimensionInfo(h),m=v.coordDim;if(m){var x=v.coordDimIndex;zk(a,m)[x]=h,v.isExtraCoord||(n.set(m,1),I0e(v.type)&&(i[0]=h),zk(s,m)[x]=t.getDimensionIndex(v.name)),v.defaultTooltip&&o.push(h)}lY.each(function(b,w){var _=zk(a,w),T=v.otherDims[w];T!=null&&T!==!1&&(_[T]=v.name)})});var l=[],u={};n.each(function(h,v){var m=a[v];u[v]=m[0],l=l.concat(m)}),r.dataDimsOnCoord=l,r.dataDimIndicesOnCoord=Se(l,function(h){return t.getDimensionInfo(h).storeDimIndex}),r.encodeFirstDimNotExtra=u;var c=a.label;c&&c.length&&(i=c.slice());var d=a.tooltip;return d&&d.length?o=d.slice():o.length||(o=i.slice()),a.defaultedLabel=i,a.defaultedTooltip=o,r.userOutput=new R0e(s,e),r}function zk(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function wS(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function I0e(t){return!(t==="ordinal"||t==="time")}var Sw=(function(){function t(e){this.otherDims={},e!=null&&ve(this,e)}return t})(),j0e=jt(),O0e={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},yX=(function(){function t(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=wX(this.source)))},t.prototype.getSourceDimensionIndex=function(e){return $e(this._dimNameMap.get(e),-1)},t.prototype.getSourceDimension=function(e){var r=this.source.dimensionsDefine;if(r)return r[e]},t.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,r=xY(this.source),a=!SX(e),n="",i=[],o=0,s=0;o<e;o++){var l=void 0,u=void 0,c=void 0,d=this.dimensions[s];if(d&&d.storeDimIndex===o)l=r?d.name:null,u=d.type,c=d.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(l=r?h.name:null,u=h.type)}i.push({property:l,type:u,ordinalMeta:c}),r&&l!=null&&(!d||!d.isCalculationCoord)&&(n+=a?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),n+="$",n+=O0e[u]||"f",c&&(n+=c.uid),n+="$"}var v=this.source,m=[v.seriesLayoutBy,v.startIndex,n].join("$$");return{dimensions:i,hash:m}},t.prototype.makeOutputDimensionNames=function(){for(var e=[],r=0,a=0;r<this._fullDimCount;r++){var n=void 0,i=this.dimensions[a];if(i&&i.storeDimIndex===r)i.isCalculationCoord||(n=i.name),a++;else{var o=this.getSourceDimension(r);o&&(n=o.name)}e.push(n)}return e},t.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t})();function xX(t){return t instanceof yX}function bX(t){for(var e=He(),r=0;r<(t||[]).length;r++){var a=t[r],n=it(a)?a.name:a;n!=null&&e.get(n)==null&&e.set(n,r)}return e}function wX(t){var e=j0e(t);return e.dimNameMap||(e.dimNameMap=bX(t.dimensionsDefine))}function SX(t){return t>30}var Og=it,Wc=Se,z0e=typeof Int32Array>"u"?Array:Int32Array,B0e="e\0\0",HB=-1,V0e=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],F0e=["_approximateExtent"],UB,t1,zg,Bg,Bk,Vg,Vk,Zi=(function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var a,n=!1;xX(e)?(a=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,a=e),a=a||["x","y"];for(var i={},o=[],s={},l=!1,u={},c=0;c<a.length;c++){var d=a[c],h=Ie(d)?new Sw({name:d}):d instanceof Sw?d:new Sw(d),v=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=v,h.coordDimIndex=0);var m=h.otherDims=h.otherDims||{};o.push(v),i[v]=h,u[v]!=null&&(l=!0),h.createInvertedIndices&&(s[v]=[]);var x=c;qt(h.storeDimIndex)&&(x=h.storeDimIndex),m.itemName===0&&(this._nameDimIdx=x),m.itemId===0&&(this._idDimIdx=x),n&&(h.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(l),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var b=this._dimIdxToName=He();z(o,function(w){b.set(i[w].storeDimIndex,w)})}}return t.prototype.getDimension=function(e){var r=this._recognizeDimIndex(e);if(r==null)return e;if(r=e,!this._dimOmitted)return this.dimensions[r];var a=this._dimIdxToName.get(r);if(a!=null)return a;var n=this._schema.getSourceDimension(r);if(n)return n.name},t.prototype.getDimensionIndex=function(e){var r=this._recognizeDimIndex(e);if(r!=null)return r;if(e==null)return-1;var a=this._getDimInfo(e);return a?a.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},t.prototype._recognizeDimIndex=function(e){if(qt(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},t.prototype._getStoreDimIndex=function(e){var r=this.getDimensionIndex(e);return r},t.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},t.prototype._initGetDimensionInfo=function(e){var r=this._dimInfos;this._getDimInfo=e?function(a){return r.hasOwnProperty(a)?r[a]:void 0}:function(a){return r[a]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(e,r){var a=this._dimSummary;if(r==null)return a.encodeFirstDimNotExtra[e];var n=a.encode[e];return n?n[r]:null},t.prototype.mapDimensionsAll=function(e){var r=this._dimSummary,a=r.encode[e];return(a||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(e,r,a){var n=this,i;if(e instanceof uD&&(i=e),!i){var o=this.dimensions,s=L5(e)||Ri(e)?new bY(e,o.length):e;i=new uD;var l=Wc(o,function(u){return{type:n._dimInfos[u].type,property:u}});i.initData(s,l,a)}this._store=i,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=P0e(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(e){var r=this._store.appendData(e);this._doInit(r[0],r[1])},t.prototype.appendValues=function(e,r){var a=this._store.appendValues(e,r&&r.length),n=a.start,i=a.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=n;s<i;s++){var l=s-n;this._nameList[s]=r[l],o&&Vk(this,s)}},t.prototype._updateOrdinalMeta=function(){for(var e=this._store,r=this.dimensions,a=0;a<r.length;a++){var n=this._dimInfos[r[a]];n.ordinalMeta&&e.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==Nd&&!e.fillStorage},t.prototype._doInit=function(e,r){if(!(e>=r)){var a=this._store,n=a.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===zo;if(l&&!n.pure)for(var u=[],c=e;c<r;c++){var d=n.getItem(c,u);if(!this.hasItemOption&&uhe(d)&&(this.hasItemOption=!0),d){var h=d.name;i[c]==null&&h!=null&&(i[c]=An(h,null));var v=d.id;o[c]==null&&v!=null&&(o[c]=An(v,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<r;c++)Vk(this,c);UB(this)}},t.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.setApproximateExtent=function(e,r){r=this.getDimension(r),this._approximateExtent[r]=e.slice()},t.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},t.prototype.setCalculationInfo=function(e,r){Og(e)?ve(this._calculationInfo,e):this._calculationInfo[e]=r},t.prototype.getName=function(e){var r=this.getRawIndex(e),a=this._nameList[r];return a==null&&this._nameDimIdx!=null&&(a=zg(this,this._nameDimIdx,r)),a==null&&(a=""),a},t.prototype._getCategory=function(e,r){var a=this._store.get(e,r),n=this._store.getOrdinalMeta(e);return n?n.categories[a]:a},t.prototype.getId=function(e){return t1(this,this.getRawIndex(e))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(e,r){var a=this._store,n=this._dimInfos[e];if(n)return a.get(n.storeDimIndex,r)},t.prototype.getByRawIndex=function(e,r){var a=this._store,n=this._dimInfos[e];if(n)return a.getByRawIndex(n.storeDimIndex,r)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},t.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},t.prototype.getValues=function(e,r){var a=this,n=this._store;return be(e)?n.getValues(Wc(e,function(i){return a._getStoreDimIndex(i)}),r):n.getValues(e)},t.prototype.hasValue=function(e){for(var r=this._dimSummary.dataDimIndicesOnCoord,a=0,n=r.length;a<n;a++)if(isNaN(this._store.get(r[a],e)))return!1;return!0},t.prototype.indexOfName=function(e){for(var r=0,a=this._store.count();r<a;r++)if(this.getName(r)===e)return r;return-1},t.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},t.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},t.prototype.rawIndexOf=function(e,r){var a=e&&this._invertedIndicesMap[e],n=a&&a[r];return n==null||isNaN(n)?HB:n},t.prototype.each=function(e,r,a){Ke(e)&&(a=r,r=e,e=[]);var n=a||this,i=Wc(Bg(e),this._getStoreDimIndex,this);this._store.each(i,n?je(r,n):r)},t.prototype.filterSelf=function(e,r,a){Ke(e)&&(a=r,r=e,e=[]);var n=a||this,i=Wc(Bg(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,n?je(r,n):r),this},t.prototype.selectRange=function(e){var r=this,a={},n=Wt(e);return z(n,function(i){var o=r._getStoreDimIndex(i);a[o]=e[i]}),this._store=this._store.selectRange(a),this},t.prototype.mapArray=function(e,r,a){Ke(e)&&(a=r,r=e,e=[]),a=a||this;var n=[];return this.each(e,function(){n.push(r&&r.apply(this,arguments))},a),n},t.prototype.map=function(e,r,a,n){var i=a||n||this,o=Wc(Bg(e),this._getStoreDimIndex,this),s=Vg(this);return s._store=this._store.map(o,i?je(r,i):r),s},t.prototype.modify=function(e,r,a,n){var i=a||n||this,o=Wc(Bg(e),this._getStoreDimIndex,this);this._store.modify(o,i?je(r,i):r)},t.prototype.downSample=function(e,r,a,n){var i=Vg(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),r,a,n),i},t.prototype.minmaxDownSample=function(e,r){var a=Vg(this);return a._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),r),a},t.prototype.lttbDownSample=function(e,r){var a=Vg(this);return a._store=this._store.lttbDownSample(this._getStoreDimIndex(e),r),a},t.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},t.prototype.getItemModel=function(e){var r=this.hostModel,a=this.getRawDataItem(e);return new $t(a,r,r&&r.ecModel)},t.prototype.diff=function(e){var r=this;return new nc(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(a){return t1(e,a)},function(a){return t1(r,a)})},t.prototype.getVisual=function(e){var r=this._visual;return r&&r[e]},t.prototype.setVisual=function(e,r){this._visual=this._visual||{},Og(e)?ve(this._visual,e):this._visual[e]=r},t.prototype.getItemVisual=function(e,r){var a=this._itemVisuals[e],n=a&&a[r];return n??this.getVisual(r)},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(e,r){var a=this._itemVisuals,n=a[e];n||(n=a[e]={});var i=n[r];return i==null&&(i=this.getVisual(r),be(i)?i=i.slice():Og(i)&&(i=ve({},i)),n[r]=i),i},t.prototype.setItemVisual=function(e,r,a){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,Og(r)?ve(n,r):n[r]=a},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){Og(e)?ve(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,a){this._itemLayouts[e]=a?ve(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var a=this.hostModel&&this.hostModel.seriesIndex;$M(a,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){z(this._graphicEls,function(a,n){a&&e&&e.call(r,a,n)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:Wc(this.dimensions,this._getDimInfo,this),this.hostModel)),Bk(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var a=this[e];Ke(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=a.apply(this,arguments);return r.apply(this,[n].concat(WE(arguments)))})},t.internalField=(function(){UB=function(e){var r=e._invertedIndicesMap;z(r,function(a,n){var i=e._dimInfos[n],o=i.ordinalMeta,s=e._store;if(o){a=r[n]=new z0e(o.categories.length);for(var l=0;l<a.length;l++)a[l]=HB;for(var l=0;l<s.count();l++)a[s.get(i.storeDimIndex,l)]=l}})},zg=function(e,r,a){return An(e._getCategory(r,a),null)},t1=function(e,r){var a=e._idList[r];return a==null&&e._idDimIdx!=null&&(a=zg(e,e._idDimIdx,r)),a==null&&(a=B0e+r),a},Bg=function(e){return be(e)||(e=e!=null?[e]:[]),e},Vg=function(e){var r=new t(e._schema?e._schema:Wc(e.dimensions,e._getDimInfo,e),e.hostModel);return Bk(r,e),r},Bk=function(e,r){z(V0e.concat(r.__wrappedMethods||[]),function(a){r.hasOwnProperty(a)&&(e[a]=r[a])}),e.__wrappedMethods=r.__wrappedMethods,z(F0e,function(a){e[a]=et(r[a])}),e._calculationInfo=ve({},r._calculationInfo)},Vk=function(e,r){var a=e._nameList,n=e._idList,i=e._nameDimIdx,o=e._idDimIdx,s=a[r],l=n[r];if(s==null&&i!=null&&(a[r]=s=zg(e,i,r)),l==null&&o!=null&&(n[r]=l=zg(e,o,r)),l==null&&s!=null){var u=e._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),n[r]=l}}})(),t})();function ex(t,e){L5(t)||(t=E5(t)),e=e||{};var r=e.coordDimensions||[],a=e.dimensionsDefine||t.dimensionsDefine||[],n=He(),i=[],o=H0e(t,r,a,e.dimensionsCount),s=e.canOmitUnusedDimensions&&SX(o),l=a===t.dimensionsDefine,u=l?wX(t):bX(a),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var d=He(c),h=new AY(o),v=0;v<h.length;v++)h[v]=-1;function m(R){var P=h[R];if(P<0){var j=a[R],V=it(j)?j:{name:j},I=new Sw,F=V.name;F!=null&&u.get(F)!=null&&(I.name=I.displayName=F),V.type!=null&&(I.type=V.type),V.displayName!=null&&(I.displayName=V.displayName);var G=i.length;return h[R]=G,I.storeDimIndex=R,i.push(I),I}return i[P]}if(!s)for(var v=0;v<o;v++)m(v);d.each(function(R,P){var j=Ir(R).slice();if(j.length===1&&!Ie(j[0])&&j[0]<0){d.set(P,!1);return}var V=d.set(P,[]);z(j,function(I,F){var G=Ie(I)?u.get(I):I;G!=null&&G<o&&(V[F]=G,b(m(G),P,F))})});var x=0;z(r,function(R){var P,j,V,I;if(Ie(R))P=R,I={};else{I=R,P=I.name;var F=I.ordinalMeta;I.ordinalMeta=null,I=ve({},I),I.ordinalMeta=F,j=I.dimsDef,V=I.otherDims,I.name=I.coordDim=I.coordDimIndex=I.dimsDef=I.otherDims=null}var G=d.get(P);if(G!==!1){if(G=Ir(G),!G.length)for(var O=0;O<(j&&j.length||1);O++){for(;x<o&&m(x).coordDim!=null;)x++;x<o&&G.push(x++)}z(G,function(U,$){var K=m(U);if(l&&I.type!=null&&(K.type=I.type),b(nt(K,I),P,$),K.name==null&&j){var q=j[$];!it(q)&&(q={name:q}),K.name=K.displayName=q.name,K.defaultTooltip=q.defaultTooltip}V&&nt(K.otherDims,V)})}});function b(R,P,j){lY.get(P)!=null?R.otherDims[P]=j:(R.coordDim=P,R.coordDimIndex=j,n.set(P,!0))}var w=e.generateCoord,_=e.generateCoordCount,T=_!=null;_=w?_||1:0;var C=w||"value";function k(R){R.name==null&&(R.name=R.coordDim)}if(s)z(i,function(R){k(R)}),i.sort(function(R,P){return R.storeDimIndex-P.storeDimIndex});else for(var A=0;A<o;A++){var M=m(A),L=M.coordDim;L==null&&(M.coordDim=U0e(C,n,T),M.coordDimIndex=0,(!w||_<=0)&&(M.isExtraCoord=!0),_--),k(M),M.type==null&&(fY(t,A)===pi.Must||M.isExtraCoord&&(M.otherDims.itemName!=null||M.otherDims.seriesName!=null))&&(M.type="ordinal")}return G0e(i),new yX({source:t,dimensions:i,fullDimensionCount:o,dimensionOmitted:s})}function G0e(t){for(var e=He(),r=0;r<t.length;r++){var a=t[r],n=a.name,i=e.get(n)||0;i>0&&(a.name=n+(i-1)),i++,e.set(n,i)}}function H0e(t,e,r,a){var n=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,a||0);return z(e,function(i){var o;it(i)&&(o=i.dimsDef)&&(n=Math.max(n,o.length))}),n}function U0e(t,e,r){if(r||e.hasKey(t)){for(var a=0;e.hasKey(t+a);)a++;t+=a}return e.set(t,!0),t}var $0e=(function(){function t(e){this.coordSysDims=[],this.axisMap=He(),this.categoryAxisMap=He(),this.coordSysName=e}return t})();function W0e(t){var e=t.get("coordinateSystem"),r=new $0e(e),a=Y0e[e];if(a)return a(t,r,r.axisMap,r.categoryAxisMap),r}var Y0e={cartesian2d:function(t,e,r,a){var n=t.getReferringComponents("xAxis",Ia).models[0],i=t.getReferringComponents("yAxis",Ia).models[0];e.coordSysDims=["x","y"],r.set("x",n),r.set("y",i),Gv(n)&&(a.set("x",n),e.firstCategoryDimIndex=0),Gv(i)&&(a.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,a){var n=t.getReferringComponents("singleAxis",Ia).models[0];e.coordSysDims=["single"],r.set("single",n),Gv(n)&&(a.set("single",n),e.firstCategoryDimIndex=0)},polar:function(t,e,r,a){var n=t.getReferringComponents("polar",Ia).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],r.set("radius",i),r.set("angle",o),Gv(i)&&(a.set("radius",i),e.firstCategoryDimIndex=0),Gv(o)&&(a.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,a){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,a){var n=t.ecModel,i=n.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();z(i.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),c=o[l];r.set(c,u),Gv(u)&&(a.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(t,e,r,a){var n=t.getReferringComponents("matrix",Ia).models[0];e.coordSysDims=["x","y"];var i=n.getDimensionModel("x"),o=n.getDimensionModel("y");r.set("x",i),r.set("y",o),a.set("x",i),a.set("y",o)}};function Gv(t){return t.get("type")==="category"}function X0e(t,e,r){r=r||{};var a=r.byIndex,n=r.stackedCoordDimension,i,o,s;q0e(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,c,d,h;if(z(i,function(_,T){Ie(_)&&(i[T]=_={name:_}),l&&!_.isExtraCoord&&(!a&&!u&&_.ordinalMeta&&(u=_),!c&&_.type!=="ordinal"&&_.type!=="time"&&(!n||n===_.coordDim)&&(c=_))}),c&&!a&&!u&&(a=!0),c){d="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var v=c.coordDim,m=c.type,x=0;z(i,function(_){_.coordDim===v&&x++});var b={name:d,coordDim:v,coordDimIndex:x,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},w={name:h,coordDim:h,coordDimIndex:x+1,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(b.storeDimIndex=s.ensureCalculationDimension(h,m),w.storeDimIndex=s.ensureCalculationDimension(d,m)),o.appendCalculationDimension(b),o.appendCalculationDimension(w)):(i.push(b),i.push(w))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:h,stackResultDimension:d}}function q0e(t){return!xX(t.schema)}function Pd(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function _X(t,e){return Pd(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Z0e(t,e){var r=t.get("coordinateSystem"),a=Ky.get(r),n;return e&&e.coordSysDims&&(n=Se(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=wS(l)}return o})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function K0e(t,e,r){var a,n;return r&&z(t,function(i,o){var s=i.coordDim,l=r.categoryAxisMap.get(s);l&&(a==null&&(a=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&a!=null&&(t[a].otherDims.itemName=0),a}function cc(t,e,r){r=r||{};var a=e.getSourceManager(),n,i=!1;t?(i=!0,n=E5(t)):(n=a.getSource(),i=n.sourceFormat===zo);var o=W0e(e),s=Z0e(e,o),l=r.useEncodeDefaulter,u=Ke(l)?l:l?wt(dY,s,e):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},d=ex(n,c),h=K0e(d.dimensions,r.createInvertedIndices,o),v=i?null:a.getSharedDataStore(d),m=X0e(e,{schema:d,store:v}),x=new Zi(d,e);x.setCalculationInfo(m);var b=h!=null&&Q0e(n)?function(w,_,T,C){return C===h?T:this.defaultDimValueGetter(w,_,T,C)}:null;return x.hasItemOption=!1,x.initData(i?n:v,null,b),x}function Q0e(t){if(t.sourceFormat===zo){var e=J0e(t.data||[]);return!be(pm(e))}}function J0e(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}function wD(t){return t.type==="interval"||t.type==="log"}function eye(t,e,r,a,n){var i={},o=i.interval=V$(e/r);a!=null&&o<a&&(o=i.interval=a),n!=null&&o>n&&(o=i.interval=n);var s=i.intervalPrecision=my(o),l=i.niceTickExtent=[dn(Math.ceil(t[0]/o)*o,s),dn(Math.floor(t[1]/o)*o,s)];return tye(l,t),i}function Fk(t){var e=Math.pow(10,JE(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,dn(r*e)}function my(t){return Ol(t)+2}function $B(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function tye(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),$B(t,0,e),$B(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function U5(t,e){return t>=e[0]&&t<=e[1]}var rye=(function(){function t(){this.normalize=WB,this.scale=YB}return t.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=je(e.normalize,e),this.scale=je(e.scale,e)):(this.normalize=WB,this.scale=YB)},t})();function WB(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function YB(t,e){return t*(e[1]-e[0])+e[0]}function SD(t,e,r){var a=Math.log(t);return[Math.log(r?e[0]:Math.max(0,e[0]))/a,Math.log(r?e[1]:Math.max(0,e[1]))/a]}var Wd=(function(){function t(e){this._calculator=new rye,this._setting=e||{},this._extent=[1/0,-1/0];var r=hn();r&&(this._brkCtx=r.createScaleBreakContext(),this._brkCtx.update(this._extent))}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype._innerUnionExtent=function(e){var r=this._extent;this._innerSetExtent(e[0]<r[0]?e[0]:r[0],e[1]>r[1]?e[1]:r[1])},t.prototype.unionExtentFromData=function(e,r){this._innerUnionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){this._innerSetExtent(e,r)},t.prototype._innerSetExtent=function(e,r){var a=this._extent;isNaN(e)||(a[0]=e),isNaN(r)||(a[1]=r),this._brkCtx&&this._brkCtx.update(a)},t.prototype.setBreaksFromOption=function(e){var r=hn();r&&this._innerSetBreak(r.parseAxisBreakOption(e,je(this.parse,this)))},t.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},t.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},t.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t})();P_(Wd);var aye=0,gy=(function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++aye,this._onCollect=e.onCollect}return t.createByAxisModel=function(e){var r=e.option,a=r.data,n=a&&Se(a,nye);return new t({categories:n,needCollect:!n,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,a=this._needCollect;if(!Ie(e)&&!a)return e;if(a&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,this._onCollect&&this._onCollect(e,r),r;var n=this._getOrCreateMap();return r=n.get(e),r==null&&(a?(r=this.categories.length,this.categories[r]=e,n.set(e,r),this._onCollect&&this._onCollect(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=He(this.categories))},t})();function nye(t){return it(t)&&t.value!=null?t.value:t+""}var Wp=(function(t){se(e,t);function e(r){var a=t.call(this,r)||this;a.type="ordinal";var n=a.getSetting("ordinalMeta");return n||(n=new gy({})),be(n)&&(n=new gy({categories:Se(n,function(i){return it(i)?i.value:i})})),a._ordinalMeta=n,a._extent=a.getSetting("extent")||[0,n.categories.length-1],a}return e.prototype.parse=function(r){return r==null?NaN:Ie(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return U5(r,this._extent)&&r>=0&&r<this._ordinalMeta.categories.length},e.prototype.normalize=function(r){return r=this._getTickNumber(r),this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return r=Math.round(this._calculator.scale(r,this._extent)),this.getRawOrdinalNumber(r)},e.prototype.getTicks=function(){for(var r=[],a=this._extent,n=a[0];n<=a[1];)r.push({value:n}),n++;return r},e.prototype.getMinorTicks=function(r){},e.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var a=r.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,a.length);o<l;++o){var u=a[o];n[o]=u,i[u]=o}for(var c=0;o<s;++o){for(;i[c]!=null;)c++;n.push(c),i[c]=o}},e.prototype._getTickNumber=function(r){var a=this._ticksByOrdinalNumber;return a&&r>=0&&r<a.length?a[r]:r},e.prototype.getRawOrdinalNumber=function(r){var a=this._ordinalNumbersByTick;return a&&r>=0&&r<a.length?a[r]:r},e.prototype.getLabel=function(r){if(!this.isBlank()){var a=this.getRawOrdinalNumber(r.value),n=this._ordinalMeta.categories[a];return n==null?"":n+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e})(Wd);Wd.registerClass(Wp);var Yc=dn,ic=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},e.prototype.contain=function(r){return U5(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=my(r)},e.prototype.getTicks=function(r){r=r||{};var a=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=hn(),l=[];if(!a)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;n[0]<i[0]&&(r.expandToNicedExtent?l.push({value:Yc(i[0]-a,o)}):l.push({value:n[0]}));for(var c=function(m,x){return Math.round((x-m)/a)},d=i[0];d<=i[1];){if(l.push({value:d}),d=Yc(d+a,o),this._brkCtx){var h=this._brkCtx.calcNiceTickMultiple(d,c);h>=0&&(d=Yc(d+h*a,o))}if(l.length>0&&d===l[l.length-1].value)break;if(l.length>u)return[]}var v=l.length?l[l.length-1].value:i[1];return n[1]>v&&(r.expandToNicedExtent?l.push({value:Yc(v+a,o)}):l.push({value:n[1]})),s&&s.pruneTicksByBreak(r.pruneByBreak,l,this._brkCtx.breaks,function(m){return m.value},this._interval,this._extent),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(r){for(var a=this.getTicks({expandToNicedExtent:!0}),n=[],i=this.getExtent(),o=1;o<a.length;o++){var s=a[o],l=a[o-1];if(!(l.break||s.break)){for(var u=0,c=[],d=s.value-l.value,h=d/r,v=my(h);u<r-1;){var m=Yc(l.value+(u+1)*h,v);m>i[0]&&m<i[1]&&c.push(m),u++}var x=hn();x&&x.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(b){return b},this._interval,i),n.push(c)}}return n},e.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.getLabel=function(r,a){if(r==null)return"";var n=a&&a.precision;n==null?n=Ol(r.value)||0:n==="auto"&&(n=this._intervalPrecision);var i=Yc(r.value,n,!0);return qW(i)},e.prototype.calcNiceTicks=function(r,a,n){r=r||5;var i=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,i.reverse(),this._innerSetExtent(i[0],i[1]),i=this._extent.slice());var s=eye(i,o,r,a,n);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(r){var a=this._extent.slice();if(a[0]===a[1])if(a[0]!==0){var n=Math.abs(a[0]);r.fixMax||(a[1]+=n/2),a[0]-=n/2}else a[1]=1;var i=a[1]-a[0];isFinite(i)||(a[0]=0,a[1]=1),this._innerSetExtent(a[0],a[1]),a=this._extent.slice(),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval,s=this._intervalPrecision;r.fixMin||(a[0]=Yc(Math.floor(a[0]/o)*o,s)),r.fixMax||(a[1]=Yc(Math.ceil(a[1]/o)*o,s)),this._innerSetExtent(a[0],a[1])},e.prototype.setNiceExtent=function(r,a){this._niceExtent=[r,a]},e.type="interval",e})(Wd);Wd.registerClass(ic);var TX=typeof Float32Array<"u",iye=TX?Float32Array:Array;function Bl(t){return be(t)?TX?new Float32Array(t):t:new iye(t)}var _D="__ec_stack_";function CX(t){return t.get("stack")||_D+t.seriesIndex}function $5(t){return t.dim+t.index}function oye(t){var e=[],r=t.axis,a="axis0";if(r.type==="category"){for(var n=r.getBandWidth(),i=0;i<t.count;i++)e.push(nt({bandWidth:n,axisKey:a,stackId:_D+i},t));for(var o=AX(e),s=[],i=0;i<t.count;i++){var l=o[a][_D+i];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function kX(t,e){var r=[];return e.eachSeriesByType(t,function(a){LX(a)&&r.push(a)}),r}function sye(t){var e={};z(t,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var d=l.getData(),h=c.dim+"_"+c.index,v=d.getDimensionIndex(d.mapDimension(c.dim)),m=d.getStore(),x=0,b=m.count();x<b;++x){var w=m.get(v,x);e[h]?e[h].push(w):e[h]=[w]}});var r={};for(var a in e)if(e.hasOwnProperty(a)){var n=e[a];if(n){n.sort(function(l,u){return l-u});for(var i=null,o=1;o<n.length;++o){var s=n[o]-n[o-1];s>0&&(i=i===null?s:Math.min(i,s))}r[a]=i}}return r}function NX(t){var e=sye(t),r=[];return z(t,function(a){var n=a.coordinateSystem,i=n.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=e[l],c=Math.abs(o[1]-o[0]),d=i.scale.getExtent(),h=Math.abs(d[1]-d[0]);s=u?c/h*u:c}else{var v=a.getData();s=Math.abs(o[1]-o[0])/v.count()}var m=Pe(a.get("barWidth"),s),x=Pe(a.get("barMaxWidth"),s),b=Pe(a.get("barMinWidth")||(EX(a)?.5:1),s),w=a.get("barGap"),_=a.get("barCategoryGap"),T=a.get("defaultBarGap");r.push({bandWidth:s,barWidth:m,barMaxWidth:x,barMinWidth:b,barGap:w,barCategoryGap:_,defaultBarGap:T,axisKey:$5(i),stackId:CX(a)})}),AX(r)}function AX(t){var e={};z(t,function(a,n){var i=a.axisKey,o=a.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:a.defaultBarGap||0,stacks:{}},l=s.stacks;e[i]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=a.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var d=a.barMaxWidth;d&&(l[u].maxWidth=d);var h=a.barMinWidth;h&&(l[u].minWidth=h);var v=a.barGap;v!=null&&(s.gap=v);var m=a.barCategoryGap;m!=null&&(s.categoryGap=m)});var r={};return z(e,function(a,n){r[n]={};var i=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=Wt(i).length;s=Math.max(35-l*4,15)+"%"}var u=Pe(s,o),c=Pe(a.gap,1),d=a.remainedWidth,h=a.autoWidthCount,v=(d-u)/(h+(h-1)*c);v=Math.max(v,0),z(i,function(w){var _=w.maxWidth,T=w.minWidth;if(w.width){var C=w.width;_&&(C=Math.min(C,_)),T&&(C=Math.max(C,T)),w.width=C,d-=C+c*C,h--}else{var C=v;_&&_<C&&(C=Math.min(_,d)),T&&T>C&&(C=T),C!==v&&(w.width=C,d-=C+c*C,h--)}}),v=(d-u)/(h+(h-1)*c),v=Math.max(v,0);var m=0,x;z(i,function(w,_){w.width||(w.width=v),x=w,m+=w.width*(1+c)}),x&&(m-=x.width*c);var b=-m/2;z(i,function(w,_){r[n][_]=r[n][_]||{bandWidth:o,offset:b,width:w.width},b+=w.width*(1+c)})}),r}function lye(t,e,r){if(t&&e){var a=t[$5(e)];return a}}function MX(t,e){var r=kX(t,e),a=NX(r);z(r,function(n){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=CX(n),u=a[$5(s)][l],c=u.offset,d=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:d})})}function DX(t){return{seriesType:t,plan:Sm(),reset:function(e){if(LX(e)){var r=e.getData(),a=e.coordinateSystem,n=a.getBaseAxis(),i=a.getOtherAxis(n),o=r.getDimensionIndex(r.mapDimension(i.dim)),s=r.getDimensionIndex(r.mapDimension(n.dim)),l=e.get("showBackground",!0),u=r.mapDimension(i.dim),c=r.getCalculationInfo("stackResultDimension"),d=Pd(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),v=uye(n,i),m=EX(e),x=e.get("barMinHeight")||0,b=c&&r.getDimensionIndex(c),w=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(T,C){for(var k=T.count,A=m&&Bl(k*3),M=m&&l&&Bl(k*3),L=m&&Bl(k),R=a.master.getRect(),P=h?R.width:R.height,j,V=C.getStore(),I=0;(j=T.next())!=null;){var F=V.get(d?b:o,j),G=V.get(s,j),O=v,U=void 0;d&&(U=+F-V.get(o,j));var $=void 0,K=void 0,q=void 0,H=void 0;if(h){var Z=a.dataToPoint([F,G]);if(d){var te=a.dataToPoint([U,G]);O=te[0]}$=O,K=Z[1]+_,q=Z[0]-O,H=w,Math.abs(q)<x&&(q=(q<0?-1:1)*x)}else{var Z=a.dataToPoint([G,F]);if(d){var te=a.dataToPoint([G,U]);O=te[1]}$=Z[0]+_,K=O,q=w,H=Z[1]-O,Math.abs(H)<x&&(H=(H<=0?-1:1)*x)}m?(A[I]=$,A[I+1]=K,A[I+2]=h?q:H,M&&(M[I]=h?R.x:$,M[I+1]=h?K:R.y,M[I+2]=P),L[j]=j):C.setItemLayout(j,{x:$,y:K,width:q,height:H}),I+=3}m&&C.setLayout({largePoints:A,largeDataIndices:L,largeBackgroundPoints:M,valueAxisHorizontal:h})}}}}}}function LX(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function EX(t){return t.pipelineContext&&t.pipelineContext.large}function uye(t,e){var r=e.model.get("startValue");return r||(r=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?r>0?r:1:r))}var cye=function(t,e,r,a){for(;r<a;){var n=r+a>>>1;t[n][1]<e?r=n+1:a=n}return r},W5=(function(t){se(e,t);function e(r){var a=t.call(this,r)||this;return a.type="time",a}return e.prototype.getLabel=function(r){var a=this.getSetting("useUTC");return X_(r.value,Oz[Ope(z0(this._minLevelUnit))]||Oz.second,a,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(r,a,n){var i=this.getSetting("useUTC"),o=this.getSetting("locale");return zpe(r,a,n,o,i)},e.prototype.getTicks=function(r){r=r||{};var a=this._interval,n=this._extent,i=hn(),o=[];if(!a)return o;var s=this.getSetting("useUTC");if(i&&r.breakTicks==="only_break")return hn().addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o;var l=wp(n[1],s);o.push({value:n[0],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}});var u=gye(this._minLevelUnit,this._approxInterval,s,n,this._getExtentSpanWithBreaks(),this._brkCtx);o=o.concat(u);var c=wp(n[1],s);o.push({value:n[1],time:{level:0,upperTimeUnit:c,lowerTimeUnit:c}});var d=this.getSetting("useUTC"),h=Mo.length-1,v=0;return z(o,function(m){h=Math.min(h,St(Mo,m.time.upperTimeUnit)),v=Math.max(v,m.time.level)}),i&&hn().pruneTicksByBreak(r.pruneByBreak,o,this._brkCtx.breaks,function(m){return m.value},this._approxInterval,this._extent),i&&r.breakTicks!=="none"&&hn().addBreaksToTicks(o,this._brkCtx.breaks,this._extent,function(m){for(var x=Math.max(St(Mo,wp(m.vmin,d)),St(Mo,wp(m.vmax,d))),b=0,w=0;w<Mo.length;w++)if(!RX(Mo[w],m.vmin,m.vmax,d)){b=w;break}var _=Math.min(b,h),T=Math.max(_,x);return{level:v,lowerTimeUnit:Mo[T],upperTimeUnit:Mo[_]}}),o},e.prototype.calcNiceExtent=function(r){var a=this.getExtent();if(a[0]===a[1]&&(a[0]-=fs,a[1]+=fs),a[1]===-1/0&&a[0]===1/0){var n=new Date;a[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),a[0]=a[1]-fs}this._innerSetExtent(a[0],a[1]),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},e.prototype.calcNiceTicks=function(r,a,n){r=r||10;var i=this._getExtentSpanWithBreaks();this._approxInterval=i/r,a!=null&&this._approxInterval<a&&(this._approxInterval=a),n!=null&&this._approxInterval>n&&(this._approxInterval=n);var o=r1.length,s=Math.min(cye(r1,this._approxInterval,0,o),o-1);this._interval=r1[s][1],this._intervalPrecision=my(this._interval),this._minLevelUnit=r1[Math.max(s-1,0)][0]},e.prototype.parse=function(r){return qt(r)?r:+Uh(r)},e.prototype.contain=function(r){return U5(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.type="time",e})(ic),r1=[["second",y5],["minute",x5],["hour",O0],["quarter-day",O0*6],["half-day",O0*12],["day",fs*1.2],["half-week",fs*3.5],["week",fs*7],["month",fs*31],["quarter",fs*95],["half-year",jz/2],["year",jz]];function RX(t,e,r,a){return aD(new Date(e),t,a).getTime()===aD(new Date(r),t,a).getTime()}function dye(t,e){return t/=fs,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function fye(t){var e=30*fs;return t/=e,t>6?6:t>3?3:t>2?2:1}function hye(t){return t/=O0,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function XB(t,e){return t/=e?x5:y5,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function vye(t){return V$(t)}function pye(t,e,r){var a=Math.max(0,St(Mo,e)-1);return aD(new Date(t),Mo[a],r).getTime()}function mye(t,e){var r=new Date(0);r[t](1);var a=r.getTime();r[t](1+e);var n=r.getTime()-a;return function(i,o){return Math.max(0,Math.round((o-i)/n))}}function gye(t,e,r,a,n,i){var o=1e4,s=Rpe,l=0;function u(I,F,G,O,U,$,K){for(var q=mye(U,I),H=F,Z=new Date(H);H<G&&H<=a[1]&&(K.push({value:H}),!(l++>o));)if(Z[U](Z[O]()+I),H=Z.getTime(),i){var te=i.calcNiceTickMultiple(H,q);te>0&&(Z[U](Z[O]()+te*I),H=Z.getTime())}K.push({value:H,notAdd:!0})}function c(I,F,G){var O=[],U=!F.length;if(!RX(z0(I),a[0],a[1],r)){U&&(F=[{value:pye(a[0],I,r)},{value:a[1]}]);for(var $=0;$<F.length-1;$++){var K=F[$].value,q=F[$+1].value;if(K!==q){var H=void 0,Z=void 0,te=void 0,ie=!1;switch(I){case"year":H=Math.max(1,Math.round(e/fs/365)),Z=GW(r),te=Bpe(r);break;case"half-year":case"quarter":case"month":H=fye(e),Z=b5(r),te=HW(r);break;case"week":case"half-week":case"day":H=dye(e),Z=w5(r),te=UW(r),ie=!0;break;case"half-day":case"quarter-day":case"hour":H=hye(e),Z=S5(r),te=$W(r);break;case"minute":H=XB(e,!0),Z=_5(r),te=WW(r);break;case"second":H=XB(e,!1),Z=T5(r),te=YW(r);break;case"millisecond":H=vye(e),Z=C5(r),te=XW(r);break}q>=a[0]&&K<=a[1]&&u(H,K,q,Z,te,ie,O),I==="year"&&G.length>1&&$===0&&G.unshift({value:G[0].value-H})}}for(var $=0;$<O.length;$++)G.push(O[$])}}for(var d=[],h=[],v=0,m=0,x=0;x<s.length;++x){var b=z0(s[x]);if(jpe(s[x])){c(s[x],d[d.length-1]||[],h);var w=s[x+1]?z0(s[x+1]):null;if(b!==w){if(h.length){m=v,h.sort(function(I,F){return I.value-F.value});for(var _=[],T=0;T<h.length;++T){var C=h[T].value;(T===0||h[T-1].value!==C)&&(_.push(h[T]),C>=a[0]&&C<=a[1]&&v++)}var k=n/e;if(v>k*1.5&&m>k/1.5||(d.push(_),v>k||t===s[x]))break}h=[]}}}for(var A=mr(Se(d,function(I){return mr(I,function(F){return F.value>=a[0]&&F.value<=a[1]&&!F.notAdd})}),function(I){return I.length>0}),M=[],L=A.length-1,x=0;x<A.length;++x)for(var R=A[x],P=0;P<R.length;++P){var j=wp(R[P].value,r);M.push({value:R[P].value,time:{level:L-x,upperTimeUnit:j,lowerTimeUnit:j}})}M.sort(function(I,F){return I.value-F.value});for(var V=[],x=0;x<M.length;++x)(x===0||M[x].value!==M[x-1].value)&&V.push(M[x]);return V}Wd.registerClass(W5);var TD=dn,yye=Math.floor,xye=Math.ceil,a1=Math.pow,n1=Math.log,PX=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new ic,r}return e.prototype.getTicks=function(r){r=r||{};var a=this._extent.slice(),n=this._originalScale.getExtent(),i=t.prototype.getTicks.call(this,r),o=this.base,s=this._originalScale._innerGetBreaks(),l=hn();return Se(i,function(u){var c=u.value,d=null,h=a1(o,c);c===a[0]&&this._fixMin?d=n[0]:c===a[1]&&this._fixMax&&(d=n[1]);var v;if(l){var m=l.getTicksLogTransformBreak(u,o,s,i1);v=m.vBreak,d==null&&(d=m.brkRoundingCriterion)}return d!=null&&(h=i1(h,d)),{value:h,break:v}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(r,a){this._originalScale.setExtent(r,a);var n=SD(this.base,[r,a]);t.prototype.setExtent.call(this,n[0],n[1])},e.prototype.getExtent=function(){var r=this.base,a=t.prototype.getExtent.call(this);a[0]=a1(r,a[0]),a[1]=a1(r,a[1]);var n=this._originalScale.getExtent();return this._fixMin&&(a[0]=i1(a[0],n[0])),this._fixMax&&(a[1]=i1(a[1],n[1])),a},e.prototype.unionExtentFromData=function(r,a){this._originalScale.unionExtentFromData(r,a);var n=SD(this.base,r.getApproximateExtent(a),!0);this._innerUnionExtent(n)},e.prototype.calcNiceTicks=function(r){r=r||10;var a=this._extent.slice(),n=this._getExtentSpanWithBreaks();if(!(!isFinite(n)||n<=0)){var i=ihe(n),o=r/n*i;for(o<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var s=[TD(xye(a[0]/i)*i),TD(yye(a[1]/i)*i)];this._interval=i,this._intervalPrecision=my(i),this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){t.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.contain=function(r){return r=n1(r)/n1(this.base),t.prototype.contain.call(this,r)},e.prototype.normalize=function(r){return r=n1(r)/n1(this.base),t.prototype.normalize.call(this,r)},e.prototype.scale=function(r){return r=t.prototype.scale.call(this,r),a1(this.base,r)},e.prototype.setBreaksFromOption=function(r){var a=hn();if(a){var n=a.logarithmicParseBreaksFromOption(r,this.base,je(this.parse,this)),i=n.parsedOriginal,o=n.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(o)}},e.type="log",e})(ic);function i1(t,e){return TD(t,Ol(e))}Wd.registerClass(PX);var bye=(function(){function t(e,r,a){this._prepareParams(e,r,a)}return t.prototype._prepareParams=function(e,r,a){a[1]<a[0]&&(a=[NaN,NaN]),this._dataMin=a[0],this._dataMax=a[1];var n=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var i=r.get("min",!0);i==null&&(i=r.get("startValue",!0));var o=this._modelMinRaw=i;Ke(o)?this._modelMinNum=o1(e,o({min:a[0],max:a[1]})):o!=="dataMin"&&(this._modelMinNum=o1(e,o));var s=this._modelMaxRaw=r.get("max",!0);if(Ke(s)?this._modelMaxNum=o1(e,s({min:a[0],max:a[1]})):s!=="dataMax"&&(this._modelMaxNum=o1(e,s)),n)this._axisDataLen=r.getCategories().length;else{var l=r.get("boundaryGap"),u=be(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Ks(u[0],1),Ks(u[1],1)]}},t.prototype.calculate=function(){var e=this._isOrdinal,r=this._dataMin,a=this._dataMax,n=this._axisDataLen,i=this._boundaryGapInner,o=e?null:a-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?a:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=e?n?0:NaN:r-i[0]*o),l==null&&(l=e?n?n-1:NaN:a+i[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var d=Ei(s)||Ei(l)||e&&!n;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,v=this._determinedMax;return h!=null&&(s=h,u=!0),v!=null&&(l=v,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:d}},t.prototype.modifyDataMinMax=function(e,r){this[Sye[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var a=wye[e];this[a]=r},t.prototype.freeze=function(){this.frozen=!0},t})(),wye={min:"_determinedMin",max:"_determinedMax"},Sye={min:"_dataMin",max:"_dataMax"};function IX(t,e,r){var a=t.rawExtentInfo;return a||(a=new bye(t,e,r),t.rawExtentInfo=a,a)}function o1(t,e){return e==null?null:Ei(e)?NaN:t.parse(e)}function jX(t,e){var r=t.type,a=IX(t,e,t.getExtent()).calculate();t.setBlank(a.isBlank);var n=a.min,i=a.max,o=e.ecModel;if(o&&r==="time"){var s=kX("bar",o),l=!1;if(z(s,function(d){l=l||d.getBaseAxis()===e.axis}),l){var u=NX(s),c=_ye(n,i,e,u);n=c.min,i=c.max}}return{extent:[n,i],fixMin:a.minFixed,fixMax:a.maxFixed}}function _ye(t,e,r,a){var n=r.axis.getExtent(),i=Math.abs(n[1]-n[0]),o=lye(a,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;z(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;z(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,d=1-(s+l)/i,h=c/d-c;return e+=h*(l/u),t-=h*(s/u),{min:t,max:e}}function Yp(t,e){var r=e,a=jX(t,r),n=a.extent,i=r.get("splitNumber");t instanceof PX&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setBreaksFromOption(zX(r)),t.setExtent(n[0],n[1]),t.calcNiceExtent({splitNumber:i,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function e2(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Wp({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new W5({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Wd.getClass(e)||ic)}}function Tye(t){var e=t.scale.getExtent(),r=e[0],a=e[1];return!(r>0&&a>0||r<0&&a<0)}function Cm(t){var e=t.getLabelModel().get("formatter");if(t.type==="time"){var r=Ppe(e);return function(n,i){return t.scale.getFormattedLabel(n,i,r)}}else{if(Ie(e))return function(n){var i=t.scale.getLabel(n),o=e.replace("{value}",i??"");return o};if(Ke(e)){if(t.type==="category")return function(n,i){return e(SS(t,n),n.value-t.scale.getExtent()[0],null)};var a=hn();return function(n,i){var o=null;return a&&(o=a.makeAxisLabelFormatterParamBreak(o,n.break)),e(SS(t,n),i,o)}}else return function(n){return t.scale.getLabel(n)}}}function SS(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function Y5(t){var e=t.get("interval");return e??"auto"}function OX(t){return t.type==="category"&&Y5(t.getLabelModel())===0}function _S(t,e){var r={};return z(t.mapDimensionsAll(e),function(a){r[_X(t,a)]=!0}),Wt(r)}function Cye(t,e,r){e&&z(_S(e,r),function(a){var n=e.getApproximateExtent(a);n[0]<t[0]&&(t[0]=n[0]),n[1]>t[1]&&(t[1]=n[1])})}function Xp(t){return t==="middle"||t==="center"}function yy(t){return t.getShallow("show")}function zX(t){var e=t.get("breaks",!0);if(e!=null)return!hn()||!kye(t.axis)?void 0:e}function kye(t){return(t.dim==="x"||t.dim==="y"||t.dim==="z"||t.dim==="single")&&t.type!=="category"}var tx=(function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t})(),Nye=1e-8;function qB(t,e){return Math.abs(t-e)<Nye}function Qf(t,e,r){var a=0,n=t[0];if(!n)return!1;for(var i=1;i<t.length;i++){var o=t[i];a+=Bu(n[0],n[1],o[0],o[1],e,r),n=o}var s=t[0];return(!qB(n[0],s[0])||!qB(n[1],s[1]))&&(a+=Bu(n[0],n[1],s[0],s[1],e,r)),a!==0}var Aye=[];function Gk(t,e){for(var r=0;r<t.length;r++)tn(t[r],t[r],e)}function ZB(t,e,r,a){for(var n=0;n<t.length;n++){var i=t[n];a&&(i=a.project(i)),i&&isFinite(i[0])&&isFinite(i[1])&&(dd(e,e,i),fd(r,r,i))}}function Mye(t){for(var e=0,r=0,a=0,n=t.length,i=t[n-1][0],o=t[n-1][1],s=0;s<n;s++){var l=t[s][0],u=t[s][1],c=i*u-l*o;e+=c,r+=(i+l)*c,a+=(o+u)*c,i=l,o=u}return e?[r/e/3,a/e/3,e]:[t[0][0]||0,t[0][1]||0]}var BX=(function(){function t(e){this.name=e}return t.prototype.setCenter=function(e){this._center=e},t.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},t})(),KB=(function(){function t(e,r){this.type="polygon",this.exterior=e,this.interiors=r}return t})(),QB=(function(){function t(e){this.type="linestring",this.points=e}return t})(),VX=(function(t){se(e,t);function e(r,a,n){var i=t.call(this,r)||this;return i.type="geoJSON",i.geometries=a,i._center=n&&[n[0],n[1]],i}return e.prototype.calcCenter=function(){for(var r=this.geometries,a,n=0,i=0;i<r.length;i++){var o=r[i],s=o.exterior,l=s&&s.length;l>n&&(a=o,n=l)}if(a)return Mye(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(r){var a=this._rect;if(a&&!r)return a;var n=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return z(o,function(s){s.type==="polygon"?ZB(s.exterior,n,i,r):z(s.points,function(l){ZB(l,n,i,r)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),a=new ot(n[0],n[1],i[0]-n[0],i[1]-n[1]),r||(this._rect=a),a},e.prototype.contain=function(r){var a=this.getBoundingRect(),n=this.geometries;if(!a.contain(r[0],r[1]))return!1;e:for(var i=0,o=n.length;i<o;i++){var s=n[i];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(Qf(l,r[0],r[1])){for(var c=0;c<(u?u.length:0);c++)if(Qf(u[c],r[0],r[1]))continue e;return!0}}}return!1},e.prototype.transformTo=function(r,a,n,i){var o=this.getBoundingRect(),s=o.width/o.height;n?i||(i=n/s):n=s*i;for(var l=new ot(r,a,n,i),u=o.calculateTransform(l),c=this.geometries,d=0;d<c.length;d++){var h=c[d];h.type==="polygon"?(Gk(h.exterior,u),z(h.interiors,function(v){Gk(v,u)})):z(h.points,function(v){Gk(v,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(r){r==null&&(r=this.name);var a=new e(r,this.geometries,this._center);return a._rect=this._rect,a.transformTo=null,a},e})(BX),Dye=(function(t){se(e,t);function e(r,a){var n=t.call(this,r)||this;return n.type="geoSVG",n._elOnlyForCalculate=a,n}return e.prototype.calcCenter=function(){for(var r=this._elOnlyForCalculate,a=r.getBoundingRect(),n=[a.x+a.width/2,a.y+a.height/2],i=M_(Aye),o=r;o&&!o.isGeoSVGGraphicRoot;)Ul(i,o.getLocalTransform(),i),o=o.parent;return Zs(i,i),tn(n,n,i),n},e})(BX);function Lye(t){if(!t.UTF8Encoding)return t;var e=t,r=e.UTF8Scale;r==null&&(r=1024);var a=e.features;return z(a,function(n){var i=n.geometry,o=i.encodeOffsets,s=i.coordinates;if(o)switch(i.type){case"LineString":i.coordinates=FX(s,o,r);break;case"Polygon":Hk(s,o,r);break;case"MultiLineString":Hk(s,o,r);break;case"MultiPolygon":z(s,function(l,u){return Hk(l,o[u],r)})}}),e.UTF8Encoding=!1,e}function Hk(t,e,r){for(var a=0;a<t.length;a++)t[a]=FX(t[a],e[a],r)}function FX(t,e,r){for(var a=[],n=e[0],i=e[1],o=0;o<t.length;o+=2){var s=t.charCodeAt(o)-64,l=t.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=i,n=s,i=l,a.push([s/r,l/r])}return a}function Eye(t,e){return t=Lye(t),Se(mr(t.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var a=r.properties,n=r.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new KB(o[0],o.slice(1)));break;case"MultiPolygon":z(n.coordinates,function(l){l[0]&&i.push(new KB(l[0],l.slice(1)))});break;case"LineString":i.push(new QB([n.coordinates]));break;case"MultiLineString":i.push(new QB(n.coordinates))}var s=new VX(a[e||"name"],i,a.cp);return s.properties=a,s})}var Rye=jt(),F0=jt(),Qs={estimate:1,determine:2};function TS(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function GX(t,e){var r=Se(e,function(a){return t.scale.parse(a)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function Pye(t,e){var r=t.getLabelModel().get("customValues");if(r){var a=Cm(t),n=t.scale.getExtent(),i=GX(t,r),o=mr(i,function(s){return s>=n[0]&&s<=n[1]});return{labels:Se(o,function(s){var l={value:s};return{formattedLabel:a(l),rawLabel:t.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return t.type==="category"?jye(t,e):zye(t)}function Iye(t,e,r){var a=t.getTickModel().get("customValues");if(a){var n=t.scale.getExtent(),i=GX(t,a);return{ticks:mr(i,function(o){return o>=n[0]&&o<=n[1]})}}return t.type==="category"?Oye(t,e):{ticks:Se(t.scale.getTicks(r),function(o){return o.value})}}function jye(t,e){var r=t.getLabelModel(),a=HX(t,r,e);return!r.get("show")||t.scale.isBlank()?{labels:[]}:a}function HX(t,e,r){var a=Vye(t),n=Y5(e),i=r.kind===Qs.estimate;if(!i){var o=$X(a,n);if(o)return o}var s,l;Ke(n)?s=XX(t,n):(l=n==="auto"?Fye(t,r):n,s=YX(t,l));var u={labels:s,labelCategoryInterval:l};return i?r.out.noPxChangeTryDetermine.push(function(){return CD(a,n,u),!0}):CD(a,n,u),u}function Oye(t,e){var r=Bye(t),a=Y5(e),n=$X(r,a);if(n)return n;var i,o;if((!e.get("show")||t.scale.isBlank())&&(i=[]),Ke(a))i=XX(t,a,!0);else if(a==="auto"){var s=HX(t,t.getLabelModel(),TS(Qs.determine));o=s.labelCategoryInterval,i=Se(s.labels,function(l){return l.tickValue})}else o=a,i=YX(t,o,!0);return CD(r,a,{ticks:i,tickCategoryInterval:o})}function zye(t){var e=t.scale.getTicks(),r=Cm(t);return{labels:Se(e,function(a,n){return{formattedLabel:r(a,n),rawLabel:t.scale.getLabel(a),tickValue:a.value,time:a.time,break:a.break}})}}var Bye=UX("axisTick"),Vye=UX("axisLabel");function UX(t){return function(r){return F0(r)[t]||(F0(r)[t]={list:[]})}}function $X(t,e){for(var r=0;r<t.list.length;r++)if(t.list[r].key===e)return t.list[r].value}function CD(t,e,r){return t.list.push({key:e,value:r}),r}function Fye(t,e){if(e.kind===Qs.estimate){var r=t.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return F0(t).autoInterval=r,!0}),r}var a=F0(t).autoInterval;return a??(F0(t).autoInterval=t.calculateCategoryInterval(e))}function Gye(t,e){var r=e.kind,a=Uye(t),n=Cm(t),i=(a.axisRotate-a.labelRotate)/180*Math.PI,o=t.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,c=40;l>c&&(u=Math.max(1,Math.floor(l/c)));for(var d=s[0],h=t.dataToCoord(d+1)-t.dataToCoord(d),v=Math.abs(h*Math.cos(i)),m=Math.abs(h*Math.sin(i)),x=0,b=0;d<=s[1];d+=u){var w=0,_=0,T=E_(n({value:d}),a.font,"center","top");w=T.width*1.3,_=T.height*1.3,x=Math.max(x,w,7),b=Math.max(b,_,7)}var C=x/v,k=b/m;isNaN(C)&&(C=1/0),isNaN(k)&&(k=1/0);var A=Math.max(0,Math.floor(Math.min(C,k)));if(r===Qs.estimate)return e.out.noPxChangeTryDetermine.push(je(Hye,null,t,A,l)),A;var M=WX(t,A,l);return M??A}function Hye(t,e,r){return WX(t,e,r)==null}function WX(t,e,r){var a=Rye(t.model),n=t.getExtent(),i=a.lastAutoInterval,o=a.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-e)<=1&&Math.abs(o-r)<=1&&i>e&&a.axisExtent0===n[0]&&a.axisExtent1===n[1])return i;a.lastTickCount=r,a.lastAutoInterval=e,a.axisExtent0=n[0],a.axisExtent1=n[1]}function Uye(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function YX(t,e,r){var a=Cm(t),n=t.scale,i=n.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],c=n.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=OX(t),h=o.get("showMinLabel")||d,v=o.get("showMaxLabel")||d;h&&u!==i[0]&&x(i[0]);for(var m=u;m<=i[1];m+=l)x(m);v&&m-l!==i[1]&&x(i[1]);function x(b){var w={value:b};s.push(r?b:{formattedLabel:a(w),rawLabel:n.getLabel(w),tickValue:b,time:void 0,break:void 0})}return s}function XX(t,e,r){var a=t.scale,n=Cm(t),i=[];return z(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;e(o.value,s)&&i.push(r?l:{formattedLabel:n(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var JB=[0,1],al=(function(){function t(e,r,a){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=a||[0,0]}return t.prototype.contain=function(e){var r=this._extent,a=Math.min(r[0],r[1]),n=Math.max(r[0],r[1]);return e>=a&&e<=n},t.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return z$(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var a=this._extent;a[0]=e,a[1]=r},t.prototype.dataToCoord=function(e,r){var a=this._extent,n=this.scale;return e=n.normalize(n.parse(e)),this.onBand&&n.type==="ordinal"&&(a=a.slice(),e8(a,n.count())),pr(e,JB,a,r)},t.prototype.coordToData=function(e,r){var a=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(a=a.slice(),e8(a,n.count()));var i=pr(e,a,JB,r);return this.scale.scale(i)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),a=Iye(this,r,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),n=a.ticks,i=Se(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return $ye(this,i,o,e.clamp),i},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var a=this.scale.getMinorTicks(r),n=Se(a,function(i){return Se(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},t.prototype.getViewLabels=function(e){return e=e||TS(Qs.determine),Pye(this,e).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),a=r[1]-r[0]+(this.onBand?1:0);a===0&&(a=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/a},t.prototype.calculateCategoryInterval=function(e){return e=e||TS(Qs.determine),Gye(this,e)},t})();function e8(t,e){var r=t[1]-t[0],a=e,n=r/a/2;t[0]+=n,t[1]-=n}function $ye(t,e,r,a){var n=e.length;if(!t.onBand||r||!n)return;var i=t.getExtent(),o,s;if(n===1)e[0].coord=i[0],e[0].onBand=!0,o=e[1]={coord:i[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[n-1].tickValue-e[0].tickValue,u=(e[n-1].coord-e[0].coord)/l;z(e,function(v){v.coord-=u/2,v.onBand=!0});var c=t.scale.getExtent();s=1+c[1]-e[n-1].tickValue,o={coord:e[n-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var d=i[0]>i[1];h(e[0].coord,i[0])&&(a?e[0].coord=i[0]:e.shift()),a&&h(i[0],e[0].coord)&&e.unshift({coord:i[0],onBand:!0}),h(i[1],o.coord)&&(a?o.coord=i[1]:e.pop()),a&&h(o.coord,i[1])&&e.push({coord:i[1],onBand:!0});function h(v,m){return v=dn(v),m=dn(m),d?v>m:v<m}}var Fg=Math.PI*2,Vf=Ql.CMD,Wye=["top","right","bottom","left"];function Yye(t,e,r,a,n){var i=r.width,o=r.height;switch(t){case"top":a.set(r.x+i/2,r.y-e),n.set(0,-1);break;case"bottom":a.set(r.x+i/2,r.y+o+e),n.set(0,1);break;case"left":a.set(r.x-e,r.y+o/2),n.set(-1,0);break;case"right":a.set(r.x+i+e,r.y+o/2),n.set(1,0);break}}function Xye(t,e,r,a,n,i,o,s,l){o-=t,s-=e;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*r+t,d=s*r+e;if(Math.abs(a-n)%Fg<1e-4)return l[0]=c,l[1]=d,u-r;if(i){var h=a;a=Eo(n),n=Eo(h)}else a=Eo(a),n=Eo(n);a>n&&(n+=Fg);var v=Math.atan2(s,o);if(v<0&&(v+=Fg),v>=a&&v<=n||v+Fg>=a&&v+Fg<=n)return l[0]=c,l[1]=d,u-r;var m=r*Math.cos(a)+t,x=r*Math.sin(a)+e,b=r*Math.cos(n)+t,w=r*Math.sin(n)+e,_=(m-o)*(m-o)+(x-s)*(x-s),T=(b-o)*(b-o)+(w-s)*(w-s);return _<T?(l[0]=m,l[1]=x,Math.sqrt(_)):(l[0]=b,l[1]=w,Math.sqrt(T))}function CS(t,e,r,a,n,i,o,s){var l=n-t,u=i-e,c=r-t,d=a-e,h=Math.sqrt(c*c+d*d);c/=h,d/=h;var v=l*c+u*d,m=v/h;s&&(m=Math.min(Math.max(m,0),1)),m*=h;var x=o[0]=t+m*c,b=o[1]=e+m*d;return Math.sqrt((x-n)*(x-n)+(b-i)*(b-i))}function qX(t,e,r,a,n,i,o){r<0&&(t=t+r,r=-r),a<0&&(e=e+a,a=-a);var s=t+r,l=e+a,u=o[0]=Math.min(Math.max(n,t),s),c=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-n)*(u-n)+(c-i)*(c-i))}var Fs=[];function qye(t,e,r){var a=qX(e.x,e.y,e.width,e.height,t.x,t.y,Fs);return r.set(Fs[0],Fs[1]),a}function Zye(t,e,r){for(var a=0,n=0,i=0,o=0,s,l,u=1/0,c=e.data,d=t.x,h=t.y,v=0;v<c.length;){var m=c[v++];v===1&&(a=c[v],n=c[v+1],i=a,o=n);var x=u;switch(m){case Vf.M:i=c[v++],o=c[v++],a=i,n=o;break;case Vf.L:x=CS(a,n,c[v],c[v+1],d,h,Fs,!0),a=c[v++],n=c[v++];break;case Vf.C:x=b$(a,n,c[v++],c[v++],c[v++],c[v++],c[v],c[v+1],d,h,Fs),a=c[v++],n=c[v++];break;case Vf.Q:x=S$(a,n,c[v++],c[v++],c[v],c[v+1],d,h,Fs),a=c[v++],n=c[v++];break;case Vf.A:var b=c[v++],w=c[v++],_=c[v++],T=c[v++],C=c[v++],k=c[v++];v+=1;var A=!!(1-c[v++]);s=Math.cos(C)*_+b,l=Math.sin(C)*T+w,v<=1&&(i=s,o=l);var M=(d-b)*T/_+b;x=Xye(b,w,T,C,C+k,A,M,h,Fs),a=Math.cos(C+k)*_+b,n=Math.sin(C+k)*T+w;break;case Vf.R:i=a=c[v++],o=n=c[v++];var L=c[v++],R=c[v++];x=qX(i,o,L,R,d,h,Fs);break;case Vf.Z:x=CS(a,n,i,o,d,h,Fs,!0),a=i,n=o;break}x<u&&(u=x,r.set(Fs[0],Fs[1]))}return u}var Hs=new at,qr=new at,Qa=new at,Vl=new at,Rl=new at;function t8(t,e){if(t){var r=t.getTextGuideLine(),a=t.getTextContent();if(a&&r){var n=t.textGuideLineConfig||{},i=[[0,0],[0,0],[0,0]],o=n.candidates||Wye,s=a.getBoundingRect().clone();s.applyTransform(a.getComputedTransform());var l=1/0,u=n.anchor,c=t.getComputedTransform(),d=c&&Zs([],c),h=e.get("length2")||0;u&&Qa.copy(u);for(var v=0;v<o.length;v++){var m=o[v];Yye(m,0,s,Hs,Vl),at.scaleAndAdd(qr,Hs,Vl,h),qr.transform(d);var x=t.getBoundingRect(),b=u?u.distance(qr):t instanceof zt?Zye(qr,t.path,Qa):qye(qr,x,Qa);b<l&&(l=b,qr.transform(c),Qa.transform(c),Qa.toArray(i[0]),qr.toArray(i[1]),Hs.toArray(i[2]))}ZX(i,e.get("minTurnAngle")),r.setShape({points:i})}}}var kS=[],Wi=new at;function ZX(t,e){if(e<=180&&e>0){e=e/180*Math.PI,Hs.fromArray(t[0]),qr.fromArray(t[1]),Qa.fromArray(t[2]),at.sub(Vl,Hs,qr),at.sub(Rl,Qa,qr);var r=Vl.len(),a=Rl.len();if(!(r<.001||a<.001)){Vl.scale(1/r),Rl.scale(1/a);var n=Vl.dot(Rl),i=Math.cos(e);if(i<n){var o=CS(qr.x,qr.y,Qa.x,Qa.y,Hs.x,Hs.y,kS,!1);Wi.fromArray(kS),Wi.scaleAndAdd(Rl,o/Math.tan(Math.PI-e));var s=Qa.x!==qr.x?(Wi.x-qr.x)/(Qa.x-qr.x):(Wi.y-qr.y)/(Qa.y-qr.y);if(isNaN(s))return;s<0?at.copy(Wi,qr):s>1&&at.copy(Wi,Qa),Wi.toArray(t[1])}}}}function Kye(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,Hs.fromArray(t[0]),qr.fromArray(t[1]),Qa.fromArray(t[2]),at.sub(Vl,qr,Hs),at.sub(Rl,Qa,qr);var a=Vl.len(),n=Rl.len();if(!(a<.001||n<.001)){Vl.scale(1/a),Rl.scale(1/n);var i=Vl.dot(e),o=Math.cos(r);if(i<o){var s=CS(qr.x,qr.y,Qa.x,Qa.y,Hs.x,Hs.y,kS,!1);Wi.fromArray(kS);var l=Math.PI/2,u=Math.acos(Rl.dot(e)),c=l+u-r;if(c>=l)at.copy(Wi,Qa);else{Wi.scaleAndAdd(Rl,s/Math.tan(Math.PI/2-c));var d=Qa.x!==qr.x?(Wi.x-qr.x)/(Qa.x-qr.x):(Wi.y-qr.y)/(Qa.y-qr.y);if(isNaN(d))return;d<0?at.copy(Wi,qr):d>1&&at.copy(Wi,Qa)}Wi.toArray(t[1])}}}}function Uk(t,e,r,a){var n=r==="normal",i=n?t:t.ensureState(r);i.ignore=e;var o=a.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();n?t.useStyle(s):i.style=s}function Qye(t,e){var r=e.smooth,a=e.points;if(a)if(t.moveTo(a[0][0],a[0][1]),r>0&&a.length>=3){var n=cd(a[0],a[1]),i=cd(a[1],a[2]);if(!n||!i){t.lineTo(a[1][0],a[1][1]),t.lineTo(a[2][0],a[2][1]);return}var o=Math.min(n,i)*r,s=uw([],a[1],a[0],o/n),l=uw([],a[1],a[2],o/i),u=uw([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],a[2][0],a[2][1])}else for(var c=1;c<a.length;c++)t.lineTo(a[c][0],a[c][1])}function X5(t,e,r){var a=t.getTextGuideLine(),n=t.getTextContent();if(!n){a&&t.removeTextGuideLine();return}for(var i=e.normal,o=i.get("show"),s=n.ignore,l=0;l<sy.length;l++){var u=sy[l],c=e[u],d=u==="normal";if(c){var h=c.get("show"),v=d?s:$e(n.states[u]&&n.states[u].ignore,s);if(v||!$e(h,o)){var m=d?a:a&&a.states[u];m&&(m.ignore=!0),a&&Uk(a,!0,u,c);continue}a||(a=new xi,t.setTextGuideLine(a),!d&&(s||!o)&&Uk(a,!0,"normal",e.normal),t.stateProxy&&(a.stateProxy=t.stateProxy)),Uk(a,!1,u,c)}}if(a){nt(a.style,r),a.style.fill=null;var x=i.get("showAbove"),b=t.textGuideLineConfig=t.textGuideLineConfig||{};b.showAbove=x||!1,a.buildPath=Qye}}function q5(t,e){e=e||"labelLine";for(var r={normal:t.getModel(e)},a=0;a<Qi.length;a++){var n=Qi[a];r[n]=t.getModel([n,e])}return r}var r8=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],Jye=1,NS=2,KX=Jye|NS;function AS(t,e,r){r=r||KX,e?t.dirty|=r:t.dirty&=~r}function QX(t,e){return e=e||KX,t.dirty==null||!!(t.dirty&e)}function eu(t){if(t)return QX(t)&&JX(t,t.label,t),t}function JX(t,e,r){var a=e.getComputedTransform();t.transform=v5(t.transform,a);var n=t.localRect=cy(t.localRect,e.getBoundingRect()),i=e.style,o=i.margin,s=r&&r.marginForce,l=r&&r.minMarginForce,u=r&&r.marginDefault,c=i.__marginType;c==null&&u&&(o=u,c=bp.textMargin);for(var d=0;d<4;d++)$k[d]=c===bp.minMargin&&l&&l[d]!=null?l[d]:s&&s[d]!=null?s[d]:o?o[d]:0;c===bp.textMargin&&Rh(n,$k,!1,!1);var h=t.rect=cy(t.rect,n);return a&&h.applyTransform(a),c===bp.minMargin&&Rh(h,$k,!1,!1),t.axisAligned=h5(a),(t.label=t.label||{}).ignore=e.ignore,AS(t,!1),AS(t,!0,NS),t}var $k=[0,0,0,0];function exe(t,e,r){return t.transform=v5(t.transform,r),t.localRect=cy(t.localRect,e),t.rect=cy(t.rect,e),r&&t.rect.applyTransform(r),t.axisAligned=h5(r),t.obb=void 0,(t.label=t.label||{}).ignore=!1,t}function kD(t,e){if(t){t.label.x+=e.x,t.label.y+=e.y,t.label.markRedraw();var r=t.transform;r&&(r[4]+=e.x,r[5]+=e.y);var a=t.rect;a&&(a.x+=e.x,a.y+=e.y);var n=t.obb;n&&n.fromBoundingRect(t.localRect,r)}}function ND(t,e){for(var r=0;r<r8.length;r++){var a=r8[r];t[a]==null&&(t[a]=e[a])}return eu(t)}function a8(t){var e=t.obb;return(!e||QX(t,NS))&&(t.obb=e=e||new kW,e.fromBoundingRect(t.localRect,t.transform),AS(t,!1,NS)),e}function AD(t,e,r,a,n){var i=t.length,o=gt[e],s=vn[e];if(i<2)return!1;t.sort(function(M,L){return M.rect[o]-L.rect[o]});for(var l=0,u,c=!1,d=0;d<i;d++){var h=t[d],v=h.rect;u=v[o]-l,u<0&&(v[o]-=u,h.label[o]-=u,c=!0),l=v[o]+v[s]}var m=t[0],x=t[i-1],b,w;_(),b<0&&k(-b,.8),w<0&&k(w,.8),_(),T(b,w,1),T(w,b,-1),_(),b<0&&A(-b),w<0&&A(w);function _(){b=m.rect[o]-r,w=a-x.rect[o]-x.rect[s]}function T(M,L,R){if(M<0){var P=Math.min(L,-M);if(P>0){C(P*R,0,i);var j=P+M;j<0&&k(-j*R,1)}else k(-M*R,1)}}function C(M,L,R){M!==0&&(c=!0);for(var P=L;P<R;P++){var j=t[P],V=j.rect;V[o]+=M,j.label[o]+=M}}function k(M,L){for(var R=[],P=0,j=1;j<i;j++){var V=t[j-1].rect,I=Math.max(t[j].rect[o]-V[o]-V[s],0);R.push(I),P+=I}if(P){var F=Math.min(Math.abs(M)/P,L);if(M>0)for(var j=0;j<i-1;j++){var G=R[j]*F;C(G,0,j+1)}else for(var j=i-1;j>0;j--){var G=R[j-1]*F;C(-G,j,i)}}}function A(M){var L=M<0?-1:1;M=Math.abs(M);for(var R=Math.ceil(M/(i-1)),P=0;P<i-1;P++)if(L>0?C(R,0,P+1):C(-R,i-P-1,i),M-=R,M<=0)return}return c}function txe(t){for(var e=0;e<t.length;e++){var r=t[e],a=r.defaultAttr,n=r.labelLine;r.label.attr("ignore",a.ignore),n&&n.attr("ignore",a.labelGuideIgnore)}}function eq(t){var e=[];t.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function r(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var a=0;a<t.length;a++){var n=eu(t[a]);if(!n.label.ignore){for(var i=n.label,o=n.labelLine,s=!1,l=0;l<e.length;l++)if(t2(n,e[l],null,{touchThreshold:.05})){s=!0;break}s?(r(i),o&&r(o)):e.push(n)}}}function t2(t,e,r,a){return!t||!e||t.label&&t.label.ignore||e.label&&e.label.ignore||!t.rect.intersect(e.rect,r,a)?!1:t.axisAligned&&e.axisAligned?!0:a8(t).intersect(a8(e),r,a)}function rxe(t){if(t){for(var e=[],r=0;r<t.length;r++)e.push(t[r].slice());return e}}function axe(t,e){var r=t.label,a=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:r.style.align,verticalAlign:r.style.verticalAlign,labelLinePoints:rxe(a&&a.shape.points)}}var n8=["align","verticalAlign","width","height","fontSize"],Hi=new Gu,Wk=jt(),nxe=jt();function s1(t,e,r){for(var a=0;a<r.length;a++){var n=r[a];e[n]!=null&&(t[n]=e[n])}}var l1=["x","y","rotation"],ixe=(function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(e,r,a,n,i){var o=n.style,s=n.__hostTarget,l=s.textConfig||{},u=n.getComputedTransform(),c=n.getBoundingRect().plain();ot.applyTransform(c,c,u),u?Hi.setLocalTransform(u):(Hi.x=Hi.y=Hi.rotation=Hi.originX=Hi.originY=0,Hi.scaleX=Hi.scaleY=1),Hi.rotation=Eo(Hi.rotation);var d=n.__hostTarget,h;if(d){h=d.getBoundingRect().plain();var v=d.getComputedTransform();ot.applyTransform(h,h,v)}var m=h&&d.getTextGuideLine();this._labelList.push({label:n,labelLine:m,seriesModel:a,dataIndex:e,dataType:r,layoutOptionOrCb:i,layoutOption:null,rect:c,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:n.ignore,labelGuideIgnore:m&&m.ignore,x:Hi.x,y:Hi.y,scaleX:Hi.scaleX,scaleY:Hi.scaleY,rotation:Hi.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:n.cursor,attachedPos:l.position,attachedRot:l.rotation}})},t.prototype.addLabelsOfSeries=function(e){var r=this;this._chartViewList.push(e);var a=e.__model,n=a.get("labelLayout");(Ke(n)||Wt(n).length)&&e.group.traverse(function(i){if(i.ignore)return!0;var o=i.getTextContent(),s=dt(i);o&&!o.disableLabelLayout&&r._addLabel(s.dataIndex,s.dataType,a,o,n)})},t.prototype.updateLayoutConfig=function(e){var r=e.getWidth(),a=e.getHeight();function n(T,C){return function(){t8(T,C)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;Ke(o.layoutOptionOrCb)?c=o.layoutOptionOrCb(axe(o,l)):c=o.layoutOptionOrCb,c=c||{},o.layoutOption=c;var d=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*d:u.attachedRot,offset:[c.dx||0,c.dy||0]});var h=!1;if(c.x!=null?(s.x=Pe(c.x,r),s.setStyle("x",0),h=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=Pe(c.y,a),s.setStyle("y",0),h=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var v=l.getTextGuideLine();v&&(v.setShape({points:c.labelLinePoints}),h=!1)}var m=Wk(s);m.needsUpdateLabelLine=h,s.rotation=c.rotate!=null?c.rotate*d:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var x=0;x<n8.length;x++){var b=n8[x];s.setStyle(b,c[b]!=null?c[b]:u.style[b])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var w=o.seriesModel;if(o.dataIndex!=null){var _=o.seriesModel.getData(o.dataType);w=_.getItemModel(o.dataIndex)}s.on("drag",n(l,w.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},t.prototype.layout=function(e){var r=e.getWidth(),a=e.getHeight(),n=[];z(this._labelList,function(l){l.defaultAttr.ignore||n.push(ND({},l))});var i=mr(n,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=mr(n,function(l){return l.layoutOption.moveOverlap==="shiftY"});AD(i,0,0,r),AD(o,1,0,a);var s=mr(n,function(l){return l.layoutOption.hideOverlap});txe(s),eq(s)},t.prototype.processLabelsOverall=function(){var e=this;z(this._chartViewList,function(r){var a=r.__model,n=r.ignoreLabelLineUpdate,i=a.isAnimationEnabled();r.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!n,l=o.getTextContent();!s&&l&&(s=Wk(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,a),i&&e._animateLabels(o,a)})})},t.prototype._updateLabelLine=function(e,r){var a=e.getTextContent(),n=dt(e),i=n.dataIndex;if(a&&i!=null){var o=r.getData(n.dataType),s=o.getItemModel(i),l={},u=o.getItemVisual(i,"style");if(u){var c=o.getVisual("drawType");l.stroke=u[c]}var d=s.getModel("labelLine");X5(e,q5(s),l),t8(e,d)}},t.prototype._animateLabels=function(e,r){var a=e.getTextContent(),n=e.getTextGuideLine();if(a&&(e.forceLabelAnimation||!a.ignore&&!a.invisible&&!e.disableLabelAnimation&&!Np(e))){var i=Wk(a),o=i.oldLayout,s=dt(e),l=s.dataIndex,u={x:a.x,y:a.y,rotation:a.rotation},c=r.getData(s.dataType);if(o){a.attr(o);var h=e.prevStates;h&&(St(h,"select")>=0&&a.attr(i.oldLayoutSelect),St(h,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),tr(a,u,r,l)}else if(a.attr(u),!bm(a).valueAnimation){var d=$e(a.style.opacity,1);a.style.opacity=0,na(a,{style:{opacity:d}},r,l)}if(i.oldLayout=u,a.states.select){var v=i.oldLayoutSelect={};s1(v,u,l1),s1(v,a.states.select,l1)}if(a.states.emphasis){var m=i.oldLayoutEmphasis={};s1(m,u,l1),s1(m,a.states.emphasis,l1)}OW(a,l,c,r,r)}if(n&&!n.ignore&&!n.invisible){var i=nxe(n),o=i.oldLayout,x={points:n.shape.points};o?(n.attr({shape:o}),tr(n,{shape:x},r)):(n.setShape(x),n.style.strokePercent=0,na(n,{style:{strokePercent:1}},r)),i.oldLayout=x}},t})(),Yk=jt();function oxe(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,a){var n=Yk(r).labelManager;n||(n=Yk(r).labelManager=new ixe),n.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,a){var n=Yk(r).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(r.getViewOfSeriesModel(i))}),n.updateLayoutConfig(r),n.layout(r),n.processLabelsOverall()})}var Xk=Math.sin,qk=Math.cos,tq=Math.PI,Ff=Math.PI*2,sxe=180/tq,rq=(function(){function t(){}return t.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},t.prototype.moveTo=function(e,r){this._add("M",e,r)},t.prototype.lineTo=function(e,r){this._add("L",e,r)},t.prototype.bezierCurveTo=function(e,r,a,n,i,o){this._add("C",e,r,a,n,i,o)},t.prototype.quadraticCurveTo=function(e,r,a,n){this._add("Q",e,r,a,n)},t.prototype.arc=function(e,r,a,n,i,o){this.ellipse(e,r,a,a,0,n,i,o)},t.prototype.ellipse=function(e,r,a,n,i,o,s,l){var u=s-o,c=!l,d=Math.abs(u),h=pd(d-Ff)||(c?u>=Ff:-u>=Ff),v=u>0?u%Ff:u%Ff+Ff,m=!1;h?m=!0:pd(d)?m=!1:m=v>=tq==!!c;var x=e+a*qk(o),b=r+n*Xk(o);this._start&&this._add("M",x,b);var w=Math.round(i*sxe);if(h){var _=1/this._p,T=(c?1:-1)*(Ff-_);this._add("A",a,n,w,1,+c,e+a*qk(o+T),r+n*Xk(o+T)),_>.01&&this._add("A",a,n,w,0,+c,x,b)}else{var C=e+a*qk(s),k=r+n*Xk(s);this._add("A",a,n,w,+m,+c,C,k)}},t.prototype.rect=function(e,r,a,n){this._add("M",e,r),this._add("l",a,0),this._add("l",0,n),this._add("l",-a,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(e,r,a,n,i,o,s,l,u){for(var c=[],d=this._p,h=1;h<arguments.length;h++){var v=arguments[h];if(isNaN(v)){this._invalid=!0;return}c.push(Math.round(v*d)/d)}this._d.push(e+c.join(" ")),this._start=e==="Z"},t.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},t.prototype.getStr=function(){return this._str},t})(),Z5="none",lxe=Math.round;function uxe(t){var e=t.fill;return e!=null&&e!==Z5}function cxe(t){var e=t.stroke;return e!=null&&e!==Z5}var MD=["lineCap","miterLimit","lineJoin"],dxe=Se(MD,function(t){return"stroke-"+t.toLowerCase()});function fxe(t,e,r,a){var n=e.opacity==null?1:e.opacity;if(r instanceof li){t("opacity",n);return}if(uxe(e)){var i=ny(e.fill);t("fill",i.color);var o=e.fillOpacity!=null?e.fillOpacity*i.opacity*n:i.opacity*n;o<1&&t("fill-opacity",o)}else t("fill",Z5);if(cxe(e)){var s=ny(e.stroke);t("stroke",s.color);var l=e.strokeNoScale?r.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*n:s.opacity*n,d=e.strokeFirst;if(u!==1&&t("stroke-width",u),d&&t("paint-order",d?"stroke":"fill"),c<1&&t("stroke-opacity",c),e.lineDash){var h=O5(r),v=h[0],m=h[1];v&&(m=lxe(m||0),t("stroke-dasharray",v.join(",")),(m||a)&&t("stroke-dashoffset",m))}for(var x=0;x<MD.length;x++){var b=MD[x];if(e[b]!==oS[b]){var w=e[b]||oS[b];w&&t(dxe[x],w)}}}}var aq="http://www.w3.org/2000/svg",nq="http://www.w3.org/1999/xlink",hxe="http://www.w3.org/2000/xmlns/",vxe="http://www.w3.org/XML/1998/namespace",i8="ecmeta_";function iq(t){return document.createElementNS(aq,t)}function Yn(t,e,r,a,n){return{tag:t,attrs:r||{},children:a,text:n,key:e}}function pxe(t,e){var r=[];if(e)for(var a in e){var n=e[a],i=a;n!==!1&&(n!==!0&&n!=null&&(i+='="'+n+'"'),r.push(i))}return"<"+t+" "+r.join(" ")+">"}function mxe(t){return"</"+t+">"}function K5(t,e){e=e||{};var r=e.newline?`
`:"";function a(n){var i=n.children,o=n.tag,s=n.attrs,l=n.text;return pxe(o,s)+(o!=="style"?Yi(l):l||"")+(i?""+r+Se(i,function(u){return a(u)}).join(r)+r:"")+mxe(o)}return a(t)}function gxe(t,e,r){r=r||{};var a=r.newline?`
`:"",n=" {"+a,i=a+"}",o=Se(Wt(t),function(l){return l+n+Se(Wt(t[l]),function(u){return u+":"+t[l][u]+";"}).join(a)+i}).join(a),s=Se(Wt(e),function(l){return"@keyframes "+l+n+Se(Wt(e[l]),function(u){return u+n+Se(Wt(e[l][u]),function(c){var d=e[l][u][c];return c==="d"&&(d='path("'+d+'")'),c+":"+d+";"}).join(a)+i}).join(a)+i}).join(a);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(a)}function DD(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function o8(t,e,r,a){return Yn("svg","root",{width:t,height:e,xmlns:aq,"xmlns:xlink":nq,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+t+" "+e:!1},r)}var yxe=0;function oq(){return yxe++}var s8={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},$f="transform-origin";function xxe(t,e,r){var a=ve({},t.shape);ve(a,e),t.buildPath(r,a);var n=new rq;return n.reset(M$(t)),r.rebuildPath(n,1),n.generateStr(),n.getStr()}function bxe(t,e){var r=e.originX,a=e.originY;(r||a)&&(t[$f]=r+"px "+a+"px")}var wxe={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function sq(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function Sxe(t,e,r){var a=t.shape.paths,n={},i,o;if(z(a,function(l){var u=DD(r.zrId);u.animation=!0,r2(l,{},u,!0);var c=u.cssAnims,d=u.cssNodes,h=Wt(c),v=h.length;if(v){o=h[v-1];var m=c[o];for(var x in m){var b=m[x];n[x]=n[x]||{d:""},n[x].d+=b.d||""}for(var w in d){var _=d[w].animation;_.indexOf(o)>=0&&(i=_)}}}),!!i){e.d=!1;var s=sq(n,r);return i.replace(o,s)}}function l8(t){return Ie(t)?s8[t]?"cubic-bezier("+s8[t]+")":ZE(t)?t:"":""}function r2(t,e,r,a){var n=t.animators,i=n.length,o=[];if(t instanceof U_){var s=Sxe(t,e,r);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u<i;u++){var c=n[u],d=[c.getMaxTime()/1e3+"s"],h=l8(c.getClip().easing),v=c.getDelay();h?d.push(h):d.push("linear"),v&&d.push(v/1e3+"s"),c.getLoop()&&d.push("infinite");var m=d.join(" ");l[m]=l[m]||[m,[]],l[m][1].push(c)}function x(_){var T=_[1],C=T.length,k={},A={},M={},L="animation-timing-function";function R(Ce,ge,Be){for(var _e=Ce.getTracks(),Oe=Ce.getMaxTime(),xt=0;xt<_e.length;xt++){var Ye=_e[xt];if(Ye.needsAnimate()){var st=Ye.keyframes,We=Ye.propName;if(Be&&(We=Be(We)),We)for(var At=0;At<st.length;At++){var kt=st[At],Jt=Math.round(kt.time/Oe*100)+"%",Nr=l8(kt.easing),rr=kt.rawValue;(Ie(rr)||qt(rr))&&(ge[Jt]=ge[Jt]||{},ge[Jt][We]=kt.rawValue,Nr&&(ge[Jt][L]=Nr))}}}}for(var P=0;P<C;P++){var j=T[P],V=j.targetName;V?V==="shape"&&R(j,A):!a&&R(j,k)}for(var I in k){var F={};aS(F,t),ve(F,k[I]);var G=D$(F),O=k[I][L];M[I]=G?{transform:G}:{},bxe(M[I],F),O&&(M[I][L]=O)}var U,$=!0;for(var I in A){M[I]=M[I]||{};var K=!U,O=A[I][L];K&&(U=new Ql);var q=U.len();U.reset(),M[I].d=xxe(t,A[I],U);var H=U.len();if(!K&&q!==H){$=!1;break}O&&(M[I][L]=O)}if(!$)for(var I in M)delete M[I].d;if(!a)for(var P=0;P<C;P++){var j=T[P],V=j.targetName;V==="style"&&R(j,M,function(_e){return wxe[_e]})}for(var Z=Wt(M),te=!0,ie,P=1;P<Z.length;P++){var ce=Z[P-1],me=Z[P];if(M[ce][$f]!==M[me][$f]){te=!1;break}ie=M[ce][$f]}if(te&&ie){for(var I in M)M[I][$f]&&delete M[I][$f];e[$f]=ie}if(mr(Z,function(Ce){return Wt(M[Ce]).length>0}).length){var ze=sq(M,r);return ze+" "+_[0]+" both"}}for(var b in l){var s=x(l[b]);s&&o.push(s)}if(o.length){var w=r.zrId+"-cls-"+oq();r.cssNodes["."+w]={animation:o.join(",")},e.class=w}}function _xe(t,e,r){if(!t.ignore)if(t.isSilent()){var a={"pointer-events":"none"};u8(a,e,r)}else{var n=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},i=n.fill;if(!i){var o=t.style&&t.style.fill,s=t.states.select&&t.states.select.style&&t.states.select.style.fill,l=t.currentStates.indexOf("select")>=0&&s||o;l&&(i=MM(l))}var u=n.lineWidth;if(u){var c=!n.strokeNoScale&&t.transform?t.transform[0]:1;u=u/c}var a={cursor:"pointer"};i&&(a.fill=i),n.stroke&&(a.stroke=n.stroke),u&&(a["stroke-width"]=u),u8(a,e,r)}}function u8(t,e,r,a){var n=JSON.stringify(t),i=r.cssStyleCache[n];i||(i=r.zrId+"-cls-"+oq(),r.cssStyleCache[n]=i,r.cssNodes["."+i+":hover"]=t),e.class=e.class?e.class+" "+i:i}var xy=Math.round;function lq(t){return t&&Ie(t.src)}function uq(t){return t&&Ke(t.toDataURL)}function Q5(t,e,r,a){fxe(function(n,i){var o=n==="fill"||n==="stroke";o&&A$(i)?dq(e,t,n,a):o&&KE(i)?fq(r,t,n,a):t[n]=i,o&&a.ssr&&i==="none"&&(t["pointer-events"]="visible")},e,r,!1),Dxe(r,t,a)}function J5(t,e){var r=Kfe(e);r&&(r.each(function(a,n){a!=null&&(t[(i8+n).toLowerCase()]=a+"")}),e.isSilent()&&(t[i8+"silent"]="true"))}function c8(t){return pd(t[0]-1)&&pd(t[1])&&pd(t[2])&&pd(t[3]-1)}function Txe(t){return pd(t[4])&&pd(t[5])}function eR(t,e,r){if(e&&!(Txe(e)&&c8(e))){var a=1e4;t.transform=c8(e)?"translate("+xy(e[4]*a)/a+" "+xy(e[5]*a)/a+")":xfe(e)}}function d8(t,e,r){for(var a=t.points,n=[],i=0;i<a.length;i++)n.push(xy(a[i][0]*r)/r),n.push(xy(a[i][1]*r)/r);e.points=n.join(" ")}function f8(t){return!t.smooth}function Cxe(t){var e=Se(t,function(r){return typeof r=="string"?[r,r]:r});return function(r,a,n){for(var i=0;i<e.length;i++){var o=e[i],s=r[o[0]];s!=null&&(a[o[1]]=xy(s*n)/n)}}}var kxe={circle:[Cxe(["cx","cy","r"])],polyline:[d8,f8],polygon:[d8,f8]};function Nxe(t){for(var e=t.animators,r=0;r<e.length;r++)if(e[r].targetName==="shape")return!0;return!1}function cq(t,e){var r=t.style,a=t.shape,n=kxe[t.type],i={},o=e.animation,s="path",l=t.style.strokePercent,u=e.compress&&M$(t)||4;if(n&&!e.willUpdate&&!(n[1]&&!n[1](a))&&!(o&&Nxe(t))&&!(l<1)){s=t.type;var c=Math.pow(10,u);n[0](a,i,c)}else{var d=!t.path||t.shapeChanged();t.path||t.createPathProxy();var h=t.path;d&&(h.beginPath(),t.buildPath(h,t.shape),t.pathUpdated());var v=h.getVersion(),m=t,x=m.__svgPathBuilder;(m.__svgPathVersion!==v||!x||l!==m.__svgPathStrokePercent)&&(x||(x=m.__svgPathBuilder=new rq),x.reset(u),h.rebuildPath(x,l),x.generateStr(),m.__svgPathVersion=v,m.__svgPathStrokePercent=l),i.d=x.getStr()}return eR(i,t.transform),Q5(i,r,t,e),J5(i,t),e.animation&&r2(t,i,e),e.emphasis&&_xe(t,i,e),Yn(s,t.id+"",i)}function Axe(t,e){var r=t.style,a=r.image;if(a&&!Ie(a)&&(lq(a)?a=a.src:uq(a)&&(a=a.toDataURL())),!!a){var n=r.x||0,i=r.y||0,o=r.width,s=r.height,l={href:a,width:o,height:s};return n&&(l.x=n),i&&(l.y=i),eR(l,t.transform),Q5(l,r,t,e),J5(l,t),e.animation&&r2(t,l,e),Yn("image",t.id+"",l)}}function Mxe(t,e){var r=t.style,a=r.text;if(a!=null&&(a+=""),!(!a||isNaN(r.x)||isNaN(r.y))){var n=r.font||Ju,i=r.x||0,o=wfe(r.y||0,Uy(n),r.textBaseline),s=bfe[r.textAlign]||r.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(sW(r)){var u="",c=r.fontStyle,d=oW(r.fontSize);if(!parseFloat(d))return;var h=r.fontFamily||n$,v=r.fontWeight;u+="font-size:"+d+";font-family:"+h+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),v&&v!=="normal"&&(u+="font-weight:"+v+";"),l.style=u}else l.style="font: "+n;return a.match(/\s/)&&(l["xml:space"]="preserve"),i&&(l.x=i),o&&(l.y=o),eR(l,t.transform),Q5(l,r,t,e),J5(l,t),e.animation&&r2(t,l,e),Yn("text",t.id+"",l,void 0,a)}}function h8(t,e){if(t instanceof zt)return cq(t,e);if(t instanceof li)return Axe(t,e);if(t instanceof Gp)return Mxe(t,e)}function Dxe(t,e,r){var a=t.style;if(Sfe(a)){var n=_fe(t),i=r.shadowCache,o=i[n];if(!o){var s=t.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=a.shadowOffsetX||0,d=a.shadowOffsetY||0,h=a.shadowBlur,v=ny(a.shadowColor),m=v.opacity,x=v.color,b=h/2/l,w=h/2/u,_=b+" "+w;o=r.zrId+"-s"+r.shadowIdx++,r.defs[o]=Yn("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Yn("feDropShadow","",{dx:c/l,dy:d/u,stdDeviation:_,"flood-color":x,"flood-opacity":m})]),i[n]=o}e.filter=L_(o)}}function dq(t,e,r,a){var n=t[r],i,o={gradientUnits:n.global?"userSpaceOnUse":"objectBoundingBox"};if(k$(n))i="linearGradient",o.x1=n.x,o.y1=n.y,o.x2=n.x2,o.y2=n.y2;else if(N$(n))i="radialGradient",o.cx=$e(n.x,.5),o.cy=$e(n.y,.5),o.r=$e(n.r,.5);else return;for(var s=n.colorStops,l=[],u=0,c=s.length;u<c;++u){var d=DM(s[u].offset)*100+"%",h=s[u].color,v=ny(h),m=v.color,x=v.opacity,b={offset:d};b["stop-color"]=m,x<1&&(b["stop-opacity"]=x),l.push(Yn("stop",u+"",b))}var w=Yn(i,"",o,l),_=K5(w),T=a.gradientCache,C=T[_];C||(C=a.zrId+"-g"+a.gradientIdx++,T[_]=C,o.id=C,a.defs[C]=Yn(i,C,o,l)),e[r]=L_(C)}function fq(t,e,r,a){var n=t.style[r],i=t.getBoundingRect(),o={},s=n.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",d;if(C$(n)){var h=n.imageWidth,v=n.imageHeight,m=void 0,x=n.image;if(Ie(x)?m=x:lq(x)?m=x.src:uq(x)&&(m=x.toDataURL()),typeof Image>"u"){var b="Image width/height must been given explictly in svg-ssr renderer.";Pi(h,b),Pi(v,b)}else if(h==null||v==null){var w=function(P,j){if(P){var V=P.elm,I=h||j.width,F=v||j.height;P.tag==="pattern"&&(u?(F=1,I/=i.width):c&&(I=1,F/=i.height)),P.attrs.width=I,P.attrs.height=F,V&&(V.setAttribute("width",I),V.setAttribute("height",F))}},_=a5(m,null,t,function(P){l||w(A,P),w(d,P)});_&&_.width&&_.height&&(h=h||_.width,v=v||_.height)}d=Yn("image","img",{href:m,width:h,height:v}),o.width=h,o.height=v}else n.svgElement&&(d=et(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(d){var T,C;l?T=C=1:u?(C=1,T=o.width/i.width):c?(T=1,C=o.height/i.height):o.patternUnits="userSpaceOnUse",T!=null&&!isNaN(T)&&(o.width=T),C!=null&&!isNaN(C)&&(o.height=C);var k=D$(n);k&&(o.patternTransform=k);var A=Yn("pattern","",o,[d]),M=K5(A),L=a.patternCache,R=L[M];R||(R=a.zrId+"-p"+a.patternIdx++,L[M]=R,o.id=R,A=a.defs[R]=Yn("pattern",R,o,[d])),e[r]=L_(R)}}function Lxe(t,e,r){var a=r.clipPathCache,n=r.defs,i=a[t.id];if(!i){i=r.zrId+"-c"+r.clipPathIdx++;var o={id:i};a[t.id]=i,n[i]=Yn("clipPath",i,o,[cq(t,r)])}e["clip-path"]=L_(i)}function v8(t){return document.createTextNode(t)}function Jf(t,e,r){t.insertBefore(e,r)}function p8(t,e){t.removeChild(e)}function m8(t,e){t.appendChild(e)}function hq(t){return t.parentNode}function vq(t){return t.nextSibling}function Zk(t,e){t.textContent=e}var g8=58,Exe=120,Rxe=Yn("","");function LD(t){return t===void 0}function Dl(t){return t!==void 0}function Pxe(t,e,r){for(var a={},n=e;n<=r;++n){var i=t[n].key;i!==void 0&&(a[i]=n)}return a}function y0(t,e){var r=t.key===e.key,a=t.tag===e.tag;return a&&r}function by(t){var e,r=t.children,a=t.tag;if(Dl(a)){var n=t.elm=iq(a);if(tR(Rxe,t),be(r))for(e=0;e<r.length;++e){var i=r[e];i!=null&&m8(n,by(i))}else Dl(t.text)&&!it(t.text)&&m8(n,v8(t.text))}else t.elm=v8(t.text);return t.elm}function pq(t,e,r,a,n){for(;a<=n;++a){var i=r[a];i!=null&&Jf(t,by(i),e)}}function MS(t,e,r,a){for(;r<=a;++r){var n=e[r];if(n!=null)if(Dl(n.tag)){var i=hq(n.elm);p8(i,n.elm)}else p8(t,n.elm)}}function tR(t,e){var r,a=e.elm,n=t&&t.attrs||{},i=e.attrs||{};if(n!==i){for(r in i){var o=i[r],s=n[r];s!==o&&(o===!0?a.setAttribute(r,""):o===!1?a.removeAttribute(r):r==="style"?a.style.cssText=o:r.charCodeAt(0)!==Exe?a.setAttribute(r,o):r==="xmlns:xlink"||r==="xmlns"?a.setAttributeNS(hxe,r,o):r.charCodeAt(3)===g8?a.setAttributeNS(vxe,r,o):r.charCodeAt(5)===g8?a.setAttributeNS(nq,r,o):a.setAttribute(r,o))}for(r in n)r in i||a.removeAttribute(r)}}function Ixe(t,e,r){for(var a=0,n=0,i=e.length-1,o=e[0],s=e[i],l=r.length-1,u=r[0],c=r[l],d,h,v,m;a<=i&&n<=l;)o==null?o=e[++a]:s==null?s=e[--i]:u==null?u=r[++n]:c==null?c=r[--l]:y0(o,u)?(np(o,u),o=e[++a],u=r[++n]):y0(s,c)?(np(s,c),s=e[--i],c=r[--l]):y0(o,c)?(np(o,c),Jf(t,o.elm,vq(s.elm)),o=e[++a],c=r[--l]):y0(s,u)?(np(s,u),Jf(t,s.elm,o.elm),s=e[--i],u=r[++n]):(LD(d)&&(d=Pxe(e,a,i)),h=d[u.key],LD(h)?Jf(t,by(u),o.elm):(v=e[h],v.tag!==u.tag?Jf(t,by(u),o.elm):(np(v,u),e[h]=void 0,Jf(t,v.elm,o.elm))),u=r[++n]);(a<=i||n<=l)&&(a>i?(m=r[l+1]==null?null:r[l+1].elm,pq(t,m,r,n,l)):MS(t,e,a,i))}function np(t,e){var r=e.elm=t.elm,a=t.children,n=e.children;t!==e&&(tR(t,e),LD(e.text)?Dl(a)&&Dl(n)?a!==n&&Ixe(r,a,n):Dl(n)?(Dl(t.text)&&Zk(r,""),pq(r,null,n,0,n.length-1)):Dl(a)?MS(r,a,0,a.length-1):Dl(t.text)&&Zk(r,""):t.text!==e.text&&(Dl(a)&&MS(r,a,0,a.length-1),Zk(r,e.text)))}function jxe(t,e){if(y0(t,e))np(t,e);else{var r=t.elm,a=hq(r);by(e),a!==null&&(Jf(a,e.elm,vq(r)),MS(a,[t],0,0))}return e}var Oxe=0,zxe=(function(){function t(e,r,a){if(this.type="svg",this.refreshHover=y8(),this.configLayer=y8(),this.storage=r,this._opts=a=ve({},a),this.root=e,this._id="zr"+Oxe++,this._oldVNode=o8(a.width,a.height),e&&!a.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=iq("svg");tR(null,this._oldVNode),n.appendChild(i),e.appendChild(n)}this.resize(a.width,a.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",jxe(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return h8(e,DD(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),a=this._width,n=this._height,i=DD(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=Bxe(a,n,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=Yn("g","main",{},[]);this._paintList(r,i,l?l.children:o),l&&o.push(l);var u=Se(Wt(i.defs),function(h){return i.defs[h]});if(u.length&&o.push(Yn("defs","defs",{},u)),e.animation){var c=gxe(i.cssNodes,i.cssAnims,{newline:!0});if(c){var d=Yn("style","stl",{},[],c);o.push(d)}}return o8(a,n,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},K5(this.renderToVNode({animation:$e(e.cssAnimation,!0),emphasis:$e(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:$e(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,a){for(var n=e.length,i=[],o=0,s,l,u=0,c=0;c<n;c++){var d=e[c];if(!d.invisible){var h=d.__clipPaths,v=h&&h.length||0,m=l&&l.length||0,x=void 0;for(x=Math.max(v-1,m-1);x>=0&&!(h&&l&&h[x]===l[x]);x--);for(var b=m-1;b>x;b--)o--,s=i[o-1];for(var w=x+1;w<v;w++){var _={};Lxe(h[w],_,r);var T=Yn("g","clip-g-"+u++,_,[]);(s?s.children:a).push(T),i[o++]=T,s=T}l=h;var C=h8(d,r);C&&(s?s.children:a).push(C)}}},t.prototype.resize=function(e,r){var a=this._opts,n=this.root,i=this._viewport;if(e!=null&&(a.width=e),r!=null&&(a.height=r),n&&i&&(i.style.display="none",e=Sp(n,0,a),r=Sp(n,1,a),i.style.display=""),this._width!==e||this._height!==r){if(this._width=e,this._height=r,i){var o=i.style;o.width=e+"px",o.height=r+"px"}if(KE(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",r));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",r))}}},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},t.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},t.prototype.toDataURL=function(e){var r=this.renderToString(),a="data:image/svg+xml;";return e?(r=Cfe(r),r&&a+"base64,"+r):a+"charset=UTF-8,"+encodeURIComponent(r)},t})();function y8(t){return function(){}}function Bxe(t,e,r,a){var n;if(r&&r!=="none")if(n=Yn("rect","bg",{width:t,height:e,x:"0",y:"0"}),A$(r))dq({fill:r},n.attrs,"fill",a);else if(KE(r))fq({style:{fill:r},dirty:en,getBoundingRect:function(){return{width:t,height:e}}},n.attrs,"fill",a);else{var i=ny(r),o=i.color,s=i.opacity;n.attrs.fill=o,s<1&&(n.attrs["fill-opacity"]=s)}return n}function Vxe(t){t.registerPainter("svg",zxe)}function x8(t,e,r){var a=qs.createCanvas(),n=e.getWidth(),i=e.getHeight(),o=a.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=n+"px",o.height=i+"px",a.setAttribute("data-zr-dom-id",t)),a.width=n*r,a.height=i*r,a}var Kk=(function(t){ia(e,t);function e(r,a,n){var i=t.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var o;n=n||rS,typeof r=="string"?o=x8(r,a,n):it(r)&&(o=r,r=o.id),i.id=r,i.dom=o;var s=o.style;return s&&(c$(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),i.painter=a,i.dpr=n,i}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=x8("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},e.prototype.createRepaintRects=function(r,a,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new ot(0,0,0,0);function c(_){if(!(!_.isFinite()||_.isZero()))if(o.length===0){var T=new ot(0,0,0,0);T.copy(_),o.push(T)}else{for(var C=!1,k=1/0,A=0,M=0;M<o.length;++M){var L=o[M];if(L.intersect(_)){var R=new ot(0,0,0,0);R.copy(L),R.union(_),o[M]=R,C=!0;break}else if(l){u.copy(_),u.union(L);var P=_.width*_.height,j=L.width*L.height,V=u.width*u.height,I=V-P-j;I<k&&(k=I,A=M)}}if(l&&(o[A].union(_),C=!0),!C){var T=new ot(0,0,0,0);T.copy(_),o.push(T)}l||(l=o.length>=s)}}for(var d=this.__startIndex;d<this.__endIndex;++d){var h=r[d];if(h){var v=h.shouldBePainted(n,i,!0,!0),m=h.__isRendered&&(h.__dirty&Lo||!v)?h.getPrevPaintRect():null;m&&c(m);var x=v&&(h.__dirty&Lo||!h.__isRendered)?h.getPaintRect():null;x&&c(x)}}for(var d=this.__prevStartIndex;d<this.__prevEndIndex;++d){var h=a[d],v=h&&h.shouldBePainted(n,i,!0,!0);if(h&&(!v||!h.__zr)&&h.__isRendered){var m=h.getPrevPaintRect();m&&c(m)}}var b;do{b=!1;for(var d=0;d<o.length;){if(o[d].isZero()){o.splice(d,1);continue}for(var w=d+1;w<o.length;)o[d].intersect(o[w])?(b=!0,o[d].union(o[w]),o.splice(w,1)):w++;d++}}while(b);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(r,a){var n=this.dpr,i=this.dom,o=i.style,s=this.domBack;o&&(o.width=r+"px",o.height=a+"px"),i.width=r*n,i.height=a*n,s&&(s.width=r*n,s.height=a*n,n!==1&&this.ctxBack.scale(n,n))},e.prototype.clear=function(r,a,n){var i=this.dom,o=this.ctx,s=i.width,l=i.height;a=a||this.clearColor;var u=this.motionBlur&&!r,c=this.lastFrameAlpha,d=this.dpr,h=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,s/d,l/d));var v=this.domBack;function m(x,b,w,_){if(o.clearRect(x,b,w,_),a&&a!=="transparent"){var T=void 0;if(k_(a)){var C=a.global||a.__width===w&&a.__height===_;T=C&&a.__canvasGradient||vD(o,a,{x:0,y:0,width:w,height:_}),a.__canvasGradient=T,a.__width=w,a.__height=_}else Dde(a)&&(a.scaleX=a.scaleX||d,a.scaleY=a.scaleY||d,T=pD(o,a,{dirty:function(){h.setUnpainted(),h.painter.refresh()}}));o.save(),o.fillStyle=T||a,o.fillRect(x,b,w,_),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(v,x,b,w,_),o.restore())}!n||u?m(0,0,s,l):n.length&&z(n,function(x){m(x.x*d,x.y*d,x.width*d,x.height*d)})},e})(ws),b8=1e5,Gf=314159,u1=.01,Fxe=.001;function Gxe(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}function Hxe(t,e){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var Uxe=(function(){function t(e,r,a,n){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=a=ve({},a||{}),this.dpr=a.devicePixelRatio||rS,this._singleCanvas=i,this.root=e;var o=e.style;o&&(c$(e),e.innerHTML=""),this.storage=r;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(i){var c=e,d=c.width,h=c.height;a.width!=null&&(d=a.width),a.height!=null&&(h=a.height),this.dpr=a.devicePixelRatio||1,c.width=d*this.dpr,c.height=h*this.dpr,this._width=d,this._height=h;var v=new Kk(c,this,this.dpr);v.__builtin__=!0,v.initContext(),l[Gf]=v,v.zlevel=Gf,s.push(Gf),this._domRoot=e}else{this._width=Sp(e,0,a),this._height=Sp(e,1,a);var u=this._domRoot=Hxe(this._width,this._height);e.appendChild(u)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.refresh=function(e){var r=this.storage.getDisplayList(!0),a=this._prevDisplayList,n=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,a,e,this._redrawId);for(var i=0;i<n.length;i++){var o=n[i],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=i===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(e){var r=e.length,a=this._hoverlayer;if(a&&a.clear(),!!r){for(var n={inHover:!0,viewWidth:this._width,viewHeight:this._height},i,o=0;o<r;o++){var s=e[o];s.__inHover&&(a||(a=this._hoverlayer=this.getLayer(b8)),i||(i=a.ctx,i.save()),dh(i,s,n,o===r-1))}i&&i.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(b8)},t.prototype.paintOne=function(e,r){KY(e,r)},t.prototype._paintList=function(e,r,a,n){if(this._redrawId===n){a=a||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,r,a),o=i.finished,s=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;Zw(function(){l._paintList(e,r,a,n)})}}},t.prototype._compositeManually=function(){var e=this.getLayer(Gf).ctx,r=this._domRoot.width,a=this._domRoot.height;e.clearRect(0,0,r,a),this.eachBuiltinLayer(function(n){n.virtual&&e.drawImage(n.dom,0,0,r,a)})},t.prototype._doPaintList=function(e,r,a){for(var n=this,i=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||a)&&i.push(u)}for(var c=!0,d=!1,h=function(x){var b=i[x],w=b.ctx,_=o&&b.createRepaintRects(e,r,v._width,v._height),T=a?b.__startIndex:b.__drawIndex,C=!a&&b.incremental&&Date.now,k=C&&Date.now(),A=b.zlevel===v._zlevelList[0]?v._backgroundColor:null;if(b.__startIndex===b.__endIndex)b.clear(!1,A,_);else if(T===b.__startIndex){var M=e[T];(!M.incremental||!M.notClear||a)&&b.clear(!1,A,_)}T===-1&&(console.error("For some unknown reason. drawIndex is -1"),T=b.__startIndex);var L,R=function(I){var F={inHover:!1,allClipped:!1,prevEl:null,viewWidth:n._width,viewHeight:n._height};for(L=T;L<b.__endIndex;L++){var G=e[L];if(G.__inHover&&(d=!0),n._doPaintEl(G,b,o,I,F,L===b.__endIndex-1),C){var O=Date.now()-k;if(O>15)break}}F.prevElClipPaths&&w.restore()};if(_)if(_.length===0)L=b.__endIndex;else for(var P=v.dpr,j=0;j<_.length;++j){var V=_[j];w.save(),w.beginPath(),w.rect(V.x*P,V.y*P,V.width*P,V.height*P),w.clip(),R(V),w.restore()}else w.save(),R(),w.restore();b.__drawIndex=L,b.__drawIndex<b.__endIndex&&(c=!1)},v=this,m=0;m<i.length;m++)h(m);return Ut.wxa&&z(this._layers,function(x){x&&x.ctx&&x.ctx.draw&&x.ctx.draw()}),{finished:c,needsRefreshHover:d}},t.prototype._doPaintEl=function(e,r,a,n,i,o){var s=r.ctx;if(a){var l=e.getPaintRect();(!n||l&&l.intersect(n))&&(dh(s,e,i,o),e.setPrevPaintRect(l))}else dh(s,e,i,o)},t.prototype.getLayer=function(e,r){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Gf);var a=this._layers[e];return a||(a=new Kk("zr_"+e,this,this.dpr),a.zlevel=e,a.__builtin__=!0,this._layerConfig[e]?Ct(a,this._layerConfig[e],!0):this._layerConfig[e-u1]&&Ct(a,this._layerConfig[e-u1],!0),r&&(a.virtual=r),this.insertLayer(e,a),a.initContext()),a},t.prototype.insertLayer=function(e,r){var a=this._layers,n=this._zlevelList,i=n.length,o=this._domRoot,s=null,l=-1;if(!a[e]&&Gxe(r)){if(i>0&&e>n[0]){for(l=0;l<i-1&&!(n[l]<e&&n[l+1]>e);l++);s=a[n[l]]}if(n.splice(l+1,0,e),a[e]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},t.prototype.eachLayer=function(e,r){for(var a=this._zlevelList,n=0;n<a.length;n++){var i=a[n];e.call(r,this._layers[i],i)}},t.prototype.eachBuiltinLayer=function(e,r){for(var a=this._zlevelList,n=0;n<a.length;n++){var i=a[n],o=this._layers[i];o.__builtin__&&e.call(r,o,i)}},t.prototype.eachOtherLayer=function(e,r){for(var a=this._zlevelList,n=0;n<a.length;n++){var i=a[n],o=this._layers[i];o.__builtin__||e.call(r,o,i)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(d,h){d.__dirty=d.__used=!1});function r(d){i&&(i.__endIndex!==d&&(i.__dirty=!0),i.__endIndex=d)}if(this._singleCanvas)for(var a=1;a<e.length;a++){var n=e[a];if(n.zlevel!==e[a-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}var i=null,o=0,s,l;for(l=0;l<e.length;l++){var n=e[l],u=n.zlevel,c=void 0;s!==u&&(s=u,o=0),n.incremental?(c=this.getLayer(u+Fxe,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?u1:0),this._needsManuallyCompositing),c.__builtin__||UE("ZLevel "+u+" has been used by unkown layer "+c.id),c!==i&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),i=c),n.__dirty&Lo&&!n.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(d,h){!d.__used&&d.getElementCount()>0&&(d.__dirty=!0,d.__startIndex=d.__endIndex=d.__drawIndex=0),d.__dirty&&d.__drawIndex<0&&(d.__drawIndex=d.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,z(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var a=this._layerConfig;a[e]?Ct(a[e],r,!0):a[e]=r;for(var n=0;n<this._zlevelList.length;n++){var i=this._zlevelList[n];if(i===e||i===e+u1){var o=this._layers[i];Ct(o,a[e],!0)}}}},t.prototype.delLayer=function(e){var r=this._layers,a=this._zlevelList,n=r[e];n&&(n.dom.parentNode.removeChild(n.dom),delete r[e],a.splice(St(a,e),1))},t.prototype.resize=function(e,r){if(this._domRoot.style){var a=this._domRoot;a.style.display="none";var n=this._opts,i=this.root;if(e!=null&&(n.width=e),r!=null&&(n.height=r),e=Sp(i,0,n),r=Sp(i,1,n),a.style.display="",this._width!==e||r!==this._height){a.style.width=e+"px",a.style.height=r+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,r);this.refresh(!0)}this._width=e,this._height=r}else{if(e==null||r==null)return;this._width=e,this._height=r,this.getLayer(Gf).resize(e,r)}return this},t.prototype.clearLayer=function(e){var r=this._layers[e];r&&r.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[Gf].dom;var r=new Kk("image",this,e.pixelRatio||this.dpr);r.initContext(),r.clear(!1,e.backgroundColor||this._backgroundColor);var a=r.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var n=r.dom.width,i=r.dom.height;this.eachLayer(function(d){d.__builtin__?a.drawImage(d.dom,0,0,n,i):d.renderToCanvas&&(a.save(),d.renderToCanvas(a),a.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];dh(a,c,o,l===u-1)}return r.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t})();function $xe(t){t.registerPainter("canvas",Uxe)}var Wxe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r){return cc(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(r){var a=new Qe,n=mn("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);a.add(n),n.setStyle(r.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=i==="none"?"circle":i,l=r.itemHeight*.8,u=mn(s,(r.itemWidth-l)/2,(r.itemHeight-l)/2,l,l,r.itemStyle.fill);a.add(u),u.setStyle(r.itemStyle);var c=r.iconRotate==="inherit"?o:r.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=ne.color.neutral00,u.style.lineWidth=2),a},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e})(Gr);function qp(t,e){var r=t.mapDimensionsAll("defaultedLabel"),a=r.length;if(a===1){var n=Up(t,e,r[0]);return n!=null?n+"":null}else if(a){for(var i=[],o=0;o<r.length;o++)i.push(Up(t,e,r[o]));return i.join(" ")}}function mq(t,e){var r=t.mapDimensionsAll("defaultedLabel");if(!be(e))return e+"";for(var a=[],n=0;n<r.length;n++){var i=t.getDimensionIndex(r[n]);i>=0&&a.push(e[i])}return a.join(" ")}var rx=(function(t){se(e,t);function e(r,a,n,i){var o=t.call(this)||this;return o.updateData(r,a,n,i),o}return e.prototype._createSymbol=function(r,a,n,i,o,s){this.removeAll();var l=mn(r,-1,-1,2,2,null,s);l.attr({z2:$e(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=Yxe,this._symbolType=r,this.add(l)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){rc(this.childAt(0))},e.prototype.downplay=function(){ac(this.childAt(0))},e.prototype.setZ=function(r,a){var n=this.childAt(0);n.zlevel=r,n.z=a},e.prototype.setDraggable=function(r,a){var n=this.childAt(0);n.draggable=r,n.cursor=!a&&r?"move":n.cursor},e.prototype.updateData=function(r,a,n,i){this.silent=!1;var o=r.getItemVisual(a,"symbol")||"circle",s=r.hostModel,l=e.getSymbolSize(r,a),u=e.getSymbolZ2(r,a),c=o!==this._symbolType,d=i&&i.disableAnimation;if(c){var h=r.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,r,a,l,u,h)}else{var v=this.childAt(0);v.silent=!1;var m={scaleX:l[0]/2,scaleY:l[1]/2};d?v.attr(m):tr(v,m,s,a),bs(v)}if(this._updateCommon(r,a,l,n,i),c){var v=this.childAt(0);if(!d){var m={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,na(v,m,s,a)}}d&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,a,n,i,o){var s=this.childAt(0),l=r.hostModel,u,c,d,h,v,m,x,b,w;if(i&&(u=i.emphasisItemStyle,c=i.blurItemStyle,d=i.selectItemStyle,h=i.focus,v=i.blurScope,x=i.labelStatesModels,b=i.hoverScale,w=i.cursorStyle,m=i.emphasisDisabled),!i||r.hasItemOption){var _=i&&i.itemModel?i.itemModel:r.getItemModel(a),T=_.getModel("emphasis");u=T.getModel("itemStyle").getItemStyle(),d=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),h=T.get("focus"),v=T.get("blurScope"),m=T.get("disabled"),x=Dn(_),b=T.getShallow("scale"),w=_.getShallow("cursor")}var C=r.getItemVisual(a,"symbolRotate");s.attr("rotation",(C||0)*Math.PI/180||0);var k=Xh(r.getItemVisual(a,"symbolOffset"),n);k&&(s.x=k[0],s.y=k[1]),w&&s.attr("cursor",w);var A=r.getItemVisual(a,"style"),M=A.fill;if(s instanceof li){var L=s.style;s.useStyle(ve({image:L.image,x:L.x,y:L.y,width:L.width,height:L.height},A))}else s.__isEmptyBrush?s.useStyle(ve({},A)):s.useStyle(A),s.style.decal=null,s.setColor(M,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var R=r.getItemVisual(a,"liftZ"),P=this._z2;R!=null?P==null&&(this._z2=s.z2,s.z2+=R):P!=null&&(s.z2=P,this._z2=null);var j=o&&o.useNameLabel;qn(s,x,{labelFetcher:l,labelDataIndex:a,defaultText:V,inheritColor:M,defaultOpacity:A.opacity});function V(G){return j?r.getName(G):qp(r,G)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=d,s.ensureState("blur").style=c;var F=b==null||b===!0?Math.max(1.1,3/this._sizeY):isFinite(b)&&b>0?+b:1;I.scaleX=this._sizeX*F,I.scaleY=this._sizeY*F,this.setSymbolScale(1),fa(this,h,v,m)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,a,n){var i=this.childAt(0),o=dt(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&Rd(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Rd(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,a){return Tm(r.getItemVisual(a,"symbolSize"))},e.getSymbolZ2=function(r,a){return r.getItemVisual(a,"z2")},e})(Qe);function Yxe(t,e){this.parent.drift(t,e)}function Qk(t,e,r,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(r))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function w8(t){return t!=null&&!it(t)&&(t={isIgnore:t}),t||{}}function S8(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:Dn(e),cursorStyle:e.get("cursor")}}var ax=(function(){function t(e){this.group=new Qe,this._SymbolCtor=e||rx}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=w8(r);var a=this.group,n=e.hostModel,i=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=S8(e),u={disableAnimation:s},c=r.getSymbolPoint||function(d){return e.getItemLayout(d)};i||a.removeAll(),e.diff(i).add(function(d){var h=c(d);if(Qk(e,h,d,r)){var v=new o(e,d,l,u);v.setPosition(h),e.setItemGraphicEl(d,v),a.add(v)}}).update(function(d,h){var v=i.getItemGraphicEl(h),m=c(d);if(!Qk(e,m,d,r)){a.remove(v);return}var x=e.getItemVisual(d,"symbol")||"circle",b=v&&v.getSymbolType&&v.getSymbolType();if(!v||b&&b!==x)a.remove(v),v=new o(e,d,l,u),v.setPosition(m);else{v.updateData(e,d,l,u);var w={x:m[0],y:m[1]};s?v.attr(w):tr(v,w,n)}a.add(v),e.setItemGraphicEl(d,v)}).remove(function(d){var h=i.getItemGraphicEl(d);h&&h.fadeOut(function(){a.remove(h)},n)}).execute(),this._getSymbolPoint=c,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(a,n){var i=e._getSymbolPoint(n);a.setPosition(i),a.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=S8(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,a){this._progressiveEls=[],a=w8(a);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var o=r.getItemLayout(i);if(Qk(r,o,i,a)){var s=new this._SymbolCtor(r,i,this._seriesScope);s.traverse(n),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(i,s),this._progressiveEls.push(s)}}},t.prototype.eachRendered=function(e){Ud(this._progressiveEls||this.group,e)},t.prototype.remove=function(e){var r=this.group,a=this._data;a&&e?a.eachItemGraphicEl(function(n){n.fadeOut(function(){r.remove(n)},a.hostModel)}):r.removeAll()},t})();function gq(t,e,r){var a=t.getBaseAxis(),n=t.getOtherAxis(a),i=Xxe(n,r),o=a.dim,s=n.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,d=Se(t.dimensions,function(m){return e.mapDimension(m)}),h=!1,v=e.getCalculationInfo("stackResultDimension");return Pd(e,d[0])&&(h=!0,d[0]=v),Pd(e,d[1])&&(h=!0,d[1]=v),{dataDimsForPoint:d,valueStart:i,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Xxe(t,e){var r=0,a=t.scale.getExtent();return e==="start"?r=a[0]:e==="end"?r=a[1]:qt(e)&&!isNaN(e)?r=e:a[0]>0?r=a[0]:a[1]<0&&(r=a[1]),r}function yq(t,e,r,a){var n=NaN;t.stacked&&(n=r.get(r.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=t.valueStart);var i=t.baseDataOffset,o=[];return o[i]=r.get(t.baseDim,a),o[1-i]=n,e.dataToPoint(o)}function qxe(t,e){var r=[];return e.diff(t).add(function(a){r.push({cmd:"+",idx:a})}).update(function(a,n){r.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){r.push({cmd:"-",idx:a})}).execute(),r}function Zxe(t,e,r,a,n,i,o,s){for(var l=qxe(t,e),u=[],c=[],d=[],h=[],v=[],m=[],x=[],b=gq(n,e,o),w=t.getLayout("points")||[],_=e.getLayout("points")||[],T=0;T<l.length;T++){var C=l[T],k=!0,A=void 0,M=void 0;switch(C.cmd){case"=":A=C.idx*2,M=C.idx1*2;var L=w[A],R=w[A+1],P=_[M],j=_[M+1];(isNaN(L)||isNaN(R))&&(L=P,R=j),u.push(L,R),c.push(P,j),d.push(r[A],r[A+1]),h.push(a[M],a[M+1]),x.push(e.getRawIndex(C.idx1));break;case"+":var V=C.idx,I=b.dataDimsForPoint,F=n.dataToPoint([e.get(I[0],V),e.get(I[1],V)]);M=V*2,u.push(F[0],F[1]),c.push(_[M],_[M+1]);var G=yq(b,n,e,V);d.push(G[0],G[1]),h.push(a[M],a[M+1]),x.push(e.getRawIndex(V));break;case"-":k=!1}k&&(v.push(C),m.push(m.length))}m.sort(function(ce,me){return x[ce]-x[me]});for(var O=u.length,U=Bl(O),$=Bl(O),K=Bl(O),q=Bl(O),H=[],T=0;T<m.length;T++){var Z=m[T],te=T*2,ie=Z*2;U[te]=u[ie],U[te+1]=u[ie+1],$[te]=c[ie],$[te+1]=c[ie+1],K[te]=d[ie],K[te+1]=d[ie+1],q[te]=h[ie],q[te+1]=h[ie+1],H[T]=v[Z]}return{current:U,next:$,stackedOnCurrent:K,stackedOnNext:q,status:H}}var Xc=Math.min,qc=Math.max;function Th(t,e){return isNaN(t)||isNaN(e)}function ED(t,e,r,a,n,i,o,s,l){for(var u,c,d,h,v,m,x=r,b=0;b<a;b++){var w=e[x*2],_=e[x*2+1];if(x>=n||x<0)break;if(Th(w,_)){if(l){x+=i;continue}break}if(x===r)t[i>0?"moveTo":"lineTo"](w,_),d=w,h=_;else{var T=w-u,C=_-c;if(T*T+C*C<.5){x+=i;continue}if(o>0){for(var k=x+i,A=e[k*2],M=e[k*2+1];A===w&&M===_&&b<a;)b++,k+=i,x+=i,A=e[k*2],M=e[k*2+1],w=e[x*2],_=e[x*2+1],T=w-u,C=_-c;var L=b+1;if(l)for(;Th(A,M)&&L<a;)L++,k+=i,A=e[k*2],M=e[k*2+1];var R=.5,P=0,j=0,V=void 0,I=void 0;if(L>=a||Th(A,M))v=w,m=_;else{P=A-u,j=M-c;var F=w-u,G=A-w,O=_-c,U=M-_,$=void 0,K=void 0;if(s==="x"){$=Math.abs(F),K=Math.abs(G);var q=P>0?1:-1;v=w-q*$*o,m=_,V=w+q*K*o,I=_}else if(s==="y"){$=Math.abs(O),K=Math.abs(U);var H=j>0?1:-1;v=w,m=_-H*$*o,V=w,I=_+H*K*o}else $=Math.sqrt(F*F+O*O),K=Math.sqrt(G*G+U*U),R=K/(K+$),v=w-P*o*(1-R),m=_-j*o*(1-R),V=w+P*o*R,I=_+j*o*R,V=Xc(V,qc(A,w)),I=Xc(I,qc(M,_)),V=qc(V,Xc(A,w)),I=qc(I,Xc(M,_)),P=V-w,j=I-_,v=w-P*$/K,m=_-j*$/K,v=Xc(v,qc(u,w)),m=Xc(m,qc(c,_)),v=qc(v,Xc(u,w)),m=qc(m,Xc(c,_)),P=w-v,j=_-m,V=w+P*K/$,I=_+j*K/$}t.bezierCurveTo(d,h,v,m,w,_),d=V,h=I}else t.lineTo(w,_)}u=w,c=_,x+=i}return b}var xq=(function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t})(),Kxe=(function(t){se(e,t);function e(r){var a=t.call(this,r)||this;return a.type="ec-polyline",a}return e.prototype.getDefaultStyle=function(){return{stroke:ne.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new xq},e.prototype.buildPath=function(r,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&Th(n[o*2-2],n[o*2-1]);o--);for(;i<o&&Th(n[i*2],n[i*2+1]);i++);}for(;i<o;)i+=ED(r,n,i,o,o,1,a.smooth,a.smoothMonotone,a.connectNulls)+1},e.prototype.getPointOn=function(r,a){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path,i=n.data,o=Ql.CMD,s,l,u=a==="x",c=[],d=0;d<i.length;){var h=i[d++],v=void 0,m=void 0,x=void 0,b=void 0,w=void 0,_=void 0,T=void 0;switch(h){case o.M:s=i[d++],l=i[d++];break;case o.L:if(v=i[d++],m=i[d++],T=u?(r-s)/(v-s):(r-l)/(m-l),T<=1&&T>=0){var C=u?(m-l)*T+l:(v-s)*T+s;return u?[r,C]:[C,r]}s=v,l=m;break;case o.C:v=i[d++],m=i[d++],x=i[d++],b=i[d++],w=i[d++],_=i[d++];var k=u?Qw(s,v,x,w,r,c):Qw(l,m,b,_,r,c);if(k>0)for(var A=0;A<k;A++){var M=c[A];if(M<=1&&M>=0){var C=u?Wn(l,m,b,_,M):Wn(s,v,x,w,M);return u?[r,C]:[C,r]}}s=w,l=_;break}}},e})(zt),Qxe=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(xq),bq=(function(t){se(e,t);function e(r){var a=t.call(this,r)||this;return a.type="ec-polygon",a}return e.prototype.getDefaultShape=function(){return new Qxe},e.prototype.buildPath=function(r,a){var n=a.points,i=a.stackedOnPoints,o=0,s=n.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&Th(n[s*2-2],n[s*2-1]);s--);for(;o<s&&Th(n[o*2],n[o*2+1]);o++);}for(;o<s;){var u=ED(r,n,o,s,s,1,a.smooth,l,a.connectNulls);ED(r,i,o+u-1,u,s,-1,a.stackedOnSmooth,l,a.connectNulls),o+=u+1,r.closePath()}},e})(zt);function wq(t,e,r,a,n){var i=t.getArea(),o=i.x,s=i.y,l=i.width,u=i.height,c=r.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var d=new Et({shape:{x:o,y:s,width:l,height:u}});if(e){var h=t.getBaseAxis(),v=h.isHorizontal(),m=h.inverse;v?(m&&(d.shape.x+=l),d.shape.width=0):(m||(d.shape.y+=u),d.shape.height=0);var x=Ke(n)?function(b){n(b,d)}:null;na(d,{shape:{width:l,height:u,x:o,y:s}},r,null,a,x)}return d}function Sq(t,e,r){var a=t.getArea(),n=dn(a.r0,1),i=dn(a.r,1),o=new Ii({shape:{cx:dn(t.cx,1),cy:dn(t.cy,1),r0:n,r:i,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}});if(e){var s=t.getBaseAxis().dim==="angle";s?o.shape.endAngle=a.startAngle:o.shape.r=n,na(o,{shape:{endAngle:a.endAngle,r:i}},r)}return o}function nx(t,e,r,a,n){if(t){if(t.type==="polar")return Sq(t,e,r);if(t.type==="cartesian2d")return wq(t,e,r,a,n)}else return null;return null}function Id(t,e){return t.type===e}function _8(t,e){if(t.length===e.length){for(var r=0;r<t.length;r++)if(t[r]!==e[r])return;return!0}}function T8(t){for(var e=1/0,r=1/0,a=-1/0,n=-1/0,i=0;i<t.length;){var o=t[i++],s=t[i++];isNaN(o)||(e=Math.min(o,e),a=Math.max(o,a)),isNaN(s)||(r=Math.min(s,r),n=Math.max(s,n))}return[[e,r],[a,n]]}function C8(t,e){var r=T8(t),a=r[0],n=r[1],i=T8(e),o=i[0],s=i[1];return Math.max(Math.abs(a[0]-o[0]),Math.abs(a[1]-o[1]),Math.abs(n[0]-s[0]),Math.abs(n[1]-s[1]))}function k8(t){return qt(t)?t:t?.5:0}function Jxe(t,e,r){if(!r.valueDim)return[];for(var a=e.count(),n=Bl(a*2),i=0;i<a;i++){var o=yq(r,t,e,i);n[i*2]=o[0],n[i*2+1]=o[1]}return n}function Zc(t,e,r,a,n){var i=r.getBaseAxis(),o=i.dim==="x"||i.dim==="radius"?0:1,s=[],l=0,u=[],c=[],d=[],h=[];if(n){for(l=0;l<t.length;l+=2){var v=e||t;!isNaN(v[l])&&!isNaN(v[l+1])&&h.push(t[l],t[l+1])}t=h}for(l=0;l<t.length-2;l+=2)switch(d[0]=t[l+2],d[1]=t[l+3],c[0]=t[l],c[1]=t[l+1],s.push(c[0],c[1]),a){case"end":u[o]=d[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var m=(c[o]+d[o])/2,x=[];u[o]=x[o]=m,u[1-o]=c[1-o],x[1-o]=d[1-o],s.push(u[0],u[1]),s.push(x[0],x[1]);break;default:u[o]=c[o],u[1-o]=d[1-o],s.push(u[0],u[1])}return s.push(t[l++],t[l++]),s}function ebe(t,e){var r=[],a=t.length,n,i;function o(c,d,h){var v=c.coord,m=(h-v)/(d.coord-v),x=yfe(m,[c.color,d.color]);return{coord:h,color:x}}for(var s=0;s<a;s++){var l=t[s],u=l.coord;if(u<0)n=l;else if(u>e){i?r.push(o(i,l,e)):n&&r.push(o(n,l,0),o(n,l,e));break}else n&&(r.push(o(n,l,0)),n=null),r.push(l),i=l}return r}function tbe(t,e,r){var a=t.getVisual("visualMeta");if(!(!a||!a.length||!t.count())&&e.type==="cartesian2d"){for(var n,i,o=a.length-1;o>=0;o--){var s=t.getDimensionInfo(a[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){i=a[o];break}}if(i){var l=e.getAxis(n),u=Se(i.stops,function(T){return{coord:l.toGlobalCoord(l.dataToCoord(T.value)),color:T.color}}),c=u.length,d=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var h=ebe(u,n==="x"?r.getWidth():r.getHeight()),v=h.length;if(!v&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var m=10,x=h[0].coord-m,b=h[v-1].coord+m,w=b-x;if(w<.001)return"transparent";z(h,function(T){T.offset=(T.coord-x)/w}),h.push({offset:v?h[v-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:v?h[0].offset:.5,color:d[0]||"transparent"});var _=new ym(0,0,0,0,h,!0);return _[n]=x,_[n+"2"]=b,_}}}function rbe(t,e,r){var a=t.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=r.getAxesByScale("ordinal")[0];if(i&&!(n&&abe(i,e))){var o=e.mapDimension(i.dim),s={};return z(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function abe(t,e){var r=t.getExtent(),a=Math.abs(r[1]-r[0])/t.scale.count();isNaN(a)&&(a=0);for(var n=e.count(),i=Math.max(1,Math.round(n/5)),o=0;o<n;o+=i)if(rx.getSymbolSize(e,o)[t.isHorizontal()?1:0]*1.5>a)return!1;return!0}function nbe(t,e){return isNaN(t)||isNaN(e)}function ibe(t){for(var e=t.length/2;e>0&&nbe(t[e*2-2],t[e*2-1]);e--);return e-1}function N8(t,e){return[t[e*2],t[e*2+1]]}function obe(t,e,r){for(var a=t.length/2,n=r==="x"?0:1,i,o,s=0,l=-1,u=0;u<a;u++)if(o=t[u*2+n],!(isNaN(o)||isNaN(t[u*2+1-n]))){if(u===0){i=o;continue}if(i<=e&&o>=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function _q(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<Qi.length;e++)if(t.get([Qi[e],"endLabel","show"]))return!0;return!1}function Jk(t,e,r,a){if(Id(e,"cartesian2d")){var n=a.getModel("endLabel"),i=n.get("valueAnimation"),o=a.getData(),s={lastFrameIndex:0},l=_q(a)?function(v,m){t._endLabelOnDuring(v,m,o,s,i,n,e)}:null,u=e.getBaseAxis().isHorizontal(),c=wq(e,r,a,function(){var v=t._endLabel;v&&r&&s.originalX!=null&&v.attr({x:s.originalX,y:s.originalY})},l);if(!a.get("clip",!0)){var d=c.shape,h=Math.max(d.width,d.height);u?(d.y-=h,d.height+=h*2):(d.x-=h,d.width+=h*2)}return l&&l(1,c),c}else return Sq(e,r,a)}function sbe(t,e){var r=e.getBaseAxis(),a=r.isHorizontal(),n=r.inverse,i=a?n?"right":"left":"center",o=a?"middle":n?"top":"bottom";return{normal:{align:t.get("align")||i,verticalAlign:t.get("verticalAlign")||o}}}var lbe=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(){var r=new Qe,a=new ax;this.group.add(a.group),this._symbolDraw=a,this._lineGroup=r,this._changePolyState=je(this._changePolyState,this)},e.prototype.render=function(r,a,n){var i=r.coordinateSystem,o=this.group,s=r.getData(),l=r.getModel("lineStyle"),u=r.getModel("areaStyle"),c=s.getLayout("points")||[],d=i.type==="polar",h=this._coordSys,v=this._symbolDraw,m=this._polyline,x=this._polygon,b=this._lineGroup,w=!a.ssr&&r.get("animation"),_=!u.isEmpty(),T=u.get("origin"),C=gq(i,s,T),k=_&&Jxe(i,s,C),A=r.get("showSymbol"),M=r.get("connectNulls"),L=A&&!d&&rbe(r,s,i),R=this._data;R&&R.eachItemGraphicEl(function(ce,me){ce.__temp&&(o.remove(ce),R.setItemGraphicEl(me,null))}),A||v.remove(),o.add(b);var P=d?!1:r.get("step"),j;i&&i.getArea&&r.get("clip",!0)&&(j=i.getArea(),j.width!=null?(j.x-=.1,j.y-=.1,j.width+=.2,j.height+=.2):j.r0&&(j.r0-=.5,j.r+=.5)),this._clipShapeForSymbol=j;var V=tbe(s,i,n)||s.getVisual("style")[s.getVisual("drawType")];if(!(m&&h.type===i.type&&P===this._step))A&&v.updateData(s,{isIgnore:L,clipShape:j,disableAnimation:!0,getSymbolPoint:function(ce){return[c[ce*2],c[ce*2+1]]}}),w&&this._initSymbolLabelAnimation(s,i,j),P&&(k&&(k=Zc(k,c,i,P,M)),c=Zc(c,null,i,P,M)),m=this._newPolyline(c),_?x=this._newPolygon(c,k):x&&(b.remove(x),x=this._polygon=null),d||this._initOrUpdateEndLabel(r,i,Ih(V)),b.setClipPath(Jk(this,i,!0,r));else{_&&!x?x=this._newPolygon(c,k):x&&!_&&(b.remove(x),x=this._polygon=null),d||this._initOrUpdateEndLabel(r,i,Ih(V));var I=b.getClipPath();if(I){var F=Jk(this,i,!1,r);na(I,{shape:F.shape},r)}else b.setClipPath(Jk(this,i,!0,r));A&&v.updateData(s,{isIgnore:L,clipShape:j,disableAnimation:!0,getSymbolPoint:function(ce){return[c[ce*2],c[ce*2+1]]}}),(!_8(this._stackedOnPoints,k)||!_8(this._points,c))&&(w?this._doUpdateAnimation(s,k,i,n,P,T,M):(P&&(k&&(k=Zc(k,c,i,P,M)),c=Zc(c,null,i,P,M)),m.setShape({points:c}),x&&x.setShape({points:c,stackedOnPoints:k})))}var G=r.getModel("emphasis"),O=G.get("focus"),U=G.get("blurScope"),$=G.get("disabled");if(m.useStyle(nt(l.getLineStyle(),{fill:"none",stroke:V,lineJoin:"bevel"})),Mn(m,r,"lineStyle"),m.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var K=m.getState("emphasis").style;K.lineWidth=+m.style.lineWidth+1}dt(m).seriesIndex=r.seriesIndex,fa(m,O,U,$);var q=k8(r.get("smooth")),H=r.get("smoothMonotone");if(m.setShape({smooth:q,smoothMonotone:H,connectNulls:M}),x){var Z=s.getCalculationInfo("stackedOnSeries"),te=0;x.useStyle(nt(u.getAreaStyle(),{fill:V,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),Z&&(te=k8(Z.get("smooth"))),x.setShape({smooth:q,stackedOnSmooth:te,smoothMonotone:H,connectNulls:M}),Mn(x,r,"areaStyle"),dt(x).seriesIndex=r.seriesIndex,fa(x,O,U,$)}var ie=this._changePolyState;s.eachItemGraphicEl(function(ce){ce&&(ce.onHoverStateChange=ie)}),this._polyline.onHoverStateChange=ie,this._data=s,this._coordSys=i,this._stackedOnPoints=k,this._points=c,this._step=P,this._valueOrigin=T,r.get("triggerLineEvent")&&(this.packEventData(r,m),x&&this.packEventData(r,x))},e.prototype.packEventData=function(r,a){dt(a).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,a,n,i){var o=r.getData(),s=Dh(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],d=l[s*2+1];if(isNaN(c)||isNaN(d)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,d))return;var h=r.get("zlevel")||0,v=r.get("z")||0;u=new rx(o,s),u.x=c,u.y=d,u.setZ(h,v);var m=u.getSymbolPath().getTextContent();m&&(m.zlevel=h,m.z=v,m.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Rr.prototype.highlight.call(this,r,a,n,i)},e.prototype.downplay=function(r,a,n,i){var o=r.getData(),s=Dh(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Rr.prototype.downplay.call(this,r,a,n,i)},e.prototype._changePolyState=function(r){var a=this._polygon;uS(this._polyline,r),a&&uS(a,r)},e.prototype._newPolyline=function(r){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new Kxe({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},e.prototype._newPolygon=function(r,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new bq({shape:{points:r,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(r,a,n){var i,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):a.type==="polar"&&(i=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");Ke(c)&&(c=c(null));var d=u.get("animationDelay")||0,h=Ke(d)?d(null):d;r.eachItemGraphicEl(function(v,m){var x=v;if(x){var b=[v.x,v.y],w=void 0,_=void 0,T=void 0;if(n)if(o){var C=n,k=a.pointToCoord(b);i?(w=C.startAngle,_=C.endAngle,T=-k[1]/180*Math.PI):(w=C.r0,_=C.r,T=k[0])}else{var A=n;i?(w=A.x,_=A.x+A.width,T=v.x):(w=A.y+A.height,_=A.y,T=v.y)}var M=_===w?0:(T-w)/(_-w);l&&(M=1-M);var L=Ke(d)?d(m):c*M+h,R=x.getSymbolPath(),P=R.getTextContent();x.attr({scaleX:0,scaleY:0}),x.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:L}),P&&P.animateFrom({style:{opacity:0}},{duration:300,delay:L}),R.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,a,n){var i=r.getModel("endLabel");if(_q(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Qt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=ibe(l);c>=0&&(qn(s,Dn(r,"endLabel"),{inheritColor:n,labelFetcher:r,labelDataIndex:c,defaultText:function(d,h,v){return v!=null?mq(o,v):qp(o,d)},enableTextSetter:!0},sbe(i,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,a,n,i,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var d=n.getLayout("points"),h=n.hostModel,v=h.get("connectNulls"),m=s.get("precision"),x=s.get("distance")||0,b=l.getBaseAxis(),w=b.isHorizontal(),_=b.inverse,T=a.shape,C=_?w?T.x:T.y+T.height:w?T.x+T.width:T.y,k=(w?x:0)*(_?-1:1),A=(w?0:-x)*(_?-1:1),M=w?"x":"y",L=obe(d,C,M),R=L.range,P=R[1]-R[0],j=void 0;if(P>=1){if(P>1&&!v){var V=N8(d,R[0]);u.attr({x:V[0]+k,y:V[1]+A}),o&&(j=h.getRawValue(R[0]))}else{var V=c.getPointOn(C,M);V&&u.attr({x:V[0]+k,y:V[1]+A});var I=h.getRawValue(R[0]),F=h.getRawValue(R[1]);o&&(j=Z$(n,m,I,F,L.t))}i.lastFrameIndex=R[0]}else{var G=r===1||i.lastFrameIndex>0?R[0]:0,V=N8(d,G);o&&(j=h.getRawValue(G)),u.attr({x:V[0]+k,y:V[1]+A})}if(o){var O=bm(u);typeof O.setLabelText=="function"&&O.setLabelText(j)}}},e.prototype._doUpdateAnimation=function(r,a,n,i,o,s,l){var u=this._polyline,c=this._polygon,d=r.hostModel,h=Zxe(this._data,r,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),v=h.current,m=h.stackedOnCurrent,x=h.next,b=h.stackedOnNext;if(o&&(m=Zc(h.stackedOnCurrent,h.current,n,o,l),v=Zc(h.current,null,n,o,l),b=Zc(h.stackedOnNext,h.next,n,o,l),x=Zc(h.next,null,n,o,l)),C8(v,x)>3e3||c&&C8(m,b)>3e3){u.stopAnimation(),u.setShape({points:x}),c&&(c.stopAnimation(),c.setShape({points:x,stackedOnPoints:b}));return}u.shape.__points=h.current,u.shape.points=v;var w={shape:{points:x}};h.current!==v&&(w.shape.__points=h.next),u.stopAnimation(),tr(u,w,d),c&&(c.setShape({points:v,stackedOnPoints:m}),c.stopAnimation(),tr(c,{shape:{stackedOnPoints:b}},d),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],T=h.status,C=0;C<T.length;C++){var k=T[C].cmd;if(k==="="){var A=r.getItemGraphicEl(T[C].idx1);A&&_.push({el:A,ptIdx:C})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var M=u.shape.__points,L=0;L<_.length;L++){var R=_[L].el,P=_[L].ptIdx*2;R.x=M[P],R.y=M[P+1],R.markRedraw()}})},e.prototype.remove=function(r){var a=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(i,o){i.__temp&&(a.remove(i),n.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e})(Rr);function ix(t,e){return{seriesType:t,plan:Sm(),reset:function(r){var a=r.getData(),n=r.coordinateSystem,i=r.pipelineContext,o=e||i.large;if(n){var s=Se(n.dimensions,function(v){return a.mapDimension(v)}).slice(0,2),l=s.length,u=a.getCalculationInfo("stackResultDimension");Pd(a,s[0])&&(s[0]=u),Pd(a,s[1])&&(s[1]=u);var c=a.getStore(),d=a.getDimensionIndex(s[0]),h=a.getDimensionIndex(s[1]);return l&&{progress:function(v,m){for(var x=v.end-v.start,b=o&&Bl(x*l),w=[],_=[],T=v.start,C=0;T<v.end;T++){var k=void 0;if(l===1){var A=c.get(d,T);k=n.dataToPoint(A,null,_)}else w[0]=c.get(d,T),w[1]=c.get(h,T),k=n.dataToPoint(w,null,_);o?(b[C++]=k[0],b[C++]=k[1]):m.setItemLayout(T,k.slice())}o&&m.setLayout("points",b)}}}}}}var ube={average:function(t){for(var e=0,r=0,a=0;a<t.length;a++)isNaN(t[a])||(e+=t[a],r++);return r===0?NaN:e/r},sum:function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r]||0;return e},max:function(t){for(var e=-1/0,r=0;r<t.length;r++)t[r]>e&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r<t.length;r++)t[r]<e&&(e=t[r]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},cbe=function(t){return Math.round(t.length/2)};function Tq(t){return{seriesType:t,reset:function(e,r,a){var n=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,s=n.count();if(s>10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),d=a.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(d||1),v=Math.round(s/h);if(isFinite(v)&&v>1){i==="lttb"?e.setData(n.lttbDownSample(n.mapDimension(u.dim),1/v)):i==="minmax"&&e.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/v));var m=void 0;Ie(i)?m=ube[i]:Ke(i)&&(m=i),m&&e.setData(n.downSample(n.mapDimension(u.dim),1/v,m,cbe))}}}}}function dbe(t){t.registerChartView(lbe),t.registerSeriesModel(Wxe),t.registerLayout(ix("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),a=e.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",a)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,Tq("line"))}var wy=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,a){return cc(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,a,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(r),s=i.dataToPoint(o);if(n)z(i.getAxes(),function(h,v){if(h.type==="category"&&a!=null){var m=h.getTicksCoords(),x=h.getTickModel().get("alignWithLabel"),b=o[v],w=a[v]==="x1"||a[v]==="y1";if(w&&!x&&(b+=1),m.length<2)return;if(m.length===2){s[v]=h.toGlobalCoord(h.getExtent()[w?1:0]);return}for(var _=void 0,T=void 0,C=1,k=0;k<m.length;k++){var A=m[k].coord,M=k===m.length-1?m[k-1].tickValue+C:m[k].tickValue;if(M===b){T=A;break}else if(M<b)_=A;else if(_!=null&&M>b){T=(A+_)/2;break}k===1&&(C=M-m[0].tickValue)}T==null&&(_?_&&(T=m[m.length-1].coord):T=m[0].coord),s[v]=h.toGlobalCoord(T)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),d=i.getBaseAxis().isHorizontal()?0:1;s[d]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e})(Gr);Gr.registerClass(wy);var fbe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return cc(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>r&&(r=a),r},e.prototype.brushSelector=function(r,a,n){return n.rect(a.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=$d(wy.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:ne.color.primary,borderWidth:2}},realtimeSort:!1}),e})(wy),hbe=(function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t})(),DS=(function(t){se(e,t);function e(r){var a=t.call(this,r)||this;return a.type="sausage",a}return e.prototype.getDefaultShape=function(){return new hbe},e.prototype.buildPath=function(r,a){var n=a.cx,i=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,c=a.startAngle,d=a.endAngle,h=a.clockwise,v=Math.PI*2,m=h?d-c<v:c-d<v;m||(c=d-(h?v:-v));var x=Math.cos(c),b=Math.sin(c),w=Math.cos(d),_=Math.sin(d);m?(r.moveTo(x*o+n,b*o+i),r.arc(x*u+n,b*u+i,l,-Math.PI+c,c,!h)):r.moveTo(x*s+n,b*s+i),r.arc(n,i,s,c,d,!h),r.arc(w*u+n,_*u+i,l,d-Math.PI*2,d-Math.PI,!h),o!==0&&r.arc(n,i,o,d,c,h)},e})(zt);function vbe(t,e){e=e||{};var r=e.isRoundCap;return function(a,n,i){var o=n.position;if(!o||o instanceof Array)return nS(a,n,i);var s=t(o),l=n.distance!=null?n.distance:5,u=this.shape,c=u.cx,d=u.cy,h=u.r,v=u.r0,m=(h+v)/2,x=u.startAngle,b=u.endAngle,w=(x+b)/2,_=r?Math.abs(h-v)/2:0,T=Math.cos,C=Math.sin,k=c+h*T(x),A=d+h*C(x),M="left",L="top";switch(s){case"startArc":k=c+(v-l)*T(w),A=d+(v-l)*C(w),M="center",L="top";break;case"insideStartArc":k=c+(v+l)*T(w),A=d+(v+l)*C(w),M="center",L="bottom";break;case"startAngle":k=c+m*T(x)+c1(x,l+_,!1),A=d+m*C(x)+d1(x,l+_,!1),M="right",L="middle";break;case"insideStartAngle":k=c+m*T(x)+c1(x,-l+_,!1),A=d+m*C(x)+d1(x,-l+_,!1),M="left",L="middle";break;case"middle":k=c+m*T(w),A=d+m*C(w),M="center",L="middle";break;case"endArc":k=c+(h+l)*T(w),A=d+(h+l)*C(w),M="center",L="bottom";break;case"insideEndArc":k=c+(h-l)*T(w),A=d+(h-l)*C(w),M="center",L="top";break;case"endAngle":k=c+m*T(b)+c1(b,l+_,!0),A=d+m*C(b)+d1(b,l+_,!0),M="left",L="middle";break;case"insideEndAngle":k=c+m*T(b)+c1(b,-l+_,!0),A=d+m*C(b)+d1(b,-l+_,!0),M="right",L="middle";break;default:return nS(a,n,i)}return a=a||{},a.x=k,a.y=A,a.align=M,a.verticalAlign=L,a}}function pbe(t,e,r,a){if(qt(a)){t.setTextConfig({rotation:a});return}else if(be(e)){t.setTextConfig({rotation:0});return}var n=t.shape,i=n.clockwise?n.startAngle:n.endAngle,o=n.clockwise?n.endAngle:n.startAngle,s=(i+o)/2,l,u=r(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=i;break;case"endAngle":case"insideEndAngle":l=o;break;default:t.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),t.setTextConfig({rotation:c})}function c1(t,e,r){return e*Math.sin(t)*(r?-1:1)}function d1(t,e,r){return e*Math.cos(t)*(r?1:-1)}function Fl(t,e,r){var a=t.get("borderRadius");if(a==null)return r?{cornerRadius:0}:null;be(a)||(a=[a,a,a,a]);var n=Math.abs(e.r||0-e.r0||0);return{cornerRadius:Se(a,function(i){return Ks(i,n)})}}var eN=Math.max,tN=Math.min;function mbe(t,e){var r=t.getArea&&t.getArea();if(Id(t,"cartesian2d")){var a=t.getBaseAxis();if(a.type!=="category"||!a.onBand){var n=e.getLayout("bandWidth");a.isHorizontal()?(r.x-=n,r.width+=n*2):(r.y-=n,r.height+=n*2)}}return r}var gbe=(function(t){se(e,t);function e(){var r=t.call(this)||this;return r.type=e.type,r._isFirstFrame=!0,r}return e.prototype.render=function(r,a,n,i){this._model=r,this._removeOnRenderedListener(n),this._updateDrawMode(r);var o=r.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,a,n):this._renderNormal(r,a,n,i))},e.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},e.prototype.incrementalRender=function(r,a){this._progressiveEls=[],this._incrementalRenderLarge(r,a)},e.prototype.eachRendered=function(r){Ud(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var a=r.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(r,a,n,i){var o=this.group,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.getBaseAxis(),d;u.type==="cartesian2d"?d=c.isHorizontal():u.type==="polar"&&(d=c.dim==="angle");var h=r.isAnimationEnabled()?r:null,v=ybe(r,u);v&&this._enableRealtimeSort(v,s,n);var m=r.get("clip",!0)||v,x=mbe(u,s);o.removeClipPath();var b=r.get("roundCap",!0),w=r.get("showBackground",!0),_=r.getModel("backgroundStyle"),T=_.get("borderRadius")||0,C=[],k=this._backgroundEls,A=i&&i.isInitSort,M=i&&i.type==="changeAxisOrder";function L(j){var V=f1[u.type](s,j);if(!V)return null;var I=Cbe(u,d,V);return I.useStyle(_.getItemStyle()),u.type==="cartesian2d"?I.setShape("r",T):I.setShape("cornerRadius",T),C[j]=I,I}s.diff(l).add(function(j){var V=s.getItemModel(j),I=f1[u.type](s,j,V);if(I&&(w&&L(j),!(!s.hasValue(j)||!E8[u.type](I)))){var F=!1;m&&(F=A8[u.type](x,I));var G=M8[u.type](r,s,j,I,d,h,c.model,!1,b);v&&(G.forceLabelAnimation=!0),R8(G,s,j,V,I,r,d,u.type==="polar"),A?G.attr({shape:I}):v?D8(v,h,G,I,j,d,!1,!1):na(G,{shape:I},r,j),s.setItemGraphicEl(j,G),o.add(G),G.ignore=F}}).update(function(j,V){var I=s.getItemModel(j),F=f1[u.type](s,j,I);if(F){if(w){var G=void 0;k.length===0?G=L(V):(G=k[V],G.useStyle(_.getItemStyle()),u.type==="cartesian2d"?G.setShape("r",T):G.setShape("cornerRadius",T),C[j]=G);var O=f1[u.type](s,j),U=kq(d,O,u);tr(G,{shape:U},h,j)}var $=l.getItemGraphicEl(V);if(!s.hasValue(j)||!E8[u.type](F)){o.remove($);return}var K=!1;m&&(K=A8[u.type](x,F),K&&o.remove($));var q=$&&($.type==="sector"&&b||$.type==="sausage"&&!b);if(q&&($&&$u($,r,V),$=null),$?bs($):$=M8[u.type](r,s,j,F,d,h,c.model,!0,b),v&&($.forceLabelAnimation=!0),M){var H=$.getTextContent();if(H){var Z=bm(H);Z.prevValue!=null&&(Z.prevValue=Z.value)}}else R8($,s,j,I,F,r,d,u.type==="polar");A?$.attr({shape:F}):v?D8(v,h,$,F,j,d,!0,M):tr($,{shape:F},r,j,null),s.setItemGraphicEl(j,$),$.ignore=K,o.add($)}}).remove(function(j){var V=l.getItemGraphicEl(j);V&&$u(V,r,j)}).execute();var R=this._backgroundGroup||(this._backgroundGroup=new Qe);R.removeAll();for(var P=0;P<C.length;++P)R.add(C[P]);o.add(R),this._backgroundEls=C,this._data=s},e.prototype._renderLarge=function(r,a,n){this._clear(),I8(r,this.group),this._updateLargeClip(r)},e.prototype._incrementalRenderLarge=function(r,a){this._removeBackground(),I8(a,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(r){var a=r.get("clip",!0)&&nx(r.coordinateSystem,!1,r),n=this.group;a?n.setClipPath(a):n.removeClipPath()},e.prototype._enableRealtimeSort=function(r,a,n){var i=this;if(a.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(a,r,n),this._isFirstFrame=!1;else{var s=function(l){var u=a.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){i._updateSortWithinSameData(a,s,o,n)},n.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(r,a,n){var i=[];return r.each(r.mapDimension(a.dim),function(o,s){var l=n(s);l=l??NaN,i.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),i.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:Se(i,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(r,a,n){for(var i=n.scale,o=r.mapDimension(n.dim),s=Number.MAX_VALUE,l=0,u=i.getOrdinalMeta().categories.length;l<u;++l){var c=r.rawIndexOf(o,i.getRawOrdinalNumber(l)),d=c<0?Number.MIN_VALUE:a(r.indexOfRawIndex(c));if(d>s)return!0;s=d}return!1},e.prototype._isOrderDifferentInView=function(r,a){for(var n=a.scale,i=n.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,a,n,i){if(this._isOrderChangedWithinSameData(r,a,n)){var o=this._dataSort(r,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,a,n){var i=a.baseAxis,o=this._dataSort(r,i,function(s){return r.get(r.mapDimension(a.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(r,a){this._clear(this._model),this._removeOnRenderedListener(a)},e.prototype.dispose=function(r,a){this._removeOnRenderedListener(a)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var a=this.group,n=this._data;r&&r.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){$u(i,r,dt(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e})(Rr),A8={cartesian2d:function(t,e){var r=e.width<0?-1:1,a=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var n=t.x+t.width,i=t.y+t.height,o=eN(e.x,t.x),s=tN(e.x+e.width,n),l=eN(e.y,t.y),u=tN(e.y+e.height,i),c=s<o,d=u<l;return e.x=c&&o>n?s:o,e.y=d&&l>i?u:l,e.width=c?0:s-o,e.height=d?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),c||d},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var a=e.r;e.r=e.r0,e.r0=a}var n=tN(e.r,t.r),i=eN(e.r0,t.r0);e.r=n,e.r0=i;var o=n-i<0;if(r<0){var a=e.r;e.r=e.r0,e.r0=a}return o}},M8={cartesian2d:function(t,e,r,a,n,i,o,s,l){var u=new Et({shape:ve({},a),z2:1});if(u.__dataIndex=r,u.name="item",i){var c=u.shape,d=n?"height":"width";c[d]=0}return u},polar:function(t,e,r,a,n,i,o,s,l){var u=!n&&l?DS:Ii,c=new u({shape:a,z2:1});c.name="item";var d=Cq(n);if(c.calculateTextPosition=vbe(d,{isRoundCap:u===DS}),i){var h=c.shape,v=n?"r":"endAngle",m={};h[v]=n?a.r0:a.startAngle,m[v]=a[v],(s?tr:na)(c,{shape:m},i)}return c}};function ybe(t,e){var r=t.get("realtimeSort",!0),a=e.getBaseAxis();if(r&&a.type==="category"&&e.type==="cartesian2d")return{baseAxis:a,otherAxis:e.getOtherAxis(a)}}function D8(t,e,r,a,n,i,o,s){var l,u;i?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?tr:na)(r,{shape:l},e,n,null);var c=e?t.baseAxis.model:null;(o?tr:na)(r,{shape:u},c,n)}function L8(t,e){for(var r=0;r<e.length;r++)if(!isFinite(t[e[r]]))return!0;return!1}var xbe=["x","y","width","height"],bbe=["cx","cy","r","startAngle","endAngle"],E8={cartesian2d:function(t){return!L8(t,xbe)},polar:function(t){return!L8(t,bbe)}},f1={cartesian2d:function(t,e,r){var a=t.getItemLayout(e);if(!a)return null;var n=r?Sbe(r,a):0,i=a.width>0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(t,e,r){var a=t.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function wbe(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function Cq(t){return(function(e){var r=e?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+r;default:return a}}})(t)}function R8(t,e,r,a,n,i,o,s){var l=e.getItemVisual(r,"style");if(s){if(!i.get("roundCap")){var c=t.shape,d=Fl(a.getModel("itemStyle"),c,!0);ve(c,d),t.setShape(c)}}else{var u=a.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var h=a.getShallow("cursor");h&&t.attr("cursor",h);var v=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",m=Dn(a);qn(t,m,{labelFetcher:i,labelDataIndex:r,defaultText:qp(i.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var x=t.getTextContent();if(s&&x){var b=a.get(["label","position"]);t.textConfig.inside=b==="middle"?!0:null,pbe(t,b==="outside"?v:b,Cq(o),a.get(["label","rotate"]))}jW(x,m,i.getRawValue(r),function(_){return mq(e,_)});var w=a.getModel(["emphasis"]);fa(t,w.get("focus"),w.get("blurScope"),w.get("disabled")),Mn(t,a),wbe(n)&&(t.style.fill="none",t.style.stroke="none",z(t.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function Sbe(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var a=t.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(a,n,i)}var _be=(function(){function t(){}return t})(),P8=(function(t){se(e,t);function e(r){var a=t.call(this,r)||this;return a.type="largeBar",a}return e.prototype.getDefaultShape=function(){return new _be},e.prototype.buildPath=function(r,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<n.length;c+=3)l[i]=u,l[o]=n[c+2],s[i]=n[c+i],s[o]=n[c+o],r.rect(s[0],s[1],l[0],l[1])},e})(zt);function I8(t,e,r,a){var n=t.getData(),i=n.getLayout("valueAxisHorizontal")?1:0,o=n.getLayout("largeDataIndices"),s=n.getLayout("size"),l=t.getModel("backgroundStyle"),u=n.getLayout("largeBackgroundPoints");if(u){var c=new P8({shape:{points:u},incremental:!!a,silent:!0,z2:0});c.baseDimIdx=i,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),r&&r.push(c)}var d=new P8({shape:{points:n.getLayout("largePoints")},incremental:!!a,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=i,d.largeDataIndices=o,d.barWidth=s,e.add(d),d.useStyle(n.getVisual("style")),d.style.stroke=null,dt(d).seriesIndex=t.seriesIndex,t.get("silent")||(d.on("mousedown",j8),d.on("mousemove",j8)),r&&r.push(d)}var j8=I5(function(t){var e=this,r=Tbe(e,t.offsetX,t.offsetY);dt(e).dataIndex=r>=0?r:null},30,!1);function Tbe(t,e,r){for(var a=t.baseDimIdx,n=1-a,i=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,d=i.length/3;c<d;c++){var h=c*3;if(l[a]=u,l[n]=i[h+2],s[a]=i[h+a],s[n]=i[h+n],l[n]<0&&(s[n]+=l[n],l[n]=-l[n]),e>=s[0]&&e<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function kq(t,e,r){if(Id(r,"cartesian2d")){var a=e,n=r.getArea();return{x:t?a.x:n.x,y:t?n.y:a.y,width:t?a.width:n.width,height:t?n.height:a.height}}else{var n=r.getArea(),i=e;return{cx:n.cx,cy:n.cy,r0:t?n.r0:i.r0,r:t?n.r:i.r,startAngle:t?i.startAngle:0,endAngle:t?i.endAngle:Math.PI*2}}}function Cbe(t,e,r){var a=t.type==="polar"?Ii:Et;return new a({shape:kq(e,r,t),silent:!0,z2:0})}function kbe(t){t.registerChartView(gbe),t.registerSeriesModel(fbe),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,wt(MX,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,DX("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,Tq("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var a=e.componentType||"series";r.eachComponent({mainType:a,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var O8=Math.PI*2,h1=Math.PI/180;function Nbe(t,e,r){e.eachSeriesByType(t,function(a){var n=a.getData(),i=n.mapDimension("value"),o=aY(a,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,d=o.viewRect,h=-a.get("startAngle")*h1,v=a.get("endAngle"),m=a.get("padAngle")*h1;v=v==="auto"?h-O8:-v*h1;var x=a.get("minAngle")*h1,b=x+m,w=0;n.each(i,function(U){!isNaN(U)&&w++});var _=n.getSum(i),T=Math.PI/(_||w)*2,C=a.get("clockwise"),k=a.get("roseType"),A=a.get("stillShowZeroSum"),M=n.getDataExtent(i);M[0]=0;var L=C?1:-1,R=[h,v],P=L*m/2;z_(R,!C),h=R[0],v=R[1];var j=Nq(a);j.startAngle=h,j.endAngle=v,j.clockwise=C,j.cx=s,j.cy=l,j.r=u,j.r0=c;var V=Math.abs(v-h),I=V,F=0,G=h;if(n.setLayout({viewRect:d,r:u}),n.each(i,function(U,$){var K;if(isNaN(U)){n.setItemLayout($,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:C,cx:s,cy:l,r0:c,r:k?NaN:u});return}k!=="area"?K=_===0&&A?T:U*T:K=V/w,K<b?(K=b,I-=b):F+=U;var q=G+L*K,H=0,Z=0;m>K?(H=G+L*K/2,Z=H):(H=G+P,Z=q-P),n.setItemLayout($,{angle:K,startAngle:H,endAngle:Z,clockwise:C,cx:s,cy:l,r0:c,r:k?pr(U,M,[c,u]):u}),G=q}),I<O8&&w)if(I<=.001){var O=V/w;n.each(i,function(U,$){if(!isNaN(U)){var K=n.getItemLayout($);K.angle=O;var q=0,H=0;O<m?(q=h+L*($+1/2)*O,H=q):(q=h+L*$*O+P,H=h+L*($+1)*O-P),K.startAngle=q,K.endAngle=H}})}else T=I/F,G=h,n.each(i,function(U,$){if(!isNaN(U)){var K=n.getItemLayout($),q=K.angle===b?b:U*T,H=0,Z=0;q<m?(H=G+L*q/2,Z=H):(H=G+P,Z=G+L*q-P),K.startAngle=H,K.endAngle=Z,G+=L*q}})})}var Nq=jt();function km(t){return{seriesType:t,reset:function(e,r){var a=r.findComponents({mainType:"legend"});if(!(!a||!a.length)){var n=e.getData();n.filterSelf(function(i){for(var o=n.getName(i),s=0;s<a.length;s++)if(!a[s].isSelected(o))return!1;return!0})}}}}var Abe=Math.PI/180;function z8(t,e,r,a,n,i,o,s,l,u){if(t.length<2)return;function c(x){for(var b=x.rB,w=b*b,_=0;_<x.list.length;_++){var T=x.list[_],C=Math.abs(T.label.y-r),k=a+T.len,A=k*k,M=Math.sqrt(Math.abs((1-C*C/w)*A)),L=e+(M+T.len2)*n,R=L-T.label.x,P=T.targetTextWidth-R*n;Aq(T,P,!0),T.label.x=L}}function d(x){for(var b={list:[],maxY:0},w={list:[],maxY:0},_=0;_<x.length;_++)if(x[_].labelAlignTo==="none"){var T=x[_],C=T.label.y>r?w:b,k=Math.abs(T.label.y-r);if(k>=C.maxY){var A=T.label.x-e-T.len2*n,M=a+T.len,L=Math.abs(A)<M?Math.sqrt(k*k/(1-A*A/M/M)):M;C.rB=L,C.maxY=k}C.list.push(T)}c(b),c(w)}for(var h=t.length,v=0;v<h;v++)if(t[v].position==="outer"&&t[v].labelAlignTo==="labelLine"){var m=t[v].label.x-u;t[v].linePoints[1][0]+=m,t[v].label.x=u}AD(t,1,l,l+o)&&d(t)}function Mbe(t,e,r,a,n,i,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h<t.length;h++){var v=t[h].label;rN(t[h])||(v.x<e?(c=Math.min(c,v.x),l.push(t[h])):(d=Math.max(d,v.x),u.push(t[h])))}for(var h=0;h<t.length;h++){var m=t[h];if(!rN(m)&&m.linePoints){if(m.labelStyleWidth!=null)continue;var v=m.label,x=m.linePoints,b=void 0;m.labelAlignTo==="edge"?v.x<e?b=x[2][0]-m.labelDistance-o-m.edgeDistance:b=o+n-m.edgeDistance-x[2][0]-m.labelDistance:m.labelAlignTo==="labelLine"?v.x<e?b=c-o-m.bleedMargin:b=o+n-d-m.bleedMargin:v.x<e?b=v.x-o-m.bleedMargin:b=o+n-v.x-m.bleedMargin,m.targetTextWidth=b,Aq(m,b,!1)}}z8(u,e,r,a,1,n,i,o,s,d),z8(l,e,r,a,-1,n,i,o,s,c);for(var h=0;h<t.length;h++){var m=t[h];if(!rN(m)&&m.linePoints){var v=m.label,x=m.linePoints,w=m.labelAlignTo==="edge",_=v.style.padding,T=_?_[1]+_[3]:0,C=v.style.backgroundColor?0:T,k=m.rect.width+C,A=x[1][0]-x[2][0];w?v.x<e?x[2][0]=o+m.edgeDistance+k+m.labelDistance:x[2][0]=o+n-m.edgeDistance-k-m.labelDistance:(v.x<e?x[2][0]=v.x+m.labelDistance:x[2][0]=v.x-m.labelDistance,x[1][0]=x[2][0]+A),x[1][1]=x[2][1]=v.y}}}function Aq(t,e,r){if(t.labelStyleWidth==null){var a=t.label,n=a.style,i=t.rect,o=n.backgroundColor,s=n.padding,l=s?s[1]+s[3]:0,u=n.overflow,c=i.width+(o?0:l);if(e<c||r){if(u&&u.match("break")){a.setStyle("backgroundColor",null),a.setStyle("width",e-l);var d=a.getBoundingRect();a.setStyle("width",Math.ceil(d.width)),a.setStyle("backgroundColor",o)}else{var h=e-l,v=e<c?h:r?h>t.unconstrainedWidth?null:h:null;a.setStyle("width",v)}Mq(i,a)}}}function Mq(t,e){B8.rect=t,JX(B8,e,Dbe)}var Dbe={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},B8={};function rN(t){return t.position==="center"}function Lbe(t){var e=t.getData(),r=[],a,n,i=!1,o=(t.get("minShowLabelAngle")||0)*Abe,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,d=s.y,h=s.height;function v(A){A.ignore=!0}function m(A){if(!A.ignore)return!0;for(var M in A.states)if(A.states[M].ignore===!1)return!0;return!1}e.each(function(A){var M=e.getItemGraphicEl(A),L=M.shape,R=M.getTextContent(),P=M.getTextGuideLine(),j=e.getItemModel(A),V=j.getModel("label"),I=V.get("position")||j.get(["emphasis","label","position"]),F=V.get("distanceToLabelLine"),G=V.get("alignTo"),O=Pe(V.get("edgeDistance"),u),U=V.get("bleedMargin");U==null&&(U=Math.min(u,h)>200?10:2);var $=j.getModel("labelLine"),K=$.get("length");K=Pe(K,u);var q=$.get("length2");if(q=Pe(q,u),Math.abs(L.endAngle-L.startAngle)<o){z(R.states,v),R.ignore=!0,P&&(z(P.states,v),P.ignore=!0);return}if(m(R)){var H=(L.startAngle+L.endAngle)/2,Z=Math.cos(H),te=Math.sin(H),ie,ce,me,ze;a=L.cx,n=L.cy;var Ce=I==="inside"||I==="inner";if(I==="center")ie=L.cx,ce=L.cy,ze="center";else{var ge=(Ce?(L.r+L.r0)/2*Z:L.r*Z)+a,Be=(Ce?(L.r+L.r0)/2*te:L.r*te)+n;if(ie=ge+Z*3,ce=Be+te*3,!Ce){var _e=ge+Z*(K+l-L.r),Oe=Be+te*(K+l-L.r),xt=_e+(Z<0?-1:1)*q,Ye=Oe;G==="edge"?ie=Z<0?c+O:c+u-O:ie=xt+(Z<0?-F:F),ce=Ye,me=[[ge,Be],[_e,Oe],[xt,Ye]]}ze=Ce?"center":G==="edge"?Z>0?"right":"left":Z>0?"left":"right"}var st=Math.PI,We=0,At=V.get("rotate");if(qt(At))We=At*(st/180);else if(I==="center")We=0;else if(At==="radial"||At===!0){var kt=Z<0?-H+st:-H;We=kt}else if(At==="tangential"&&I!=="outside"&&I!=="outer"){var Jt=Math.atan2(Z,te);Jt<0&&(Jt=st*2+Jt);var Nr=te>0;Nr&&(Jt=st+Jt),We=Jt-st}if(i=!!We,R.x=ie,R.y=ce,R.rotation=We,R.setStyle({verticalAlign:"middle"}),Ce){R.setStyle({align:ze});var Fe=R.states.select;Fe&&(Fe.x+=R.x,Fe.y+=R.y)}else{var rr=new ot(0,0,0,0);Mq(rr,R),r.push({label:R,labelLine:P,position:I,len:K,len2:q,minTurnAngle:$.get("minTurnAngle"),maxSurfaceAngle:$.get("maxSurfaceAngle"),surfaceNormal:new at(Z,te),linePoints:me,textAlign:ze,labelDistance:F,labelAlignTo:G,edgeDistance:O,bleedMargin:U,rect:rr,unconstrainedWidth:rr.width,labelStyleWidth:R.style.width})}M.setTextConfig({inside:Ce})}}),!i&&t.get("avoidLabelOverlap")&&Mbe(r,a,n,l,u,h,c,d);for(var x=0;x<r.length;x++){var b=r[x],w=b.label,_=b.labelLine,T=isNaN(w.x)||isNaN(w.y);if(w){w.setStyle({align:b.textAlign}),T&&(z(w.states,v),w.ignore=!0);var C=w.states.select;C&&(C.x+=w.x,C.y+=w.y)}if(_){var k=b.linePoints;T||!k?(z(_.states,v),_.ignore=!0):(ZX(k,b.minTurnAngle),Kye(k,b.surfaceNormal,b.maxSurfaceAngle),_.setShape({points:k}),w.__hostTarget.textGuideLineConfig={anchor:new at(k[0][0],k[0][1])})}}}var Ebe=(function(t){se(e,t);function e(r,a,n){var i=t.call(this)||this;i.z2=2;var o=new Qt;return i.setTextContent(o),i.updateData(r,a,n,!0),i}return e.prototype.updateData=function(r,a,n,i){var o=this,s=r.hostModel,l=r.getItemModel(a),u=l.getModel("emphasis"),c=r.getItemLayout(a),d=ve(Fl(l.getModel("itemStyle"),c,!0),c);if(isNaN(d.startAngle)){o.setShape(d);return}if(i){o.setShape(d);var h=s.getShallow("animationType");s.ecModel.ssr?(na(o,{scaleX:0,scaleY:0},s,{dataIndex:a,isFrom:!0}),o.originX=d.cx,o.originY=d.cy):h==="scale"?(o.shape.r=c.r0,na(o,{shape:{r:c.r}},s,a)):n!=null?(o.setShape({startAngle:n,endAngle:n}),na(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,a)):(o.shape.endAngle=c.startAngle,tr(o,{shape:{endAngle:c.endAngle}},s,a))}else bs(o),tr(o,{shape:d},s,a);o.useStyle(r.getItemVisual(a,"style")),Mn(o,l);var v=(c.startAngle+c.endAngle)/2,m=s.get("selectedOffset"),x=Math.cos(v)*m,b=Math.sin(v)*m,w=l.getShallow("cursor");w&&o.attr("cursor",w),this._updateLabel(s,r,a),o.ensureState("emphasis").shape=ve({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},Fl(u.getModel("itemStyle"),c)),ve(o.ensureState("select"),{x,y:b,shape:Fl(l.getModel(["select","itemStyle"]),c)}),ve(o.ensureState("blur"),{shape:Fl(l.getModel(["blur","itemStyle"]),c)});var _=o.getTextGuideLine(),T=o.getTextContent();_&&ve(_.ensureState("select"),{x,y:b}),ve(T.ensureState("select"),{x,y:b}),fa(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,a,n){var i=this,o=a.getItemModel(n),s=o.getModel("labelLine"),l=a.getItemVisual(n,"style"),u=l&&l.fill,c=l&&l.opacity;qn(i,Dn(o),{labelFetcher:a.hostModel,labelDataIndex:n,inheritColor:u,defaultOpacity:c,defaultText:r.getFormattedLabel(n,"normal")||a.getName(n)});var d=i.getTextContent();i.setTextConfig({position:null,rotation:null}),d.attr({z2:10});var h=o.get(["label","position"]);if(h!=="outside"&&h!=="outer")i.removeTextGuideLine();else{var v=this.getTextGuideLine();v||(v=new xi,this.setTextGuideLine(v)),X5(this,q5(o),{stroke:u,opacity:Io(s.get(["lineStyle","opacity"]),c,1)})}},e})(Ii),Rbe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,a,n,i){var o=r.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),d=1;isNaN(c&&c.startAngle)&&d<o.count();++d)c=o.getItemLayout(d);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var h=Nq(r),v=new Ii({shape:et(h)});v.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=v,l.add(v)}o.diff(s).add(function(m){var x=new Ebe(o,m,u);o.setItemGraphicEl(m,x),l.add(x)}).update(function(m,x){var b=s.getItemGraphicEl(x);b.updateData(o,m,u),b.off("click"),l.add(b),o.setItemGraphicEl(m,b)}).remove(function(m){var x=s.getItemGraphicEl(m);$u(x,r,m)}).execute(),Lbe(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(r,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=r[0]-i.cx,s=r[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="pie",e})(Rr);function Nm(t,e,r){e=be(e)&&{coordDimensions:e}||ve({encodeDefine:t.getEncode()},e);var a=t.getSource(),n=ex(a,e).dimensions,i=new Zi(n,t);return i.initData(a,r),i}var Am=(function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var a=this._getDataWithEncodedVisual();return a.getItemVisual(e,r)},t})(),Pbe=jt(),Dq=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Am(je(this.getData,this),je(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Nm(this,{coordDimensions:["value"],encodeDefaulter:wt(N5,this)})},e.prototype.getDataParams=function(r){var a=this.getData(),n=Pbe(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=rhe(o,a.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=i[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){Mh(r,"labelLine",["show"]);var a=r.labelLine,n=r.emphasis.labelLine;a.show=a.show&&r.label.show,n.show=n.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e})(Gr);Hpe({fullType:Dq.type,getCoord2:function(t){return t.getShallow("center")}});function Ibe(t){return{seriesType:t,reset:function(e,r){var a=e.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(qt(o)&&!isNaN(o)&&o<0)})}}}function jbe(t){t.registerChartView(Rbe),t.registerSeriesModel(Dq),XY("pie",t.registerAction),t.registerLayout(wt(Nbe,"pie")),t.registerProcessor(km("pie")),t.registerProcessor(Ibe("pie"))}var Obe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,a){return cc(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(r,a,n){return n.point(a.getItemLayout(r))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:ne.color.primary}},universalTransition:{divideShape:"clone"}},e})(Gr),Lq=4,zbe=(function(){function t(){}return t})(),Bbe=(function(t){se(e,t);function e(r){var a=t.call(this,r)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.getDefaultShape=function(){return new zbe},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(r,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&i[0]<Lq,c=this.softClipShape,d;if(u){this._ctx=l;return}for(this._ctx=null,d=this._off;d<n.length;){var h=n[d++],v=n[d++];isNaN(h)||isNaN(v)||c&&!c.contain(h,v)||(s.x=h-i[0]/2,s.y=v-i[1]/2,s.width=i[0],s.height=i[1],o.buildPath(r,s,!0))}this.incremental&&(this._off=d,this.notClear=!0)},e.prototype.afterBrush=function(){var r=this.shape,a=r.points,n=r.size,i=this._ctx,o=this.softClipShape,s;if(i){for(s=this._off;s<a.length;){var l=a[s++],u=a[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||i.fillRect(l-n[0]/2,u-n[1]/2,n[0],n[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(r,a){for(var n=this.shape,i=n.points,o=n.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=i.length/2-1;u>=0;u--){var c=u*2,d=i[c]-s/2,h=i[c+1]-l/2;if(r>=d&&a>=h&&r<=d+s&&a<=h+l)return u}return-1},e.prototype.contain=function(r,a){var n=this.transformCoordToLocal(r,a),i=this.getBoundingRect();if(r=n[0],a=n[1],i.contain(r,a)){var o=this.hoverDataIdx=this.findDataIndex(r,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var a=this.shape,n=a.points,i=a.size,o=i[0],s=i[1],l=1/0,u=1/0,c=-1/0,d=-1/0,h=0;h<n.length;){var v=n[h++],m=n[h++];l=Math.min(v,l),c=Math.max(v,c),u=Math.min(m,u),d=Math.max(m,d)}r=this._rect=new ot(l-o/2,u-s/2,c-l+o,d-u+s)}return r},e})(zt),Vbe=(function(){function t(){this.group=new Qe}return t.prototype.updateData=function(e,r){this._clear();var a=this._create();a.setShape({points:e.getLayout("points")}),this._setCommon(a,e,r)},t.prototype.updateLayout=function(e){var r=e.getLayout("points");this.group.eachChild(function(a){if(a.startIndex!=null){var n=(a.endIndex-a.startIndex)*2,i=a.startIndex*4*2;r=new Float32Array(r.buffer,i,n)}a.setShape("points",r),a.reset()})},t.prototype.incrementalPrepareUpdate=function(e){this._clear()},t.prototype.incrementalUpdate=function(e,r,a){var n=this._newAdded[0],i=r.getLayout("points"),o=n&&n.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+i.length);l.set(o),l.set(i,s),n.endIndex=e.end,n.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:i}),this._setCommon(u,r,a)}},t.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},t.prototype._create=function(){var e=new Bbe({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},t.prototype._setCommon=function(e,r,a){var n=r.hostModel;a=a||{};var i=r.getVisual("symbolSize");e.setShape("size",i instanceof Array?i:[i,i]),e.softClipShape=a.clipShape||null,e.symbolProxy=mn(r.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<Lq;e.useStyle(n.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=r.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=dt(e);u.seriesIndex=n.seriesIndex,e.on("mousemove",function(c){u.dataIndex=null;var d=e.hoverDataIdx;d>=0&&(u.dataIndex=d+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t})(),Fbe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n){var i=r.getData(),o=this._updateSymbolDraw(i,r);o.updateData(i,{clipShape:this._getClipShape(r)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(r,a,n){var i=r.getData(),o=this._updateSymbolDraw(i,r);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(r,a,n){this._symbolDraw.incrementalUpdate(r,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=r.end===a.getData().count()},e.prototype.updateTransform=function(r,a,n){var i=r.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=ix("").reset(r,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},e.prototype._getClipShape=function(r){if(r.get("clip",!0)){var a=r.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},e.prototype._updateSymbolDraw=function(r,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new Vbe:new ax,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(r,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e})(Rr),Eq={left:0,right:0,top:0,bottom:0},LS=["25%","25%"],Gbe=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(r,a){var n=Wh(r.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&r.outerBounds&&Jl(r.outerBounds,n)},e.prototype.mergeOption=function(r,a){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Jl(this.option.outerBounds,r.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:Eq,outerBoundsContain:"all",outerBoundsClampWidth:LS[0],outerBoundsClampHeight:LS[1],backgroundColor:ne.color.transparent,borderWidth:1,borderColor:ne.color.neutral30},e})(Gt),RD=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Ia).models[0]},e.type="cartesian2dAxis",e})(Gt);gn(RD,tx);var Rq={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:ne.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:ne.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:ne.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[ne.color.backgroundTint,ne.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:ne.color.neutral00,borderColor:ne.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},Hbe=Ct({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},Rq),rR=Ct({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:ne.color.axisMinorSplitLine,width:1}}},Rq),Ube=Ct({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},rR),$be=nt({logBase:10},rR);const Pq={category:Hbe,value:rR,time:Ube,log:$be};var Wbe={value:1,category:1,time:1,log:1},PD=null;function Ybe(t){PD||(PD=t)}function ox(){return PD}function Zp(t,e,r,a){z(Wbe,function(n,i){var o=Ct(Ct({},Pq[i],!0),a,!0),s=(function(l){se(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+i,c}return u.prototype.mergeDefaultAndTheme=function(c,d){var h=dy(this),v=h?Wh(c):{},m=d.getTheme();Ct(c,m.get(i+"Axis")),Ct(c,this.getDefaultOption()),c.type=V8(c),h&&Jl(c,v,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=gy.createByAxisModel(this))},u.prototype.getCategories=function(c){var d=this.option;if(d.type==="category")return c?d.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var d=ox();return d?d.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+i,u.defaultOption=o,u})(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",V8)}function V8(t){return t.type||(t.data?"category":"value")}var Xbe=(function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return Se(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),mr(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t})(),ID=["x","y"];function F8(t){return(t.type==="interval"||t.type==="time")&&!t.hasBreaks()}var qbe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=ID,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!F8(r)||!F8(a))){var n=r.getExtent(),i=a.getExtent(),o=this.dataToPoint([n[0],i[0]]),s=this.dataToPoint([n[1],i[1]]),l=n[1]-n[0],u=i[1]-i[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,d=(s[1]-o[1])/u,h=o[0]-n[0]*c,v=o[1]-i[0]*d,m=this._transform=[c,0,0,d,h,v];this._invTransform=Zs([],m)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var a=this.getAxis("x"),n=this.getAxis("y");return a.contain(a.toLocalCoord(r[0]))&&n.contain(n.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,a){var n=this.dataToPoint(r),i=this.dataToPoint(a),o=this.getArea(),s=new ot(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,a,n){n=n||[];var i=r[0],o=r[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return tn(n,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(i,a)),n[1]=l.toGlobalCoord(l.dataToCoord(o,a)),n},e.prototype.clampData=function(r,a){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),s=i.getExtent(),l=n.parse(r[0]),u=i.parse(r[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},e.prototype.pointToData=function(r,a,n){if(n=n||[],this._invTransform)return tn(n,r,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(r[0]),a),n[1]=o.coordToData(o.toLocalCoord(r[1]),a),n},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var a=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(a[0],a[1])-r,o=Math.min(n[0],n[1])-r,s=Math.max(a[0],a[1])-i+r,l=Math.max(n[0],n[1])-o+r;return new ot(i,o,s,l)},e})(Xbe),Iq=(function(t){se(e,t);function e(r,a,n,i,o){var s=t.call(this,r,a,n)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),r&&a[0]>a[1]&&a.reverse(),a},e.prototype.pointToData=function(r,a){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),a)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e})(al),a2="expandAxisBreak",jq="collapseAxisBreak",Oq="toggleAxisBreak",aR="axisbreakchanged",Zbe={type:a2,event:aR,update:"update",refineEvent:nR},Kbe={type:jq,event:aR,update:"update",refineEvent:nR},Qbe={type:Oq,event:aR,update:"update",refineEvent:nR};function nR(t,e,r,a){var n=[];return z(t,function(i){n=n.concat(i.eventBreaks)}),{eventContent:{breaks:n}}}function Jbe(t){t.registerAction(Zbe,e),t.registerAction(Kbe,e),t.registerAction(Qbe,e);function e(r,a){var n=[],i=kp(a,r);function o(s,l){z(i[s],function(u){var c=u.updateAxisBreaks(r);z(c.breaks,function(d){var h;n.push(nt((h={},h[l]=u.componentIndex,h),d))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:n}}}var md=Math.PI,e1e=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],t1e=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Kp=jt(),zq=jt(),Bq=(function(){function t(e){this.recordMap={},this.resolveAxisNameOverlap=e}return t.prototype.ensureRecord=function(e){var r=e.axis.dim,a=e.componentIndex,n=this.recordMap,i=n[r]||(n[r]=[]);return i[a]||(i[a]={ready:{}})},t})();function r1e(t,e,r,a){var n=r.axis,i=e.ensureRecord(r),o=[],s,l=iR(t.axisName)&&Xp(t.nameLocation);z(a,function(m){var x=eu(m);if(!(!x||x.label.ignore)){o.push(x);var b=i.transGroup;l&&(b.transform?Zs(Gg,b.transform):M_(Gg),x.transform&&Ul(Gg,Gg,x.transform),ot.copy(v1,x.localRect),v1.applyTransform(Gg),s?s.union(v1):ot.copy(s=new ot(0,0,0,0),v1))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",c=i.transGroup[u];if(o.sort(function(m,x){return Math.abs(m.label[u]-c)-Math.abs(x.label[u]-c)}),l&&s){var d=n.getExtent(),h=Math.min(d[0],d[1]),v=Math.max(d[0],d[1])-h;s.union(new ot(h,0,v,1))}i.stOccupiedRect=s,i.labelInfoList=o}var Gg=oi(),v1=new ot(0,0,0,0),Vq=function(t,e,r,a,n,i){if(Xp(t.nameLocation)){var o=i.stOccupiedRect;o&&Fq(exe({},o,i.transGroup.transform),a,n)}else Gq(i.labelInfoList,i.dirVec,a,n)};function Fq(t,e,r){var a=new at;t2(t,e,a,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&kD(e,a)}function Gq(t,e,r,a){for(var n=at.dot(a,e)>=0,i=0,o=t.length;i<o;i++){var s=t[n?i:o-1-i];s.label.ignore||Fq(s,r,a)}}var Ki=(function(){function t(e,r,a,n){this.group=new Qe,this._axisModel=e,this._api=r,this._local={},this._shared=n||new Bq(Vq),this._resetCfgDetermined(a)}return t.prototype.updateCfg=function(e){var r=this._cfg.raw;r.position=e.position,r.labelOffset=e.labelOffset,this._resetCfgDetermined(r)},t.prototype.__getRawCfg=function(){return this._cfg.raw},t.prototype._resetCfgDetermined=function(e){var r=this._axisModel,a=r.getDefaultOption?r.getDefaultOption():{},n=$e(e.axisName,r.get("name")),i=r.get("nameMoveOverlap");(i==null||i==="auto")&&(i=$e(e.defaultNameMoveOverlap,!0));var o={raw:e,position:e.position,rotation:e.rotation,nameDirection:$e(e.nameDirection,1),tickDirection:$e(e.tickDirection,1),labelDirection:$e(e.labelDirection,1),labelOffset:$e(e.labelOffset,0),silent:$e(e.silent,!0),axisName:n,nameLocation:Io(r.get("nameLocation"),a.nameLocation,"end"),shouldNameMoveOverlap:iR(n)&&i,optionHideOverlap:r.get(["axisLabel","hideOverlap"]),showMinorTicks:r.get(["minorTick","show"])};this._cfg=o;var s=new Qe({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(r);l.transGroup=this._transformGroup,l.dirVec=new at(Math.cos(-o.rotation),Math.sin(-o.rotation))},t.prototype.build=function(e,r){var a=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),z(a1e,function(n){e[n]&&n1e[n](a._cfg,a._local,a._shared,a._axisModel,a.group,a._transformGroup,a._api,r||{})}),this},t.innerTextLayout=function(e,r,a){var n=B$(r-e),i,o;return iy(n)?(o=a>0?"top":"bottom",i="center"):iy(n-md)?(o=a>0?"bottom":"top",i="center"):(o="middle",n>0&&n<md?i=a>0?"right":"left":i=a>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t})(),a1e=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],n1e={axisLine:function(t,e,r,a,n,i,o){var s=a.get(["axisLine","show"]);if(s==="auto"&&(s=!0,t.raw.axisLineAutoShow!=null&&(s=!!t.raw.axisLineAutoShow)),!!s){var l=a.axis.getExtent(),u=i.transform,c=[l[0],0],d=[l[1],0],h=c[0]>d[0];u&&(tn(c,c,u),tn(d,d,u));var v=ve({lineCap:"round"},a.getModel(["axisLine","lineStyle"]).getLineStyle()),m={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(a.get(["axisLine","breakLine"])&&a.axis.scale.hasBreaks())ox().buildAxisBreakLine(a,n,i,m);else{var x=new fn(ve({shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]}},m));Hp(x.shape,x.style.lineWidth),x.anid="line",n.add(x)}var b=a.get(["axisLine","symbol"]);if(b!=null){var w=a.get(["axisLine","symbolSize"]);Ie(b)&&(b=[b,b]),(Ie(w)||qt(w))&&(w=[w,w]);var _=Xh(a.get(["axisLine","symbolOffset"])||0,w),T=w[0],C=w[1];z([{rotate:t.rotation+Math.PI/2,offset:_[0],r:0},{rotate:t.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((c[0]-d[0])*(c[0]-d[0])+(c[1]-d[1])*(c[1]-d[1]))}],function(k,A){if(b[A]!=="none"&&b[A]!=null){var M=mn(b[A],-T/2,-C/2,T,C,v.stroke,!0),L=k.r+k.offset,R=h?d:c;M.attr({rotation:k.rotate,x:R[0]+L*Math.cos(t.rotation),y:R[1]-L*Math.sin(t.rotation),silent:!0,z2:11}),n.add(M)}})}}},axisTickLabelEstimate:function(t,e,r,a,n,i,o,s){var l=H8(e,n,s);l&&G8(t,e,r,a,n,i,o,Qs.estimate)},axisTickLabelDetermine:function(t,e,r,a,n,i,o,s){var l=H8(e,n,s);l&&G8(t,e,r,a,n,i,o,Qs.determine);var u=l1e(t,n,i,a);s1e(t,e.labelLayoutList,u),u1e(t,n,i,a,t.tickDirection)},axisName:function(t,e,r,a,n,i,o,s){var l=r.ensureRecord(a);e.nameEl&&(n.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=t.axisName;if(iR(u)){var c=t.nameLocation,d=t.nameDirection,h=a.getModel("nameTextStyle"),v=a.get("nameGap")||0,m=a.axis.getExtent(),x=a.axis.inverse?-1:1,b=new at(0,0),w=new at(0,0);c==="start"?(b.x=m[0]-x*v,w.x=-x):c==="end"?(b.x=m[1]+x*v,w.x=x):(b.x=(m[0]+m[1])/2,b.y=t.labelOffset+d*v,w.y=d);var _=oi();w.transform(Hd(_,_,t.rotation));var T=a.get("nameRotate");T!=null&&(T=T*md/180);var C,k;Xp(c)?C=Ki.innerTextLayout(t.rotation,T??t.rotation,d):(C=i1e(t.rotation,c,T||0,m),k=t.raw.axisNameAvailableWidth,k!=null&&(k=Math.abs(k/Math.sin(C.rotation)),!isFinite(k)&&(k=null)));var A=h.getFont(),M=a.get("nameTruncate",!0)||{},L=M.ellipsis,R=yi(t.raw.nameTruncateMaxWidth,M.maxWidth,k),P=s.nameMarginLevel||0,j=new Qt({x:b.x,y:b.y,rotation:C.rotation,silent:Ki.isLabelSilent(a),style:Fr(h,{text:u,font:A,overflow:"truncate",width:R,ellipsis:L,fill:h.getTextColor()||a.get(["axisLine","lineStyle","color"]),align:h.get("align")||C.textAlign,verticalAlign:h.get("verticalAlign")||C.textVerticalAlign}),z2:1});if(uc({el:j,componentModel:a,itemName:u}),j.__fullText=u,j.anid="name",a.get("triggerEvent")){var V=Ki.makeAxisEventDataBase(a);V.targetType="axisName",V.name=u,dt(j).eventData=V}i.add(j),j.updateTransform(),e.nameEl=j;var I=l.nameLayout=eu({label:j,priority:j.z2,defaultAttr:{ignore:j.ignore},marginDefault:Xp(c)?e1e[P]:t1e[P]});if(l.nameLocation=c,n.add(j),j.decomposeTransform(),t.shouldNameMoveOverlap&&I){var F=r.ensureRecord(a);r.resolveAxisNameOverlap(t,r,a,I,w,F)}}}};function G8(t,e,r,a,n,i,o,s){Uq(e)||c1e(t,e,n,s,a,o);var l=e.labelLayoutList;d1e(t,a,l,i),v1e(a,t.rotation,l);var u=t.optionHideOverlap;o1e(a,l,u),u&&eq(mr(l,function(c){return c&&!c.label.ignore})),r1e(t,r,a,l)}function i1e(t,e,r,a){var n=B$(r-t),i,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return iy(n-md/2)?(o=l?"bottom":"top",i="center"):iy(n-md*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",n<md*1.5&&n>md/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function o1e(t,e,r){if(OX(t.axis))return;function a(s,l,u){var c=eu(e[l]),d=eu(e[u]);if(!(!c||!d)){if(s===!1||c.suggestIgnore){x0(c.label);return}if(d.suggestIgnore){x0(d.label);return}var h=.1;if(!r){var v=[0,0,0,0];c=ND({marginForce:v},c),d=ND({marginForce:v},d)}t2(c,d,null,{touchThreshold:h})&&x0(s?d.label:c.label)}}var n=t.get(["axisLabel","showMinLabel"]),i=t.get(["axisLabel","showMaxLabel"]),o=e.length;a(n,0,1),a(i,o-1,o-2)}function s1e(t,e,r){t.showMinorTicks||z(e,function(a){if(a&&a.label.ignore)for(var n=0;n<r.length;n++){var i=r[n],o=zq(i),s=Kp(a.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){x0(i);return}}})}function x0(t){t&&(t.ignore=!0)}function Hq(t,e,r,a,n){for(var i=[],o=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=r,e&&(tn(o,o,e),tn(s,s,e));var c=new fn({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:a,z2:2,autoBatch:!0,silent:!0});Hp(c.shape,c.style.lineWidth),c.anid=n+"_"+t[l].tickValue,i.push(c);var d=zq(c);d.onBand=!!t[l].onBand,d.tickValue=t[l].tickValue}return i}function l1e(t,e,r,a){var n=a.axis,i=a.getModel("axisTick"),o=i.get("show");if(o==="auto"&&(o=!0,t.raw.axisTickAutoShow!=null&&(o=!!t.raw.axisTickAutoShow)),!o||n.scale.isBlank())return[];for(var s=i.getModel("lineStyle"),l=t.tickDirection*i.get("length"),u=n.getTicksCoords(),c=Hq(u,r.transform,l,nt(s.getLineStyle(),{stroke:a.get(["axisLine","lineStyle","color"])}),"ticks"),d=0;d<c.length;d++)e.add(c[d]);return c}function u1e(t,e,r,a,n){var i=a.axis,o=a.getModel("minorTick");if(!(!t.showMinorTicks||i.scale.isBlank())){var s=i.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=n*o.get("length"),c=nt(l.getLineStyle(),nt(a.getModel("axisTick").getLineStyle(),{stroke:a.get(["axisLine","lineStyle","color"])})),d=0;d<s.length;d++)for(var h=Hq(s[d],r.transform,u,c,"minorticks_"+d),v=0;v<h.length;v++)e.add(h[v])}}function H8(t,e,r){if(Uq(t)){var a=t.axisLabelsCreationContext,n=a.out.noPxChangeTryDetermine;if(r.noPxChange){for(var i=!0,o=0;o<n.length;o++)i=i&&n[o]();if(i)return!1}n.length&&(e.remove(t.labelGroup),jD(t,null,null,null))}return!0}function c1e(t,e,r,a,n,i){var o=n.axis,s=yi(t.raw.axisLabelShow,n.get(["axisLabel","show"])),l=new Qe;r.add(l);var u=TS(a);if(!s||o.scale.isBlank()){jD(e,[],l,u);return}var c=n.getModel("axisLabel"),d=o.getViewLabels(u),h=(yi(t.raw.labelRotate,c.get("rotate"))||0)*md/180,v=Ki.innerTextLayout(t.rotation,h,t.labelDirection),m=n.getCategories&&n.getCategories(!0),x=[],b=n.get("triggerEvent"),w=1/0,_=-1/0;z(d,function(C,k){var A,M=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(C.tickValue):C.tickValue,L=C.formattedLabel,R=C.rawLabel,P=c;if(m&&m[M]){var j=m[M];it(j)&&j.textStyle&&(P=new $t(j.textStyle,c,n.ecModel))}var V=P.getTextColor()||n.get(["axisLine","lineStyle","color"]),I=P.getShallow("align",!0)||v.textAlign,F=$e(P.getShallow("alignMinLabel",!0),I),G=$e(P.getShallow("alignMaxLabel",!0),I),O=P.getShallow("verticalAlign",!0)||P.getShallow("baseline",!0)||v.textVerticalAlign,U=$e(P.getShallow("verticalAlignMinLabel",!0),O),$=$e(P.getShallow("verticalAlignMaxLabel",!0),O),K=10+(((A=C.time)===null||A===void 0?void 0:A.level)||0);w=Math.min(w,K),_=Math.max(_,K);var q=new Qt({x:0,y:0,rotation:0,silent:Ki.isLabelSilent(n),z2:K,style:Fr(P,{text:L,align:k===0?F:k===d.length-1?G:I,verticalAlign:k===0?U:k===d.length-1?$:O,fill:Ke(V)?V(o.type==="category"?R:o.type==="value"?M+"":M,k):V})});q.anid="label_"+M;var H=Kp(q);if(H.break=C.break,H.tickValue=M,H.layoutRotation=v.rotation,uc({el:q,componentModel:n,itemName:L,formatterParamsExtra:{isTruncated:function(){return q.isTruncated},value:R,tickIndex:k}}),b){var Z=Ki.makeAxisEventDataBase(n);Z.targetType="axisLabel",Z.value=R,Z.tickIndex=k,C.break&&(Z.break={start:C.break.parsedBreak.vmin,end:C.break.parsedBreak.vmax}),o.type==="category"&&(Z.dataIndex=M),dt(q).eventData=Z,C.break&&h1e(n,i,q,C.break)}x.push(q),l.add(q)});var T=Se(x,function(C){return{label:C,priority:Kp(C).break?C.z2+(_-w+1):C.z2,defaultAttr:{ignore:C.ignore}}});jD(e,T,l,u)}function Uq(t){return!!t.labelLayoutList}function jD(t,e,r,a){t.labelLayoutList=e,t.labelGroup=r,t.axisLabelsCreationContext=a}function d1e(t,e,r,a){var n=e.get(["axisLabel","margin"]);z(r,function(i,o){var s=eu(i);if(s){var l=s.label,u=Kp(l);s.suggestIgnore=l.ignore,l.ignore=!1,aS(Pu,f1e),Pu.x=e.axis.dataToCoord(u.tickValue),Pu.y=t.labelOffset+t.labelDirection*n,Pu.rotation=u.layoutRotation,a.add(Pu),Pu.updateTransform(),a.remove(Pu),Pu.decomposeTransform(),aS(l,Pu),l.markRedraw(),AS(s,!0),eu(s)}})}var Pu=new Et,f1e=new Et;function iR(t){return!!t}function h1e(t,e,r,a){r.on("click",function(n){var i={type:a2,breaks:[{start:a.parsedBreak.breakOption.start,end:a.parsedBreak.breakOption.end}]};i[t.axis.dim+"AxisIndex"]=t.componentIndex,e.dispatchAction(i)})}function v1e(t,e,r){var a=hn();if(a){var n=a.retrieveAxisBreakPairs(r,function(o){return o&&Kp(o.label).break},!0),i=t.get(["breakLabelLayout","moveOverlap"],!0);(i===!0||i==="auto")&&z(n,function(o){ox().adjustBreakLabelPair(t.axis.inverse,e,[eu(r[o[0]]),eu(r[o[1]])])})}}function ES(t,e,r){r=r||{};var a=e.axis,n={},i=a.getAxesOnZeroOf()[0],o=a.position,s=i?"onZero":o,l=a.dim,u=[t.x,t.x+t.width,t.y,t.y+t.height],c={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,h=l==="x"?[u[2]-d,u[3]+d]:[u[0]-d,u[1]+d];if(i){var v=i.toGlobalCoord(i.dataToCoord(0));h[c.onZero]=Math.max(Math.min(v,h[1]),h[0])}n.position=[l==="y"?h[c[s]]:u[0],l==="x"?h[c[s]]:u[3]],n.rotation=Math.PI/2*(l==="x"?0:1);var m={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=m[o],n.labelOffset=i?h[c[o]]-h[c.onZero]:0,e.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),yi(r.labelInside,e.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var x=e.get(["axisLabel","rotate"]);return n.labelRotate=s==="top"?-x:x,n.z2=1,n}function p1e(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function U8(t){var e={xAxisModel:null,yAxisModel:null};return z(e,function(r,a){var n=a.replace(/Model$/,""),i=t.getReferringComponents(n,Ia).models[0];e[a]=i}),e}function m1e(t,e,r,a,n,i){for(var o=ES(t,r),s=!1,l=!1,u=0;u<e.length;u++)wD(e[u].getOtherAxis(r.axis).scale)&&(s=l=!0,r.axis.type==="category"&&r.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=i,new Ki(r,a,o,n)}function g1e(t,e,r){var a=ES(e,r);t.updateCfg(a)}function $q(t,e,r){var a=ic.prototype,n=a.getTicks.call(r),i=a.getTicks.call(r,{expandToNicedExtent:!0}),o=n.length-1,s=a.getInterval.call(r),l=jX(t,e),u=l.extent,c=l.fixMin,d=l.fixMax;t.type==="log"&&(u=SD(t.base,u,!0)),t.setBreaksFromOption(zX(e)),t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:d});var h=a.getExtent.call(t);c&&(u[0]=h[0]),d&&(u[1]=h[1]);var v=a.getInterval.call(t),m=u[0],x=u[1];if(c&&d)v=(x-m)/o;else if(c)for(x=u[0]+v*o;x<u[1]&&isFinite(x)&&isFinite(u[1]);)v=Fk(v),x=u[0]+v*o;else if(d)for(m=u[1]-v*o;m>u[0]&&isFinite(m)&&isFinite(u[0]);)v=Fk(v),m=u[1]-v*o;else{var b=t.getTicks().length-1;b>o&&(v=Fk(v));var w=v*o;x=Math.ceil(u[1]/v)*v,m=dn(x-w),m<0&&u[0]>=0?(m=0,x=dn(w)):x>0&&u[1]<=0&&(x=0,m=-dn(w))}var _=(n[0].value-i[0].value)/s,T=(n[o].value-i[o].value)/s;a.setExtent.call(t,m+v*_,x+v*T),a.setInterval.call(t,v),(_||T)&&a.setNiceExtent.call(t,m+v,x-v)}var $8=[[3,1],[0,2]],y1e=(function(){function t(e,r,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ID,this._initCartesian(e,r,a),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var a=this._axesMap;this._updateScale(e,this.model);function n(o){var s,l=Wt(o),u=l.length;if(u){for(var c=[],d=u-1;d>=0;d--){var h=+l[d],v=o[h],m=v.model,x=v.scale;wD(x)&&m.get("alignTicks")&&m.get("interval")==null?c.push(v):(Yp(x,m),wD(x)&&(s=v))}c.length&&(s||(s=c.pop(),Yp(s.scale,s.model)),z(c,function(b){$q(b.scale,b.model,s.scale)}))}}n(a.x),n(a.y);var i={};z(a.x,function(o){W8(a,"y",o,i)}),z(a.y,function(o){W8(a,"x",o,i)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,a){var n=Ln(e,r),i=this._rect=ha(e.getBoxLayoutParams(),n.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(OD(o,i),!a){var u=w1e(i,s,o,l,r),c=void 0;if(l)zD?(zD(this._axesList,i),OD(o,i)):c=q8(i.clone(),"axisLabel",null,i,o,u,n);else{var d=S1e(e,i,n),h=d.outerBoundsRect,v=d.parsedOuterBoundsContain,m=d.outerBoundsClamp;h&&(c=q8(h,v,m,i,o,u,n))}Wq(i,o,Qs.determine,null,c,n)}z(this._coordsList,function(x){x.calcAffineTransform()})},t.prototype.getAxis=function(e,r){var a=this._axesMap[e];if(a!=null)return a[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var a="x"+e+"y"+r;return this._coordsMap[a]}it(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,i=this._coordsList;n<i.length;n++)if(i[n].getAxis("x").index===e||i[n].getAxis("y").index===r)return i[n]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(e,r,a){var n=this._findConvertTarget(r);return n.cartesian?n.cartesian.dataToPoint(a):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(a)):null},t.prototype.convertFromPixel=function(e,r,a){var n=this._findConvertTarget(r);return n.cartesian?n.cartesian.pointToData(a):n.axis?n.axis.coordToData(n.axis.toLocalCoord(a)):null},t.prototype._findConvertTarget=function(e){var r=e.seriesModel,a=e.xAxisModel||r&&r.getReferringComponents("xAxis",Ia).models[0],n=e.yAxisModel||r&&r.getReferringComponents("yAxis",Ia).models[0],i=e.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,St(o,s)<0&&(s=null);else if(a&&n)s=this.getCartesian(a.componentIndex,n.componentIndex);else if(a)l=this.getAxis("x",a.componentIndex);else if(n)l=this.getAxis("y",n.componentIndex);else if(i){var u=i.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},t.prototype.containPoint=function(e){var r=this._coordsList[0];if(r)return r.containPoint(e)},t.prototype._initCartesian=function(e,r,a){var n=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(r.eachComponent("xAxis",u("x"),this),r.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,z(s.x,function(c,d){z(s.y,function(h,v){var m="x"+d+"y"+v,x=new qbe(m);x.master=n,x.model=e,n._coordsMap[m]=x,n._coordsList.push(x),x.addAxis(c),x.addAxis(h)})});function u(c){return function(d,h){if(aN(d,e)){var v=d.get("position");c==="x"?v!=="top"&&v!=="bottom"&&(v=o.bottom?"top":"bottom"):v!=="left"&&v!=="right"&&(v=o.left?"right":"left"),o[v]=!0;var m=new Iq(c,e2(d),[0,0],d.get("type"),v),x=m.type==="category";m.onBand=x&&d.get("boundaryGap"),m.inverse=d.get("inverse"),d.axis=m,m.model=d,m.grid=i,m.index=h,i._axesList.push(m),s[c][h]=m,l[c]++}}}},t.prototype._updateScale=function(e,r){z(this._axesList,function(n){if(n.scale.setExtent(1/0,-1/0),n.type==="category"){var i=n.model.get("categorySortInfo");n.scale.setSortInfo(i)}}),e.eachSeries(function(n){if(p1e(n)){var i=U8(n),o=i.xAxisModel,s=i.yAxisModel;if(!aN(o,r)||!aN(s,r))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=n.getData(),c=l.getAxis("x"),d=l.getAxis("y");a(u,c),a(u,d)}},this);function a(n,i){z(_S(n,i.dim),function(o){i.scale.unionExtentFromData(n,o)})}},t.prototype.getTooltipAxes=function(e){var r=[],a=[];return z(this.getCartesians(),function(n){var i=e!=null&&e!=="auto"?n.getAxis(e):n.getBaseAxis(),o=n.getOtherAxis(i);St(r,i)<0&&r.push(i),St(a,o)<0&&a.push(o)}),{baseAxes:r,otherAxes:a}},t.create=function(e,r){var a=[];return e.eachComponent("grid",function(n,i){var o=new t(n,e,r);o.name="grid_"+i,o.resize(n,r,!0),n.coordinateSystem=o,a.push(o)}),e.eachSeries(function(n){Qy({targetModel:n,coordSysType:"cartesian2d",coordSysProvider:i});function i(){var o=U8(n),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel(),c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),a},t.dimensions=ID,t})();function aN(t,e){return t.getCoordSysModel()===e}function W8(t,e,r,a){r.getAxesOnZeroOf=function(){return i?[i]:[]};var n=t[e],i,o=r.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)Y8(n[l])&&(i=n[l]);else for(var u in n)if(n.hasOwnProperty(u)&&Y8(n[u])&&!a[c(n[u])]){i=n[u];break}i&&(a[c(i)]=!0);function c(d){return d.dim+"_"+d.index}}function Y8(t){return t&&t.type!=="category"&&t.type!=="time"&&Tye(t)}function x1e(t,e){var r=t.getExtent(),a=r[0]+r[1];t.toGlobalCoord=t.dim==="x"?function(n){return n+e}:function(n){return a-n+e},t.toLocalCoord=t.dim==="x"?function(n){return n-e}:function(n){return a-n+e}}function OD(t,e){z(t.x,function(r){return X8(r,e.x,e.width)}),z(t.y,function(r){return X8(r,e.y,e.height)})}function X8(t,e,r){var a=[0,r],n=t.inverse?1:0;t.setExtent(a[n],a[1-n]),x1e(t,e)}var zD;function b1e(t){zD=t}function q8(t,e,r,a,n,i,o){Wq(a,n,Qs.estimate,e,!1,o);var s=[0,0,0,0];u(0),u(1),c(a,0,NaN),c(a,1,NaN);var l=Gh(s,function(h){return h>0})==null;return Rh(a,s,!0,!0,r),OD(n,a),l;function u(h){z(n[gt[h]],function(v){if(yy(v.model)){var m=i.ensureRecord(v.model),x=m.labelInfoList;if(x)for(var b=0;b<x.length;b++){var w=x[b],_=v.scale.normalize(Kp(w.label).tickValue);_=h===1?1-_:_,c(w.rect,h,_),c(w.rect,1-h,NaN)}var T=m.nameLayout;if(T){var _=Xp(m.nameLocation)?.5:NaN;c(T.rect,h,_),c(T.rect,1-h,NaN)}}})}function c(h,v,m){var x=t[gt[v]]-h[gt[v]],b=h[vn[v]]+h[gt[v]]-(t[vn[v]]+t[gt[v]]);x=d(x,1-m),b=d(b,m);var w=$8[v][0],_=$8[v][1];s[w]=Ja(s[w],x),s[_]=Ja(s[_],b)}function d(h,v){return h>0&&!Ei(v)&&v>1e-4&&(h/=v),h}}function w1e(t,e,r,a,n){var i=new Bq(_1e);return z(r,function(o){return z(o,function(s){if(yy(s.model)){var l=!a;s.axisBuilder=m1e(t,e,s.model,n,i,l)}})}),i}function Wq(t,e,r,a,n,i){var o=r===Qs.determine;z(e,function(u){return z(u,function(c){yy(c.model)&&(g1e(c.axisBuilder,t,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:n}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[gt[1-u]]=t[vn[u]]<=i.refContainer[vn[u]]*.5?0:1-u===1?2:1}z(e,function(u,c){return z(u,function(d){yy(d.model)&&((a==="all"||o)&&d.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&d.axisBuilder.build({axisLine:!0}))})})}function S1e(t,e,r){var a,n=t.get("outerBoundsMode",!0);n==="same"?a=e.clone():(n==null||n==="auto")&&(a=ha(t.get("outerBounds",!0)||Eq,r.refContainer));var i=t.get("outerBoundsContain",!0),o;i==null||i==="auto"||St(["all","axisLabel"],i)<0?o="all":o=i;var s=[iS($e(t.get("outerBoundsClampWidth",!0),LS[0]),e.width),iS($e(t.get("outerBoundsClampHeight",!0),LS[1]),e.height)];return{outerBoundsRect:a,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var _1e=function(t,e,r,a,n,i){var o=r.axis.dim==="x"?"y":"x";Vq(t,e,r,a,n,i),Xp(t.nameLocation)||z(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&Gq(s.labelInfoList,s.dirVec,a,n)})};function T1e(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return C1e(r,t,e),r.seriesInvolved&&N1e(r,t),r}function C1e(t,e,r){var a=e.getComponent("tooltip"),n=e.getComponent("axisPointer"),i=n.get("link",!0)||[],o=[];z(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Sy(s.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=s;var c=s.model,d=c.getModel("tooltip",a);if(z(s.getAxes(),wt(x,!1,null)),s.getTooltipAxes&&a&&d.get("show")){var h=d.get("trigger")==="axis",v=d.get(["axisPointer","type"])==="cross",m=s.getTooltipAxes(d.get(["axisPointer","axis"]));(h||v)&&z(m.baseAxes,wt(x,v?"cross":!0,h)),v&&z(m.otherAxes,wt(x,"cross",!1))}function x(b,w,_){var T=_.model.getModel("axisPointer",n),C=T.get("show");if(!(!C||C==="auto"&&!b&&!BD(T))){w==null&&(w=T.get("triggerTooltip")),T=b?k1e(_,d,n,e,b,w):T;var k=T.get("snap"),A=T.get("triggerEmphasis"),M=Sy(_.model),L=w||k||_.type==="category",R=t.axesInfo[M]={key:M,axis:_,coordSys:s,axisPointerModel:T,triggerTooltip:w,triggerEmphasis:A,involveSeries:L,snap:k,useHandle:BD(T),seriesModels:[],linkGroup:null};u[M]=R,t.seriesInvolved=t.seriesInvolved||L;var P=A1e(i,_);if(P!=null){var j=o[P]||(o[P]={axesInfo:{}});j.axesInfo[M]=R,j.mapper=i[P].mapper,R.linkGroup=j}}}})}function k1e(t,e,r,a,n,i){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};z(s,function(h){l[h]=et(o.get(h))}),l.snap=t.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!i){var d=l.lineStyle=o.get("crossStyle");d&&nt(u,d.textStyle)}}return t.model.getModel("axisPointer",new $t(l,r,a))}function N1e(t,e){e.eachSeries(function(r){var a=r.coordinateSystem,n=r.get(["tooltip","trigger"],!0),i=r.get(["tooltip","show"],!0);!a||!a.model||n==="none"||n===!1||n==="item"||i===!1||r.get(["axisPointer","show"],!0)===!1||z(t.coordSysAxesInfo[Sy(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function A1e(t,e){for(var r=e.model,a=e.dim,n=0;n<t.length;n++){var i=t[n]||{};if(nN(i[a+"AxisId"],r.id)||nN(i[a+"AxisIndex"],r.componentIndex)||nN(i[a+"AxisName"],r.name))return n}}function nN(t,e){return t==="all"||be(t)&&St(t,e)>=0||t===e}function M1e(t){var e=oR(t);if(e){var r=e.axisPointerModel,a=e.axis.scale,n=r.option,i=r.get("status"),o=r.get("value");o!=null&&(o=a.parse(o));var s=BD(r);i==null&&(n.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),n.value=o,s&&(n.status=e.axis.scale.isBlank()?"hide":"show")}}function oR(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Sy(t)]}function D1e(t){var e=oR(t);return e&&e.axisPointerModel}function BD(t){return!!t.get(["handle","show"])}function Sy(t){return t.type+"||"+t.id}var Z8={},Zh=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n,i){this.axisPointerClass&&M1e(r),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,n,!0)},e.prototype.updateAxisPointer=function(r,a,n,i){this._doUpdateAxisPointerClass(r,n,!1)},e.prototype.remove=function(r,a){var n=this._axisPointer;n&&n.remove(a)},e.prototype.dispose=function(r,a){this._disposeAxisPointer(a),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(r,a,n){var i=e.getAxisPointerClass(this.axisPointerClass);if(i){var o=D1e(r);o?(this._axisPointer||(this._axisPointer=new i)).render(r,o,a,n):this._disposeAxisPointer(a)}},e.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},e.registerAxisPointerClass=function(r,a){Z8[r]=a},e.getAxisPointerClass=function(r){return r&&Z8[r]},e.type="axis",e})(oa),VD=jt();function Yq(t,e,r,a){var n=r.axis;if(!n.scale.isBlank()){var i=r.getModel("splitArea"),o=i.getModel("areaStyle"),s=o.get("color"),l=a.coordinateSystem.getRect(),u=n.getTicksCoords({tickModel:i,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,d=VD(t).splitAreaColors,h=He(),v=0;if(d)for(var m=0;m<u.length;m++){var x=d.get(u[m].tickValue);if(x!=null){v=(x+(c-1)*m)%c;break}}var b=n.toGlobalCoord(u[0].coord),w=o.getAreaStyle();s=be(s)?s:[s];for(var m=1;m<u.length;m++){var _=n.toGlobalCoord(u[m].coord),T=void 0,C=void 0,k=void 0,A=void 0;n.isHorizontal()?(T=b,C=l.y,k=_-T,A=l.height,b=T+k):(T=l.x,C=b,k=l.width,A=_-C,b=C+A);var M=u[m-1].tickValue;M!=null&&h.set(M,v),e.add(new Et({anid:M!=null?"area_"+M:null,shape:{x:T,y:C,width:k,height:A},style:nt({fill:s[v]},w),autoBatch:!0,silent:!0})),v=(v+1)%c}VD(t).splitAreaColors=h}}}function Xq(t){VD(t).splitAreaColors=null}var L1e=["splitArea","splitLine","minorSplitLine","breakArea"],qq=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="CartesianAxisPointer",r}return e.prototype.render=function(r,a,n,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Qe,this.group.add(this._axisGroup),!!yy(r)){this._axisGroup.add(r.axis.axisBuilder.group),z(L1e,function(l){r.get([l,"show"])&&E1e[l](this,this._axisGroup,r,r.getCoordSysModel(),n)},this);var s=i&&i.type==="changeAxisOrder"&&i.isInitSort;s||Xy(o,this._axisGroup,r),t.prototype.render.call(this,r,a,n,i)}},e.prototype.remove=function(){Xq(this)},e.type="cartesianAxis",e})(Zh),E1e={splitLine:function(t,e,r,a,n){var i=r.axis;if(!i.scale.isBlank()){var o=r.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=be(l)?l:[l];for(var d=a.coordinateSystem.getRect(),h=i.isHorizontal(),v=0,m=i.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),x=[],b=[],w=s.getLineStyle(),_=0;_<m.length;_++){var T=i.toGlobalCoord(m[_].coord);if(!(_===0&&!u||_===m.length-1&&!c)){var C=m[_].tickValue;h?(x[0]=T,x[1]=d.y,b[0]=T,b[1]=d.y+d.height):(x[0]=d.x,x[1]=T,b[0]=d.x+d.width,b[1]=T);var k=v++%l.length,A=new fn({anid:C!=null?"line_"+C:null,autoBatch:!0,shape:{x1:x[0],y1:x[1],x2:b[0],y2:b[1]},style:nt({stroke:l[k]},w),silent:!0});Hp(A.shape,w.lineWidth),e.add(A)}}}},minorSplitLine:function(t,e,r,a,n){var i=r.axis,o=r.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=a.coordinateSystem.getRect(),u=i.isHorizontal(),c=i.getMinorTicksCoords();if(c.length)for(var d=[],h=[],v=s.getLineStyle(),m=0;m<c.length;m++)for(var x=0;x<c[m].length;x++){var b=i.toGlobalCoord(c[m][x].coord);u?(d[0]=b,d[1]=l.y,h[0]=b,h[1]=l.y+l.height):(d[0]=l.x,d[1]=b,h[0]=l.x+l.width,h[1]=b);var w=new fn({anid:"minor_line_"+c[m][x].tickValue,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:h[0],y2:h[1]},style:v,silent:!0});Hp(w.shape,v.lineWidth),e.add(w)}},splitArea:function(t,e,r,a,n){Yq(t,e,r,a)},breakArea:function(t,e,r,a,n){var i=ox(),o=r.axis.scale;i&&o.type!=="ordinal"&&i.rectCoordBuildBreakAxis(e,t,r,a.coordinateSystem.getRect(),n)}},Zq=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="xAxis",e})(qq),R1e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=Zq.type,r}return e.type="yAxis",e})(qq),P1e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="grid",r}return e.prototype.render=function(r,a){this.group.removeAll(),r.get("show")&&this.group.add(new Et({shape:r.coordinateSystem.getRect(),style:nt({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e})(oa),K8={offset:0};function Kq(t){t.registerComponentView(P1e),t.registerComponentModel(Gbe),t.registerCoordinateSystem("cartesian2d",y1e),Zp(t,"x",RD,K8),Zp(t,"y",RD,K8),t.registerComponentView(Zq),t.registerComponentView(R1e),t.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function I1e(t,e){var r=t.coordinateSystem,a=r&&r.type,n=r&&r.getBaseAxis&&r.getBaseAxis(),i=n&&n.scale&&n.scale.type,o=a==="cartesian2d"&&i==="ordinal"||a==="single",s=e.model.get("jitter")>0;return o&&s}var j1e=jt();function Q8(t,e,r,a){if(t instanceof Iq){var n=t.scale.type;if(n!=="category"&&n!=="ordinal")return r}var i=t.model,o=i.get("jitter"),s=i.get("jitterOverlap"),l=i.get("jitterMargin")||0,u=t.scale.type==="ordinal"?t.getBandWidth():null;return o>0?s?Qq(r,o,u,a):O1e(t,e,r,a,o,l):r}function Qq(t,e,r,a){if(r===null)return t+(Math.random()-.5)*e;var n=r-a*2,i=Math.min(Math.max(0,e),n);return t+(Math.random()-.5)*i}function O1e(t,e,r,a,n,i){var o=j1e(t);o.items||(o.items=[]);var s=o.items,l=J8(s,e,r,a,n,i,1),u=J8(s,e,r,a,n,i,-1),c=Math.abs(l-r)<Math.abs(u-r)?l:u,d=t.scale.type==="ordinal"?t.getBandWidth():null,h=Math.abs(c-r);return h>n/2||d&&h>d/2-a?Qq(r,n,d,a):(s.push({fixedCoord:e,floatCoord:c,r:a}),c)}function J8(t,e,r,a,n,i,o){for(var s=r,l=0;l<t.length;l++){var u=t[l],c=e-u.fixedCoord,d=s-u.floatCoord,h=c*c+d*d,v=a+u.r+i;if(h<v*v){var m=u.floatCoord+Math.sqrt(v*v-c*c)*o;if(Math.abs(m-r)>n/2)return Number.MAX_VALUE;if(o===1&&m>s||o===-1&&m<s){s=m,l=-1;continue}}}return s}function z1e(t){t.eachSeriesByType("scatter",function(e){var r=e.coordinateSystem;if(r&&(r.type==="cartesian2d"||r.type==="single")){var a=r.getBaseAxis?r.getBaseAxis():null,n=a&&I1e(e,a);if(n){var i=e.getData();i.each(function(o){var s=a.dim,l=a.orient,u=l==="horizontal"&&a.type!=="category"||l==="vertical"&&a.type==="category",c=i.getItemLayout(o),d=i.getItemVisual(o,"symbolSize"),h=d instanceof Array?(d[1]+d[0])/2:d;if(s==="y"||s==="single"&&u){var v=Q8(a,c[0],c[1],h/2);i.setItemLayout(o,[c[0],v])}else if(s==="x"||s==="single"&&!u){var v=Q8(a,c[1],c[0],h/2);i.setItemLayout(o,[v,c[1]])}})}}})}function B1e(t){Nt(Kq),t.registerSeriesModel(Obe),t.registerChartView(Fbe),t.registerLayout(ix("scatter"))}function V1e(t){t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,z1e)}function F1e(t){t.eachSeriesByType("radar",function(e){var r=e.getData(),a=[],n=e.coordinateSystem;if(n){var i=n.getIndicatorAxes();z(i,function(o,s){r.each(r.mapDimension(i[s].dim),function(l,u){a[u]=a[u]||[];var c=n.dataToPoint(l,s);a[u][s]=eV(c)?c:tV(n)})}),r.each(function(o){var s=Gh(a[o],function(l){return eV(l)})||tV(n);a[o].push(s.slice()),r.setItemLayout(o,a[o])})}})}function eV(t){return!isNaN(t[0])&&!isNaN(t[1])}function tV(t){return[t.cx,t.cy]}function G1e(t){var e=t.polar;if(e){be(e)||(e=[e]);var r=[];z(e,function(a,n){a.indicator?(a.type&&!a.shape&&(a.shape=a.type),t.radar=t.radar||[],be(t.radar)||(t.radar=[t.radar]),t.radar.push(a)):r.push(a)}),t.polar=r}z(t.series,function(a){a&&a.type==="radar"&&a.polarIndex&&(a.radarIndex=a.polarIndex)})}var H1e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n){var i=r.coordinateSystem,o=this.group,s=r.getData(),l=this._data;function u(h,v){var m=h.getItemVisual(v,"symbol")||"circle";if(m!=="none"){var x=Tm(h.getItemVisual(v,"symbolSize")),b=mn(m,-1,-1,2,2),w=h.getItemVisual(v,"symbolRotate")||0;return b.attr({style:{strokeNoScale:!0},z2:100,scaleX:x[0]/2,scaleY:x[1]/2,rotation:w*Math.PI/180||0}),b}}function c(h,v,m,x,b,w){m.removeAll();for(var _=0;_<v.length-1;_++){var T=u(x,b);T&&(T.__dimIdx=_,h[_]?(T.setPosition(h[_]),$h[w?"initProps":"updateProps"](T,{x:v[_][0],y:v[_][1]},r,b)):T.setPosition(v[_]),m.add(T))}}function d(h){return Se(h,function(v){return[i.cx,i.cy]})}s.diff(l).add(function(h){var v=s.getItemLayout(h);if(v){var m=new ji,x=new xi,b={shape:{points:v}};m.shape.points=d(v),x.shape.points=d(v),na(m,b,r,h),na(x,b,r,h);var w=new Qe,_=new Qe;w.add(x),w.add(m),w.add(_),c(x.shape.points,v,_,s,h,!0),s.setItemGraphicEl(h,w)}}).update(function(h,v){var m=l.getItemGraphicEl(v),x=m.childAt(0),b=m.childAt(1),w=m.childAt(2),_={shape:{points:s.getItemLayout(h)}};_.shape.points&&(c(x.shape.points,_.shape.points,w,s,h,!1),bs(b),bs(x),tr(x,_,r),tr(b,_,r),s.setItemGraphicEl(h,m))}).remove(function(h){o.remove(l.getItemGraphicEl(h))}).execute(),s.eachItemGraphicEl(function(h,v){var m=s.getItemModel(v),x=h.childAt(0),b=h.childAt(1),w=h.childAt(2),_=s.getItemVisual(v,"style"),T=_.fill;o.add(h),x.useStyle(nt(m.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:T})),Mn(x,m,"lineStyle"),Mn(b,m,"areaStyle");var C=m.getModel("areaStyle"),k=C.isEmpty()&&C.parentModel.isEmpty();b.ignore=k,z(["emphasis","select","blur"],function(M){var L=m.getModel([M,"areaStyle"]),R=L.isEmpty()&&L.parentModel.isEmpty();b.ensureState(M).ignore=R&&k;var P=m.getModel([M,"lineStyle"]).getLineStyle();x.ensureState(M).style=P;var j=L.getAreaStyle();b.ensureState(M).style=j;var V=m.getModel([M,"itemStyle"]).getItemStyle();w.eachChild(function(I){I.ensureState(M).style=et(V)})}),b.useStyle(nt(m.getModel("areaStyle").getAreaStyle(),{fill:T,opacity:.7,decal:_.decal}));var A=m.getModel("emphasis");w.eachChild(function(M){if(M instanceof li){var L=M.style;M.useStyle(ve({image:L.image,x:L.x,y:L.y,width:L.width,height:L.height},_))}else M.useStyle(_),M.setColor(T),M.style.strokeNoScale=!0;var R=s.getStore().get(s.getDimensionIndex(M.__dimIdx),v);(R==null||isNaN(R))&&(R=""),qn(M,Dn(m),{labelFetcher:s.hostModel,labelDataIndex:v,labelDimIndex:M.__dimIdx,defaultText:R,inheritColor:T,defaultOpacity:_.opacity})}),fa(h,A.get("focus"),A.get("blurScope"),A.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e})(Rr),U1e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Am(je(this.getData,this),je(this.getRawData,this))},e.prototype.getInitialData=function(r,a){return Nm(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(r,a,n){var i=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(r),u=l===""?this.name:l,c=jY(this,r);return pn("section",{header:u,sortBlocks:!0,blocks:Se(s,function(d){var h=i.get(i.mapDimension(d.dim),r);return pn("nameValue",{markerType:"subItem",markerColor:c,name:d.name,value:h,sortParam:h})})})},e.prototype.getTooltipPosition=function(r){if(r!=null){for(var a=this.getData(),n=this.coordinateSystem,i=a.getValues(Se(n.dimensions,function(u){return a.mapDimension(u)}),r),o=0,s=i.length;o<s;o++)if(!isNaN(i[o])){var l=n.getIndicatorAxes();return n.coordToPoint(l[o].dataToCoord(i[o]),o)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e})(Gr),Hg=Pq.value;function p1(t,e){return nt({show:e},t)}var $1e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){var r=this.get("boundaryGap"),a=this.get("splitNumber"),n=this.get("scale"),i=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),d=this.get("axisNameGap"),h=this.get("triggerEvent"),v=Se(this.get("indicator")||[],function(m){m.max!=null&&m.max>0&&!m.min?m.min=0:m.min!=null&&m.min<0&&!m.max&&(m.max=0);var x=l;m.color!=null&&(x=nt({color:m.color},l));var b=Ct(et(m),{boundaryGap:r,splitNumber:a,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:m.text,showName:u,nameLocation:"end",nameGap:d,nameTextStyle:x,triggerEvent:h},!1);if(Ie(c)){var w=b.name;b.name=c.replace("{value}",w??"")}else Ke(c)&&(b.name=c(b.name,b));var _=new $t(b,null,this.ecModel);return gn(_,tx.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_},this);this._indicatorModels=v},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:ne.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Ct({lineStyle:{color:ne.color.neutral20}},Hg.axisLine),axisLabel:p1(Hg.axisLabel,!1),axisTick:p1(Hg.axisTick,!1),splitLine:p1(Hg.splitLine,!0),splitArea:p1(Hg.splitArea,!0),indicator:[]},e})(Gt),W1e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n){var i=this.group;i.removeAll(),this._buildAxes(r,n),this._buildSplitLineAndArea(r)},e.prototype._buildAxes=function(r,a){var n=r.coordinateSystem,i=n.getIndicatorAxes(),o=Se(i,function(s){var l=s.model.get("showName")?s.name:"",u=new Ki(s.model,a,{axisName:l,position:[n.cx,n.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});z(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(r){var a=r.coordinateSystem,n=a.getIndicatorAxes();if(!n.length)return;var i=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),d=s.get("show"),h=l.get("color"),v=u.get("color"),m=be(h)?h:[h],x=be(v)?v:[v],b=[],w=[];function _(G,O,U){var $=U%O.length;return G[$]=G[$]||[],$}if(i==="circle")for(var T=n[0].getTicksCoords(),C=a.cx,k=a.cy,A=0;A<T.length;A++){if(c){var M=_(b,m,A);b[M].push(new lc({shape:{cx:C,cy:k,r:T[A].coord}}))}if(d&&A<T.length-1){var M=_(w,x,A);w[M].push(new Wy({shape:{cx:C,cy:k,r0:T[A].coord,r:T[A+1].coord}}))}}else for(var L,R=Se(n,function(G,O){var U=G.getTicksCoords();return L=L==null?U.length-1:Math.min(U.length-1,L),Se(U,function($){return a.coordToPoint($.coord,O)})}),P=[],A=0;A<=L;A++){for(var j=[],V=0;V<n.length;V++)j.push(R[V][A]);if(j[0]&&j.push(j[0].slice()),c){var M=_(b,m,A);b[M].push(new xi({shape:{points:j}}))}if(d&&P){var M=_(w,x,A-1);w[M].push(new ji({shape:{points:j.concat(P)}}))}P=j.slice().reverse()}var I=l.getLineStyle(),F=u.getAreaStyle();z(w,function(G,O){this.group.add(ds(G,{style:nt({stroke:"none",fill:x[O%x.length]},F),silent:!0}))},this),z(b,function(G,O){this.group.add(ds(G,{style:nt({fill:"none",stroke:m[O%m.length]},I),silent:!0}))},this)},e.type="radar",e})(oa),Y1e=(function(t){se(e,t);function e(r,a,n){var i=t.call(this,r,a,n)||this;return i.type="value",i.angle=0,i.name="",i}return e})(al),X1e=(function(){function t(e,r,a){this.dimensions=[],this._model=e,this._indicatorAxes=Se(e.getIndicatorModels(),function(n,i){var o="indicator_"+i,s=new Y1e(o,new ic);return s.name=n.get("name"),s.model=n,n.axis=s,this.dimensions.push(o),s},this),this.resize(e,a)}return t.prototype.getIndicatorAxes=function(){return this._indicatorAxes},t.prototype.dataToPoint=function(e,r){var a=this._indicatorAxes[r];return this.coordToPoint(a.dataToCoord(e),r)},t.prototype.coordToPoint=function(e,r){var a=this._indicatorAxes[r],n=a.angle,i=this.cx+e*Math.cos(n),o=this.cy-e*Math.sin(n);return[i,o]},t.prototype.pointToData=function(e){var r=e[0]-this.cx,a=e[1]-this.cy,n=Math.sqrt(r*r+a*a);r/=n,a/=n;for(var i=Math.atan2(-a,r),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],d=Math.abs(i-c.angle);d<o&&(s=c,l=u,o=d)}return[l,+(s&&s.coordToData(n))]},t.prototype.resize=function(e,r){var a=Ln(e,r).refContainer,n=e.get("center"),i=Math.min(a.width,a.height)/2;this.cx=Pe(n[0],a.width)+a.x,this.cy=Pe(n[1],a.height)+a.y,this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");(Ie(o)||qt(o))&&(o=[0,o]),this.r0=Pe(o[0],i),this.r=Pe(o[1],i),z(this._indicatorAxes,function(s,l){s.setExtent(this.r0,this.r);var u=this.startAngle+l*Math.PI*2/this._indicatorAxes.length;u=Math.atan2(Math.sin(u),Math.cos(u)),s.angle=u},this)},t.prototype.update=function(e,r){var a=this._indicatorAxes,n=this._model;z(a,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==n)){var u=s.getData();z(a,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var i=n.get("splitNumber"),o=new ic;o.setExtent(0,i),o.setInterval(1),z(a,function(s,l){$q(s.scale,s.model,o)})},t.prototype.convertToPixel=function(e,r,a){return console.warn("Not implemented."),null},t.prototype.convertFromPixel=function(e,r,a){return console.warn("Not implemented."),null},t.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},t.create=function(e,r){var a=[];return e.eachComponent("radar",function(n){var i=new t(n,e,r);a.push(i),n.coordinateSystem=i}),e.eachSeriesByType("radar",function(n){n.get("coordinateSystem")==="radar"&&(n.coordinateSystem=a[n.get("radarIndex")||0])}),a},t.dimensions=[],t})();function q1e(t){t.registerCoordinateSystem("radar",X1e),t.registerComponentModel($1e),t.registerComponentView(W1e),t.registerVisual({seriesType:"radar",reset:function(e){var r=e.getData();r.each(function(a){r.setItemVisual(a,"legendIcon","roundRect")}),r.setVisual("legendIcon","roundRect")}})}function Z1e(t){Nt(q1e),t.registerChartView(H1e),t.registerSeriesModel(U1e),t.registerLayout(F1e),t.registerProcessor(km("radar")),t.registerPreprocessor(G1e)}var sR=jt();function K1e(t,e,r){sR(t)[e]=r}function Q1e(t,e,r){var a=sR(t),n=a[e];n===r&&(a[e]=null)}function rV(t,e){return!!sR(t)[e]}nu({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},en);var J1e={axisPointer:1,tooltip:1,brush:1};function Jq(t,e,r){var a=e.getComponentByElement(t.topTarget);if(!a||a===r||J1e.hasOwnProperty(a.mainType))return!1;var n=a.coordinateSystem;if(!n||n.model===r)return!1;var i=Ph(a),o=Ph(r);return!((i.zlevel-o.zlevel||i.z-o.z)<=0)}var Kh=(function(t){se(e,t);function e(r){var a=t.call(this)||this;a._zr=r;var n=je(a._mousedownHandler,a),i=je(a._mousemoveHandler,a),o=je(a._mouseupHandler,a),s=je(a._mousewheelHandler,a),l=je(a._pinchHandler,a);return a.enable=function(u,c){var d=c.zInfo,h=Ph(d.component),v=h.z,m=h.zlevel,x={component:d.component,z:v,zlevel:m,z2:$e(d.z2,-1/0)},b=ve({},c.triggerInfo);this._opt=nt(ve({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:x,triggerInfo:b}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this._enabled=!0,this.disable(),(u===!0||u==="move"||u==="pan")&&($g(r,"mousedown",n,x),$g(r,"mousemove",i,x),$g(r,"mouseup",o,x)),(u===!0||u==="scale"||u==="zoom")&&($g(r,"mousewheel",s,x),$g(r,"pinch",l,x)))},a.disable=function(){this._enabled=!1,Wg(r,"mousedown",n),Wg(r,"mousemove",i),Wg(r,"mouseup",o),Wg(r,"mousewheel",s),Wg(r,"pinch",l)},a}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype._checkPointer=function(r,a,n){var i=this._opt,o=i.zInfoParsed;if(Jq(r,i.api,o.component))return!1;var s=i.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(r,a,n)),u&&s.isInClip&&!s.isInClip(r,a,n)&&(u=!1),u},e.prototype._decideCursorStyle=function(r,a,n,i){var o=r.target;if(!o&&this._checkPointer(r,a,n))return"grab";if(i)return o&&o.cursor||"default"},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(r){if(!(x4(r)||Ug(r))){for(var a=r.target;a;){if(a.draggable)return;a=a.__hostTarget||a.parent}var n=r.offsetX,i=r.offsetY;this._checkPointer(r,n,i)&&(this._x=n,this._y=i,this._dragging=!0)}},e.prototype._mousemoveHandler=function(r){var a=this._zr;if(!(r.gestureEvent==="pinch"||rV(a,"globalPan")||Ug(r))){var n=r.offsetX,i=r.offsetY;if(!this._dragging||!_w("moveOnMouseMove",r,this._opt)){var o=this._decideCursorStyle(r,n,i,!1);o&&a.setCursorStyle(o);return}a.setCursorStyle("grabbing");var s=this._x,l=this._y,u=n-s,c=i-l;this._x=n,this._y=i,this._opt.preventDefaultMouseMove&&ec(r.event),r.__ecRoamConsumed=!0,aV(this,"pan","moveOnMouseMove",r,{dx:u,dy:c,oldX:s,oldY:l,newX:n,newY:i,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(r){if(!Ug(r)){var a=this._zr;if(!x4(r)){this._dragging=!1;var n=this._decideCursorStyle(r,r.offsetX,r.offsetY,!0);n&&a.setCursorStyle(n)}}},e.prototype._mousewheelHandler=function(r){if(!Ug(r)){var a=_w("zoomOnMouseWheel",r,this._opt),n=_w("moveOnMouseWheel",r,this._opt),i=r.wheelDelta,o=Math.abs(i),s=r.offsetX,l=r.offsetY;if(!(i===0||!a&&!n)){if(a){var u=o>3?1.4:o>1?1.2:1.1,c=i>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(n){var d=Math.abs(i),h=(i>0?1:-1)*(d>3?.4:d>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(r){if(!(rV(this._zr,"globalPan")||Ug(r))){var a=r.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,r,{scale:a,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(r,a,n,i,o){r._checkPointer(i,o.originX,o.originY)&&(ec(i.event),i.__ecRoamConsumed=!0,aV(r,a,n,i,o))},e})(ws);function Ug(t){return t.__ecRoamConsumed}var ewe=jt();function n2(t){var e=ewe(t);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function $g(t,e,r,a){for(var n=n2(t),i=n.roam,o=i[e]=i[e]||[],s=0;s<o.length;s++){var l=o[s].zInfoParsed;if((l.zlevel-a.zlevel||l.z-a.z||l.z2-a.z2)<=0)break}o.splice(s,0,{listener:r,zInfoParsed:a}),twe(t,e)}function Wg(t,e,r){for(var a=n2(t),n=a.roam[e]||[],i=0;i<n.length;i++)if(n[i].listener===r){n.splice(i,1),n.length||rwe(t,e);return}}function twe(t,e){var r=n2(t);r.uniform[e]||t.on(e,r.uniform[e]=function(a){var n=r.roam[e];if(n)for(var i=0;i<n.length;i++)n[i].listener(a)})}function rwe(t,e){var r=n2(t),a=r.uniform;a[e]&&(t.off(e,a[e]),a[e]=null)}function aV(t,e,r,a,n){n.isAvailableBehavior=je(_w,null,r,a),t.trigger(e,n)}function _w(t,e,r){var a=r[t];return!t||a&&(!Ie(a)||e.event[a+"Key"])}function lR(t,e,r){var a=t.target;a.x+=e,a.y+=r,a.dirty()}function uR(t,e,r,a){var n=t.target,i=t.zoomLimit,o=t.zoom=t.zoom||1;o*=e,o=cR(o,i);var s=o/t.zoom;t.zoom=o,tZ(n,r,a,s),n.dirty()}function eZ(t,e,r,a,n,i){var o=new ot(0,0,0,0);a.enable(t.get("roam"),{api:e,zInfo:{component:t},triggerInfo:{roamTrigger:t.get("roamTrigger"),isInSelf:function(u,c,d){return o.copy(r.getBoundingRect()),o.applyTransform(r.getComputedTransform()),o.contain(c,d)},isInClip:function(u,c,d){return!i||i.contain(c,d)}}}),n.zoomLimit=t.get("scaleLimit");var s=t.coordinateSystem;n.zoom=s?s.getZoom():1;var l=t.subType+"Roam";a.off("pan").off("zoom").on("pan",function(u){lR(n,u.dx,u.dy),e.dispatchAction({seriesId:t.id,type:l,dx:u.dx,dy:u.dy})}).on("zoom",function(u){uR(n,u.scale,u.originX,u.originY),e.dispatchAction({seriesId:t.id,type:l,zoom:u.scale,originX:u.originX,originY:u.originY}),e.updateLabelLayout()})}function nV(t,e){return t.pointToProjected?t.pointToProjected(e):t.pointToData(e)}function i2(t,e,r){var a=t.getZoom(),n=t.getCenter(),i=e.zoom,o=t.projectedToPoint?t.projectedToPoint(n):t.dataToPoint(n);return e.dx!=null&&e.dy!=null&&(o[0]-=e.dx,o[1]-=e.dy,t.setCenter(nV(t,o))),i!=null&&(i=cR(a*i,r)/a,tZ(t,e.originX,e.originY,i),t.updateTransform(),t.setCenter(nV(t,o)),t.setZoom(i*a)),{center:t.getCenter(),zoom:t.getZoom()}}function tZ(t,e,r,a){t.x-=(e-t.x)*(a-1),t.y-=(r-t.y)*(a-1),t.scaleX*=a,t.scaleY*=a}function cR(t,e){if(e){var r=e.min||0,a=e.max||1/0;t=Math.max(Math.min(a,t),r)}return t}function rZ(t){if(Ie(t)){var e=new DOMParser;t=e.parseFromString(t,"text/xml")}var r=t;for(r.nodeType===9&&(r=r.firstChild);r.nodeName.toLowerCase()!=="svg"||r.nodeType!==1;)r=r.nextSibling;return r}var iN,RS={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},iV=Wt(RS),PS={"alignment-baseline":"textBaseline","stop-color":"stopColor"},oV=Wt(PS),awe=(function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(e,r){r=r||{};var a=rZ(e);this._defsUsePending=[];var n=new Qe;this._root=n;var i=[],o=a.getAttribute("viewBox")||"",s=parseFloat(a.getAttribute("width")||r.width),l=parseFloat(a.getAttribute("height")||r.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),No(a,n,null,!0,!1);for(var u=a.firstChild;u;)this._parseNode(u,n,i,null,!1,!1),u=u.nextSibling;owe(this._defs,this._defsUsePending),this._defsUsePending=[];var c,d;if(o){var h=o2(o);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(d=nZ(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var v=n;n=new Qe,n.add(v),v.scaleX=v.scaleY=d.scale,v.x=d.x,v.y=d.y}return!r.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new Et({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:c,viewBoxTransform:d,named:i}},t.prototype._parseNode=function(e,r,a,n,i,o){var s=e.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!i){var c=iN[s];if(c&&Ve(iN,s)){l=c.call(this,e,r);var d=e.getAttribute("name");if(d){var h={name:d,namedFrom:null,svgNodeTagLower:s,el:l};a.push(h),s==="g"&&(u=h)}else n&&a.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});r.add(l)}}var v=sV[s];if(v&&Ve(sV,s)){var m=v.call(this,e),x=e.getAttribute("id");x&&(this._defs[x]=m)}}if(l&&l.isGroup)for(var b=e.firstChild;b;)b.nodeType===1?this._parseNode(b,l,a,u,i,o):b.nodeType===3&&o&&this._parseText(b,l),b=b.nextSibling},t.prototype._parseText=function(e,r){var a=new Gp({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});es(r,a),No(e,a,this._defsUsePending,!1,!1),nwe(a,r);var n=a.style,i=n.fontSize;i&&i<9&&(n.fontSize=9,a.scaleX*=i/9,a.scaleY*=i/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=a.getBoundingRect();return this._textX+=s.width,r.add(a),a},t.internalField=(function(){iN={g:function(e,r){var a=new Qe;return es(r,a),No(e,a,this._defsUsePending,!1,!1),a},rect:function(e,r){var a=new Et;return es(r,a),No(e,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(e,r){var a=new lc;return es(r,a),No(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),a.silent=!0,a},line:function(e,r){var a=new fn;return es(r,a),No(e,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(e,r){var a=new G_;return es(r,a),No(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(e,r){var a=e.getAttribute("points"),n;a&&(n=cV(a));var i=new ji({shape:{points:n||[]},silent:!0});return es(r,i),No(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,r){var a=e.getAttribute("points"),n;a&&(n=cV(a));var i=new xi({shape:{points:n||[]},silent:!0});return es(r,i),No(e,i,this._defsUsePending,!1,!1),i},image:function(e,r){var a=new li;return es(r,a),No(e,a,this._defsUsePending,!1,!1),a.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),a.silent=!0,a},text:function(e,r){var a=e.getAttribute("x")||"0",n=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var s=new Qe;return es(r,s),No(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,r){var a=e.getAttribute("x"),n=e.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),n!=null&&(this._textY=parseFloat(n));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new Qe;return es(r,s),No(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,r){var a=e.getAttribute("d")||"",n=wW(a);return es(r,n),No(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}})(),t})(),sV={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),r=parseInt(t.getAttribute("y1")||"0",10),a=parseInt(t.getAttribute("x2")||"10",10),n=parseInt(t.getAttribute("y2")||"0",10),i=new ym(e,r,a,n);return lV(t,i),uV(t,i),i},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),r=parseInt(t.getAttribute("cy")||"0",10),a=parseInt(t.getAttribute("r")||"0",10),n=new CW(e,r,a);return lV(t,n),uV(t,n),n}};function lV(t,e){var r=t.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(e.global=!0)}function uV(t,e){for(var r=t.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var a=r.getAttribute("offset"),n=void 0;a&&a.indexOf("%")>0?n=parseInt(a,10)/100:a?n=parseFloat(a):n=0;var i={};aZ(r,i,i);var o=i.stopColor||r.getAttribute("stop-color")||"#000000",s=i.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=ho(o),u=l&&l[3];u&&(l[3]*=Td(s),o=$l(l,"rgba"))}e.colorStops.push({offset:n,color:o})}r=r.nextSibling}}function es(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),nt(e.__inheritedStyle,t.__inheritedStyle))}function cV(t){for(var e=o2(t),r=[],a=0;a<e.length;a+=2){var n=parseFloat(e[a]),i=parseFloat(e[a+1]);r.push([n,i])}return r}function No(t,e,r,a,n){var i=e,o=i.__inheritedStyle=i.__inheritedStyle||{},s={};t.nodeType===1&&(uwe(t,e),aZ(t,o,s),a||cwe(t,o,s)),i.style=i.style||{},o.fill!=null&&(i.style.fill=dV(i,"fill",o.fill,r)),o.stroke!=null&&(i.style.stroke=dV(i,"stroke",o.stroke,r)),z(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(i.style[l]=parseFloat(o[l]))}),z(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(i.style[l]=o[l])}),n&&(i.__selfStyle=s),o.lineDash&&(i.style.lineDash=Se(o2(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(i.invisible=!0),o.display==="none"&&(i.ignore=!0)}function nwe(t,e){var r=e.__selfStyle;if(r){var a=r.textBaseline,n=a;!a||a==="auto"||a==="baseline"?n="alphabetic":a==="before-edge"||a==="text-before-edge"?n="top":a==="after-edge"||a==="text-after-edge"?n="bottom":(a==="central"||a==="mathematical")&&(n="middle"),t.style.textBaseline=n}var i=e.__inheritedStyle;if(i){var o=i.textAlign,s=o;o&&(o==="middle"&&(s="center"),t.style.textAlign=s)}}var iwe=/^url\(\s*#(.*?)\)/;function dV(t,e,r,a){var n=r&&r.match(iwe);if(n){var i=vs(n[1]);a.push([t,e,i]);return}return r==="none"&&(r=null),r}function owe(t,e){for(var r=0;r<e.length;r++){var a=e[r];a[0].style[a[1]]=t[a[2]]}}var swe=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function o2(t){return t.match(swe)||[]}var lwe=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,oN=Math.PI/180;function uwe(t,e){var r=t.getAttribute("transform");if(r){r=r.replace(/,/g," ");var a=[],n=null;r.replace(lwe,function(d,h,v){return a.push(h,v),""});for(var i=a.length-1;i>0;i-=2){var o=a[i],s=a[i-1],l=o2(o);switch(n=n||oi(),s){case"translate":Zl(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":qE(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Hd(n,n,-parseFloat(l[0])*oN,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*oN);Ul(n,[1,0,u,1,0,0],n);break;case"skewY":var c=Math.tan(parseFloat(l[0])*oN);Ul(n,[1,c,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}e.setLocalTransform(n)}}var fV=/([^\s:;]+)\s*:\s*([^:;]+)/g;function aZ(t,e,r){var a=t.getAttribute("style");if(a){fV.lastIndex=0;for(var n;(n=fV.exec(a))!=null;){var i=n[1],o=Ve(RS,i)?RS[i]:null;o&&(e[o]=n[2]);var s=Ve(PS,i)?PS[i]:null;s&&(r[s]=n[2])}}}function cwe(t,e,r){for(var a=0;a<iV.length;a++){var n=iV[a],i=t.getAttribute(n);i!=null&&(e[RS[n]]=i)}for(var a=0;a<oV.length;a++){var n=oV[a],i=t.getAttribute(n);i!=null&&(r[PS[n]]=i)}}function nZ(t,e){var r=e.width/t.width,a=e.height/t.height,n=Math.min(r,a);return{scale:n,x:-(t.x+t.width/2)*n+(e.x+e.width/2),y:-(t.y+t.height/2)*n+(e.y+e.height/2)}}function dwe(t,e){var r=new awe;return r.parse(t,e)}var fwe=He(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),hwe=(function(){function t(e,r){this.type="geoSVG",this._usedGraphicMap=He(),this._freedGraphics=[],this._mapName=e,this._parsedXML=rZ(r)}return t.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var r=pwe(e.named),a=r.regions,n=r.regionsMap;this._regions=a,this._regionsMap=n}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},t.prototype._buildGraphic=function(e){var r,a;try{r=e&&dwe(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},a=r.root,Pi(a!=null)}catch(b){throw new Error(`Invalid svg format
`+b.message)}var n=new Qe;n.add(a),n.isGeoSVGGraphicRoot=!0;var i=r.width,o=r.height,s=r.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,d=void 0,h=void 0;if(i!=null?(u=0,d=i):s&&(u=s.x,d=s.width),o!=null?(c=0,h=o):s&&(c=s.y,h=s.height),u==null||c==null){var v=a.getBoundingRect();u==null&&(u=v.x,d=v.width),c==null&&(c=v.y,h=v.height)}l=this._boundingRect=new ot(u,c,d,h)}if(s){var m=nZ(s,l);a.scaleX=a.scaleY=m.scale,a.x=m.x,a.y=m.y}n.setClipPath(new Et({shape:l.plain()}));var x=[];return z(r.named,function(b){fwe.get(b.svgNodeTagLower)!=null&&(x.push(b),vwe(b.el))}),{root:n,boundingRect:l,named:x}},t.prototype.useGraphic=function(e){var r=this._usedGraphicMap,a=r.get(e);return a||(a=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),r.set(e,a),a)},t.prototype.freeGraphic=function(e){var r=this._usedGraphicMap,a=r.get(e);a&&(r.removeKey(e),this._freedGraphics.push(a))},t})();function vwe(t){t.silent=!1,t.isGroup&&t.traverse(function(e){e.silent=!1})}function pwe(t){var e=[],r=He();return z(t,function(a){if(a.namedFrom==null){var n=new Dye(a.name,a.el);e.push(n),r.set(a.name,n)}}),{regions:e,regionsMap:r}}var FD=[126,25],hV="南海诸岛",Wf=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var Hf=0;Hf<Wf.length;Hf++)for(var Hv=0;Hv<Wf[Hf].length;Hv++)Wf[Hf][Hv][0]/=10.5,Wf[Hf][Hv][1]/=-10.5/.75,Wf[Hf][Hv][0]+=FD[0],Wf[Hf][Hv][1]+=FD[1];function mwe(t,e){if(t==="china"){for(var r=0;r<e.length;r++)if(e[r].name===hV)return;e.push(new VX(hV,Se(Wf,function(a){return{type:"polygon",exterior:a}}),FD))}}var gwe={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function ywe(t,e){if(t==="china"){var r=gwe[e.name];if(r){var a=e.getCenter();a[0]+=r[0]/10.5,a[1]+=-r[1]/(10.5/.75),e.setCenter(a)}}}var xwe=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function bwe(t,e){t==="china"&&e.name==="台湾"&&e.geometries.push({type:"polygon",exterior:xwe[0]})}var wwe="name",Swe=(function(){function t(e,r,a){this.type="geoJSON",this._parsedMap=He(),this._mapName=e,this._specialAreas=a,this._geoJSON=Twe(r)}return t.prototype.load=function(e,r){r=r||wwe;var a=this._parsedMap.get(r);if(!a){var n=this._parseToRegions(r);a=this._parsedMap.set(r,{regions:n,boundingRect:_we(n)})}var i=He(),o=[];return z(a.regions,function(s){var l=s.name;e&&Ve(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),i.set(l,s)}),{regions:o,boundingRect:a.boundingRect||new ot(0,0,0,0),regionsMap:i}},t.prototype._parseToRegions=function(e){var r=this._mapName,a=this._geoJSON,n;try{n=a?Eye(a,e):[]}catch(i){throw new Error(`Invalid geoJson format
`+i.message)}return mwe(r,n),z(n,function(i){var o=i.name;ywe(r,i),bwe(r,i);var s=this._specialAreas&&this._specialAreas[o];s&&i.transformTo(s.left,s.top,s.width,s.height)},this),n},t.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},t})();function _we(t){for(var e,r=0;r<t.length;r++){var a=t[r].getBoundingRect();e=e||a.clone(),e.union(a)}return e}function Twe(t){return Ie(t)?typeof JSON<"u"&&JSON.parse?JSON.parse(t):new Function("return ("+t+");")():t}var Yg=He();const oc={registerMap:function(t,e,r){if(e.svg){var a=new hwe(t,e.svg);Yg.set(t,a)}else{var n=e.geoJson||e.geoJSON;n&&!e.features?r=e.specialAreas:n=e;var a=new Swe(t,n,r);Yg.set(t,a)}},getGeoResource:function(t){return Yg.get(t)},getMapForUser:function(t){var e=Yg.get(t);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(t,e,r){var a=Yg.get(t);if(a)return a.load(e,r)}};var dR=["rect","circle","line","ellipse","polygon","polyline","path"],Cwe=He(dR),kwe=He(dR.concat(["g"])),Nwe=He(dR.concat(["g"])),iZ=jt();function m1(t){var e=t.getItemStyle(),r=t.get("areaColor");return r!=null&&(e.fill=r),e}function vV(t){var e=t.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var oZ=(function(){function t(e){var r=this.group=new Qe,a=this._transformGroup=new Qe;r.add(a),this.uid=wm("ec_map_draw"),this._controller=new Kh(e.getZr()),this._controllerHost={target:a},a.add(this._regionsGroup=new Qe),a.add(this._svgGroup=new Qe)}return t.prototype.draw=function(e,r,a,n,i){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&r.eachComponent({mainType:"series",subType:"map"},function(T){!s&&T.getHostGeoModel()===e&&(s=T.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this._transformGroup,d=l.getTransformInfo(),h=d.raw,v=d.roam,m=!u.childAt(0)||i,x=e.getShallow("clip",!0),b;x?(b=l.getViewRect().clone(),this.group.setClipPath(new Et({shape:b.clone()}))):this.group.removeClipPath(),m?(c.x=v.x,c.y=v.y,c.scaleX=v.scaleX,c.scaleY=v.scaleY,c.dirty()):tr(c,v,e);var w=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,_={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:w,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(_):l.resourceType==="geoSVG"&&this._buildSVG(_),this._updateController(e,b,r,a),this._updateMapSelectHandler(e,u,a,n)},t.prototype._buildGeoJSON=function(e){var r=this._regionsGroupByName=He(),a=He(),n=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(v,m){return m&&(v=m(v)),v&&[v[0]*i.scaleX+i.x,v[1]*i.scaleY+i.y]}function d(v){for(var m=[],x=!u&&l&&l.project,b=0;b<v.length;++b){var w=c(v[b],x);w&&m.push(w)}return m}function h(v){return{shape:{points:d(v)}}}n.removeAll(),z(e.geo.regions,function(v){var m=v.name,x=r.get(m),b=a.get(m)||{},w=b.dataIdx,_=b.regionModel;if(!x){x=r.set(m,new Qe),n.add(x),w=s?s.indexOfName(m):null,_=e.isGeo?o.getRegionModel(m):s?s.getItemModel(w):null;var T=_.get("silent",!0);T!=null&&(x.silent=T),a.set(m,{dataIdx:w,regionModel:_})}var C=[],k=[];z(v.geometries,function(L){if(L.type==="polygon"){var R=[L.exterior].concat(L.interiors||[]);u&&(R=bV(R,u)),z(R,function(j){C.push(new ji(h(j)))})}else{var P=L.points;u&&(P=bV(P,u,!0)),z(P,function(j){k.push(new xi(h(j)))})}});var A=c(v.getCenter(),l&&l.project);function M(L,R){if(L.length){var P=new U_({culling:!0,segmentIgnoreThreshold:1,shape:{paths:L}});x.add(P),pV(e,P,w,_),mV(e,P,m,_,o,w,A),R&&(vV(P),z(P.states,vV))}}M(C),M(k,!0)}),r.each(function(v,m){var x=a.get(m),b=x.dataIdx,w=x.regionModel;gV(e,v,m,w,o,b),yV(e,v,m,w,o),xV(e,v,m,w,o)},this)},t.prototype._buildSVG=function(e){var r=e.geo.map,a=e.transformInfoRaw;this._svgGroup.x=a.x,this._svgGroup.y=a.y,this._svgGroup.scaleX=a.scaleX,this._svgGroup.scaleY=a.scaleY,this._svgResourceChanged(r)&&(this._freeSVG(),this._useSVG(r));var n=this._svgDispatcherMap=He(),i=!1;z(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,c=o.svgNodeTagLower,d=o.el,h=u?u.indexOfName(s):null,v=l.getRegionModel(s);Cwe.get(c)!=null&&d instanceof xs&&pV(e,d,h,v),d instanceof xs&&(d.culling=!0);var m=v.get("silent",!0);if(m!=null&&(d.silent=m),d.z2EmphasisLift=0,!o.namedFrom&&(Nwe.get(c)!=null&&mV(e,d,s,v,l,h,null),gV(e,d,s,v,l,h),yV(e,d,s,v,l),kwe.get(c)!=null)){var x=xV(e,d,s,v,l);x==="self"&&(i=!0);var b=n.get(s)||n.set(s,[]);b.push(d)}},this),this._enableBlurEntireSVG(i,e)},t.prototype._enableBlurEntireSVG=function(e,r){if(e&&r.isGeo){var a=r.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),n=a.opacity;this._svgGraphicRecord.root.traverse(function(i){if(!i.isGroup){Eh(i);var o=i.ensureState("blur").style||{};o.opacity==null&&n!=null&&(o.opacity=n),i.ensureState("emphasis")}})}},t.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},t.prototype.findHighDownDispatchers=function(e,r){if(e==null)return[];var a=r.coordinateSystem;if(a.resourceType==="geoJSON"){var n=this._regionsGroupByName;if(n){var i=n.get(e);return i?[i]:[]}}else if(a.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},t.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},t.prototype._useSVG=function(e){var r=oc.getGeoResource(e);if(r&&r.type==="geoSVG"){var a=r.useGraphic(this.uid);this._svgGroup.add(a.root),this._svgGraphicRecord=a,this._svgMapName=e}},t.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var r=oc.getGeoResource(e);r&&r.type==="geoSVG"&&r.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},t.prototype._updateController=function(e,r,a,n){var i=e.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=e.get("scaleLimit"),s.zoom=i.getZoom(),o.enable(e.get("roam")||!1,{api:n,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(c,d,h){return i.containPoint([d,h])},isInClip:function(c,d,h){return!r||r.contain(d,h)}}});var l=e.mainType;function u(){var c={type:"geoRoam",componentType:l};return c[l+"Id"]=e.id,c}o.off("pan").on("pan",function(c){this._mouseDownFlag=!1,lR(s,c.dx,c.dy),n.dispatchAction(ve(u(),{dx:c.dx,dy:c.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(c){this._mouseDownFlag=!1,uR(s,c.scale,c.originX,c.originY),n.dispatchAction(ve(u(),{totalZoom:s.zoom,zoom:c.scale,originX:c.originX,originY:c.originY,animation:{duration:0}}))},this)},t.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var r=e.getTextContent();r&&(r.ignore=iZ(r).ignore)})},t.prototype._updateMapSelectHandler=function(e,r,a,n){var i=this;r.off("mousedown"),r.off("click"),e.get("selectedMode")&&(r.on("mousedown",function(){i._mouseDownFlag=!0}),r.on("click",function(o){i._mouseDownFlag&&(i._mouseDownFlag=!1)}))},t})();function pV(t,e,r,a){var n=a.getModel("itemStyle"),i=a.getModel(["emphasis","itemStyle"]),o=a.getModel(["blur","itemStyle"]),s=a.getModel(["select","itemStyle"]),l=m1(n),u=m1(i),c=m1(s),d=m1(o),h=t.data;if(h){var v=h.getItemVisual(r,"style"),m=h.getItemVisual(r,"decal");t.isVisualEncodedByVisualMap&&v.fill&&(l.fill=v.fill),m&&(l.decal=$p(m,t.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=d,Eh(e)}function mV(t,e,r,a,n,i,o){var s=t.data,l=t.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),i)),c=s&&s.getItemLayout(i);if(l||u||c&&c.showLabel){var d=l?r:i,h=void 0;(!s||i>=0)&&(h=n);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;qn(e,Dn(a),{labelFetcher:h,labelDataIndex:d,defaultText:r},v);var m=e.getTextContent();if(m&&(iZ(m).ignore=m.ignore,e.textConfig&&o)){var x=e.getBoundingRect().clone();e.textConfig.layoutRect=x,e.textConfig.position=[(o[0]-x.x)/x.width*100+"%",(o[1]-x.y)/x.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function gV(t,e,r,a,n,i){t.data?t.data.setItemGraphicEl(i,e):dt(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:r,region:a&&a.option||{}}}function yV(t,e,r,a,n){t.data||uc({el:e,componentModel:n,itemName:r,itemTooltipOption:a.get("tooltip")})}function xV(t,e,r,a,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return fa(e,o,i.get("blurScope"),i.get("disabled")),t.isGeo&&Rve(e,n,r),o}function bV(t,e,r){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),z(t,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!r&&s.polygonEnd(),a}var Awe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n,i){if(!(i&&i.type==="mapToggleSelect"&&i.from===this.uid)){var o=this.group;if(o.removeAll(),!r.getHostGeoModel()){if(this._mapDraw&&i&&i.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),i&&i.type==="geoRoam"&&i.componentType==="series"&&i.seriesId===r.id){var s=this._mapDraw;s&&o.add(s.group)}else if(r.needsDrawMap){var s=this._mapDraw||new oZ(n);o.add(s.group),s.draw(r,a,n,this,i),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;r.get("showLegendSymbol")&&a.getComponent("legend")&&this._renderSymbols(r,a,n)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(r,a,n){var i=r.originalData,o=this.group;i.each(i.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=i.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,d=u.offset,h=new lc({style:{fill:r.getData().getVisual("style").fill},shape:{cx:c[0]+d*9,cy:c[1],r:3},silent:!0,z2:8+(d?0:gm+1)});if(!d){var v=r.mainSeries.getData(),m=i.getName(l),x=v.indexOfName(m),b=i.getItemModel(l),w=b.getModel("label"),_=v.getItemGraphicEl(x);qn(h,Dn(b),{labelFetcher:{getFormattedLabel:function(T,C){return r.getFormattedLabel(x,C)}},defaultText:m}),h.disableLabelAnimation=!0,w.get("position")||h.setTextConfig({position:"bottom"}),_.onHoverStateChange=function(T){uS(h,T)}}o.add(h)}}})},e.type="map",e})(Rr),Mwe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.needsDrawMap=!1,r.seriesGroup=[],r.getTooltipPosition=function(a){if(a!=null){var n=this.getData().getName(a),i=this.coordinateSystem,o=i.getRegion(n);return o&&i.dataToPoint(o.getCenter())}},r}return e.prototype.getInitialData=function(r){for(var a=Nm(this,{coordDimensions:["value"],encodeDefaulter:wt(N5,this)}),n=He(),i=[],o=0,s=a.count();o<s;o++){var l=a.getName(o);n.set(l,o)}var u=oc.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return z(u.regions,function(c){var d=c.name,h=n.get(d),v=c.properties&&c.properties.echartsStyle,m;h==null?(m={name:d},i.push(m)):m=a.getRawDataItem(h),v&&Ct(m,v)}),a.appendData(i),a},e.prototype.getHostGeoModel=function(){if(JW(this).kind!==El.boxCoordSys)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(r){var a=this.getData();return a.get(a.mapDimension("value"),r)},e.prototype.getRegionModel=function(r){var a=this.getData();return a.getItemModel(a.indexOfName(r))},e.prototype.formatTooltip=function(r,a,n){for(var i=this.getData(),o=this.getRawValue(r),s=i.getName(r),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var d=l[c].originalData.indexOfName(s),h=i.mapDimension("value");isNaN(l[c].originalData.get(h,d))||u.push(l[c].name)}return pn("section",{header:u.join(", "),noHeader:!u.length,blocks:[pn("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.getLegendIcon=function(r){var a=r.icon||"roundRect",n=mn(a,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill);return n.setStyle(r.itemStyle),n.style.stroke="none",a.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill=ne.color.neutral00,n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:ne.color.tertiary},itemStyle:{borderWidth:.5,borderColor:ne.color.border,areaColor:ne.color.background},emphasis:{label:{show:!0,color:ne.color.primary},itemStyle:{areaColor:ne.color.highlight}},select:{label:{show:!0,color:ne.color.primary},itemStyle:{color:ne.color.highlight}},nameProperty:"name"},e})(Gr);function Dwe(t,e){var r={};return z(t,function(a){a.each(a.mapDimension("value"),function(n,i){var o="ec-"+a.getName(i);r[o]=r[o]||[],isNaN(n)||r[o].push(n)})}),t[0].map(t[0].mapDimension("value"),function(a,n){for(var i="ec-"+t[0].getName(n),o=0,s=1/0,l=-1/0,u=r[i].length,c=0;c<u;c++)s=Math.min(s,r[i][c]),l=Math.max(l,r[i][c]),o+=r[i][c];var d;return e==="min"?d=s:e==="max"?d=l:e==="average"?d=o/u:d=o,u===0?NaN:d})}function Lwe(t){var e={};t.eachSeriesByType("map",function(r){var a=r.getHostGeoModel(),n=a?"o"+a.id:"i"+r.getMapType();(e[n]=e[n]||[]).push(r)}),z(e,function(r,a){for(var n=Dwe(Se(r,function(o){return o.getData()}),r[0].get("mapValueCalculation")),i=0;i<r.length;i++)r[i].originalData=r[i].getData();for(var i=0;i<r.length;i++)r[i].seriesGroup=r,r[i].needsDrawMap=i===0&&!r[i].getHostGeoModel(),r[i].setData(n.cloneShallow()),r[i].mainSeries=r[0]})}function Ewe(t){var e={};t.eachSeriesByType("map",function(r){var a=r.getMapType();if(!(r.getHostGeoModel()||e[a])){var n={};z(r.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&t.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var d=l.getName(c),h=s.getRegion(d);if(!(!h||isNaN(u))){var v=n[d]||0,m=s.dataToPoint(h.getCenter());n[d]=v+1,l.setItemLayout(c,{point:m,offset:v})}})});var i=r.getData();i.each(function(o){var s=i.getName(o),l=i.getItemLayout(o)||{};l.showLabel=!n[s],i.setItemLayout(o,l)}),e[a]=!0}})}var wV=tn,Qh=(function(t){se(e,t);function e(r,a){var n=t.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new Gu,n._rawTransformable=new Gu,n.name=r,n._opt=a,n}return e.prototype.setBoundingRect=function(r,a,n,i){return this._rect=new ot(r,a,n,i),this._updateCenterAndZoom(),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(r,a,n,i){this._transformTo(r,a,n,i),this._viewRect=new ot(r,a,n,i)},e.prototype._transformTo=function(r,a,n,i){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new ot(r,a,n,i));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(r){var a=this._opt;a&&a.api&&a.ecModel&&a.ecModel.getShallow("legacyViewCoordSysCenterBase")&&r&&(r=[Pe(r[0],a.api.getWidth()),Pe(r[1],a.api.getWidth())]),this._centerOption=et(r),this._updateCenterAndZoom()},e.prototype.setZoom=function(r){this._zoom=cR(r||1,this.zoomLimit),this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var r=this.getBoundingRect(),a=r.x+r.width/2,n=r.y+r.height/2;return[a,n]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var r=this._centerOption,a=this._rect;r&&a&&(this._center=[Pe(r[0],a.width,a.x),Pe(r[1],a.height,a.y)]);var n=this._rawTransformable.getLocalTransform(),i=this._roamTransformable,o=this.getDefaultCenter(),s=this.getCenter(),l=this.getZoom();s=tn([],s,n),o=tn([],o,n),i.originX=s[0],i.originY=s[1],i.x=o[0]-s[0],i.y=o[1]-s[1],i.scaleX=i.scaleY=l,this._updateTransform()},e.prototype._updateTransform=function(){var r=this._roamTransformable,a=this._rawTransformable;a.parent=r,r.updateTransform(),a.updateTransform(),D_(this.transform||(this.transform=[]),a.transform||oi()),this._rawTransform=a.getLocalTransform(),this.invTransform=this.invTransform||[],Zs(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var r=this._rawTransformable,a=this._roamTransformable,n=new Gu;return n.transform=a.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var r=this.getBoundingRect().clone();return r.applyTransform(this.transform),r},e.prototype.dataToPoint=function(r,a,n){var i=a?this._rawTransform:this.transform;return n=n||[],i?wV(n,r,i):Ui(n,r)},e.prototype.pointToData=function(r,a,n){n=n||[];var i=this.invTransform;return i?wV(n,r,i):(n[0]=r[0],n[1]=r[1],n)},e.prototype.convertToPixel=function(r,a,n){var i=SV(a);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(r,a,n){var i=SV(a);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(r){return this.getViewRectAfterRoam().contain(r[0],r[1])},e.dimensions=["x","y"],e})(Gu);function SV(t){var e=t.seriesModel;return e?e.coordinateSystem:null}var Rwe={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},sZ=["lng","lat"],GD=(function(t){se(e,t);function e(r,a,n){var i=t.call(this,r,{api:n.api,ecModel:n.ecModel})||this;i.dimensions=sZ,i.type="geo",i._nameCoordMap=He(),i.map=a;var o=n.projection,s=oc.load(a,n.nameMap,n.nameProperty),l=oc.getGeoResource(a);i.resourceType=l?l.type:null;var u=i.regions=s.regions,c=Rwe[l.type];i._regionsMap=s.regionsMap,i.regions=s.regions,i.projection=o;var d;if(o)for(var h=0;h<u.length;h++){var v=u[h].getBoundingRect(o);d=d||v.clone(),d.union(v)}else d=s.boundingRect;return i.setBoundingRect(d.x,d.y,d.width,d.height),i.aspectScale=o?1:$e(n.aspectScale,c.aspectScale),i._invertLongitute=o?!1:c.invertLongitute,i}return e.prototype._transformTo=function(r,a,n,i){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new ot(r,a,n,i));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(r){return this._regionsMap.get(r)},e.prototype.getRegionByCoord=function(r){for(var a=this.regions,n=0;n<a.length;n++){var i=a[n];if(i.type==="geoJSON"&&i.contain(r))return a[n]}},e.prototype.addGeoCoord=function(r,a){this._nameCoordMap.set(r,a)},e.prototype.getGeoCoord=function(r){var a=this._regionsMap.get(r);return this._nameCoordMap.get(r)||a&&a.getCenter()},e.prototype.dataToPoint=function(r,a,n){if(Ie(r)&&(r=this.getGeoCoord(r)),r){var i=this.projection;return i&&(r=i.project(r)),r&&this.projectedToPoint(r,a,n)}},e.prototype.pointToData=function(r,a,n){var i=this.projection;return i&&(r=i.unproject(r)),r&&this.pointToProjected(r,n)},e.prototype.pointToProjected=function(r,a){return t.prototype.pointToData.call(this,r,0,a)},e.prototype.projectedToPoint=function(r,a,n){return t.prototype.dataToPoint.call(this,r,a,n)},e.prototype.convertToPixel=function(r,a,n){var i=_V(a);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(r,a,n){var i=_V(a);return i===this?i.pointToData(n):null},e})(Qh);gn(GD,Qh);function _V(t){var e=t.geoModel,r=t.seriesModel;return e?e.coordinateSystem:r?r.coordinateSystem||(r.getReferringComponents("geo",Ia).models[0]||{}).coordinateSystem:null}function TV(t,e){var r=t.get("boundingCoords");if(r!=null){var a=r[0],n=r[1];if(isFinite(a[0])&&isFinite(a[1])&&isFinite(n[0])&&isFinite(n[1])){var i=this.projection;if(i){var o=a[0],s=a[1],l=n[0],u=n[1];a=[1/0,1/0],n=[-1/0,-1/0];var c=function(k,A,M,L){for(var R=M-k,P=L-A,j=0;j<=100;j++){var V=j/100,I=i.project([k+R*V,A+P*V]);dd(a,a,I),fd(n,n,I)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(a[0],a[1],n[0]-a[0],n[1]-a[1])}}var d=this.getBoundingRect(),h=t.get("layoutCenter"),v=t.get("layoutSize"),m=Ln(t,e).refContainer,x=d.width/d.height*this.aspectScale,b=!1,w,_;h&&v&&(w=[Pe(h[0],m.width)+m.x,Pe(h[1],m.height)+m.y],_=Pe(v,Math.min(m.width,m.height)),!isNaN(w[0])&&!isNaN(w[1])&&!isNaN(_)&&(b=!0));var T;if(b)T={},x>1?(T.width=_,T.height=_/x):(T.height=_,T.width=_*x),T.y=w[1]-T.height/2,T.x=w[0]-T.width/2;else{var C=t.getBoxLayoutParams();C.aspect=x,T=ha(C,m),T=nY(t,T,x)}this.setViewRect(T.x,T.y,T.width,T.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Pwe(t,e){z(e.get("geoCoord"),function(r,a){t.addGeoCoord(a,r)})}var Iwe=(function(){function t(){this.dimensions=sZ}return t.prototype.create=function(e,r){var a=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new GD(l+s,l,ve({nameMap:o.get("nameMap"),api:r,ecModel:e},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=TV,u.resize(o,r)}),e.eachSeries(function(o){Qy({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Ia).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),z(i,function(o,s){var l=Se(o,function(c){return c.get("nameMap")}),u=new GD(s,s,ve({nameMap:$E(l),api:r,ecModel:e},n(o[0])));u.zoomLimit=yi.apply(null,Se(o,function(c){return c.get("scaleLimit")})),a.push(u),u.resize=TV,u.resize(o[0],r),z(o,function(c){c.coordinateSystem=u,Pwe(u,c)})}),a},t.prototype.getFilledRegions=function(e,r,a,n){for(var i=(e||[]).slice(),o=He(),s=0;s<i.length;s++)o.set(i[s].name,i[s]);var l=oc.load(r,a,n);return z(l.regions,function(u){var c=u.name,d=o.get(c),h=u.properties&&u.properties.echartsStyle;d||(d={name:c},i.push(d)),h&&Ct(d,h)}),i},t})(),lZ=new Iwe,jwe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,a,n){this.mergeDefaultAndTheme(r,n);var i=oc.getGeoResource(r.map);if(i&&i.type==="geoJSON"){var o=r.itemStyle=r.itemStyle||{};"color"in o||(o.color=r.defaultItemStyleColor||ne.color.backgroundTint)}Mh(r,"label",["show"])},e.prototype.optionUpdated=function(){var r=this,a=this.option;a.regions=lZ.getFilledRegions(a.regions,a.map,a.nameMap,a.nameProperty);var n={};this._optionModelMap=ql(a.regions||[],function(i,o){var s=o.name;return s&&(i.set(s,new $t(o,r,r.ecModel)),o.selected&&(n[s]=!0)),i},He()),a.selectedMap||(a.selectedMap=n)},e.prototype.getRegionModel=function(r){return this._optionModelMap.get(r)||new $t(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(r,a){var n=this.getRegionModel(r),i=a==="normal"?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),o={name:r};if(Ke(i))return o.status=a,i(o);if(Ie(i))return i.replace("{a}",r??"")},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.select=function(r){var a=this.option,n=a.selectedMode;if(n){n!=="multiple"&&(a.selectedMap=null);var i=a.selectedMap||(a.selectedMap={});i[r]=!0}},e.prototype.unSelect=function(r){var a=this.option.selectedMap;a&&(a[r]=!1)},e.prototype.toggleSelected=function(r){this[this.isSelected(r)?"unSelect":"select"](r)},e.prototype.isSelected=function(r){var a=this.option.selectedMap;return!!(a&&a[r])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:ne.color.tertiary},itemStyle:{borderWidth:.5,borderColor:ne.color.border},emphasis:{label:{show:!0,color:ne.color.primary},itemStyle:{color:ne.color.highlight}},select:{label:{show:!0,color:ne.color.primary},itemStyle:{color:ne.color.highlight}},regions:[]},e})(Gt),Owe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.focusBlurEnabled=!0,r}return e.prototype.init=function(r,a){this._api=a},e.prototype.render=function(r,a,n,i){if(this._model=r,!r.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new oZ(n));var o=this._mapDraw;o.draw(r,a,n,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=r.get("silent"),this.group.add(o.group),this.updateSelectStatus(r,a,n)},e.prototype._handleRegionClick=function(r){var a;uh(r.target,function(n){return(a=dt(n).eventData)!=null},!0),a&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:a.name})},e.prototype.updateSelectStatus=function(r,a,n){var i=this;this._mapDraw.group.traverse(function(o){var s=dt(o).eventData;if(s)return i._model.isSelected(s.name)?n.enterSelect(o):n.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(r){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(r,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e})(oa);function zwe(t,e,r){oc.registerMap(t,e,r)}function uZ(t){t.registerCoordinateSystem("geo",lZ),t.registerComponentModel(jwe),t.registerComponentView(Owe),t.registerImpl("registerMap",zwe),t.registerImpl("getMap",function(r){return oc.getMapForUser(r)});function e(r,a){a.update="geo:updateSelectStatus",t.registerAction(a,function(n,i){var o={},s=[];return i.eachComponent({mainType:"geo",query:n},function(l){l[r](n.name);var u=l.coordinateSystem;z(u.regions,function(d){o[d.name]=l.isSelected(d.name)||!1});var c=[];z(o,function(d,h){o[h]&&c.push(h)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:n.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),t.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(r,a,n){var i=r.componentType;i||(r.geoId!=null?i="geo":r.seriesId!=null&&(i="series")),i||(i="series"),a.eachComponent({mainType:i,query:r},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=i2(s,r,o.get("scaleLimit"));o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),i==="series"&&z(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function Bwe(t){Nt(uZ),t.registerChartView(Awe),t.registerSeriesModel(Mwe),t.registerLayout(Ewe),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,Lwe),XY("map",t.registerAction)}function Vwe(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var r=[e],a,n;a=r.pop();)if(n=a.children,a.isExpand&&n.length)for(var i=n.length,o=i-1;o>=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function Fwe(t,e){var r=t.isExpand?t.children:[],a=t.parentNode.children,n=t.hierNode.i?a[t.hierNode.i-1]:null;if(r.length){Hwe(t);var i=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;n?(t.hierNode.prelim=n.hierNode.prelim+e(t,n),t.hierNode.modifier=t.hierNode.prelim-i):t.hierNode.prelim=i}else n&&(t.hierNode.prelim=n.hierNode.prelim+e(t,n));t.parentNode.hierNode.defaultAncestor=Uwe(t,n,t.parentNode.hierNode.defaultAncestor||a[0],e)}function Gwe(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function CV(t){return arguments.length?t:Ywe}function b0(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function Hwe(t){for(var e=t.children,r=e.length,a=0,n=0;--r>=0;){var i=e[r];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function Uwe(t,e,r,a){if(e){for(var n=t,i=t,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,c=o.hierNode.modifier,d=s.hierNode.modifier;s=sN(s),i=lN(i),s&&i;){n=sN(n),o=lN(o),n.hierNode.ancestor=t;var h=s.hierNode.prelim+d-i.hierNode.prelim-u+a(s,i);h>0&&(Wwe($we(s,t,r),t,h),u+=h,l+=h),d+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,c+=o.hierNode.modifier}s&&!sN(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=d-l),i&&!lN(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-c,r=t)}return r}function sN(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function lN(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function $we(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function Wwe(t,e,r){var a=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=a}function Ywe(t,e){return t.parentNode===e.parentNode?1:2}var Xwe=(function(){function t(){this.parentPoint=[],this.childPoints=[]}return t})(),qwe=(function(t){se(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:ne.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Xwe},e.prototype.buildPath=function(r,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=a.orient,c=u==="TB"||u==="BT"?0:1,d=1-c,h=Pe(a.forkPosition,1),v=[];v[c]=o[c],v[d]=o[d]+(l[d]-o[d])*h,r.moveTo(o[0],o[1]),r.lineTo(v[0],v[1]),r.moveTo(s[0],s[1]),v[c]=s[c],r.lineTo(v[0],v[1]),v[c]=l[c],r.lineTo(v[0],v[1]),r.lineTo(l[0],l[1]);for(var m=1;m<i-1;m++){var x=n[m];r.moveTo(x[0],x[1]),v[c]=x[c],r.lineTo(v[0],v[1])}},e})(zt),Zwe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._mainGroup=new Qe,r}return e.prototype.init=function(r,a){this._controller=new Kh(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(r,a,n){var i=r.getData(),o=r.layoutInfo,s=this._mainGroup,l=r.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(r,n),this._updateController(r,null,a,n);var u=this._data;i.diff(u).add(function(c){kV(i,c)&&NV(i,c,null,s,r)}).update(function(c,d){var h=u.getItemGraphicEl(d);if(!kV(i,c)){h&&MV(u,d,h,s,r);return}NV(i,c,h,s,r)}).remove(function(c){var d=u.getItemGraphicEl(c);d&&MV(u,c,d,s,r)}).execute(),this._nodeScaleRatio=r.get("nodeScaleRatio"),this._updateNodeAndLinkScale(r),r.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(c,d){c.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:r.id,dataIndex:d})})}),this._data=i},e.prototype._updateViewCoordSys=function(r,a){var n=r.getData(),i=[];n.each(function(d){var h=n.getItemLayout(d);h&&!isNaN(h.x)&&!isNaN(h.y)&&i.push([+h.x,+h.y])});var o=[],s=[];O_(i,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var c=r.coordinateSystem=new Qh(null,{api:a,ecModel:r.ecModel});c.zoomLimit=r.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(r.get("center")),c.setZoom(r.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},e.prototype._updateController=function(r,a,n,i){var o=this;eZ(r,i,this.group,this._controller,this._controllerHost,a),this._controller.on("zoom",function(s){o._updateNodeAndLinkScale(r)})},e.prototype._updateNodeAndLinkScale=function(r){var a=r.getData(),n=this._getNodeGlobalScale(r);a.eachItemGraphicEl(function(i,o){i.setSymbolScale(n)})},e.prototype._getNodeGlobalScale=function(r){var a=r.coordinateSystem;if(a.type!=="view")return 1;var n=this._nodeScaleRatio,i=a.scaleX||1,o=a.getZoom(),s=(o-1)*n+1;return s/i},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e})(Rr);function kV(t,e){var r=t.getItemLayout(e);return r&&!isNaN(r.x)&&!isNaN(r.y)}function NV(t,e,r,a,n){var i=!r,o=t.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:ne.color.neutral00,c=t.tree.root,d=o.parentNode===c?o:o.parentNode||o,h=t.getItemGraphicEl(d.dataIndex),v=d.getLayout(),m=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:v,x=o.getLayout();i?(r=new rx(t,e,null,{symbolInnerColor:u,useNameLabel:!0}),r.x=m.x,r.y=m.y):r.updateData(t,e,null,{symbolInnerColor:u,useNameLabel:!0}),r.__radialOldRawX=r.__radialRawX,r.__radialOldRawY=r.__radialRawY,r.__radialRawX=x.rawX,r.__radialRawY=x.rawY,a.add(r),t.setItemGraphicEl(e,r),r.__oldX=r.x,r.__oldY=r.y,tr(r,{x:x.x,y:x.y},n);var b=r.getSymbolPath();if(n.get("layout")==="radial"){var w=c.children[0],_=w.getLayout(),T=w.children.length,C=void 0,k=void 0;if(x.x===_.x&&o.isExpand===!0&&w.children.length){var A={x:(w.children[0].getLayout().x+w.children[T-1].getLayout().x)/2,y:(w.children[0].getLayout().y+w.children[T-1].getLayout().y)/2};C=Math.atan2(A.y-_.y,A.x-_.x),C<0&&(C=Math.PI*2+C),k=A.x<_.x,k&&(C=C-Math.PI)}else C=Math.atan2(x.y-_.y,x.x-_.x),C<0&&(C=Math.PI*2+C),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(k=x.x<_.x,k&&(C=C-Math.PI)):(k=x.x>_.x,k||(C=C-Math.PI));var M=k?"left":"right",L=s.getModel("label"),R=L.get("rotate"),P=R*(Math.PI/180),j=b.getTextContent();j&&(b.setTextConfig({position:L.get("position")||M,rotation:R==null?-C:P,origin:"center"}),j.setStyle("verticalAlign","middle"))}var V=s.get(["emphasis","focus"]),I=V==="relative"?ty(o.getAncestorsIndices(),o.getDescendantIndices()):V==="ancestor"?o.getAncestorsIndices():V==="descendant"?o.getDescendantIndices():null;I&&(dt(r).focus=I),Kwe(n,o,c,r,m,v,x,a),r.__edge&&(r.onHoverStateChange=function(F){if(F!=="blur"){var G=o.parentNode&&t.getItemGraphicEl(o.parentNode.dataIndex);G&&G.hoverState===$y||uS(r.__edge,F)}})}function Kwe(t,e,r,a,n,i,o,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),d=t.getOrient(),h=t.get(["lineStyle","curveness"]),v=t.get("edgeForkPosition"),m=l.getModel("lineStyle").getLineStyle(),x=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(x||(x=a.__edge=new Yy({shape:HD(c,d,h,n,n)})),tr(x,{shape:HD(c,d,h,i,o)},t));else if(u==="polyline"&&c==="orthogonal"&&e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var b=e.children,w=[],_=0;_<b.length;_++){var T=b[_].getLayout();w.push([T.x,T.y])}x||(x=a.__edge=new qwe({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:d,forkPosition:v}})),tr(x,{shape:{parentPoint:[o.x,o.y],childPoints:w}},t)}x&&!(u==="polyline"&&!e.isExpand)&&(x.useStyle(nt({strokeNoScale:!0,fill:null},m)),Mn(x,l,"lineStyle"),Eh(x),s.add(x))}function AV(t,e,r,a,n){var i=e.tree.root,o=cZ(i,t),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(t.dataIndex);if(u){var c=e.getItemGraphicEl(s.dataIndex),d=c.__edge,h=u.__edge||(s.isExpand===!1||s.children.length===1?d:void 0),v=a.get("edgeShape"),m=a.get("layout"),x=a.get("orient"),b=a.get(["lineStyle","curveness"]);h&&(v==="curve"?Rd(h,{shape:HD(m,x,b,l,l),style:{opacity:0}},a,{cb:function(){r.remove(h)},removeOpt:n}):v==="polyline"&&a.get("layout")==="orthogonal"&&Rd(h,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},a,{cb:function(){r.remove(h)},removeOpt:n}))}}function cZ(t,e){for(var r=e.parentNode===t?e:e.parentNode||e,a;a=r.getLayout(),a==null;)r=r.parentNode===t?r:r.parentNode||r;return{source:r,sourceLayout:a}}function MV(t,e,r,a,n){var i=t.tree.getNodeByDataIndex(e),o=t.tree.root,s=cZ(o,i).sourceLayout,l={duration:n.get("animationDurationUpdate"),easing:n.get("animationEasingUpdate")};Rd(r,{x:s.x+1,y:s.y+1},n,{cb:function(){a.remove(r),t.setItemGraphicEl(e,null)},removeOpt:l}),r.fadeOut(null,t.hostModel,{fadeLabel:!0,animation:l}),i.children.forEach(function(u){AV(u,t,a,n,l)}),AV(i,t,a,n,l)}function HD(t,e,r,a,n){var i,o,s,l,u,c,d,h;if(t==="radial"){u=a.rawX,d=a.rawY,c=n.rawX,h=n.rawY;var v=b0(u,d),m=b0(u,d+(h-d)*r),x=b0(c,h+(d-h)*r),b=b0(c,h);return{x1:v.x||0,y1:v.y||0,x2:b.x||0,y2:b.y||0,cpx1:m.x||0,cpy1:m.y||0,cpx2:x.x||0,cpy2:x.y||0}}else u=a.x,d=a.y,c=n.x,h=n.y,(e==="LR"||e==="RL")&&(i=u+(c-u)*r,o=d,s=c+(u-c)*r,l=h),(e==="TB"||e==="BT")&&(i=u,o=d+(h-d)*r,s=c,l=h+(d-h)*r);return{x1:u,y1:d,x2:c,y2:h,cpx1:i,cpy1:o,cpx2:s,cpy2:l}}var gs=jt();function dZ(t){var e=t.mainData,r=t.datas;r||(r={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,fZ(e,r,t),z(r,function(a){z(e.TRANSFERABLE_METHODS,function(n){a.wrapMethod(n,wt(Qwe,t))})}),e.wrapMethod("cloneShallow",wt(eSe,t)),z(e.CHANGABLE_METHODS,function(a){e.wrapMethod(a,wt(Jwe,t))}),Pi(r[e.dataType]===e)}function Qwe(t,e){if(aSe(this)){var r=ve({},gs(this).datas);r[this.dataType]=e,fZ(e,r,t)}else fR(e,this.dataType,gs(this).mainData,t);return e}function Jwe(t,e){return t.struct&&t.struct.update(),e}function eSe(t,e){return z(gs(e).datas,function(r,a){r!==e&&fR(r.cloneShallow(),a,e,t)}),e}function tSe(t){var e=gs(this).mainData;return t==null||e==null?e:gs(e).datas[t]}function rSe(){var t=gs(this).mainData;return t==null?[{data:t}]:Se(Wt(gs(t).datas),function(e){return{type:e,data:gs(t).datas[e]}})}function aSe(t){return gs(t).mainData===t}function fZ(t,e,r){gs(t).datas={},z(e,function(a,n){fR(a,n,t,r)})}function fR(t,e,r,a){gs(r).datas[e]=t,gs(t).mainData=r,t.dataType=e,a.struct&&(t[a.structAttr]=a.struct,a.struct[a.datasAttr[e]]=t),t.getLinkedData=tSe,t.getLinkedDataAll=rSe}var nSe=(function(){function t(e,r){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=r}return t.prototype.isRemoved=function(){return this.dataIndex<0},t.prototype.eachNode=function(e,r,a){Ke(e)&&(a=r,r=e,e=null),e=e||{},Ie(e)&&(e={order:e});var n=e.order||"preorder",i=this[e.attr||"children"],o;n==="preorder"&&(o=r.call(a,this));for(var s=0;!o&&s<i.length;s++)i[s].eachNode(e,r,a);n==="postorder"&&r.call(a,this)},t.prototype.updateDepthAndHeight=function(e){var r=0;this.depth=e;for(var a=0;a<this.children.length;a++){var n=this.children[a];n.updateDepthAndHeight(e+1),n.height>r&&(r=n.height)}this.height=r+1},t.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var r=0,a=this.children,n=a.length;r<n;r++){var i=a[r].getNodeById(e);if(i)return i}},t.prototype.contains=function(e){if(e===this)return!0;for(var r=0,a=this.children,n=a.length;r<n;r++){var i=a[r].contains(e);if(i)return i}},t.prototype.getAncestors=function(e){for(var r=[],a=e?this:this.parentNode;a;)r.push(a),a=a.parentNode;return r.reverse(),r},t.prototype.getAncestorsIndices=function(){for(var e=[],r=this;r;)e.push(r.dataIndex),r=r.parentNode;return e.reverse(),e},t.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(r){e.push(r.dataIndex)}),e},t.prototype.getValue=function(e){var r=this.hostTree.data;return r.getStore().get(r.getDimensionIndex(e||"value"),this.dataIndex)},t.prototype.setLayout=function(e,r){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,r)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostTree,a=r.data.getItemModel(this.dataIndex);return a.getModel(e)}},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(e,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,r)},t.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,r=0;r<e.length;++r)if(e[r]===this)return r;return-1}return-1},t.prototype.isAncestorOf=function(e){for(var r=e.parentNode;r;){if(r===this)return!0;r=r.parentNode}return!1},t.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},t})(),hR=(function(){function t(e){this.type="tree",this._nodes=[],this.hostModel=e}return t.prototype.eachNode=function(e,r,a){this.root.eachNode(e,r,a)},t.prototype.getNodeByDataIndex=function(e){var r=this.data.getRawIndex(e);return this._nodes[r]},t.prototype.getNodeById=function(e){return this.root.getNodeById(e)},t.prototype.update=function(){for(var e=this.data,r=this._nodes,a=0,n=r.length;a<n;a++)r[a].dataIndex=-1;for(var a=0,n=e.count();a<n;a++)r[e.getRawIndex(a)].dataIndex=a},t.prototype.clearLayouts=function(){this.data.clearItemLayouts()},t.createTree=function(e,r,a){var n=new t(r),i=[],o=1;s(e);function s(c,d){var h=c.value;o=Math.max(o,be(h)?h.length:1),i.push(c);var v=new nSe(An(c.name,""),n);d?iSe(v,d):n.root=v,n._nodes.push(v);var m=c.children;if(m)for(var x=0;x<m.length;x++)s(m[x],v)}n.root.updateDepthAndHeight(0);var l=ex(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Zi(l,r);return u.initData(i),a&&a(u),dZ({mainData:u,struct:n,structAttr:"tree"}),n.update(),n},t})();function iSe(t,e){var r=e.children;t.parentNode!==e&&(r.push(t),t.parentNode=e)}function _y(t,e,r){if(t&&St(e,t.type)>=0){var a=r.getData().tree.root,n=t.targetNode;if(Ie(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=t.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function hZ(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function vR(t,e){var r=hZ(t);return St(r,e)>=0}function s2(t,e){for(var r=[];t;){var a=t.dataIndex;r.push({name:t.name,dataIndex:a,value:e.getRawValue(a)}),t=t.parentNode}return r.reverse(),r}var oSe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r){var a={name:r.name,children:r.data},n=r.leaves||{},i=new $t(n,this,this.ecModel),o=hR.createTree(a,this,s);function s(d){d.wrapMethod("getItemModel",function(h,v){var m=o.getNodeByDataIndex(v);return m&&m.children.length&&m.isExpand||(h.parentModel=i),h})}var l=0;o.eachNode("preorder",function(d){d.depth>l&&(l=d.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(d){var h=d.hostTree.data.getRawDataItem(d.dataIndex);d.isExpand=h&&h.collapsed!=null?!h.collapsed:d.depth<=c}),o.data},e.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.formatTooltip=function(r,a,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return pn("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(r){var a=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(r);return a.treeAncestors=s2(n,this),a.collapsed=!n.isExpand,a},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:ne.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e})(Gr);function sSe(t,e,r){for(var a=[t],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)a.push(o[s])}for(;i=n.pop();)e(i,r)}function Xg(t,e){for(var r=[t],a;a=r.pop();)if(e(a),a.isExpand){var n=a.children;if(n.length)for(var i=n.length-1;i>=0;i--)r.push(n[i])}}function lSe(t,e){t.eachSeriesByType("tree",function(r){uSe(r,e)})}function uSe(t,e){var r=Ln(t,e).refContainer,a=ha(t.getBoxLayoutParams(),r);t.layoutInfo=a;var n=t.get("layout"),i=0,o=0,s=null;n==="radial"?(i=2*Math.PI,o=Math.min(a.height,a.width)/2,s=CV(function(C,k){return(C.parentNode===k.parentNode?1:2)/C.depth})):(i=a.width,o=a.height,s=CV());var l=t.getData().tree.root,u=l.children[0];if(u){Vwe(l),sSe(u,Fwe,s),l.hierNode.modifier=-u.hierNode.prelim,Xg(u,Gwe);var c=u,d=u,h=u;Xg(u,function(C){var k=C.getLayout().x;k<c.getLayout().x&&(c=C),k>d.getLayout().x&&(d=C),C.depth>h.depth&&(h=C)});var v=c===d?1:s(c,d)/2,m=v-c.getLayout().x,x=0,b=0,w=0,_=0;if(n==="radial")x=i/(d.getLayout().x+v+m),b=o/(h.depth-1||1),Xg(u,function(C){w=(C.getLayout().x+m)*x,_=(C.depth-1)*b;var k=b0(w,_);C.setLayout({x:k.x,y:k.y,rawX:w,rawY:_},!0)});else{var T=t.getOrient();T==="RL"||T==="LR"?(b=o/(d.getLayout().x+v+m),x=i/(h.depth-1||1),Xg(u,function(C){_=(C.getLayout().x+m)*b,w=T==="LR"?(C.depth-1)*x:i-(C.depth-1)*x,C.setLayout({x:w,y:_},!0)})):(T==="TB"||T==="BT")&&(x=i/(d.getLayout().x+v+m),b=o/(h.depth-1||1),Xg(u,function(C){w=(C.getLayout().x+m)*x,_=T==="TB"?(C.depth-1)*b:o-(C.depth-1)*b,C.setLayout({x:w,y:_},!0)}))}}}function cSe(t){t.eachSeriesByType("tree",function(e){var r=e.getData(),a=r.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(n.dataIndex,"style");ve(s,o)})})}function dSe(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var n=e.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,r,a){r.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=i2(i,e,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}function fSe(t){t.registerChartView(Zwe),t.registerSeriesModel(oSe),t.registerLayout(lSe),t.registerVisual(cSe),dSe(t)}var DV=["treemapZoomToNode","treemapRender","treemapMove"];function hSe(t){for(var e=0;e<DV.length;e++)t.registerAction({type:DV[e],update:"updateView"},en);t.registerAction({type:"treemapRootToNode",update:"updateView"},function(r,a){a.eachComponent({mainType:"series",subType:"treemap",query:r},n);function n(i,o){var s=["treemapZoomToNode","treemapRootToNode"],l=_y(r,s,i);if(l){var u=i.getViewRoot();u&&(r.direction=vR(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function vZ(t){var e=t.getData(),r=e.tree,a={};r.eachNode(function(n){for(var i=n;i&&i.depth>1;)i=i.parentNode;var o=sD(t.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var vSe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventUsingHoverLayer=!0,r}return e.prototype.getInitialData=function(r,a){var n={name:r.name,children:r.data};pZ(n);var i=r.levels||[],o=this.designatedVisualItemStyle={},s=new $t({itemStyle:o},this,a);i=r.levels=pSe(i,a);var l=Se(i||[],function(d){return new $t(d,s,a)},this),u=hR.createTree(n,this,c);function c(d){d.wrapMethod("getItemModel",function(h,v){var m=u.getNodeByDataIndex(v),x=m?l[m.depth]:null;return h.parentModel=x||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(r,a,n){var i=this.getData(),o=this.getRawValue(r),s=i.getName(r);return pn("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(r){var a=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(r);return a.treeAncestors=s2(n,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},ve(this.layoutInfo,r)},e.prototype.mapIdToIndex=function(r){var a=this._idIndexMap;a||(a=this._idIndexMap=He(),this._idIndexMapCount=0);var n=a.get(r);return n==null&&a.set(r,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var a=this.getRawData().tree.root;(!r||r!==a&&!a.contains(r))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){vZ(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:ne.size.l,top:ne.size.xxxl,right:ne.size.l,bottom:ne.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:ne.size.m,emptyItemWidth:25,itemStyle:{color:ne.color.backgroundShade,textStyle:{color:ne.color.secondary}},emphasis:{itemStyle:{color:ne.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:ne.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:ne.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e})(Gr);function pZ(t){var e=0;z(t.children,function(a){pZ(a);var n=a.value;be(n)&&(n=n[0]),e+=n});var r=t.value;be(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),be(t.value)?t.value[0]=r:t.value=r}function pSe(t,e){var r=Ir(e.get("color")),a=Ir(e.get(["aria","decal","decals"]));if(r){t=t||[];var n,i;z(t,function(s){var l=new $t(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(i=!0)});var o=t[0]||(t[0]={});return n||(o.color=r.slice()),!i&&a&&(o.decal=a.slice()),t}}var mSe=8,LV=8,uN=5,gSe=(function(){function t(e){this.group=new Qe,e.add(this.group)}return t.prototype.render=function(e,r,a,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),d=Ln(e,r).refContainer,h={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},v={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},m=ha(h,d);this._prepare(a,v,u),this._renderContent(e,v,m,s,l,u,c,n),q_(o,h,d)}},t.prototype._prepare=function(e,r,a){for(var n=e;n;n=n.parentNode){var i=An(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+mSe*2,r.emptyItemWidth);r.totalWidth+=s+LV,r.renderList.push({node:n,text:i,width:s})}},t.prototype._renderContent=function(e,r,a,n,i,o,s,l){for(var u=0,c=r.emptyItemWidth,d=e.get(["breadcrumb","height"]),h=r.totalWidth,v=r.renderList,m=i.getModel("itemStyle").getItemStyle(),x=v.length-1;x>=0;x--){var b=v[x],w=b.node,_=b.width,T=b.text;h>a.width&&(h-=_-c,_=c,T=null);var C=new ji({shape:{points:ySe(u,0,_,d,x===v.length-1,x===0)},style:nt(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Qt({style:Fr(o,{text:T})}),textConfig:{position:"inside"},z2:gm*1e4,onclick:wt(l,w)});C.disableLabelAnimation=!0,C.getTextContent().ensureState("emphasis").style=Fr(s,{text:T}),C.ensureState("emphasis").style=m,fa(C,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(C),xSe(C,e,w),u+=_+LV}},t.prototype.remove=function(){this.group.removeAll()},t})();function ySe(t,e,r,a,n,i){var o=[[n?t:t-uN,e],[t+r,e],[t+r,e+a],[n?t:t-uN,e+a]];return!i&&o.splice(2,0,[t+r+uN,e+a/2]),!n&&o.push([t,e+a/2]),o}function xSe(t,e,r){dt(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&s2(r,e)}}var bSe=(function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(e,r,a,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:r,duration:a,delay:n,easing:i}),!0)},t.prototype.finished=function(e){return this._finishedCallback=e,this},t.prototype.start=function(){for(var e=this,r=this._storage.length,a=function(){r--,r<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,i=this._storage.length;n<i;n++){var o=this._storage[n];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:a,aborted:a})}return this},t})();function wSe(){return new bSe}var UD=Qe,EV=Et,RV=3,PV="label",IV="upperLabel",SSe=gm*10,_Se=gm*2,TSe=gm*3,Yf=Lh([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),jV=function(t){var e=Yf(t);return e.stroke=e.fill=e.lineWidth=null,e},IS=jt(),CSe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._state="ready",r._storage=qg(),r}return e.prototype.render=function(r,a,n,i){var o=a.findComponents({mainType:"series",subType:"treemap",query:i});if(!(St(o,r)<0)){this.seriesModel=r,this.api=n,this.ecModel=a;var s=["treemapZoomToNode","treemapRootToNode"],l=_y(i,s,r),u=i&&i.type,c=r.layoutInfo,d=!this._oldTree,h=this._storage,v=u==="treemapRootToNode"&&l&&h?{rootNodeGroup:h.nodeGroup[l.node.getRawIndex()],direction:i.direction}:null,m=this._giveContainerGroup(c),x=r.get("animation"),b=this._doRender(m,r,v);x&&!d&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(m,b,r,v):b.renderFinally(),this._resetController(n),this._renderBreadcrumb(r,n,l)}},e.prototype._giveContainerGroup=function(r){var a=this._containerGroup;return a||(a=this._containerGroup=new UD,this._initEvents(a),this.group.add(a)),a.x=r.x,a.y=r.y,a},e.prototype._doRender=function(r,a,n){var i=a.getData().tree,o=this._oldTree,s=qg(),l=qg(),u=this._storage,c=[];function d(_,T,C,k){return kSe(a,l,u,n,s,c,_,T,C,k)}x(i.root?[i.root]:[],o&&o.root?[o.root]:[],r,i===o||!o,0);var h=b(u);if(this._oldTree=i,this._storage=l,this._controllerHost){var v=this.seriesModel.layoutInfo,m=i.root.getLayout();m.width===v.width&&m.height===v.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:h,renderFinally:w};function x(_,T,C,k,A){k?(T=_,z(_,function(R,P){!R.isRemoved()&&L(P,P)})):new nc(T,_,M,M).add(L).update(L).remove(wt(L,null)).execute();function M(R){return R.getId()}function L(R,P){var j=R!=null?_[R]:null,V=P!=null?T[P]:null,I=d(j,V,C,A);I&&x(j&&j.viewChildren||[],V&&V.viewChildren||[],I,k,A+1)}}function b(_){var T=qg();return _&&z(_,function(C,k){var A=T[k];z(C,function(M){M&&(A.push(M),IS(M).willDelete=!0)})}),T}function w(){z(h,function(_){z(_,function(T){T.parent&&T.parent.remove(T)})}),z(c,function(_){_.invisible=!0,_.dirty()})}},e.prototype._doAnimation=function(r,a,n,i){var o=n.get("animationDurationUpdate"),s=n.get("animationEasing"),l=(Ke(o)?0:o)||0,u=(Ke(s)?null:s)||"cubicOut",c=wSe();z(a.willDeleteEls,function(d,h){z(d,function(v,m){if(!v.invisible){var x=v.parent,b,w=IS(x);if(i&&i.direction==="drillDown")b=x===i.rootNodeGroup?{shape:{x:0,y:0,width:w.nodeWidth,height:w.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var _=0,T=0;w.willDelete||(_=w.nodeWidth/2,T=w.nodeHeight/2),b=h==="nodeGroup"?{x:_,y:T,style:{opacity:0}}:{shape:{x:_,y:T,width:0,height:0},style:{opacity:0}}}b&&c.add(v,b,l,0,u)}})}),z(this._storage,function(d,h){z(d,function(v,m){var x=a.lastsForAnimation[h][m],b={};x&&(v instanceof Qe?x.oldX!=null&&(b.x=v.x,b.y=v.y,v.x=x.oldX,v.y=x.oldY):(x.oldShape&&(b.shape=ve({},v.shape),v.setShape(x.oldShape)),x.fadein?(v.setStyle("opacity",0),b.style={opacity:1}):v.style.opacity!==1&&(b.style={opacity:1})),c.add(v,b,l,0,u))})},this),this._state="animating",c.finished(je(function(){this._state="ready",a.renderFinally()},this)).start()},e.prototype._resetController=function(r){var a=this,n=this._controller,i=this._controllerHost;i||(this._controllerHost={target:this.group},i=this._controllerHost);var o=this.seriesModel;n||(n=this._controller=new Kh(r.getZr()),n.on("pan",je(this._onPan,this)),n.on("zoom",je(this._onZoom,this))),n.enable(o.get("roam"),{api:r,zInfo:{component:o},triggerInfo:{roamTrigger:o.get("roamTrigger"),isInSelf:function(s,l,u){var c=a._containerGroup;return c?c.getBoundingRect().contain(l-c.x,u-c.y):!1}}}),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.get("zoom")},e.prototype._clearController=function(){var r=this._controller;this._controllerHost=null,r&&(r.dispose(),r=null)},e.prototype._onPan=function(r){if(this._state!=="animating"&&(Math.abs(r.dx)>RV||Math.abs(r.dy)>RV)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+r.dx,y:n.y+r.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(r){var a=r.originX,n=r.originY,i=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new ot(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var d=c.zoom=c.zoom||1;if(d*=i,u){var h=u.min||0,v=u.max||1/0;d=Math.max(Math.min(v,d),h)}var m=d/c.zoom;c.zoom=d;var x=this.seriesModel.layoutInfo;a-=x.x,n-=x.y;var b=oi();Zl(b,b,[-a,-n]),qE(b,b,[m,m]),Zl(b,b,[a,n]),l.applyTransform(b),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(r){var a=this;r.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(i){var o=a.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&hS(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(r,a,n){var i=this;n||(n=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new gSe(this.group))).render(r,a,n.node,function(o){i._state!=="animating"&&(vR(r.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=qg(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype.findTarget=function(r,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e})(Rr);function qg(){return{nodeGroup:[],background:[],content:[]}}function kSe(t,e,r,a,n,i,o,s,l,u){if(!o)return;var c=o.getLayout(),d=t.getData(),h=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var v=c.width,m=c.height,x=c.borderWidth,b=c.invisible,w=o.getRawIndex(),_=s&&s.getRawIndex(),T=o.viewChildren,C=c.upperHeight,k=T&&T.length,A=h.getModel("itemStyle"),M=h.getModel(["emphasis","itemStyle"]),L=h.getModel(["blur","itemStyle"]),R=h.getModel(["select","itemStyle"]),P=A.get("borderRadius")||0,j=ce("nodeGroup",UD);if(!j)return;if(l.add(j),j.x=c.x||0,j.y=c.y||0,j.markRedraw(),IS(j).nodeWidth=v,IS(j).nodeHeight=m,c.isAboveViewRoot)return j;var V=ce("background",EV,u,_Se);V&&q(j,V,k&&c.upperLabelHeight);var I=h.getModel("emphasis"),F=I.get("focus"),G=I.get("blurScope"),O=I.get("disabled"),U=F==="ancestor"?o.getAncestorsIndices():F==="descendant"?o.getDescendantIndices():F;if(k)ly(j)&&sh(j,!1),V&&(sh(V,!O),d.setItemGraphicEl(o.dataIndex,V),qM(V,U,G));else{var $=ce("content",EV,u,TSe);$&&H(j,$),V.disableMorphing=!0,V&&ly(V)&&sh(V,!1),sh(j,!O),d.setItemGraphicEl(o.dataIndex,j);var K=h.getShallow("cursor");K&&$.attr("cursor",K),qM(j,U,G)}return j;function q(Ce,ge,Be){var _e=dt(ge);if(_e.dataIndex=o.dataIndex,_e.seriesIndex=t.seriesIndex,ge.setShape({x:0,y:0,width:v,height:m,r:P}),b)Z(ge);else{ge.invisible=!1;var Oe=o.getVisual("style"),xt=Oe.stroke,Ye=jV(A);Ye.fill=xt;var st=Yf(M);st.fill=M.get("borderColor");var We=Yf(L);We.fill=L.get("borderColor");var At=Yf(R);if(At.fill=R.get("borderColor"),Be){var kt=v-2*x;te(ge,xt,Oe.opacity,{x,y:0,width:kt,height:C})}else ge.removeTextContent();ge.setStyle(Ye),ge.ensureState("emphasis").style=st,ge.ensureState("blur").style=We,ge.ensureState("select").style=At,Eh(ge)}Ce.add(ge)}function H(Ce,ge){var Be=dt(ge);Be.dataIndex=o.dataIndex,Be.seriesIndex=t.seriesIndex;var _e=Math.max(v-2*x,0),Oe=Math.max(m-2*x,0);if(ge.culling=!0,ge.setShape({x,y:x,width:_e,height:Oe,r:P}),b)Z(ge);else{ge.invisible=!1;var xt=o.getVisual("style"),Ye=xt.fill,st=jV(A);st.fill=Ye,st.decal=xt.decal;var We=Yf(M),At=Yf(L),kt=Yf(R);te(ge,Ye,xt.opacity,null),ge.setStyle(st),ge.ensureState("emphasis").style=We,ge.ensureState("blur").style=At,ge.ensureState("select").style=kt,Eh(ge)}Ce.add(ge)}function Z(Ce){!Ce.invisible&&i.push(Ce)}function te(Ce,ge,Be,_e){var Oe=h.getModel(_e?IV:PV),xt=An(h.get("name"),null),Ye=Oe.getShallow("show");qn(Ce,Dn(h,_e?IV:PV),{defaultText:Ye?xt:null,inheritColor:ge,defaultOpacity:Be,labelFetcher:t,labelDataIndex:o.dataIndex});var st=Ce.getTextContent();if(st){var We=st.style,At=N_(We.padding||0);_e&&(Ce.setTextConfig({layoutRect:_e}),st.disableLabelLayout=!0),st.beforeUpdate=function(){var Jt=Math.max((_e?_e.width:Ce.shape.width)-At[1]-At[3],0),Nr=Math.max((_e?_e.height:Ce.shape.height)-At[0]-At[2],0);(We.width!==Jt||We.height!==Nr)&&st.setStyle({width:Jt,height:Nr})},We.truncateMinChar=2,We.lineOverflow="truncate",ie(We,_e,c);var kt=st.getState("emphasis");ie(kt?kt.style:null,_e,c)}}function ie(Ce,ge,Be){var _e=Ce?Ce.text:null;if(!ge&&Be.isLeafRoot&&_e!=null){var Oe=t.get("drillDownIcon",!0);Ce.text=Oe?Oe+" "+_e:_e}}function ce(Ce,ge,Be,_e){var Oe=_!=null&&r[Ce][_],xt=n[Ce];return Oe?(r[Ce][_]=null,me(xt,Oe)):b||(Oe=new ge,Oe instanceof xs&&(Oe.z2=NSe(Be,_e)),ze(xt,Oe)),e[Ce][w]=Oe}function me(Ce,ge){var Be=Ce[w]={};ge instanceof UD?(Be.oldX=ge.x,Be.oldY=ge.y):Be.oldShape=ve({},ge.shape)}function ze(Ce,ge){var Be=Ce[w]={},_e=o.parentNode,Oe=ge instanceof Qe;if(_e&&(!a||a.direction==="drillDown")){var xt=0,Ye=0,st=n.background[_e.getRawIndex()];!a&&st&&st.oldShape&&(xt=st.oldShape.width,Ye=st.oldShape.height),Oe?(Be.oldX=0,Be.oldY=Ye):Be.oldShape={x:xt,y:Ye,width:0,height:0}}Be.fadein=!Oe}}function NSe(t,e){return t*SSe+e}var Ty=z,ASe=it,jS=-1,Xn=(function(){function t(e){var r=e.mappingMethod,a=e.type,n=this.option=et(e);this.type=a,this.mappingMethod=r,this._normalizeData=LSe[r];var i=t.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[r],r==="piecewise"?(cN(n),MSe(n)):r==="category"?n.categories?DSe(n):cN(n,!0):(Pi(r!=="linear"||n.dataExtent),cN(n))}return t.prototype.mapValueToVisual=function(e){var r=this._normalizeData(e);return this._normalizedToVisual(r,e)},t.prototype.getNormalizer=function(){return je(this._normalizeData,this)},t.listVisualTypes=function(){return Wt(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(e,r,a){it(e)?z(e,r,a):r.call(a,e)},t.mapVisual=function(e,r,a){var n,i=be(e)?[]:it(e)?{}:(n=!0,null);return t.eachVisual(e,function(o,s){var l=r.call(a,o,s);n?i=l:i[s]=l}),i},t.retrieveVisuals=function(e){var r={},a;return e&&Ty(t.visualHandlers,function(n,i){e.hasOwnProperty(i)&&(r[i]=e[i],a=!0)}),a?r:null},t.prepareVisualTypes=function(e){if(be(e))e=e.slice();else if(ASe(e)){var r=[];Ty(e,function(a,n){r.push(n)}),e=r}else return[];return e.sort(function(a,n){return n==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},t.dependsOn=function(e,r){return r==="color"?!!(e&&e.indexOf(r)===0):e===r},t.findPieceIndex=function(e,r,a){for(var n,i=1/0,o=0,s=r.length;o<s;o++){var l=r[o].value;if(l!=null){if(l===e||Ie(l)&&l===e+"")return o;a&&h(l,o)}}for(var o=0,s=r.length;o<s;o++){var u=r[o],c=u.interval,d=u.close;if(c){if(c[0]===-1/0){if(y1(d[1],e,c[1]))return o}else if(c[1]===1/0){if(y1(d[0],c[0],e))return o}else if(y1(d[0],c[0],e)&&y1(d[1],e,c[1]))return o;a&&h(c[0],o),a&&h(c[1],o)}}if(a)return e===1/0?r.length-1:e===-1/0?0:n;function h(v,m){var x=Math.abs(v-e);x<i&&(i=x,n=m)}},t.visualHandlers={color:{applyVisual:Zg("color"),getColorMapper:function(){var e=this.option;return je(e.mappingMethod==="category"?function(r,a){return!a&&(r=this._normalizeData(r)),w0.call(this,r)}:function(r,a,n){var i=!!n;return!a&&(r=this._normalizeData(r)),n=UC(r,e.parsedVisual,n),i?n:$l(n,"rgba")},this)},_normalizedToVisual:{linear:function(e){return $l(UC(e,this.option.parsedVisual),"rgba")},category:w0,piecewise:function(e,r){var a=WD.call(this,r);return a==null&&(a=$l(UC(e,this.option.parsedVisual),"rgba")),a},fixed:Xf}},colorHue:g1(function(e,r){return Cd(e,r)}),colorSaturation:g1(function(e,r){return Cd(e,null,r)}),colorLightness:g1(function(e,r){return Cd(e,null,null,r)}),colorAlpha:g1(function(e,r){return Jw(e,r)}),decal:{applyVisual:Zg("decal"),_normalizedToVisual:{linear:null,category:w0,piecewise:null,fixed:null}},opacity:{applyVisual:Zg("opacity"),_normalizedToVisual:$D([0,1])},liftZ:{applyVisual:Zg("liftZ"),_normalizedToVisual:{linear:Xf,category:Xf,piecewise:Xf,fixed:Xf}},symbol:{applyVisual:function(e,r,a){var n=this.mapValueToVisual(e);a("symbol",n)},_normalizedToVisual:{linear:OV,category:w0,piecewise:function(e,r){var a=WD.call(this,r);return a==null&&(a=OV.call(this,e)),a},fixed:Xf}},symbolSize:{applyVisual:Zg("symbolSize"),_normalizedToVisual:$D([0,1])}},t})();function MSe(t){var e=t.pieceList;t.hasSpecialVisual=!1,z(e,function(r,a){r.originIndex=a,r.visual!=null&&(t.hasSpecialVisual=!0)})}function DSe(t){var e=t.categories,r=t.categoryMap={},a=t.visual;if(Ty(e,function(o,s){r[o]=s}),!be(a)){var n=[];it(a)?Ty(a,function(o,s){var l=r[s];n[l??jS]=o}):n[jS]=a,a=mZ(t,n)}for(var i=e.length-1;i>=0;i--)a[i]==null&&(delete r[e[i]],e.pop())}function cN(t,e){var r=t.visual,a=[];it(r)?Ty(r,function(i){a.push(i)}):r!=null&&a.push(r);var n={color:1,symbol:1};!e&&a.length===1&&!n.hasOwnProperty(t.type)&&(a[1]=a[0]),mZ(t,a)}function g1(t){return{applyVisual:function(e,r,a){var n=this.mapValueToVisual(e);a("color",t(r("color"),n))},_normalizedToVisual:$D([0,1])}}function OV(t){var e=this.option.visual;return e[Math.round(pr(t,[0,1],[0,e.length-1],!0))]||{}}function Zg(t){return function(e,r,a){a(t,this.mapValueToVisual(e))}}function w0(t){var e=this.option.visual;return e[this.option.loop&&t!==jS?t%e.length:t]}function Xf(){return this.option.visual[0]}function $D(t){return{linear:function(e){return pr(e,t,this.option.visual,!0)},category:w0,piecewise:function(e,r){var a=WD.call(this,r);return a==null&&(a=pr(e,t,this.option.visual,!0)),a},fixed:Xf}}function WD(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var a=Xn.findPieceIndex(t,r),n=r[a];if(n&&n.visual)return n.visual[this.type]}}function mZ(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=Se(e,function(r){var a=ho(r);return a||[0,0,0,1]})),e}var LSe={linear:function(t){return pr(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=Xn.findPieceIndex(t,e,!0);if(r!=null)return pr(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??jS},fixed:en};function y1(t,e,r){return t?e<=r:e<r}var ESe="itemStyle",gZ=jt();const RSe={seriesType:"treemap",reset:function(t){var e=t.getData().tree,r=e.root;r.isRemoved()||yZ(r,{},t.getViewRoot().getAncestors(),t)}};function yZ(t,e,r,a){var n=t.getModel(),i=t.getLayout(),o=t.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=n.getModel(ESe),l=PSe(s,e,a),u=o.ensureUniqueItemVisual(t.dataIndex,"style"),c=s.get("borderColor"),d=s.get("borderColorSaturation"),h;d!=null&&(h=zV(l),c=ISe(d,h)),u.stroke=c;var v=t.viewChildren;if(!v||!v.length)h=zV(l),u.fill=h;else{var m=jSe(t,n,i,s,l,v);z(v,function(x,b){if(x.depth>=r.length||x===r[x.depth]){var w=OSe(n,l,x,b,m,a);yZ(x,w,r,a)}})}}}function PSe(t,e,r){var a=ve({},e),n=r.designatedVisualItemStyle;return z(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=t.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function zV(t){var e=dN(t,"color");if(e){var r=dN(t,"colorAlpha"),a=dN(t,"colorSaturation");return a&&(e=Cd(e,null,null,a)),r&&(e=Jw(e,r)),e}}function ISe(t,e){return e!=null?Cd(e,null,null,t):null}function dN(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function jSe(t,e,r,a,n,i){if(!(!i||!i.length)){var o=fN(e,"color")||n.color!=null&&n.color!=="none"&&(fN(e,"colorAlpha")||fN(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=e.get("colorMappingBy"),d={type:o.name,dataExtent:u,visual:o.range};d.type==="color"&&(c==="index"||c==="id")?(d.mappingMethod="category",d.loop=!0):d.mappingMethod="linear";var h=new Xn(d);return gZ(h).drColorMappingBy=c,h}}}function fN(t,e){var r=t.get(e);return be(r)&&r.length?{name:e,range:r}:null}function OSe(t,e,r,a,n,i){var o=ve({},e);if(n){var s=n.type,l=s==="color"&&gZ(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Cy=Math.max,OS=Math.min,BV=yi,pR=z,xZ=["itemStyle","borderWidth"],zSe=["itemStyle","gapWidth"],BSe=["upperLabel","show"],VSe=["upperLabel","height"];const FSe={seriesType:"treemap",reset:function(t,e,r,a){var n=t.option,i=Ln(t,r).refContainer,o=ha(t.getBoxLayoutParams(),i),s=n.size||[],l=Pe(BV(o.width,s[0]),i.width),u=Pe(BV(o.height,s[1]),i.height),c=a&&a.type,d=["treemapZoomToNode","treemapRootToNode"],h=_y(a,d,t),v=c==="treemapRender"||c==="treemapMove"?a.rootRect:null,m=t.getViewRoot(),x=hZ(m);if(c!=="treemapMove"){var b=c==="treemapZoomToNode"?YSe(t,h,m,l,u):v?[v.width,v.height]:[l,u],w=n.sort;w&&w!=="asc"&&w!=="desc"&&(w="desc");var _={squareRatio:n.squareRatio,sort:w,leafDepth:n.leafDepth};m.hostTree.clearLayouts();var T={x:0,y:0,width:b[0],height:b[1],area:b[0]*b[1]};m.setLayout(T),bZ(m,_,!1,0),T=m.getLayout(),pR(x,function(k,A){var M=(x[A+1]||m).getValue();k.setLayout(ve({dataExtent:[M,M],borderWidth:0,upperHeight:0},T))})}var C=t.getData().tree.root;C.setLayout(XSe(o,v,h),!0),t.setLayoutInfo(o),wZ(C,new ot(-o.x,-o.y,r.getWidth(),r.getHeight()),x,m,0)}};function bZ(t,e,r,a){var n,i;if(!t.isRemoved()){var o=t.getLayout();n=o.width,i=o.height;var s=t.getModel(),l=s.get(xZ),u=s.get(zSe)/2,c=SZ(s),d=Math.max(l,c),h=l-u,v=d-u;t.setLayout({borderWidth:l,upperHeight:d,upperLabelHeight:c},!0),n=Cy(n-2*h,0),i=Cy(i-h-v,0);var m=n*i,x=GSe(t,s,m,e,r,a);if(x.length){var b={x:h,y:v,width:n,height:i},w=OS(n,i),_=1/0,T=[];T.area=0;for(var C=0,k=x.length;C<k;){var A=x[C];T.push(A),T.area+=A.getLayout().area;var M=WSe(T,w,e.squareRatio);M<=_?(C++,_=M):(T.area-=T.pop().getLayout().area,VV(T,w,b,u,!1),w=OS(b.width,b.height),T.length=T.area=0,_=1/0)}if(T.length&&VV(T,w,b,u,!0),!r){var L=s.get("childrenVisibleMin");L!=null&&m<L&&(r=!0)}for(var C=0,k=x.length;C<k;C++)bZ(x[C],e,r,a+1)}}}function GSe(t,e,r,a,n,i){var o=t.children||[],s=a.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=a.leafDepth!=null&&a.leafDepth<=i;if(n&&!l)return t.viewChildren=[];o=mr(o,function(v){return!v.isRemoved()}),USe(o,s);var u=$Se(e,o,s);if(u.sum===0)return t.viewChildren=[];if(u.sum=HSe(e,r,u.sum,s,o),u.sum===0)return t.viewChildren=[];for(var c=0,d=o.length;c<d;c++){var h=o[c].getValue()/u.sum*r;o[c].setLayout({area:h})}return l&&(o.length&&t.setLayout({isLeafRoot:!0},!0),o.length=0),t.viewChildren=o,t.setLayout({dataExtent:u.dataExtent},!0),o}function HSe(t,e,r,a,n){if(!a)return r;for(var i=t.get("visibleMin"),o=n.length,s=o,l=o-1;l>=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/r*e<i&&(s=l,r-=u)}return a==="asc"?n.splice(0,o-s):n.splice(s,o-s),r}function USe(t,e){return e&&t.sort(function(r,a){var n=e==="asc"?r.getValue()-a.getValue():a.getValue()-r.getValue();return n===0?e==="asc"?r.dataIndex-a.dataIndex:a.dataIndex-r.dataIndex:n}),t}function $Se(t,e,r){for(var a=0,n=0,i=e.length;n<i;n++)a+=e[n].getValue();var o=t.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&r?(s=[e[e.length-1].getValue(),e[0].getValue()],r==="asc"&&s.reverse()):(s=[1/0,-1/0],pR(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function WSe(t,e,r){for(var a=0,n=1/0,i=0,o=void 0,s=t.length;i<s;i++)o=t[i].getLayout().area,o&&(o<n&&(n=o),o>a&&(a=o));var l=t.area*t.area,u=e*e*r;return l?Cy(u*a/l,l/(u*n)):1/0}function VV(t,e,r,a,n){var i=e===r.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=r[s[i]],c=e?t.area/e:0;(n||c>r[l[o]])&&(c=r[l[o]]);for(var d=0,h=t.length;d<h;d++){var v=t[d],m={},x=c?v.getLayout().area/c:0,b=m[l[o]]=Cy(c-2*a,0),w=r[s[i]]+r[l[i]]-u,_=d===h-1||w<x?w:x,T=m[l[i]]=Cy(_-2*a,0);m[s[o]]=r[s[o]]+OS(a,b/2),m[s[i]]=u+OS(a,T/2),u+=_,v.setLayout(m,!0)}r[s[o]]+=c,r[l[o]]-=c}function YSe(t,e,r,a,n){var i=(e||{}).node,o=[a,n];if(!i||i===r)return o;for(var s,l=a*n,u=l*t.option.zoomToNodeRatio;s=i.parentNode;){for(var c=0,d=s.children,h=0,v=d.length;h<v;h++)c+=d[h].getValue();var m=i.getValue();if(m===0)return o;u*=c/m;var x=s.getModel(),b=x.get(xZ),w=Math.max(b,SZ(x));u+=4*b*b+(3*b+w)*Math.pow(u,.5),u>$4&&(u=$4),i=s}u<l&&(u=l);var _=Math.pow(u/l,.5);return[a*_,n*_]}function XSe(t,e,r){if(e)return{x:e.x,y:e.y};var a={x:0,y:0};if(!r)return a;var n=r.node,i=n.getLayout();if(!i)return a;for(var o=[i.width/2,i.height/2],s=n;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:t.width/2-o[0],y:t.height/2-o[1]}}function wZ(t,e,r,a,n){var i=t.getLayout(),o=r[n],s=o&&o===t;if(!(o&&!s||n===r.length&&t!==a)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(i),isAboveViewRoot:s},!0);var l=new ot(e.x-i.x,e.y-i.y,e.width,e.height);pR(t.viewChildren||[],function(u){wZ(u,l,r,a,n+1)})}}function SZ(t){return t.get(BSe)?t.get(VSe):0}function qSe(t){t.registerSeriesModel(vSe),t.registerChartView(CSe),t.registerVisual(RSe),t.registerLayout(FSe),hSe(t)}function ZSe(t){var e=t.findComponents({mainType:"legend"});!e||!e.length||t.eachSeriesByType("graph",function(r){var a=r.getCategoriesData(),n=r.getGraph(),i=n.data,o=a.mapArray(a.getName);i.filterSelf(function(s){var l=i.getItemModel(s),u=l.getShallow("category");if(u!=null){qt(u)&&(u=o[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function KSe(t){var e={};t.eachSeriesByType("graph",function(r){var a=r.getCategoriesData(),n=r.getData(),i={};a.each(function(o){var s=a.getName(o);i["ec-"+s]=o;var l=a.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=r.getColorFromPalette(s,e)),a.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],d=0;d<c.length;d++){var h=l.getShallow(c[d],!0);h!=null&&a.setItemVisual(o,c[d],h)}}),a.count()&&n.each(function(o){var s=n.getItemModel(o),l=s.getShallow("category");if(l!=null){Ie(l)&&(l=i["ec-"+l]);var u=a.getItemVisual(l,"style"),c=n.ensureUniqueItemVisual(o,"style");ve(c,u);for(var d=["symbol","symbolSize","symbolKeepAspect"],h=0;h<d.length;h++)n.setItemVisual(o,d[h],a.getItemVisual(l,d[h]))}})})}function x1(t){return t instanceof Array||(t=[t,t]),t}function QSe(t){t.eachSeriesByType("graph",function(e){var r=e.getGraph(),a=e.getEdgeData(),n=x1(e.get("edgeSymbol")),i=x1(e.get("edgeSymbolSize"));a.setVisual("fromSymbol",n&&n[0]),a.setVisual("toSymbol",n&&n[1]),a.setVisual("fromSymbolSize",i&&i[0]),a.setVisual("toSymbolSize",i&&i[1]),a.setVisual("style",e.getModel("lineStyle").getLineStyle()),a.each(function(o){var s=a.getItemModel(o),l=r.getEdgeByIndex(o),u=x1(s.getShallow("symbol",!0)),c=x1(s.getShallow("symbolSize",!0)),d=s.getModel("lineStyle").getLineStyle(),h=a.ensureUniqueItemVisual(o,"style");switch(ve(h,d),h.stroke){case"source":{var v=l.node1.getVisual("style");h.stroke=v&&v.fill;break}case"target":{var v=l.node2.getVisual("style");h.stroke=v&&v.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var YD="-->",l2=function(t){return t.get("autoCurveness")||null},_Z=function(t,e){var r=l2(t),a=20,n=[];if(qt(r))a=r;else if(be(r)){t.__curvenessList=r;return}e>a&&(a=e);var i=a%2?a+2:a+3;n=[];for(var o=0;o<i;o++)n.push((o%2?o+1:o)/10*(o%2?-1:1));t.__curvenessList=n},ky=function(t,e,r){var a=[t.id,t.dataIndex].join("."),n=[e.id,e.dataIndex].join(".");return[r.uid,a,n].join(YD)},TZ=function(t){var e=t.split(YD);return[e[0],e[2],e[1]].join(YD)},JSe=function(t,e){var r=ky(t.node1,t.node2,e);return e.__edgeMap[r]},e_e=function(t,e){var r=XD(ky(t.node1,t.node2,e),e),a=XD(ky(t.node2,t.node1,e),e);return r+a},XD=function(t,e){var r=e.__edgeMap;return r[t]?r[t].length:0};function t_e(t){l2(t)&&(t.__curvenessList=[],t.__edgeMap={},_Z(t))}function r_e(t,e,r,a){if(l2(r)){var n=ky(t,e,r),i=r.__edgeMap,o=i[TZ(n)];i[n]&&!o?i[n].isForward=!0:o&&i[n]&&(o.isForward=!0,i[n].isForward=!1),i[n]=i[n]||[],i[n].push(a)}}function mR(t,e,r,a){var n=l2(e),i=be(n);if(!n)return null;var o=JSe(t,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===r){s=l;break}var u=e_e(t,e);_Z(e,u),t.lineStyle=t.lineStyle||{};var c=ky(t.node1,t.node2,e),d=e.__curvenessList,h=i||u%2?0:1;if(o.isForward)return d[h+s];var v=TZ(c),m=XD(v,e),x=d[s+m+h];return a?i?n&&n[0]===0?(m+h)%2?x:-x:((m%2?0:1)+h)%2?x:-x:(m+h)%2?x:-x:d[s+m+h]}function CZ(t){var e=t.coordinateSystem;if(!(e&&e.type!=="view")){var r=t.getGraph();r.eachNode(function(a){var n=a.getModel();a.setLayout([+n.get("x"),+n.get("y")])}),gR(r,t)}}function gR(t,e){t.eachEdge(function(r,a){var n=Io(r.getModel().get(["lineStyle","curveness"]),-mR(r,e,a,!0),0),i=Uu(r.node1.getLayout()),o=Uu(r.node2.getLayout()),s=[i,o];+n&&s.push([(i[0]+o[0])/2-(i[1]-o[1])*n,(i[1]+o[1])/2-(o[0]-i[0])*n]),r.setLayout(s)})}function a_e(t,e){t.eachSeriesByType("graph",function(r){var a=r.get("layout"),n=r.coordinateSystem;if(n&&n.type!=="view"){var i=r.getData(),o=[];z(n.dimensions,function(h){o=o.concat(i.mapDimensionsAll(h))});for(var s=0;s<i.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var d=i.get(o[c],s);isNaN(d)||(u=!0),l.push(d)}u?i.setItemLayout(s,n.dataToPoint(l)):i.setItemLayout(s,[NaN,NaN])}gR(i.graph,r)}else(!a||a==="none")&&CZ(r)})}function S0(t){var e=t.coordinateSystem;if(e.type!=="view")return 1;var r=t.option.nodeScaleRatio,a=e.scaleX,n=e.getZoom(),i=(n-1)*r+1;return i/a}function _0(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var FV=Math.PI,hN=[];function yR(t,e,r,a){var n=t.coordinateSystem;if(!(n&&n.type!=="view")){var i=n.getBoundingRect(),o=t.getData(),s=o.graph,l=i.width/2+i.x,u=i.height/2+i.y,c=Math.min(i.width,i.height)/2,d=o.count();if(o.setLayout({cx:l,cy:u}),!!d){if(r){var h=n.pointToData(a),v=h[0],m=h[1],x=[v-l,m-u];vm(x,x),lw(x,x,c),r.setLayout([l+x[0],u+x[1]],!0);var b=t.get(["circular","rotateLabel"]);kZ(r,b,l,u)}n_e[e](t,s,o,c,l,u,d),s.eachEdge(function(w,_){var T=Io(w.getModel().get(["lineStyle","curveness"]),mR(w,t,_),0),C=Uu(w.node1.getLayout()),k=Uu(w.node2.getLayout()),A,M=(C[0]+k[0])/2,L=(C[1]+k[1])/2;+T&&(T*=3,A=[l*T+M*(1-T),u*T+L*(1-T)]),w.setLayout([C,k,A])})}}}var n_e={value:function(t,e,r,a,n,i,o){var s=0,l=r.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(c){var d=c.getValue("value"),h=u*(l?d:1)/2;s+=h,c.setLayout([a*Math.cos(s)+n,a*Math.sin(s)+i]),s+=h})},symbolSize:function(t,e,r,a,n,i,o){var s=0;hN.length=o;var l=S0(t);e.eachNode(function(d){var h=_0(d);isNaN(h)&&(h=2),h<0&&(h=0),h*=l;var v=Math.asin(h/2/a);isNaN(v)&&(v=FV/2),hN[d.dataIndex]=v,s+=v*2});var u=(2*FV-s)/o/2,c=0;e.eachNode(function(d){var h=u+hN[d.dataIndex];c+=h,(!d.getLayout()||!d.getLayout().fixed)&&d.setLayout([a*Math.cos(c)+n,a*Math.sin(c)+i]),c+=h})}};function kZ(t,e,r,a){var n=t.getGraphicEl();if(n){var i=t.getModel(),o=i.get(["label","rotate"])||0,s=n.getSymbolPath();if(e){var l=t.getLayout(),u=Math.atan2(l[1]-a,l[0]-r);u<0&&(u=Math.PI*2+u);var c=l[0]<r;c&&(u=u-Math.PI);var d=c?"left":"right";s.setTextConfig({rotation:-u,position:d,origin:"center"});var h=s.ensureState("emphasis");ve(h.textConfig||(h.textConfig={}),{position:d})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function i_e(t){t.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&yR(e,"symbolSize")})}var Uv=mM;function o_e(t,e,r){for(var a=t,n=e,i=r.rect,o=i.width,s=i.height,l=[i.x+o/2,i.y+s/2],u=r.gravity==null?.1:r.gravity,c=0;c<a.length;c++){var d=a[c];d.p||(d.p=Hh(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),d.pp=Uu(d.p),d.edges=null}var h=r.friction==null?.6:r.friction,v=h,m,x;return{warmUp:function(){v=h*.8},setFixed:function(b){a[b].fixed=!0},setUnfixed:function(b){a[b].fixed=!1},beforeStep:function(b){m=b},afterStep:function(b){x=b},step:function(b){m&&m(a,n);for(var w=[],_=a.length,T=0;T<n.length;T++){var C=n[T];if(!C.ignoreForceLayout){var k=C.n1,A=C.n2;ih(w,A.p,k.p);var M=gM(w)-C.d,L=A.w/(k.w+A.w);isNaN(L)&&(L=0),vm(w,w),!k.fixed&&Uv(k.p,k.p,w,L*M*v),!A.fixed&&Uv(A.p,A.p,w,-(1-L)*M*v)}}for(var T=0;T<_;T++){var R=a[T];R.fixed||(ih(w,l,R.p),Uv(R.p,R.p,w,u*v))}for(var T=0;T<_;T++)for(var k=a[T],P=T+1;P<_;P++){var A=a[P];ih(w,A.p,k.p);var M=gM(w);M===0&&(YE(w,Math.random()-.5,Math.random()-.5),M=1);var j=(k.rep+A.rep)/M/M;!k.fixed&&Uv(k.pp,k.pp,w,j),!A.fixed&&Uv(A.pp,A.pp,w,-j)}for(var V=[],T=0;T<_;T++){var R=a[T];R.fixed||(ih(V,R.p,R.pp),Uv(R.p,R.p,V,v),Ui(R.pp,R.p))}v=v*.992;var I=v<.01;x&&x(a,n,I),b&&b(I)}}}function s_e(t){t.eachSeriesByType("graph",function(e){var r=e.coordinateSystem;if(!(r&&r.type!=="view"))if(e.get("layout")==="force"){var a=e.preservedPoints||{},n=e.getGraph(),i=n.data,o=n.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?i.each(function(T){var C=i.getId(T);i.setItemLayout(T,a[C]||[NaN,NaN])}):!l||l==="none"?CZ(e):l==="circular"&&yR(e,"value");var u=i.getDataExtent("value"),c=o.getDataExtent("value"),d=s.get("repulsion"),h=s.get("edgeLength"),v=be(d)?d:[d,d],m=be(h)?h:[h,h];m=[m[1],m[0]];var x=i.mapArray("value",function(T,C){var k=i.getItemLayout(C),A=pr(T,u,v);return isNaN(A)&&(A=(v[0]+v[1])/2),{w:A,rep:A,fixed:i.getItemModel(C).get("fixed"),p:!k||isNaN(k[0])||isNaN(k[1])?null:k}}),b=o.mapArray("value",function(T,C){var k=n.getEdgeByIndex(C),A=pr(T,c,m);isNaN(A)&&(A=(m[0]+m[1])/2);var M=k.getModel(),L=Io(k.getModel().get(["lineStyle","curveness"]),-mR(k,e,C,!0),0);return{n1:x[k.node1.dataIndex],n2:x[k.node2.dataIndex],d:A,curveness:L,ignoreForceLayout:M.get("ignoreForceLayout")}}),w=r.getBoundingRect(),_=o_e(x,b,{rect:w,gravity:s.get("gravity"),friction:s.get("friction")});_.beforeStep(function(T,C){for(var k=0,A=T.length;k<A;k++)T[k].fixed&&Ui(T[k].p,n.getNodeByIndex(k).getLayout())}),_.afterStep(function(T,C,k){for(var A=0,M=T.length;A<M;A++)T[A].fixed||n.getNodeByIndex(A).setLayout(T[A].p),a[i.getId(A)]=T[A].p;for(var A=0,M=C.length;A<M;A++){var L=C[A],R=n.getEdgeByIndex(A),P=L.n1.p,j=L.n2.p,V=R.getLayout();V=V?V.slice():[],V[0]=V[0]||[],V[1]=V[1]||[],Ui(V[0],P),Ui(V[1],j),+L.curveness&&(V[2]=[(P[0]+j[0])/2-(P[1]-j[1])*L.curveness,(P[1]+j[1])/2-(j[0]-P[0])*L.curveness]),R.setLayout(V)}}),e.forceLayout=_,e.preservedPoints=a,_.step()}else e.forceLayout=null})}function l_e(t,e,r){var a=Ln(t,e),n=ve(t.getBoxLayoutParams(),{aspect:r}),i=ha(n,a.refContainer);return nY(t,i,r)}function u_e(t,e){var r=[];return t.eachSeriesByType("graph",function(a){Qy({targetModel:a,coordSysType:"view",coordSysProvider:n,isDefaultDataCoordSys:!0});function n(){var i=a.getData(),o=i.mapArray(function(m){var x=i.getItemModel(m);return[+x.get("x"),+x.get("y")]}),s=[],l=[];O_(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),c=l_e(a,e,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var d=l[0]-s[0],h=l[1]-s[1],v=new Qh(null,{api:e,ecModel:t});return v.zoomLimit=a.get("scaleLimit"),v.setBoundingRect(s[0],s[1],d,h),v.setViewRect(c.x,c.y,c.width,c.height),v.setCenter(a.get("center")),v.setZoom(a.get("zoom")),r.push(v),v}}),r}var GV=fn.prototype,vN=Yy.prototype,NZ=(function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t})();(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(NZ);function pN(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var AZ=(function(t){se(e,t);function e(r){var a=t.call(this,r)||this;return a.type="ec-line",a}return e.prototype.getDefaultStyle=function(){return{stroke:ne.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new NZ},e.prototype.buildPath=function(r,a){pN(a)?GV.buildPath.call(this,r,a):vN.buildPath.call(this,r,a)},e.prototype.pointAt=function(r){return pN(this.shape)?GV.pointAt.call(this,r):vN.pointAt.call(this,r)},e.prototype.tangentAt=function(r){var a=this.shape,n=pN(a)?[a.x2-a.x1,a.y2-a.y1]:vN.tangentAt.call(this,r);return vm(n,n)},e})(zt),mN=["fromSymbol","toSymbol"];function HV(t){return"_"+t+"Type"}function UV(t,e,r){var a=e.getItemVisual(r,t);if(!a||a==="none")return a;var n=e.getItemVisual(r,t+"Size"),i=e.getItemVisual(r,t+"Rotate"),o=e.getItemVisual(r,t+"Offset"),s=e.getItemVisual(r,t+"KeepAspect"),l=Tm(n),u=Xh(o||0,l);return a+l+u+(i||"")+(s||"")}function $V(t,e,r){var a=e.getItemVisual(r,t);if(!(!a||a==="none")){var n=e.getItemVisual(r,t+"Size"),i=e.getItemVisual(r,t+"Rotate"),o=e.getItemVisual(r,t+"Offset"),s=e.getItemVisual(r,t+"KeepAspect"),l=Tm(n),u=Xh(o||0,l),c=mn(a,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,c.name=t,c}}function c_e(t){var e=new AZ({name:"line",subPixelOptimize:!0});return qD(e.shape,t),e}function qD(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var r=e[2];r?(t.cpx1=r[0],t.cpy1=r[1]):(t.cpx1=NaN,t.cpy1=NaN)}var xR=(function(t){se(e,t);function e(r,a,n){var i=t.call(this)||this;return i._createLine(r,a,n),i}return e.prototype._createLine=function(r,a,n){var i=r.hostModel,o=r.getItemLayout(a),s=r.getItemVisual(a,"z2"),l=c_e(o);l.shape.percent=0,na(l,{z2:$e(s,0),shape:{percent:1}},i,a),this.add(l),z(mN,function(u){var c=$V(u,r,a);this.add(c),this[HV(u)]=UV(u,r,a)},this),this._updateCommonStl(r,a,n)},e.prototype.updateData=function(r,a,n){var i=r.hostModel,o=this.childOfName("line"),s=r.getItemLayout(a),l={shape:{}};qD(l.shape,s),tr(o,l,i,a),z(mN,function(u){var c=UV(u,r,a),d=HV(u);if(this[d]!==c){this.remove(this.childOfName(u));var h=$V(u,r,a);this.add(h)}this[d]=c},this),this._updateCommonStl(r,a,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(r,a,n){var i=r.hostModel,o=this.childOfName("line"),s=n&&n.emphasisLineStyle,l=n&&n.blurLineStyle,u=n&&n.selectLineStyle,c=n&&n.labelStatesModels,d=n&&n.emphasisDisabled,h=n&&n.focus,v=n&&n.blurScope;if(!n||r.hasItemOption){var m=r.getItemModel(a),x=m.getModel("emphasis");s=x.getModel("lineStyle").getLineStyle(),l=m.getModel(["blur","lineStyle"]).getLineStyle(),u=m.getModel(["select","lineStyle"]).getLineStyle(),d=x.get("disabled"),h=x.get("focus"),v=x.get("blurScope"),c=Dn(m)}var b=r.getItemVisual(a,"style"),w=b.stroke;o.useStyle(b),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,z(mN,function(A){var M=this.childOfName(A);if(M){M.setColor(w),M.style.opacity=b.opacity;for(var L=0;L<Qi.length;L++){var R=Qi[L],P=o.getState(R);if(P){var j=P.style||{},V=M.ensureState(R),I=V.style||(V.style={});j.stroke!=null&&(I[M.__isEmptyBrush?"stroke":"fill"]=j.stroke),j.opacity!=null&&(I.opacity=j.opacity)}}M.markRedraw()}},this);var _=i.getRawValue(a);qn(this,c,{labelDataIndex:a,labelFetcher:{getFormattedLabel:function(A,M){return i.getFormattedLabel(A,M,r.dataType)}},inheritColor:w||ne.color.neutral99,defaultOpacity:b.opacity,defaultText:(_==null?r.getName(a):isFinite(_)?dn(_):_)+""});var T=this.getTextContent();if(T){var C=c.normal;T.__align=T.style.align,T.__verticalAlign=T.style.verticalAlign,T.__position=C.get("position")||"middle";var k=C.get("distance");be(k)||(k=[k,k]),T.__labelDistance=k}this.setTextConfig({position:null,local:!0,inside:!1}),fa(this,h,v,d)},e.prototype.highlight=function(){rc(this)},e.prototype.downplay=function(){ac(this)},e.prototype.updateLayout=function(r,a){this.setLinePoints(r.getItemLayout(a))},e.prototype.setLinePoints=function(r){var a=this.childOfName("line");qD(a.shape,r),a.dirty()},e.prototype.beforeUpdate=function(){var r=this,a=r.childOfName("fromSymbol"),n=r.childOfName("toSymbol"),i=r.getTextContent();if(!a&&!n&&(!i||i.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=r.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),d=l.pointAt(u),h=ih([],d,c);vm(h,h);function v(P,j){var V=P.__specifiedRotation;if(V==null){var I=l.tangentAt(j);P.attr("rotation",(j===1?-1:1)*Math.PI/2-Math.atan2(I[1],I[0]))}else P.attr("rotation",V)}if(a&&(a.setPosition(c),v(a,0),a.scaleX=a.scaleY=o*u,a.markRedraw()),n&&(n.setPosition(d),v(n,1),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var m=void 0,x=void 0,b=i.__labelDistance,w=b[0]*o,_=b[1]*o,T=u/2,C=l.tangentAt(T),k=[C[1],-C[0]],A=l.pointAt(T);k[1]>0&&(k[0]=-k[0],k[1]=-k[1]);var M=C[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var L=-Math.atan2(C[1],C[0]);d[0]<c[0]&&(L=Math.PI+L),i.rotation=L}var R=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":R=-_,x="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":R=_,x="top";break;default:R=0,x="middle"}switch(i.__position){case"end":i.x=h[0]*w+d[0],i.y=h[1]*_+d[1],m=h[0]>.8?"left":h[0]<-.8?"right":"center",x=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*w+c[0],i.y=-h[1]*_+c[1],m=h[0]>.8?"right":h[0]<-.8?"left":"center",x=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=w*M+c[0],i.y=c[1]+R,m=C[0]<0?"right":"left",i.originX=-w*M,i.originY=-R;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=A[0],i.y=A[1]+R,m="center",i.originY=-R;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-w*M+d[0],i.y=d[1]+R,m=C[0]>=0?"right":"left",i.originX=w*M,i.originY=-R;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||x,align:i.__align||m})}},e})(Qe),bR=(function(){function t(e){this.group=new Qe,this._LineCtor=e||xR}return t.prototype.updateData=function(e){var r=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=e,i||n.removeAll();var o=WV(e);e.diff(i).add(function(s){r._doAdd(e,s,o)}).update(function(s,l){r._doUpdate(i,e,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},t.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(r,a){r.updateLayout(e,a)},this)},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=WV(e),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r){this._progressiveEls=[];function a(s){!s.isGroup&&!d_e(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n<e.end;n++){var i=r.getItemLayout(n);if(gN(i)){var o=new this._LineCtor(r,n,this._seriesScope);o.traverse(a),this.group.add(o),r.setItemGraphicEl(n,o),this._progressiveEls.push(o)}}},t.prototype.remove=function(){this.group.removeAll()},t.prototype.eachRendered=function(e){Ud(this._progressiveEls||this.group,e)},t.prototype._doAdd=function(e,r,a){var n=e.getItemLayout(r);if(gN(n)){var i=new this._LineCtor(e,r,a);e.setItemGraphicEl(r,i),this.group.add(i)}},t.prototype._doUpdate=function(e,r,a,n,i){var o=e.getItemGraphicEl(a);if(!gN(r.getItemLayout(n))){this.group.remove(o);return}o?o.updateData(r,n,i):o=new this._LineCtor(r,n,i),r.setItemGraphicEl(n,o),this.group.add(o)},t})();function d_e(t){return t.animators&&t.animators.length>0}function WV(t){var e=t.hostModel,r=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:Dn(e)}}function YV(t){return isNaN(t[0])||isNaN(t[1])}function gN(t){return t&&!YV(t[0])&&!YV(t[1])}var yN=[],xN=[],bN=[],$v=ii,wN=gh,XV=Math.abs;function qV(t,e,r){for(var a=t[0],n=t[1],i=t[2],o=1/0,s,l=r*r,u=.1,c=.1;c<=.9;c+=.1){yN[0]=$v(a[0],n[0],i[0],c),yN[1]=$v(a[1],n[1],i[1],c);var d=XV(wN(yN,e)-l);d<o&&(o=d,s=c)}for(var h=0;h<32;h++){var v=s+u;xN[0]=$v(a[0],n[0],i[0],s),xN[1]=$v(a[1],n[1],i[1],s),bN[0]=$v(a[0],n[0],i[0],v),bN[1]=$v(a[1],n[1],i[1],v);var d=wN(xN,e)-l;if(XV(d)<.01)break;var m=wN(bN,e)-l;u/=2,d<0?m>=0?s=s+u:s=s-u:m>=0?s=s-u:s=s+u}return s}function SN(t,e){var r=[],a=ry,n=[[],[],[]],i=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),d=s.getVisual("toSymbol");u.__original||(u.__original=[Uu(u[0]),Uu(u[1])],u[2]&&u.__original.push(Uu(u[2])));var h=u.__original;if(u[2]!=null){if(Ui(n[0],h[0]),Ui(n[1],h[2]),Ui(n[2],h[1]),c&&c!=="none"){var v=_0(s.node1),m=qV(n,h[0],v*e);a(n[0][0],n[1][0],n[2][0],m,r),n[0][0]=r[3],n[1][0]=r[4],a(n[0][1],n[1][1],n[2][1],m,r),n[0][1]=r[3],n[1][1]=r[4]}if(d&&d!=="none"){var v=_0(s.node2),m=qV(n,h[1],v*e);a(n[0][0],n[1][0],n[2][0],m,r),n[1][0]=r[1],n[2][0]=r[2],a(n[0][1],n[1][1],n[2][1],m,r),n[1][1]=r[1],n[2][1]=r[2]}Ui(u[0],n[0]),Ui(u[1],n[2]),Ui(u[2],n[1])}else{if(Ui(i[0],h[0]),Ui(i[1],h[1]),ih(o,i[1],i[0]),vm(o,o),c&&c!=="none"){var v=_0(s.node1);mM(i[0],i[0],o,v*e)}if(d&&d!=="none"){var v=_0(s.node2);mM(i[1],i[1],o,-v*e)}Ui(u[0],i[0]),Ui(u[1],i[1])}})}var MZ=jt();function f_e(t){if(t)return MZ(t).bridge}function ZV(t,e){t&&(MZ(t).bridge=e)}function KV(t){return t.type==="view"}var h_e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,a){var n=new ax,i=new bR,o=this.group,s=new Qe;this._controller=new Kh(a.getZr()),this._controllerHost={target:s},s.add(n.group),s.add(i.group),o.add(s),this._symbolDraw=n,this._lineDraw=i,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(r,a,n){var i=this,o=r.coordinateSystem,s=!1;this._model=r,this._api=n,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(n);var u=this._symbolDraw,c=this._lineDraw;if(KV(o)){var d={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(d):tr(this._mainGroup,d,r)}SN(r.getGraph(),S0(r));var h=r.getData();u.updateData(h);var v=r.getEdgeData();c.updateData(v),this._updateNodeAndLinkScale(),this._updateController(null,r,n),clearTimeout(this._layoutTimeout);var m=r.forceLayout,x=r.get(["force","layoutAnimation"]);m&&(s=!0,this._startForceLayoutIteration(m,n,x));var b=r.get("layout");h.graph.eachNode(function(C){var k=C.dataIndex,A=C.getGraphicEl(),M=C.getModel();if(A){A.off("drag").off("dragend");var L=M.get("draggable");L&&A.on("drag",function(P){switch(b){case"force":m.warmUp(),!i._layouting&&i._startForceLayoutIteration(m,n,x),m.setFixed(k),h.setItemLayout(k,[A.x,A.y]);break;case"circular":h.setItemLayout(k,[A.x,A.y]),C.setLayout({fixed:!0},!0),yR(r,"symbolSize",C,[P.offsetX,P.offsetY]),i.updateLayout(r);break;case"none":default:h.setItemLayout(k,[A.x,A.y]),gR(r.getGraph(),r),i.updateLayout(r);break}}).on("dragend",function(){m&&m.setUnfixed(k)}),A.setDraggable(L,!!M.get("cursor"));var R=M.get(["emphasis","focus"]);R==="adjacency"&&(dt(A).focus=C.getAdjacentDataIndices())}}),h.graph.eachEdge(function(C){var k=C.getGraphicEl(),A=C.getModel().get(["emphasis","focus"]);k&&A==="adjacency"&&(dt(k).focus={edge:[C.dataIndex],node:[C.node1.dataIndex,C.node2.dataIndex]})});var w=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),_=h.getLayout("cx"),T=h.getLayout("cy");h.graph.eachNode(function(C){kZ(C,w,_,T)}),this._firstRender=!1,s||this._renderThumbnail(r,n,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(r,a,n){var i=this,o=!1;(function s(){r.step(function(l){i.updateLayout(i._model),(l||!o)&&(o=!0,i._renderThumbnail(i._model,a,i._symbolDraw,i._lineDraw)),(i._layouting=!l)&&(n?i._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(r,a,n){var i=this._controller,o=this._controllerHost,s=a.coordinateSystem;if(!KV(s)){i.disable();return}i.enable(a.get("roam"),{api:n,zInfo:{component:a},triggerInfo:{roamTrigger:a.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!r||r.contain(u,c)}}}),o.zoomLimit=a.get("scaleLimit"),o.zoom=s.getZoom(),i.off("pan").off("zoom").on("pan",function(l){n.dispatchAction({seriesId:a.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){n.dispatchAction({seriesId:a.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(r,a,n){this._active&&(lR(this._controllerHost,n.dx,n.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(r,a,n){this._active&&(uR(this._controllerHost,n.zoom,n.originX,n.originY),this._updateNodeAndLinkScale(),SN(r.getGraph(),S0(r)),this._lineDraw.updateLayout(),a.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var r=this._model,a=r.getData(),n=S0(r);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(r){this._active&&(SN(r.getGraph(),S0(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var r=this._model,a=r.coordinateSystem;if(a.type==="view"){var n=f_e(r);if(n)return{bridge:n,coordSys:a}}},e.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(r.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(r,a,n,i){var o=this._getThumbnailInfo();if(o){var s=new Qe,l=n.group.children(),u=i.group.children(),c=new Qe,d=new Qe;s.add(d),s.add(c);for(var h=0;h<l.length;h++){var v=l[h],m=v.children()[0],x=v.x,b=v.y,w=et(m.shape),_=ve(w,{width:m.scaleX,height:m.scaleY,x:x-m.scaleX/2,y:b-m.scaleY/2}),T=et(m.style),C=new m.constructor({shape:_,style:T,z2:151});d.add(C)}for(var h=0;h<u.length;h++){var v=u[h],k=v.children()[0],T=et(k.style),_=et(k.shape),A=new AZ({style:T,shape:_,z2:151});c.add(A)}o.bridge.renderContent({api:a,roamType:r.get("roam"),viewportRect:null,group:s,targetTrans:o.coordSys.transform})}},e.type="graph",e})(Rr);function Wv(t){return"_EC_"+t}var v_e=(function(){function t(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(e,r){e=e==null?""+r:""+e;var a=this._nodesMap;if(!a[Wv(e)]){var n=new qf(e,r);return n.hostGraph=this,this.nodes.push(n),a[Wv(e)]=n,n}},t.prototype.getNodeByIndex=function(e){var r=this.data.getRawIndex(e);return this.nodes[r]},t.prototype.getNodeById=function(e){return this._nodesMap[Wv(e)]},t.prototype.addEdge=function(e,r,a){var n=this._nodesMap,i=this._edgesMap;if(qt(e)&&(e=this.nodes[e]),qt(r)&&(r=this.nodes[r]),e instanceof qf||(e=n[Wv(e)]),r instanceof qf||(r=n[Wv(r)]),!(!e||!r)){var o=e.id+"-"+r.id,s=new DZ(e,r,a);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),r.inEdges.push(s)),e.edges.push(s),e!==r&&r.edges.push(s),this.edges.push(s),i[o]=s,s}},t.prototype.getEdgeByIndex=function(e){var r=this.edgeData.getRawIndex(e);return this.edges[r]},t.prototype.getEdge=function(e,r){e instanceof qf&&(e=e.id),r instanceof qf&&(r=r.id);var a=this._edgesMap;return this._directed?a[e+"-"+r]:a[e+"-"+r]||a[r+"-"+e]},t.prototype.eachNode=function(e,r){for(var a=this.nodes,n=a.length,i=0;i<n;i++)a[i].dataIndex>=0&&e.call(r,a[i],i)},t.prototype.eachEdge=function(e,r){for(var a=this.edges,n=a.length,i=0;i<n;i++)a[i].dataIndex>=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&e.call(r,a[i],i)},t.prototype.breadthFirstTraverse=function(e,r,a,n){if(r instanceof qf||(r=this._nodesMap[Wv(r)]),!!r){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(n,r,null))for(var s=[r];s.length;)for(var l=s.shift(),u=l[i],o=0;o<u.length;o++){var c=u[o],d=c.node1===l?c.node2:c.node1;if(!d.__visited){if(e.call(n,d,l))return;s.push(d),d.__visited=!0}}}},t.prototype.update=function(){for(var e=this.data,r=this.edgeData,a=this.nodes,n=this.edges,i=0,o=a.length;i<o;i++)a[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)a[e.getRawIndex(i)].dataIndex=i;r.filterSelf(function(s){var l=n[r.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=r.count();i<o;i++)n[r.getRawIndex(i)].dataIndex=i},t.prototype.clone=function(){for(var e=new t(this._directed),r=this.nodes,a=this.edges,n=0;n<r.length;n++)e.addNode(r[n].id,r[n].dataIndex);for(var n=0;n<a.length;n++){var i=a[n];e.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return e},t})(),qf=(function(){function t(e,r){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??"",this.dataIndex=r??-1}return t.prototype.degree=function(){return this.edges.length},t.prototype.inDegree=function(){return this.inEdges.length},t.prototype.outDegree=function(){return this.outEdges.length},t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostGraph,a=r.data.getItemModel(this.dataIndex);return a.getModel(e)}},t.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},r=0;r<this.edges.length;r++){var a=this.edges[r];a.dataIndex<0||(e.edge.push(a.dataIndex),e.node.push(a.node1.dataIndex,a.node2.dataIndex))}return e},t.prototype.getTrajectoryDataIndices=function(){for(var e=He(),r=He(),a=0,n=this.edges.length;a<n;a++){var i=this.edges[a];if(!(i.dataIndex<0)){e.set(i.dataIndex,!0);for(var o=[i.node1],s=[i.node2],l=0;l<o.length;){var u=o[l];l++,r.set(u.dataIndex,!0);for(var c=u.inEdges,d=0,h=c.length,v=void 0,m=void 0;d<h;d++)v=c[d],m=v.dataIndex,m>=0&&!e.hasKey(m)&&(e.set(m,!0),o.push(v.node1))}for(l=0;l<s.length;){var x=s[l];l++,r.set(x.dataIndex,!0);for(var b=x.outEdges,d=0,w=b.length,_=void 0,T=void 0;d<w;d++)_=b[d],T=_.dataIndex,T>=0&&!e.hasKey(T)&&(e.set(T,!0),s.push(_.node2))}}}return{edge:e.keys(),node:r.keys()}},t})(),DZ=(function(){function t(e,r,a){this.dataIndex=-1,this.node1=e,this.node2=r,this.dataIndex=a??-1}return t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostGraph,a=r.edgeData.getItemModel(this.dataIndex);return a.getModel(e)}},t.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},t.prototype.getTrajectoryDataIndices=function(){var e=He(),r=He();e.set(this.dataIndex,!0);for(var a=[this.node1],n=[this.node2],i=0;i<a.length;){var o=a[i];i++,r.set(o.dataIndex,!0);for(var s=o.inEdges,l=0,u=s.length,c=void 0,d=void 0;l<u;l++)c=o.inEdges[l],d=c.dataIndex,d>=0&&!e.hasKey(d)&&(e.set(d,!0),a.push(c.node1))}for(i=0;i<n.length;){var h=n[i];i++,r.set(h.dataIndex,!0);for(var v=h.outEdges,l=0,u=v.length,m=void 0,x=void 0;l<u;l++)m=h.outEdges[l],x=m.dataIndex,x>=0&&!e.hasKey(x)&&(e.set(x,!0),n.push(m.node2))}return{edge:e.keys(),node:r.keys()}},t})();function LZ(t,e){return{getValue:function(r){var a=this[t][e];return a.getStore().get(a.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,a){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,r,a)},getVisual:function(r){return this[t][e].getItemVisual(this.dataIndex,r)},setLayout:function(r,a){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,a)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}gn(qf,LZ("hostGraph","data"));gn(DZ,LZ("hostGraph","edgeData"));function wR(t,e,r,a,n){for(var i=new v_e(a),o=0;o<t.length;o++)i.addNode(yi(t[o].id,t[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var c=e[o],d=c.source,h=c.target;i.addEdge(d,h,u)&&(l.push(c),s.push(yi(An(c.id,null),d+" > "+h)),u++)}var v=r.get("coordinateSystem"),m;if(v==="cartesian2d"||v==="polar"||v==="matrix")m=cc(t,r);else{var x=Ky.get(v),b=x?x.dimensions||[]:[];St(b,"value")<0&&b.concat(["value"]);var w=ex(t,{coordDimensions:b,encodeDefine:r.getEncode()}).dimensions;m=new Zi(w,r),m.initData(t)}var _=new Zi(["value"],r);return _.initData(l,s),n&&n(m,_),dZ({mainData:m,struct:i,structAttr:"graph",datas:{node:m,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var p_e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new Am(n,n),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(r){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Mh(r,"edgeLabel",["show"])},e.prototype.getInitialData=function(r,a){var n=r.edges||r.links||[],i=r.data||r.nodes||[],o=this;if(i&&n){t_e(this);var s=wR(i,n,this,!0,l);return z(s.edges,function(u){r_e(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(m){var x=o._categoriesModels,b=m.getShallow("category"),w=x[b];return w&&(w.parentModel=m.parentModel,m.parentModel=w),m});var d=$t.prototype.getModel;function h(m,x){var b=d.call(this,m,x);return b.resolveParentPath=v,b}c.wrapMethod("getItemModel",function(m){return m.resolveParentPath=v,m.getModel=h,m});function v(m){if(m&&(m[0]==="label"||m[1]==="label")){var x=m.slice();return m[0]==="label"?x[0]="edgeLabel":m[1]==="label"&&(x[1]="edgeLabel"),x}return m}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(r,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(r,n),s=i.graph.getEdgeByIndex(r),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),pn("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var d=zY({series:this,dataIndex:r,multipleSeries:a});return d},e.prototype._updateCategoriesData=function(){var r=Se(this.option.categories||[],function(n){return n.value!=null?n:ve({value:0},n)}),a=new Zi(["value"],this);a.initData(r),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:ne.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:ne.color.primary}}},e})(Gr);function m_e(t){t.registerChartView(h_e),t.registerSeriesModel(p_e),t.registerProcessor(ZSe),t.registerVisual(KSe),t.registerVisual(QSe),t.registerLayout(a_e),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,i_e),t.registerLayout(s_e),t.registerCoordinateSystem("graphView",{dimensions:Qh.dimensions,create:u_e}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},en),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},en),t.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,r,a){r.eachComponent({mainType:"series",query:e},function(n){var i=a.getViewOfSeriesModel(n);i&&(e.dx!=null&&e.dy!=null&&i.updateViewOnPan(n,a,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&i.updateViewOnZoom(n,a,e));var o=n.coordinateSystem,s=i2(o,e,n.get("scaleLimit"));n.setCenter&&n.setCenter(s.center),n.setZoom&&n.setZoom(s.zoom)})})}var QV=(function(t){se(e,t);function e(r,a,n){var i=t.call(this)||this;dt(i).dataType="node",i.z2=2;var o=new Qt;return i.setTextContent(o),i.updateData(r,a,n,!0),i}return e.prototype.updateData=function(r,a,n,i){var o=this,s=r.graph.getNodeByIndex(a),l=r.hostModel,u=s.getModel(),c=u.getModel("emphasis"),d=r.getItemLayout(a),h=ve(Fl(u.getModel("itemStyle"),d,!0),d),v=this;if(isNaN(h.startAngle)){v.setShape(h);return}i?v.setShape(h):tr(v,{shape:h},l,a);var m=ve(Fl(u.getModel("itemStyle"),d,!0),d);o.setShape(m),o.useStyle(r.getItemVisual(a,"style")),Mn(o,u),this._updateLabel(l,u,s),r.setItemGraphicEl(a,v),Mn(v,u,"itemStyle");var x=c.get("focus");fa(this,x==="adjacency"?s.getAdjacentDataIndices():x,c.get("blurScope"),c.get("disabled"))},e.prototype._updateLabel=function(r,a,n){var i=this.getTextContent(),o=n.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=a.getModel("label");i.ignore=!c.get("show");var d=Dn(a),h=n.getVisual("style");qn(i,d,{labelFetcher:{getFormattedLabel:function(_,T,C,k,A,M){return r.getFormattedLabel(_,T,"node",k,Io(A,d.normal&&d.normal.get("formatter"),a.get("name")),M)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+"",inheritColor:h.fill,defaultOpacity:h.opacity,defaultOutsidePosition:"startArc"});var v=c.get("position")||"outside",m=c.get("distance")||0,x;v==="outside"?x=o.r+m:x=(o.r+o.r0)/2,this.textConfig={inside:v!=="outside"};var b=v!=="outside"?c.get("align")||"center":l>0?"left":"right",w=v!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";i.attr({x:l*x+o.cx,y:u*x+o.cy,rotation:0,style:{align:b,verticalAlign:w}})},e})(Ii),g_e=(function(t){se(e,t);function e(r,a,n,i){var o=t.call(this)||this;return dt(o).dataType="edge",o.updateData(r,a,n,i,!0),o}return e.prototype.buildPath=function(r,a){r.moveTo(a.s1[0],a.s1[1]);var n=.7,i=a.clockwise;r.arc(a.cx,a.cy,a.r,a.sStartAngle,a.sEndAngle,!i),r.bezierCurveTo((a.cx-a.s2[0])*n+a.s2[0],(a.cy-a.s2[1])*n+a.s2[1],(a.cx-a.t1[0])*n+a.t1[0],(a.cy-a.t1[1])*n+a.t1[1],a.t1[0],a.t1[1]),r.arc(a.cx,a.cy,a.r,a.tStartAngle,a.tEndAngle,!i),r.bezierCurveTo((a.cx-a.t2[0])*n+a.t2[0],(a.cy-a.t2[1])*n+a.t2[1],(a.cx-a.s1[0])*n+a.s1[0],(a.cy-a.s1[1])*n+a.s1[1],a.s1[0],a.s1[1]),r.closePath()},e.prototype.updateData=function(r,a,n,i,o){var s=r.hostModel,l=a.graph.getEdgeByIndex(n),u=l.getLayout(),c=l.node1.getModel(),d=a.getItemModel(l.dataIndex),h=d.getModel("lineStyle"),v=d.getModel("emphasis"),m=v.get("focus"),x=ve(Fl(c.getModel("itemStyle"),u,!0),u),b=this;if(isNaN(x.sStartAngle)||isNaN(x.tStartAngle)){b.setShape(x);return}o?(b.setShape(x),JV(b,l,r,h)):(bs(b),JV(b,l,r,h),tr(b,{shape:x},s,n)),fa(this,m==="adjacency"?l.getAdjacentDataIndices():m,v.get("blurScope"),v.get("disabled")),Mn(b,d,"lineStyle"),a.setItemGraphicEl(l.dataIndex,b)},e})(zt);function JV(t,e,r,a){var n=e.node1,i=e.node2,o=t.style;t.setStyle(a.getLineStyle());var s=a.get("color");switch(s){case"source":o.fill=r.getItemVisual(n.dataIndex,"style").fill,o.decal=n.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var l=r.getItemVisual(n.dataIndex,"style").fill,u=r.getItemVisual(i.dataIndex,"style").fill;if(Ie(l)&&Ie(u)){var c=t.shape,d=(c.s1[0]+c.s2[0])/2,h=(c.s1[1]+c.s2[1])/2,v=(c.t1[0]+c.t2[0])/2,m=(c.t1[1]+c.t2[1])/2;o.fill=new ym(d,h,v,m,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var y_e=Math.PI/180,x_e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,a){},e.prototype.render=function(r,a,n){var i=r.getData(),o=this._data,s=this.group,l=-r.get("startAngle")*y_e;if(i.diff(o).add(function(c){var d=i.getItemLayout(c);if(d){var h=new QV(i,c,l);dt(h).dataIndex=c,s.add(h)}}).update(function(c,d){var h=o.getItemGraphicEl(d),v=i.getItemLayout(c);if(!v){h&&$u(h,r,d);return}h?h.updateData(i,c,l):h=new QV(i,c,l),s.add(h)}).remove(function(c){var d=o.getItemGraphicEl(c);d&&$u(d,r,c)}).execute(),!o){var u=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=Pe(u[0],n.getWidth()),this.group.originY=Pe(u[1],n.getHeight()),na(this.group,{scaleX:1,scaleY:1},r)}this._data=i,this.renderEdges(r,l)},e.prototype.renderEdges=function(r,a){var n=r.getData(),i=r.getEdgeData(),o=this._edgeData,s=this.group;i.diff(o).add(function(l){var u=new g_e(n,i,l,a);dt(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(n,i,l,a),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&$u(u,r,l)}).execute(),this._edgeData=i},e.prototype.dispose=function(){},e.type="chord",e})(Rr),b_e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new Am(je(this.getData,this),je(this.getRawData,this))},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links)},e.prototype.getInitialData=function(r,a){var n=r.edges||r.links||[],i=r.data||r.nodes||[];if(i&&n){var o=wR(i,n,this,!0,s);return o.data}function s(l,u){var c=$t.prototype.getModel;function d(v,m){var x=c.call(this,v,m);return x.resolveParentPath=h,x}u.wrapMethod("getItemModel",function(v){return v.resolveParentPath=h,v.getModel=d,v});function h(v){if(v&&(v[0]==="label"||v[1]==="label")){var m=v.slice();return v[0]==="label"?m[0]="edgeLabel":v[1]==="label"&&(m[1]="edgeLabel"),m}return v}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,a,n){var i=this.getDataParams(r,n);if(n==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(r),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),pn("nameValue",{name:c.join(" > "),value:i.value,noValue:i.value==null})}return pn("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},e.prototype.getDataParams=function(r,a){var n=t.prototype.getDataParams.call(this,r,a);if(a==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(r);if(n.name==null&&(n.name=i.getName(r)),n.value==null){var s=o.getLayout().value;n.value=s}}return n},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e})(Gr),_N=Math.PI/180;function w_e(t,e){t.eachSeriesByType("chord",function(r){S_e(r,e)})}function S_e(t,e){var r=t.getData(),a=r.graph,n=t.getEdgeData(),i=n.count();if(i){var o=aY(t,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,d=Math.max((t.get("padAngle")||0)*_N,0),h=Math.max((t.get("minAngle")||0)*_N,0),v=-t.get("startAngle")*_N,m=v+Math.PI*2,x=t.get("clockwise"),b=x?1:-1,w=[v,m];z_(w,!x);var _=w[0],T=w[1],C=T-_,k=r.getSum("value")===0&&n.getSum("value")===0,A=[],M=0;a.eachEdge(function($){var K=k?1:$.getValue("value");k&&(K>0||h)&&(M+=2);var q=$.node1.dataIndex,H=$.node2.dataIndex;A[q]=(A[q]||0)+K,A[H]=(A[H]||0)+K});var L=0;if(a.eachNode(function($){var K=$.getValue("value");isNaN(K)||(A[$.dataIndex]=Math.max(K,A[$.dataIndex]||0)),!k&&(A[$.dataIndex]>0||h)&&M++,L+=A[$.dataIndex]||0}),!(M===0||L===0)){d*M>=Math.abs(C)&&(d=Math.max(0,(Math.abs(C)-h*M)/M)),(d+h)*M>=Math.abs(C)&&(h=(Math.abs(C)-d*M)/M);var R=(C-d*M*b)/L,P=0,j=0,V=0;a.eachNode(function($){var K=A[$.dataIndex]||0,q=R*(L?K:1)*b;Math.abs(q)<h?P+=h-Math.abs(q):(j+=Math.abs(q)-h,V+=Math.abs(q)),$.setLayout({angle:q,value:K})});var I=!1;if(P>j){var F=P/j;a.eachNode(function($){var K=$.getLayout().angle;Math.abs(K)>=h?$.setLayout({angle:K*F,ratio:F},!0):$.setLayout({angle:h,ratio:h===0?1:K/h},!0)})}else a.eachNode(function($){if(!I){var K=$.getLayout().angle,q=Math.min(K/V,1),H=q*P;K-H<h&&(I=!0)}});var G=P;a.eachNode(function($){if(!(G<=0)){var K=$.getLayout().angle;if(K>h&&h>0){var q=I?1:Math.min(K/V,1),H=K-h,Z=Math.min(H,Math.min(G,P*q));G-=Z,$.setLayout({angle:K-Z,ratio:(K-Z)/K},!0)}else h>0&&$.setLayout({angle:h,ratio:K===0?1:h/K},!0)}});var O=_,U=[];a.eachNode(function($){var K=Math.max($.getLayout().angle,h);$.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:O,endAngle:O+K*b,clockwise:x},!0),U[$.dataIndex]=O,O+=(K+d)*b}),a.eachEdge(function($){var K=k?1:$.getValue("value"),q=R*(L?K:1)*b,H=$.node1.dataIndex,Z=U[H]||0,te=Math.abs(($.node1.getLayout().ratio||1)*q),ie=Z+te*b,ce=[s+c*Math.cos(Z),l+c*Math.sin(Z)],me=[s+c*Math.cos(ie),l+c*Math.sin(ie)],ze=$.node2.dataIndex,Ce=U[ze]||0,ge=Math.abs(($.node2.getLayout().ratio||1)*q),Be=Ce+ge*b,_e=[s+c*Math.cos(Ce),l+c*Math.sin(Ce)],Oe=[s+c*Math.cos(Be),l+c*Math.sin(Be)];$.setLayout({s1:ce,s2:me,sStartAngle:Z,sEndAngle:ie,t1:_e,t2:Oe,tStartAngle:Ce,tEndAngle:Be,cx:s,cy:l,r:c,value:K,clockwise:x}),U[H]=ie,U[ze]=Be})}}}function __e(t){t.registerChartView(x_e),t.registerSeriesModel(b_e),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,w_e),t.registerProcessor(km("chord"))}var T_e=(function(){function t(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return t})(),C_e=(function(t){se(e,t);function e(r){var a=t.call(this,r)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new T_e},e.prototype.buildPath=function(r,a){var n=Math.cos,i=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-n(l)*s*(s>=o/3?1:2),c=a.y-i(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,r.moveTo(u,c),r.lineTo(a.x+n(l)*s,a.y+i(l)*s),r.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),r.lineTo(a.x-n(l)*s,a.y-i(l)*s),r.lineTo(u,c)},e})(zt);function k_e(t,e){var r=t.get("center"),a=e.getWidth(),n=e.getHeight(),i=Math.min(a,n),o=Pe(r[0],e.getWidth()),s=Pe(r[1],e.getHeight()),l=Pe(t.get("radius"),i/2);return{cx:o,cy:s,r:l}}function b1(t,e){var r=t==null?"":t+"";return e&&(Ie(e)?r=e.replace("{value}",r):Ke(e)&&(r=e(t))),r}var N_e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n){this.group.removeAll();var i=r.get(["axisLine","lineStyle","color"]),o=k_e(r,n);this._renderMain(r,a,n,i,o),this._data=r.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(r,a,n,i,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,c=-r.get("endAngle")/180*Math.PI,d=r.getModel("axisLine"),h=d.get("roundCap"),v=h?DS:Ii,m=d.get("show"),x=d.getModel("lineStyle"),b=x.get("width"),w=[u,c];z_(w,!l),u=w[0],c=w[1];for(var _=c-u,T=u,C=[],k=0;m&&k<i.length;k++){var A=Math.min(Math.max(i[k][0],0),1);c=u+_*A;var M=new v({shape:{startAngle:T,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-b,r:o.r},silent:!0});M.setStyle({fill:i[k][1]}),M.setStyle(x.getLineStyle(["color","width"])),C.push(M),T=c}C.reverse(),z(C,function(R){return s.add(R)});var L=function(R){if(R<=0)return i[0][1];var P;for(P=0;P<i.length;P++)if(i[P][0]>=R&&(P===0?0:i[P-1][0])<R)return i[P][1];return i[P-1][1]};this._renderTicks(r,a,n,L,o,u,c,l,b),this._renderTitleAndDetail(r,a,n,L,o),this._renderAnchor(r,o),this._renderPointer(r,a,n,L,o,u,c,l,b)},e.prototype._renderTicks=function(r,a,n,i,o,s,l,u,c){for(var d=this.group,h=o.cx,v=o.cy,m=o.r,x=+r.get("min"),b=+r.get("max"),w=r.getModel("splitLine"),_=r.getModel("axisTick"),T=r.getModel("axisLabel"),C=r.get("splitNumber"),k=_.get("splitNumber"),A=Pe(w.get("length"),m),M=Pe(_.get("length"),m),L=s,R=(l-s)/C,P=R/k,j=w.getModel("lineStyle").getLineStyle(),V=_.getModel("lineStyle").getLineStyle(),I=w.get("distance"),F,G,O=0;O<=C;O++){if(F=Math.cos(L),G=Math.sin(L),w.get("show")){var U=I?I+c:c,$=new fn({shape:{x1:F*(m-U)+h,y1:G*(m-U)+v,x2:F*(m-A-U)+h,y2:G*(m-A-U)+v},style:j,silent:!0});j.stroke==="auto"&&$.setStyle({stroke:i(O/C)}),d.add($)}if(T.get("show")){var U=T.get("distance")+I,K=b1(dn(O/C*(b-x)+x),T.get("formatter")),q=i(O/C),H=F*(m-A-U)+h,Z=G*(m-A-U)+v,te=T.get("rotate"),ie=0;te==="radial"?(ie=-L+2*Math.PI,ie>Math.PI/2&&(ie+=Math.PI)):te==="tangential"?ie=-L-Math.PI/2:qt(te)&&(ie=te*Math.PI/180),ie===0?d.add(new Qt({style:Fr(T,{text:K,x:H,y:Z,verticalAlign:G<-.8?"top":G>.8?"bottom":"middle",align:F<-.4?"left":F>.4?"right":"center"},{inheritColor:q}),silent:!0})):d.add(new Qt({style:Fr(T,{text:K,x:H,y:Z,verticalAlign:"middle",align:"center"},{inheritColor:q}),silent:!0,originX:H,originY:Z,rotation:ie}))}if(_.get("show")&&O!==C){var U=_.get("distance");U=U?U+c:c;for(var ce=0;ce<=k;ce++){F=Math.cos(L),G=Math.sin(L);var me=new fn({shape:{x1:F*(m-U)+h,y1:G*(m-U)+v,x2:F*(m-M-U)+h,y2:G*(m-M-U)+v},silent:!0,style:V});V.stroke==="auto"&&me.setStyle({stroke:i((O+ce/k)/C)}),d.add(me),L+=P}L-=P}else L+=R}},e.prototype._renderPointer=function(r,a,n,i,o,s,l,u,c){var d=this.group,h=this._data,v=this._progressEls,m=[],x=r.get(["pointer","show"]),b=r.getModel("progress"),w=b.get("show"),_=r.getData(),T=_.mapDimension("value"),C=+r.get("min"),k=+r.get("max"),A=[C,k],M=[s,l];function L(P,j){var V=_.getItemModel(P),I=V.getModel("pointer"),F=Pe(I.get("width"),o.r),G=Pe(I.get("length"),o.r),O=r.get(["pointer","icon"]),U=I.get("offsetCenter"),$=Pe(U[0],o.r),K=Pe(U[1],o.r),q=I.get("keepAspect"),H;return O?H=mn(O,$-F/2,K-G,F,G,null,q):H=new C_e({shape:{angle:-Math.PI/2,width:F,r:G,x:$,y:K}}),H.rotation=-(j+Math.PI/2),H.x=o.cx,H.y=o.cy,H}function R(P,j){var V=b.get("roundCap"),I=V?DS:Ii,F=b.get("overlap"),G=F?b.get("width"):c/_.count(),O=F?o.r-G:o.r-(P+1)*G,U=F?o.r:o.r-P*G,$=new I({shape:{startAngle:s,endAngle:j,cx:o.cx,cy:o.cy,clockwise:u,r0:O,r:U}});return F&&($.z2=pr(_.get(T,P),[C,k],[100,0],!0)),$}(w||x)&&(_.diff(h).add(function(P){var j=_.get(T,P);if(x){var V=L(P,s);na(V,{rotation:-((isNaN(+j)?M[0]:pr(j,A,M,!0))+Math.PI/2)},r),d.add(V),_.setItemGraphicEl(P,V)}if(w){var I=R(P,s),F=b.get("clip");na(I,{shape:{endAngle:pr(j,A,M,F)}},r),d.add(I),$M(r.seriesIndex,_.dataType,P,I),m[P]=I}}).update(function(P,j){var V=_.get(T,P);if(x){var I=h.getItemGraphicEl(j),F=I?I.rotation:s,G=L(P,F);G.rotation=F,tr(G,{rotation:-((isNaN(+V)?M[0]:pr(V,A,M,!0))+Math.PI/2)},r),d.add(G),_.setItemGraphicEl(P,G)}if(w){var O=v[j],U=O?O.shape.endAngle:s,$=R(P,U),K=b.get("clip");tr($,{shape:{endAngle:pr(V,A,M,K)}},r),d.add($),$M(r.seriesIndex,_.dataType,P,$),m[P]=$}}).execute(),_.each(function(P){var j=_.getItemModel(P),V=j.getModel("emphasis"),I=V.get("focus"),F=V.get("blurScope"),G=V.get("disabled");if(x){var O=_.getItemGraphicEl(P),U=_.getItemVisual(P,"style"),$=U.fill;if(O instanceof li){var K=O.style;O.useStyle(ve({image:K.image,x:K.x,y:K.y,width:K.width,height:K.height},U))}else O.useStyle(U),O.type!=="pointer"&&O.setColor($);O.setStyle(j.getModel(["pointer","itemStyle"]).getItemStyle()),O.style.fill==="auto"&&O.setStyle("fill",i(pr(_.get(T,P),A,[0,1],!0))),O.z2EmphasisLift=0,Mn(O,j),fa(O,I,F,G)}if(w){var q=m[P];q.useStyle(_.getItemVisual(P,"style")),q.setStyle(j.getModel(["progress","itemStyle"]).getItemStyle()),q.z2EmphasisLift=0,Mn(q,j),fa(q,I,F,G)}}),this._progressEls=m)},e.prototype._renderAnchor=function(r,a){var n=r.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),c=mn(s,a.cx-o/2+Pe(l[0],a.r),a.cy-o/2+Pe(l[1],a.r),o,o,null,u);c.z2=n.get("showAbove")?1:0,c.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(r,a,n,i,o){var s=this,l=r.getData(),u=l.mapDimension("value"),c=+r.get("min"),d=+r.get("max"),h=new Qe,v=[],m=[],x=r.isAnimationEnabled(),b=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(w){v[w]=new Qt({silent:!0}),m[w]=new Qt({silent:!0})}).update(function(w,_){v[w]=s._titleEls[_],m[w]=s._detailEls[_]}).execute(),l.each(function(w){var _=l.getItemModel(w),T=l.get(u,w),C=new Qe,k=i(pr(T,[c,d],[0,1],!0)),A=_.getModel("title");if(A.get("show")){var M=A.get("offsetCenter"),L=o.cx+Pe(M[0],o.r),R=o.cy+Pe(M[1],o.r),P=v[w];P.attr({z2:b?0:2,style:Fr(A,{x:L,y:R,text:l.getName(w),align:"center",verticalAlign:"middle"},{inheritColor:k})}),C.add(P)}var j=_.getModel("detail");if(j.get("show")){var V=j.get("offsetCenter"),I=o.cx+Pe(V[0],o.r),F=o.cy+Pe(V[1],o.r),G=Pe(j.get("width"),o.r),O=Pe(j.get("height"),o.r),U=r.get(["progress","show"])?l.getItemVisual(w,"style").fill:k,P=m[w],$=j.get("formatter");P.attr({z2:b?0:2,style:Fr(j,{x:I,y:F,text:b1(T,$),width:isNaN(G)?null:G,height:isNaN(O)?null:O,align:"center",verticalAlign:"middle"},{inheritColor:U})}),jW(P,{normal:j},T,function(q){return b1(q,$)}),x&&OW(P,w,l,r,{getFormattedLabel:function(q,H,Z,te,ie,ce){return b1(ce?ce.interpolatedValue:T,$)}}),C.add(P)}h.add(C)}),this.group.add(h),this._titleEls=v,this._detailEls=m},e.type="gauge",e})(Rr),A_e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="itemStyle",r}return e.prototype.getInitialData=function(r,a){return Nm(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,ne.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:ne.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:ne.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:ne.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:ne.color.neutral00,borderWidth:0,borderColor:ne.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:ne.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:ne.color.transparent,borderWidth:0,borderColor:ne.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:ne.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e})(Gr);function M_e(t){t.registerChartView(N_e),t.registerSeriesModel(A_e)}var D_e=["itemStyle","opacity"],L_e=(function(t){se(e,t);function e(r,a){var n=t.call(this)||this,i=n,o=new xi,s=new Qt;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(r,a,!0),n}return e.prototype.updateData=function(r,a,n){var i=this,o=r.hostModel,s=r.getItemModel(a),l=r.getItemLayout(a),u=s.getModel("emphasis"),c=s.get(D_e);c=c??1,n||bs(i),i.useStyle(r.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,na(i,{style:{opacity:c}},o,a)):tr(i,{style:{opacity:c},shape:{points:l.points}},o,a),Mn(i,s),this._updateLabel(r,a),fa(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=r.hostModel,l=r.getItemModel(a),u=r.getItemLayout(a),c=u.label,d=r.getItemVisual(a,"style"),h=d.fill;qn(o,Dn(l),{labelFetcher:r.hostModel,labelDataIndex:a,defaultOpacity:d.opacity,defaultText:r.getName(a)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var v=l.getModel("label"),m=v.get("color"),x=m==="inherit"?h:null;n.setTextConfig({local:!0,inside:!!c.inside,insideStroke:x,outsideFill:x});var b=c.linePoints;i.setShape({points:b}),n.textGuideLineConfig={anchor:b?new at(b[0][0],b[0][1]):null},tr(o,{style:{x:c.x,y:c.y}},s,a),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),X5(n,q5(l),{stroke:h})},e})(ji),E_e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,a,n){var i=r.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new L_e(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,l),s.add(c),i.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);$u(u,r,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e})(Rr),R_e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Am(je(this.getData,this),je(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.getInitialData=function(r,a){return Nm(this,{coordDimensions:["value"],encodeDefaulter:wt(N5,this)})},e.prototype._defaultLabelLine=function(r){Mh(r,"labelLine",["show"]);var a=r.labelLine,n=r.emphasis.labelLine;a.show=a.show&&r.label.show,n.show=n.show&&r.emphasis.label.show},e.prototype.getDataParams=function(r){var a=this.getData(),n=t.prototype.getDataParams.call(this,r),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,r)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:ne.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:ne.color.primary}}},e})(Gr);function P_e(t,e){for(var r=t.mapDimension("value"),a=t.mapArray(r,function(l){return l}),n=[],i=e==="ascending",o=0,s=t.count();o<s;o++)n[o]=o;return Ke(e)?n.sort(e):e!=="none"&&n.sort(function(l,u){return i?a[l]-a[u]:a[u]-a[l]}),n}function I_e(t){var e=t.hostModel,r=e.get("orient");t.each(function(a){var n=t.getItemModel(a),i=n.getModel("label"),o=i.get("position"),s=n.getModel("labelLine"),l=t.getItemLayout(a),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",d,h,v,m;if(c)o==="insideLeft"?(h=(u[0][0]+u[3][0])/2+5,v=(u[0][1]+u[3][1])/2,d="left"):o==="insideRight"?(h=(u[1][0]+u[2][0])/2-5,v=(u[1][1]+u[2][1])/2,d="right"):(h=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,v=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,d="center"),m=[[h,v],[h,v]];else{var x=void 0,b=void 0,w=void 0,_=void 0,T=s.get("length");o==="left"?(x=(u[3][0]+u[0][0])/2,b=(u[3][1]+u[0][1])/2,w=x-T,h=w-5,d="right"):o==="right"?(x=(u[1][0]+u[2][0])/2,b=(u[1][1]+u[2][1])/2,w=x+T,h=w+5,d="left"):o==="top"?(x=(u[3][0]+u[0][0])/2,b=(u[3][1]+u[0][1])/2,_=b-T,v=_-5,d="center"):o==="bottom"?(x=(u[1][0]+u[2][0])/2,b=(u[1][1]+u[2][1])/2,_=b+T,v=_+5,d="center"):o==="rightTop"?(x=r==="horizontal"?u[3][0]:u[1][0],b=r==="horizontal"?u[3][1]:u[1][1],r==="horizontal"?(_=b-T,v=_-5,d="center"):(w=x+T,h=w+5,d="top")):o==="rightBottom"?(x=u[2][0],b=u[2][1],r==="horizontal"?(_=b+T,v=_+5,d="center"):(w=x+T,h=w+5,d="bottom")):o==="leftTop"?(x=u[0][0],b=r==="horizontal"?u[0][1]:u[1][1],r==="horizontal"?(_=b-T,v=_-5,d="center"):(w=x-T,h=w-5,d="right")):o==="leftBottom"?(x=r==="horizontal"?u[1][0]:u[3][0],b=r==="horizontal"?u[1][1]:u[2][1],r==="horizontal"?(_=b+T,v=_+5,d="center"):(w=x-T,h=w-5,d="right")):(x=(u[1][0]+u[2][0])/2,b=(u[1][1]+u[2][1])/2,r==="horizontal"?(_=b+T,v=_+5,d="center"):(w=x+T,h=w+5,d="left")),r==="horizontal"?(w=x,h=w):(_=b,v=_),m=[[x,b],[w,_]]}l.label={linePoints:m,x:h,y:v,verticalAlign:"middle",textAlign:d,inside:c}})}function j_e(t,e){t.eachSeriesByType("funnel",function(r){var a=r.getData(),n=a.mapDimension("value"),i=r.get("sort"),o=Ln(r,e),s=ha(r.getBoxLayoutParams(),o.refContainer),l=r.get("orient"),u=s.width,c=s.height,d=P_e(a,i),h=s.x,v=s.y,m=l==="horizontal"?[Pe(r.get("minSize"),c),Pe(r.get("maxSize"),c)]:[Pe(r.get("minSize"),u),Pe(r.get("maxSize"),u)],x=a.getDataExtent(n),b=r.get("min"),w=r.get("max");b==null&&(b=Math.min(x[0],0)),w==null&&(w=x[1]);var _=r.get("funnelAlign"),T=r.get("gap"),C=l==="horizontal"?u:c,k=(C-T*(a.count()-1))/a.count(),A=function(G,O){if(l==="horizontal"){var U=a.get(n,G)||0,$=pr(U,[b,w],m,!0),K=void 0;switch(_){case"top":K=v;break;case"center":K=v+(c-$)/2;break;case"bottom":K=v+(c-$);break}return[[O,K],[O,K+$]]}var q=a.get(n,G)||0,H=pr(q,[b,w],m,!0),Z;switch(_){case"left":Z=h;break;case"center":Z=h+(u-H)/2;break;case"right":Z=h+u-H;break}return[[Z,O],[Z+H,O]]};i==="ascending"&&(k=-k,T=-T,l==="horizontal"?h+=u:v+=c,d=d.reverse());for(var M=0;M<d.length;M++){var L=d[M],R=d[M+1],P=a.getItemModel(L);if(l==="horizontal"){var j=P.get(["itemStyle","width"]);j==null?j=k:(j=Pe(j,u),i==="ascending"&&(j=-j));var V=A(L,h),I=A(R,h+j);h+=j+T,a.setItemLayout(L,{points:V.concat(I.slice().reverse())})}else{var F=P.get(["itemStyle","height"]);F==null?F=k:(F=Pe(F,c),i==="ascending"&&(F=-F));var V=A(L,v),I=A(R,v+F);v+=F+T,a.setItemLayout(L,{points:V.concat(I.slice().reverse())})}}I_e(a)})}function O_e(t){t.registerChartView(E_e),t.registerSeriesModel(R_e),t.registerLayout(j_e),t.registerProcessor(km("funnel"))}var z_e=.3,B_e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._dataGroup=new Qe,r._initialized=!1,r}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(r,a,n,i){this._progressiveEls=null;var o=this._dataGroup,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.dimensions,d=t6(r);s.diff(l).add(h).update(v).remove(m).execute();function h(b){var w=e6(s,o,b,c,u);TN(w,s,b,d)}function v(b,w){var _=l.getItemGraphicEl(w),T=EZ(s,b,c,u);s.setItemGraphicEl(b,_),tr(_,{shape:{points:T}},r,b),bs(_),TN(_,s,b,d)}function m(b){var w=l.getItemGraphicEl(b);o.remove(w)}if(!this._initialized){this._initialized=!0;var x=V_e(u,r,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(x)}this._data=s},e.prototype.incrementalPrepareRender=function(r,a,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(r,a,n){for(var i=a.getData(),o=a.coordinateSystem,s=o.dimensions,l=t6(a),u=this._progressiveEls=[],c=r.start;c<r.end;c++){var d=e6(i,this._dataGroup,c,s,o);d.incremental=!0,TN(d,i,c,l),u.push(d)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e})(Rr);function V_e(t,e,r){var a=t.model,n=t.getRect(),i=new Et({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),o=a.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),na(i,{shape:{width:n.width,height:n.height}},e,r),i}function EZ(t,e,r,a){for(var n=[],i=0;i<r.length;i++){var o=r[i],s=t.get(t.mapDimension(o),e);F_e(s,a.getAxis(o).type)||n.push(a.dataToPoint(s,o))}return n}function e6(t,e,r,a,n){var i=EZ(t,r,a,n),o=new xi({shape:{points:i},z2:10});return e.add(o),t.setItemGraphicEl(r,o),o}function t6(t){var e=t.get("smooth",!0);return e===!0&&(e=z_e),e=tc(e),Ei(e)&&(e=0),{smooth:e}}function TN(t,e,r,a){t.useStyle(e.getItemVisual(r,"style")),t.style.fill=null,t.setShape("smooth",a.smooth);var n=e.getItemModel(r),i=n.getModel("emphasis");Mn(t,n,"lineStyle"),fa(t,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function F_e(t,e){return e==="category"?t==null:t==null||isNaN(t)}var G_e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return e.prototype.getInitialData=function(r,a){return cc(null,this,{useEncodeDefaulter:je(H_e,null,this)})},e.prototype.getRawIndicesByActiveState=function(r){var a=this.coordinateSystem,n=this.getData(),i=[];return a.eachActiveState(n,function(o,s){r===o&&i.push(n.getRawIndex(s))}),i},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e})(Gr);function H_e(t){var e=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(e){var r={};return z(e.dimensions,function(a){var n=U_e(a);r[a]=n}),r}}function U_e(t){return+t.replace("dim","")}var $_e=["lineStyle","opacity"],W_e={seriesType:"parallel",reset:function(t,e){var r=t.coordinateSystem,a={normal:t.get(["lineStyle","opacity"]),active:t.get("activeOpacity"),inactive:t.get("inactiveOpacity")};return{progress:function(n,i){r.eachActiveState(i,function(o,s){var l=a[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(s).get($_e,!0);u!=null&&(l=u)}var c=i.ensureUniqueItemVisual(s,"style");c.opacity=l},n.start,n.end)}}}};function Y_e(t){X_e(t),q_e(t)}function X_e(t){if(!t.parallel){var e=!1;z(t.series,function(r){r&&r.type==="parallel"&&(e=!0)}),e&&(t.parallel=[{}])}}function q_e(t){var e=Ir(t.parallelAxis);z(e,function(r){if(it(r)){var a=r.parallelIndex||0,n=Ir(t.parallel)[a];n&&n.parallelAxisDefault&&Ct(r,n.parallelAxisDefault,!1)}})}var Z_e=5,K_e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n){this._model=r,this._api=n,this._handlers||(this._handlers={},z(Q_e,function(i,o){n.getZr().on(o,this._handlers[o]=je(i,this))},this)),_m(this,"_throttledDispatchExpand",r.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(r,a){hy(this,"_throttledDispatchExpand"),z(this._handlers,function(n,i){a.getZr().off(i,n)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(r){this._dispatchExpand(r)},e.prototype._dispatchExpand=function(r){r&&this._api.dispatchAction(ve({type:"parallelAxisExpand"},r))},e.type="parallel",e})(oa),Q_e={mousedown:function(t){CN(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(CN(this,"click")&&e){var r=[t.offsetX,t.offsetY],a=Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2);if(a>Z_e)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!CN(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),a=r.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function CN(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}var J_e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(r){var a=this.option;r&&Ct(a,r,!0),this._initDimensions()},e.prototype.contains=function(r,a){var n=r.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(r){z(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){r.hasOwnProperty(a)&&(this.option[a]=r[a])},this)},e.prototype._initDimensions=function(){var r=this.dimensions=[],a=this.parallelAxisIndex=[],n=mr(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);z(n,function(i){r.push("dim"+i.get("dim")),a.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e})(Gt),e2e=(function(t){se(e,t);function e(r,a,n,i,o){var s=t.call(this,r,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e})(al);function jd(t,e,r,a,n,i){t=t||0;var o=r[1]-r[0];if(n!=null&&(n=Yv(n,[0,o])),i!=null&&(i=Math.max(i,n??0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=Yv(s,[0,o]),n=i=Yv(s,[n,i]),a=0}e[0]=Yv(e[0],r),e[1]=Yv(e[1],r);var l=kN(e,a);e[a]+=t;var u=n||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,e[a]=Yv(e[a],c);var d;return d=kN(e,a),n!=null&&(d.sign!==l.sign||d.span<n)&&(e[1-a]=e[a]+l.sign*n),d=kN(e,a),i!=null&&d.span>i&&(e[1-a]=e[a]+d.sign*i),e}function kN(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function Yv(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var NN=z,RZ=Math.min,PZ=Math.max,r6=Math.floor,t2e=Math.ceil,a6=dn,r2e=Math.PI,a2e=(function(){function t(e,r,a){this.type="parallel",this._axesMap=He(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,r,a)}return t.prototype._init=function(e,r,a){var n=e.dimensions,i=e.parallelAxisIndex;NN(n,function(o,s){var l=i[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new e2e(o,e2(u),[0,0],u.get("type"),l)),d=c.type==="category";c.onBand=d&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},t.prototype.update=function(e,r){this._updateAxesFromSeries(this._model,e)},t.prototype.containPoint=function(e){var r=this._makeLayoutInfo(),a=r.axisBase,n=r.layoutBase,i=r.pixelDimIndex,o=e[1-i],s=e[i];return o>=a&&o<=a+r.axisLength&&s>=n&&s<=n+r.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(e,r){r.eachSeries(function(a){if(e.contains(a,r)){var n=a.getData();NN(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),Yp(o.scale,o.model)},this)}},this)},t.prototype.resize=function(e,r){var a=Ln(e,r).refContainer;this._rect=ha(e.getBoxLayoutParams(),a),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var e=this._model,r=this._rect,a=["x","y"],n=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=r[n[o]],l=[0,s],u=this.dimensions.length,c=w1(e.get("axisExpandWidth"),l),d=w1(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>d&&d>1&&c>0&&s>0,v=e.get("axisExpandWindow"),m;if(v)m=w1(v[1]-v[0],l),v[1]=v[0]+m;else{m=w1(c*(d-1),l);var x=e.get("axisExpandCenter")||r6(u/2);v=[c*x-m/2],v[1]=v[0]+m}var b=(s-m)/(u-d);b<3&&(b=0);var w=[r6(a6(v[0]/c,1))+1,t2e(a6(v[1]/c,1))-1],_=b/c*v[0];return{layout:i,pixelDimIndex:o,layoutBase:r[a[o]],layoutLength:s,axisBase:r[a[1-o]],axisLength:r[n[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:b,axisExpandWindow:v,axisCount:u,winInnerIndices:w,axisExpandWindow0Pos:_}},t.prototype._layoutAxes=function(){var e=this._rect,r=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;r.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),NN(a,function(o,s){var l=(n.axisExpandable?i2e:n2e)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},c={horizontal:r2e/2,vertical:0},d=[u[i].x+e.x,u[i].y+e.y],h=c[i],v=oi();Hd(v,v,h),Zl(v,v,d),this._axesLayout[o]={position:d,rotation:h,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(e){return this._axesMap.get(e)},t.prototype.dataToPoint=function(e,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(e),r)},t.prototype.eachActiveState=function(e,r,a,n){a==null&&(a=0),n==null&&(n=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];z(o,function(b){s.push(e.mapDimension(b)),l.push(i.get(b).model)});for(var u=this.hasAxisBrushed(),c=a;c<n;c++){var d=void 0;if(!u)d="normal";else{d="active";for(var h=e.getValues(s,c),v=0,m=o.length;v<m;v++){var x=l[v].getActiveState(h[v]);if(x==="inactive"){d="inactive";break}}}r(d,c)}},t.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,r=this._axesMap,a=!1,n=0,i=e.length;n<i;n++)r.get(e[n]).model.getActiveState()!=="normal"&&(a=!0);return a},t.prototype.axisCoordToPoint=function(e,r){var a=this._axesLayout[r];return Ws([e,0],a.transform)},t.prototype.getAxisLayout=function(e){return et(this._axesLayout[e])},t.prototype.getSlidedAxisExpandWindow=function(e){var r=this._makeLayoutInfo(),a=r.pixelDimIndex,n=r.axisExpandWindow.slice(),i=n[1]-n[0],o=[0,r.axisExpandWidth*(r.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:n};var s=e[a]-r.layoutBase-r.axisExpandWindow0Pos,l,u="slide",c=r.axisCollapseWidth,d=this._model.get("axisExpandSlideTriggerArea"),h=d[0]!=null;if(c)h&&c&&s<i*d[0]?(u="jump",l=s-i*d[2]):h&&c&&s>i*(1-d[0])?(u="jump",l=s-i*(1-d[2])):(l=s-i*d[1])>=0&&(l=s-i*(1-d[1]))<=0&&(l=0),l*=r.axisExpandWidth/c,l?jd(l,n,o,"all"):u="none";else{var v=n[1]-n[0],m=o[1]*s/v;n=[PZ(0,m-v/2)],n[1]=RZ(o[1],n[0]+v),n[0]=n[1]-v}return{axisExpandWindow:n,behavior:u}},t})();function w1(t,e){return RZ(PZ(t,e[0]),e[1])}function n2e(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function i2e(t,e){var r=e.layoutLength,a=e.axisExpandWidth,n=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,c;return t<o[0]?(s=t*i,c=i):t<=o[1]?(s=e.axisExpandWindow0Pos+t*a-e.axisExpandWindow[0],l=a,u=!0):(s=r-(n-1-t)*i,c=i),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}function o2e(t,e){var r=[];return t.eachComponent("parallel",function(a,n){var i=new a2e(a,t,e);i.name="parallel_"+n,i.resize(a,e),a.coordinateSystem=i,i.model=a,r.push(i)}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="parallel"){var n=a.getReferringComponents("parallel",Ia).models[0];a.coordinateSystem=n.coordinateSystem}}),r}var s2e={create:o2e},ZD=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.activeIntervals=[],r}return e.prototype.getAreaSelectStyle=function(){return Lh([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(r){var a=this.activeIntervals=et(r);if(a)for(var n=a.length-1;n>=0;n--)ps(a[n])},e.prototype.getActiveState=function(r){var a=this.activeIntervals;if(!a.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=r&&r<=n[1])return"active"}else for(var i=0,o=a.length;i<o;i++)if(a[i][0]<=r&&r<=a[i][1])return"active";return"inactive"},e})(Gt);gn(ZD,tx);var jh=!0,Ny=Math.min,Qp=Math.max,l2e=Math.pow,u2e=1e4,c2e=6,d2e=6,n6="globalPan",f2e={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},h2e={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},i6={brushStyle:{lineWidth:2,stroke:ne.color.backgroundTint,fill:ne.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},v2e=0,SR=(function(t){se(e,t);function e(r){var a=t.call(this)||this;return a._track=[],a._covers=[],a._handlers={},a._zr=r,a.group=new Qe,a._uid="brushController_"+v2e++,z(w2e,function(n,i){this._handlers[i]=je(n,this)},a),a}return e.prototype.enableBrush=function(r){return this._brushType&&this._doDisableBrush(),r.brushType&&this._doEnableBrush(r),this},e.prototype._doEnableBrush=function(r){var a=this._zr;this._enableGlobalPan||K1e(a,n6,this._uid),z(this._handlers,function(n,i){a.on(i,n)}),this._brushType=r.brushType,this._brushOption=Ct(et(i6),r,!0)},e.prototype._doDisableBrush=function(){var r=this._zr;Q1e(r,n6,this._uid),z(this._handlers,function(a,n){r.off(n,a)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(r){if(r&&r.length){var a=this._panels={};z(r,function(n){a[n.panelId]=et(n)})}else this._panels=null;return this},e.prototype.mount=function(r){r=r||{},this._enableGlobalPan=r.enableGlobalPan;var a=this.group;return this._zr.add(a),a.attr({x:r.x||0,y:r.y||0,rotation:r.rotation||0,scaleX:r.scaleX||1,scaleY:r.scaleY||1}),this._transform=a.getLocalTransform(),this},e.prototype.updateCovers=function(r){r=Se(r,function(h){return Ct(et(i6),h,!0)});var a="\0-brush-index-",n=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new nc(n,r,u,l).add(c).update(c).remove(d).execute(),this;function l(h,v){return(h.id!=null?h.id:a+v)+"-"+h.brushType}function u(h,v){return l(h.__brushOption,v)}function c(h,v){var m=r[h];if(v!=null&&n[v]===s)i[h]=n[v];else{var x=i[h]=v!=null?(n[v].__brushOption=m,n[v]):jZ(o,IZ(o,m));_R(o,x)}}function d(h){n[h]!==s&&o.group.remove(n[h])}},e.prototype.unmount=function(){return this.enableBrush(!1),KD(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e})(ws);function IZ(t,e){var r=u2[e.brushType].createCover(t,e);return r.__brushOption=e,zZ(r,e),t.group.add(r),r}function jZ(t,e){var r=TR(e);return r.endCreating&&(r.endCreating(t,e),zZ(e,e.__brushOption)),e}function OZ(t,e){var r=e.__brushOption;TR(e).updateCoverShape(t,e,r.range,r)}function zZ(t,e){var r=e.z;r==null&&(r=u2e),t.traverse(function(a){a.z=r,a.z2=r})}function _R(t,e){TR(e).updateCommon(t,e),OZ(t,e)}function TR(t){return u2[t.__brushOption.brushType]}function CR(t,e,r){var a=t._panels;if(!a)return jh;var n,i=t._transform;return z(a,function(o){o.isTargetByCursor(e,r,i)&&(n=o)}),n}function BZ(t,e){var r=t._panels;if(!r)return jh;var a=e.__brushOption.panelId;return a!=null?r[a]:jh}function KD(t){var e=t._covers,r=e.length;return z(e,function(a){t.group.remove(a)},t),e.length=0,!!r}function Oh(t,e){var r=Se(t._covers,function(a){var n=a.__brushOption,i=et(n.range);return{brushType:n.brushType,panelId:n.panelId,range:i}});t.trigger("brush",{areas:r,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function p2e(t){var e=t._track;if(!e.length)return!1;var r=e[e.length-1],a=e[0],n=r[0]-a[0],i=r[1]-a[1],o=l2e(n*n+i*i,.5);return o>c2e}function VZ(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function FZ(t,e,r,a){var n=new Qe;return n.add(new Et({name:"main",style:kR(r),silent:!0,draggable:!0,cursor:"move",drift:wt(o6,t,e,n,["n","s","w","e"]),ondragend:wt(Oh,e,{isEnd:!0})})),z(a,function(i){n.add(new Et({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:wt(o6,t,e,n,i),ondragend:wt(Oh,e,{isEnd:!0})}))}),n}function GZ(t,e,r,a){var n=a.brushStyle.lineWidth||0,i=Qp(n,d2e),o=r[0][0],s=r[1][0],l=o-n/2,u=s-n/2,c=r[0][1],d=r[1][1],h=c-i+n/2,v=d-i+n/2,m=c-o,x=d-s,b=m+n,w=x+n;Iu(t,e,"main",o,s,m,x),a.transformable&&(Iu(t,e,"w",l,u,i,w),Iu(t,e,"e",h,u,i,w),Iu(t,e,"n",l,u,b,i),Iu(t,e,"s",l,v,b,i),Iu(t,e,"nw",l,u,i,i),Iu(t,e,"ne",h,u,i,i),Iu(t,e,"sw",l,v,i,i),Iu(t,e,"se",h,v,i,i))}function QD(t,e){var r=e.__brushOption,a=r.transformable,n=e.childAt(0);n.useStyle(kR(r)),n.attr({silent:!a,cursor:a?"move":"default"}),z([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?JD(t,i[0]):g2e(t,i);o&&o.attr({silent:!a,invisible:!a,cursor:a?h2e[s]+"-resize":null})})}function Iu(t,e,r,a,n,i,o){var s=e.childOfName(r);s&&s.setShape(x2e(NR(t,e,[[a,n],[a+i,n+o]])))}function kR(t){return nt({strokeNoScale:!0},t.brushStyle)}function HZ(t,e,r,a){var n=[Ny(t,r),Ny(e,a)],i=[Qp(t,r),Qp(e,a)];return[[n[0],i[0]],[n[1],i[1]]]}function m2e(t){return Sh(t.group)}function JD(t,e){var r={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=$_(r[e],m2e(t));return a[n]}function g2e(t,e){var r=[JD(t,e[0]),JD(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function o6(t,e,r,a,n,i){var o=r.__brushOption,s=t.toRectRange(o.range),l=UZ(e,n,i);z(a,function(u){var c=f2e[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=t.fromRectRange(HZ(s[0][0],s[1][0],s[0][1],s[1][1])),_R(e,r),Oh(e,{isEnd:!1})}function y2e(t,e,r,a){var n=e.__brushOption.range,i=UZ(t,r,a);z(n,function(o){o[0]+=i[0],o[1]+=i[1]}),_R(t,e),Oh(t,{isEnd:!1})}function UZ(t,e,r){var a=t.group,n=a.transformCoordToLocal(e,r),i=a.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function NR(t,e,r){var a=BZ(t,e);return a&&a!==jh?a.clipPath(r,t._transform):et(r)}function x2e(t){var e=Ny(t[0][0],t[1][0]),r=Ny(t[0][1],t[1][1]),a=Qp(t[0][0],t[1][0]),n=Qp(t[0][1],t[1][1]);return{x:e,y:r,width:a-e,height:n-r}}function b2e(t,e,r){if(!(!t._brushType||S2e(t,e.offsetX,e.offsetY))){var a=t._zr,n=t._covers,i=CR(t,e,r);if(!t._dragging)for(var o=0;o<n.length;o++){var s=n[o].__brushOption;if(i&&(i===jh||s.panelId===i.panelId)&&u2[s.brushType].contain(n[o],r[0],r[1]))return}i&&a.setCursorStyle("crosshair")}}function eL(t){var e=t.event;e.preventDefault&&e.preventDefault()}function tL(t,e,r){return t.childOfName("main").contain(e,r)}function $Z(t,e,r,a){var n=t._creatingCover,i=t._creatingPanel,o=t._brushOption,s;if(t._track.push(r.slice()),p2e(t)||n){if(i&&!n){o.brushMode==="single"&&KD(t);var l=et(o);l.brushType=s6(l.brushType,i),l.panelId=i===jh?null:i.panelId,n=t._creatingCover=IZ(t,l),t._covers.push(n)}if(n){var u=u2[s6(t._brushType,i)],c=n.__brushOption;c.range=u.getCreatingRange(NR(t,n,t._track)),a&&(jZ(t,n),u.updateCommon(t,n)),OZ(t,n),s={isEnd:a}}}else a&&o.brushMode==="single"&&o.removeOnClick&&CR(t,e,r)&&KD(t)&&(s={isEnd:a,removeOnClick:!0});return s}function s6(t,e){return t==="auto"?e.defaultBrushType:t}var w2e={mousedown:function(t){if(this._dragging)l6(this,t);else if(!t.target||!t.target.draggable){eL(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var r=this._creatingPanel=CR(this,t,e);r&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,r=t.offsetY,a=this.group.transformCoordToLocal(e,r);if(b2e(this,t,a),this._dragging){eL(t);var n=$Z(this,t,a,!1);n&&Oh(this,n)}},mouseup:function(t){l6(this,t)}};function l6(t,e){if(t._dragging){eL(e);var r=e.offsetX,a=e.offsetY,n=t.group.transformCoordToLocal(r,a),i=$Z(t,e,n,!0);t._dragging=!1,t._track=[],t._creatingCover=null,i&&Oh(t,i)}}function S2e(t,e,r){var a=t._zr;return e<0||e>a.getWidth()||r<0||r>a.getHeight()}var u2={lineX:u6(0),lineY:u6(1),rect:{createCover:function(t,e){function r(a){return a}return FZ({toRectRange:r,fromRectRange:r},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=VZ(t);return HZ(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,a){GZ(t,e,r,a)},updateCommon:QD,contain:tL},polygon:{createCover:function(t,e){var r=new Qe;return r.add(new xi({name:"main",style:kR(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new ji({name:"main",draggable:!0,drift:wt(y2e,t,e),ondragend:wt(Oh,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,a){e.childAt(0).setShape({points:NR(t,e,r)})},updateCommon:QD,contain:tL}};function u6(t){return{createCover:function(e,r){return FZ({toRectRange:function(a){var n=[a,[0,100]];return t&&n.reverse(),n},fromRectRange:function(a){return a[t]}},e,r,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var r=VZ(e),a=Ny(r[0][t],r[1][t]),n=Qp(r[0][t],r[1][t]);return[a,n]},updateCoverShape:function(e,r,a,n){var i,o=BZ(e,r);if(o!==jh&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(t);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[a,i];t&&l.reverse(),GZ(e,r,l,n)},updateCommon:QD,contain:tL}}function WZ(t){return t=AR(t),function(e){return LW(e,t)}}function YZ(t,e){return t=AR(t),function(r){var a=e??r,n=a?t.width:t.height,i=a?t.x:t.y;return[i,i+(n||0)]}}function XZ(t,e,r){var a=AR(t);return function(n,i){return a.contain(i[0],i[1])&&!Jq(n,e,r)}}function AR(t){return ot.create(t)}var _2e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,a){t.prototype.init.apply(this,arguments),(this._brushController=new SR(a.getZr())).on("brush",je(this._onBrush,this))},e.prototype.render=function(r,a,n,i){if(!T2e(r,a,i)){this.axisModel=r,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Qe,this.group.add(this._axisGroup),!!r.get("show")){var s=k2e(r,a),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,d=r.axis.dim,h=l.getAxisLayout(d),v=ve({strokeContainThreshold:c},h),m=new Ki(r,n,v);m.build(),this._axisGroup.add(m.group),this._refreshBrushController(v,u,r,s,c,n),Xy(o,this._axisGroup,r)}}},e.prototype._refreshBrushController=function(r,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),d=ot.create({x:l[0],y:-o/2,width:u,height:o});d.x-=c,d.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:WZ(d),isTargetByCursor:XZ(d,s,i),getLinearBrushOtherExtent:YZ(d,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(C2e(n))},e.prototype._onBrush=function(r){var a=r.areas,n=this.axisModel,i=n.axis,o=Se(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e})(oa);function T2e(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function C2e(t){var e=t.axis;return Se(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function k2e(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var N2e={type:"axisAreaSelect",event:"axisAreaSelected"};function A2e(t){t.registerAction(N2e,function(e,r){r.eachComponent({mainType:"parallelAxis",query:e},function(a){a.axis.model.setActiveIntervals(e.intervals)})}),t.registerAction("parallelAxisExpand",function(e,r){r.eachComponent({mainType:"parallel",query:e},function(a){a.setAxisExpand(e)})})}var M2e={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function qZ(t){t.registerComponentView(K_e),t.registerComponentModel(J_e),t.registerCoordinateSystem("parallel",s2e),t.registerPreprocessor(Y_e),t.registerComponentModel(ZD),t.registerComponentView(_2e),Zp(t,"parallel",ZD,M2e),A2e(t)}function D2e(t){Nt(qZ),t.registerChartView(B_e),t.registerSeriesModel(G_e),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,W_e)}var L2e=(function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return t})(),E2e=(function(t){se(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new L2e},e.prototype.buildPath=function(r,a){var n=a.extent;r.moveTo(a.x1,a.y1),r.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(r.lineTo(a.x2+n,a.y2),r.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(r.lineTo(a.x2,a.y2+n),r.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),r.closePath()},e.prototype.highlight=function(){rc(this)},e.prototype.downplay=function(){ac(this)},e})(zt),R2e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._mainGroup=new Qe,r._focusAdjacencyDisabled=!1,r}return e.prototype.init=function(r,a){this._controller=new Kh(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(r,a,n){var i=this,o=r.getGraph(),s=this._mainGroup,l=r.layoutInfo,u=l.width,c=l.height,d=r.getData(),h=r.getData("edge"),v=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,n),eZ(r,n,s,this._controller,this._controllerHost,null),o.eachEdge(function(m){var x=new E2e,b=dt(x);b.dataIndex=m.dataIndex,b.seriesIndex=r.seriesIndex,b.dataType="edge";var w=m.getModel(),_=w.getModel("lineStyle"),T=_.get("curveness"),C=m.node1.getLayout(),k=m.node1.getModel(),A=k.get("localX"),M=k.get("localY"),L=m.node2.getLayout(),R=m.node2.getModel(),P=R.get("localX"),j=R.get("localY"),V=m.getLayout(),I,F,G,O,U,$,K,q;x.shape.extent=Math.max(1,V.dy),x.shape.orient=v,v==="vertical"?(I=(A!=null?A*u:C.x)+V.sy,F=(M!=null?M*c:C.y)+C.dy,G=(P!=null?P*u:L.x)+V.ty,O=j!=null?j*c:L.y,U=I,$=F*(1-T)+O*T,K=G,q=F*T+O*(1-T)):(I=(A!=null?A*u:C.x)+C.dx,F=(M!=null?M*c:C.y)+V.sy,G=P!=null?P*u:L.x,O=(j!=null?j*c:L.y)+V.ty,U=I*(1-T)+G*T,$=F,K=I*T+G*(1-T),q=O),x.setShape({x1:I,y1:F,x2:G,y2:O,cpx1:U,cpy1:$,cpx2:K,cpy2:q}),x.useStyle(_.getItemStyle()),c6(x.style,v,m);var H=""+w.get("value"),Z=Dn(w,"edgeLabel");qn(x,Z,{labelFetcher:{getFormattedLabel:function(ce,me,ze,Ce,ge,Be){return r.getFormattedLabel(ce,me,"edge",Ce,Io(ge,Z.normal&&Z.normal.get("formatter"),H),Be)}},labelDataIndex:m.dataIndex,defaultText:H}),x.setTextConfig({position:"inside"});var te=w.getModel("emphasis");Mn(x,w,"lineStyle",function(ce){var me=ce.getItemStyle();return c6(me,v,m),me}),s.add(x),h.setItemGraphicEl(m.dataIndex,x);var ie=te.get("focus");fa(x,ie==="adjacency"?m.getAdjacentDataIndices():ie==="trajectory"?m.getTrajectoryDataIndices():ie,te.get("blurScope"),te.get("disabled"))}),o.eachNode(function(m){var x=m.getLayout(),b=m.getModel(),w=b.get("localX"),_=b.get("localY"),T=b.getModel("emphasis"),C=b.get(["itemStyle","borderRadius"])||0,k=new Et({shape:{x:w!=null?w*u:x.x,y:_!=null?_*c:x.y,width:x.dx,height:x.dy,r:C},style:b.getModel("itemStyle").getItemStyle(),z2:10});qn(k,Dn(b),{labelFetcher:{getFormattedLabel:function(M,L){return r.getFormattedLabel(M,L,"node")}},labelDataIndex:m.dataIndex,defaultText:m.id}),k.disableLabelAnimation=!0,k.setStyle("fill",m.getVisual("color")),k.setStyle("decal",m.getVisual("style").decal),Mn(k,b),s.add(k),d.setItemGraphicEl(m.dataIndex,k),dt(k).dataType="node";var A=T.get("focus");fa(k,A==="adjacency"?m.getAdjacentDataIndices():A==="trajectory"?m.getTrajectoryDataIndices():A,T.get("blurScope"),T.get("disabled"))}),d.eachItemGraphicEl(function(m,x){var b=d.getItemModel(x);b.get("draggable")&&(m.drift=function(w,_){i._focusAdjacencyDisabled=!0,this.shape.x+=w,this.shape.y+=_,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:d.getRawIndex(x),localX:this.shape.x/u,localY:this.shape.y/c})},m.ondragend=function(){i._focusAdjacencyDisabled=!1},m.draggable=!0,m.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(P2e(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(r,a){var n=r.layoutInfo,i=n.width,o=n.height,s=r.coordinateSystem=new Qh(null,{api:a,ecModel:r.ecModel});s.zoomLimit=r.get("scaleLimit"),s.setBoundingRect(0,0,i,o),s.setCenter(r.get("center")),s.setZoom(r.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e})(Rr);function c6(t,e,r){switch(t.fill){case"source":t.fill=r.node1.getVisual("color"),t.decal=r.node1.getVisual("style").decal;break;case"target":t.fill=r.node2.getVisual("color"),t.decal=r.node2.getVisual("style").decal;break;case"gradient":var a=r.node1.getVisual("color"),n=r.node2.getVisual("color");Ie(a)&&Ie(n)&&(t.fill=new ym(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function P2e(t,e,r){var a=new Et({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return na(a,{shape:{width:t.width+20}},e,r),a}var I2e=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,a){var n=r.edges||r.links||[],i=r.data||r.nodes||[],o=r.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new $t(o[l],this,a));var u=wR(i,n,this,!0,c);return u.data;function c(d,h){d.wrapMethod("getItemModel",function(v,m){var x=v.parentModel,b=x.getData().getItemLayout(m);if(b){var w=b.depth,_=x.levelModels[w];_&&(v.parentModel=_)}return v}),h.wrapMethod("getItemModel",function(v,m){var x=v.parentModel,b=x.getGraph().getEdgeByIndex(m),w=b.node1.getLayout();if(w){var _=w.depth,T=x.levelModels[_];T&&(v.parentModel=T)}return v})}},e.prototype.setNodePosition=function(r,a){var n=this.option.data||this.option.nodes,i=n[r];i.localX=a[0],i.localY=a[1]},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,a,n){function i(v){return isNaN(v)||v==null}if(n==="edge"){var o=this.getDataParams(r,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return pn("nameValue",{name:u,value:l,noValue:i(l)})}else{var c=this.getGraph().getNodeByIndex(r),d=c.getLayout().value,h=this.getDataParams(r,n).data.name;return pn("nameValue",{name:h!=null?h+"":null,value:d,noValue:i(d)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(r,a){var n=t.prototype.getDataParams.call(this,r,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(r),o=i.getLayout().value;n.value=o}return n},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:ne.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:ne.color.primary}},animationEasing:"linear",animationDuration:1e3},e})(Gr);function j2e(t,e){t.eachSeriesByType("sankey",function(r){var a=r.get("nodeWidth"),n=r.get("nodeGap"),i=Ln(r,e).refContainer,o=ha(r.getBoxLayoutParams(),i);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,d=u.edges;z2e(c);var h=mr(c,function(b){return b.getLayout().value===0}),v=h.length!==0?0:r.get("layoutIterations"),m=r.get("orient"),x=r.get("nodeAlign");O2e(c,d,a,n,s,l,v,m,x)})}function O2e(t,e,r,a,n,i,o,s,l){B2e(t,e,r,n,i,s,l),H2e(t,e,i,n,a,o,s),Q2e(t,s)}function z2e(t){z(t,function(e){var r=Md(e.outEdges,zS),a=Md(e.inEdges,zS),n=e.getValue()||0,i=Math.max(r,a,n);e.setLayout({value:i},!0)})}function B2e(t,e,r,a,n,i,o){for(var s=[],l=[],u=[],c=[],d=0,h=0;h<e.length;h++)s[h]=1;for(var h=0;h<t.length;h++)l[h]=t[h].inEdges.length,l[h]===0&&u.push(t[h]);for(var v=-1;u.length;){for(var m=0;m<u.length;m++){var x=u[m],b=x.hostGraph.data.getRawDataItem(x.dataIndex),w=b.depth!=null&&b.depth>=0;w&&b.depth>v&&(v=b.depth),x.setLayout({depth:w?b.depth:d},!0),i==="vertical"?x.setLayout({dy:r},!0):x.setLayout({dx:r},!0);for(var _=0;_<x.outEdges.length;_++){var T=x.outEdges[_],C=e.indexOf(T);s[C]=0;var k=T.node2,A=t.indexOf(k);--l[A]===0&&c.indexOf(k)<0&&c.push(k)}}++d,u=c,c=[]}for(var h=0;h<s.length;h++)if(s[h]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var M=v>d-1?v:d-1;o&&o!=="left"&&V2e(t,o,i,M);var L=i==="vertical"?(n-r)/M:(a-r)/M;G2e(t,L,i)}function ZZ(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function V2e(t,e,r,a){if(e==="right"){for(var n=[],i=t,o=0;i.length;){for(var s=0;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];n.indexOf(c.node1)<0&&n.push(c.node1)}}i=n,n=[],++o}z(t,function(d){ZZ(d)||d.setLayout({depth:Math.max(0,a-d.getLayout().skNodeHeight)},!0)})}else e==="justify"&&F2e(t,a)}function F2e(t,e){z(t,function(r){!ZZ(r)&&!r.outEdges.length&&r.setLayout({depth:e},!0)})}function G2e(t,e,r){z(t,function(a){var n=a.getLayout().depth*e;r==="vertical"?a.setLayout({y:n},!0):a.setLayout({x:n},!0)})}function H2e(t,e,r,a,n,i,o){var s=U2e(t,o);$2e(s,e,r,a,n,o),AN(s,n,r,a,o);for(var l=1;i>0;i--)l*=.99,W2e(s,l,o),AN(s,n,r,a,o),K2e(s,l,o),AN(s,n,r,a,o)}function U2e(t,e){var r=[],a=e==="vertical"?"y":"x",n=VM(t,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),z(n.keys,function(i){r.push(n.buckets.get(i))}),r}function $2e(t,e,r,a,n,i){var o=1/0;z(t,function(s){var l=s.length,u=0;z(s,function(d){u+=d.getLayout().value});var c=i==="vertical"?(a-(l-1)*n)/u:(r-(l-1)*n)/u;c<o&&(o=c)}),z(t,function(s){z(s,function(l,u){var c=l.getLayout().value*o;i==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),z(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function AN(t,e,r,a,n){var i=n==="vertical"?"x":"y";z(t,function(o){o.sort(function(x,b){return x.getLayout()[i]-b.getLayout()[i]});for(var s,l,u,c=0,d=o.length,h=n==="vertical"?"dx":"dy",v=0;v<d;v++)l=o[v],u=c-l.getLayout()[i],u>0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]+l.getLayout()[h]+e;var m=n==="vertical"?a:r;if(u=c-e-m,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var v=d-2;v>=0;--v)l=o[v],u=l.getLayout()[i]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]}})}function W2e(t,e,r){z(t.slice().reverse(),function(a){z(a,function(n){if(n.outEdges.length){var i=Md(n.outEdges,Y2e,r)/Md(n.outEdges,zS);if(isNaN(i)){var o=n.outEdges.length;i=o?Md(n.outEdges,X2e,r)/o:0}if(r==="vertical"){var s=n.getLayout().x+(i-Od(n,r))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Od(n,r))*e;n.setLayout({y:l},!0)}}})})}function Y2e(t,e){return Od(t.node2,e)*t.getValue()}function X2e(t,e){return Od(t.node2,e)}function q2e(t,e){return Od(t.node1,e)*t.getValue()}function Z2e(t,e){return Od(t.node1,e)}function Od(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function zS(t){return t.getValue()}function Md(t,e,r){for(var a=0,n=t.length,i=-1;++i<n;){var o=+e(t[i],r);isNaN(o)||(a+=o)}return a}function K2e(t,e,r){z(t,function(a){z(a,function(n){if(n.inEdges.length){var i=Md(n.inEdges,q2e,r)/Md(n.inEdges,zS);if(isNaN(i)){var o=n.inEdges.length;i=o?Md(n.inEdges,Z2e,r)/o:0}if(r==="vertical"){var s=n.getLayout().x+(i-Od(n,r))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Od(n,r))*e;n.setLayout({y:l},!0)}}})})}function Q2e(t,e){var r=e==="vertical"?"x":"y";z(t,function(a){a.outEdges.sort(function(n,i){return n.node2.getLayout()[r]-i.node2.getLayout()[r]}),a.inEdges.sort(function(n,i){return n.node1.getLayout()[r]-i.node1.getLayout()[r]})}),z(t,function(a){var n=0,i=0;z(a.outEdges,function(o){o.setLayout({sy:n},!0),n+=o.getLayout().dy}),z(a.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function J2e(t){t.eachSeriesByType("sankey",function(e){var r=e.getGraph(),a=r.nodes,n=r.edges;if(a.length){var i=1/0,o=-1/0;z(a,function(s){var l=s.getLayout().value;l<i&&(i=l),l>o&&(o=l)}),z(a,function(s){var l=new Xn({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&z(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function eTe(t){t.registerChartView(R2e),t.registerSeriesModel(I2e),t.registerLayout(j2e),t.registerVisual(J2e),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),t.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,r,a){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){var i=n.coordinateSystem,o=i2(i,e,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}var KZ=(function(){function t(){}return t.prototype._hasEncodeRule=function(e){var r=this.getEncode();return r&&r.get(e)!=null},t.prototype.getInitialData=function(e,r){var a,n=r.getComponent("xAxis",this.get("xAxisIndex")),i=r.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,d=this._baseAxisDim=u[c],h=u[1-c],v=[n,i],m=v[c].get("type"),x=v[1-c].get("type"),b=e.data;if(b&&l){var w=[];z(b,function(C,k){var A;be(C)?(A=C.slice(),C.unshift(k)):be(C.value)?(A=ve({},C),A.value=A.value.slice(),C.value.unshift(k)):A=C,w.push(A)}),e.data=w}var _=this.defaultValueDimensions,T=[{name:d,type:wS(m),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:wS(x),dimsDef:_.slice()}];return Nm(this,{coordDimensions:T,dimensionsCount:_.length+1,encodeDefaulter:wt(dY,T,this)})},t.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},t})(),QZ=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:ne.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:ne.color.shadow}},animationDuration:800},e})(Gr);gn(QZ,KZ,!0);var tTe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n){var i=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var c=i.getItemLayout(u),d=d6(c,i,u,l,!0);i.setItemGraphicEl(u,d),o.add(d)}}).update(function(u,c){var d=s.getItemGraphicEl(c);if(!i.hasValue(u)){o.remove(d);return}var h=i.getItemLayout(u);d?(bs(d),JZ(h,d,i,u)):d=d6(h,i,u,l),o.add(d),i.setItemGraphicEl(u,d)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=i},e.prototype.remove=function(r){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},e.type="boxplot",e})(Rr),rTe=(function(){function t(){}return t})(),aTe=(function(t){se(e,t);function e(r){var a=t.call(this,r)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new rTe},e.prototype.buildPath=function(r,a){var n=a.points,i=0;for(r.moveTo(n[i][0],n[i][1]),i++;i<4;i++)r.lineTo(n[i][0],n[i][1]);for(r.closePath();i<n.length;i++)r.moveTo(n[i][0],n[i][1]),i++,r.lineTo(n[i][0],n[i][1])},e})(zt);function d6(t,e,r,a,n){var i=t.ends,o=new aTe({shape:{points:n?nTe(i,a,t):i}});return JZ(t,o,e,r,n),o}function JZ(t,e,r,a,n){var i=r.hostModel,o=$h[n?"initProps":"updateProps"];o(e,{shape:{points:t.ends}},i,a),e.useStyle(r.getItemVisual(a,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=r.getItemModel(a),l=s.getModel("emphasis");Mn(e,s),fa(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function nTe(t,e,r){return Se(t,function(a){return a=a.slice(),a[e]=r.initBaseline,a})}var G0=z;function iTe(t){var e=oTe(t);G0(e,function(r){var a=r.seriesModels;a.length&&(sTe(r),G0(a,function(n,i){lTe(n,r.boxOffsetList[i],r.boxWidthList[i])}))})}function oTe(t){var e=[],r=[];return t.eachSeriesByType("boxplot",function(a){var n=a.getBaseAxis(),i=St(r,n);i<0&&(i=r.length,r[i]=n,e[i]={axis:n,seriesModels:[]}),e[i].seriesModels.push(a)}),e}function sTe(t){var e=t.axis,r=t.seriesModels,a=r.length,n=t.boxWidthList=[],i=t.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;G0(r,function(m){l=Math.max(l,m.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}G0(r,function(m){var x=m.get("boxWidth");be(x)||(x=[x,x]),o.push([Pe(x[0],s)||0,Pe(x[1],s)||0])});var c=s*.8-2,d=c/a*.3,h=(c-d*(a-1))/a,v=h/2-c/2;G0(r,function(m,x){i.push(v),v+=d+h,n.push(Math.min(Math.max(h,o[x][0]),o[x][1]))})}function lTe(t,e,r){var a=t.coordinateSystem,n=t.getData(),i=r/2,o=t.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=n.mapDimension(l[o]),c=n.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var d=0;d<n.count();d++){var h=n.get(u,d),v=T(h,c[2],d),m=T(h,c[0],d),x=T(h,c[1],d),b=T(h,c[3],d),w=T(h,c[4],d),_=[];C(_,x,!1),C(_,b,!0),_.push(m,x,w,b),k(_,m),k(_,w),k(_,v),n.setItemLayout(d,{initBaseline:v[s],ends:_})}function T(A,M,L){var R=n.get(M,L),P=[];P[o]=A,P[s]=R;var j;return isNaN(A)||isNaN(R)?j=[NaN,NaN]:(j=a.dataToPoint(P),j[o]+=e),j}function C(A,M,L){var R=M.slice(),P=M.slice();R[o]+=i,P[o]-=i,L?A.push(R,P):A.push(P,R)}function k(A,M){var L=M.slice(),R=M.slice();L[o]-=i,R[o]+=i,A.push(L,R)}}function uTe(t,e){e=e||{};for(var r=[],a=[],n=e.boundIQR,i=n==="none"||n===0,o=0;o<t.length;o++){var s=ps(t[o].slice()),l=ak(s,.25),u=ak(s,.5),c=ak(s,.75),d=s[0],h=s[s.length-1],v=(n??1.5)*(c-l),m=i?d:Math.max(d,l-v),x=i?h:Math.min(h,c+v),b=e.itemNameFormatter,w=Ke(b)?b({value:o}):Ie(b)?b.replace("{value}",o+""):o+"";r.push([w,m,l,u,c,x]);for(var _=0;_<s.length;_++){var T=s[_];if(T<m||T>x){var C=[w,T];a.push(C)}}}return{boxData:r,outliers:a}}var cTe={type:"echarts:boxplot",transform:function(e){var r=e.upstream;if(r.sourceFormat!==si){var a="";cr(a)}var n=uTe(r.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function dTe(t){t.registerSeriesModel(QZ),t.registerChartView(tTe),t.registerLayout(iTe),t.registerTransform(cTe)}var fTe=["itemStyle","borderColor"],hTe=["itemStyle","borderColor0"],vTe=["itemStyle","borderColorDoji"],pTe=["itemStyle","color"],mTe=["itemStyle","color0"];function MR(t,e){return e.get(t>0?pTe:mTe)}function DR(t,e){return e.get(t===0?vTe:t>0?fTe:hTe)}var gTe={seriesType:"candlestick",plan:Sm(),performRawSeries:!0,reset:function(t,e){if(!e.isSeriesFiltered(t)){var r=t.pipelineContext.large;return!r&&{progress:function(a,n){for(var i;(i=a.next())!=null;){var o=n.getItemModel(i),s=n.getItemLayout(i).sign,l=o.getItemStyle();l.fill=MR(s,o),l.stroke=DR(s,o)||l.fill;var u=n.ensureUniqueItemVisual(i,"style");ve(u,l)}}}}}},yTe=["color","borderColor"],xTe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},e.prototype.incrementalPrepareRender=function(r,a,n){this._clear(),this._updateDrawMode(r)},e.prototype.incrementalRender=function(r,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,a):this._incrementalRenderNormal(r,a)},e.prototype.eachRendered=function(r){Ud(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var a=r.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(r){var a=r.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),a.diff(n).add(function(c){if(a.hasValue(c)){var d=a.getItemLayout(c);if(s&&f6(u,d))return;var h=MN(d,c,!0);na(h,{shape:{points:d.ends}},r,c),DN(h,a,c,o),i.add(h),a.setItemGraphicEl(c,h)}}).update(function(c,d){var h=n.getItemGraphicEl(d);if(!a.hasValue(c)){i.remove(h);return}var v=a.getItemLayout(c);if(s&&f6(u,v)){i.remove(h);return}h?(tr(h,{shape:{points:v.ends}},r,c),bs(h)):h=MN(v),DN(h,a,c,o),i.add(h),a.setItemGraphicEl(c,h)}).remove(function(c){var d=n.getItemGraphicEl(c);d&&i.remove(d)}).execute(),this._data=a},e.prototype._renderLarge=function(r){this._clear(),h6(r,this.group);var a=r.get("clip",!0)?nx(r.coordinateSystem,!1,r):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(r,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=n.getItemLayout(o),l=MN(s);DN(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(r,a){h6(a,this.group,this._progressiveEls,!0)},e.prototype.remove=function(r){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e})(Rr),bTe=(function(){function t(){}return t})(),wTe=(function(t){se(e,t);function e(r){var a=t.call(this,r)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new bTe},e.prototype.buildPath=function(r,a){var n=a.points;this.__simpleBox?(r.moveTo(n[4][0],n[4][1]),r.lineTo(n[6][0],n[6][1])):(r.moveTo(n[0][0],n[0][1]),r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]),r.lineTo(n[3][0],n[3][1]),r.closePath(),r.moveTo(n[4][0],n[4][1]),r.lineTo(n[5][0],n[5][1]),r.moveTo(n[6][0],n[6][1]),r.lineTo(n[7][0],n[7][1]))},e})(zt);function MN(t,e,r){var a=t.ends;return new wTe({shape:{points:r?STe(a,t):a},z2:100})}function f6(t,e){for(var r=!0,a=0;a<e.ends.length;a++)if(t.contain(e.ends[a][0],e.ends[a][1])){r=!1;break}return r}function DN(t,e,r,a){var n=e.getItemModel(r);t.useStyle(e.getItemVisual(r,"style")),t.style.strokeNoScale=!0,t.__simpleBox=a,Mn(t,n);var i=e.getItemLayout(r).sign;z(t.states,function(s,l){var u=n.getModel(l),c=MR(i,u),d=DR(i,u)||c,h=s.style||(s.style={});c&&(h.fill=c),d&&(h.stroke=d)});var o=n.getModel("emphasis");fa(t,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function STe(t,e){return Se(t,function(r){return r=r.slice(),r[1]=e.initBaseline,r})}var _Te=(function(){function t(){}return t})(),LN=(function(t){se(e,t);function e(r){var a=t.call(this,r)||this;return a.type="largeCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new _Te},e.prototype.buildPath=function(r,a){for(var n=a.points,i=0;i<n.length;)if(this.__sign===n[i++]){var o=n[i++];r.moveTo(o,n[i++]),r.lineTo(o,n[i++])}else i+=3},e})(zt);function h6(t,e,r,a){var n=t.getData(),i=n.getLayout("largePoints"),o=new LN({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new LN({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new LN({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});e.add(l),EN(1,o,t),EN(-1,s,t),EN(0,l,t),a&&(o.incremental=!0,s.incremental=!0),r&&r.push(o,s)}function EN(t,e,r,a){var n=DR(t,r)||MR(t,r),i=r.getModel("itemStyle").getItemStyle(yTe);e.useStyle(i),e.style.fill=null,e.style.stroke=n}var eK=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],r}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(r,a,n){var i=a.getItemLayout(r);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e})(Gr);gn(eK,KZ,!0);function TTe(t){!t||!be(t.series)||z(t.series,function(e){it(e)&&e.type==="k"&&(e.type="candlestick")})}var CTe={seriesType:"candlestick",plan:Sm(),reset:function(t){var e=t.coordinateSystem,r=t.getData(),a=kTe(t,r),n=0,i=1,o=["x","y"],s=r.getDimensionIndex(r.mapDimension(o[n])),l=Se(r.mapDimensionsAll(o[i]),r.getDimensionIndex,r),u=l[0],c=l[1],d=l[2],h=l[3];if(r.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s<0||l.length<4)return;return{progress:t.pipelineContext.large?m:v};function v(x,b){for(var w,_=b.getStore();(w=x.next())!=null;){var T=_.get(s,w),C=_.get(u,w),k=_.get(c,w),A=_.get(d,w),M=_.get(h,w),L=Math.min(C,k),R=Math.max(C,k),P=U(L,T),j=U(R,T),V=U(A,T),I=U(M,T),F=[];$(F,j,0),$(F,P,1),F.push(q(I),q(j),q(V),q(P));var G=b.getItemModel(w),O=!!G.get(["itemStyle","borderColorDoji"]);b.setItemLayout(w,{sign:v6(_,w,C,k,c,O),initBaseline:C>k?j[i]:P[i],ends:F,brushRect:K(A,M,T)})}function U(H,Z){var te=[];return te[n]=Z,te[i]=H,isNaN(Z)||isNaN(H)?[NaN,NaN]:e.dataToPoint(te)}function $(H,Z,te){var ie=Z.slice(),ce=Z.slice();ie[n]=mw(ie[n]+a/2,1,!1),ce[n]=mw(ce[n]-a/2,1,!0),te?H.push(ie,ce):H.push(ce,ie)}function K(H,Z,te){var ie=U(H,te),ce=U(Z,te);return ie[n]-=a/2,ce[n]-=a/2,{x:ie[0],y:ie[1],width:a,height:ce[1]-ie[1]}}function q(H){return H[n]=mw(H[n],1),H}}function m(x,b){for(var w=Bl(x.count*4),_=0,T,C=[],k=[],A,M=b.getStore(),L=!!t.get(["itemStyle","borderColorDoji"]);(A=x.next())!=null;){var R=M.get(s,A),P=M.get(u,A),j=M.get(c,A),V=M.get(d,A),I=M.get(h,A);if(isNaN(R)||isNaN(V)||isNaN(I)){w[_++]=NaN,_+=3;continue}w[_++]=v6(M,A,P,j,c,L),C[n]=R,C[i]=V,T=e.dataToPoint(C,null,k),w[_++]=T?T[0]:NaN,w[_++]=T?T[1]:NaN,C[i]=I,T=e.dataToPoint(C,null,k),w[_++]=T?T[1]:NaN}b.setLayout("largePoints",w)}}};function v6(t,e,r,a,n,i){var o;return r>a?o=-1:r<a?o=1:o=i?0:e>0?t.get(n,e-1)<=a?1:-1:1,o}function kTe(t,e){var r=t.getBaseAxis(),a,n=r.type==="category"?r.getBandWidth():(a=r.getExtent(),Math.abs(a[1]-a[0])/e.count()),i=Pe($e(t.get("barMaxWidth"),n),n),o=Pe($e(t.get("barMinWidth"),1),n),s=t.get("barWidth");return s!=null?Pe(s,n):Math.max(Math.min(n/2,i),o)}function NTe(t){t.registerChartView(xTe),t.registerSeriesModel(eK),t.registerPreprocessor(TTe),t.registerVisual(gTe),t.registerLayout(CTe)}function p6(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}var ATe=(function(t){se(e,t);function e(r,a){var n=t.call(this)||this,i=new rx(r,a),o=new Qe;return n.add(i),n.add(o),n.updateData(r,a),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(r){for(var a=r.symbolType,n=r.color,i=r.rippleNumber,o=this.childAt(1),s=0;s<i;s++){var l=mn(a,-1,-1,2,2,n);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/i*r.period+r.effectOffset;l.animate("",!0).when(r.period,{scaleX:r.rippleScale/2,scaleY:r.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(r.period,{opacity:0}).delay(u).start(),o.add(l)}p6(o,r)},e.prototype.updateEffectAnimation=function(r){for(var a=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var s=i[o];if(a[s]!==r[s]){this.stopEffectAnimation(),this.startEffectAnimation(r);return}}p6(n,r)},e.prototype.highlight=function(){rc(this)},e.prototype.downplay=function(){ac(this)},e.prototype.getSymbolType=function(){var r=this.childAt(0);return r&&r.getSymbolType()},e.prototype.updateData=function(r,a){var n=this,i=r.hostModel;this.childAt(0).updateData(r,a);var o=this.childAt(1),s=r.getItemModel(a),l=r.getItemVisual(a,"symbol"),u=Tm(r.getItemVisual(a,"symbolSize")),c=r.getItemVisual(a,"style"),d=c&&c.fill,h=s.getModel("emphasis");o.setScale(u),o.traverse(function(b){b.setStyle("fill",d)});var v=Xh(r.getItemVisual(a,"symbolOffset"),u);v&&(o.x=v[0],o.y=v[1]);var m=r.getItemVisual(a,"symbolRotate");o.rotation=(m||0)*Math.PI/180||0;var x={};x.showEffectOn=i.get("showEffectOn"),x.rippleScale=s.get(["rippleEffect","scale"]),x.brushType=s.get(["rippleEffect","brushType"]),x.period=s.get(["rippleEffect","period"])*1e3,x.effectOffset=a/r.count(),x.z=i.getShallow("z")||0,x.zlevel=i.getShallow("zlevel")||0,x.symbolType=l,x.color=d,x.rippleEffectColor=s.get(["rippleEffect","color"]),x.rippleNumber=s.get(["rippleEffect","number"]),x.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(x):this.startEffectAnimation(x),this._effectCfg=x):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(b){b==="emphasis"?x.showEffectOn!=="render"&&n.startEffectAnimation(x):b==="normal"&&x.showEffectOn!=="render"&&n.stopEffectAnimation()}),this._effectCfg=x,fa(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},e.prototype.fadeOut=function(r){r&&r()},e})(Qe),MTe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this._symbolDraw=new ax(ATe)},e.prototype.render=function(r,a,n){var i=r.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(r)}),this.group.add(o.group)},e.prototype._getClipShape=function(r){var a=r.coordinateSystem,n=a&&a.getArea&&a.getArea();return r.get("clip",!0)?n:null},e.prototype.updateTransform=function(r,a,n){var i=r.getData();this.group.dirty();var o=ix("").reset(r,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(r){var a=r.coordinateSystem;a&&a.getRoamTransform&&(this.group.transform=Kde(a.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(r,a){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e})(Rr),DTe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,a){return cc(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(r,a,n){return n.point(a.getItemLayout(r))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e})(Gr);function LTe(t){t.registerChartView(MTe),t.registerSeriesModel(DTe),t.registerLayout(ix("effectScatter"))}var tK=(function(t){se(e,t);function e(r,a,n){var i=t.call(this)||this;return i.add(i.createLine(r,a,n)),i._updateEffectSymbol(r,a),i}return e.prototype.createLine=function(r,a,n){return new xR(r,a,n)},e.prototype._updateEffectSymbol=function(r,a){var n=r.getItemModel(a),i=n.getModel("effect"),o=i.get("symbolSize"),s=i.get("symbol");be(o)||(o=[o,o]);var l=r.getItemVisual(a,"style"),u=i.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=mn(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(i.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(r,i,a))},e.prototype._updateEffectAnimation=function(r,a,n){var i=this.childAt(1);if(i){var o=r.getItemLayout(n),s=a.get("period")*1e3,l=a.get("loop"),u=a.get("roundTrip"),c=a.get("constantSpeed"),d=yi(a.get("delay"),function(v){return v/r.count()*s/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),c>0&&(s=this._getLineLength(i)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var h=void 0;Ke(d)?h=d(n):h=d,i.__t>0&&(h=-s*i.__t),this._animateSymbol(i,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(r,a,n,i,o){if(a>0){r.__t=0;var s=this,l=r.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(r)});i||l.done(function(){s.remove(r)}),l.start()}},e.prototype._getLineLength=function(r){return cd(r.__p1,r.__cp1)+cd(r.__cp1,r.__p2)},e.prototype._updateAnimationPoints=function(r,a){r.__p1=a[0],r.__p2=a[1],r.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(r,a,n){this.childAt(0).updateData(r,a,n),this._updateEffectSymbol(r,a)},e.prototype._updateSymbolPosition=function(r){var a=r.__p1,n=r.__p2,i=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=ii,c=CM;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var d=r.__t<1?c(a[0],i[0],n[0],o):c(n[0],i[0],a[0],1-o),h=r.__t<1?c(a[1],i[1],n[1],o):c(n[1],i[1],a[1],1-o);r.rotation=-Math.atan2(h,d)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT<r.__t?(r.scaleY=cd(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):r.__lastT===1?r.scaleY=2*cd(a,s):r.scaleY=this._symbolScale[1]),r.__lastT=r.__t,r.ignore=!1,r.x=s[0],r.y=s[1]},e.prototype.updateLayout=function(r,a){this.childAt(0).updateLayout(r,a);var n=r.getItemModel(a).getModel("effect");this._updateEffectAnimation(r,n,a)},e})(Qe),rK=(function(t){se(e,t);function e(r,a,n){var i=t.call(this)||this;return i._createPolyline(r,a,n),i}return e.prototype._createPolyline=function(r,a,n){var i=r.getItemLayout(a),o=new xi({shape:{points:i}});this.add(o),this._updateCommonStl(r,a,n)},e.prototype.updateData=function(r,a,n){var i=r.hostModel,o=this.childAt(0),s={shape:{points:r.getItemLayout(a)}};tr(o,s,i,a),this._updateCommonStl(r,a,n)},e.prototype._updateCommonStl=function(r,a,n){var i=this.childAt(0),o=r.getItemModel(a),s=n&&n.emphasisLineStyle,l=n&&n.focus,u=n&&n.blurScope,c=n&&n.emphasisDisabled;if(!n||r.hasItemOption){var d=o.getModel("emphasis");s=d.getModel("lineStyle").getLineStyle(),c=d.get("disabled"),l=d.get("focus"),u=d.get("blurScope")}i.useStyle(r.getItemVisual(a,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var h=i.ensureState("emphasis");h.style=s,fa(this,l,u,c)},e.prototype.updateLayout=function(r,a){var n=this.childAt(0);n.setShape("points",r.getItemLayout(a))},e})(Qe),ETe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._lastFrame=0,r._lastFramePercent=0,r}return e.prototype.createLine=function(r,a,n){return new rK(r,a,n)},e.prototype._updateAnimationPoints=function(r,a){this._points=a;for(var n=[0],i=0,o=1;o<a.length;o++){var s=a[o-1],l=a[o];i+=cd(s,l),n.push(i)}if(i===0){this._length=0;return}for(var o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(r){var a=r.__t<1?r.__t:2-r.__t,n=this._points,i=this._offsets,o=n.length;if(i){var s=this._lastFrame,l;if(a<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(i[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(i[l]>a);l++);l=Math.min(l-1,o-2)}var c=(a-i[l])/(i[l+1]-i[l]),d=n[l],h=n[l+1];r.x=d[0]*(1-c)+c*h[0],r.y=d[1]*(1-c)+c*h[1];var v=r.__t<1?h[0]-d[0]:d[0]-h[0],m=r.__t<1?h[1]-d[1]:d[1]-h[1];r.rotation=-Math.atan2(m,v)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,r.ignore=!1}},e})(tK),RTe=(function(){function t(){this.polyline=!1,this.curveness=0,this.segs=[]}return t})(),PTe=(function(t){se(e,t);function e(r){var a=t.call(this,r)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:ne.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new RTe},e.prototype.buildPath=function(r,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o<n.length;){var s=n[o++];if(s>0){r.moveTo(n[o++],n[o++]);for(var l=1;l<s;l++)r.lineTo(n[o++],n[o++])}}else for(o=this._off;o<n.length;){var u=n[o++],c=n[o++],d=n[o++],h=n[o++];if(r.moveTo(u,c),i>0){var v=(u+d)/2-(c-h)*i,m=(c+h)/2-(d-u)*i;r.quadraticCurveTo(v,m,d,h)}else r.lineTo(d,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(r,a){var n=this.shape,i=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u<i.length;){var c=i[u++];if(c>0)for(var d=i[u++],h=i[u++],v=1;v<c;v++){var m=i[u++],x=i[u++];if(id(d,h,m,x,s,r,a))return l}l++}else for(var l=0,u=0;u<i.length;){var d=i[u++],h=i[u++],m=i[u++],x=i[u++];if(o>0){var b=(d+m)/2-(h-x)*o,w=(h+x)/2-(m-d)*o;if(aW(d,h,b,w,m,x,s,r,a))return l}else if(id(d,h,m,x,s,r,a))return l;l++}return-1},e.prototype.contain=function(r,a){var n=this.transformCoordToLocal(r,a),i=this.getBoundingRect();if(r=n[0],a=n[1],i.contain(r,a)){var o=this.hoverDataIdx=this.findDataIndex(r,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<n.length;){var c=n[u++],d=n[u++];i=Math.min(c,i),s=Math.max(c,s),o=Math.min(d,o),l=Math.max(d,l)}r=this._rect=new ot(i,o,s,l)}return r},e})(zt),ITe=(function(){function t(){this.group=new Qe}return t.prototype.updateData=function(e){this._clear();var r=this._create();r.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(r,e)},t.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},t.prototype.incrementalUpdate=function(e,r){var a=this._newAdded[0],n=r.getLayout("linesPoints"),i=a&&a.shape.segs;if(i&&i.length<2e4){var o=i.length,s=new Float32Array(o+n.length);s.set(i),s.set(n,o),a.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:n}),this._setCommon(l,r),l.__startIndex=e.start}},t.prototype.remove=function(){this._clear()},t.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},t.prototype._create=function(){var e=new PTe({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},t.prototype._setCommon=function(e,r,a){var n=r.hostModel;e.setShape({polyline:n.get("polyline"),curveness:n.get(["lineStyle","curveness"])}),e.useStyle(n.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=r.getVisual("style");i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null);var o=dt(e);o.seriesIndex=n.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t})(),aK={seriesType:"lines",plan:Sm(),reset:function(t){var e=t.coordinateSystem;if(e){var r=t.get("polyline"),a=t.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var s=void 0,l=n.end-n.start;if(r){for(var u=0,c=n.start;c<n.end;c++)u+=t.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var d=0,h=[],c=n.start;c<n.end;c++){var v=t.getLineCoords(c,o);r&&(s[d++]=v);for(var m=0;m<v;m++)h=e.dataToPoint(o[m],!1,h),s[d++]=h[0],s[d++]=h[1]}i.setLayout("linesPoints",s)}else for(var c=n.start;c<n.end;c++){var x=i.getItemModel(c),v=t.getLineCoords(c,o),b=[];if(r)for(var w=0;w<v;w++)b.push(e.dataToPoint(o[w]));else{b[0]=e.dataToPoint(o[0]),b[1]=e.dataToPoint(o[1]);var _=x.get(["lineStyle","curveness"]);+_&&(b[2]=[(b[0][0]+b[1][0])/2-(b[0][1]-b[1][1])*_,(b[0][1]+b[1][1])/2-(b[1][0]-b[0][0])*_])}i.setItemLayout(c,b)}}}}}},jTe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n){var i=r.getData(),o=this._updateLineDraw(i,r),s=r.get("zlevel"),l=r.get(["effect","trailLength"]),u=n.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(r)&&l>0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var d=r.get("clip",!0)&&nx(r.coordinateSystem,!1,r);d?this.group.setClipPath(d):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(r,a,n){var i=r.getData(),o=this._updateLineDraw(i,r);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(r,a,n){this._lineDraw.incrementalUpdate(r,a.getData()),this._finished=r.end===a.getData().count()},e.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},e.prototype.updateTransform=function(r,a,n){var i=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=aK.reset(r,a,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(r,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new ITe:new bR(o?i?ETe:rK:i?tK:xR),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(r){return!!r.get(["effect","show"])},e.prototype._clearLayer=function(r){var a=r.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(r,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(r,a){this.remove(r,a)},e.type="lines",e})(Rr),OTe=typeof Uint32Array>"u"?Array:Uint32Array,zTe=typeof Float64Array>"u"?Array:Float64Array;function m6(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=Se(e,function(r){var a=[r[0].coord,r[1].coord],n={coords:a};return r[0].name&&(n.fromName=r[0].name),r[1].name&&(n.toName=r[1].name),$E([n,r[0],r[1]])}))}var BTe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return e.prototype.init=function(r){r.data=r.data||[],m6(r);var a=this._processFlatCoordsArray(r.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(r.data=new Float32Array(a.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(r){if(m6(r),r.data){var a=this._processFlatCoordsArray(r.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(r.data=new Float32Array(a.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(r){var a=this._processFlatCoordsArray(r.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=ty(this._flatCoords,a.flatCoords),this._flatCoordsOffset=ty(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),r.data=new Float32Array(a.count)),this.getRawData().appendData(r.data)},e.prototype._getCoordsFromItemModel=function(r){var a=this.getData().getItemModel(r),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},e.prototype.getLineCoords=function(r,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[r*2],i=this._flatCoordsOffset[r*2+1],o=0;o<i;o++)a[o]=a[o]||[],a[o][0]=this._flatCoords[n+o*2],a[o][1]=this._flatCoords[n+o*2+1];return i}else{for(var s=this._getCoordsFromItemModel(r),o=0;o<s.length;o++)a[o]=a[o]||[],a[o][0]=s[o][0],a[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(r){var a=0;if(this._flatCoords&&(a=this._flatCoords.length),qt(r[0])){for(var n=r.length,i=new OTe(n),o=new zTe(n),s=0,l=0,u=0,c=0;c<n;){u++;var d=r[c++];i[l++]=s+a,i[l++]=d;for(var h=0;h<d;h++){var v=r[c++],m=r[c++];o[s++]=v,o[s++]=m}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:r.length}},e.prototype.getInitialData=function(r,a){var n=new Zi(["value"],this);return n.hasItemOption=!1,n.initData(r.data,[],function(i,o,s,l){if(i instanceof Array)return NaN;n.hasItemOption=!0;var u=i.value;if(u!=null)return u instanceof Array?u[l]:u}),n},e.prototype.formatTooltip=function(r,a,n){var i=this.getData(),o=i.getItemModel(r),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),pn("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var r=this.getModel("effect"),a=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&a>0?a+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e})(Gr);function S1(t){return t instanceof Array||(t=[t,t]),t}var VTe={seriesType:"lines",reset:function(t){var e=S1(t.get("symbol")),r=S1(t.get("symbolSize")),a=t.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",r&&r[0]),a.setVisual("toSymbolSize",r&&r[1]);function n(i,o){var s=i.getItemModel(o),l=S1(s.getShallow("symbol",!0)),u=S1(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}};function FTe(t){t.registerChartView(jTe),t.registerSeriesModel(BTe),t.registerLayout(aK),t.registerVisual(VTe)}var GTe=256,HTe=(function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=qs.createCanvas();this.canvas=e}return t.prototype.update=function(e,r,a,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),c=this.pointSize+this.blurSize,d=this.canvas,h=d.getContext("2d"),v=e.length;d.width=r,d.height=a;for(var m=0;m<v;++m){var x=e[m],b=x[0],w=x[1],_=x[2],T=n(_);h.globalAlpha=T,h.drawImage(s,b-c,w-c)}if(!d.width||!d.height)return d;for(var C=h.getImageData(0,0,d.width,d.height),k=C.data,A=0,M=k.length,L=this.minOpacity,R=this.maxOpacity,P=R-L;A<M;){var T=k[A+3]/256,j=Math.floor(T*(GTe-1))*4;if(T>0){var V=o(T)?l:u;T>0&&(T=T*P+L),k[A++]=V[j],k[A++]=V[j+1],k[A++]=V[j+2],k[A++]=V[j+3]*T*256}else A+=4}return h.putImageData(C,0,0),d},t.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=qs.createCanvas()),r=this.pointSize+this.blurSize,a=r*2;e.width=a,e.height=a;var n=e.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor=ne.color.neutral99,n.beginPath(),n.arc(-r,r,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},t.prototype._getGradient=function(e,r){for(var a=this._gradientPixels,n=a[r]||(a[r]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[r](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},t})();function UTe(t,e,r){var a=t[1]-t[0];e=Se(e,function(o){return{interval:[(o.interval[0]-t[0])/a,(o.interval[1]-t[0])/a]}});var n=e.length,i=0;return function(o){var s;for(s=i;s<n;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}if(s===n)for(s=i-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s<n&&r[s]}}function $Te(t,e){var r=t[1]-t[0];return e=[(e[0]-t[0])/r,(e[1]-t[0])/r],function(a){return a>=e[0]&&a<=e[1]}}function g6(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}var WTe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n){var i;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(r,n,0,r.getData().count()):g6(o)&&this._renderOnGeo(o,r,i,n)},e.prototype.incrementalPrepareRender=function(r,a,n){this.group.removeAll()},e.prototype.incrementalRender=function(r,a,n,i){var o=a.coordinateSystem;o&&(g6(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnGridLike(a,i,r.start,r.end,!0)))},e.prototype.eachRendered=function(r){Ud(this._progressiveEls||this.group,r)},e.prototype._renderOnGridLike=function(r,a,n,i,o){var s=r.coordinateSystem,l=Id(s,"cartesian2d"),u=Id(s,"matrix"),c,d,h,v;if(l){var m=s.getAxis("x"),x=s.getAxis("y");c=m.getBandWidth()+.5,d=x.getBandWidth()+.5,h=m.scale.getExtent(),v=x.scale.getExtent()}for(var b=this.group,w=r.getData(),_=r.getModel(["emphasis","itemStyle"]).getItemStyle(),T=r.getModel(["blur","itemStyle"]).getItemStyle(),C=r.getModel(["select","itemStyle"]).getItemStyle(),k=r.get(["itemStyle","borderRadius"]),A=Dn(r),M=r.getModel("emphasis"),L=M.get("focus"),R=M.get("blurScope"),P=M.get("disabled"),j=l||u?[w.mapDimension("x"),w.mapDimension("y"),w.mapDimension("value")]:[w.mapDimension("time"),w.mapDimension("value")],V=n;V<i;V++){var I=void 0,F=w.getItemVisual(V,"style");if(l){var G=w.get(j[0],V),O=w.get(j[1],V);if(isNaN(w.get(j[2],V))||isNaN(G)||isNaN(O)||G<h[0]||G>h[1]||O<v[0]||O>v[1])continue;var U=s.dataToPoint([G,O]);I=new Et({shape:{x:U[0]-c/2,y:U[1]-d/2,width:c,height:d},style:F})}else if(u){var $=s.dataToLayout([w.get(j[0],V),w.get(j[1],V)]).rect;if(Ei($.x))continue;I=new Et({z2:1,shape:$,style:F})}else{if(isNaN(w.get(j[1],V)))continue;var K=s.dataToLayout([w.get(j[0],V)]),$=K.contentRect||K.rect;if(Ei($.x)||Ei($.y))continue;I=new Et({z2:1,shape:$,style:F})}if(w.hasItemOption){var q=w.getItemModel(V),H=q.getModel("emphasis");_=H.getModel("itemStyle").getItemStyle(),T=q.getModel(["blur","itemStyle"]).getItemStyle(),C=q.getModel(["select","itemStyle"]).getItemStyle(),k=q.get(["itemStyle","borderRadius"]),L=H.get("focus"),R=H.get("blurScope"),P=H.get("disabled"),A=Dn(q)}I.shape.r=k;var Z=r.getRawValue(V),te="-";Z&&Z[2]!=null&&(te=Z[2]+""),qn(I,A,{labelFetcher:r,labelDataIndex:V,defaultOpacity:F.opacity,defaultText:te}),I.ensureState("emphasis").style=_,I.ensureState("blur").style=T,I.ensureState("select").style=C,fa(I,L,R,P),I.incremental=o,o&&(I.states.emphasis.hoverLayer=!0),b.add(I),w.setItemGraphicEl(V,I),this._progressiveEls&&this._progressiveEls.push(I)}},e.prototype._renderOnGeo=function(r,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new HTe;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var c=r.getViewRect().clone(),d=r.getRoamTransform();c.applyTransform(d);var h=Math.max(c.x,0),v=Math.max(c.y,0),m=Math.min(c.width+c.x,i.getWidth()),x=Math.min(c.height+c.y,i.getHeight()),b=m-h,w=x-v,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],T=l.mapArray(_,function(M,L,R){var P=r.dataToPoint([M,L]);return P[0]-=h,P[1]-=v,P.push(R),P}),C=n.getExtent(),k=n.type==="visualMap.continuous"?$Te(C,n.option.range):UTe(C,n.getPieceList(),n.option.selected);u.update(T,b,w,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},k);var A=new li({style:{width:b,height:w,x:h,y:v,image:u.canvas},silent:!0});this.group.add(A)},e.type="heatmap",e})(Rr),YTe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,a){return cc(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var r=Ky.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:ne.color.primary}}},e})(Gr);function XTe(t){t.registerChartView(WTe),t.registerSeriesModel(YTe)}var qTe=["itemStyle","borderWidth"],y6=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],RN=new lc,ZTe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n){var i=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),d=l.master.getRect(),h={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[d.x,d.x+d.width],[d.y,d.y+d.height]],isHorizontal:c,valueDim:y6[+c],categoryDim:y6[1-+c]};o.diff(s).add(function(m){if(o.hasValue(m)){var x=b6(o,m),b=x6(o,m,x,h),w=w6(o,h,b);o.setItemGraphicEl(m,w),i.add(w),_6(w,h,b)}}).update(function(m,x){var b=s.getItemGraphicEl(x);if(!o.hasValue(m)){i.remove(b);return}var w=b6(o,m),_=x6(o,m,w,h),T=uK(o,_);b&&T!==b.__pictorialShapeStr&&(i.remove(b),o.setItemGraphicEl(m,null),b=null),b?aCe(b,h,_):b=w6(o,h,_,!0),o.setItemGraphicEl(m,b),b.__pictorialSymbolMeta=_,i.add(b),_6(b,h,_)}).remove(function(m){var x=s.getItemGraphicEl(m);x&&S6(s,m,x.__pictorialSymbolMeta.animationModel,x)}).execute();var v=r.get("clip",!0)?nx(r.coordinateSystem,!1,r):null;return v?i.setClipPath(v):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(r,a){var n=this.group,i=this._data;r.get("animation")?i&&i.eachItemGraphicEl(function(o){S6(i,dt(o).dataIndex,r,o)}):n.removeAll()},e.type="pictorialBar",e})(Rr);function x6(t,e,r,a){var n=t.getItemLayout(e),i=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=r.get("symbolPatternSize")||2,d=r.isAnimationEnabled(),h={dataIndex:e,layout:n,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:d?r:null,hoverScale:d&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};KTe(r,i,n,a,h),QTe(t,e,n,i,o,h.boundingLength,h.pxSign,c,a,h),JTe(r,h.symbolScale,u,a,h);var v=h.symbolSize,m=Xh(r.get("symbolOffset"),v);return eCe(r,v,n,i,o,m,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,a,h),h}function KTe(t,e,r,a,n){var i=a.valueDim,o=t.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[i.wh]<=0),c;if(be(o)){var d=[PN(s,o[0])-l,PN(s,o[1])-l];d[1]<d[0]&&d.reverse(),c=d[u]}else o!=null?c=PN(s,o)-l:e?c=a.coordSysExtent[i.index][u]-l:c=r[i.wh];n.boundingLength=c,e&&(n.repeatCutLength=r[i.wh]);var h=i.xy==="x",v=s.inverse;n.pxSign=h&&!v||!h&&v?c>=0?1:-1:c>0?1:-1}function PN(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function QTe(t,e,r,a,n,i,o,s,l,u){var c=l.valueDim,d=l.categoryDim,h=Math.abs(r[d.wh]),v=t.getItemVisual(e,"symbolSize"),m;be(v)?m=v.slice():v==null?m=["100%","100%"]:m=[v,v],m[d.index]=Pe(m[d.index],h),m[c.index]=Pe(m[c.index],a?h:Math.abs(i)),u.symbolSize=m;var x=u.symbolScale=[m[0]/s,m[1]/s];x[c.index]*=(l.isHorizontal?-1:1)*o}function JTe(t,e,r,a,n){var i=t.get(qTe)||0;i&&(RN.attr({scaleX:e[0],scaleY:e[1],rotation:r}),RN.updateTransform(),i/=RN.getLineScale(),i*=e[a.valueDim.index]),n.valueLineWidth=i||0}function eCe(t,e,r,a,n,i,o,s,l,u,c,d){var h=c.categoryDim,v=c.valueDim,m=d.pxSign,x=Math.max(e[v.index]+s,0),b=x;if(a){var w=Math.abs(l),_=yi(t.get("symbolMargin"),"15%")+"",T=!1;_.lastIndexOf("!")===_.length-1&&(T=!0,_=_.slice(0,_.length-1));var C=Pe(_,e[v.index]),k=Math.max(x+C*2,0),A=T?0:C*2,M=F$(a),L=M?a:T6((w+A)/k),R=w-L*x;C=R/2/(T?L:Math.max(L-1,1)),k=x+C*2,A=T?0:C*2,!M&&a!=="fixed"&&(L=u?T6((Math.abs(u)+A)/k):0),b=L*k-A,d.repeatTimes=L,d.symbolMargin=C}var P=m*(b/2),j=d.pathPosition=[];j[h.index]=r[h.wh]/2,j[v.index]=o==="start"?P:o==="end"?l-P:l/2,i&&(j[0]+=i[0],j[1]+=i[1]);var V=d.bundlePosition=[];V[h.index]=r[h.xy],V[v.index]=r[v.xy];var I=d.barRectShape=ve({},r);I[v.wh]=m*Math.max(Math.abs(r[v.wh]),Math.abs(j[v.index]+P)),I[h.wh]=r[h.wh];var F=d.clipShape={};F[h.xy]=-r[h.xy],F[h.wh]=c.ecSize[h.wh],F[v.xy]=0,F[v.wh]=r[v.wh]}function nK(t){var e=t.symbolPatternSize,r=mn(t.symbolType,-e/2,-e/2,e,e);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function iK(t,e,r,a){var n=t.__pictorialBundle,i=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,c=0,d=i[e.valueDim.index]+o+r.symbolMargin*2;for(LR(t,function(x){x.__pictorialAnimationIndex=c,x.__pictorialRepeatTimes=u,c<u?Mp(x,null,m(c),r,a):Mp(x,null,{scaleX:0,scaleY:0},r,a,function(){n.remove(x)}),c++});c<u;c++){var h=nK(r);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,n.add(h);var v=m(c);Mp(h,{x:v.x,y:v.y,scaleX:0,scaleY:0},{scaleX:v.scaleX,scaleY:v.scaleY,rotation:v.rotation},r,a)}function m(x){var b=s.slice(),w=r.pxSign,_=x;return(r.symbolRepeatDirection==="start"?w>0:w<0)&&(_=u-1-x),b[l.index]=d*(_-u/2+.5)+s[l.index],{x:b[0],y:b[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function oK(t,e,r,a){var n=t.__pictorialBundle,i=t.__pictorialMainPath;i?Mp(i,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,a):(i=t.__pictorialMainPath=nK(r),n.add(i),Mp(i,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,a))}function sK(t,e,r){var a=ve({},e.barRectShape),n=t.__pictorialBarRect;n?Mp(n,null,{shape:a},e,r):(n=t.__pictorialBarRect=new Et({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,t.add(n))}function lK(t,e,r,a){if(r.symbolClip){var n=t.__pictorialClipPath,i=ve({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(n)tr(n,{shape:i},s,l);else{i[o.wh]=0,n=new Et({shape:i}),t.__pictorialBundle.setClipPath(n),t.__pictorialClipPath=n;var u={};u[o.wh]=r.clipShape[o.wh],$h[a?"updateProps":"initProps"](n,{shape:u},s,l)}}}function b6(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=tCe,r.isAnimationEnabled=rCe,r}function tCe(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function rCe(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function w6(t,e,r,a){var n=new Qe,i=new Qe;return n.add(i),n.__pictorialBundle=i,i.x=r.bundlePosition[0],i.y=r.bundlePosition[1],r.symbolRepeat?iK(n,e,r):oK(n,e,r),sK(n,r,a),lK(n,e,r,a),n.__pictorialShapeStr=uK(t,r),n.__pictorialSymbolMeta=r,n}function aCe(t,e,r){var a=r.animationModel,n=r.dataIndex,i=t.__pictorialBundle;tr(i,{x:r.bundlePosition[0],y:r.bundlePosition[1]},a,n),r.symbolRepeat?iK(t,e,r,!0):oK(t,e,r,!0),sK(t,r,!0),lK(t,e,r,!0)}function S6(t,e,r,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];LR(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(r=null),z(i,function(o){Rd(o,{scaleX:0,scaleY:0},r,e,function(){a.parent&&a.parent.remove(a)})}),t.setItemGraphicEl(e,null)}function uK(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function LR(t,e,r){z(t.__pictorialBundle.children(),function(a){a!==t.__pictorialBarRect&&e.call(r,a)})}function Mp(t,e,r,a,n,i){e&&t.attr(e),a.symbolClip&&!n?r&&t.attr(r):r&&$h[n?"updateProps":"initProps"](t,r,a.animationModel,a.dataIndex,i)}function _6(t,e,r){var a=r.dataIndex,n=r.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),c=i.get("focus"),d=i.get("blurScope"),h=i.get("scale");LR(t,function(x){if(x instanceof li){var b=x.style;x.useStyle(ve({image:b.image,x:b.x,y:b.y,width:b.width,height:b.height},r.style))}else x.useStyle(r.style);var w=x.ensureState("emphasis");w.style=o,h&&(w.scaleX=x.scaleX*1.1,w.scaleY=x.scaleY*1.1),x.ensureState("blur").style=s,x.ensureState("select").style=l,u&&(x.cursor=u),x.z2=r.z2});var v=e.valueDim.posDesc[+(r.boundingLength>0)],m=t.__pictorialBarRect;m.ignoreClip=!0,qn(m,Dn(n),{labelFetcher:e.seriesModel,labelDataIndex:a,defaultText:qp(e.seriesModel.getData(),a),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:v}),fa(t,c,d,i.get("disabled"))}function T6(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var nCe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return e.prototype.getInitialData=function(r){return r.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=$d(wy.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:ne.color.primary}}}),e})(wy);function iCe(t){t.registerChartView(ZTe),t.registerSeriesModel(nCe),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,wt(MX,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,DX("pictorialBar"))}var oCe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._layers=[],r}return e.prototype.render=function(r,a,n){var i=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=i.getLayout("layoutInfo"),c=u.rect,d=u.boundaryGap;s.x=0,s.y=c.y+d[0];function h(b){return b.name}var v=new nc(this._layersSeries||[],l,h,h),m=[];v.add(je(x,this,"add")).update(je(x,this,"update")).remove(je(x,this,"remove")).execute();function x(b,w,_){var T=o._layers;if(b==="remove"){s.remove(T[w]);return}for(var C=[],k=[],A,M=l[w].indices,L=0;L<M.length;L++){var R=i.getItemLayout(M[L]),P=R.x,j=R.y0,V=R.y;C.push(P,j),k.push(P,j+V),A=i.getItemVisual(M[L],"style")}var I,F=i.getItemLayout(M[0]),G=r.getModel("label"),O=G.get("margin"),U=r.getModel("emphasis");if(b==="add"){var $=m[w]=new Qe;I=new bq({shape:{points:C,stackedOnPoints:k,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),$.add(I),s.add($),r.isAnimationEnabled()&&I.setClipPath(sCe(I.getBoundingRect(),r,function(){I.removeClipPath()}))}else{var $=T[_];I=$.childAt(0),s.add($),m[w]=$,tr(I,{shape:{points:C,stackedOnPoints:k}},r),bs(I)}qn(I,Dn(r),{labelDataIndex:M[L-1],defaultText:i.getName(M[L-1]),inheritColor:A.fill},{normal:{verticalAlign:"middle"}}),I.setTextConfig({position:null,local:!0});var K=I.getTextContent();K&&(K.x=F.x-O,K.y=F.y0+F.y/2),I.useStyle(A),i.setItemGraphicEl(w,I),Mn(I,r),fa(I,U.get("focus"),U.get("blurScope"),U.get("disabled"))}this._layersSeries=l,this._layers=m},e.type="themeRiver",e})(Rr);function sCe(t,e,r){var a=new Et({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return na(a,{shape:{x:t.x-50,width:t.width+100,height:t.height+20}},e,r),a}var IN=2,lCe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Am(je(this.getData,this),je(this.getRawData,this))},e.prototype.fixData=function(r){var a=r.length,n={},i=VM(r,function(h){return n.hasOwnProperty(h[0]+"")||(n[h[0]+""]=-1),h[2]}),o=[];i.buckets.each(function(h,v){o.push({name:v,dataList:h})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var d=o[l].dataList[c][0]+"";n[d]=l}for(var d in n)n.hasOwnProperty(d)&&n[d]!==l&&(n[d]=l,r[a]=[d,0,u],a++)}return r},e.prototype.getInitialData=function(r,a){for(var n=this.getReferringComponents("singleAxis",Ia).models[0],i=n.get("type"),o=mr(r.data,function(m){return m[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=He(),c=0,d=0;d<s.length;++d)l.push(s[d][IN]),u.get(s[d][IN])||(u.set(s[d][IN],c),c++);var h=ex(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:wS(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,v=new Zi(h,this);return v.initData(s),v},e.prototype.getLayerSeries=function(){for(var r=this.getData(),a=r.count(),n=[],i=0;i<a;++i)n[i]=i;var o=r.mapDimension("single"),s=VM(n,function(u){return r.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(d,h){return r.get(o,d)-r.get(o,h)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(r,a,n){be(r)||(r=r?[r]:[]);for(var i=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var d=Number.MAX_VALUE,h=-1,v=o[c].indices.length,m=0;m<v;++m){var x=i.get(r[0],o[c].indices[m]),b=Math.abs(x-a);b<=d&&(u=x,d=b,h=o[c].indices[m])}s.push(h)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(r,a,n){var i=this.getData(),o=i.getName(r),s=i.get(i.mapDimension("value"),r);return pn("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e})(Gr);function uCe(t,e){t.eachSeriesByType("themeRiver",function(r){var a=r.getData(),n=r.coordinateSystem,i={},o=n.getRect();i.rect=o;var s=r.get("boundaryGap"),l=n.getAxis();if(i.boundaryGap=s,l.orient==="horizontal"){s[0]=Pe(s[0],o.height),s[1]=Pe(s[1],o.height);var u=o.height-s[0]-s[1];C6(a,r,u)}else{s[0]=Pe(s[0],o.width),s[1]=Pe(s[1],o.width);var c=o.width-s[0]-s[1];C6(a,r,c)}a.setLayout("layoutInfo",i)})}function C6(t,e,r){if(t.count())for(var a=e.coordinateSystem,n=e.getLayerSeries(),i=t.mapDimension("single"),o=t.mapDimension("value"),s=Se(n,function(b){return Se(b.indices,function(w){var _=a.dataToPoint(t.get(i,w));return _[1]=t.get(o,w),_})}),l=cCe(s),u=l.y0,c=r/l.max,d=n.length,h=n[0].indices.length,v,m=0;m<h;++m){v=u[m]*c,t.setItemLayout(n[0].indices[m],{layerIndex:0,x:s[0][m][0],y0:v,y:s[0][m][1]*c});for(var x=1;x<d;++x)v+=s[x-1][m][1]*c,t.setItemLayout(n[x].indices[m],{layerIndex:x,x:s[x][m][0],y0:v,y:s[x][m][1]*c})}}function cCe(t){for(var e=t.length,r=t[0].length,a=[],n=[],i=0,o=0;o<r;++o){for(var s=0,l=0;l<e;++l)s+=t[l][o][1];s>i&&(i=s),a.push(s)}for(var u=0;u<r;++u)n[u]=(i-a[u])/2;i=0;for(var c=0;c<r;++c){var d=a[c]+n[c];d>i&&(i=d)}return{y0:n,max:i}}function dCe(t){t.registerChartView(oCe),t.registerSeriesModel(lCe),t.registerLayout(uCe),t.registerProcessor(km("themeRiver"))}var fCe=2,hCe=4,k6=(function(t){se(e,t);function e(r,a,n,i){var o=t.call(this)||this;o.z2=fCe,o.textConfig={inside:!0},dt(o).seriesIndex=a.seriesIndex;var s=new Qt({z2:hCe,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,a,n,i),o}return e.prototype.updateData=function(r,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;dt(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),c=a.getLayout(),d=ve({},c);d.label=null;var h=a.getVisual("style");h.lineJoin="bevel";var v=a.getVisual("decal");v&&(h.decal=$p(v,o));var m=Fl(l.getModel("itemStyle"),d,!0);ve(d,m),z(Qi,function(_){var T=s.ensureState(_),C=l.getModel([_,"itemStyle"]);T.style=C.getItemStyle();var k=Fl(C,d);k&&(T.shape=k)}),r?(s.setShape(d),s.shape.r=c.r0,na(s,{shape:{r:c.r}},n,a.dataIndex)):(tr(s,{shape:d},n),bs(s)),s.useStyle(h),this._updateLabel(n);var x=l.getShallow("cursor");x&&s.attr("cursor",x),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var b=u.get("focus"),w=b==="relative"?ty(a.getAncestorsIndices(),a.getDescendantIndices()):b==="ancestor"?a.getAncestorsIndices():b==="descendant"?a.getDescendantIndices():b;fa(this,w,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),d=this,h=d.getTextContent(),v=this.node.dataIndex,m=i.get("minAngle")/180*Math.PI,x=i.get("show")&&!(m!=null&&Math.abs(s)<m);h.ignore=!x,z(sy,function(w){var _=w==="normal"?n.getModel("label"):n.getModel([w,"label"]),T=w==="normal",C=T?h:h.ensureState(w),k=r.getFormattedLabel(v,w);T&&(k=k||a.node.name),C.style=Fr(_,{},null,w!=="normal",!0),k&&(C.style.text=k);var A=_.get("show");A!=null&&!T&&(C.ignore=!A);var M=b(_,"position"),L=T?d:d.states[w],R=L.style.fill;L.textConfig={outsideFill:_.get("color")==="inherit"?R:null,inside:M!=="outside"};var P,j=b(_,"distance")||0,V=b(_,"align"),I=b(_,"rotate"),F=Math.PI*.5,G=Math.PI*1.5,O=Eo(I==="tangential"?Math.PI/2-l:l),U=O>F&&!iy(O-F)&&O<G;M==="outside"?(P=o.r+j,V=U?"right":"left"):!V||V==="center"?(s===2*Math.PI&&o.r0===0?P=0:P=(o.r+o.r0)/2,V="center"):V==="left"?(P=o.r0+j,V=U?"right":"left"):V==="right"&&(P=o.r-j,V=U?"left":"right"),C.style.align=V,C.style.verticalAlign=b(_,"verticalAlign")||"middle",C.x=P*u+o.cx,C.y=P*c+o.cy;var $=0;I==="radial"?$=Eo(-l)+(U?Math.PI:0):I==="tangential"?$=Eo(Math.PI/2-l)+(U?Math.PI:0):qt(I)&&($=I*Math.PI/180),C.rotation=Eo($)});function b(w,_){var T=w.get(_);return T??i.get(_)}h.dirtyStyle()},e})(Ii),rL="sunburstRootToNode",N6="sunburstHighlight",vCe="sunburstUnhighlight";function pCe(t){t.registerAction({type:rL,update:"updateView"},function(e,r){r.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(n,i){var o=_y(e,[rL],n);if(o){var s=n.getViewRoot();s&&(e.direction=vR(s,o.node)?"rollUp":"drillDown"),n.resetViewRoot(o.node)}}}),t.registerAction({type:N6,update:"none"},function(e,r,a){e=ve({},e),r.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i){var o=_y(e,[N6],i);o&&(e.dataIndex=o.node.dataIndex)}a.dispatchAction(ve(e,{type:"highlight"}))}),t.registerAction({type:vCe,update:"updateView"},function(e,r,a){e=ve({},e),a.dispatchAction(ve(e,{type:"downplay"}))})}var mCe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n,i){var o=this;this.seriesModel=r,this.api=n,this.ecModel=a;var s=r.getData(),l=s.tree.root,u=r.getViewRoot(),c=this.group,d=r.get("renderLabelForZeroData"),h=[];u.eachNode(function(_){h.push(_)});var v=this._oldChildren||[];m(h,v),w(l,u),this._initEvents(),this._oldChildren=h;function m(_,T){if(_.length===0&&T.length===0)return;new nc(T,_,C,C).add(k).update(k).remove(wt(k,null)).execute();function C(A){return A.getId()}function k(A,M){var L=A==null?null:_[A],R=M==null?null:T[M];x(L,R)}}function x(_,T){if(!d&&_&&!_.getValue()&&(_=null),_!==l&&T!==l){if(T&&T.piece)_?(T.piece.updateData(!1,_,r,a,n),s.setItemGraphicEl(_.dataIndex,T.piece)):b(T);else if(_){var C=new k6(_,r,a,n);c.add(C),s.setItemGraphicEl(_.dataIndex,C)}}}function b(_){_&&_.piece&&(c.remove(_.piece),_.piece=null)}function w(_,T){T.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,r,a,n):(o.virtualPiece=new k6(_,r,a,n),c.add(o.virtualPiece)),T.piece.off("click"),o.virtualPiece.on("click",function(C){o._rootToNode(T.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=r.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";hS(u,c)}}n=!0}})})},e.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:rL,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},e.prototype.containPoint=function(r,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=r[0]-i.cx,s=r[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e})(Rr),gCe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r,a){var n={name:r.name,children:r.data};cK(n);var i=this._levelModels=Se(r.levels||[],function(l){return new $t(l,this,a)},this),o=hR.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var d=o.getNodeByDataIndex(c),h=i[d.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(r){var a=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(r);return a.treePathInfo=s2(n,this),a},e.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var a=this.getRawData().tree.root;(!r||r!==a&&!a.contains(r))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){vZ(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e})(Gr);function cK(t){var e=0;z(t.children,function(a){cK(a);var n=a.value;be(n)&&(n=n[0]),e+=n});var r=t.value;be(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),be(t.value)?t.value[0]=r:t.value=r}var A6=Math.PI/180;function yCe(t,e,r){e.eachSeriesByType(t,function(a){var n=a.get("center"),i=a.get("radius");be(i)||(i=[0,i]),be(n)||(n=[n,n]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=Pe(n[0],o),c=Pe(n[1],s),d=Pe(i[0],l/2),h=Pe(i[1],l/2),v=-a.get("startAngle")*A6,m=a.get("minAngle")*A6,x=a.getData().tree.root,b=a.getViewRoot(),w=b.depth,_=a.get("sort");_!=null&&dK(b,_);var T=0;z(b.children,function(O){!isNaN(O.getValue())&&T++});var C=b.getValue(),k=Math.PI/(C||T)*2,A=b.depth>0,M=b.height-(A?-1:1),L=(h-d)/(M||1),R=a.get("clockwise"),P=a.get("stillShowZeroSum"),j=R?1:-1,V=function(O,U){if(O){var $=U;if(O!==x){var K=O.getValue(),q=C===0&&P?k:K*k;q<m&&(q=m),$=U+j*q;var H=O.depth-w-(A?-1:1),Z=d+L*H,te=d+L*(H+1),ie=a.getLevelModel(O);if(ie){var ce=ie.get("r0",!0),me=ie.get("r",!0),ze=ie.get("radius",!0);ze!=null&&(ce=ze[0],me=ze[1]),ce!=null&&(Z=Pe(ce,l/2)),me!=null&&(te=Pe(me,l/2))}O.setLayout({angle:q,startAngle:U,endAngle:$,clockwise:R,cx:u,cy:c,r0:Z,r:te})}if(O.children&&O.children.length){var Ce=0;z(O.children,function(ge){Ce+=V(ge,U+Ce)})}return $-U}};if(A){var I=d,F=d+L,G=Math.PI*2;x.setLayout({angle:G,startAngle:v,endAngle:v+G,clockwise:R,cx:u,cy:c,r0:I,r:F})}V(b,v)})}function dK(t,e){var r=t.children||[];t.children=xCe(r,e),r.length&&z(t.children,function(a){dK(a,e)})}function xCe(t,e){if(Ke(e)){var r=Se(t,function(n,i){var o=n.getValue();return{params:{depth:n.depth,height:n.height,dataIndex:n.dataIndex,getValue:function(){return o}},index:i}});return r.sort(function(n,i){return e(n.params,i.params)}),Se(r,function(n){return t[n.index]})}else{var a=e==="asc";return t.sort(function(n,i){var o=(n.getValue()-i.getValue())*(a?1:-1);return o===0?(n.dataIndex-i.dataIndex)*(a?-1:1):o})}}function bCe(t){var e={};function r(a,n,i){if(a.depth===0)return ne.color.neutral50;for(var o=a;o&&o.depth>1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&Ie(s)&&(s=AM(s,(a.depth-1)/(i-1)*.5)),s}t.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");ve(u,l)})})}function wCe(t){t.registerChartView(mCe),t.registerSeriesModel(gCe),t.registerLayout(wt(yCe,"sunburst")),t.registerProcessor(wt(km,"sunburst")),t.registerVisual(bCe),pCe(t)}var M6={color:"fill",borderColor:"stroke"},SCe={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Wu=jt(),_Ce=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(r,a){return cc(null,this)},e.prototype.getDataParams=function(r,a,n){var i=t.prototype.getDataParams.call(this,r,a);return n&&(i.info=Wu(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e})(Gr);function TCe(t,e){return e=e||[0,0],Se(["x","y"],function(r,a){var n=this.getAxis(r),i=e[a],o=t[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function CCe(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:je(TCe,t)}}}function kCe(t,e){return e=e||[0,0],Se([0,1],function(r){var a=e[r],n=t[r]/2,i=[],o=[];return i[r]=a-n,o[r]=a+n,i[1-r]=o[1-r]=e[1-r],Math.abs(this.dataToPoint(i)[r]-this.dataToPoint(o)[r])},this)}function NCe(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(r){return t.dataToPoint(r)},size:je(kCe,t)}}}function ACe(t,e){var r=this.getAxis(),a=e instanceof Array?e[0]:e,n=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(a-n)-r.dataToCoord(a+n))}function MCe(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:je(ACe,t)}}}function DCe(t,e){return e=e||[0,0],Se(["Radius","Angle"],function(r,a){var n="get"+r+"Axis",i=this[n](),o=e[a],s=t[a]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function LCe(t){var e=t.getRadiusAxis(),r=t.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=e.dataToRadius(n[0]),o=r.dataToAngle(n[1]),s=t.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:je(DCe,t)}}}function ECe(t){var e=t.getRect(),r=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(a,n){return t.dataToPoint(a,n)},layout:function(a,n){return t.dataToLayout(a,n)}}}}function RCe(t){var e=t.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r,a){return t.dataToPoint(r,a)},layout:function(r,a){return t.dataToLayout(r,a)}}}}function fK(t,e,r,a){return t&&(t.legacy||t.legacy!==!1&&!r&&!a&&e!=="tspan"&&(e==="text"||Ve(t,"text")))}function hK(t,e,r){var a=t,n,i,o;if(e==="text")o=a;else{o={},Ve(a,"text")&&(o.text=a.text),Ve(a,"rich")&&(o.rich=a.rich),Ve(a,"textFill")&&(o.fill=a.textFill),Ve(a,"textStroke")&&(o.stroke=a.textStroke),Ve(a,"fontFamily")&&(o.fontFamily=a.fontFamily),Ve(a,"fontSize")&&(o.fontSize=a.fontSize),Ve(a,"fontStyle")&&(o.fontStyle=a.fontStyle),Ve(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=Ve(a,"textPosition");r?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),Ve(a,"textPosition")&&(n.position=a.textPosition),Ve(a,"textOffset")&&(n.offset=a.textOffset),Ve(a,"textRotation")&&(n.rotation=a.textRotation),Ve(a,"textDistance")&&(n.distance=a.textDistance)}return D6(o,t),z(o.rich,function(l){D6(l,l)}),{textConfig:n,textContent:i}}function D6(t,e){e&&(e.font=e.textFont||e.font,Ve(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),Ve(e,"textAlign")&&(t.align=e.textAlign),Ve(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),Ve(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),Ve(e,"textWidth")&&(t.width=e.textWidth),Ve(e,"textHeight")&&(t.height=e.textHeight),Ve(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),Ve(e,"textPadding")&&(t.padding=e.textPadding),Ve(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),Ve(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),Ve(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),Ve(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),Ve(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),Ve(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),Ve(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function L6(t,e,r){var a=t;a.textPosition=a.textPosition||r.position||"inside",r.offset!=null&&(a.textOffset=r.offset),r.rotation!=null&&(a.textRotation=r.rotation),r.distance!=null&&(a.textDistance=r.distance);var n=a.textPosition.indexOf("inside")>=0,i=t.fill||ne.color.neutral99;E6(a,e);var o=a.textFill==null;return n?o&&(a.textFill=r.insideFill||ne.color.neutral00,!a.textStroke&&r.insideStroke&&(a.textStroke=r.insideStroke),!a.textStroke&&(a.textStroke=i),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=t.fill||r.outsideFill||ne.color.neutral00),!a.textStroke&&r.outsideStroke&&(a.textStroke=r.outsideStroke)),a.text=e.text,a.rich=e.rich,z(e.rich,function(s){E6(s,s)}),a}function E6(t,e){e&&(Ve(e,"fill")&&(t.textFill=e.fill),Ve(e,"stroke")&&(t.textStroke=e.fill),Ve(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),Ve(e,"font")&&(t.font=e.font),Ve(e,"fontStyle")&&(t.fontStyle=e.fontStyle),Ve(e,"fontWeight")&&(t.fontWeight=e.fontWeight),Ve(e,"fontSize")&&(t.fontSize=e.fontSize),Ve(e,"fontFamily")&&(t.fontFamily=e.fontFamily),Ve(e,"align")&&(t.textAlign=e.align),Ve(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),Ve(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),Ve(e,"width")&&(t.textWidth=e.width),Ve(e,"height")&&(t.textHeight=e.height),Ve(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),Ve(e,"padding")&&(t.textPadding=e.padding),Ve(e,"borderColor")&&(t.textBorderColor=e.borderColor),Ve(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),Ve(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),Ve(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),Ve(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),Ve(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),Ve(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),Ve(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),Ve(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),Ve(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),Ve(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var vK={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},R6=Wt(vK);ql(Kl,function(t,e){return t[e]=1,t},{});Kl.join(", ");var BS=["","style","shape","extra"],Jp=jt();function ER(t,e,r,a,n){var i=t+"Animation",o=xm(t,a,n)||{},s=Jp(e).userDuring;return o.duration>0&&(o.during=s?je(zCe,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),ve(o,r[i]),o}function Tw(t,e,r,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=r.isAnimationEnabled(),l=Jp(t),u=e.style;l.userDuring=e.during;var c={},d={};if(VCe(t,e,d),t.type==="compound")for(var h=t.shape.paths,v=e.shape.paths,m=0;m<v.length;m++){var x=v[m];jN("shape",x,h[m])}else jN("shape",e,d),jN("extra",e,d);if(!i&&s&&(BCe(t,e,c),P6("shape",t,e,c),P6("extra",t,e,c),FCe(t,e,u,c)),d.style=u,PCe(t,d,o),jCe(t,e),s)if(i){var b={};z(BS,function(_){var T=_?e[_]:e;T&&T.enterFrom&&(_&&(b[_]=b[_]||{}),ve(_?b[_]:b,T.enterFrom))});var w=ER("enter",t,e,r,n);w.duration>0&&t.animateFrom(b,w)}else ICe(t,e,n||0,r,c);pK(t,e),u?t.dirty():t.markRedraw()}function pK(t,e){for(var r=Jp(t).leaveToProps,a=0;a<BS.length;a++){var n=BS[a],i=n?e[n]:e;i&&i.leaveTo&&(r||(r=Jp(t).leaveToProps={}),n&&(r[n]=r[n]||{}),ve(n?r[n]:r,i.leaveTo))}}function c2(t,e,r,a){if(t){var n=t.parent,i=Jp(t).leaveToProps;if(i){var o=ER("update",t,e,r,0);o.done=function(){n&&n.remove(t)},t.animateTo(i,o)}else n&&n.remove(t)}}function Ch(t){return t==="all"}function PCe(t,e,r){var a=e.style;if(!t.isGroup&&a){if(r){t.useStyle({});for(var n=t.animators,i=0;i<n.length;i++){var o=n[i];o.targetName==="style"&&o.changeTarget(t.style)}}t.setStyle(a)}e&&(e.style=null,e&&t.attr(e),e.style=a)}function ICe(t,e,r,a,n){if(n){var i=ER("update",t,e,a,r);i.duration>0&&t.animateFrom(n,i)}}function jCe(t,e){Ve(e,"silent")&&(t.silent=e.silent),Ve(e,"ignore")&&(t.ignore=e.ignore),t instanceof xs&&Ve(e,"invisible")&&(t.invisible=e.invisible),t instanceof zt&&Ve(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var Nl={},OCe={setTransform:function(t,e){return Nl.el[t]=e,this},getTransform:function(t){return Nl.el[t]},setShape:function(t,e){var r=Nl.el,a=r.shape||(r.shape={});return a[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){var e=Nl.el.shape;if(e)return e[t]},setStyle:function(t,e){var r=Nl.el,a=r.style;return a&&(a[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){var e=Nl.el.style;if(e)return e[t]},setExtra:function(t,e){var r=Nl.el.extra||(Nl.el.extra={});return r[t]=e,this},getExtra:function(t){var e=Nl.el.extra;if(e)return e[t]}};function zCe(){var t=this,e=t.el;if(e){var r=Jp(e).userDuring,a=t.userDuring;if(r!==a){t.el=t.userDuring=null;return}Nl.el=e,a(OCe)}}function P6(t,e,r,a){var n=r[t];if(n){var i=e[t],o;if(i){var s=r.transition,l=n.transition;if(l)if(!o&&(o=a[t]={}),Ch(l))ve(o,i);else for(var u=Ir(l),c=0;c<u.length;c++){var d=u[c],h=i[d];o[d]=h}else if(Ch(s)||St(s,t)>=0){!o&&(o=a[t]={});for(var v=Wt(i),c=0;c<v.length;c++){var d=v[c],h=i[d];GCe(n[d],h)&&(o[d]=h)}}}}}function jN(t,e,r){var a=e[t];if(a)for(var n=r[t]={},i=Wt(a),o=0;o<i.length;o++){var s=i[o];n[s]=P0(a[s])}}function BCe(t,e,r){for(var a=e.transition,n=Ch(a)?Kl:Ir(a||[]),i=0;i<n.length;i++){var o=n[i];if(!(o==="style"||o==="shape"||o==="extra")){var s=t[o];r[o]=s}}}function VCe(t,e,r){for(var a=0;a<R6.length;a++){var n=R6[a],i=vK[n],o=e[n];o&&(r[i[0]]=o[0],r[i[1]]=o[1])}for(var a=0;a<Kl.length;a++){var s=Kl[a];e[s]!=null&&(r[s]=e[s])}}function FCe(t,e,r,a){if(r){var n=t.style,i;if(n){var o=r.transition,s=e.transition;if(o&&!Ch(o)){var l=Ir(o);!i&&(i=a.style={});for(var u=0;u<l.length;u++){var c=l[u],d=n[c];i[c]=d}}else if(t.getAnimationStyleProps&&(Ch(s)||Ch(o)||St(s,"style")>=0)){var h=t.getAnimationStyleProps(),v=h?h.style:null;if(v){!i&&(i=a.style={});for(var m=Wt(r),u=0;u<m.length;u++){var c=m[u];if(v[c]){var d=n[c];i[c]=d}}}}}}}function GCe(t,e){return Ri(t)?t!==e:t!=null&&isFinite(t)}var mK=jt(),HCe=["percent","easing","shape","style","extra"];function gK(t){t.stopAnimation("keyframe"),t.attr(mK(t))}function VS(t,e,r){if(!(!r.isAnimationEnabled()||!e)){if(be(e)){z(e,function(s){VS(t,s,r)});return}var a=e.keyframes,n=e.duration;if(r&&n==null){var i=xm("enter",r,0);n=i&&i.duration}if(!(!a||!n)){var o=mK(t);z(BS,function(s){if(!(s&&!t[s])){var l;a.sort(function(u,c){return u.percent-c.percent}),z(a,function(u){var c=t.animators,d=s?u[s]:u;if(d){var h=Wt(d);if(s||(h=mr(h,function(x){return St(HCe,x)<0})),!!h.length){l||(l=t.animate(s,e.loop,!0),l.scope="keyframe");for(var v=0;v<c.length;v++)c[v]!==l&&c[v].targetName===l.targetName&&c[v].stopTracks(h);s&&(o[s]=o[s]||{});var m=s?o[s]:o;z(h,function(x){m[x]=((s?t[s]:t)||{})[x]}),l.whenWithKeys(n*u.percent,d,h,u.easing)}}}),l&&l.delay(e.delay||0).duration(n).start(e.easing)}})}}}var Yu="emphasis",gd="normal",RR="blur",PR="select",zd=[gd,Yu,RR,PR],ON={normal:["itemStyle"],emphasis:[Yu,"itemStyle"],blur:[RR,"itemStyle"],select:[PR,"itemStyle"]},zN={normal:["label"],emphasis:[Yu,"label"],blur:[RR,"label"],select:[PR,"label"]},UCe=["x","y"],$Ce="e\0\0",ts={normal:{},emphasis:{},blur:{},select:{}},WCe={cartesian2d:CCe,geo:NCe,single:MCe,polar:LCe,calendar:ECe,matrix:RCe};function aL(t){return t instanceof zt}function nL(t){return t instanceof xs}function YCe(t,e){e.copyTransform(t),nL(e)&&nL(t)&&(e.setStyle(t.style),e.z=t.z,e.z2=t.z2,e.zlevel=t.zlevel,e.invisible=t.invisible,e.ignore=t.ignore,aL(e)&&aL(t)&&e.setShape(t.shape))}var XCe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n,i){this._progressiveEls=null;var o=this._data,s=r.getData(),l=this.group,u=I6(r,s,a,n);o||l.removeAll(),s.diff(o).add(function(d){BN(n,null,d,u(d,i),r,l,s)}).remove(function(d){var h=o.getItemGraphicEl(d);h&&c2(h,Wu(h).option,r)}).update(function(d,h){var v=o.getItemGraphicEl(h);BN(n,v,d,u(d,i),r,l,s)}).execute();var c=r.get("clip",!0)?nx(r.coordinateSystem,!1,r):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(r,a,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(r,a,n,i,o){var s=a.getData(),l=I6(a,s,n,i),u=this._progressiveEls=[];function c(v){v.isGroup||(v.incremental=!0,v.ensureState("emphasis").hoverLayer=!0)}for(var d=r.start;d<r.end;d++){var h=BN(null,null,d,l(d,o),a,this.group,s);h&&(h.traverse(c),u.push(h))}},e.prototype.eachRendered=function(r){Ud(this._progressiveEls||this.group,r)},e.prototype.filterForExposedEvent=function(r,a,n,i){var o=a.element;if(o==null||n.name===o)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1},e.type="custom",e})(Rr);function IR(t){var e=t.type,r;if(e==="path"){var a=t.shape,n=a.width!=null&&a.height!=null?{x:a.x||0,y:a.y||0,width:a.width,height:a.height}:null,i=bK(a);r=uy(i,null,n,a.layout||"center"),Wu(r).customPathData=i}else if(e==="image")r=new li({}),Wu(r).customImagePath=t.style.image;else if(e==="text")r=new Qt({});else if(e==="group")r=new Qe;else if(e==="compoundPath"){var a=t.shape;if(!a||!a.paths){var o="";cr(o)}var s=Se(a.paths,function(c){if(c.type==="path")return uy(c.shape.pathData,c,null);var d=cS(c.type);if(!d){var h="";cr(h)}return new d});r=new U_({shape:{paths:s}})}else{var l=cS(e);if(!l){var o="";cr(o)}r=new l}return Wu(r).customGraphicType=e,r.name=t.name,r.z2EmphasisLift=1,r.z2SelectLift=1,r}function jR(t,e,r,a,n,i,o){gK(e);var s=n&&n.normal.cfg;s&&e.setTextConfig(s),a&&a.transition==null&&(a.transition=UCe);var l=a&&a.style;if(l){if(e.type==="text"){var u=l;Ve(u,"textFill")&&(u.fill=u.textFill),Ve(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,d=aL(e)?l.decal:null;t&&d&&(d.dirty=!0,c=$p(d,t)),l.__decalPattern=c}if(nL(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}Tw(e,a,i,{dataIndex:r,isInit:o,clearStyle:!0}),VS(e,a.keyframeAnimation,i)}function yK(t,e,r,a,n){var i=e.isGroup?null:e,o=n&&n[t].cfg;if(i){var s=i.ensureState(t);if(a===!1){var l=i.getState(t);l&&(l.style=null)}else s.style=a||null;o&&(s.textConfig=o),Eh(i)}}function qCe(t,e,r){if(!t.isGroup){var a=t,n=r.currentZ,i=r.currentZLevel;a.z=n,a.zlevel=i;var o=e.z2;o!=null&&(a.z2=o||0);for(var s=0;s<zd.length;s++)ZCe(a,e,zd[s])}}function ZCe(t,e,r){var a=r===gd,n=a?e:FS(e,r),i=n?n.z2:null,o;i!=null&&(o=a?t:t.ensureState(r),o.z2=i||0)}function I6(t,e,r,a){var n=t.get("renderItem");if(typeof n=="string"){var i=s0e(n);i&&(n=i)}var o=t.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):WCe[o.type](o));for(var l=nt({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:k,style:M,ordinalRawValue:A,styleEmphasis:L,visual:j,barLayout:V,currentSeriesIndices:I,font:F},s.api||{}),u={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:s.coordSys,dataInsideLength:e.count(),encode:KCe(t.getData()),itemPayload:t.get("itemPayload")||{}},c,d,h={},v={},m={},x={},b=0;b<zd.length;b++){var w=zd[b];m[w]=t.getModel(ON[w]),x[w]=t.getModel(zN[w])}function _(G){return G===c?d||(d=e.getItemModel(G)):e.getItemModel(G)}function T(G,O){return e.hasItemOption?G===c?h[O]||(h[O]=_(G).getModel(ON[O])):_(G).getModel(ON[O]):m[O]}function C(G,O){return e.hasItemOption?G===c?v[O]||(v[O]=_(G).getModel(zN[O])):_(G).getModel(zN[O]):x[O]}return function(G,O){return c=G,d=null,h={},v={},n&&n(nt({dataIndexInside:G,dataIndex:e.getRawIndex(G),actionType:O?O.type:null},u),l)};function k(G,O){return O==null&&(O=c),e.getStore().get(e.getDimensionIndex(G||0),O)}function A(G,O){O==null&&(O=c),G=G||0;var U=e.getDimensionInfo(G);if(!U){var $=e.getDimensionIndex(G);return $>=0?e.getStore().get($,O):void 0}var K=e.get(U.name,O),q=U&&U.ordinalMeta;return q?q.categories[K]:K}function M(G,O){O==null&&(O=c);var U=e.getItemVisual(O,"style"),$=U&&U.fill,K=U&&U.opacity,q=T(O,gd).getItemStyle();$!=null&&(q.fill=$),K!=null&&(q.opacity=K);var H={inheritColor:Ie($)?$:ne.color.neutral99},Z=C(O,gd),te=Fr(Z,null,H,!1,!0);te.text=Z.getShallow("show")?$e(t.getFormattedLabel(O,gd),qp(e,O)):null;var ie=dS(Z,H,!1);return P(G,q),q=L6(q,te,ie),G&&R(q,G),q.legacy=!0,q}function L(G,O){O==null&&(O=c);var U=T(O,Yu).getItemStyle(),$=C(O,Yu),K=Fr($,null,null,!0,!0);K.text=$.getShallow("show")?Io(t.getFormattedLabel(O,Yu),t.getFormattedLabel(O,gd),qp(e,O)):null;var q=dS($,null,!0);return P(G,U),U=L6(U,K,q),G&&R(U,G),U.legacy=!0,U}function R(G,O){for(var U in O)Ve(O,U)&&(G[U]=O[U])}function P(G,O){G&&(G.textFill&&(O.textFill=G.textFill),G.textPosition&&(O.textPosition=G.textPosition))}function j(G,O){if(O==null&&(O=c),Ve(M6,G)){var U=e.getItemVisual(O,"style");return U?U[M6[G]]:null}if(Ve(SCe,G))return e.getItemVisual(O,G)}function V(G){if(o.type==="cartesian2d"){var O=o.getBaseAxis();return oye(nt({axis:O},G))}}function I(){return r.getCurrentSeriesIndices()}function F(G){return p5(G,r)}}function KCe(t){var e={};return z(t.dimensions,function(r){var a=t.getDimensionInfo(r);if(!a.isExtraCoord){var n=a.coordDim,i=e[n]=e[n]||[];i[a.coordDimIndex]=t.getDimensionIndex(r)}}),e}function BN(t,e,r,a,n,i,o){if(!a){i.remove(e);return}var s=OR(t,e,r,a,n,i);return s&&o.setItemGraphicEl(r,s),s&&fa(s,a.focus,a.blurScope,a.emphasisDisabled),s}function OR(t,e,r,a,n,i){var o=-1,s=e;e&&xK(e,a,n)&&(o=St(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=IR(a),s&&YCe(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),a.tooltipDisabled&&(u.tooltipDisabled=!0),ts.normal.cfg=ts.normal.conOpt=ts.emphasis.cfg=ts.emphasis.conOpt=ts.blur.cfg=ts.blur.conOpt=ts.select.cfg=ts.select.conOpt=null,ts.isLegacy=!1,JCe(u,r,a,n,l,ts),QCe(u,r,a,n,l),jR(t,u,r,a,ts,n,l),Ve(a,"info")&&(Wu(u).info=a.info);for(var c=0;c<zd.length;c++){var d=zd[c];if(d!==gd){var h=FS(a,d),v=zR(a,h,d);yK(d,u,h,v,ts)}}return qCe(u,a,n),a.type==="group"&&eke(t,u,r,a,n),o>=0?i.replaceAt(u,o):i.add(u),u}function xK(t,e,r){var a=Wu(t),n=e.type,i=e.shape,o=e.style;return r.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&nke(i)&&bK(i)!==a.customPathData||n==="image"&&Ve(o,"image")&&o.image!==a.customImagePath}function QCe(t,e,r,a,n){var i=r.clipPath;if(i===!1)t&&t.getClipPath()&&t.removeClipPath();else if(i){var o=t.getClipPath();o&&xK(o,i,a)&&(o=null),o||(o=IR(i),t.setClipPath(o)),jR(null,o,e,i,null,a,n)}}function JCe(t,e,r,a,n,i){if(!(t.isGroup||t.type==="compoundPath")){j6(r,null,i),j6(r,Yu,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=t.getTextContent();if(o===!1)c&&t.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=IR(o),t.setTextContent(c)),jR(null,c,e,o,null,a,n);for(var d=o&&o.style,h=0;h<zd.length;h++){var v=zd[h];if(v!==gd){var m=i[v].conOpt;yK(v,c,m,zR(o,m,v),null)}}d?c.dirty():c.markRedraw()}}}}function j6(t,e,r){var a=e?FS(t,e):t,n=e?zR(t,a,Yu):t.style,i=t.type,o=a?a.textConfig:null,s=t.textContent,l=s?e?FS(s,e):s:null;if(n&&(r.isLegacy||fK(n,i,!!o,!!l))){r.isLegacy=!0;var u=hK(n,i,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var d=e?r[e]:r.normal;d.cfg=o,d.conOpt=l}function FS(t,e){return e?t?t[e]:null:t}function zR(t,e,r){var a=e&&e.style;return a==null&&r===Yu&&t&&(a=t.styleEmphasis),a}function eke(t,e,r,a,n){var i=a.children,o=i?i.length:0,s=a.$mergeChildren,l=s==="byName"||a.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){rke({api:t,oldChildren:e.children()||[],newChildren:i||[],dataIndex:r,seriesModel:n,group:e});return}u&&e.removeAll();for(var c=0;c<o;c++){var d=i[c],h=e.childAt(c);d?(d.ignore==null&&(d.ignore=!1),OR(t,h,r,d,n,e)):h.ignore=!0}for(var v=e.childCount()-1;v>=c;v--){var m=e.childAt(v);tke(e,m,n)}}}function tke(t,e,r){e&&c2(e,Wu(t).option,r)}function rke(t){new nc(t.oldChildren,t.newChildren,O6,O6,t).add(z6).update(z6).remove(ake).execute()}function O6(t,e){var r=t&&t.name;return r??$Ce+e}function z6(t,e){var r=this.context,a=t!=null?r.newChildren[t]:null,n=e!=null?r.oldChildren[e]:null;OR(r.api,n,r.dataIndex,a,r.seriesModel,r.group)}function ake(t){var e=this.context,r=e.oldChildren[t];r&&c2(r,Wu(r).option,e.seriesModel)}function bK(t){return t&&(t.pathData||t.d)}function nke(t){return t&&(Ve(t,"pathData")||Ve(t,"d"))}function ike(t){t.registerChartView(XCe),t.registerSeriesModel(_Ce)}var eh=jt(),B6=et,VN=je,BR=(function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,a,n){var i=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,this._api=a,!(!n&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,e,r,a);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=c;var d=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new Qe,this.createPointerEl(s,u,e,r),this.createLabelEl(s,u,e,r),a.getZr().add(s);else{var h=wt(V6,r,d);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,r)}G6(s,r,!0),this._renderHandle(i)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var a=r.get("animation"),n=e.axis,i=n.type==="category",o=r.get("snap");if(!o&&!i)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(i&&n.getBandWidth()>s)return!0;if(o){var l=oR(e).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},t.prototype.makeElOption=function(e,r,a,n,i){},t.prototype.createPointerEl=function(e,r,a,n){var i=r.pointer;if(i){var o=eh(e).pointerEl=new $h[i.type](B6(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,a,n){if(r.label){var i=eh(e).labelEl=new Qt(B6(r.label));e.add(i),F6(i,n)}},t.prototype.updatePointerEl=function(e,r,a){var n=eh(e).pointerEl;n&&r.pointer&&(n.setStyle(r.pointer.style),a(n,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,a,n){var i=eh(e).labelEl;i&&(i.setStyle(r.label.style),a(i,{x:r.label.x,y:r.label.y}),F6(i,n))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=r.getModel("handle"),o=r.get("status");if(!i.get("show")||!o||o==="hide"){n&&a.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=qy(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){ec(u.event)},onmousedown:VN(this._onHandleDragMove,this,0,0),drift:VN(this._onHandleDragMove,this),ondragend:VN(this._onHandleDragEnd,this)}),a.add(n)),G6(n,r,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");be(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,_m(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){V6(this._axisPointerModel,!r&&this._moveAnimation,this._handle,FN(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var a=this._handle;if(a){this._dragging=!0;var n=this.updateHandleTransform(FN(a),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(FN(n)),eh(a).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),a=this._group,n=this._handle;r&&a&&(this._lastGraphicKey=null,a&&r.remove(a),n&&r.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),hy(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,a){return a=a||0,{x:e[a],y:e[1-a],width:r[a],height:r[1-a]}},t})();function V6(t,e,r,a){wK(eh(r).lastProp,a)||(eh(r).lastProp=a,e?tr(r,a,t):(r.stopAnimation(),r.attr(a)))}function wK(t,e){if(it(t)&&it(e)){var r=!0;return z(e,function(a,n){r=r&&wK(t[n],a)}),!!r}else return t===e}function F6(t,e){t[e.get(["label","show"])?"show":"hide"]()}function FN(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function G6(t,e,r){var a=e.get("z"),n=e.get("zlevel");t&&t.traverse(function(i){i.type!=="group"&&(a!=null&&(i.z=a),n!=null&&(i.zlevel=n),i.silent=r)})}function VR(t){var e=t.get("type"),r=t.getModel(e+"Style"),a;return e==="line"?(a=r.getLineStyle(),a.fill=null):e==="shadow"&&(a=r.getAreaStyle(),a.stroke=null),a}function SK(t,e,r,a,n){var i=r.get("value"),o=_K(i,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Zy(s.get("padding")||0),u=s.getFont(),c=E_(o,u),d=n.position,h=c.width+l[1]+l[3],v=c.height+l[0]+l[2],m=n.align;m==="right"&&(d[0]-=h),m==="center"&&(d[0]-=h/2);var x=n.verticalAlign;x==="bottom"&&(d[1]-=v),x==="middle"&&(d[1]-=v/2),oke(d,h,v,a);var b=s.get("backgroundColor");(!b||b==="auto")&&(b=e.get(["axisLine","lineStyle","color"])),t.label={x:d[0],y:d[1],style:Fr(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:b}),z2:10}}function oke(t,e,r,a){var n=a.getWidth(),i=a.getHeight();t[0]=Math.min(t[0]+e,n)-e,t[1]=Math.min(t[1]+r,i)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function _K(t,e,r,a,n){t=e.scale.parse(t);var i=e.scale.getLabel({value:t},{precision:n.precision}),o=n.formatter;if(o){var s={value:SS(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};z(a,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,d=u&&u.getDataParams(c);d&&s.seriesData.push(d)}),Ie(o)?i=o.replace("{value}",i):Ke(o)&&(i=o(s))}return i}function FR(t,e,r){var a=oi();return Hd(a,a,r.rotation),Zl(a,a,r.position),Ws([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],a)}function TK(t,e,r,a,n,i){var o=Ki.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=n.get(["label","margin"]),SK(e,a,n,i,{position:FR(a.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function GR(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function CK(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function H6(t,e,r,a,n,i){return{cx:t,cy:e,r0:r,r:a,startAngle:n,endAngle:i,clockwise:!0}}var ske=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,a,n,i,o){var s=n.axis,l=s.grid,u=i.get("type"),c=U6(l,s).getOtherAxis(s).getGlobalExtent(),d=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var h=VR(i),v=lke[u](s,d,c);v.style=h,r.graphicKey=v.type,r.pointer=v}var m=ES(l.getRect(),n);TK(a,r,m,n,i,o)},e.prototype.getHandleTransform=function(r,a,n){var i=ES(a.axis.grid.getRect(),a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=FR(a.axis,r,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,a,n,i){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=U6(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,d=[r.x,r.y];d[c]+=a[c],d[c]=Math.min(l[1],d[c]),d[c]=Math.max(l[0],d[c]);var h=(u[1]+u[0])/2,v=[h,h];v[c]=d[c];var m=[{verticalAlign:"middle"},{align:"center"}];return{x:d[0],y:d[1],rotation:r.rotation,cursorPoint:v,tooltipOption:m[c]}},e})(BR);function U6(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var lke={line:function(t,e,r){var a=GR([e,r[0]],[e,r[1]],$6(t));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(t,e,r){var a=Math.max(1,t.getBandWidth()),n=r[1]-r[0];return{type:"Rect",shape:CK([e-a/2,r[0]],[a,n],$6(t))}}};function $6(t){return t.dim==="x"?0:1}var uke=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:ne.color.border,width:1,type:"dashed"},shadowStyle:{color:ne.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:ne.color.neutral00,padding:[5,7,5,7],backgroundColor:ne.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:ne.color.accent40,throttle:40}},e})(Gt),Hu=jt(),cke=z;function kK(t,e,r){if(!Ut.node){var a=e.getZr();Hu(a).records||(Hu(a).records={}),dke(a,e);var n=Hu(a).records[t]||(Hu(a).records[t]={});n.handler=r}}function dke(t,e){if(Hu(t).initialized)return;Hu(t).initialized=!0,r("click",wt(W6,"click")),r("mousemove",wt(W6,"mousemove")),r("globalout",hke);function r(a,n){t.on(a,function(i){var o=vke(e);cke(Hu(t).records,function(s){s&&n(s,i,o.dispatchAction)}),fke(o.pendings,e)})}}function fke(t,e){var r=t.showTip.length,a=t.hideTip.length,n;r?n=t.showTip[r-1]:a&&(n=t.hideTip[a-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function hke(t,e,r){t.handler("leave",null,r)}function W6(t,e,r,a){e.handler(t,r,a)}function vke(t){var e={showTip:[],hideTip:[]},r=function(a){var n=e[a.type];n?n.push(a):(a.dispatchAction=r,t.dispatchAction(a))};return{dispatchAction:r,pendings:e}}function iL(t,e){if(!Ut.node){var r=e.getZr(),a=(Hu(r).records||{})[t];a&&(Hu(r).records[t]=null)}}var pke=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n){var i=a.getComponent("tooltip"),o=r.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";kK("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(r,a){iL("axisPointer",a)},e.prototype.dispose=function(r,a){iL("axisPointer",a)},e.type="axisPointer",e})(oa);function NK(t,e){var r=[],a=t.seriesIndex,n;if(a==null||!(n=e.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),o=Dh(i,t);if(o==null||o<0||be(o))return{point:[]};var s=i.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),d=c.dim,h=u.dim,v=d==="x"||d==="radius"?1:0,m=i.mapDimension(h),x=[];x[v]=i.get(m,o),x[1-v]=i.get(i.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(x)||[]}else r=l.dataToPoint(i.getValues(Se(l.dimensions,function(w){return i.mapDimension(w)}),o))||[];else if(s){var b=s.getBoundingRect().clone();b.applyTransform(s.transform),r=[b.x+b.width/2,b.y+b.height/2]}return{point:r,el:s}}var Y6=jt();function mke(t,e,r){var a=t.currTrigger,n=[t.x,t.y],i=t,o=t.dispatchAction||je(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Cw(n)&&(n=NK({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=Cw(n),u=i.axesInfo,c=s.axesInfo,d=a==="leave"||Cw(n),h={},v={},m={list:[],map:{}},x={showPointer:wt(yke,v),showTooltip:wt(xke,m)};z(s.coordSysMap,function(w,_){var T=l||w.containPoint(n);z(s.coordSysAxesInfo[_],function(C,k){var A=C.axis,M=_ke(u,C);if(!d&&T&&(!u||M)){var L=M&&M.value;L==null&&!l&&(L=A.pointToData(n)),L!=null&&X6(C,L,x,!1,h)}})});var b={};return z(c,function(w,_){var T=w.linkGroup;T&&!v[_]&&z(T.axesInfo,function(C,k){var A=v[k];if(C!==w&&A){var M=A.value;T.mapper&&(M=w.axis.scale.parse(T.mapper(M,q6(C),q6(w)))),b[w.key]=M}})}),z(b,function(w,_){X6(c[_],w,x,!0,h)}),bke(v,c,h),wke(m,n,t,o),Ske(c,o,r),h}}function X6(t,e,r,a,n){var i=t.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=gke(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&ve(n,s[0]),!a&&t.snap&&i.containData(l)&&l!=null&&(e=l),r.showPointer(t,e,s),r.showTooltip(t,o,l)}}function gke(t,e){var r=e.axis,a=r.dim,n=t,i=[],o=Number.MAX_VALUE,s=-1;return z(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(a),d,h;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(c,t,r);h=v.dataIndices,d=v.nestestValue}else{if(h=l.indicesOfNearest(a,c[0],t,r.type==="category"?.5:null),!h.length)return;d=l.getData().get(c[0],h[0])}if(!(d==null||!isFinite(d))){var m=t-d,x=Math.abs(m);x<=o&&((x<o||m>=0&&s<0)&&(o=x,s=m,n=d,i.length=0),z(h,function(b){i.push({seriesIndex:l.seriesIndex,dataIndexInside:b,dataIndex:l.getData().getRawIndex(b)})}))}}),{payloadBatch:i,snapToValue:n}}function yke(t,e,r,a){t[e.key]={value:r,payloadBatch:a}}function xke(t,e,r,a){var n=r.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var l=e.coordSys.model,u=Sy(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function bke(t,e,r){var a=r.axesInfo=[];z(e,function(n,i){var o=n.axisPointerModel.option,s=t[i];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function wke(t,e,r,a){if(Cw(e)||!t.list.length){a({type:"hideTip"});return}var n=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:t.list})}function Ske(t,e,r){var a=r.getZr(),n="axisPointerLastHighlights",i=Y6(a)[n]||{},o=Y6(a)[n]={};z(t,function(u,c){var d=u.axisPointerModel.option;d.status==="show"&&u.triggerEmphasis&&z(d.seriesDataIndices,function(h){var v=h.seriesIndex+" | "+h.dataIndex;o[v]=h})});var s=[],l=[];z(i,function(u,c){!o[c]&&l.push(u)}),z(o,function(u,c){!i[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function _ke(t,e){for(var r=0;r<(t||[]).length;r++){var a=t[r];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function q6(t){var e=t.axis.model,r={},a=r.axisDim=t.axis.dim;return r.axisIndex=r[a+"AxisIndex"]=e.componentIndex,r.axisName=r[a+"AxisName"]=e.name,r.axisId=r[a+"AxisId"]=e.id,r}function Cw(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function sx(t){Zh.registerAxisPointerClass("CartesianAxisPointer",ske),t.registerComponentModel(uke),t.registerComponentView(pke),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!be(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=T1e(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},mke)}function Tke(t){Nt(Kq),Nt(sx)}var Cke=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,a,n,i,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),d=s.dataToCoord(a),h=i.get("type");if(h&&h!=="none"){var v=VR(i),m=Nke[h](s,l,d,c);m.style=v,r.graphicKey=m.type,r.pointer=m}var x=i.get(["label","margin"]),b=kke(a,n,i,l,x);SK(r,n,i,o,b)},e})(BR);function kke(t,e,r,a,n){var i=e.axis,o=i.dataToCoord(t),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,c,d;if(i.dim==="radius"){var h=oi();Hd(h,h,s),Zl(h,h,[a.cx,a.cy]),u=Ws([o,-n],h);var v=e.getModel("axisLabel").get("rotate")||0,m=Ki.innerTextLayout(s,v*Math.PI/180,-1);c=m.textAlign,d=m.textVerticalAlign}else{var x=l[1];u=a.coordToPoint([x+n,o]);var b=a.cx,w=a.cy;c=Math.abs(u[0]-b)/x<.3?"center":u[0]>b?"left":"right",d=Math.abs(u[1]-w)/x<.3?"middle":u[1]>w?"top":"bottom"}return{position:u,align:c,verticalAlign:d}}var Nke={line:function(t,e,r,a){return t.dim==="angle"?{type:"Line",shape:GR(e.coordToPoint([a[0],r]),e.coordToPoint([a[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,a){var n=Math.max(1,t.getBandWidth()),i=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:H6(e.cx,e.cy,a[0],a[1],(-r-n/2)*i,(-r+n/2)*i)}:{type:"Sector",shape:H6(e.cx,e.cy,r-n/2,r+n/2,0,Math.PI*2)}}},Ake=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.findAxisModel=function(r){var a,n=this.ecModel;return n.eachComponent(r,function(i){i.getCoordSysModel()===this&&(a=i)},this),a},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e})(Gt),HR=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Ia).models[0]},e.type="polarAxis",e})(Gt);gn(HR,tx);var Mke=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="angleAxis",e})(HR),Dke=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="radiusAxis",e})(HR),UR=(function(t){se(e,t);function e(r,a){return t.call(this,"radius",r,a)||this}return e.prototype.pointToData=function(r,a){return this.polar.pointToData(r,a)[this.dim==="radius"?0:1]},e})(al);UR.prototype.dataToRadius=al.prototype.dataToCoord;UR.prototype.radiusToData=al.prototype.coordToData;var Lke=jt(),$R=(function(t){se(e,t);function e(r,a){return t.call(this,"angle",r,a||[0,360])||this}return e.prototype.pointToData=function(r,a){return this.polar.pointToData(r,a)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var r=this,a=r.getLabelModel(),n=r.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),c=E_(s==null?"":s+"",a.getFont(),"center","top"),d=Math.max(c.height,7),h=d/u;isNaN(h)&&(h=1/0);var v=Math.max(0,Math.floor(h)),m=Lke(r.model),x=m.lastAutoInterval,b=m.lastTickCount;return x!=null&&b!=null&&Math.abs(x-v)<=1&&Math.abs(b-o)<=1&&x>v?v=x:(m.lastTickCount=o,m.lastAutoInterval=v),v},e})(al);$R.prototype.dataToAngle=al.prototype.dataToCoord;$R.prototype.angleToData=al.prototype.coordToData;var AK=["radius","angle"],Eke=(function(){function t(e){this.dimensions=AK,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new UR,this._angleAxis=new $R,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(e){var r=this.pointToCoord(e);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},t.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},t.prototype.getAxis=function(e){var r="_"+e+"Axis";return this[r]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(e){var r=[],a=this._angleAxis,n=this._radiusAxis;return a.scale.type===e&&r.push(a),n.scale.type===e&&r.push(n),r},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(e){var r=this._angleAxis;return e===r?this._radiusAxis:r},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(e){var r=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},t.prototype.dataToPoint=function(e,r,a){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],r),this._angleAxis.dataToAngle(e[1],r)],a)},t.prototype.pointToData=function(e,r,a){a=a||[];var n=this.pointToCoord(e);return a[0]=this._radiusAxis.radiusToData(n[0],r),a[1]=this._angleAxis.angleToData(n[1],r),a},t.prototype.pointToCoord=function(e){var r=e[0]-this.cx,a=e[1]-this.cy,n=this.getAngleAxis(),i=n.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+a*a);r/=l,a/=l;for(var u=Math.atan2(-a,r)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},t.prototype.coordToPoint=function(e,r){r=r||[];var a=e[0],n=e[1]/180*Math.PI;return r[0]=Math.cos(n)*a+this.cx,r[1]=-Math.sin(n)*a+this.cy,r},t.prototype.getArea=function(){var e=this.getAngleAxis(),r=this.getRadiusAxis(),a=r.getExtent().slice();a[0]>a[1]&&a.reverse();var n=e.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,d=u*u+c*c,h=this.r,v=this.r0;return h!==v&&d-o<=h*h&&d+o>=v*v},x:this.cx-a[1],y:this.cy-a[1],width:a[1]*2,height:a[1]*2}},t.prototype.convertToPixel=function(e,r,a){var n=Z6(r);return n===this?this.dataToPoint(a):null},t.prototype.convertFromPixel=function(e,r,a){var n=Z6(r);return n===this?this.pointToData(a):null},t})();function Z6(t){var e=t.seriesModel,r=t.polarModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function Rke(t,e,r){var a=e.get("center"),n=Ln(e,r).refContainer;t.cx=Pe(a[0],n.width)+n.x,t.cy=Pe(a[1],n.height)+n.y;var i=t.getRadiusAxis(),o=Math.min(n.width,n.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:be(s)||(s=[0,s]);var l=[Pe(s[0],o),Pe(s[1],o)];i.inverse?i.setExtent(l[1],l[0]):i.setExtent(l[0],l[1])}function Pke(t,e){var r=this,a=r.getAngleAxis(),n=r.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();z(_S(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),z(_S(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),Yp(a.scale,a.model),Yp(n.scale,n.model),a.type==="category"&&!a.onBand){var i=a.getExtent(),o=360/a.scale.count();a.inverse?i[1]+=o:i[1]-=o,a.setExtent(i[0],i[1])}}function Ike(t){return t.mainType==="angleAxis"}function K6(t,e){var r;if(t.type=e.get("type"),t.scale=e2(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),Ike(e)){t.inverse=t.inverse!==e.get("clockwise");var a=e.get("startAngle"),n=(r=e.get("endAngle"))!==null&&r!==void 0?r:a+(t.inverse?-360:360);t.setExtent(a,n)}e.axis=t,t.model=e}var jke={dimensions:AK,create:function(t,e){var r=[];return t.eachComponent("polar",function(a,n){var i=new Eke(n+"");i.update=Pke;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");K6(o,l),K6(s,u),Rke(i,a,e),r.push(i),a.coordinateSystem=i,i.model=a}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var n=a.getReferringComponents("polar",Ia).models[0];a.coordinateSystem=n.coordinateSystem}}),r}},Oke=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function _1(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var a=t.coordToPoint([e[0],r]),n=t.coordToPoint([e[1],r]);return{x1:a[0],y1:a[1],x2:n[0],y2:n[1]}}function T1(t){var e=t.getRadiusAxis();return e.inverse?0:1}function Q6(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}var zke=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="PolarAxisPointer",r}return e.prototype.render=function(r,a){if(this.group.removeAll(),!!r.get("show")){var n=r.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),s=n.getTicksCoords({breakTicks:"none"}),l=n.getMinorTicksCoords(),u=Se(n.getViewLabels(),function(c){c=et(c);var d=n.scale,h=d.type==="ordinal"?d.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=n.dataToCoord(h),c});Q6(u),Q6(s),z(Oke,function(c){r.get([c,"show"])&&(!n.scale.isBlank()||c==="axisLine")&&Bke[c](this.group,r,i,s,l,o,u)},this)}},e.type="angleAxis",e})(Zh),Bke={axisLine:function(t,e,r,a,n,i){var o=e.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=T1(r),d=c?0:1,h,v=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[d]===0?h=new $h[v]({shape:{cx:r.cx,cy:r.cy,r:i[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new Wy({shape:{cx:r.cx,cy:r.cy,r:i[c],r0:i[d]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,t.add(h)},axisTick:function(t,e,r,a,n,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[T1(r)],u=Se(a,function(c){return new fn({shape:_1(r,[l,l+s],c.coord)})});t.add(ds(u,{style:nt(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,r,a,n,i){if(n.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[T1(r)],c=[],d=0;d<n.length;d++)for(var h=0;h<n[d].length;h++)c.push(new fn({shape:_1(r,[u,u+l],n[d][h].coord)}));t.add(ds(c,{style:nt(s.getModel("lineStyle").getLineStyle(),nt(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(t,e,r,a,n,i,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");z(o,function(d,h){var v=l,m=d.tickValue,x=i[T1(r)],b=r.coordToPoint([x+u,d.coord]),w=r.cx,_=r.cy,T=Math.abs(b[0]-w)/x<.3?"center":b[0]>w?"left":"right",C=Math.abs(b[1]-_)/x<.3?"middle":b[1]>_?"top":"bottom";if(s&&s[m]){var k=s[m];it(k)&&k.textStyle&&(v=new $t(k.textStyle,l,l.ecModel))}var A=new Qt({silent:Ki.isLabelSilent(e),style:Fr(v,{x:b[0],y:b[1],fill:v.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:d.formattedLabel,align:T,verticalAlign:C})});if(t.add(A),uc({el:A,componentModel:e,itemName:d.formattedLabel,formatterParamsExtra:{isTruncated:function(){return A.isTruncated},value:d.rawLabel,tickIndex:h}}),c){var M=Ki.makeAxisEventDataBase(e);M.targetType="axisLabel",M.value=d.rawLabel,dt(A).eventData=M}},this)},splitLine:function(t,e,r,a,n,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],d=0;d<a.length;d++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new fn({shape:_1(r,i,a[d].coord)}))}for(var d=0;d<c.length;d++)t.add(ds(c[d],{style:nt({stroke:l[d%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(t,e,r,a,n,i){if(n.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<n.length;u++)for(var c=0;c<n[u].length;c++)l.push(new fn({shape:_1(r,i,n[u][c].coord)}));t.add(ds(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(t,e,r,a,n,i){if(a.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],d=Math.PI/180,h=-a[0].coord*d,v=Math.min(i[0],i[1]),m=Math.max(i[0],i[1]),x=e.get("clockwise"),b=1,w=a.length;b<=w;b++){var _=b===w?a[0].coord:a[b].coord,T=u++%l.length;c[T]=c[T]||[],c[T].push(new Ii({shape:{cx:r.cx,cy:r.cy,r0:v,r:m,startAngle:h,endAngle:-_*d,clockwise:x},silent:!0})),h=-_*d}for(var b=0;b<c.length;b++)t.add(ds(c[b],{style:nt({fill:l[b%l.length]},s.getAreaStyle()),silent:!0}))}}},Vke=["splitLine","splitArea","minorSplitLine"],Fke=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="PolarAxisPointer",r}return e.prototype.render=function(r,a,n){if(this.group.removeAll(),!!r.get("show")){var i=this._axisGroup,o=this._axisGroup=new Qe;this.group.add(o);var s=r.axis,l=s.polar,u=l.getAngleAxis(),c=s.getTicksCoords(),d=s.getMinorTicksCoords(),h=u.getExtent()[0],v=s.getExtent(),m=Hke(l,r,h),x=new Ki(r,n,m);x.build(),o.add(x.group),Xy(i,o,r),z(Vke,function(b){r.get([b,"show"])&&!s.scale.isBlank()&&Gke[b](this.group,r,l,h,v,c,d)},this)}},e.type="radiusAxis",e})(Zh),Gke={splitLine:function(t,e,r,a,n,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=r.getAngleAxis(),d=Math.PI/180,h=c.getExtent(),v=Math.abs(h[1]-h[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var m=[],x=0;x<i.length;x++){var b=u++%l.length;m[b]=m[b]||[],m[b].push(new $h[v]({shape:{cx:r.cx,cy:r.cy,r:Math.max(i[x].coord,0),startAngle:-h[0]*d,endAngle:-h[1]*d,clockwise:c.inverse}}))}for(var x=0;x<m.length;x++)t.add(ds(m[x],{style:nt({stroke:l[x%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(t,e,r,a,n,i,o){if(o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var d=0;d<o[c].length;d++)u.push(new lc({shape:{cx:r.cx,cy:r.cy,r:o[c][d].coord}}));t.add(ds(u,{style:nt({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(t,e,r,a,n,i){if(i.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],d=i[0].coord,h=1;h<i.length;h++){var v=u++%l.length;c[v]=c[v]||[],c[v].push(new Ii({shape:{cx:r.cx,cy:r.cy,r0:d,r:i[h].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),d=i[h].coord}for(var h=0;h<c.length;h++)t.add(ds(c[h],{style:nt({fill:l[h%l.length]},s.getAreaStyle()),silent:!0}))}}};function Hke(t,e,r){return{position:[t.cx,t.cy],rotation:r/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function MK(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function DK(t,e){return e.dim+t.model.componentIndex}function Uke(t,e,r){var a={},n=$ke(mr(e.getSeriesByType(t),function(i){return!e.isSeriesFiltered(i)&&i.coordinateSystem&&i.coordinateSystem.type==="polar"}));e.eachSeriesByType(t,function(i){if(i.coordinateSystem.type==="polar"){var o=i.getData(),s=i.coordinateSystem,l=s.getBaseAxis(),u=DK(s,l),c=MK(i),d=n[u][c],h=d.offset,v=d.width,m=s.getOtherAxis(l),x=i.coordinateSystem.cx,b=i.coordinateSystem.cy,w=i.get("barMinHeight")||0,_=i.get("barMinAngle")||0;a[c]=a[c]||[];for(var T=o.mapDimension(m.dim),C=o.mapDimension(l.dim),k=Pd(o,T),A=l.dim!=="radius"||!i.get("roundCap",!0),M=m.model,L=M.get("startValue"),R=m.dataToCoord(L||0),P=0,j=o.count();P<j;P++){var V=o.get(T,P),I=o.get(C,P),F=V>=0?"p":"n",G=R;k&&(a[c][I]||(a[c][I]={p:R,n:R}),G=a[c][I][F]);var O=void 0,U=void 0,$=void 0,K=void 0;if(m.dim==="radius"){var q=m.dataToCoord(V)-R,H=l.dataToCoord(I);Math.abs(q)<w&&(q=(q<0?-1:1)*w),O=G,U=G+q,$=H-h,K=$-v,k&&(a[c][I][F]=U)}else{var Z=m.dataToCoord(V,A)-R,te=l.dataToCoord(I);Math.abs(Z)<_&&(Z=(Z<0?-1:1)*_),O=te+h,U=O+v,$=G,K=G+Z,k&&(a[c][I][F]=K)}o.setItemLayout(P,{cx:x,cy:b,r0:O,r:U,startAngle:-$*Math.PI/180,endAngle:-K*Math.PI/180,clockwise:$>=K})}}})}function $ke(t){var e={};z(t,function(a,n){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=DK(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),d=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=d.stacks;e[l]=d;var v=MK(a);h[v]||d.autoWidthCount++,h[v]=h[v]||{width:0,maxWidth:0};var m=Pe(a.get("barWidth"),c),x=Pe(a.get("barMaxWidth"),c),b=a.get("barGap"),w=a.get("barCategoryGap");m&&!h[v].width&&(m=Math.min(d.remainedWidth,m),h[v].width=m,d.remainedWidth-=m),x&&(h[v].maxWidth=x),b!=null&&(d.gap=b),w!=null&&(d.categoryGap=w)});var r={};return z(e,function(a,n){r[n]={};var i=a.stacks,o=a.bandWidth,s=Pe(a.categoryGap,o),l=Pe(a.gap,1),u=a.remainedWidth,c=a.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),z(i,function(x,b){var w=x.maxWidth;w&&w<d&&(w=Math.min(w,u),x.width&&(w=Math.min(w,x.width)),u-=w,x.width=w,c--)}),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var h=0,v;z(i,function(x,b){x.width||(x.width=d),v=x,h+=x.width*(1+l)}),v&&(h-=v.width*l);var m=-h/2;z(i,function(x,b){r[n][b]=r[n][b]||{offset:m,width:x.width},m+=x.width*(1+l)})}),r}var Wke={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},Yke={splitNumber:5},Xke=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="polar",e})(oa);function qke(t){Nt(sx),Zh.registerAxisPointerClass("PolarAxisPointer",Cke),t.registerCoordinateSystem("polar",jke),t.registerComponentModel(Ake),t.registerComponentView(Xke),Zp(t,"angle",Mke,Wke),Zp(t,"radius",Dke,Yke),t.registerComponentView(zke),t.registerComponentView(Fke),t.registerLayout(wt(Uke,"bar"))}function oL(t,e){e=e||{};var r=t.coordinateSystem,a=t.axis,n={},i=a.position,o=a.orient,s=r.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};n.position=[o==="vertical"?u.vertical[i]:l[0],o==="horizontal"?u.horizontal[i]:l[3]];var c={horizontal:0,vertical:1};n.rotation=Math.PI/2*c[o];var d={top:-1,bottom:1,right:1,left:-1};n.labelDirection=n.tickDirection=n.nameDirection=d[i],t.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),yi(e.labelInside,t.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var h=t.get(["axisLabel","rotate"]);return n.labelRotate=i==="top"?-h:h,n.z2=1,n}var Zke=["splitArea","splitLine","breakArea"],Kke=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="SingleAxisPointer",r}return e.prototype.render=function(r,a,n,i){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new Qe;var l=oL(r),u=new Ki(r,n,l);u.build(),o.add(this._axisGroup),o.add(u.group),z(Zke,function(c){r.get([c,"show"])&&Qke[c](this,this.group,this._axisGroup,r,n)},this),Xy(s,this._axisGroup,r),t.prototype.render.call(this,r,a,n,i)},e.prototype.remove=function(){Xq(this)},e.type="singleAxis",e})(Zh),Qke={splitLine:function(t,e,r,a,n){var i=a.axis;if(!i.scale.isBlank()){var o=a.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color");l=l instanceof Array?l:[l];for(var u=s.get("width"),c=a.coordinateSystem.getRect(),d=i.isHorizontal(),h=[],v=0,m=i.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),x=[],b=[],w=0;w<m.length;++w){var _=i.toGlobalCoord(m[w].coord);d?(x[0]=_,x[1]=c.y,b[0]=_,b[1]=c.y+c.height):(x[0]=c.x,x[1]=_,b[0]=c.x+c.width,b[1]=_);var T=new fn({shape:{x1:x[0],y1:x[1],x2:b[0],y2:b[1]},silent:!0});Hp(T.shape,u);var C=v++%l.length;h[C]=h[C]||[],h[C].push(T)}for(var k=s.getLineStyle(["color"]),w=0;w<h.length;++w)e.add(ds(h[w],{style:nt({stroke:l[w%l.length]},k),silent:!0}))}},splitArea:function(t,e,r,a,n){Yq(t,r,a,a)},breakArea:function(t,e,r,a,n){var i=ox(),o=a.axis.scale;i&&o.type!=="ordinal"&&i.rectCoordBuildBreakAxis(e,t,a,a.coordinateSystem.getRect(),n)}},kw=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}},jitter:0,jitterOverlap:!0,jitterMargin:2},e})(Gt);gn(kw,tx.prototype);var Jke=(function(t){se(e,t);function e(r,a,n,i,o){var s=t.call(this,r,a,n)||this;return s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.pointToData=function(r,a){return this.coordinateSystem.pointToData(r)[0]},e})(al),LK=["single"],eNe=(function(){function t(e,r,a){this.type="single",this.dimension="single",this.dimensions=LK,this.axisPointerEnabled=!0,this.model=e,this._init(e,r,a)}return t.prototype._init=function(e,r,a){var n=this.dimension,i=new Jke(n,e2(e),[0,0],e.get("type"),e.get("position")),o=i.type==="category";i.onBand=o&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},t.prototype.update=function(e,r){e.eachSeries(function(a){if(a.coordinateSystem===this){var n=a.getData();z(n.mapDimensionsAll(this.dimension),function(i){this._axis.scale.unionExtentFromData(n,i)},this),Yp(this._axis.scale,this._axis.model)}},this)},t.prototype.resize=function(e,r){var a=Ln(e,r).refContainer;this._rect=ha(e.getBoxLayoutParams(),a),this._adjustAxis()},t.prototype.getRect=function(){return this._rect},t.prototype._adjustAxis=function(){var e=this._rect,r=this._axis,a=r.isHorizontal(),n=a?[0,e.width]:[0,e.height],i=r.inverse?1:0;r.setExtent(n[i],n[1-i]),this._updateAxisTransform(r,a?e.x:e.y)},t.prototype._updateAxisTransform=function(e,r){var a=e.getExtent(),n=a[0]+a[1],i=e.isHorizontal();e.toGlobalCoord=i?function(o){return o+r}:function(o){return n-o+r},e.toLocalCoord=i?function(o){return o-r}:function(o){return n-o+r}},t.prototype.getAxis=function(){return this._axis},t.prototype.getBaseAxis=function(){return this._axis},t.prototype.getAxes=function(){return[this._axis]},t.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},t.prototype.containPoint=function(e){var r=this.getRect(),a=this.getAxis(),n=a.orient;return n==="horizontal"?a.contain(a.toLocalCoord(e[0]))&&e[1]>=r.y&&e[1]<=r.y+r.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=r.y&&e[0]<=r.y+r.height},t.prototype.pointToData=function(e,r,a){a=a||[];var n=this.getAxis();return a[0]=n.coordToData(n.toLocalCoord(e[n.orient==="horizontal"?0:1])),a},t.prototype.dataToPoint=function(e,r,a){var n=this.getAxis(),i=this.getRect();a=a||[];var o=n.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),a[o]=n.toGlobalCoord(n.dataToCoord(+e)),a[1-o]=o===0?i.y+i.height/2:i.x+i.width/2,a},t.prototype.convertToPixel=function(e,r,a){var n=J6(r);return n===this?this.dataToPoint(a):null},t.prototype.convertFromPixel=function(e,r,a){var n=J6(r);return n===this?this.pointToData(a):null},t})();function J6(t){var e=t.seriesModel,r=t.singleAxisModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function tNe(t,e){var r=[];return t.eachComponent("singleAxis",function(a,n){var i=new eNe(a,t,e);i.name="single_"+n,i.resize(a,e),a.coordinateSystem=i,r.push(i)}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var n=a.getReferringComponents("singleAxis",Ia).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),r}var rNe={create:tNe,dimensions:LK},e9=["x","y"],aNe=["width","height"],nNe=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,a,n,i,o){var s=n.axis,l=s.coordinateSystem,u=GN(l,1-GS(s)),c=l.dataToPoint(a)[0],d=i.get("type");if(d&&d!=="none"){var h=VR(i),v=iNe[d](s,c,u);v.style=h,r.graphicKey=v.type,r.pointer=v}var m=oL(n);TK(a,r,m,n,i,o)},e.prototype.getHandleTransform=function(r,a,n){var i=oL(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=FR(a.axis,r,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,a,n,i){var o=n.axis,s=o.coordinateSystem,l=GS(o),u=GN(s,l),c=[r.x,r.y];c[l]+=a[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var d=GN(s,1-l),h=(d[1]+d[0])/2,v=[h,h];return v[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},e})(BR),iNe={line:function(t,e,r){var a=GR([e,r[0]],[e,r[1]],GS(t));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(t,e,r){var a=t.getBandWidth(),n=r[1]-r[0];return{type:"Rect",shape:CK([e-a/2,r[0]],[a,n],GS(t))}}};function GS(t){return t.isHorizontal()?0:1}function GN(t,e){var r=t.getRect();return[r[e9[e]],r[e9[e]]+r[aNe[e]]]}var oNe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="single",e})(oa);function sNe(t){Nt(sx),Zh.registerAxisPointerClass("SingleAxisPointer",nNe),t.registerComponentView(oNe),t.registerComponentView(Kke),t.registerComponentModel(kw),Zp(t,"single",kw,kw.defaultOption),t.registerCoordinateSystem("single",rNe)}var lNe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,a,n){var i=Wh(r);t.prototype.init.apply(this,arguments),t9(r,i)},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),t9(this.option,r)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:ne.color.axisLine,width:1,type:"solid"}},itemStyle:{color:ne.color.neutral00,borderWidth:1,borderColor:ne.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:ne.size.s,color:ne.color.secondary},monthLabel:{show:!0,position:"start",margin:ne.size.s,align:"center",formatter:null,color:ne.color.secondary},yearLabel:{show:!0,position:null,margin:ne.size.xl,formatter:null,color:ne.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e})(Gt);function t9(t,e){var r=t.cellSize,a;be(r)?a=r:a=t.cellSize=[r,r],a.length===1&&(a[1]=a[0]);var n=Se([0,1],function(i){return Wpe(e,i)&&(a[i]="auto"),a[i]!=null&&a[i]!=="auto"});Jl(t,e,{type:"box",ignoreSize:n})}var uNe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n){var i=this.group;i.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(r,s,i),this._renderLines(r,s,l,i),this._renderYearText(r,s,l,i),this._renderMonthText(r,u,l,i),this._renderWeekText(r,u,s,l,i)},e.prototype._renderDayRect=function(r,a,n){for(var i=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=a.start.time;u<=a.end.time;u=i.getNextNDay(u,1).time){var c=i.dataToCalendarLayout([u],!1).tl,d=new Et({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});n.add(d)}},e.prototype._renderLines=function(r,a,n,i){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var d=a.start,h=0;d.time<=a.end.time;h++){m(d.formatedDate),h===0&&(d=s.getDateInfo(a.start.y+"-"+a.start.m));var v=d.date;v.setMonth(v.getMonth()+1),d=s.getDateInfo(v)}m(s.getNextNDay(a.end.time,1).formatedDate);function m(x){o._firstDayOfMonth.push(s.getDateInfo(x)),o._firstDayPoints.push(s.dataToCalendarLayout([x],!1).tl);var b=o._getLinePointsOfOneWeek(r,x,n);o._tlpoints.push(b[0]),o._blpoints.push(b[b.length-1]),u&&o._drawSplitline(b,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,n),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,n),l,i)},e.prototype._getEdgesPoints=function(r,a,n){var i=[r[0].slice(),r[r.length-1].slice()],o=n==="horizontal"?0:1;return i[0][o]=i[0][o]-a/2,i[1][o]=i[1][o]+a/2,i},e.prototype._drawSplitline=function(r,a,n){var i=new xi({z2:20,shape:{points:r},style:a});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(r,a,n){for(var i=r.coordinateSystem,o=i.getDateInfo(a),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),c=i.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[n==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(r,a){return Ie(r)&&r?Vpe(r,a):Ke(r)?r(a):a.nameMap},e.prototype._yearTextPositionControl=function(r,a,n,i,o){var s=a[0],l=a[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(i==="left"||i==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(r,a,n,i){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=n!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,d=(u[0][1]+u[1][1])/2,h=n==="horizontal"?0:1,v={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],d],right:[u[h][0],d]},m=a.start.y;+a.end.y>+a.start.y&&(m=m+"-"+a.end.y);var x=o.get("formatter"),b={start:a.start.y,end:a.end.y,nameMap:m},w=this._formatterLabel(x,b),_=new Qt({z2:30,style:Fr(o,{text:w}),silent:o.get("silent")});_.attr(this._yearTextPositionControl(_,v[l],n,l,s)),i.add(_)}},e.prototype._monthTextPositionControl=function(r,a,n,i,o){var s="left",l="top",u=r[0],c=r[1];return n==="horizontal"?(c=c+o,a&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),i==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(r,a,n,i){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),d=[this._tlpoints,this._blpoints];(!s||Ie(s))&&(s&&(a=tD(s)||a),s=a.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,v=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var m=c==="center",x=o.get("silent"),b=0;b<d[h].length-1;b++){var w=d[h][b].slice(),_=this._firstDayOfMonth[b];if(m){var T=this._firstDayPoints[b];w[v]=(T[v]+d[0][b+1][v])/2}var C=o.get("formatter"),k=s[+_.m-1],A={yyyy:_.y,yy:(_.y+"").slice(2),MM:_.m,M:+_.m,nameMap:k},M=this._formatterLabel(C,A),L=new Qt({z2:30,style:ve(Fr(o,{text:M}),this._monthTextPositionControl(w,m,n,u,l)),silent:x});i.add(L)}}},e.prototype._weekTextPositionControl=function(r,a,n,i,o){var s="center",l="middle",u=r[0],c=r[1],d=n==="start";return a==="horizontal"?(u=u+i+(d?1:-1)*o[0]/2,s=d?"right":"left"):(c=c+i+(d?1:-1)*o[1]/2,l=d?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(r,a,n,i,o){var s=r.getModel("dayLabel");if(s.get("show")){var l=r.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),d=s.get("margin"),h=l.getFirstDayOfWeek();if(!c||Ie(c)){c&&(a=tD(c)||a);var v=a.get(["time","dayOfWeekShort"]);c=v||Se(a.get(["time","dayOfWeekAbbr"]),function(A){return A[0]})}var m=l.getNextNDay(n.end.time,7-n.lweek).time,x=[l.getCellWidth(),l.getCellHeight()];d=Pe(d,Math.min(x[1],x[0])),u==="start"&&(m=l.getNextNDay(n.start.time,-(7+n.fweek)).time,d=-d);for(var b=s.get("silent"),w=0;w<7;w++){var _=l.getNextNDay(m,w),T=l.dataToCalendarLayout([_.time],!1).center,C=w;C=Math.abs((w+h)%7);var k=new Qt({z2:30,style:ve(Fr(s,{text:c[C]}),this._weekTextPositionControl(T,i,u,d,x)),silent:b});o.add(k)}}},e.type="calendar",e})(oa),HN=864e5,cNe=(function(){function t(e,r,a){this.type="calendar",this.dimensions=t.dimensions,this.getDimensionsInfo=t.getDimensionsInfo,this._model=e,this._update(r,a)}return t.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},t.prototype.getRangeInfo=function(){return this._rangeInfo},t.prototype.getModel=function(){return this._model},t.prototype.getRect=function(){return this._rect},t.prototype.getCellWidth=function(){return this._sw},t.prototype.getCellHeight=function(){return this._sh},t.prototype.getOrient=function(){return this._orient},t.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},t.prototype.getDateInfo=function(e){e=Uh(e);var r=e.getFullYear(),a=e.getMonth()+1,n=a<10?"0"+a:""+a,i=e.getDate(),o=i<10?"0"+i:""+i,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:r+"",m:n,d:o,day:s,time:e.getTime(),formatedDate:r+"-"+n+"-"+o,date:e}},t.prototype.getNextNDay=function(e,r){return r=r||0,r===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+r),this.getDateInfo(e))},t.prototype._update=function(e,r){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var a=this._rangeInfo.weeks||1,n=["width","height"],i=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[a,7]:[7,a];z([0,1],function(d){c(i,d)&&(o[n[d]]=i[d]*s[d])});var l={width:r.getWidth(),height:r.getHeight()},u=this._rect=ha(o,l);z([0,1],function(d){c(i,d)||(i[d]=u[n[d]]/s[d])});function c(d,h){return d[h]!=null&&d[h]!=="auto"}this._sw=i[0],this._sh=i[1]},t.prototype.dataToPoint=function(e,r,a){a=a||[],be(e)&&(e=e[0]),r==null&&(r=!0);var n=this.getDateInfo(e),i=this._rangeInfo,o=n.formatedDate;if(r&&!(n.time>=i.start.time&&n.time<i.end.time+HN))return a[0]=a[1]=NaN,a;var s=n.day,l=this._getRangeInfo([i.start.time,o]).nthWeek;return this._orient==="vertical"?(a[0]=this._rect.x+s*this._sw+this._sw/2,a[1]=this._rect.y+l*this._sh+this._sh/2):(a[0]=this._rect.x+l*this._sw+this._sw/2,a[1]=this._rect.y+s*this._sh+this._sh/2),a},t.prototype.pointToData=function(e){var r=this.pointToDate(e);return r&&r.time},t.prototype.dataToLayout=function(e,r,a){a=a||{};var n=a.rect=a.rect||{},i=a.contentRect=a.contentRect||{},o=this.dataToPoint(e,r);return n.x=o[0]-this._sw/2,n.y=o[1]-this._sh/2,n.width=this._sw,n.height=this._sh,ot.copy(i,n),Rh(i,this._lineWidth/2,!0,!0),a},t.prototype.dataToCalendarLayout=function(e,r){var a=this.dataToPoint(e,r);return{center:a,tl:[a[0]-this._sw/2,a[1]-this._sh/2],tr:[a[0]+this._sw/2,a[1]-this._sh/2],br:[a[0]+this._sw/2,a[1]+this._sh/2],bl:[a[0]-this._sw/2,a[1]+this._sh/2]}},t.prototype.pointToDate=function(e){var r=Math.floor((e[0]-this._rect.x)/this._sw)+1,a=Math.floor((e[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(a,r-1,n):this._getDateByWeeksAndDay(r,a-1,n)},t.prototype.convertToPixel=function(e,r,a){var n=UN(r);return n===this?n.dataToPoint(a):null},t.prototype.convertToLayout=function(e,r,a){var n=UN(r);return n===this?n.dataToLayout(a):null},t.prototype.convertFromPixel=function(e,r,a){var n=UN(r);return n===this?n.pointToData(a):null},t.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},t.prototype._initRangeOption=function(){var e=this._model.get("range"),r;if(be(e)&&e.length===1&&(e=e[0]),be(e))r=e;else{var a=e.toString();if(/^\d{4}$/.test(a)&&(r=[a+"-01-01",a+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(a)){var n=this.getDateInfo(a),i=n.date;i.setMonth(i.getMonth()+1);var o=this.getNextNDay(i,-1);r=[n.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(a)&&(r=[a,a])}if(!r)return e;var s=this._getRangeInfo(r);return s.start.time>s.end.time&&r.reverse(),r},t.prototype._getRangeInfo=function(e){var r=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],a;r[0].time>r[1].time&&(a=!0,r.reverse());var n=Math.floor(r[1].time/HN)-Math.floor(r[0].time/HN)+1,i=new Date(r[0].time),o=i.getDate(),s=r[1].date.getDate();i.setDate(o+n-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-r[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-r[1].time)*u>0;)n-=u,i.setDate(l-u);var c=Math.floor((n+r[0].day+6)/7),d=a?-c+1:c-1;return a&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:n,weeks:c,nthWeek:d,fweek:r[0].day,lweek:r[1].day}},t.prototype._getDateByWeeksAndDay=function(e,r,a){var n=this._getRangeInfo(a);if(e>n.weeks||e===0&&r<n.fweek||e===n.weeks&&r>n.lweek)return null;var i=(e-1)*7-n.fweek+r,o=new Date(n.start.time);return o.setDate(+n.start.d+i),this.getDateInfo(o)},t.create=function(e,r){var a=[];return e.eachComponent("calendar",function(n){var i=new t(n,e,r);a.push(i),n.coordinateSystem=i}),e.eachComponent(function(n,i){Qy({targetModel:i,coordSysType:"calendar",coordSysProvider:eY})}),a},t.dimensions=["time","value"],t})();function UN(t){var e=t.calendarModel,r=t.seriesModel,a=e?e.coordinateSystem:r?r.coordinateSystem:null;return a}function dNe(t){t.registerComponentModel(lNe),t.registerComponentView(uNe),t.registerCoordinateSystem("calendar",cNe)}var Vu={level:1,leaf:2,nonLeaf:3},Xu={none:0,all:1,body:2,corner:3};function sL(t,e,r){var a=e[gt[r]].getCell(t);return!a&&qt(t)&&t<0&&(a=e[gt[1-r]].getUnitLayoutInfo(r,Math.round(t))),a}function EK(t){var e=t||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function RK(t,e,r,a,n){r9(t[0],e,n,r,a,0),r9(t[1],e,n,r,a,1)}function r9(t,e,r,a,n,i){t[0]=1/0,t[1]=-1/0;var o=a[i],s=be(o)?o:[o],l=s.length,u=!!r;if(l>=1?(a9(t,e,s,u,n,i,0),l>1&&a9(t,e,s,u,n,i,l-1)):t[0]=t[1]=NaN,u){var c=-n[gt[1-i]].getLocatorCount(i),d=n[gt[i]].getLocatorCount(i)-1;r===Xu.body?c=Ja(0,c):r===Xu.corner&&(d=jo(-1,d)),d<c&&(c=d=NaN),Ei(t[0])&&(t[0]=c),Ei(t[1])&&(t[1]=d),t[0]=Ja(jo(t[0],d),c),t[1]=Ja(jo(t[1],d),c)}}function a9(t,e,r,a,n,i,o){var s=sL(r[o],n,i);if(!s){t[0]=t[1]=NaN;return}var l=s.id[gt[i]],u=l,c=pNe(s);c&&(u+=c.span[gt[i]]-1),t[0]=jo(t[0],l,u),t[1]=Ja(t[1],l,u)}function C1(t,e){return Ei(t[e][0])||Ei(t[e][1])}function n9(t,e,r,a){e=e||fNe;for(var n=0;n<a;n++)e[n]=!1;for(;;){for(var i=!1,n=0;n<a;n++){var o=r[n];!e[n]&&o.cellMergeOwner&&hNe(t,o.locatorRange)&&(e[n]=!0,i=!0)}if(!i)break}}var fNe=[];function hNe(t,e){return!i9(t[0],e[0])||!i9(t[1],e[1])?!1:(t[0][0]=jo(t[0][0],e[0][0]),t[0][1]=Ja(t[0][1],e[0][1]),t[1][0]=jo(t[1][0],e[1][0]),t[1][1]=Ja(t[1][1],e[1][1]),!0)}function i9(t,e){return t[1]>=e[0]&&t[0]<=e[1]}function o9(t,e){t.id.set(e[0][0],e[1][0]),t.span.set(e[0][1]-t.id.x+1,e[1][1]-t.id.y+1)}function vNe(t,e){t[0][0]=e[0][0],t[0][1]=e[0][1],t[1][0]=e[1][0],t[1][1]=e[1][1]}function s9(t,e,r,a){var n=sL(e[a][0],r,a),i=sL(e[a][1],r,a);t[gt[a]]=t[vn[a]]=NaN,n&&i&&(t[gt[a]]=n.xy,t[vn[a]]=i.xy+i.wh-n.xy)}function Kg(t,e,r,a){return t[gt[e]]=r,t[gt[1-e]]=a,t}function pNe(t){return t&&(t.type===Vu.leaf||t.type===Vu.nonLeaf)?t:null}function HS(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var l9=(function(){function t(e,r){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=r,this._uniqueValueGen=mNe(e);var a=r.get("data",!0);a!=null&&!be(a)&&(a=[]),a?this._initByDimModelData(a):this._initBySeriesData()}return t.prototype._initByDimModelData=function(e){var r=this,a=r._cells,n=r._levels,i=[],o=0;r._leavesCount=s(e,0,0),l();return;function s(u,c,d){var h=0;return u&&z(u,function(v,m){var x;Ie(v)?x={value:v}:it(v)?(x=v,v.value!=null&&!Ie(v.value)&&(x={value:null})):x={value:null};var b={type:Vu.nonLeaf,ordinal:NaN,level:d,firstLeafLocator:c,id:new at,span:Kg(new at,r.dimIdx,1,1),option:x,xy:NaN,wh:NaN,dim:r,rect:HS()};o++,(i[c]||(i[c]=[])).push(b),n[d]||(n[d]={type:Vu.level,xy:NaN,wh:NaN,option:null,id:new at,dim:r});var w=s(x.children,c,d+1),_=Math.max(1,w);b.span[gt[r.dimIdx]]=_,h+=_,c+=_}),h}function l(){for(var u=[];a.length<o;)for(var c=0;c<i.length;c++){var d=i[c].pop();if(d){d.ordinal=u.length;var h=d.option.value;u.push(h),a.push(d),r._uniqueValueGen.calcDupBase(h)}}r._uniqueValueGen.ensureValueUnique(u,a);var v=r._ordinalMeta=new gy({categories:u,needCollect:!1,deduplication:!1});r._scale=new Wp({ordinalMeta:v});for(var m=0;m<r._leavesCount;m++){var x=r._cells[m];x.type=Vu.leaf,x.span[gt[1-r.dimIdx]]=r._levels.length-x.level}r._initCellsId(),r._initLevelIdOptions()}},t.prototype._initBySeriesData=function(){var e=this;e._leavesCount=0,e._levels=[{type:Vu.level,xy:NaN,wh:NaN,option:null,id:new at,dim:e}],e._initLevelIdOptions();var r=e._ordinalMeta=new gy({needCollect:!0,deduplication:!0,onCollect:function(a,n){var i=e._cells[n]={type:Vu.leaf,ordinal:n,level:0,firstLeafLocator:n,id:new at,span:Kg(new at,e.dimIdx,1,1),option:{value:a+""},xy:NaN,wh:NaN,dim:e,rect:HS()};e._leavesCount++,e._setCellId(i)}});e._scale=new Wp({ordinalMeta:r})},t.prototype._setCellId=function(e){var r=this._levels.length,a=this.dimIdx;Kg(e.id,a,e.firstLeafLocator,e.level-r)},t.prototype._initCellsId=function(){var e=this._levels.length,r=this.dimIdx;z(this._cells,function(a){Kg(a.id,r,a.firstLeafLocator,a.level-e)})},t.prototype._initLevelIdOptions=function(){var e=this._levels.length,r=this.dimIdx,a=this._model.get("levels",!0);a=be(a)?a:[],z(this._levels,function(n,i){Kg(n.id,r,0,i-e),n.option=a[i]})},t.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},t.prototype.resetLayoutIterator=function(e,r,a,n){if(e=e||new kd,r===this.dimIdx){var i=this._leavesCount,o=a!=null?Math.max(0,a):0;n=n!=null?Math.min(n,i):i,e.reset(this._cells,o,o+n)}else{var i=this._levels.length,o=a!=null?Math.max(0,a+i):0;n=n!=null?Math.min(n,i):i,e.reset(this._levels,o,o+n)}return e},t.prototype.resetCellIterator=function(e){return(e||new kd).reset(this._cells,0)},t.prototype.resetLevelIterator=function(e){return(e||new kd).reset(this._levels,0)},t.prototype.getLayout=function(e,r,a){var n=this.getUnitLayoutInfo(r,a);e[gt[r]]=n?n.xy:NaN,e[vn[r]]=n?n.wh:NaN},t.prototype.getUnitLayoutInfo=function(e,r){return e===this.dimIdx?r<this._leavesCount?this._cells[r]:void 0:this._levels[r+this._levels.length]},t.prototype.getCell=function(e){var r=this._scale.parse(e);return Ei(r)?void 0:this._cells[r]},t.prototype.getLocatorCount=function(e){return e===this.dimIdx?this._leavesCount:this._levels.length},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t})();function mNe(t){var e=t.toUpperCase(),r=new RegExp("^"+e+"([0-9]+)$"),a=0;function n(s){var l;s!=null&&(l=s.match(r))&&(a=Ja(a,+l[1]+1))}function i(){return""+e+a++}function o(s,l){for(var u=He(),c=0;c<s.length;c++){var d=s[c];(d==null||u.get(d)!=null)&&(s[c]=d=i(),l[c].option=nt({value:d},l[c].option)),u.set(d,!0)}}return{calcDupBase:n,ensureValueUnique:o}}var u9=(function(){function t(e,r,a){this._model=r,this._dims=a,this._kind=e,this._cellMergeOwnerList=[]}return t.prototype._ensureCellMap=function(){var e=this,r=e._cellMap;return r||(r=e._cellMap=He(),a()),r;function a(){var i=[],o=e._model.getShallow("data");o&&!be(o)&&(o=null),z(o,function(m,x){if(!(!it(m)||!be(m.coord))){var b=EK([]),w=null;if(RK(b,w,m.coord,e._dims,m.coordClamp?Xu[e._kind]:Xu.none),!(C1(b,0)||C1(b,1))){var _=m&&m.mergeCells,T={id:new at,span:new at,locatorRange:b,option:m,cellMergeOwner:_};o9(T,b),i.push(T)}}});for(var s=[],l=0;l<i.length;l++){var u=i[l];if(u.cellMergeOwner){var c=u.locatorRange;n9(c,s,i,l);for(var d=0;d<l;d++)s[d]&&(i[d].cellMergeOwner=!1);if(c[0][0]!==u.id.x||c[1][0]!==u.id.y){u.cellMergeOwner=!1;var h=ve({},u.option);h.coord=null;var v={id:new at,span:new at,locatorRange:c,option:h,cellMergeOwner:!0};o9(v,c),i.push(v)}}}z(i,function(m){var x=n(m.id.x,m.id.y);if(m.cellMergeOwner&&(x.cellMergeOwner=!0,x.span=m.span,x.locatorRange=m.locatorRange,x.spanRect=HS(),e._cellMergeOwnerList.push(x)),!(!m.cellMergeOwner&&!m.option))for(var b=0;b<m.span.y;b++)for(var w=0;w<m.span.x;w++){var _=n(m.id.x+w,m.id.y+b);_.option=m.option,m.cellMergeOwner&&(_.inSpanOf=x)}})}function n(i,o){var s=c9(i,o),l=r.get(s);return l||(l=r.set(s,{id:new at(i,o),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),l}},t.prototype.getCell=function(e){return this._ensureCellMap().get(c9(e[0],e[1]))},t.prototype.travelExistingCells=function(e){this._ensureCellMap().each(e)},t.prototype.expandRangeByCellMerge=function(e){if(!C1(e,0)&&!C1(e,1)&&e[0][0]===e[0][1]&&e[1][0]===e[1][1]){$N[0]=e[0][0],$N[1]=e[1][0];var r=this.getCell($N),a=r&&r.inSpanOf;if(a){vNe(e,a.locatorRange);return}}var n=this._cellMergeOwnerList;n9(e,null,n,n.length)},t})(),$N=[];function c9(t,e){return t+"|"+e}var WR={show:!0,color:ne.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function YR(t){return{color:"none",borderWidth:1,borderColor:t?"none":ne.color.borderTint}}var d9={show:!0,label:WR,itemStyle:YR(!1),silent:void 0,dividerLineStyle:{width:1,color:ne.color.border}},gNe={label:WR,itemStyle:YR(!1),silent:void 0},yNe={label:WR,itemStyle:YR(!0),silent:void 0},xNe={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:d9,y:d9,body:gNe,corner:yNe,backgroundStyle:{color:"none",borderColor:ne.color.axisLine,borderWidth:1}},bNe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){var r=this._dimModels={x:new f9(this.get("x",!0)||{}),y:new f9(this.get("y",!0)||{})};r.x.option.type=r.y.option.type="category";var a=r.x.dim=new l9("x",r.x),n=r.y.dim=new l9("y",r.y),i={x:a,y:n};this._body=new u9("body",new $t(this.getShallow("body")),i),this._corner=new u9("corner",new $t(this.getShallow("corner")),i)},e.prototype.getDimensionModel=function(r){return this._dimModels[r]},e.prototype.getBody=function(){return this._body},e.prototype.getCorner=function(){return this._corner},e.type="matrix",e.layoutMode="box",e.defaultOption=xNe,e})(Gt),f9=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},e})($t),k1=Math.round,wNe=0,SNe=99,_Ne={normal:25,special:100},TNe={normal:50,special:125},CNe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a){this.group.removeAll();var n=this.group,i=r.coordinateSystem,o=i.getRect(),s=r.getDimensionModel("x"),l=r.getDimensionModel("y"),u=s.dim,c=l.dim;kNe(n,r,a),NNe(n,r,u,c,a);var d=r.getShallow("borderZ2",!0),h=$e(d,SNe),v=h-1,m=r.getModel("backgroundStyle").getItemStyle(["borderWidth"]);m.lineWidth=0;var x=r.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);x.fill="none";var b=lL(o.clone(),m,wNe),w=lL(o.clone(),x,h);b.silent=!0,w.silent=!0,n.add(b),n.add(w);var _=u.getUnitLayoutInfo(0,0),T=c.getUnitLayoutInfo(1,0);_&&T&&(u.shouldShow()&&n.add(h9({x1:o.x,y1:T.xy,x2:o.x+o.width,y2:T.xy},s.getModel("dividerLineStyle").getLineStyle(),v)),c.shouldShow()&&n.add(h9({x1:_.xy,y1:o.y,x2:_.xy,y2:o.y+o.height},l.getModel("dividerLineStyle").getLineStyle(),v)))},e.type="matrix",e})(oa);function kNe(t,e,r){a(0),a(1);function a(n){var i=e.getDimensionModel(gt[n]),o=i.dim;if(o.shouldShow())for(var s=i.getModel("itemStyle"),l=i.getModel("label"),u=e.getShallow("tooltip",!0),c=[],d=o.resetCellIterator();d.next();){var h=d.item,v={};ot.copy(v,h.rect),YE(c,h.id.x,h.id.y),PK(c,e,t,r,h.option,s,l,i,v,h.option.value,TNe,u)}}}function NNe(t,e,r,a,n){i("body",e.getBody(),r,a),r.shouldShow()&&a.shouldShow()&&i("corner",e.getCorner(),a,r);function i(o,s,l,u){var c=new $t(e.getShallow(o,!0)),d=c.getModel("itemStyle"),h=c.getModel("label"),v=new kd,m=new kd,x=[],b=e.getShallow("tooltip",!0);for(u.resetLayoutIterator(m,1);m.next();)for(l.resetLayoutIterator(v,0);v.next();){var w=v.item,_=m.item;YE(x,w.id.x,_.id.y);var T=s.getCell(x);if(!(T&&T.inSpanOf&&T.inSpanOf!==T)){var C={};T&&T.span?ot.copy(C,T.spanRect):(w.dim.getLayout(C,0,x[0]),_.dim.getLayout(C,1,x[1]));var k=T?T.option:null;PK(x,e,t,n,k,d,h,c,C,k?k.value:null,_Ne,b)}}}}function PK(t,e,r,a,n,i,o,s,l,u,c,d){var h;N1.option=n?n.itemStyle:null,N1.parentModel=i,Xv.option=n,Xv.parentModel=s;var v=$e(Xv.getShallow("z2"),n&&n.itemStyle?c.special:c.normal),m=d&&d.show,x=lL(l,N1.getItemStyle(),v);r.add(x);var b=Xv.get("cursor");b!=null&&x.attr("cursor",b);var w;if(u!=null){var _=u+"";if(qv.option=n?n.label:null,qv.parentModel=o,qv.ecModel=a,qn(x,{normal:qv},{defaultText:_,autoOverflowArea:!0,layoutRect:et(x.shape)}),w=x.getTextContent(),w){w.z2=v+1;var T=w.style;if(T&&T.overflow&&T.overflow!=="none"&&T.lineOverflow){var C={};ot.copy(C,l),Rh(C,(((h=x.style)===null||h===void 0?void 0:h.lineWidth)||0)/2,!0,!0),x.updateInnerText(),w.getLocalTransform(A1),Zs(A1,A1),ot.applyTransform(C,C,A1),w.setClipPath(new Et({shape:C}))}}uc({el:x,componentModel:e,itemName:_,itemTooltipOption:d,formatterParamsExtra:{xyLocator:t.slice()}})}if(w){var k=qv.get("silent");k==null&&(k=!m),w.silent=k,w.ignoreHostSilent=!0}var A=Xv.get("silent");A==null&&(A=!x.style||x.style.fill==="none"||!x.style.fill),x.silent=A,nk(Xv),nk(N1),nk(qv)}var Xv=new $t,N1=new $t,qv=new $t,A1=[];function lL(t,e,r){var a=e.lineWidth;if(a){var n=t.x+t.width,i=t.y+t.height;t.x=Ro(t.x,a,!0),t.y=Ro(t.y,a,!0),t.width=Ro(n,a,!0)-t.x,t.height=Ro(i,a,!0)-t.y}return new Et({shape:t,style:e,z2:r})}function h9(t,e,r){var a=e.lineWidth;return a&&(k1(t.x1*2)===k1(t.x2*2)&&(t.x1=t.x2=Ro(t.x1,a,!0)),k1(t.y1*2)===k1(t.y2*2)&&(t.y1=t.y2=Ro(t.y1,a,!0))),new fn({shape:t,style:e,silent:!0,z2:r})}var ANe=(function(){function t(e,r,a){this.dimensions=t.dimensions,this.type="matrix",this._model=e;var n=this._dimModels={x:e.getDimensionModel("x"),y:e.getDimensionModel("y")};this._dims={x:n.x.dim,y:n.y.dim},this._resize(e,a)}return t.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},t.create=function(e,r){var a=[];return e.eachComponent("matrix",function(n){var i=new t(n,e,r);a.push(i),n.coordinateSystem=i}),e.eachComponent(function(n,i){Qy({targetModel:i,coordSysType:"matrix",coordSysProvider:eY})}),a},t.prototype.getRect=function(){return this._rect},t.prototype._resize=function(e,r){var a=this._dims,n=this._dimModels,i=this._rect=ha(e.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()});v9(n,a,i,0),v9(n,a,i,1),p9(0,a),p9(1,a),m9(this._model.getBody(),a),m9(this._model.getCorner(),a)},t.prototype.dataToPoint=function(e,r,a){return a=a||[],this.dataToLayout(e,r,Qg),a[0]=Qg.rect.x+Qg.rect.width/2,a[1]=Qg.rect.y+Qg.rect.height/2,a},t.prototype.dataToLayout=function(e,r,a){var n=this._dims;a=a||{};var i=a.rect=a.rect||{};i.x=i.y=i.width=i.height=NaN;var o=a.matrixXYLocatorRange=EK(a.matrixXYLocatorRange);return be(e)&&(RK(o,null,e,n,$e(r&&r.clamp,Xu.none)),(!r||!r.ignoreMergeCells)&&((!r||r.clamp!==Xu.corner)&&this._model.getBody().expandRangeByCellMerge(o),(!r||r.clamp!==Xu.body)&&this._model.getCorner().expandRangeByCellMerge(o)),s9(i,o,n,0),s9(i,o,n,1)),a},t.prototype.pointToData=function(e,r,a){var n=this._dims;return g9(Tl,0,n,e,r&&r.clamp),g9(Tl,1,n,e,r&&r.clamp),a=a||[],a[0]=a[1]=NaN,Tl.y===mi.inCorner&&Tl.x===mi.inBody?y9(Tl,a,0,n):Tl.x===mi.inCorner&&Tl.y===mi.inBody?y9(Tl,a,1,n):(x9(Tl,a,0,n),x9(Tl,a,1,n)),a},t.prototype.convertToPixel=function(e,r,a,n){var i=YN(r);return i===this?i.dataToPoint(a,n):void 0},t.prototype.convertToLayout=function(e,r,a,n){var i=YN(r);return i===this?i.dataToLayout(a,n):void 0},t.prototype.convertFromPixel=function(e,r,a,n){var i=YN(r);return i===this?i.pointToData(a,n):void 0},t.prototype.containPoint=function(e){return this._rect.contain(e[0],e[1])},t.dimensions=["x","y","value"],t})(),Qg={rect:HS()},M1=new kd,WN=new kd;function v9(t,e,r,a){for(var n=1-a,i=e[gt[a]],o=e[gt[n]],s=o.shouldShow(),l=i.resetCellIterator();l.next();)l.item.wh=l.item.xy=NaN;for(var u=o.resetLayoutIterator(null,a);u.next();)u.item.wh=u.item.xy=NaN;for(var c=r[vn[a]],d=i.getLocatorCount(a)+o.getLocatorCount(a),h=new $t,v=o.resetLevelIterator();v.next();)h.option=v.item.option,h.parentModel=t[gt[n]],b(v.item,s?h.get("levelSize"):0);for(var m=new $t,x=i.resetCellIterator();x.next();)x.item.type===Vu.leaf&&(m.option=x.item.option,m.parentModel=void 0,b(x.item,m.get("size")));function b(M,L){var R=MNe(L,a,r);Ei(R)||(M.wh=uL(R,c),c=uL(c-M.wh),d--)}var w=d?c/d:0,_=!d&&c>=1,T=r[gt[a]],C=i.getLocatorCount(a)-1,k=new kd;for(o.resetLayoutIterator(k,a);k.next();)A(k.item);for(i.resetLayoutIterator(k,a);k.next();)A(k.item);function A(M){Ei(M.wh)&&(M.wh=w),M.xy=T,M.id[gt[a]]===C&&!_&&(M.wh=r[gt[a]]+r[vn[a]]-M.xy),T+=M.wh}}function p9(t,e){for(var r=e[gt[t]].resetCellIterator();r.next();){var a=r.item;US(a.rect,t,a.id,a.span,e),US(a.rect,1-t,a.id,a.span,e),a.type===Vu.nonLeaf&&(a.xy=a.rect[gt[t]],a.wh=a.rect[vn[t]])}}function m9(t,e){t.travelExistingCells(function(r){var a=r.span;if(a){var n=r.spanRect,i=r.id;US(n,0,i,a,e),US(n,1,i,a,e)}})}function US(t,e,r,a,n){t[vn[e]]=0;var i=r[gt[e]],o=i<0?n[gt[1-e]]:n[gt[e]],s=o.getUnitLayoutInfo(e,r[gt[e]]);if(t[gt[e]]=s.xy,t[vn[e]]=s.wh,a[gt[e]]>1){var l=o.getUnitLayoutInfo(e,r[gt[e]]+a[gt[e]]-1);t[vn[e]]=l.xy+l.wh-s.xy}}function MNe(t,e,r){var a=iS(t,r[vn[e]]);return uL(a,r[vn[e]])}function uL(t,e){return Math.max(Math.min(t,$e(e,1/0)),0)}function YN(t){var e=t.matrixModel,r=t.seriesModel,a=e?e.coordinateSystem:r?r.coordinateSystem:null;return a}var mi={inBody:1,inCorner:2,outside:3},Tl={x:null,y:null,point:[]};function g9(t,e,r,a,n){var i=r[gt[e]],o=r[gt[1-e]],s=i.getUnitLayoutInfo(e,i.getLocatorCount(e)-1),l=i.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),c=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,d=t.point[e]=a[e];if(!l&&!c){t[gt[e]]=mi.outside;return}if(n===Xu.body){l?(t[gt[e]]=mi.inBody,d=jo(s.xy+s.wh,Ja(l.xy,d)),t.point[e]=d):t[gt[e]]=mi.outside;return}else if(n===Xu.corner){c?(t[gt[e]]=mi.inCorner,d=jo(c.xy+c.wh,Ja(u.xy,d)),t.point[e]=d):t[gt[e]]=mi.outside;return}var h=l?l.xy:c?c.xy+c.wh:NaN,v=u?u.xy:h,m=s?s.xy+s.wh:h;if(d<v){if(!n){t[gt[e]]=mi.outside;return}d=v}else if(d>m){if(!n){t[gt[e]]=mi.outside;return}d=m}t.point[e]=d,t[gt[e]]=h<=d&&d<=m?mi.inBody:v<=d&&d<=h?mi.inCorner:mi.outside}function y9(t,e,r,a){var n=1-r;if(t[gt[r]]!==mi.outside)for(a[gt[r]].resetCellIterator(WN);WN.next();){var i=WN.item;if(b9(t.point[r],i.rect,r)&&b9(t.point[n],i.rect,n)){e[r]=i.ordinal,e[n]=i.id[gt[n]];return}}}function x9(t,e,r,a){if(t[gt[r]]!==mi.outside){var n=t[gt[r]]===mi.inCorner?a[gt[1-r]]:a[gt[r]];for(n.resetLayoutIterator(M1,r);M1.next();)if(DNe(t.point[r],M1.item)){e[r]=M1.item.id[gt[r]];return}}}function DNe(t,e){return e.xy<=t&&t<=e.xy+e.wh}function b9(t,e,r){return e[gt[r]]<=t&&t<=e[gt[r]]+e[vn[r]]}function LNe(t){t.registerComponentModel(bNe),t.registerComponentView(CNe),t.registerCoordinateSystem("matrix",ANe)}function ENe(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function w9(t,e){var r;return z(e,function(a){t[a]!=null&&t[a]!=="auto"&&(r=!0)}),r}function RNe(t,e,r){var a=ve({},r),n=t[e],i=r.$action||"merge";i==="merge"?n?(Ct(n,a,!0),Jl(n,a,{ignoreSize:!0}),iY(r,n),D1(r,n),D1(r,n,"shape"),D1(r,n,"style"),D1(r,n,"extra"),r.clipPath=n.clipPath):t[e]=a:i==="replace"?t[e]=a:i==="remove"&&n&&(t[e]=null)}var IK=["transition","enterFrom","leaveTo"],PNe=IK.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function D1(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var a=r?IK:PNe,n=0;n<a.length;n++){var i=a[n];t[i]==null&&e[i]!=null&&(t[i]=e[i])}}function INe(t,e){if(t&&(t.hv=e.hv=[w9(e,["left","right"]),w9(e,["top","bottom"])],t.type==="group")){var r=t,a=e;r.width==null&&(r.width=a.width=0),r.height==null&&(r.height=a.height=0)}}var jNe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.mergeOption=function(r,a){var n=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,r,a),this.option.elements=n},e.prototype.optionUpdated=function(r,a){var n=this.option,i=(a?n:r).elements,o=n.elements=a?[]:n.elements,s=[];this._flatten(i,s,null);var l=Y$(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];z(l,function(c,d){var h=c.newOption;h&&(u.push(h),ENe(c,h),RNe(o,d,h),INe(o[d],h))},this),n.elements=mr(o,function(c){return c&&delete c.$action,c!=null})},e.prototype._flatten=function(r,a,n){z(r,function(i){if(i){n&&(i.parentOption=n),a.push(i);var o=i.children;o&&o.length&&this._flatten(o,a,i),delete i.children}},this)},e.prototype.useElOptionsToUpdate=function(){var r=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,r},e.type="graphic",e.defaultOption={elements:[]},e})(Gt),S9={path:null,compoundPath:null,group:Qe,image:li,text:Qt},ss=jt(),ONe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this._elMap=He()},e.prototype.render=function(r,a,n){r!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=r,this._updateElements(r),this._relocate(r,n)},e.prototype._updateElements=function(r){var a=r.useElOptionsToUpdate();if(a){var n=this._elMap,i=this.group,o=r.get("z"),s=r.get("zlevel");z(a,function(l){var u=An(l.id,null),c=u!=null?n.get(u):null,d=An(l.parentId,null),h=d!=null?n.get(d):i,v=l.type,m=l.style;v==="text"&&m&&l.hv&&l.hv[1]&&(m.textVerticalAlign=m.textBaseline=m.verticalAlign=m.align=null);var x=l.textContent,b=l.textConfig;if(m&&fK(m,v,!!b,!!x)){var w=hK(m,v,!0);!b&&w.textConfig&&(b=l.textConfig=w.textConfig),!x&&w.textContent&&(x=w.textContent)}var _=zNe(l),T=l.$action||"merge",C=T==="merge",k=T==="replace";if(C){var A=!c,M=c;A?M=_9(u,h,l.type,n):(M&&(ss(M).isNew=!1),gK(M)),M&&(Tw(M,_,r,{isInit:A}),T9(M,l,o,s))}else if(k){Nw(c,l,n,r);var L=_9(u,h,l.type,n);L&&(Tw(L,_,r,{isInit:!0}),T9(L,l,o,s))}else T==="remove"&&(pK(c,l),Nw(c,l,n,r));var R=n.get(u);if(R&&x)if(C){var P=R.getTextContent();P?P.attr(x):R.setTextContent(new Qt(x))}else k&&R.setTextContent(new Qt(x));if(R){var j=l.clipPath;if(j){var V=j.type,I=void 0,A=!1;if(C){var F=R.getClipPath();A=!F||ss(F).type!==V,I=A?cL(V):F}else k&&(A=!0,I=cL(V));R.setClipPath(I),Tw(I,j,r,{isInit:A}),VS(I,j.keyframeAnimation,r)}var G=ss(R);R.setTextConfig(b),G.option=l,BNe(R,r,l),uc({el:R,componentModel:r,itemName:R.name,itemTooltipOption:l.tooltip}),VS(R,l.keyframeAnimation,r)}})}},e.prototype._relocate=function(r,a){for(var n=r.option.elements,i=this.group,o=this._elMap,s=a.getWidth(),l=a.getHeight(),u=["x","y"],c=0;c<n.length;c++){var d=n[c],h=An(d.id,null),v=h!=null?o.get(h):null;if(!(!v||!v.isGroup)){var m=v.parent,x=m===i,b=ss(v),w=ss(m);b.width=Pe(b.option.width,x?s:w.width)||0,b.height=Pe(b.option.height,x?l:w.height)||0}}for(var c=n.length-1;c>=0;c--){var d=n[c],h=An(d.id,null),v=h!=null?o.get(h):null;if(v){var m=v.parent,w=ss(m),_=m===i?{width:s,height:l}:{width:w.width,height:w.height},T={},C=q_(v,d,_,null,{hv:d.hv,boundingMode:d.bounding},T);if(!ss(v).isNew&&C){for(var k=d.transition,A={},M=0;M<u.length;M++){var L=u[M],R=T[L];k&&(Ch(k)||St(k,L)>=0)?A[L]=R:v[L]=R}tr(v,A,r,0)}else v.attr(T)}}},e.prototype._clear=function(){var r=this,a=this._elMap;a.each(function(n){Nw(n,ss(n).option,a,r._lastGraphicModel)}),this._elMap=He()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e})(oa);function cL(t){var e=Ve(S9,t)?S9[t]:cS(t),r=new e({});return ss(r).type=t,r}function _9(t,e,r,a){var n=cL(r);return e.add(n),a.set(t,n),ss(n).id=t,ss(n).isNew=!0,n}function Nw(t,e,r,a){var n=t&&t.parent;n&&(t.type==="group"&&t.traverse(function(i){Nw(i,e,r,a)}),c2(t,e,a),r.removeKey(ss(t).id))}function T9(t,e,r,a){t.isGroup||z([["cursor",xs.prototype.cursor],["zlevel",a||0],["z",r||0],["z2",0]],function(n){var i=n[0];Ve(e,i)?t[i]=$e(e[i],n[1]):t[i]==null&&(t[i]=n[1])}),z(Wt(e),function(n){if(n.indexOf("on")===0){var i=e[n];t[n]=Ke(i)?i:null}}),Ve(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function zNe(t){return t=ve({},t),z(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(tY),function(e){delete t[e]}),t}function BNe(t,e,r){var a=dt(t).eventData;!t.silent&&!t.ignore&&!a&&(a=dt(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),a&&(a.info=r.info)}function VNe(t){t.registerComponentModel(jNe),t.registerComponentView(ONe),t.registerPreprocessor(function(e){var r=e.graphic;be(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}var C9=["x","y","radius","angle","single"],FNe=["cartesian2d","polar","singleAxis"];function GNe(t){var e=t.get("coordinateSystem");return St(FNe,e)>=0}function yd(t){return t+"Axis"}function HNe(t,e){var r=He(),a=[],n=He();t.eachComponent({mainType:"dataZoom",query:e},function(c){n.get(c.uid)||s(c)});var i;do i=!1,t.eachComponent("dataZoom",o);while(i);function o(c){!n.get(c.uid)&&l(c)&&(s(c),i=!0)}function s(c){n.set(c.uid,!0),a.push(c),u(c)}function l(c){var d=!1;return c.eachTargetAxis(function(h,v){var m=r.get(h);m&&m[v]&&(d=!0)}),d}function u(c){c.eachTargetAxis(function(d,h){(r.get(d)||r.set(d,[]))[h]=!0})}return a}function jK(t){var e=t.ecModel,r={infoList:[],infoMap:He()};return t.eachTargetAxis(function(a,n){var i=e.getComponent(yd(a),n);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(i)}}}),r}var XN=(function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},t})(),Ay=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return e.prototype.init=function(r,a,n){var i=k9(r);this.settledOption=i,this.mergeDefaultAndTheme(r,n),this._doInit(i)},e.prototype.mergeOption=function(r){var a=k9(r);Ct(this.option,r,!0),Ct(this.settledOption,a,!0),this._doInit(a)},e.prototype._doInit=function(r){var a=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var n=this.settledOption;z([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(a[i[0]]=n[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var r=this.get("orient",!0),a=this._targetAxisInfoMap=He(),n=this._fillSpecifiedTargetAxis(a);n?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(r){var a=!1;return z(C9,function(n){var i=this.getReferringComponents(yd(n),whe);if(i.specified){a=!0;var o=new XN;z(i.models,function(s){o.add(s.componentIndex)}),r.set(n,o)}},this),a},e.prototype._fillAutoTargetAxisByOrient=function(r,a){var n=this.ecModel,i=!0;if(i){var o=a==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=n.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===a}});l(s,"single")}function l(u,c){var d=u[0];if(d){var h=new XN;if(h.add(d.componentIndex),r.set(c,h),i=!1,c==="x"||c==="y"){var v=d.getReferringComponents("grid",Ia).models[0];v&&z(u,function(m){d.componentIndex!==m.componentIndex&&v===m.getReferringComponents("grid",Ia).models[0]&&h.add(m.componentIndex)})}}}i&&z(C9,function(u){if(i){var c=n.findComponents({mainType:yd(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var d=new XN;d.add(c[0].componentIndex),r.set(u,d),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(a){!r&&(r=a)},this),r==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(r){var a=this._rangePropMode,n=this.get("rangeMode");z([["start","startValue"],["end","endValue"]],function(i,o){var s=r[i[0]]!=null,l=r[i[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":n?a[o]=n[o]:s&&(a[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(a,n){r==null&&(r=this.ecModel.getComponent(yd(a),n))},this),r},e.prototype.eachTargetAxis=function(r,a){this._targetAxisInfoMap.each(function(n,i){z(n.indexList,function(o){r.call(a,i,o)})})},e.prototype.getAxisProxy=function(r,a){var n=this.getAxisModel(r,a);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(r,a){var n=this._targetAxisInfoMap.get(r);if(n&&n.indexMap[a])return this.ecModel.getComponent(yd(r),a)},e.prototype.setRawRange=function(r){var a=this.option,n=this.settledOption;z([["start","startValue"],["end","endValue"]],function(i){(r[i[0]]!=null||r[i[1]]!=null)&&(a[i[0]]=n[i[0]]=r[i[0]],a[i[1]]=n[i[1]]=r[i[1]])},this),this._updateRangeUse(r)},e.prototype.setCalculatedRange=function(r){var a=this.option;z(["start","startValue","end","endValue"],function(n){a[n]=r[n]})},e.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},e.prototype.getValueRange=function(r,a){if(r==null&&a==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(r,a).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var a,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var o=n[i],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;a||(a=u)}return a},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e})(Gt);function k9(t){var e={};return z(["start","end","startValue","endValue","throttle"],function(r){t.hasOwnProperty(r)&&(e[r]=t[r])}),e}var UNe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.select",e})(Ay),XR=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n,i){this.dataZoomModel=r,this.ecModel=a,this.api=n},e.type="dataZoom",e})(oa),$Ne=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.select",e})(XR),ip=z,N9=ps,WNe=(function(){function t(e,r,a,n){this._dimName=e,this._axisIndex=r,this.ecModel=n,this._dataZoomModel=a}return t.prototype.hostedBy=function(e){return this._dataZoomModel===e},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(r){if(GNe(r)){var a=yd(this._dimName),n=r.getReferringComponents(a,Ia).models[0];n&&this._axisIndex===n.componentIndex&&e.push(r)}},this),e},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return et(this._minMaxSpan)},t.prototype.calculateDataWindow=function(e){var r=this._dataExtent,a=this.getAxisModel(),n=a.axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;ip(["start","end"],function(h,v){var m=e[h],x=e[h+"Value"];i[v]==="percent"?(m==null&&(m=o[v]),x=n.parse(pr(m,o,r))):(u=!0,x=x==null?r[v]:n.parse(x),m=pr(x,r,o)),l[v]=x==null||isNaN(x)?r[v]:x,s[v]=m==null||isNaN(m)?o[v]:m}),N9(l),N9(s);var c=this._minMaxSpan;u?d(l,s,r,o,!1):d(s,l,o,r,!0);function d(h,v,m,x,b){var w=b?"Span":"ValueSpan";jd(0,h,m,"all",c["min"+w],c["max"+w]);for(var _=0;_<2;_++)v[_]=pr(h[_],m,x,!0),b&&(v[_]=n.parse(v[_]))}return{valueWindow:l,percentWindow:s}},t.prototype.reset=function(e){if(e===this._dataZoomModel){var r=this.getTargetSeriesModels();this._dataExtent=YNe(this,this._dimName,r),this._updateMinMaxSpan();var a=this.calculateDataWindow(e.settledOption);this._valueWindow=a.valueWindow,this._percentWindow=a.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(e,r){if(e!==this._dataZoomModel)return;var a=this._dimName,n=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;if(i==="none")return;ip(n,function(l){var u=l.getData(),c=u.mapDimensionsAll(a);if(c.length){if(i==="weakFilter"){var d=u.getStore(),h=Se(c,function(v){return u.getDimensionIndex(v)},u);u.filterSelf(function(v){for(var m,x,b,w=0;w<c.length;w++){var _=d.get(h[w],v),T=!isNaN(_),C=_<o[0],k=_>o[1];if(T&&!C&&!k)return!0;T&&(b=!0),C&&(m=!0),k&&(x=!0)}return b&&m&&x})}else ip(c,function(v){if(i==="empty")l.setData(u=u.map(v,function(x){return s(x)?x:NaN}));else{var m={};m[v]=o,u.selectRange(m)}});ip(c,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},t.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},r=this._dataZoomModel,a=this._dataExtent;ip(["min","max"],function(n){var i=r.get(n+"Span"),o=r.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=pr(a[0]+o,a,[0,100],!0):i!=null&&(o=pr(i,[0,100],a,!0)-a[0]),e[n+"Span"]=i,e[n+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var e=this.getAxisModel(),r=this._percentWindow,a=this._valueWindow;if(r){var n=z$(a,[0,500]);n=Math.min(n,20);var i=e.axis.scale.rawExtentInfo;r[0]!==0&&i.setDeterminedMinMax("min",+a[0].toFixed(n)),r[1]!==100&&i.setDeterminedMinMax("max",+a[1].toFixed(n)),i.freeze()}},t})();function YNe(t,e,r){var a=[1/0,-1/0];ip(r,function(o){Cye(a,o.getData(),e)});var n=t.getAxisModel(),i=IX(n.axis.scale,n,a).calculate();return[i.min,i.max]}var XNe={getTargetSeries:function(t){function e(n){t.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=t.getComponent(yd(o),s);n(o,s,l,i)})})}e(function(n,i,o,s){o.__dzAxisProxy=null});var r=[];e(function(n,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new WNe(n,i,s,t),r.push(o.__dzAxisProxy))});var a=He();return z(r,function(n){z(n.getTargetSeriesModels(),function(i){a.set(i.uid,i)})}),a},overallReset:function(t,e){t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(a,n){r.getAxisProxy(a,n).reset(r)}),r.eachTargetAxis(function(a,n){r.getAxisProxy(a,n).filterData(r,e)})}),t.eachComponent("dataZoom",function(r){var a=r.findRepresentativeAxisProxy();if(a){var n=a.getDataPercentWindow(),i=a.getDataValueWindow();r.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};function qNe(t){t.registerAction("dataZoom",function(e,r){var a=HNe(r,e);z(a,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var A9=!1;function qR(t){A9||(A9=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,XNe),qNe(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function ZNe(t){t.registerComponentModel(UNe),t.registerComponentView($Ne),qR(t)}var us=(function(){function t(){}return t})(),OK={};function op(t,e){OK[t]=e}function zK(t){return OK[t]}var KNe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;z(this.option.feature,function(a,n){var i=zK(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(r)),Ct(a,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:ne.color.border,borderRadius:0,borderWidth:0,padding:ne.size.m,itemSize:15,itemGap:ne.size.s,showTitle:!0,iconStyle:{borderColor:ne.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:ne.color.accent50}},tooltip:{show:!1,position:"bottom"}},e})(Gt);function BK(t,e){var r=Zy(e.get("padding")),a=e.getItemStyle(["color","opacity"]);a.fill=e.get("backgroundColor");var n=new Et({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:a,silent:!0,z2:-1});return n}var QNe=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,a,n,i){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},c=this._features||(this._features={}),d=[];z(u,function(_,T){d.push(T)}),new nc(this._featureNames||[],d).add(h).update(h).remove(wt(h,null)).execute(),this._featureNames=d;function h(_,T){var C=d[_],k=d[T],A=u[C],M=new $t(A,r,r.ecModel),L;if(i&&i.newTitle!=null&&i.featureName===C&&(A.title=i.newTitle),C&&!k){if(JNe(C))L={onclick:M.option.onclick,featureName:C};else{var R=zK(C);if(!R)return;L=new R}c[C]=L}else if(L=c[k],!L)return;L.uid=wm("toolbox-feature"),L.model=M,L.ecModel=a,L.api=n;var P=L instanceof us;if(!C&&k){P&&L.dispose&&L.dispose(a,n);return}if(!M.get("show")||P&&L.unusable){P&&L.remove&&L.remove(a,n);return}v(M,L,C),M.setIconStatus=function(j,V){var I=this.option,F=this.iconPaths;I.iconStatus=I.iconStatus||{},I.iconStatus[j]=V,F[j]&&(V==="emphasis"?rc:ac)(F[j])},L instanceof us&&L.render&&L.render(M,a,n,i)}function v(_,T,C){var k=_.getModel("iconStyle"),A=_.getModel(["emphasis","iconStyle"]),M=T instanceof us&&T.getIcons?T.getIcons():_.get("icon"),L=_.get("title")||{},R,P;Ie(M)?(R={},R[C]=M):R=M,Ie(L)?(P={},P[C]=L):P=L;var j=_.iconPaths={};z(R,function(V,I){var F=qy(V,{},{x:-s/2,y:-s/2,width:s,height:s});F.setStyle(k.getItemStyle());var G=F.ensureState("emphasis");G.style=A.getItemStyle();var O=new Qt({style:{text:P[I],align:A.get("textAlign"),borderRadius:A.get("textBorderRadius"),padding:A.get("textPadding"),fill:null,font:p5({fontStyle:A.get("textFontStyle"),fontFamily:A.get("textFontFamily"),fontSize:A.get("textFontSize"),fontWeight:A.get("textFontWeight")},a)},ignore:!0});F.setTextContent(O),uc({el:F,componentModel:r,itemName:I,formatterParamsExtra:{title:P[I]}}),F.__title=P[I],F.on("mouseover",function(){var U=A.getItemStyle(),$=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";O.setStyle({fill:A.get("textFill")||U.fill||U.stroke||ne.color.neutral99,backgroundColor:A.get("textBackgroundColor")}),F.setTextConfig({position:A.get("textPosition")||$}),O.ignore=!r.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){_.get(["iconStatus",I])!=="emphasis"&&n.leaveEmphasis(this),O.hide()}),(_.get(["iconStatus",I])==="emphasis"?rc:ac)(F),o.add(F),F.on("click",je(T.onclick,T,a,n,I)),j[I]=F})}var m=Ln(r,n).refContainer,x=r.getBoxLayoutParams(),b=r.get("padding"),w=ha(x,m,b);_h(r.get("orient"),o,r.get("itemGap"),w.width,w.height),q_(o,x,m,b),o.add(BK(o.getBoundingRect(),r)),l||o.eachChild(function(_){var T=_.__title,C=_.ensureState("emphasis"),k=C.textConfig||(C.textConfig={}),A=_.getTextContent(),M=A&&A.ensureState("emphasis");if(M&&!Ke(M)&&T){var L=M.style||(M.style={}),R=E_(T,Qt.makeFont(L)),P=_.x+o.x,j=_.y+o.y+s,V=!1;j+R.height>n.getHeight()&&(k.position="top",V=!0);var I=V?-5-R.height:s+10;P+R.width/2>n.getWidth()?(k.position=["100%",I],L.align="right"):P-R.width/2<0&&(k.position=[0,I],L.align="left")}})},e.prototype.updateView=function(r,a,n,i){z(this._features,function(o){o instanceof us&&o.updateView&&o.updateView(o.model,a,n,i)})},e.prototype.remove=function(r,a){z(this._features,function(n){n instanceof us&&n.remove&&n.remove(r,a)}),this.group.removeAll()},e.prototype.dispose=function(r,a){z(this._features,function(n){n instanceof us&&n.dispose&&n.dispose(r,a)})},e.type="toolbox",e})(oa);function JNe(t){return t.indexOf("my")===0}var eAe=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,a){var n=this.model,i=n.get("name")||r.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||r.get("backgroundColor")||ne.color.neutral00,connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=Ut.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=i+"."+s,c.target="_blank",c.href=l;var d=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(d)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),v=h[0].indexOf("base64")>-1,m=o?decodeURIComponent(h[1]):h[1];v&&(m=window.atob(m));var x=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var b=m.length,w=new Uint8Array(b);b--;)w[b]=m.charCodeAt(b);var _=new Blob([w]);window.navigator.msSaveOrOpenBlob(_,x)}else{var T=document.createElement("iframe");document.body.appendChild(T);var C=T.contentWindow,k=C.document;k.open("image/svg+xml","replace"),k.write(m),k.close(),C.focus(),k.execCommand("SaveAs",!0,x),document.body.removeChild(T)}}else{var A=n.get("lang"),M='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(A&&A[0]||"")+'" /></body>',L=window.open();L.document.write(M),L.document.title=i}},e.getDefaultOption=function(r){var a={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:ne.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},e})(us),M9="__ec_magicType_stack__",tAe=[["line","bar"],["stack"]],rAe=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getIcons=function(){var r=this.model,a=r.get("icon"),n={};return z(r.get("type"),function(i){a[i]&&(n[i]=a[i])}),n},e.getDefaultOption=function(r){var a={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},e.prototype.onclick=function(r,a,n){var i=this.model,o=i.get(["seriesIndex",n]);if(D9[n]){var s={series:[]},l=function(d){var h=d.subType,v=d.id,m=D9[n](h,v,d,i);m&&(nt(m,d.option),s.series.push(m));var x=d.coordinateSystem;if(x&&x.type==="cartesian2d"&&(n==="line"||n==="bar")){var b=x.getAxesByScale("ordinal")[0];if(b){var w=b.dim,_=w+"Axis",T=d.getReferringComponents(_,Ia).models[0],C=T.componentIndex;s[_]=s[_]||[];for(var k=0;k<=C;k++)s[_][C]=s[_][C]||{};s[_][C].boundaryGap=n==="bar"}}};z(tAe,function(d){St(d,n)>=0&&z(d,function(h){i.setIconStatus(h,"normal")})}),i.setIconStatus(n,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=n;n==="stack"&&(u=Ct({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",n])!=="emphasis"&&(c="tiled")),a.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e})(us),D9={line:function(t,e,r,a){if(t==="bar")return Ct({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(t,e,r,a){if(t==="line")return Ct({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(t,e,r,a){var n=r.get("stack")===M9;if(t==="line"||t==="bar")return a.setIconStatus("stack",n?"normal":"emphasis"),Ct({id:e,stack:n?"":M9},a.get(["option","stack"])||{},!0)}};nu({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var d2=new Array(60).join("-"),em=" ";function aAe(t){var e={},r=[],a=[];return t.eachRawSeries(function(n){var i=n.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(n)}else r.push(n)}else r.push(n)}),{seriesGroupByCategoryAxis:e,other:r,meta:a}}function nAe(t){var e=[];return z(t,function(r,a){var n=r.categoryAxis,i=r.valueAxis,o=i.dim,s=[" "].concat(Se(r.series,function(v){return v.name})),l=[n.model.getCategories()];z(r.series,function(v){var m=v.getRawData();l.push(v.getRawData().mapArray(m.mapDimension(o),function(x){return x}))});for(var u=[s.join(em)],c=0;c<l[0].length;c++){for(var d=[],h=0;h<l.length;h++)d.push(l[h][c]);u.push(d.join(em))}e.push(u.join(`
`))}),e.join(`
`+d2+`
`)}function iAe(t){return Se(t,function(e){var r=e.getRawData(),a=[e.name],n=[];return r.each(r.dimensions,function(){for(var i=arguments.length,o=arguments[i-1],s=r.getName(o),l=0;l<i-1;l++)n[l]=arguments[l];a.push((s?s+em:"")+n.join(em))}),a.join(`
`)}).join(`
`+d2+`
`)}function oAe(t){var e=aAe(t);return{value:mr([nAe(e.seriesGroupByCategoryAxis),iAe(e.other)],function(r){return!!r.replace(/[\n\t\s]/g,"")}).join(`
`+d2+`
`),meta:e.meta}}function $S(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function sAe(t){var e=t.slice(0,t.indexOf(`
`));if(e.indexOf(em)>=0)return!0}var dL=new RegExp("["+em+"]+","g");function lAe(t){for(var e=t.split(/\n+/g),r=$S(e.shift()).split(dL),a=[],n=Se(r,function(l){return{name:l,data:[]}}),i=0;i<e.length;i++){var o=$S(e[i]).split(dL);a.push(o.shift());for(var s=0;s<o.length;s++)n[s]&&(n[s].data[i]=o[s])}return{series:n,categories:a}}function uAe(t){for(var e=t.split(/\n+/g),r=$S(e.shift()),a=[],n=0;n<e.length;n++){var i=$S(e[n]);if(i){var o=i.split(dL),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),a[n]={name:s,value:[]},l=a[n].value):l=a[n]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?a[n].value=l[0]:a[n]=l[0])}}return{name:r,data:a}}function cAe(t,e){var r=t.split(new RegExp(`
*`+d2+`
*`,"g")),a={series:[]};return z(r,function(n,i){if(sAe(n)){var o=lAe(n),s=e[i],l=s.axisDim+"Axis";s&&(a[l]=a[l]||[],a[l][s.axisIndex]={data:o.categories},a.series=a.series.concat(o.series))}else{var o=uAe(n);a.series.push(o)}}),a}var dAe=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,a){setTimeout(function(){a.dispatchAction({type:"hideTip"})});var n=a.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=i.get("backgroundColor")||ne.color.neutral00;var s=document.createElement("h4"),l=i.get("lang")||[];s.innerHTML=l[0]||i.get("title"),s.style.cssText="margin:10px 20px",s.style.color=i.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var d=i.get("optionToContent"),h=i.get("contentToOption"),v=oAe(r);if(Ke(d)){var m=d(a.getOption());Ie(m)?u.innerHTML=m:Bp(m)&&u.appendChild(m)}else{c.readOnly=i.get("readOnly");var x=c.style;x.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",x.color=i.get("textColor"),x.borderColor=i.get("textareaBorderColor"),x.backgroundColor=i.get("textareaColor"),c.value=v.value,u.appendChild(c)}var b=v.meta,w=document.createElement("div");w.style.cssText="position:absolute;bottom:5px;left:0;right:0";var _="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",T=document.createElement("div"),C=document.createElement("div");_+=";background-color:"+i.get("buttonColor"),_+=";color:"+i.get("buttonTextColor");var k=this;function A(){n.removeChild(o),k._dom=null}SM(T,"click",A),SM(C,"click",function(){if(h==null&&d!=null||h!=null&&d==null){A();return}var M;try{Ke(h)?M=h(u,a.getOption()):M=cAe(c.value,b)}catch(L){throw A(),new Error("Data view format error "+L)}M&&a.dispatchAction({type:"changeDataView",newOption:M}),A()}),T.innerHTML=l[1],C.innerHTML=l[2],C.style.cssText=T.style.cssText=_,!i.get("readOnly")&&w.appendChild(C),w.appendChild(T),o.appendChild(s),o.appendChild(u),o.appendChild(w),u.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},e.prototype.remove=function(r,a){this._dom&&a.getDom().removeChild(this._dom)},e.prototype.dispose=function(r,a){this.remove(r,a)},e.getDefaultOption=function(r){var a={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:r.getLocaleModel().get(["toolbox","dataView","title"]),lang:r.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:ne.color.background,textColor:ne.color.primary,textareaColor:ne.color.background,textareaBorderColor:ne.color.border,buttonColor:ne.color.accent50,buttonTextColor:ne.color.neutral00};return a},e})(us);function fAe(t,e){return Se(t,function(r,a){var n=e&&e[a];if(it(n)&&!be(n)){var i=it(r)&&!be(r);i||(r={value:r});var o=n.name!=null&&r.name==null;return r=nt(r,n),o&&delete r.name,r}else return r})}nu({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var r=[];z(t.newOption.series,function(a){var n=e.getSeriesByName(a.name)[0];if(!n)r.push(ve({type:"scatter"},a));else{var i=n.get("data");r.push({name:a.name,data:fAe(a.data,i)})}}),e.mergeOption(nt({series:r},t.newOption))});var VK=z,FK=jt();function hAe(t,e){var r=ZR(t);VK(e,function(a,n){for(var i=r.length-1;i>=0;i--){var o=r[i];if(o[n])break}if(i<0){var s=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();r[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),r.push(e)}function vAe(t){var e=ZR(t),r=e[e.length-1];e.length>1&&e.pop();var a={};return VK(r,function(n,i){for(var o=e.length-1;o>=0;o--)if(n=e[o][i],n){a[i]=n;break}}),a}function pAe(t){FK(t).snapshots=null}function mAe(t){return ZR(t).length}function ZR(t){var e=FK(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var gAe=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,a){pAe(r),a.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(r){var a={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return a},e})(us);nu({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var yAe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],KR=(function(){function t(e,r,a){var n=this;this._targetInfoList=[];var i=L9(r,e);z(xAe,function(o,s){(!a||!a.include||St(a.include,s)>=0)&&o(i,n._targetInfoList)})}return t.prototype.setOutputRanges=function(e,r){return this.matchOutputRanges(e,r,function(a,n,i){if((a.coordRanges||(a.coordRanges=[])).push(n),!a.coordRange){a.coordRange=n;var o=qN[a.brushType](0,i,n);a.__rangeOffset={offset:I9[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},t.prototype.matchOutputRanges=function(e,r,a){z(e,function(n){var i=this.findTargetInfo(n,r);i&&i!==!0&&z(i.coordSyses,function(o){var s=qN[n.brushType](1,o,n.range,!0);a(n,s.values,o,r)})},this)},t.prototype.setInputRanges=function(e,r){z(e,function(a){var n=this.findTargetInfo(a,r);if(a.range=a.range||[],n&&n!==!0){a.panelId=n.panelId;var i=qN[a.brushType](0,n.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?I9[a.brushType](i.values,o.offset,bAe(i.xyMinMax,o.xyMinMax)):i.values}},this)},t.prototype.makePanelOpts=function(e,r){return Se(this._targetInfoList,function(a){var n=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:r?r(a):null,clipPath:WZ(n),isTargetByCursor:XZ(n,e,a.coordSysModel),getLinearBrushOtherExtent:YZ(n)}})},t.prototype.controlSeries=function(e,r,a){var n=this.findTargetInfo(e,a);return n===!0||n&&St(n.coordSyses,r.coordinateSystem)>=0},t.prototype.findTargetInfo=function(e,r){for(var a=this._targetInfoList,n=L9(r,e),i=0;i<a.length;i++){var o=a[i],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<E9.length;l++)if(E9[l](n,o))return o}return!0},t})();function fL(t){return t[0]>t[1]&&t.reverse(),t}function L9(t,e){return kp(t,e,{includeMainTypes:yAe})}var xAe={grid:function(t,e){var r=t.xAxisModels,a=t.yAxisModels,n=t.gridModels,i=He(),o={},s={};!r&&!a&&!n||(z(r,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),z(a,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),z(n,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,c=[];z(u.getCartesians(),function(d,h){(St(r,d.getAxis("x").model)>=0||St(a,d.getAxis("y").model)>=0)&&c.push(d)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:R9.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){z(t.geoModels,function(r){var a=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:a,coordSyses:[a],getPanelRect:R9.geo})})}},E9=[function(t,e){var r=t.xAxisModel,a=t.yAxisModel,n=t.gridModel;return!n&&r&&(n=r.axis.grid.model),!n&&a&&(n=a.axis.grid.model),n&&n===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],R9={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Sh(t)),e}},qN={lineX:wt(P9,0),lineY:wt(P9,1),rect:function(t,e,r,a){var n=t?e.pointToData([r[0][0],r[1][0]],a):e.dataToPoint([r[0][0],r[1][0]],a),i=t?e.pointToData([r[0][1],r[1][1]],a):e.dataToPoint([r[0][1],r[1][1]],a),o=[fL([n[0],i[0]]),fL([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,r,a){var n=[[1/0,-1/0],[1/0,-1/0]],i=Se(r,function(o){var s=t?e.pointToData(o,a):e.dataToPoint(o,a);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:i,xyMinMax:n}}};function P9(t,e,r,a){var n=r.getAxis(["x","y"][t]),i=fL(Se([0,1],function(s){return e?n.coordToData(n.toLocalCoord(a[s]),!0):n.toGlobalCoord(n.dataToCoord(a[s]))})),o=[];return o[t]=i,o[1-t]=[NaN,NaN],{values:i,xyMinMax:o}}var I9={lineX:wt(j9,0),lineY:wt(j9,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return Se(t,function(a,n){return[a[0]-r[0]*e[n][0],a[1]-r[1]*e[n][1]]})}};function j9(t,e,r,a){return[e[0]-a[t]*r[0],e[1]-a[t]*r[1]]}function bAe(t,e){var r=O9(t),a=O9(e),n=[r[0]/a[0],r[1]/a[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function O9(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var hL=z,wAe=mhe("toolbox-dataZoom_"),SAe=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,a,n,i){this._brushController||(this._brushController=new SR(n.getZr()),this._brushController.on("brush",je(this._onBrush,this)).mount()),CAe(r,a,this,i,n),TAe(r,a)},e.prototype.onclick=function(r,a,n){_Ae[n].call(this)},e.prototype.remove=function(r,a){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(r,a){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(r){var a=r.areas;if(!r.isEnd||!a.length)return;var n={},i=this.ecModel;this._brushController.updateCovers([]);var o=new KR(QR(this.model),i,{include:["grid"]});o.matchOutputRanges(a,i,function(u,c,d){if(d.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",d,c[0]),s("y",d,c[1])):s({lineX:"x",lineY:"y"}[h],d,c)}}),hAe(i,n),this._dispatchZoomAction(n);function s(u,c,d){var h=c.getAxis(u),v=h.model,m=l(u,v,i),x=m.findRepresentativeAxisProxy(v).getMinMaxSpan();(x.minValueSpan!=null||x.maxValueSpan!=null)&&(d=jd(0,d.slice(),h.scale.getExtent(),0,x.minValueSpan,x.maxValueSpan)),m&&(n[m.id]={dataZoomId:m.id,startValue:d[0],endValue:d[1]})}function l(u,c,d){var h;return d.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var m=v.getAxisModel(u,c.componentIndex);m&&(h=v)}),h}},e.prototype._dispatchZoomAction=function(r){var a=[];hL(r,function(n,i){a.push(et(n))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},e.getDefaultOption=function(r){var a={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:ne.color.backgroundTint}};return a},e})(us),_Ae={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(vAe(this.ecModel))}};function QR(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function TAe(t,e){t.setIconStatus("back",mAe(e)>1?"emphasis":"normal")}function CAe(t,e,r,a,n){var i=r._isZoomActive;a&&a.type==="takeGlobalCursor"&&(i=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),r._isZoomActive=i,t.setIconStatus("zoom",i?"emphasis":"normal");var o=new KR(QR(t),e,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()}:!1)}Jpe("dataZoom",function(t){var e=t.getComponent("toolbox",0),r=["feature","dataZoom"];if(!e||e.get(r)==null)return;var a=e.getModel(r),n=[],i=QR(a),o=kp(t,i);hL(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),hL(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var d=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:wAe+u+d};h[c]=d,n.push(h)}return n});function kAe(t){t.registerComponentModel(KNe),t.registerComponentView(QNe),op("saveAsImage",eAe),op("magicType",rAe),op("dataView",dAe),op("dataZoom",SAe),op("restore",gAe),Nt(ZNe)}var NAe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:ne.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:ne.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:ne.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:ne.color.tertiary,fontSize:14}},e})(Gt);function GK(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function HK(t){if(Ut.domSupported){for(var e=document.documentElement.style,r=0,a=t.length;r<a;r++)if(t[r]in e)return t[r]}}var UK=HK(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),AAe=HK(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function $K(t,e){if(!t)return e;e=ZW(e,!0);var r=t.indexOf(e);return t=r===-1?e:"-"+t.slice(0,r)+"-"+e,t.toLowerCase()}function MAe(t,e){var r=t.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t);return r?r[e]:null}var DAe=$K(AAe,"transition"),JR=$K(UK,"transform"),LAe="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Ut.transform3dSupported?"will-change:transform;":"");function EAe(t){return t=t==="left"?"right":t==="right"?"left":t==="top"?"bottom":"top",t}function RAe(t,e,r){if(!Ie(r)||r==="inside")return"";var a=t.get("backgroundColor"),n=t.get("borderWidth");e=Ih(e);var i=EAe(r),o=Math.max(Math.round(n)*1.5,6),s="",l=JR+":",u;St(["left","right"],i)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var c=u*Math.PI/180,d=o+n,h=d*Math.abs(Math.cos(c))+d*Math.abs(Math.sin(c)),v=Math.round(((h-Math.SQRT2*n)/2+Math.SQRT2*n-(h-d)/2)*100)/100;s+=";"+i+":-"+v+"px";var m=e+" solid "+n+"px;",x=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+m,"border-right:"+m,"background-color:"+a+";"];return'<div style="'+x.join("")+'"></div>'}function PAe(t,e,r){var a="cubic-bezier(0.23,1,0.32,1)",n="",i="";return r&&(n=" "+t/2+"s "+a,i="opacity"+n+",visibility"+n),e||(n=" "+t+"s "+a,i+=(i.length?",":"")+(Ut.transformSupported?""+JR+n:",left"+n+",top"+n)),DAe+":"+i}function z9(t,e,r){var a=t.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!Ut.transformSupported)return r?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=Ut.transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return r?"top:0;left:0;"+JR+":"+o+";":[["top",0],["left",0],[UK,o]]}function IAe(t){var e=[],r=t.get("fontSize"),a=t.getTextColor();a&&e.push("color:"+a),e.push("font:"+t.getFont());var n=$e(t.get("lineHeight"),Math.round(r*3/2));r&&e.push("line-height:"+n+"px");var i=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return i&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),z(["decoration","align"],function(u){var c=t.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function jAe(t,e,r,a){var n=[],i=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),d=t.getModel("textStyle"),h=OY(t,"html"),v=u+"px "+c+"px "+s+"px "+l;return n.push("box-shadow:"+v),e&&i>0&&n.push(PAe(i,r,a)),o&&n.push("background-color:"+o),z(["width","color","radius"],function(m){var x="border-"+m,b=ZW(x),w=t.get(b);w!=null&&n.push(x+":"+w+(m==="color"?"":"px"))}),n.push(IAe(d)),h!=null&&n.push("padding:"+Zy(h).join("px ")+"px"),n.join(";")+";"}function B9(t,e,r,a,n){var i=e&&e.painter;if(r){var o=i&&i.getViewportRoot();o&&Bde(t,o,r,a,n)}else{t[0]=a,t[1]=n;var s=i&&i.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var OAe=(function(){function t(e,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ut.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var n=this._zr=e.getZr(),i=r.appendTo,o=i&&(Ie(i)?document.querySelector(i):Bp(i)?i:Ke(i)&&i(e.getDom()));B9(this._styleCoord,n,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(a),this._api=e,this._container=o;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,c=n.painter.getViewportRoot();ns(c,l,!0),u.dispatch("mousemove",l)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var r=this._api.getDom(),a=MAe(r,"position"),n=r.style;n.position!=="absolute"&&a!=="absolute"&&(n.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,n=a.style,i=this._styleCoord;a.innerHTML?n.cssText=LAe+jAe(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+z9(i[0],i[1],!0)+("border-color:"+Ih(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,a,n,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(Ie(i)&&a.get("trigger")==="item"&&!GK(a)&&(s=RAe(a,n,i)),Ie(e))o.innerHTML=e+s;else if(e){o.innerHTML="",be(e)||(e=[e]);for(var l=0;l<e.length;l++)Bp(e[l])&&e[l].parentNode!==o&&o.appendChild(e[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},t.prototype.moveTo=function(e,r){if(this.el){var a=this._styleCoord;if(B9(a,this._zr,this._container,e,r),a[0]!=null&&a[1]!=null){var n=this.el.style,i=z9(a[0],a[1]);z(i,function(o){n[o[0]]=o[1]})}}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){var e=this,r=this.el.style;this._enableDisplayTransition?(r.visibility="hidden",r.opacity="0"):r.display="none",Ut.transform3dSupported&&(r.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(je(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;Vde(e&&e.painter&&e.painter.getViewportRoot(),this._container);var r=this.el;if(r){r.onmouseenter=r.onmousemove=r.onmouseleave=null;var a=r.parentNode;a&&a.removeChild(r)}this.el=this._container=null},t})(),zAe=(function(){function t(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),F9(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return t.prototype.update=function(e){var r=e.get("alwaysShowContent");r&&this._moveIfResized(),this._alwaysShowContent=r},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(e,r,a,n,i){var o=this;it(e)&&cr(""),this.el&&this._zr.remove(this.el);var s=a.getModel("textStyle");this.el=new Qt({style:{rich:r.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:s.get("textShadowColor"),fill:a.get(["textStyle","color"]),padding:OY(a,"richText"),verticalAlign:"top",align:"left"},z:a.get("z")}),z(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=a.get(u)}),z(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el,r=this.el.getBoundingRect(),a=V9(e.style);return[r.width+a.left+a.right,r.height+a.top+a.bottom]},t.prototype.moveTo=function(e,r){var a=this.el;if(a){var n=this._styleCoord;F9(n,this._zr,e,r),e=n[0],r=n[1];var i=a.style,o=rd(i.borderWidth||0),s=V9(i);a.x=e+o+s.left,a.y=r+o+s.top,a.markRedraw()}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(je(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t})();function rd(t){return Math.max(0,t)}function V9(t){var e=rd(t.shadowBlur||0),r=rd(t.shadowOffsetX||0),a=rd(t.shadowOffsetY||0);return{left:rd(e-r),right:rd(e+r),top:rd(e-a),bottom:rd(e+a)}}function F9(t,e,r,a){t[0]=r,t[1]=a,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var BAe=new Et({shape:{x:-1,y:-1,width:2,height:2}}),VAe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,a){if(!(Ut.node||!a.getDom())){var n=r.getComponent("tooltip"),i=this._renderMode=_he(n.get("renderMode"));this._tooltipContent=i==="richText"?new zAe(a):new OAe(a,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},e.prototype.render=function(r,a,n){if(!(Ut.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=r,this._ecModel=a,this._api=n;var i=this._tooltipContent;i.update(r),i.setEnterable(r.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&r.get("transitionDuration")?_m(this,"_updatePosition",50,"fixRate"):hy(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var r=this._tooltipModel,a=r.get("triggerOn");kK("itemTooltip",this._api,je(function(n,i,o){a!=="none"&&(a.indexOf(n)>=0?this._tryShow(i,o):n==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,a=this._ecModel,n=this._api,i=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(r,a,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,a,n,i){if(!(i.from===this.uid||Ut.node||!n.getDom())){var o=G9(i,n);this._ticket="";var s=i.dataByCoordSys,l=UAe(i,a,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var c=BAe;c.x=i.x,c.y=i.y,c.update(),dt(c).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:c},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(r,a,n,i))return;var d=NK(i,a),h=d.point[0],v=d.point[1];h!=null&&v!=null&&this._tryShow({offsetX:h,offsetY:v,target:d.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(r,a,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(G9(i,n))},e.prototype._manuallyAxisShowTip=function(r,a,n,i){var o=i.seriesIndex,s=i.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(u){var c=u.getData(),d=Jg([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(d.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},e.prototype._tryShow=function(r,a){var n=r.target,i=this._tooltipModel;if(i){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(n){var s=dt(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;uh(n,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(dt(c).dataIndex!=null?l=c:dt(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(r,l,a):u?this._showComponentItemTooltip(r,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},e.prototype._showOrMove=function(r,a){var n=r.get("showDelay");a=je(a,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(a,n):a()},e.prototype._showAxisTooltip=function(r,a){var n=this._ecModel,i=this._tooltipModel,o=[a.offsetX,a.offsetY],s=Jg([a.tooltipOption],i),l=this._renderMode,u=[],c=pn("section",{blocks:[],noHeader:!0}),d=[],h=new Dk;z(r,function(_){z(_.dataByAxis,function(T){var C=n.getComponent(T.axisDim+"Axis",T.axisIndex),k=T.value;if(!(!C||k==null)){var A=_K(k,C.axis,n,T.seriesDataIndices,T.valueLabelOpt),M=pn("section",{header:A,noHeader:!vs(A),sortBlocks:!0,blocks:[]});c.blocks.push(M),z(T.seriesDataIndices,function(L){var R=n.getSeriesByIndex(L.seriesIndex),P=L.dataIndexInside,j=R.getDataParams(P);if(!(j.dataIndex<0)){j.axisDim=T.axisDim,j.axisIndex=T.axisIndex,j.axisType=T.axisType,j.axisId=T.axisId,j.axisValue=SS(C.axis,{value:k}),j.axisValueLabel=A,j.marker=h.makeTooltipMarker("item",Ih(j.color),l);var V=aB(R.formatTooltip(P,!0,null)),I=V.frag;if(I){var F=Jg([R],i).get("valueFormatter");M.blocks.push(F?ve({valueFormatter:F},I):I)}V.text&&d.push(V.text),u.push(j)}})}})}),c.blocks.reverse(),d.reverse();var v=a.position,m=s.get("order"),x=uB(c,h,l,m,n.get("useUTC"),s.get("textStyle"));x&&d.unshift(x);var b=l==="richText"?`
`:"<br/>",w=d.join(b);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,w,u,Math.random()+"",o[0],o[1],v,null,h)})},e.prototype._showSeriesItemTooltip=function(r,a,n){var i=this._ecModel,o=dt(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,d=o.dataType,h=u.getData(d),v=this._renderMode,m=r.positionDefault,x=Jg([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,m?{position:m}:null),b=x.get("trigger");if(!(b!=null&&b!=="item")){var w=u.getDataParams(c,d),_=new Dk;w.marker=_.makeTooltipMarker("item",Ih(w.color),v);var T=aB(u.formatTooltip(c,!1,d)),C=x.get("order"),k=x.get("valueFormatter"),A=T.frag,M=A?uB(k?ve({valueFormatter:k},A):A,_,v,C,i.get("useUTC"),x.get("textStyle")):T.text,L="item_"+u.name+"_"+c;this._showOrMove(x,function(){this._showTooltipContent(x,M,w,L,r.offsetX,r.offsetY,r.position,r.target,_)}),n({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,a,n){var i=this._renderMode==="html",o=dt(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(Ie(l)){var c=l;l={content:c,formatter:c},u=!0}u&&i&&l.content&&(l=et(l),l.content=Yi(l.content));var d=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&d.push(h),d.push({formatter:l.content});var v=r.positionDefault,m=Jg(d,this._tooltipModel,v?{position:v}:null),x=m.get("content"),b=Math.random()+"",w=new Dk;this._showOrMove(m,function(){var _=et(m.get("formatterParams")||{});this._showTooltipContent(m,x,_,b,r.offsetX,r.offsetY,r.position,a,w)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,a,n,i,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var d=this._tooltipContent;d.setEnterable(r.get("enterable"));var h=r.get("formatter");l=l||r.get("position");var v=a,m=this._getNearestPoint([o,s],n,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),x=m.color;if(h)if(Ie(h)){var b=r.ecModel.get("useUTC"),w=be(n)?n[0]:n,_=w&&w.axisType&&w.axisType.indexOf("time")>=0;v=h,_&&(v=X_(w.axisValue,v,b)),v=KW(v,n,!0)}else if(Ke(h)){var T=je(function(C,k){C===this._ticket&&(d.setContent(k,c,r,x,l),this._updatePosition(r,l,o,s,d,n,u))},this);this._ticket=i,v=h(n,i,T)}else v=h;d.setContent(v,c,r,x,l),d.show(r,x),this._updatePosition(r,l,o,s,d,n,u)}},e.prototype._getNearestPoint=function(r,a,n,i,o){if(n==="axis"||be(a))return{color:i||o};if(!be(a))return{color:i||a.color||a.borderColor}},e.prototype._updatePosition=function(r,a,n,i,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();a=a||r.get("position");var d=o.getSize(),h=r.get("align"),v=r.get("verticalAlign"),m=l&&l.getBoundingRect().clone();if(l&&m.applyTransform(l.transform),Ke(a)&&(a=a([n,i],s,o.el,m,{viewSize:[u,c],contentSize:d.slice()})),be(a))n=Pe(a[0],u),i=Pe(a[1],c);else if(it(a)){var x=a;x.width=d[0],x.height=d[1];var b=ha(x,{width:u,height:c});n=b.x,i=b.y,h=null,v=null}else if(Ie(a)&&l){var w=HAe(a,m,d,r.get("borderWidth"));n=w[0],i=w[1]}else{var w=FAe(n,i,o,u,c,h?null:20,v?null:20);n=w[0],i=w[1]}if(h&&(n-=H9(h)?d[0]/2:h==="right"?d[0]:0),v&&(i-=H9(v)?d[1]/2:v==="bottom"?d[1]:0),GK(r)){var w=GAe(n,i,o,u,c);n=w[0],i=w[1]}o.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(r,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===r.length;return o&&z(n,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},d=c.dataByAxis||[];o=o&&u.length===d.length,o&&z(u,function(h,v){var m=d[v]||{},x=h.seriesDataIndices||[],b=m.seriesDataIndices||[];o=o&&h.value===m.value&&h.axisType===m.axisType&&h.axisId===m.axisId&&x.length===b.length,o&&z(x,function(w,_){var T=b[_];o=o&&w.seriesIndex===T.seriesIndex&&w.dataIndex===T.dataIndex}),i&&z(h.seriesDataIndices,function(w){var _=w.seriesIndex,T=a[_],C=i[_];T&&C&&C.data!==T.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=a,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,a){Ut.node||!a.getDom()||(hy(this,"_updatePosition"),this._tooltipContent.dispose(),iL("itemTooltip",a))},e.type="tooltip",e})(oa);function Jg(t,e,r){var a=e.ecModel,n;r?(n=new $t(r,a,a),n=new $t(e.option,n,a)):n=e;for(var i=t.length-1;i>=0;i--){var o=t[i];o&&(o instanceof $t&&(o=o.get("tooltip",!0)),Ie(o)&&(o={formatter:o}),o&&(n=new $t(o,n,a)))}return n}function G9(t,e){return t.dispatchAction||je(e.dispatchAction,e)}function FAe(t,e,r,a,n,i,o){var s=r.getSize(),l=s[0],u=s[1];return i!=null&&(t+l+i+2>a?t-=l+i:t+=i),o!=null&&(e+u+o>n?e-=u+o:e+=o),[t,e]}function GAe(t,e,r,a,n){var i=r.getSize(),o=i[0],s=i[1];return t=Math.min(t+o,a)-o,e=Math.min(e+s,n)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function HAe(t,e,r,a){var n=r[0],i=r[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=e.width,c=e.height;switch(t){case"inside":s=e.x+u/2-n/2,l=e.y+c/2-i/2;break;case"top":s=e.x+u/2-n/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-n/2,l=e.y+c+o;break;case"left":s=e.x-n-o,l=e.y+c/2-i/2;break;case"right":s=e.x+u+o,l=e.y+c/2-i/2}return[s,l]}function H9(t){return t==="center"||t==="middle"}function UAe(t,e,r){var a=t5(t).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=mm(e,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=dt(u).tooltipConfig;if(c&&c.name===t.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function $Ae(t){Nt(sx),t.registerComponentModel(NAe),t.registerComponentView(VAe),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},en),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},en)}var WAe=["rect","polygon","keep","clear"];function YAe(t,e){var r=Ir(t?t.brush:[]);if(r.length){var a=[];z(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=t&&t.toolbox;be(n)&&(n=n[0]),n||(n={feature:{}},t.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),XAe(s),e&&!s.length&&s.push.apply(s,WAe)}}function XAe(t){var e={};z(t,function(r){e[r]=1}),t.length=0,z(e,function(r,a){t.push(a)})}var U9=z;function $9(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function vL(t,e,r){var a={};return U9(e,function(i){var o=a[i]=n();U9(t[i],function(s,l){if(Xn.isValidType(l)){var u={type:l,visual:s};r&&r(u,i),o[l]=new Xn(u),l==="opacity"&&(u=et(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Xn(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function WK(t,e,r){var a;z(r,function(n){e.hasOwnProperty(n)&&$9(e[n])&&(a=!0)}),a&&z(r,function(n){e.hasOwnProperty(n)&&$9(e[n])?t[n]=et(e[n]):delete t[n]})}function qAe(t,e,r,a,n,i){var o={};z(t,function(d){var h=Xn.prepareVisualTypes(e[d]);o[d]=h});var s;function l(d){return j5(r,s,d)}function u(d,h){YY(r,s,d,h)}r.each(c);function c(d,h){s=d;var v=r.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var m=a.call(n,d),x=e[m],b=o[m],w=0,_=b.length;w<_;w++){var T=b[w];x[T]&&x[T].applyVisual(d,l,u)}}}function ZAe(t,e,r,a){var n={};return z(t,function(i){var o=Xn.prepareVisualTypes(e[i]);n[i]=o}),{progress:function(o,s){var l;a!=null&&(l=s.getDimensionIndex(a));function u(k){return j5(s,d,k)}function c(k,A){YY(s,d,k,A)}for(var d,h=s.getStore();(d=o.next())!=null;){var v=s.getRawDataItem(d);if(!(v&&v.visualMap===!1))for(var m=a!=null?h.get(l,d):d,x=r(m),b=e[x],w=n[x],_=0,T=w.length;_<T;_++){var C=w[_];b[C]&&b[C].applyVisual(m,u,c)}}}}}function KAe(t){var e=t.brushType,r={point:function(a){return W9[e].point(a,r,t)},rect:function(a){return W9[e].rect(a,r,t)}};return r}var W9={lineX:Y9(0),lineY:Y9(1),rect:{point:function(t,e,r){return t&&r.boundingRect.contain(t[0],t[1])},rect:function(t,e,r){return t&&r.boundingRect.intersect(t)}},polygon:{point:function(t,e,r){return t&&r.boundingRect.contain(t[0],t[1])&&Qf(r.range,t[0],t[1])},rect:function(t,e,r){var a=r.range;if(!t||a.length<=1)return!1;var n=t.x,i=t.y,o=t.width,s=t.height,l=a[0];if(Qf(a,n,i)||Qf(a,n+o,i)||Qf(a,n,i+s)||Qf(a,n+o,i+s)||ot.create(t).contain(l[0],l[1])||p0(n,i,n+o,i,a)||p0(n,i,n,i+s,a)||p0(n+o,i,n+o,i+s,a)||p0(n,i+s,n+o,i+s,a))return!0}}};function Y9(t){var e=["x","y"],r=["width","height"];return{point:function(a,n,i){if(a){var o=i.range,s=a[t];return e0(s,o)}},rect:function(a,n,i){if(a){var o=i.range,s=[a[e[t]],a[e[t]]+a[r[t]]];return s[1]<s[0]&&s.reverse(),e0(s[0],o)||e0(s[1],o)||e0(o[0],s)||e0(o[1],s)}}}}function e0(t,e){return e[0]<=t&&t<=e[1]}var X9=["inBrush","outOfBrush"],ZN="__ecBrushSelect",pL="__ecInBrushSelectEvent";function YK(t){t.eachComponent({mainType:"brush"},function(e){var r=e.brushTargetManager=new KR(e.option,t);r.setInputRanges(e.areas,t)})}function QAe(t,e,r){var a=[],n,i;t.eachComponent({mainType:"brush"},function(o){r&&r.type==="takeGlobalCursor"&&o.setBrushOption(r.key==="brush"?r.brushOption:{brushType:!1})}),YK(t),t.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:et(o.areas),selected:[]};a.push(l);var u=o.option,c=u.brushLink,d=[],h=[],v=[],m=!1;s||(n=u.throttleType,i=u.throttleDelay);var x=Se(o.areas,function(k){var A=rMe[k.brushType],M=nt({boundingRect:A?A(k):void 0},k);return M.selectors=KAe(M),M}),b=vL(o.option,X9,function(k){k.mappingMethod="fixed"});be(c)&&z(c,function(k){d[k]=1});function w(k){return c==="all"||!!d[k]}function _(k){return!!k.length}t.eachSeries(function(k,A){var M=v[A]=[];k.subType==="parallel"?T(k,A):C(k,A,M)});function T(k,A){var M=k.coordinateSystem;m=m||M.hasAxisBrushed(),w(A)&&M.eachActiveState(k.getData(),function(L,R){L==="active"&&(h[R]=1)})}function C(k,A,M){if(!(!k.brushSelector||tMe(o,A))&&(z(x,function(R){o.brushTargetManager.controlSeries(R,k,t)&&M.push(R),m=m||_(M)}),w(A)&&_(M))){var L=k.getData();L.each(function(R){q9(k,M,L,R)&&(h[R]=1)})}}t.eachSeries(function(k,A){var M={seriesId:k.id,seriesIndex:A,seriesName:k.name,dataIndex:[]};l.selected.push(M);var L=v[A],R=k.getData(),P=w(A)?function(j){return h[j]?(M.dataIndex.push(R.getRawIndex(j)),"inBrush"):"outOfBrush"}:function(j){return q9(k,L,R,j)?(M.dataIndex.push(R.getRawIndex(j)),"inBrush"):"outOfBrush"};(w(A)?m:_(L))&&qAe(X9,b,R,P)})}),JAe(e,n,i,a,r)}function JAe(t,e,r,a,n){if(n){var i=t.getZr();if(!i[pL]){i[ZN]||(i[ZN]=eMe);var o=_m(i,ZN,r,e);o(t,a)}}}function eMe(t,e){if(!t.isDisposed()){var r=t.getZr();r[pL]=!0,t.dispatchAction({type:"brushSelect",batch:e}),r[pL]=!1}}function q9(t,e,r,a){for(var n=0,i=e.length;n<i;n++){var o=e[n];if(t.brushSelector(a,r,o.selectors,o))return!0}}function tMe(t,e){var r=t.option.seriesIndex;return r!=null&&r!=="all"&&(be(r)?St(r,e)<0:e!==r)}var rMe={rect:function(t){return Z9(t.range)},polygon:function(t){for(var e,r=t.range,a=0,n=r.length;a<n;a++){e=e||[[1/0,-1/0],[1/0,-1/0]];var i=r[a];i[0]<e[0][0]&&(e[0][0]=i[0]),i[0]>e[0][1]&&(e[0][1]=i[0]),i[1]<e[1][0]&&(e[1][0]=i[1]),i[1]>e[1][1]&&(e[1][1]=i[1])}return e&&Z9(e)}};function Z9(t){return new ot(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var aMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,a){this.ecModel=r,this.api=a,this.model,(this._brushController=new SR(a.getZr())).on("brush",je(this._onBrush,this)).mount()},e.prototype.render=function(r,a,n,i){this.model=r,this._updateController(r,a,n,i)},e.prototype.updateTransform=function(r,a,n,i){YK(a),this._updateController(r,a,n,i)},e.prototype.updateVisual=function(r,a,n,i){this.updateTransform(r,a,n,i)},e.prototype.updateView=function(r,a,n,i){this._updateController(r,a,n,i)},e.prototype._updateController=function(r,a,n,i){(!i||i.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(n)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(r){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:et(n),$from:a}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:et(n),$from:a})},e.type="brush",e})(oa),nMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.areas=[],r.brushOption={},r}return e.prototype.optionUpdated=function(r,a){var n=this.option;!a&&WK(n,r,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(r){r&&(this.areas=Se(r,function(a){return K9(this.option,a)},this))},e.prototype.setBrushOption=function(r){this.brushOption=K9(this.option,r),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:ne.color.backgroundTint,borderColor:ne.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:ne.color.disabled},e})(Gt);function K9(t,e){return Ct({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new $t(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var iMe=["rect","polygon","lineX","lineY","keep","clear"],oMe=(function(t){se(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,a,n){var i,o,s;a.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,z(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(r,a,n){this.render(r,a,n)},e.prototype.getIcons=function(){var r=this.model,a=r.get("icon",!0),n={};return z(r.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},e.prototype.onclick=function(r,a,n){var i=this._brushType,o=this._brushMode;n==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(r){var a={show:!0,type:iMe.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return a},e})(us);function sMe(t){t.registerComponentView(aMe),t.registerComponentModel(nMe),t.registerPreprocessor(YAe),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,QAe),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,r){r.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},en),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},en),op("brush",oMe)}var lMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:ne.size.m,backgroundColor:ne.color.transparent,borderColor:ne.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:ne.color.primary},subtextStyle:{fontSize:12,color:ne.color.quaternary}},e})(Gt),uMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n){if(this.group.removeAll(),!!r.get("show")){var i=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=$e(r.get("textBaseline"),r.get("textVerticalAlign")),c=new Qt({style:Fr(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),d=c.getBoundingRect(),h=r.get("subtext"),v=new Qt({style:Fr(s,{text:h,fill:s.getTextColor(),y:d.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),m=r.get("link"),x=r.get("sublink"),b=r.get("triggerEvent",!0);c.silent=!m&&!b,v.silent=!x&&!b,m&&c.on("click",function(){hS(m,"_"+r.get("target"))}),x&&v.on("click",function(){hS(x,"_"+r.get("subtarget"))}),dt(c).eventData=dt(v).eventData=b?{componentType:"title",componentIndex:r.componentIndex}:null,i.add(c),h&&i.add(v);var w=i.getBoundingRect(),_=r.getBoxLayoutParams();_.width=w.width,_.height=w.height;var T=Ln(r,n),C=ha(_,T.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?C.x+=C.width:l==="center"&&(C.x+=C.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?C.y+=C.height:u==="middle"&&(C.y+=C.height/2),u=u||"top"),i.x=C.x,i.y=C.y,i.markRedraw();var k={align:l,verticalAlign:u};c.setStyle(k),v.setStyle(k),w=i.getBoundingRect();var A=C.margin,M=r.getItemStyle(["color","opacity"]);M.fill=r.get("backgroundColor");var L=new Et({shape:{x:w.x-A[3],y:w.y-A[0],width:w.width+A[1]+A[3],height:w.height+A[0]+A[2],r:r.get("borderRadius")},style:M,subPixelOptimize:!0,silent:!0});i.add(L)}},e.type="title",e})(oa);function cMe(t){t.registerComponentModel(lMe),t.registerComponentView(uMe)}var Q9=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode="box",r}return e.prototype.init=function(r,a,n){this.mergeDefaultAndTheme(r,n),this._initData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var a=this._data.count();this.option.loop?r=(r%a+a)%a:(r>=a&&(r=a-1),r<0&&(r=0)),this.option.currentIndex=r},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(r){this.option.autoPlay=!!r},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var r=this.option,a=r.data||[],n=r.axisType,i=this._names=[],o;n==="category"?(o=[],z(a,function(u,c){var d=An(pm(u),""),h;it(u)?(h=et(u),h.value=c):h=c,o.push(h),i.push(d)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new Zi([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:ne.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:ne.color.secondary},data:[]},e})(Gt),XK=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline.slider",e.defaultOption=$d(Q9.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:ne.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:ne.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:ne.color.tertiary},itemStyle:{color:ne.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:ne.color.accent50,borderColor:ne.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:ne.color.accent50,borderColor:ne.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:ne.color.accent60},itemStyle:{color:ne.color.accent60,borderColor:ne.color.accent60},controlStyle:{color:ne.color.accent70,borderColor:ne.color.accent70}},progress:{lineStyle:{color:ne.color.accent30},itemStyle:{color:ne.color.accent40}},data:[]}),e})(Q9);gn(XK,K_.prototype);var dMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline",e})(oa),fMe=(function(t){se(e,t);function e(r,a,n,i){var o=t.call(this,r,a,n)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e})(al),KN=Math.PI,J9=jt(),hMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,a){this.api=a},e.prototype.render=function(r,a,n){if(this.model=r,this.api=n,this.ecModel=a,this.group.removeAll(),r.get("show",!0)){var i=this._layout(r,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,r);r.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return pn("nameValue",{noName:!0,value:c})},z(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,r)},this),this._renderAxisLabel(i,s,l,r),this._position(i,r)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(r,a){var n=r.get(["label","position"]),i=r.get("orient"),o=pMe(r,a),s;n==null||n==="auto"?s=i==="horizontal"?o.y+o.height/2<a.getHeight()/2?"-":"+":o.x+o.width/2<a.getWidth()/2?"+":"-":Ie(n)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][n]:s=n;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:KN/2},d=i==="vertical"?o.height:o.width,h=r.getModel("controlStyle"),v=h.get("show",!0),m=v?h.get("itemSize"):0,x=v?h.get("itemGap"):0,b=m+x,w=r.get(["label","rotate"])||0;w=w*KN/180;var _,T,C,k=h.get("position",!0),A=v&&h.get("showPlayBtn",!0),M=v&&h.get("showPrevBtn",!0),L=v&&h.get("showNextBtn",!0),R=0,P=d;k==="left"||k==="bottom"?(A&&(_=[0,0],R+=b),M&&(T=[R,0],R+=b),L&&(C=[P-m,0],P-=b)):(A&&(_=[P-m,0],P-=b),M&&(T=[0,0],R+=b),L&&(C=[P-m,0],P-=b));var j=[R,P];return r.get("inverse")&&j.reverse(),{viewRect:o,mainLength:d,orient:i,rotation:c[i],labelRotation:w,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[i],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[i],playPosition:_,prevBtnPosition:T,nextBtnPosition:C,axisExtent:j,controlSize:m,controlGap:x}},e.prototype._position=function(r,a){var n=this._mainGroup,i=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=oi(),l=o.x,u=o.y+o.height;Zl(s,s,[-l,-u]),Hd(s,s,-KN/2),Zl(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),d=_(n.getBoundingRect()),h=_(i.getBoundingRect()),v=[n.x,n.y],m=[i.x,i.y];m[0]=v[0]=c[0][0];var x=r.labelPosOpt;if(x==null||Ie(x)){var b=x==="+"?0:1;T(v,d,c,1,b),T(m,h,c,1,1-b)}else{var b=x>=0?0:1;T(v,d,c,1,b),m[1]=v[1]+x}n.setPosition(v),i.setPosition(m),n.rotation=i.rotation=r.rotation,w(n),w(i);function w(C){C.originX=c[0][0]-C.x,C.originY=c[1][0]-C.y}function _(C){return[[C.x,C.x+C.width],[C.y,C.y+C.height]]}function T(C,k,A,M,L){C[M]+=A[M][L]-k[M][L]}},e.prototype._createAxis=function(r,a){var n=a.getData(),i=a.get("axisType"),o=vMe(a,i);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new fMe("value",o,r.axisExtent,i);return l.model=a,l},e.prototype._createGroup=function(r){var a=this[r]=new Qe;return this.group.add(a),a},e.prototype._renderAxisLine=function(r,a,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var s=new fn({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:ve({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new fn({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:nt({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},e.prototype._renderAxisTick=function(r,a,n,i){var o=this,s=i.getData(),l=n.scale.getTicks();this._tickSymbols=[],z(l,function(u){var c=n.dataToCoord(u.value),d=s.getItemModel(u.value),h=d.getModel("itemStyle"),v=d.getModel(["emphasis","itemStyle"]),m=d.getModel(["progress","itemStyle"]),x={x:c,y:0,onclick:je(o._changeTimeline,o,u.value)},b=e7(d,h,a,x);b.ensureState("emphasis").style=v.getItemStyle(),b.ensureState("progress").style=m.getItemStyle(),wh(b);var w=dt(b);d.get("tooltip")?(w.dataIndex=u.value,w.dataModel=i):w.dataIndex=w.dataModel=null,o._tickSymbols.push(b)})},e.prototype._renderAxisLabel=function(r,a,n,i){var o=this,s=n.getLabelModel();if(s.get("show")){var l=i.getData(),u=n.getViewLabels();this._tickLabels=[],z(u,function(c){var d=c.tickValue,h=l.getItemModel(d),v=h.getModel("label"),m=h.getModel(["emphasis","label"]),x=h.getModel(["progress","label"]),b=n.dataToCoord(c.tickValue),w=new Qt({x:b,y:0,rotation:r.labelRotation-r.rotation,onclick:je(o._changeTimeline,o,d),silent:!1,style:Fr(v,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});w.ensureState("emphasis").style=Fr(m),w.ensureState("progress").style=Fr(x),a.add(w),wh(w),J9(w).dataIndex=d,o._tickLabels.push(w)})}},e.prototype._renderControl=function(r,a,n,i){var o=r.controlSize,s=r.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),c=i.getPlayState(),d=i.get("inverse",!0);h(r.nextBtnPosition,"next",je(this._changeTimeline,this,d?"-":"+")),h(r.prevBtnPosition,"prev",je(this._changeTimeline,this,d?"+":"-")),h(r.playPosition,c?"stop":"play",je(this._handlePlayClick,this,!c),!0);function h(v,m,x,b){if(v){var w=Ks($e(i.get(["controlStyle",m+"BtnSize"]),o),o),_=[0,-w/2,w,w],T=mMe(i,m+"Icon",_,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:b?-s:0,rectHover:!0,style:l,onclick:x});T.ensureState("emphasis").style=u,a.add(T),wh(T)}}},e.prototype._renderCurrentPointer=function(r,a,n,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(d){d.draggable=!0,d.drift=je(u._handlePointerDrag,u),d.ondragend=je(u._handlePointerDragend,u),t7(d,u._progressLine,s,n,i,!0)},onUpdate:function(d){t7(d,u._progressLine,s,n,i)}};this._currentPointer=e7(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},e.prototype._handlePointerDrag=function(r,a,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},e.prototype._pointerChangeTimeline=function(r,a){var n=this._toAxisCoord(r)[0],i=this._axis,o=ps(i.getExtent().slice());n>o[1]&&(n=o[1]),n<o[0]&&(n=o[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=n,s.dirty());var l=this._findNearestTick(n),u=this.model;(a||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var r=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var a=r.model;r._changeTimeline(a.getCurrentIndex()+(a.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(r){var a=this._mainGroup.getLocalTransform();return Ws(r,a,!0)},e.prototype._findNearestTick=function(r){var a=this.model.getData(),n=1/0,i,o=this._axis;return a.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-r);c<n&&(n=c,i=l)}),i},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(r){var a=this.model.getCurrentIndex();r==="+"?r=a+1:r==="-"&&(r=a-1),this.api.dispatchAction({type:"timelineChange",currentIndex:r,from:this.uid})},e.prototype._updateTicksStatus=function(){var r=this.model.getCurrentIndex(),a=this._tickSymbols,n=this._tickLabels;if(a)for(var i=0;i<a.length;i++)a&&a[i]&&a[i].toggleState("progress",i<r);if(n)for(var i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",J9(n[i]).dataIndex<=r)},e.type="timeline.slider",e})(dMe);function vMe(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Wp({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new W5({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new ic}}function pMe(t,e){return ha(t.getBoxLayoutParams(),Ln(t,e).refContainer,t.get("padding"))}function mMe(t,e,r,a){var n=a.style,i=qy(t.get(["controlStyle",e]),a||{},new ot(r[0],r[1],r[2],r[3]));return n&&i.setStyle(n),i}function e7(t,e,r,a,n,i){var o=e.get("color");if(n)n.setColor(o),r.add(n),i&&i.onUpdate(n);else{var s=t.get("symbol");n=mn(s,-1,-1,2,2,o),n.setStyle("strokeNoScale",!0),r.add(n),i&&i.onCreate(n)}var l=e.getItemStyle(["color"]);n.setStyle(l),a=Ct({rectHover:!0,z2:100},a,!0);var u=Tm(t.get("symbolSize"));a.scaleX=u[0]/2,a.scaleY=u[1]/2;var c=Xh(t.get("symbolOffset"),u);c&&(a.x=(a.x||0)+c[0],a.y=(a.y||0)+c[1]);var d=t.get("symbolRotate");return a.rotation=(d||0)*Math.PI/180||0,n.attr(a),n.updateTransform(),n}function t7(t,e,r,a,n,i){if(!t.dragging){var o=n.getModel("checkpointStyle"),s=a.dataToCoord(n.getData().get("value",r));if(i||!o.get("animation",!0))t.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};t.stopAnimation(null,!0),t.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}function gMe(t){t.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,r,a){var n=r.getComponent("timeline");return n&&e.currentIndex!=null&&(n.setCurrentIndex(e.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.getPlayState()&&(n.setPlayState(!1),a.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),r.resetOption("timeline",{replaceMerge:n.get("replaceMerge",!0)}),nt({currentIndex:n.option.currentIndex},e)}),t.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,r){var a=r.getComponent("timeline");a&&e.playState!=null&&a.setPlayState(e.playState)})}function yMe(t){var e=t&&t.timeline;be(e)||(e=e?[e]:[]),z(e,function(r){r&&xMe(r)})}function xMe(t){var e=t.type,r={number:"value",time:"time"};if(r[e]&&(t.axisType=r[e],delete t.type),r7(t),th(t,"controlPosition")){var a=t.controlStyle||(t.controlStyle={});th(a,"position")||(a.position=t.controlPosition),a.position==="none"&&!th(a,"show")&&(a.show=!1,delete a.position),delete t.controlPosition}z(t.data||[],function(n){it(n)&&!be(n)&&(!th(n,"value")&&th(n,"name")&&(n.value=n.name),r7(n))})}function r7(t){var e=t.itemStyle||(t.itemStyle={}),r=e.emphasis||(e.emphasis={}),a=t.label||t.label||{},n=a.normal||(a.normal={}),i={normal:1,emphasis:1};z(a,function(o,s){!i[s]&&!th(n,s)&&(n[s]=o)}),r.label&&!th(a,"emphasis")&&(a.emphasis=r.label,delete r.label)}function th(t,e){return t.hasOwnProperty(e)}function bMe(t){t.registerComponentModel(XK),t.registerComponentView(hMe),t.registerSubTypeDefaulter("timeline",function(){return"slider"}),gMe(t),t.registerPreprocessor(yMe)}function eP(t,e){if(!t)return!1;for(var r=be(t)?t:[t],a=0;a<r.length;a++)if(r[a]&&r[a][e])return!0;return!1}function L1(t){Mh(t,"label",["show"])}var E1=jt(),tu=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.createdBySelf=!1,r.preventAutoZ=!0,r}return e.prototype.init=function(r,a,n){this.mergeDefaultAndTheme(r,n),this._mergeOption(r,n,!1,!0)},e.prototype.isAnimationEnabled=function(){if(Ut.node)return!1;var r=this.__hostSeries;return this.getShallow("animation")&&r&&r.isAnimationEnabled()},e.prototype.mergeOption=function(r,a){this._mergeOption(r,a,!1,!1)},e.prototype._mergeOption=function(r,a,n,i){var o=this.mainType;n||a.eachSeries(function(s){var l=s.get(this.mainType,!0),u=E1(s)[o];if(!l||!l.data){E1(s)[o]=null;return}u?u._mergeOption(l,a,!0):(i&&L1(l),z(l.data,function(c){c instanceof Array?(L1(c[0]),L1(c[1])):L1(c)}),u=this.createMarkerModelFromSeries(l,this,a),ve(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),E1(s)[o]=u},this)},e.prototype.formatTooltip=function(r,a,n){var i=this.getData(),o=this.getRawValue(r),s=i.getName(r);return pn("section",{header:this.name,blocks:[pn("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(r){this._data=r},e.prototype.getDataParams=function(r,a){var n=K_.prototype.getDataParams.call(this,r,a),i=this.__hostSeries;return i&&(n.seriesId=i.id,n.seriesName=i.name,n.seriesType=i.subType),n},e.getMarkerModelFromSeries=function(r,a){return E1(r)[a]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e})(Gt);gn(tu,K_.prototype);var wMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,a,n){return new e(r,a,n)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e})(tu);function mL(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function SMe(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function R1(t,e,r,a,n,i,o){var s=[],l=Pd(e,n),u=l?e.getCalculationInfo("stackResultDimension"):n,c=WS(e,u,t),d=e.hostModel,h=d.indicesOfNearest(r,u,c)[0];s[i]=e.get(a,h),s[o]=e.get(u,h);var v=e.get(n,h),m=Ol(e.get(n,h));return m=Math.min(m,20),m>=0&&(s[o]=+s[o].toFixed(m)),[s,v]}var P1={min:wt(R1,"min"),max:wt(R1,"max"),average:wt(R1,"average"),median:wt(R1,"median")};function My(t,e){if(e){var r=t.getData(),a=t.coordinateSystem,n=a&&a.dimensions;if(!SMe(e)&&!be(e.coord)&&be(n)){var i=qK(e,r,a,t);if(e=et(e),e.type&&P1[e.type]&&i.baseAxis&&i.valueAxis){var o=St(n,i.baseAxis.dim),s=St(n,i.valueAxis.dim),l=P1[e.type](r,i.valueAxis.dim,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!be(n)){e.coord=[];var u=t.getBaseAxis();if(u&&e.type&&P1[e.type]){var c=a.getOtherAxis(u);c&&(e.value=WS(r,r.mapDimension(c.dim),e.type))}}else for(var d=e.coord,h=0;h<2;h++)P1[d[h]]&&(d[h]=WS(r,r.mapDimension(n[h]),d[h]));return e}}function qK(t,e,r,a){var n={};return t.valueIndex!=null||t.valueDim!=null?(n.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,n.valueAxis=r.getAxis(_Me(a,n.valueDataDim)),n.baseAxis=r.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=r.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function _Me(t,e){var r=t.getData().getDimensionInfo(e);return r&&r.coordDim}function Dy(t,e){return t&&t.containData&&e.coord&&!mL(e)?t.containData(e.coord):!0}function TMe(t,e,r){return t&&t.containZone&&e.coord&&r.coord&&!mL(e)&&!mL(r)?t.containZone(e.coord,r.coord):!0}function ZK(t,e){return t?function(r,a,n,i){var o=i<2?r.coord&&r.coord[i]:r.value;return Ad(o,e[i])}:function(r,a,n,i){return Ad(r.value,e[i])}}function WS(t,e,r){if(r==="average"){var a=0,n=0;return t.each(e,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return r==="median"?t.getMedian(e):t.getDataExtent(e)[r==="max"?1:0]}var QN=jt(),tP=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this.markerGroupMap=He()},e.prototype.render=function(r,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){QN(s).keep=!1}),a.eachSeries(function(s){var l=tu.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!QN(s).keep&&i.group.remove(s.group)}),CMe(a,o,this.type)},e.prototype.markKeep=function(r){QN(r).keep=!0},e.prototype.toggleBlurSeries=function(r,a){var n=this;z(r,function(i){var o=tu.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?fW(l):u5(l))})}})},e.type="marker",e})(oa);function CMe(t,e,r){t.eachSeries(function(a){var n=tu.getMarkerModelFromSeries(a,r),i=e.get(a.id);if(n&&i&&i.group){var o=Ph(n),s=o.z,l=o.zlevel;W_(i.group,s,l)}})}function a7(t,e,r){var a=e.coordinateSystem,n=r.getWidth(),i=r.getHeight(),o=a&&a.getArea&&a.getArea();t.each(function(s){var l=t.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:n,d=u?o?o.height:0:i,h=u&&o?o.x:0,v=u&&o?o.y:0,m,x=Pe(l.get("x"),c)+h,b=Pe(l.get("y"),d)+v;if(!isNaN(x)&&!isNaN(b))m=[x,b];else if(e.getMarkerPosition)m=e.getMarkerPosition(t.getValues(t.dimensions,s));else if(a){var w=t.get(a.dimensions[0],s),_=t.get(a.dimensions[1],s);m=a.dataToPoint([w,_])}isNaN(x)||(m[0]=x),isNaN(b)||(m[1]=b),t.setItemLayout(s,m)})}var kMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,a,n){a.eachSeries(function(i){var o=tu.getMarkerModelFromSeries(i,"markPoint");o&&(a7(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(r,a,n,i){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new ax),d=NMe(o,r,a);a.setData(d),a7(a.getData(),r,i),d.each(function(h){var v=d.getItemModel(h),m=v.getShallow("symbol"),x=v.getShallow("symbolSize"),b=v.getShallow("symbolRotate"),w=v.getShallow("symbolOffset"),_=v.getShallow("symbolKeepAspect");if(Ke(m)||Ke(x)||Ke(b)||Ke(w)){var T=a.getRawValue(h),C=a.getDataParams(h);Ke(m)&&(m=m(T,C)),Ke(x)&&(x=x(T,C)),Ke(b)&&(b=b(T,C)),Ke(w)&&(w=w(T,C))}var k=v.getModel("itemStyle").getItemStyle(),A=v.get("z2"),M=Jy(l,"color");k.fill||(k.fill=M),d.setItemVisual(h,{z2:$e(A,0),symbol:m,symbolSize:x,symbolRotate:b,symbolOffset:w,symbolKeepAspect:_,style:k})}),c.updateData(d),this.group.add(c.group),d.eachItemGraphicEl(function(h){h.traverse(function(v){dt(v).dataModel=a})}),this.markKeep(c),c.group.silent=a.get("silent")||r.get("silent")},e.type="markPoint",e})(tP);function NMe(t,e,r){var a;t?a=Se(t&&t.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return ve(ve({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Zi(a,r),i=Se(r.get("data"),wt(My,e));t&&(i=mr(i,wt(Dy,t)));var o=ZK(!!t,a);return n.initData(i,null,o),n}function AMe(t){t.registerComponentModel(wMe),t.registerComponentView(kMe),t.registerPreprocessor(function(e){eP(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var MMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,a,n){return new e(r,a,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e})(tu),I1=jt(),DMe=function(t,e,r,a){var n=t.getData(),i;if(be(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=e.getAxis(a.yAxis!=null?"y":"x"),l=yi(a.yAxis,a.xAxis);else{var u=qK(a,n,e,t);s=u.valueAxis;var c=_X(n,u.valueDataDim);l=WS(n,c,o)}var d=s.dim==="x"?0:1,h=1-d,v=et(a),m={coord:[]};v.type=null,v.coord=[],v.coord[h]=-1/0,m.coord[h]=1/0;var x=r.get("precision");x>=0&&qt(l)&&(l=+l.toFixed(Math.min(x,20))),v.coord[d]=m.coord[d]=l,i=[v,m,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var b=[My(t,i[0]),My(t,i[1]),ve({},i[2])];return b[2].type=b[2].type||null,Ct(b[2],b[0]),Ct(b[2],b[1]),b};function YS(t){return!isNaN(t)&&!isFinite(t)}function n7(t,e,r,a){var n=1-t,i=a.dimensions[t];return YS(e[n])&&YS(r[n])&&e[t]===r[t]&&a.getAxis(i).containData(e[t])}function LMe(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,a=e[1].coord;if(r&&a&&(n7(1,r,a,t)||n7(0,r,a,t)))return!0}return Dy(t,e[0])&&Dy(t,e[1])}function JN(t,e,r,a,n){var i=a.coordinateSystem,o=t.getItemModel(e),s,l=Pe(o.get("x"),n.getWidth()),u=Pe(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=i.dimensions,d=t.get(c[0],e),h=t.get(c[1],e);s=i.dataToPoint([d,h])}if(Id(i,"cartesian2d")){var v=i.getAxis("x"),m=i.getAxis("y"),c=i.dimensions;YS(t.get(c[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[r?0:1]):YS(t.get(c[1],e))&&(s[1]=m.toGlobalCoord(m.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}var EMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,a,n){a.eachSeries(function(i){var o=tu.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=I1(o).from,u=I1(o).to;l.each(function(c){JN(l,c,!0,i,n),JN(u,c,!1,i,n)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(r,a,n,i){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new bR);this.group.add(c.group);var d=RMe(o,r,a),h=d.from,v=d.to,m=d.line;I1(a).from=h,I1(a).to=v,a.setData(m);var x=a.get("symbol"),b=a.get("symbolSize"),w=a.get("symbolRotate"),_=a.get("symbolOffset");be(x)||(x=[x,x]),be(b)||(b=[b,b]),be(w)||(w=[w,w]),be(_)||(_=[_,_]),d.from.each(function(C){T(h,C,!0),T(v,C,!1)}),m.each(function(C){var k=m.getItemModel(C),A=k.getModel("lineStyle").getLineStyle();m.setItemLayout(C,[h.getItemLayout(C),v.getItemLayout(C)]);var M=k.get("z2");A.stroke==null&&(A.stroke=h.getItemVisual(C,"style").fill),m.setItemVisual(C,{z2:$e(M,0),fromSymbolKeepAspect:h.getItemVisual(C,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(C,"symbolOffset"),fromSymbolRotate:h.getItemVisual(C,"symbolRotate"),fromSymbolSize:h.getItemVisual(C,"symbolSize"),fromSymbol:h.getItemVisual(C,"symbol"),toSymbolKeepAspect:v.getItemVisual(C,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(C,"symbolOffset"),toSymbolRotate:v.getItemVisual(C,"symbolRotate"),toSymbolSize:v.getItemVisual(C,"symbolSize"),toSymbol:v.getItemVisual(C,"symbol"),style:A})}),c.updateData(m),d.line.eachItemGraphicEl(function(C){dt(C).dataModel=a,C.traverse(function(k){dt(k).dataModel=a})});function T(C,k,A){var M=C.getItemModel(k);JN(C,k,A,r,i);var L=M.getModel("itemStyle").getItemStyle();L.fill==null&&(L.fill=Jy(l,"color")),C.setItemVisual(k,{symbolKeepAspect:M.get("symbolKeepAspect"),symbolOffset:$e(M.get("symbolOffset",!0),_[A?0:1]),symbolRotate:$e(M.get("symbolRotate",!0),w[A?0:1]),symbolSize:$e(M.get("symbolSize"),b[A?0:1]),symbol:$e(M.get("symbol",!0),x[A?0:1]),style:L})}this.markKeep(c),c.group.silent=a.get("silent")||r.get("silent")},e.type="markLine",e})(tP);function RMe(t,e,r){var a;t?a=Se(t&&t.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return ve(ve({},c),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Zi(a,r),i=new Zi(a,r),o=new Zi([],r),s=Se(r.get("data"),wt(DMe,e,t,r));t&&(s=mr(s,wt(LMe,t)));var l=ZK(!!t,a);return n.initData(Se(s,function(u){return u[0]}),null,l),i.initData(Se(s,function(u){return u[1]}),null,l),o.initData(Se(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}function PMe(t){t.registerComponentModel(MMe),t.registerComponentView(EMe),t.registerPreprocessor(function(e){eP(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var IMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,a,n){return new e(r,a,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e})(tu),j1=jt(),jMe=function(t,e,r,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=My(t,n),s=My(t,i),l=o.coord,u=s.coord;l[0]=yi(l[0],-1/0),l[1]=yi(l[1],-1/0),u[0]=yi(u[0],1/0),u[1]=yi(u[1],1/0);var c=$E([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function XS(t){return!isNaN(t)&&!isFinite(t)}function i7(t,e,r,a){var n=1-t;return XS(e[n])&&XS(r[n])}function OMe(t,e){var r=e.coord[0],a=e.coord[1],n={coord:r,x:e.x0,y:e.y0},i={coord:a,x:e.x1,y:e.y1};return Id(t,"cartesian2d")?r&&a&&(i7(1,r,a)||i7(0,r,a))?!0:TMe(t,n,i):Dy(t,n)||Dy(t,i)}function o7(t,e,r,a,n){var i=a.coordinateSystem,o=t.getItemModel(e),s,l=Pe(o.get(r[0]),n.getWidth()),u=Pe(o.get(r[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var c=t.getValues(["x0","y0"],e),d=t.getValues(["x1","y1"],e),h=i.clampData(c),v=i.clampData(d),m=[];r[0]==="x0"?m[0]=h[0]>v[0]?d[0]:c[0]:m[0]=h[0]>v[0]?c[0]:d[0],r[1]==="y0"?m[1]=h[1]>v[1]?d[1]:c[1]:m[1]=h[1]>v[1]?c[1]:d[1],s=a.getMarkerPosition(m,r,!0)}else{var x=t.get(r[0],e),b=t.get(r[1],e),w=[x,b];i.clampData&&i.clampData(w,w),s=i.dataToPoint(w,!0)}if(Id(i,"cartesian2d")){var _=i.getAxis("x"),T=i.getAxis("y"),x=t.get(r[0],e),b=t.get(r[1],e);XS(x)?s[0]=_.toGlobalCoord(_.getExtent()[r[0]==="x0"?0:1]):XS(b)&&(s[1]=T.toGlobalCoord(T.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var s7=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],zMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,a,n){a.eachSeries(function(i){var o=tu.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=Se(s7,function(d){return o7(s,l,d,i,n)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(r,a,n,i){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new Qe});this.group.add(c.group),this.markKeep(c);var d=BMe(o,r,a);a.setData(d),d.each(function(h){var v=Se(s7,function(P){return o7(d,h,P,r,i)}),m=o.getAxis("x").scale,x=o.getAxis("y").scale,b=m.getExtent(),w=x.getExtent(),_=[m.parse(d.get("x0",h)),m.parse(d.get("x1",h))],T=[x.parse(d.get("y0",h)),x.parse(d.get("y1",h))];ps(_),ps(T);var C=!(b[0]>_[1]||b[1]<_[0]||w[0]>T[1]||w[1]<T[0]),k=!C;d.setItemLayout(h,{points:v,allClipped:k});var A=d.getItemModel(h),M=A.getModel("itemStyle").getItemStyle(),L=A.get("z2"),R=Jy(l,"color");M.fill||(M.fill=R,Ie(M.fill)&&(M.fill=Jw(M.fill,.4))),M.stroke||(M.stroke=R),d.setItemVisual(h,"style",M),d.setItemVisual(h,"z2",$e(L,0))}),d.diff(j1(c).data).add(function(h){var v=d.getItemLayout(h),m=d.getItemVisual(h,"z2");if(!v.allClipped){var x=new ji({z2:$e(m,0),shape:{points:v.points}});d.setItemGraphicEl(h,x),c.group.add(x)}}).update(function(h,v){var m=j1(c).data.getItemGraphicEl(v),x=d.getItemLayout(h),b=d.getItemVisual(h,"z2");x.allClipped?m&&c.group.remove(m):(m?tr(m,{z2:$e(b,0),shape:{points:x.points}},a,h):m=new ji({shape:{points:x.points}}),d.setItemGraphicEl(h,m),c.group.add(m))}).remove(function(h){var v=j1(c).data.getItemGraphicEl(h);c.group.remove(v)}).execute(),d.eachItemGraphicEl(function(h,v){var m=d.getItemModel(v),x=d.getItemVisual(v,"style");h.useStyle(d.getItemVisual(v,"style")),qn(h,Dn(m),{labelFetcher:a,labelDataIndex:v,defaultText:d.getName(v)||"",inheritColor:Ie(x.fill)?Jw(x.fill,1):ne.color.neutral99}),Mn(h,m),fa(h,null,null,m.get(["emphasis","disabled"])),dt(h).dataModel=a}),j1(c).data=d,c.group.silent=a.get("silent")||r.get("silent")},e.type="markArea",e})(tP);function BMe(t,e,r){var a,n,i=["x0","y0","x1","y1"];if(t){var o=Se(t&&t.dimensions,function(u){var c=e.getData(),d=c.getDimensionInfo(c.mapDimension(u))||{};return ve(ve({},d),{name:u,ordinalMeta:null})});n=Se(i,function(u,c){return{name:u,type:o[c%2].type}}),a=new Zi(n,r)}else n=[{name:"value",type:"float"}],a=new Zi(n,r);var s=Se(r.get("data"),wt(jMe,e,t,r));t&&(s=mr(s,wt(OMe,t)));var l=t?function(u,c,d,h){var v=u.coord[Math.floor(h/2)][h%2];return Ad(v,n[h])}:function(u,c,d,h){return Ad(u.value,n[h])};return a.initData(s,null,l),a.hasItemOption=!0,a}function VMe(t){t.registerComponentModel(IMe),t.registerComponentView(zMe),t.registerPreprocessor(function(e){eP(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var FMe=function(t,e){if(e==="all")return{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}},gL=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.prototype.init=function(r,a,n){this.mergeDefaultAndTheme(r,n),r.selected=r.selected||{},this._updateSelector(r)},e.prototype.mergeOption=function(r,a){t.prototype.mergeOption.call(this,r,a),this._updateSelector(r)},e.prototype._updateSelector=function(r){var a=r.selector,n=this.ecModel;a===!0&&(a=r.selector=["all","inverse"]),be(a)&&z(a,function(i,o){Ie(i)&&(i={type:i}),a[o]=Ct(i,FMe(n,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var a=!1,n=0;n<r.length;n++){var i=r[n].get("name");if(this.isSelected(i)){this.select(i),a=!0;break}}!a&&this.select(r[0].get("name"))}},e.prototype._updateData=function(r){var a=[],n=[];r.eachRawSeries(function(l){var u=l.name;n.push(u);var c;if(l.legendVisualProvider){var d=l.legendVisualProvider,h=d.getAllNames();r.isSeriesFiltered(l)||(n=n.concat(h)),h.length?a=a.concat(h):c=!0}else c=!0;c&&e5(l)&&a.push(l.name)}),this._availableNames=n;var i=this.get("data")||a,o=He(),s=Se(i,function(l){return(Ie(l)||qt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new $t(l,this,this.ecModel))},this);this._data=mr(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(r){var a=this.option.selected,n=this.get("selectedMode");if(n==="single"){var i=this._data;z(i,function(o){a[o.get("name")]=!1})}a[r]=!0},e.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},e.prototype.toggleSelected=function(r){var a=this.option.selected;a.hasOwnProperty(r)||(a[r]=!0),this[a[r]?"unSelect":"select"](r)},e.prototype.allSelect=function(){var r=this._data,a=this.option.selected;z(r,function(n){a[n.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var r=this._data,a=this.option.selected;z(r,function(n){var i=n.get("name",!0);a.hasOwnProperty(i)||(a[i]=!0),a[i]=!a[i]})},e.prototype.isSelected=function(r){var a=this.option.selected;return!(a.hasOwnProperty(r)&&!a[r])&&St(this._availableNames,r)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:ne.size.m,align:"auto",backgroundColor:ne.color.transparent,borderColor:ne.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:ne.color.disabled,inactiveBorderColor:ne.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:ne.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:ne.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:ne.color.tertiary,borderWidth:1,borderColor:ne.color.border},emphasis:{selectorLabel:{show:!0,color:ne.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e})(Gt),Zv=wt,yL=z,O1=Qe,KK=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new O1),this.group.add(this._selectorGroup=new O1),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,a,n,l,s,u);var c=Ln(r,n).refContainer,d=r.getBoxLayoutParams(),h=r.get("padding"),v=ha(d,c,h),m=this.layoutInner(r,o,v,i,l,u),x=ha(nt({width:m.width,height:m.height},d),c,h);this.group.x=x.x-m.x,this.group.y=x.y-m.y,this.group.markRedraw(),this.group.add(this._backgroundEl=BK(m,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,a,n,i,o,s,l){var u=this.getContentGroup(),c=He(),d=a.get("selectedMode"),h=a.get("triggerEvent"),v=[];n.eachRawSeries(function(m){!m.get("legendHoverLink")&&v.push(m.id)}),yL(a.getData(),function(m,x){var b=this,w=m.get("name");if(!this.newlineDisabled&&(w===""||w===`
`)){var _=new O1;_.newline=!0,u.add(_);return}var T=n.getSeriesByName(w)[0];if(!c.get(w))if(T){var C=T.getData(),k=C.getVisual("legendLineStyle")||{},A=C.getVisual("legendIcon"),M=C.getVisual("style"),L=this._createItem(T,w,x,m,a,r,k,M,A,d,i);L.on("click",Zv(l7,w,null,i,v)).on("mouseover",Zv(xL,T.name,null,i,v)).on("mouseout",Zv(bL,T.name,null,i,v)),n.ssr&&L.eachChild(function(R){var P=dt(R);P.seriesIndex=T.seriesIndex,P.dataIndex=x,P.ssrType="legend"}),h&&L.eachChild(function(R){b.packEventData(R,a,T,x,w)}),c.set(w,!0)}else n.eachRawSeries(function(R){var P=this;if(!c.get(w)&&R.legendVisualProvider){var j=R.legendVisualProvider;if(!j.containName(w))return;var V=j.indexOfName(w),I=j.getItemVisual(V,"style"),F=j.getItemVisual(V,"legendIcon"),G=ho(I.fill);G&&G[3]===0&&(G[3]=.2,I=ve(ve({},I),{fill:$l(G,"rgba")}));var O=this._createItem(R,w,x,m,a,r,{},I,F,d,i);O.on("click",Zv(l7,null,w,i,v)).on("mouseover",Zv(xL,null,w,i,v)).on("mouseout",Zv(bL,null,w,i,v)),n.ssr&&O.eachChild(function(U){var $=dt(U);$.seriesIndex=R.seriesIndex,$.dataIndex=x,$.ssrType="legend"}),h&&O.eachChild(function(U){P.packEventData(U,a,R,x,w)}),c.set(w,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},e.prototype.packEventData=function(r,a,n,i,o){var s={componentType:"legend",componentIndex:a.componentIndex,dataIndex:i,value:o,seriesIndex:n.seriesIndex};dt(r).eventData=s},e.prototype._createSelector=function(r,a,n,i,o){var s=this.getSelectorGroup();yL(r,function(u){var c=u.type,d=new Qt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(d);var h=a.getModel("selectorLabel"),v=a.getModel(["emphasis","selectorLabel"]);qn(d,{normal:h,emphasis:v},{defaultText:u.title}),wh(d)})},e.prototype._createItem=function(r,a,n,i,o,s,l,u,c,d,h){var v=r.visualDrawType,m=o.get("itemWidth"),x=o.get("itemHeight"),b=o.isSelected(a),w=i.get("symbolRotate"),_=i.get("symbolKeepAspect"),T=i.get("icon");c=T||c||"roundRect";var C=GMe(c,i,l,u,v,b,h),k=new O1,A=i.getModel("textStyle");if(Ke(r.getLegendIcon)&&(!T||T==="inherit"))k.add(r.getLegendIcon({itemWidth:m,itemHeight:x,icon:c,iconRotate:w,itemStyle:C.itemStyle,lineStyle:C.lineStyle,symbolKeepAspect:_}));else{var M=T==="inherit"&&r.getData().getVisual("symbol")?w==="inherit"?r.getData().getVisual("symbolRotate"):w:0;k.add(HMe({itemWidth:m,itemHeight:x,icon:c,iconRotate:M,itemStyle:C.itemStyle,symbolKeepAspect:_}))}var L=s==="left"?m+5:-5,R=s,P=o.get("formatter"),j=a;Ie(P)&&P?j=P.replace("{name}",a??""):Ke(P)&&(j=P(a));var V=b?A.getTextColor():i.get("inactiveColor");k.add(new Qt({style:Fr(A,{text:j,x:L,y:x/2,fill:V,align:R,verticalAlign:"middle"},{inheritColor:V})}));var I=new Et({shape:k.getBoundingRect(),style:{fill:"transparent"}}),F=i.getModel("tooltip");return F.get("show")&&uc({el:I,componentModel:o,itemName:a,itemTooltipOption:F.option}),k.add(I),k.eachChild(function(G){G.silent=!0}),I.silent=!d,this.getContentGroup().add(k),wh(k),k.__legendDataIndex=n,k},e.prototype.layoutInner=function(r,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();_h(r.get("orient"),l,r.get("itemGap"),n.width,n.height);var c=l.getBoundingRect(),d=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){_h("horizontal",u,r.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],m=r.get("selectorButtonGap",!0),x=r.getOrient().index,b=x===0?"width":"height",w=x===0?"height":"width",_=x===0?"y":"x";s==="end"?v[x]+=c[b]+m:d[x]+=h[b]+m,v[1-x]+=c[w]/2-h[w]/2,u.x=v[0],u.y=v[1],l.x=d[0],l.y=d[1];var T={x:0,y:0};return T[b]=c[b]+m+h[b],T[w]=Math.max(c[w],h[w]),T[_]=Math.min(0,h[_]+v[1-x]),T}else return l.x=d[0],l.y=d[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e})(oa);function GMe(t,e,r,a,n,i,o){function s(b,w){b.lineWidth==="auto"&&(b.lineWidth=w.lineWidth>0?2:0),yL(b,function(_,T){b[T]==="inherit"&&(b[T]=w[T])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=t.lastIndexOf("empty",0)===0?"fill":"stroke",d=l.getShallow("decal");u.decal=!d||d==="inherit"?a.decal:$p(d,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[c]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:r).opacity),s(u,a);var h=e.getModel("lineStyle"),v=h.getLineStyle();if(s(v,r),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),v.stroke==="auto"&&(v.stroke=a.fill),!i){var m=e.get("inactiveBorderWidth"),x=u[c];u.lineWidth=m==="auto"?a.lineWidth>0&&x?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),v.stroke=h.get("inactiveColor"),v.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function HMe(t){var e=t.icon||"roundRect",r=mn(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=ne.color.neutral00,r.style.lineWidth=2),r}function l7(t,e,r,a){bL(t,e,r,a),r.dispatchAction({type:"legendToggleSelect",name:t??e}),xL(t,e,r,a)}function QK(t){for(var e=t.getZr().storage.getDisplayList(),r,a=0,n=e.length;a<n&&!(r=e[a].states.emphasis);)a++;return r&&r.hoverLayer}function xL(t,e,r,a){QK(r)||r.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:a})}function bL(t,e,r,a){QK(r)||r.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:a})}function UMe(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(r){for(var a=0;a<e.length;a++)if(!e[a].isSelected(r.name))return!1;return!0})}function t0(t,e,r){var a=t==="allSelect"||t==="inverseSelect",n={},i=[];r.eachComponent({mainType:"legend",query:e},function(s){a?s[t]():s[t](e.name),u7(s,n),i.push(s.componentIndex)});var o={};return r.eachComponent("legend",function(s){z(n,function(l,u){s[l?"select":"unSelect"](u)}),u7(s,o)}),a?{selected:o,legendIndex:i}:{name:e.name,selected:o}}function u7(t,e){var r=e||{};return z(t.getData(),function(a){var n=a.get("name");if(!(n===`
`||n==="")){var i=t.isSelected(n);Ve(r,n)?r[n]=r[n]&&i:r[n]=i}}),r}function $Me(t){t.registerAction("legendToggleSelect","legendselectchanged",wt(t0,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",wt(t0,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",wt(t0,"inverseSelect")),t.registerAction("legendSelect","legendselected",wt(t0,"select")),t.registerAction("legendUnSelect","legendunselected",wt(t0,"unSelect"))}function JK(t){t.registerComponentModel(gL),t.registerComponentView(KK),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,UMe),t.registerSubTypeDefaulter("legend",function(){return"plain"}),$Me(t)}var WMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},e.prototype.init=function(r,a,n){var i=Wh(r);t.prototype.init.call(this,r,a,n),c7(this,r,i)},e.prototype.mergeOption=function(r,a){t.prototype.mergeOption.call(this,r,a),c7(this,this.option,r)},e.type="legend.scroll",e.defaultOption=$d(gL.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:ne.color.accent50,pageIconInactiveColor:ne.color.accent10,pageIconSize:15,pageTextStyle:{color:ne.color.tertiary},animationDurationUpdate:800}),e})(gL);function c7(t,e,r){var a=t.getOrient(),n=[1,1];n[a.index]=0,Jl(e,r,{type:"box",ignoreSize:!!n})}var d7=Qe,eA=["width","height"],tA=["x","y"],YMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!0,r._currentIndex=0,r}return e.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new d7),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new d7)},e.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(r,a,n,i,o,s,l){var u=this;t.prototype.renderInner.call(this,r,a,n,i,o,s,l);var c=this._controllerGroup,d=a.get("pageIconSize",!0),h=be(d)?d:[d,d];m("pagePrev",0);var v=a.getModel("pageTextStyle");c.add(new Qt({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),m("pageNext",1);function m(x,b){var w=x+"DataIndex",_=qy(a.get("pageIcons",!0)[a.getOrient().name][b],{onclick:je(u._pageGo,u,w,a,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});_.name=x,c.add(_)}},e.prototype.layoutInner=function(r,a,n,i,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,c=eA[u],d=tA[u],h=eA[1-u],v=tA[1-u];o&&_h("horizontal",l,r.get("selectorItemGap",!0));var m=r.get("selectorButtonGap",!0),x=l.getBoundingRect(),b=[-x.x,-x.y],w=et(n);o&&(w[c]=n[c]-x[c]-m);var _=this._layoutContentAndController(r,i,w,u,c,h,v,d);if(o){if(s==="end")b[u]+=_[c]+m;else{var T=x[c]+m;b[u]-=T,_[d]-=T}_[c]+=x[c]+m,b[1-u]+=_[v]+_[h]/2-x[h]/2,_[h]=Math.max(_[h],x[h]),_[v]=Math.min(_[v],x[v]+b[1-u]),l.x=b[0],l.y=b[1],l.markRedraw()}return _},e.prototype._layoutContentAndController=function(r,a,n,i,o,s,l,u){var c=this.getContentGroup(),d=this._containerGroup,h=this._controllerGroup;_h(r.get("orient"),c,r.get("itemGap"),i?n.width:null,i?null:n.height),_h("horizontal",h,r.get("pageButtonItemGap",!0));var v=c.getBoundingRect(),m=h.getBoundingRect(),x=this._showController=v[o]>n[o],b=[-v.x,-v.y];a||(b[i]=c[u]);var w=[0,0],_=[-m.x,-m.y],T=$e(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(x){var C=r.get("pageButtonPosition",!0);C==="end"?_[i]+=n[o]-m[o]:w[i]+=m[o]+T}_[1-i]+=v[s]/2-m[s]/2,c.setPosition(b),d.setPosition(w),h.setPosition(_);var k={x:0,y:0};if(k[o]=x?n[o]:v[o],k[s]=Math.max(v[s],m[s]),k[l]=Math.min(0,m[l]+_[1-i]),d.__rectSize=n[o],x){var A={x:0,y:0};A[o]=Math.max(n[o]-m[o]-T,0),A[s]=k[s],d.setClipPath(new Et({shape:A})),d.__rectSize=A[o]}else h.eachChild(function(L){L.attr({invisible:!0,silent:!0})});var M=this._getPageInfo(r);return M.pageIndex!=null&&tr(c,{x:M.contentPosition[0],y:M.contentPosition[1]},x?r:null),this._updatePageInfoView(r,M),k},e.prototype._pageGo=function(r,a,n){var i=this._getPageInfo(a)[r];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},e.prototype._updatePageInfoView=function(r,a){var n=this._controllerGroup;z(["pagePrev","pageNext"],function(c){var d=c+"DataIndex",h=a[d]!=null,v=n.childOfName(c);v&&(v.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var i=n.childOfName("pageText"),o=r.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",Ie(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(r){var a=r.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=r.getOrient().index,s=eA[o],l=tA[o],u=this._findTargetItemIndex(a),c=n.children(),d=c[u],h=c.length,v=h?1:0,m={contentPosition:[n.x,n.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!d)return m;var x=C(d);m.contentPosition[o]=-x.s;for(var b=u+1,w=x,_=x,T=null;b<=h;++b)T=C(c[b]),(!T&&_.e>w.s+i||T&&!k(T,w.s))&&(_.i>w.i?w=_:w=T,w&&(m.pageNextDataIndex==null&&(m.pageNextDataIndex=w.i),++m.pageCount)),_=T;for(var b=u-1,w=x,_=x,T=null;b>=-1;--b)T=C(c[b]),(!T||!k(_,T.s))&&w.i<_.i&&(_=w,m.pagePrevDataIndex==null&&(m.pagePrevDataIndex=w.i),++m.pageCount,++m.pageIndex),w=T;return m;function C(A){if(A){var M=A.getBoundingRect(),L=M[l]+A[l];return{s:L,e:L+M[s],i:A.__legendDataIndex}}}function k(A,M){return A.e>=M&&A.s<=M+i}},e.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===r&&(a=s)}),a??i},e.type="legend.scroll",e})(KK);function XMe(t){t.registerAction("legendScroll","legendscroll",function(e,r){var a=e.scrollDataIndex;a!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(n){n.setScrollDataIndex(a)})})}function qMe(t){Nt(JK),t.registerComponentModel(WMe),t.registerComponentView(YMe),XMe(t)}function ZMe(t){Nt(JK),Nt(qMe)}var KMe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.inside",e.defaultOption=$d(Ay.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e})(Ay),rP=jt();function QMe(t,e,r){rP(t).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(e.uid);n&&(n.getRange=r)})}function JMe(t,e){for(var r=rP(t).coordSysRecordMap,a=r.keys(),n=0;n<a.length;n++){var i=a[n],o=r.get(i),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||eQ(r,o))}}}function eQ(t,e){if(e){t.removeKey(e.model.uid);var r=e.controller;r&&r.dispose()}}function eDe(t,e){var r={model:e,containsPoint:wt(rDe,e),dispatchAction:wt(tDe,t),dataZoomInfoMap:null,controller:null},a=r.controller=new Kh(t.getZr());return z(["pan","zoom","scrollMove"],function(n){a.on(n,function(i){var o=[];r.dataZoomInfoMap.each(function(s){if(i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[n],u=l&&l(s.dzReferCoordSysInfo,r.model.mainType,r.controller,i);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&r.dispatchAction(o)})}),r}function tDe(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function rDe(t,e,r,a){return t.coordinateSystem.containPoint([r,a])}function aDe(t,e,r){var a,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return t.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;i[n+u]>i[n+a]&&(a=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:r,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function nDe(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(e,r){var a=rP(r),n=a.coordSysRecordMap||(a.coordSysRecordMap=He());n.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=jK(i);z(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,eDe(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=He());c.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){eQ(n,i);return}var c=aDe(l,i,r);o.enable(c.controlType,c.opt),_m(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var iDe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return e.prototype.render=function(r,a,n){if(t.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),QMe(n,r,{pan:je(rA.pan,this),zoom:je(rA.zoom,this),scrollMove:je(rA.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){JMe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e})(XR),rA={zoom:function(t,e,r,a){var n=this.range,i=n.slice(),o=t.axisModels[0];if(o){var s=aA[e](null,[a.originX,a.originY],o,r,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(jd(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:f7(function(t,e,r,a,n,i){var o=aA[a]([i.oldX,i.oldY],[i.newX,i.newY],e,n,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:f7(function(t,e,r,a,n,i){var o=aA[a]([0,0],[i.scrollDelta,i.scrollDelta],e,n,r);return o.signal*(t[1]-t[0])*i.scrollDelta})};function f7(t){return function(e,r,a,n){var i=this.range,o=i.slice(),s=e.axisModels[0];if(s){var l=t(o,s,e,r,a,n);if(jd(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var aA={grid:function(t,e,r,a,n){var i=r.axis,o={},s=n.model.coordinateSystem.getRect();return t=t||[0,0],i.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(t,e,r,a,n){var i=r.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(t,e,r,a,n){var i=r.axis,o=n.model.coordinateSystem.getRect(),s={};return t=t||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function tQ(t){qR(t),t.registerComponentModel(KMe),t.registerComponentView(iDe),nDe(t)}var oDe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=$d(Ay.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:ne.color.accent10,borderRadius:0,backgroundColor:ne.color.transparent,dataBackground:{lineStyle:{color:ne.color.accent30,width:.5},areaStyle:{color:ne.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:ne.color.accent40,width:.5},areaStyle:{color:ne.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:ne.color.neutral00,borderColor:ne.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:ne.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:ne.color.tertiary},brushSelect:!0,brushStyle:{color:ne.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:ne.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e})(Ay),r0=Et,sDe=1,nA=30,lDe=7,a0="horizontal",h7="vertical",uDe=5,cDe=["line","bar","candlestick","scatter"],dDe={easing:"cubicOut",duration:100,delay:0},fDe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._displayables={},r}return e.prototype.init=function(r,a){this.api=a,this._onBrush=je(this._onBrush,this),this._onBrushEnd=je(this._onBrushEnd,this)},e.prototype.render=function(r,a,n,i){if(t.prototype.render.apply(this,arguments),_m(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){hy(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new Qe;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(a),this._positionGroup()},e.prototype._resetLocation=function(){var r=this.dataZoomModel,a=this.api,n=r.get("brushSelect"),i=n?lDe:0,o=Ln(r,a).refContainer,s=this._findCoordRect(),l=r.get("defaultLocationEdgeGap",!0)||0,u=this._orient===a0?{right:o.width-s.x-s.width,top:o.height-nA-l-i,width:s.width,height:nA}:{right:l,top:s.y,width:nA,height:s.height},c=Wh(r.option);z(["right","top","width","height"],function(h){c[h]==="ph"&&(c[h]=u[h])});var d=ha(c,o);this._location={x:d.x,y:d.y},this._size=[d.width,d.height],this._orient===h7&&this._size.reverse()},e.prototype._positionGroup=function(){var r=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===a0&&!o?{scaleY:l?1:-1,scaleX:1}:n===a0&&o?{scaleY:l?1:-1,scaleX:-1}:n===h7&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=a.x-u.x,r.y=a.y-u.y,r.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var r=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=r.get("brushSelect");n.add(new r0({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new r0({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:je(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},e.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var a=this._size,n=this._shadowSize||[],i=r.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var d=o.getDataExtent(r.thisDim),h=o.getDataExtent(l),v=(h[1]-h[0])*.3;h=[h[0]-v,h[1]+v];var m=[0,a[1]],x=[0,a[0]],b=[[a[0],0],[0,0]],w=[],_=x[1]/Math.max(1,o.count()-1),T=a[0]/(d[1]-d[0]),C=r.thisAxis.type==="time",k=-_,A=Math.round(o.count()/a[0]),M;o.each([r.thisDim,l],function(V,I,F){if(A>0&&F%A){C||(k+=_);return}k=C?(+V-d[0])*T:k+_;var G=I==null||isNaN(I)||I==="",O=G?0:pr(I,h,m,!0);G&&!M&&F?(b.push([b[b.length-1][0],0]),w.push([w[w.length-1][0],0])):!G&&M&&(b.push([k,0]),w.push([k,0])),G||(b.push([k,O]),w.push([k,O])),M=G}),u=this._shadowPolygonPts=b,c=this._shadowPolylinePts=w}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var L=this.dataZoomModel;function R(V){var I=L.getModel(V?"selectedDataBackground":"dataBackground"),F=new Qe,G=new ji({shape:{points:u},segmentIgnoreThreshold:1,style:I.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),O=new xi({shape:{points:c},segmentIgnoreThreshold:1,style:I.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return F.add(G),F.add(O),F}for(var P=0;P<3;P++){var j=R(P===1);this._displayables.sliderGroup.add(j),this._displayables.dataShadowSegs.push(j)}},e.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,a=r.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();z(l,function(u){if(!n&&!(a!==!0&&St(cDe,u.get("type"))<0)){var c=i.getComponent(yd(o),s).axis,d=hDe(o),h,v=u.coordinateSystem;d!=null&&v.getOtherAxis&&(h=v.getOtherAxis(c).inverse),d=u.getData().mapDimension(d);var m=u.getData().mapDimension(o);n={thisAxis:c,series:u,thisDim:m,otherDim:d,otherAxisInverse:h}}},this)},this),n}},e.prototype._renderHandle=function(){var r=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,d=l.get("brushSelect"),h=a.filler=new r0({silent:d,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new r0({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:sDe,fill:ne.color.transparent}})),z([0,1],function(T){var C=l.get("handleIcon");!mS[C]&&C.indexOf("path://")<0&&C.indexOf("image://")<0&&(C="path://"+C);var k=mn(C,-1,0,2,2,null,!0);k.attr({cursor:vDe(this._orient),draggable:!0,drift:je(this._onDragMove,this,T),ondragend:je(this._onDragEnd,this),onmouseover:je(this._showDataInfo,this,!0),onmouseout:je(this._showDataInfo,this,!1),z2:5});var A=k.getBoundingRect(),M=l.get("handleSize");this._handleHeight=Pe(M,this._size[1]),this._handleWidth=A.width/A.height*this._handleHeight,k.setStyle(l.getModel("handleStyle").getItemStyle()),k.style.strokeNoScale=!0,k.rectHover=!0,k.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),wh(k);var L=l.get("handleColor");L!=null&&(k.style.fill=L),o.add(n[T]=k);var R=l.getModel("textStyle"),P=l.get("handleLabel")||{},j=P.show||!1;r.add(i[T]=new Qt({silent:!0,invisible:!j,style:Fr(R,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:R.getTextColor(),font:R.getFont()}),z2:10}))},this);var v=h;if(d){var m=Pe(l.get("moveHandleSize"),s[1]),x=a.moveHandle=new Et({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:m}}),b=m*.8,w=a.moveHandleIcon=mn(l.get("moveHandleIcon"),-b/2,-b/2,b,b,ne.color.neutral00,!0);w.silent=!0,w.y=s[1]+m/2-.5,x.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var _=Math.min(s[1]/2,Math.max(m,10));v=a.moveZone=new Et({invisible:!0,shape:{y:s[1]-_,height:m+_}}),v.on("mouseover",function(){u.enterEmphasis(x)}).on("mouseout",function(){u.leaveEmphasis(x)}),o.add(x),o.add(w),o.add(v)}v.attr({draggable:!0,cursor:"default",drift:je(this._onDragMove,this,"all"),ondragstart:je(this._showDataInfo,this,!0),ondragend:je(this._onDragEnd,this),onmouseover:je(this._showDataInfo,this,!0),onmouseout:je(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[pr(r[0],[0,100],a,!0),pr(r[1],[0,100],a,!0)]},e.prototype._updateInterval=function(r,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];jd(a,i,o,n.get("zoomLock")?"all":r,s.minSpan!=null?pr(s.minSpan,l,o,!0):null,s.maxSpan!=null?pr(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=ps([pr(i[0],o,l,!0),pr(i[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(r){var a=this._displayables,n=this._handleEnds,i=ps(n.slice()),o=this._size;z([0,1],function(v){var m=a.handles[v],x=this._handleHeight;m.attr({scaleX:x/2,scaleY:x/2,x:n[v]+(v?-1:1),y:o[1]/2-x/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],c=0;c<l.length;c++){var d=l[c],h=d.getClipPath();h||(h=new Et,d.setClipPath(h)),h.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(r)},e.prototype._updateDataInfo=function(r){var a=this.dataZoomModel,n=this._displayables,i=n.handleLabels,o=this._orient,s=["",""];if(a.get("showDetail")){var l=a.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,d=r?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(d[0],u),this._formatLabel(d[1],u)]}}var h=ps(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(m){var x=Sh(n.handles[m].parent,this.group),b=$_(m===0?"right":"left",x),w=this._handleWidth/2+uDe,_=Ws([h[m]+(m===0?-w:w),this._size[1]/2],x);i[m].setStyle({x:_[0],y:_[1],verticalAlign:o===a0?"middle":b,align:o===a0?b:"center",text:s[m]})}},e.prototype._formatLabel=function(r,a){var n=this.dataZoomModel,i=n.get("labelFormatter"),o=n.get("labelPrecision");(o==null||o==="auto")&&(o=a.getPixelPrecision());var s=r==null||isNaN(r)?"":a.type==="category"||a.type==="time"?a.scale.getLabel({value:Math.round(r)}):r.toFixed(Math.min(o,20));return Ke(i)?i(r,s):Ie(i)?i.replace("{value}",s):s},e.prototype._showDataInfo=function(r){var a=this.dataZoomModel.get("handleLabel")||{},n=a.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=i.get("show")||!1,s=r||this._dragging?o:n,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},e.prototype._onDragMove=function(r,a,n,i){this._dragging=!0,ec(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Ws([a,n],o,!0),l=this._updateInterval(r,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var r=this.dataZoomModel.get("realtime");!r&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(r){var a=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(r.offsetX,r.offsetY);if(!(n[0]<0||n[0]>a[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(r){var a=r.offsetX,n=r.offsetY;this._brushStart=new at(a,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(r){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();jd(0,l,o,0,u.minSpan!=null?pr(u.minSpan,s,o,!0):null,u.maxSpan!=null?pr(u.maxSpan,s,o,!0):null),this._range=ps([pr(l[0],o,s,!0),pr(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(r){this._brushing&&(ec(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},e.prototype._updateBrushRect=function(r,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new r0({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,a),c=l.transformCoordToLocal(s.x,s.y),d=this._size;u[0]=Math.max(Math.min(d[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:d[1]})},e.prototype._dispatchZoomAction=function(r){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?dDe:null,start:a[0],end:a[1]})},e.prototype._findCoordRect=function(){var r,a=jK(this.dataZoomModel).infoList;if(!r&&a.length){var n=a[0].model.coordinateSystem;r=n.getRect&&n.getRect()}if(!r){var i=this.api.getWidth(),o=this.api.getHeight();r={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return r},e.type="dataZoom.slider",e})(XR);function hDe(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function vDe(t){return t==="vertical"?"ns-resize":"ew-resize"}function rQ(t){t.registerComponentModel(oDe),t.registerComponentView(fDe),qR(t)}function pDe(t){Nt(tQ),Nt(rQ)}var aQ={get:function(t,e,r){var a=et((mDe[t]||{})[e]);return r&&be(a)?a[a.length-1]:a}},mDe={color:{active:["#006edd","#e0ffff"],inactive:[ne.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},v7=Xn.mapVisual,gDe=Xn.eachVisual,yDe=be,p7=z,xDe=ps,bDe=pr,qS=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return e.prototype.init=function(r,a,n){this.mergeDefaultAndTheme(r,n)},e.prototype.optionUpdated=function(r,a){var n=this.option;!a&&WK(n,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(r){var a=this.stateList;r=je(r,this),this.controllerVisuals=vL(this.option.controller,a,r),this.targetVisuals=vL(this.option.target,a,r)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesId,a=this.option.seriesIndex;a==null&&r==null&&(a="all");var n=mm(this.ecModel,"series",{index:a,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return Se(n,function(i){return i.componentIndex})},e.prototype.eachTargetSeries=function(r,a){z(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&r.call(a,i)},this)},e.prototype.isTargetSeries=function(r){var a=!1;return this.eachTargetSeries(function(n){n===r&&(a=!0)}),a},e.prototype.formatValueText=function(r,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],be(r)&&(r=r.slice(),u=!0);var c=a?r:u?[d(r[0]),d(r[1])]:d(r);if(Ie(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(Ke(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?n[0]+" "+c[1]:r[1]===s[1]?n[1]+" "+c[0]:c[0]+" - "+c[1];return c;function d(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var r=this.option,a=xDe([r.min,r.max]);this._dataExtent=a},e.prototype.getDataDimensionIndex=function(r){var a=this.option.dimension;if(a!=null)return r.getDimensionIndex(a);for(var n=r.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var r=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});Ct(i,n),Ct(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function l(d){yDe(a.color)&&!d.inRange&&(d.inRange={color:a.color.slice().reverse()}),d.inRange=d.inRange||{color:r.get("gradientColor")}}function u(d,h,v){var m=d[h],x=d[v];m&&!x&&(x=d[v]={},p7(m,function(b,w){if(Xn.isValidType(w)){var _=aQ.get(w,"inactive",s);_!=null&&(x[w]=_,w==="color"&&!x.hasOwnProperty("opacity")&&!x.hasOwnProperty("colorAlpha")&&(x.opacity=[0,0]))}}))}function c(d){var h=(d.inRange||{}).symbol||(d.outOfRange||{}).symbol,v=(d.inRange||{}).symbolSize||(d.outOfRange||{}).symbolSize,m=this.get("inactiveColor"),x=this.getItemSymbol(),b=x||"roundRect";p7(this.stateList,function(w){var _=this.itemSize,T=d[w];T||(T=d[w]={color:s?m:[m]}),T.symbol==null&&(T.symbol=h&&et(h)||(s?b:[b])),T.symbolSize==null&&(T.symbolSize=v&&et(v)||(s?_[0]:[_[0],_[0]])),T.symbol=v7(T.symbol,function(A){return A==="none"?b:A});var C=T.symbolSize;if(C!=null){var k=-1/0;gDe(C,function(A){A>k&&(k=A)}),T.symbolSize=v7(C,function(A){return bDe(A,[0,k],[0,_[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(r){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(r){return null},e.prototype.getVisualMeta=function(r){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:ne.color.transparent,borderColor:ne.color.borderTint,contentColor:ne.color.theme[0],inactiveColor:ne.color.disabled,borderWidth:0,padding:ne.size.m,textGap:10,precision:0,textStyle:{color:ne.color.secondary}},e})(Gt),m7=[20,140],wDe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(r,a){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=m7[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=m7[1])},e.prototype._resetRange=function(){var r=this.getExtent(),a=this.option.range;!a||a.auto?(r.auto=1,this.option.range=r):be(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],r[0]),a[1]=Math.min(a[1],r[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),z(this.stateList,function(r){var a=this.option.controller[r].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},e.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},e.prototype.getSelected=function(){var r=this.getExtent(),a=ps((this.get("range")||[]).slice());return a[0]>r[1]&&(a[0]=r[1]),a[1]>r[1]&&(a[1]=r[1]),a[0]<r[0]&&(a[0]=r[0]),a[1]<r[0]&&(a[1]=r[0]),a},e.prototype.getValueState=function(r){var a=this.option.range,n=this.getExtent(),i=$e(this.option.unboundedRange,!0);return(i&&a[0]<=n[0]||a[0]<=r)&&(i&&a[1]>=n[1]||r<=a[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},e.prototype.getVisualMeta=function(r){var a=g7(this,"outOfRange",this.getExtent()),n=g7(this,"inRange",this.option.range.slice()),i=[];function o(v,m){i.push({value:v,color:r(v,m)})}for(var s=0,l=0,u=n.length,c=a.length;l<c&&(!n.length||a[l]<=n[0]);l++)a[l]<n[s]&&o(a[l],"outOfRange");for(var d=1;s<u;s++,d=0)d&&i.length&&o(n[s],"outOfRange"),o(n[s],"inRange");for(var d=1;l<c;l++)(!n.length||n[n.length-1]<a[l])&&(d&&(i.length&&o(i[i.length-1].value,"outOfRange"),d=0),o(a[l],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=$d(qS.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:ne.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:ne.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:ne.color.shadow}}),e})(qS);function g7(t,e,r){if(r[0]===r[1])return r.slice();for(var a=200,n=(r[1]-r[0])/a,i=r[0],o=[],s=0;s<=a&&i<r[1];s++)o.push(i),i+=n;return o.push(r[1]),o}var nQ=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.autoPositionValues={left:1,right:1,top:1,bottom:1},r}return e.prototype.init=function(r,a){this.ecModel=r,this.api=a},e.prototype.render=function(r,a,n,i){if(this.visualMapModel=r,r.get("show")===!1){this.group.removeAll();return}this.doRender(r,a,n,i)},e.prototype.renderBackground=function(r){var a=this.visualMapModel,n=Zy(a.get("padding")||0),i=r.getBoundingRect();r.add(new Et({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:a.get("backgroundColor"),stroke:a.get("borderColor"),lineWidth:a.get("borderWidth")}}))},e.prototype.getControllerVisual=function(r,a,n){n=n||{};var i=n.forceState,o=this.visualMapModel,s={};if(a==="color"){var l=o.get("contentColor");s.color=l}function u(v){return s[v]}function c(v,m){s[v]=m}var d=o.controllerVisuals[i||o.getValueState(r)],h=Xn.prepareVisualTypes(d);return z(h,function(v){var m=d[v];n.convertOpacityToAlpha&&v==="opacity"&&(v="colorAlpha",m=d.__alphaForOpacity),Xn.dependsOn(v,a)&&m&&m.applyVisual(r,u,c)}),s[a]},e.prototype.positionGroup=function(r){var a=this.visualMapModel,n=this.api,i=Ln(a,n).refContainer;q_(r,a.getBoxLayoutParams(),i)},e.prototype.doRender=function(r,a,n,i){},e.type="visualMap",e})(oa),y7=[["left","right","width"],["top","bottom","height"]];function iQ(t,e,r){var a=t.option,n=a.align;if(n!=null&&n!=="auto")return n;for(var i={width:e.getWidth(),height:e.getHeight()},o=a.orient==="horizontal"?1:0,s=y7[o],l=[0,null,10],u={},c=0;c<3;c++)u[y7[1-o][c]]=l[c],u[s[c]]=c===2?r[0]:a[s[c]];var d=[["x","width",3],["y","height",0]][o],h=ha(u,i,a.padding);return s[(h.margin[d[2]]||0)+h[d[0]]+h[d[1]]*.5<i[d[1]]*.5?0:1]}function Aw(t,e){return z(t||[],function(r){r.dataIndex!=null&&(r.dataIndexInside=r.dataIndex,r.dataIndex=null),r.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var Al=pr,SDe=z,x7=Math.min,iA=Math.max,_De=12,TDe=6,CDe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._shapes={},r._dataInterval=[],r._handleEnds=[],r._hoverLinkDataIndices=[],r}return e.prototype.init=function(r,a){t.prototype.init.call(this,r,a),this._hoverLinkFromSeriesMouseOver=je(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=je(this._hideIndicator,this)},e.prototype.doRender=function(r,a,n,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var r=this.visualMapModel,a=this.group;this._orient=r.get("orient"),this._useHandle=r.get("calculable"),this._resetInterval(),this._renderBar(a);var n=r.get("text");this._renderEndsText(a,n,0),this._renderEndsText(a,n,1),this._updateView(!0),this.renderBackground(a),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(a)},e.prototype._renderEndsText=function(r,a,n){if(a){var i=a[1-n];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,n===0?-s:l[1]+s],u),d=this._applyTransform(n===0?"bottom":"top",u),h=this._orient,v=this.visualMapModel.textStyleModel;this.group.add(new Qt({style:Fr(v,{x:c[0],y:c[1],verticalAlign:v.get("verticalAlign")||(h==="horizontal"?"middle":d),align:v.get("align")||(h==="horizontal"?d:"center"),text:i})}))}},e.prototype._renderBar=function(r){var a=this.visualMapModel,n=this._shapes,i=a.itemSize,o=this._orient,s=this._useHandle,l=iQ(a,this.api,i),u=n.mainGroup=this._createBarGroup(l),c=new Qe;u.add(c),c.add(n.outOfRange=b7()),c.add(n.inRange=b7(null,s?S7(this._orient):null,je(this._dragHandle,this,"all",!1),je(this._dragHandle,this,"all",!0))),c.setClipPath(new Et({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var d=a.textStyleModel.getTextRect("国"),h=iA(d.width,d.height);s&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(a,u,0,i,h,o),this._createHandle(a,u,1,i,h,o)),this._createIndicator(a,u,i,h,o),r.add(u)},e.prototype._createHandle=function(r,a,n,i,o,s){var l=je(this._dragHandle,this,n,!1),u=je(this._dragHandle,this,n,!0),c=Ks(r.get("handleSize"),i[0]),d=mn(r.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=S7(this._orient);d.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(w){ec(w.event)}}),d.x=i[0]/2,d.useStyle(r.getModel("handleStyle").getItemStyle()),d.setStyle({strokeNoScale:!0,strokeFirst:!0}),d.style.lineWidth*=2,d.ensureState("emphasis").style=r.getModel(["emphasis","handleStyle"]).getItemStyle(),sh(d,!0),a.add(d);var v=this.visualMapModel.textStyleModel,m=new Qt({cursor:h,draggable:!0,drift:l,onmousemove:function(w){ec(w.event)},ondragend:u,style:Fr(v,{x:0,y:0,text:""})});m.ensureState("blur").style={opacity:.1},m.stateTransition={duration:200},this.group.add(m);var x=[c,0],b=this._shapes;b.handleThumbs[n]=d,b.handleLabelPoints[n]=x,b.handleLabels[n]=m},e.prototype._createIndicator=function(r,a,n,i,o){var s=Ks(r.get("indicatorSize"),n[0]),l=mn(r.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var u=r.getModel("indicatorStyle").getItemStyle();if(l instanceof li){var c=l.style;l.useStyle(ve({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);a.add(l);var d=this.visualMapModel.textStyleModel,h=new Qt({silent:!0,invisible:!0,style:Fr(d,{x:0,y:0,text:""})});this.group.add(h);var v=[(o==="horizontal"?i/2:TDe)+n[0]/2,0],m=this._shapes;m.indicator=l,m.indicatorLabel=h,m.indicatorLabelPoint=v,this._firstShowIndicator=!0},e.prototype._dragHandle=function(r,a,n,i){if(this._useHandle){if(this._dragging=!a,!a){var o=this._applyTransform([n,i],this._shapes.mainGroup,!0);this._updateInterval(r,o[1]),this._hideIndicator(),this._updateView()}a===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),a?!this._hovering&&this._clearHoverLinkToSeries():w7(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[r],!1)}},e.prototype._resetInterval=function(){var r=this.visualMapModel,a=this._dataInterval=r.getSelected(),n=r.getExtent(),i=[0,r.itemSize[1]];this._handleEnds=[Al(a[0],n,i,!0),Al(a[1],n,i,!0)]},e.prototype._updateInterval=function(r,a){a=a||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];jd(a,i,o,r,0);var s=n.getExtent();this._dataInterval=[Al(i[0],o,s,!0),Al(i[1],o,s,!0)]},e.prototype._updateView=function(r){var a=this.visualMapModel,n=a.getExtent(),i=this._shapes,o=[0,a.itemSize[1]],s=r?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,n,s,"inRange"),u=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(r,a,n,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(r,o),l=[this.getControllerVisual(r[0],"symbolSize",o),this.getControllerVisual(r[1],"symbolSize",o)],u=this._createBarPoints(n,l);return{barColor:new ym(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(r,a){var n=100,i=[],o=(r[1]-r[0])/n;i.push({color:this.getControllerVisual(r[0],"color",a),offset:0});for(var s=1;s<n;s++){var l=r[0]+o*s;if(l>r[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(r[1],"color",a),offset:1}),i},e.prototype._createBarPoints=function(r,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],r[0]],[n[0],r[0]],[n[0],r[1]],[n[0]-a[1],r[1]]]},e.prototype._createBarGroup=function(r){var a=this._orient,n=this.visualMapModel.get("inverse");return new Qe(a==="horizontal"&&!n?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},e.prototype._updateHandle=function(r,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),c=this._applyTransform("left",n.mainGroup);SDe([0,1],function(d){var h=o[d];h.setStyle("fill",a.handlesColor[d]),h.y=r[d];var v=Al(r[d],[0,l[1]],u,!0),m=this.getControllerVisual(v,"symbolSize");h.scaleX=h.scaleY=m/l[0],h.x=l[0]-m/2;var x=Ws(n.handleLabelPoints[d],Sh(h,this.group));if(this._orient==="horizontal"){var b=c==="left"||c==="top"?(l[0]-m)/2:(l[0]-m)/-2;x[1]+=b}s[d].setStyle({x:x[0],y:x[1],text:i.formatValueText(this._dataInterval[d]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(r,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,d=c.indicator;if(d){d.attr("invisible",!1);var h={convertOpacityToAlpha:!0},v=this.getControllerVisual(r,"color",h),m=this.getControllerVisual(r,"symbolSize"),x=Al(r,s,u,!0),b=l[0]-m/2,w={x:d.x,y:d.y};d.y=x,d.x=b;var _=Ws(c.indicatorLabelPoint,Sh(d,this.group)),T=c.indicatorLabel;T.attr("invisible",!1);var C=this._applyTransform("left",c.mainGroup),k=this._orient,A=k==="horizontal";T.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:A?C:"middle",align:A?"center":C});var M={x:b,y:x,style:{fill:v}},L={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var R={duration:100,easing:"cubicInOut",additive:!0};d.x=w.x,d.y=w.y,d.animateTo(M,R),T.animateTo(L,R)}else d.attr(M),T.attr(L);this._firstShowIndicator=!1;var P=this._shapes.handleLabels;if(P)for(var j=0;j<P.length;j++)this.api.enterBlur(P[j])}},e.prototype._enableHoverLinkToSeries=function(){var r=this;this._shapes.mainGroup.on("mousemove",function(a){if(r._hovering=!0,!r._dragging){var n=r.visualMapModel.itemSize,i=r._applyTransform([a.offsetX,a.offsetY],r._shapes.mainGroup,!0,!0);i[1]=x7(iA(0,i[1]),n[1]),r._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}}).on("mouseout",function(){r._hovering=!1,!r._dragging&&r._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var r=this.api.getZr();this.visualMapModel.option.hoverLink?(r.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),r.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(r,a){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var o=[0,i[1]],s=n.getExtent();r=x7(iA(o[0],r),o[1]);var l=kDe(n,s,o),u=[r-l,r+l],c=Al(r,o,s,!0),d=[Al(u[0],o,s,!0),Al(u[1],o,s,!0)];u[0]<o[0]&&(d[0]=-1/0),u[1]>o[1]&&(d[1]=1/0),a&&(d[0]===-1/0?this._showIndicator(c,d[1],"< ",l):d[1]===1/0?this._showIndicator(c,d[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,v=[];(a||w7(n))&&(v=this._hoverLinkDataIndices=n.findTargetDataIndices(d));var m=xhe(h,v);this._dispatchHighDown("downplay",Aw(m[0],n)),this._dispatchHighDown("highlight",Aw(m[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(r){var a;if(uh(r.target,function(l){var u=dt(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n<a.length;n++)this.api.leaveBlur(a[n])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var r=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Aw(r,this.visualMapModel)),r.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var r=this.api.getZr();r.off("mouseover",this._hoverLinkFromSeriesMouseOver),r.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(r,a,n,i){var o=Sh(a,i?null:this.group);return be(r)?Ws(r,o,n):$_(r,o,n)},e.prototype._dispatchHighDown=function(r,a){a&&a.length&&this.api.dispatchAction({type:r,batch:a})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e})(nQ);function b7(t,e,r,a){return new ji({shape:{points:t},draggable:!!r,cursor:e,drift:r,onmousemove:function(n){ec(n.event)},ondragend:a})}function kDe(t,e,r){var a=_De/2,n=t.get("hoverLinkDataSize");return n&&(a=Al(n,e,r,!0)/2),a}function w7(t){var e=t.get("hoverLinkOnHandle");return!!(e??t.get("realtime"))}function S7(t){return t==="vertical"?"ns-resize":"ew-resize"}var NDe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},ADe=function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(r){r.setSelected(t.selected)})},MDe=[{createOnAllSeries:!0,reset:function(t,e){var r=[];return e.eachComponent("visualMap",function(a){var n=t.pipelineContext;!a.isTargetSeries(t)||n&&n.large||r.push(ZAe(a.stateList,a.targetVisuals,je(a.getValueState,a),a.getDataDimensionIndex(t.getData())))}),r}},{createOnAllSeries:!0,reset:function(t,e){var r=t.getData(),a=[];e.eachComponent("visualMap",function(n){if(n.isTargetSeries(t)){var i=n.getVisualMeta(je(DDe,null,t,n))||{stops:[],outerColors:[]},o=n.getDataDimensionIndex(r);o>=0&&(i.dimension=o,a.push(i))}}),t.getData().setVisual("visualMeta",a)}}];function DDe(t,e,r,a){for(var n=e.targetVisuals[a],i=Xn.prepareVisualTypes(n),o={color:Jy(t.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],c=n[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(r,d,h)}return o.color;function d(v){return o[v]}function h(v,m){o[v]=m}}var _7=z;function LDe(t){var e=t&&t.visualMap;be(e)||(e=e?[e]:[]),_7(e,function(r){if(r){Kv(r,"splitList")&&!Kv(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var a=r.pieces;a&&be(a)&&_7(a,function(n){it(n)&&(Kv(n,"start")&&!Kv(n,"min")&&(n.min=n.start),Kv(n,"end")&&!Kv(n,"max")&&(n.max=n.end))})}})}function Kv(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var T7=!1;function oQ(t){T7||(T7=!0,t.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),t.registerAction(NDe,ADe),z(MDe,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(LDe))}function sQ(t){t.registerComponentModel(wDe),t.registerComponentView(CDe),oQ(t)}var EDe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._pieceList=[],r}return e.prototype.optionUpdated=function(r,a){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],RDe[this._mode].call(this,this._pieceList),this._resetSelected(r,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=et(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=Se(this._pieceList,function(l){return l=et(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var r=this.option,a={},n=Xn.listVisualTypes(),i=this.isCategory();z(r.pieces,function(s){z(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),z(a,function(s,l){var u=!1;z(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&z(this.stateList,function(c){(r[c]||(r[c]={}))[l]=aQ.get(l,c==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(r,a){var n=this.option,i=this._pieceList,o=(a?n:r).selected||{};if(n.selected=o,z(i,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),n.selectedMode==="single"){var s=!1;z(i,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(r){this.option.selected=et(r)},e.prototype.getValueState=function(r){var a=Xn.findPieceIndex(r,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=Xn.findPieceIndex(l,n);c===r&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},e.prototype.getRepresentValue=function(r){var a;if(this.isCategory())a=r.value;else if(r.value!=null)a=r.value;else{var n=r.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},e.prototype.getVisualMeta=function(r){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(c,d){var h=i.getRepresentValue({interval:c});d||(d=i.getValueState(h));var v=r(h,d);c[0]===-1/0?n[0]=v:c[1]===1/0?n[1]=v:a.push({value:c[0],color:v},{value:c[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return z(s,function(c){var d=c.interval;d&&(d[0]>u&&o([u,d[0]],"outOfRange"),o(d.slice()),u=d[1])},this),{stops:a,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=$d(qS.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e})(qS),RDe={splitNumber:function(t){var e=this.option,r=Math.min(e.precision,20),a=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(r)!==i&&r<5;)r++;e.precision=r,i=+i.toFixed(r),e.minOpen&&t.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o<n;s+=i,o++){var l=o===n-1?a[1]:s+i;t.push({interval:[s,l],close:[1,1]})}e.maxOpen&&t.push({interval:[a[1],1/0],close:[0,0]}),W4(t),z(t,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(t){var e=this.option;z(e.categories,function(r){t.push({text:this.formatValueText(r,!0),value:r})},this),C7(e,t)},pieces:function(t){var e=this.option;z(e.pieces,function(r,a){it(r)||(r={value:r});var n={text:"",index:a};if(r.label!=null&&(n.text=r.label),r.hasOwnProperty("value")){var i=n.value=r.value;n.interval=[i,i],n.close=[1,1]}else{for(var o=n.interval=[],s=n.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],d=0;d<2;d++){for(var h=[["gte","gt","min"],["lte","lt","max"]][d],v=0;v<3&&o[d]==null;v++)o[d]=r[h[v]],s[d]=l[v],c[d]=v===2;o[d]==null&&(o[d]=u[d])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(n.value=o[0])}n.visual=Xn.retrieveVisuals(r),t.push(n)},this),C7(e,t),W4(t),z(t,function(r){var a=r.close,n=[["<","≤"][a[1]],[">","≥"][a[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,n)},this)}};function C7(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var PDe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.doRender=function(){var r=this.group;r.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=this._getItemAlign(),s=a.itemSize,l=this._getViewData(),u=l.endsText,c=yi(a.get("showLabel",!0),!u),d=!a.get("selectedMode");u&&this._renderEndsText(r,u[0],s,c,o),z(l.viewPieceList,function(h){var v=h.piece,m=new Qe;m.onclick=je(this._onItemClick,this,v),this._enableHoverLink(m,h.indexInModelPieceList);var x=a.getRepresentValue(v);if(this._createItemSymbol(m,x,[0,0,s[0],s[1]],d),c){var b=this.visualMapModel.getValueState(x),w=i.get("align")||o;m.add(new Qt({style:Fr(i,{x:w==="right"?-n:s[0]+n,y:s[1]/2,text:v.text,verticalAlign:i.get("verticalAlign")||"middle",align:w,opacity:$e(i.get("opacity"),b==="outOfRange"?.5:1)}),silent:d}))}r.add(m)},this),u&&this._renderEndsText(r,u[1],s,c,o),_h(a.get("orient"),r,a.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},e.prototype._enableHoverLink=function(r,a){var n=this;r.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:Aw(s.findTargetDataIndices(a),s)})}},e.prototype._getItemAlign=function(){var r=this.visualMapModel,a=r.option;if(a.orient==="vertical")return iQ(r,this.api,r.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(r,a,n,i,o){if(a){var s=new Qe,l=this.visualMapModel.textStyleModel;s.add(new Qt({style:Fr(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),r.add(s)}},e.prototype._getViewData=function(){var r=this.visualMapModel,a=Se(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=r.get("text"),i=r.get("orient"),o=r.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},e.prototype._createItemSymbol=function(r,a,n,i){var o=mn(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,r.add(o)},e.prototype._onItemClick=function(r){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=et(n.selected),s=a.getSelectedMapKey(r);i==="single"||i===!0?(o[s]=!0,z(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e})(nQ);function lQ(t){t.registerComponentModel(EDe),t.registerComponentView(PDe),oQ(t)}function IDe(t){Nt(sQ),Nt(lQ)}var jDe=(function(){function t(e){this._thumbnailModel=e}return t.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},t.prototype.renderContent=function(e){var r=e.api.getViewOfComponentModel(this._thumbnailModel);r&&(e.group.silent=!0,r.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:RW(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},t.prototype.updateWindow=function(e,r){var a=r.getViewOfComponentModel(this._thumbnailModel);a&&a.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},t})(),ODe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.optionUpdated=function(r,a){this._updateBridge()},e.prototype._updateBridge=function(){var r=this._birdge=this._birdge||new jDe(this);if(this._target=null,this.ecModel.eachSeries(function(n){ZV(n,null)}),this.shouldShow()){var a=this.getTarget();ZV(a.baseMapProvider,r)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var r=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return r?r.subType!=="graph"&&(r=null):r=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:r},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:ne.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:ne.color.neutral30,borderColor:ne.color.neutral40,opacity:.3},z:10},e})(Gt),zDe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,a,n){if(this._api=n,this._model=r,this._coordSys||(this._coordSys=new Qh),!this._isEnabled()){this._clear();return}this._renderVersion=n.getMainProcessVersion();var i=this.group;i.removeAll();var o=r.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=a.get("backgroundColor")||ne.color.neutral00);var l=Ln(r,n).refContainer,u=ha(rY(r,!0),l),c=s.lineWidth||0,d=this._contentRect=Rh(u.clone(),c/2,!0,!0),h=new Qe;i.add(h),h.setClipPath(new Et({shape:d.plain()}));var v=this._targetGroup=new Qe;h.add(v);var m=u.plain();m.r=o.getShallow("borderRadius",!0),i.add(this._bgRect=new Et({style:s,shape:m,silent:!1,cursor:"grab"}));var x=r.getModel("windowStyle"),b=x.getShallow("borderRadius",!0);h.add(this._windowRect=new Et({shape:{x:0,y:0,width:0,height:0,r:b},style:x.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),N7(r,this)},e.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),N7(this._model,this))},e.prototype._dealRenderContent=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var a=this._targetGroup,n=this._coordSys,i=this._contentRect;if(a.removeAll(),!!r){var o=r.group,s=o.getBoundingRect();a.add(o),this._bgRect.z2=r.z2Range.min-10,n.setBoundingRect(s.x,s.y,s.width,s.height);var l=ha({left:"center",top:"center",aspect:s.width/s.height},i);n.setViewRect(l.x,l.y,l.width,l.height),o.attr(n.getTransformInfo().raw),this._windowRect.z2=r.z2Range.max+10,this._resetRoamController(r.roamType)}}},e.prototype.updateWindow=function(r){var a=this._bridgeRendered;a&&a.renderVersion===r.renderVersion&&(a.targetTrans=r.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var a=Zs([],r.targetTrans),n=Ul([],this._coordSys.transform,a);this._transThisToTarget=Zs([],n);var i=r.viewportRect;i?i=i.clone():i=new ot(0,0,this._api.getWidth(),this._api.getHeight()),i.applyTransform(n);var o=this._windowRect,s=o.shape.r;o.setShape(nt({r:s},i))}},e.prototype._resetRoamController=function(r){var a=this,n=this._api,i=this._roamController;if(i||(i=this._roamController=new Kh(n.getZr())),!r||!this._isEnabled()){i.disable();return}i.enable(r,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return a._contentRect.contain(s,l)}}}),i.off("pan").off("zoom").on("pan",je(this._onPan,this)).on("zoom",je(this._onZoom,this))},e.prototype._onPan=function(r){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var n=tn([],[r.oldX,r.oldY],a),i=tn([],[r.oldX-r.dx,r.oldY-r.dy],a);this._api.dispatchAction(k7(this._model.getTarget().baseMapProvider,{dx:i[0]-n[0],dy:i[1]-n[1]}))}},e.prototype._onZoom=function(r){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var n=tn([],[r.originX,r.originY],a);this._api.dispatchAction(k7(this._model.getTarget().baseMapProvider,{zoom:1/r.scale,originX:n[0],originY:n[1]}))}},e.prototype._isEnabled=function(){var r=this._model;if(!r||!r.shouldShow())return!1;var a=r.getTarget().baseMapProvider;return!!a},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e})(oa);function k7(t,e){var r=t.mainType==="series"?t.subType+"Roam":t.mainType+"Roam",a={type:r};return a[t.mainType+"Id"]=t.id,ve(a,e),a}function N7(t,e){var r=Ph(t);W_(e.group,r.z,r.zlevel)}function BDe(t){t.registerComponentModel(ODe),t.registerComponentView(zDe)}var VDe={label:{enabled:!0},decal:{show:!1}},A7=jt(),FDe={};function GDe(t,e){var r=t.getModel("aria");if(!r.get("enabled"))return;var a=et(VDe);Ct(a.label,t.getLocaleModel().get("aria"),!1),Ct(r.option,a,!1),n(),i();function n(){var u=r.getModel("decal"),c=u.get("show");if(c){var d=He();t.eachSeries(function(h){if(!h.isColorBySeries()){var v=d.get(h.type);v||(v={},d.set(h.type,v)),A7(h).scope=v}}),t.eachRawSeries(function(h){if(t.isSeriesFiltered(h))return;if(Ke(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var _=sD(h.ecModel,h.name,FDe,t.getSeriesCount()),T=v.getVisual("decal");v.setVisual("decal",C(T,_))}else{var m=h.getRawData(),x={},b=A7(h).scope;v.each(function(k){var A=v.getRawIndex(k);x[A]=k});var w=m.count();m.each(function(k){var A=x[k],M=m.getName(k)||k+"",L=sD(h.ecModel,M,b,w),R=v.getItemVisual(A,"decal");v.setItemVisual(A,"decal",C(R,L))})}function C(k,A){var M=k?ve(ve({},A),k):A;return M.dirty=!0,M}})}}function i(){var u=e.getZr().dom;if(u){var c=t.getLocaleModel().get("aria"),d=r.getModel("label");if(d.option=nt(d.option,c),!!d.get("enabled")){if(u.setAttribute("role","img"),d.get("description")){u.setAttribute("aria-label",d.get("description"));return}var h=t.getSeriesCount(),v=d.get(["data","maxCount"])||10,m=d.get(["series","maxCount"])||10,x=Math.min(h,m),b;if(!(h<1)){var w=s();if(w){var _=d.get(["general","withTitle"]);b=o(_,{title:w})}else b=d.get(["general","withoutTitle"]);var T=[],C=h>1?d.get(["series","multiple","prefix"]):d.get(["series","single","prefix"]);b+=o(C,{seriesCount:h}),t.eachSeries(function(L,R){if(R<x){var P=void 0,j=L.get("name"),V=j?"withName":"withoutName";P=h>1?d.get(["series","multiple",V]):d.get(["series","single",V]),P=o(P,{seriesId:L.seriesIndex,seriesName:L.get("name"),seriesType:l(L.subType)});var I=L.getData();if(I.count()>v){var F=d.get(["data","partialData"]);P+=o(F,{displayCnt:v})}else P+=d.get(["data","allData"]);for(var G=d.get(["data","separator","middle"]),O=d.get(["data","separator","end"]),U=d.get(["data","excludeDimensionId"]),$=[],K=0;K<I.count();K++)if(K<v){var q=I.getName(K),H=U?mr(I.getValues(K),function(te,ie){return St(U,ie)===-1}):I.getValues(K),Z=d.get(["data",q?"withName":"withoutName"]);$.push(o(Z,{name:q,value:H.join(G)}))}P+=$.join(G)+O,T.push(P)}});var k=d.getModel(["series","multiple","separator"]),A=k.get("middle"),M=k.get("end");b+=T.join(A)+M,u.setAttribute("aria-label",b)}}}}function o(u,c){if(!Ie(u))return u;var d=u;return z(c,function(h,v){d=d.replace(new RegExp("\\{\\s*"+v+"\\s*\\}","g"),h)}),d}function s(){var u=t.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=t.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function HDe(t){if(!(!t||!t.aria)){var e=t.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},z(["description","general","series","data"],function(r){e[r]!=null&&(e.label[r]=e[r])})}}function UDe(t){t.registerPreprocessor(HDe),t.registerVisual(t.PRIORITY.VISUAL.ARIA,GDe)}var M7={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},$De=(function(){function t(e){var r=this._condVal=Ie(e)?new RegExp(e):Lde(e)?e:null;if(r==null){var a="";cr(a)}}return t.prototype.evaluate=function(e){var r=typeof e;return Ie(r)?this._condVal.test(e):qt(r)?this._condVal.test(e+""):!1},t})(),WDe=(function(){function t(){}return t.prototype.evaluate=function(){return this.value},t})(),YDe=(function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r<e.length;r++)if(!e[r].evaluate())return!1;return!0},t})(),XDe=(function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r<e.length;r++)if(e[r].evaluate())return!0;return!1},t})(),qDe=(function(){function t(){}return t.prototype.evaluate=function(){return!this.child.evaluate()},t})(),ZDe=(function(){function t(){}return t.prototype.evaluate=function(){for(var e=!!this.valueParser,r=this.getValue,a=r(this.valueGetterParam),n=e?this.valueParser(a):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?n:a))return!1;return!0},t})();function aP(t,e){if(t===!0||t===!1){var r=new WDe;return r.value=t,r}var a="";return uQ(t)||cr(a),t.and?D7("and",t,e):t.or?D7("or",t,e):t.not?KDe(t,e):QDe(t,e)}function D7(t,e,r){var a=e[t],n="";be(a)||cr(n),a.length||cr(n);var i=t==="and"?new YDe:new XDe;return i.children=Se(a,function(o){return aP(o,r)}),i.children.length||cr(n),i}function KDe(t,e){var r=t.not,a="";uQ(r)||cr(a);var n=new qDe;return n.child=aP(r,e),n.child||cr(a),n}function QDe(t,e){for(var r="",a=e.prepareGetValue(t),n=[],i=Wt(t),o=t.parser,s=o?TY(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=Ve(M7,u)?M7[u]:u,d=t[u],h=s?s(d):d,v=Pme(c,h)||c==="reg"&&new $De(h);v||cr(r),n.push(v)}}n.length||cr(r);var m=new ZDe;return m.valueGetterParam=a,m.valueParser=s,m.getValue=e.getValue,m.subCondList=n,m}function uQ(t){return it(t)&&!Ri(t)}var JDe=(function(){function t(e,r){this._cond=aP(e,r)}return t.prototype.evaluate=function(){return this._cond.evaluate()},t})();function eLe(t,e){return new JDe(t,e)}var tLe={type:"echarts:filter",transform:function(t){for(var e=t.upstream,r,a=eLe(t.config,{valueGetterAttrMap:He({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;Ve(s,"dimension")||cr(l);var c=e.getDimensionInfo(u);return c||cr(l),{dimIdx:c.index}},getValue:function(s){return e.retrieveValueFromItem(r,s.dimIdx)}}),n=[],i=0,o=e.count();i<o;i++)r=e.getRawDataItem(i),a.evaluate()&&n.push(r);return{data:n}}},rLe={type:"echarts:sort",transform:function(t){var e=t.upstream,r=t.config,a="",n=Ir(r);n.length||cr(a);var i=[];z(n,function(c){var d=c.dimension,h=c.order,v=c.parser,m=c.incomparable;if(d==null&&cr(a),h!=="asc"&&h!=="desc"&&cr(a),m&&m!=="min"&&m!=="max"){var x="";cr(x)}if(h!=="asc"&&h!=="desc"){var b="";cr(b)}var w=e.getDimensionInfo(d);w||cr(a);var _=v?TY(v):null;v&&!_&&cr(a),i.push({dimIdx:w.index,parser:_,comparator:new kY(h,m)})});var o=e.sourceFormat;o!==si&&o!==Bo&&cr(a);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,d){for(var h=0;h<i.length;h++){var v=i[h],m=e.retrieveValueFromItem(c,v.dimIdx),x=e.retrieveValueFromItem(d,v.dimIdx);v.parser&&(m=v.parser(m),x=v.parser(x));var b=v.comparator.evaluate(m,x);if(b!==0)return b}return 0}),{data:s}}};function aLe(t){t.registerTransform(tLe),t.registerTransform(rLe)}var nLe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.prototype.init=function(r,a,n){t.prototype.init.call(this,r,a,n),this._sourceManager=new DY(this),sB(this)},e.prototype.mergeOption=function(r,a){t.prototype.mergeOption.call(this,r,a),sB(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Ys},e})(Gt),iLe=(function(t){se(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.type="dataset",e})(oa);function oLe(t){t.registerComponentModel(nLe),t.registerComponentView(iLe)}var Cl=Ql.CMD;function _p(t,e){return Math.abs(t-e)<1e-5}function wL(t){var e=t.data,r=t.len(),a=[],n,i=0,o=0,s=0,l=0;function u(I,F){n&&n.length>2&&a.push(n),n=[I,F]}function c(I,F,G,O){_p(I,G)&&_p(F,O)||n.push(I,F,G,O,G,O)}function d(I,F,G,O,U,$){var K=Math.abs(F-I),q=Math.tan(K/4)*4/3,H=F<I?-1:1,Z=Math.cos(I),te=Math.sin(I),ie=Math.cos(F),ce=Math.sin(F),me=Z*U+G,ze=te*$+O,Ce=ie*U+G,ge=ce*$+O,Be=U*q*H,_e=$*q*H;n.push(me-Be*te,ze+_e*Z,Ce+Be*ce,ge-_e*ie,Ce,ge)}for(var h,v,m,x,b=0;b<r;){var w=e[b++],_=b===1;switch(_&&(i=e[b],o=e[b+1],s=i,l=o,(w===Cl.L||w===Cl.C||w===Cl.Q)&&(n=[s,l])),w){case Cl.M:i=s=e[b++],o=l=e[b++],u(s,l);break;case Cl.L:h=e[b++],v=e[b++],c(i,o,h,v),i=h,o=v;break;case Cl.C:n.push(e[b++],e[b++],e[b++],e[b++],i=e[b++],o=e[b++]);break;case Cl.Q:h=e[b++],v=e[b++],m=e[b++],x=e[b++],n.push(i+2/3*(h-i),o+2/3*(v-o),m+2/3*(h-m),x+2/3*(v-x),m,x),i=m,o=x;break;case Cl.A:var T=e[b++],C=e[b++],k=e[b++],A=e[b++],M=e[b++],L=e[b++]+M;b+=1;var R=!e[b++];h=Math.cos(M)*k+T,v=Math.sin(M)*A+C,_?(s=h,l=v,u(s,l)):c(i,o,h,v),i=Math.cos(L)*k+T,o=Math.sin(L)*A+C;for(var P=(R?-1:1)*Math.PI/2,j=M;R?j>L:j<L;j+=P){var V=R?Math.max(j+P,L):Math.min(j+P,L);d(j,V,T,C,k,A)}break;case Cl.R:s=i=e[b++],l=o=e[b++],h=s+e[b++],v=l+e[b++],u(h,l),c(h,l,h,v),c(h,v,s,v),c(s,v,s,l),c(s,l,h,l);break;case Cl.Z:n&&c(i,o,s,l),i=s,o=l;break}}return n&&n.length>2&&a.push(n),a}function SL(t,e,r,a,n,i,o,s,l,u){if(_p(t,r)&&_p(e,a)&&_p(n,o)&&_p(i,s)){l.push(o,s);return}var c=2/u,d=c*c,h=o-t,v=s-e,m=Math.sqrt(h*h+v*v);h/=m,v/=m;var x=r-t,b=a-e,w=n-o,_=i-s,T=x*x+b*b,C=w*w+_*_;if(T<d&&C<d){l.push(o,s);return}var k=h*x+v*b,A=-h*w-v*_,M=T-k*k,L=C-A*A;if(M<d&&k>=0&&L<d&&A>=0){l.push(o,s);return}var R=[],P=[];Ed(t,r,n,o,.5,R),Ed(e,a,i,s,.5,P),SL(R[0],P[0],R[1],P[1],R[2],P[2],R[3],P[3],l,u),SL(R[4],P[4],R[5],P[5],R[6],P[6],R[7],P[7],l,u)}function sLe(t,e){var r=wL(t),a=[];e=e||1;for(var n=0;n<r.length;n++){var i=r[n],o=[],s=i[0],l=i[1];o.push(s,l);for(var u=2;u<i.length;){var c=i[u++],d=i[u++],h=i[u++],v=i[u++],m=i[u++],x=i[u++];SL(s,l,c,d,h,v,m,x,o,e),s=m,l=x}a.push(o)}return a}function cQ(t,e,r){var a=t[e],n=t[1-e],i=Math.abs(a/n),o=Math.ceil(Math.sqrt(i*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,d=r-c;if(d>0)for(var u=0;u<d;u++)l[u%o]+=1;return l}function L7(t,e,r){for(var a=t.r0,n=t.r,i=t.startAngle,o=t.endAngle,s=Math.abs(o-i),l=s*n,u=n-a,c=l>Math.abs(u),d=cQ([l,u],c?0:1,e),h=(c?s:u)/d.length,v=0;v<d.length;v++)for(var m=(c?u:s)/d[v],x=0;x<d[v];x++){var b={};c?(b.startAngle=i+h*v,b.endAngle=i+h*(v+1),b.r0=a+m*x,b.r=a+m*(x+1)):(b.startAngle=i+m*x,b.endAngle=i+m*(x+1),b.r0=a+h*v,b.r=a+h*(v+1)),b.clockwise=t.clockwise,b.cx=t.cx,b.cy=t.cy,r.push(b)}}function lLe(t,e,r){for(var a=t.width,n=t.height,i=a>n,o=cQ([a,n],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",c=i?"y":"x",d=t[s]/o.length,h=0;h<o.length;h++)for(var v=t[l]/o[h],m=0;m<o[h];m++){var x={};x[u]=h*d,x[c]=m*v,x[s]=d,x[l]=v,x.x+=t.x,x.y+=t.y,r.push(x)}}function E7(t,e,r,a){return t*a-r*e}function uLe(t,e,r,a,n,i,o,s){var l=r-t,u=a-e,c=o-n,d=s-i,h=E7(c,d,l,u);if(Math.abs(h)<1e-6)return null;var v=t-n,m=e-i,x=E7(v,m,c,d)/h;return x<0||x>1?null:new at(x*l+t,x*u+e)}function cLe(t,e,r){var a=new at;at.sub(a,r,e),a.normalize();var n=new at;at.sub(n,t,e);var i=n.dot(a);return i}function Qv(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function dLe(t,e,r){for(var a=t.length,n=[],i=0;i<a;i++){var o=t[i],s=t[(i+1)%a],l=uLe(o[0],o[1],s[0],s[1],e.x,e.y,r.x,r.y);l&&n.push({projPt:cLe(l,e,r),pt:l,idx:i})}if(n.length<2)return[{points:t},{points:t}];n.sort(function(b,w){return b.projPt-w.projPt});var u=n[0],c=n[n.length-1];if(c.idx<u.idx){var d=u;u=c,c=d}for(var h=[u.pt.x,u.pt.y],v=[c.pt.x,c.pt.y],m=[h],x=[v],i=u.idx+1;i<=c.idx;i++)Qv(m,t[i].slice());Qv(m,v),Qv(m,h);for(var i=c.idx+1;i<=u.idx+a;i++)Qv(x,t[i%a].slice());return Qv(x,h),Qv(x,v),[{points:m},{points:x}]}function R7(t){var e=t.points,r=[],a=[];O_(e,r,a);var n=new ot(r[0],r[1],a[0]-r[0],a[1]-r[1]),i=n.width,o=n.height,s=n.x,l=n.y,u=new at,c=new at;return i>o?(u.x=c.x=s+i/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+i),dLe(e,u,c)}function ZS(t,e,r,a){if(r===1)a.push(e);else{var n=Math.floor(r/2),i=t(e);ZS(t,i[0],n,a),ZS(t,i[1],r-n,a)}return a}function fLe(t,e){for(var r=[],a=0;a<e;a++)r.push(d5(t));return r}function hLe(t,e){e.setStyle(t.style),e.z=t.z,e.z2=t.z2,e.zlevel=t.zlevel}function vLe(t){for(var e=[],r=0;r<t.length;)e.push([t[r++],t[r++]]);return e}function pLe(t,e){var r=[],a=t.shape,n;switch(t.type){case"rect":lLe(a,e,r),n=Et;break;case"sector":L7(a,e,r),n=Ii;break;case"circle":L7({r0:0,r:a.r,startAngle:0,endAngle:Math.PI*2,cx:a.cx,cy:a.cy},e,r),n=Ii;break;default:var i=t.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=Se(sLe(t.getUpdatedPathProxy(),o),function(w){return vLe(w)}),l=s.length;if(l===0)ZS(R7,{points:s[0]},e,r);else if(l===e)for(var u=0;u<l;u++)r.push({points:s[u]});else{var c=0,d=Se(s,function(w){var _=[],T=[];O_(w,_,T);var C=(T[1]-_[1])*(T[0]-_[0]);return c+=C,{poly:w,area:C}});d.sort(function(w,_){return _.area-w.area});for(var h=e,u=0;u<l;u++){var v=d[u];if(h<=0)break;var m=u===l-1?h:Math.ceil(v.area/c*e);m<0||(ZS(R7,{points:v.poly},m,r),h-=m)}}n=ji;break}if(!n)return fLe(t,e);for(var x=[],u=0;u<r.length;u++){var b=new n;b.setShape(r[u]),hLe(t,b),x.push(b)}return x}function mLe(t,e){var r=t.length,a=e.length;if(r===a)return[t,e];for(var n=[],i=[],o=r<a?t:e,s=Math.min(r,a),l=Math.abs(a-r)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,d=[o[0],o[1]],h=l,v=2;v<s;){var m=o[v-2],x=o[v-1],b=o[v++],w=o[v++],_=o[v++],T=o[v++],C=o[v++],k=o[v++];if(h<=0){d.push(b,w,_,T,C,k);continue}for(var A=Math.min(h,c-1)+1,M=1;M<=A;M++){var L=M/A;Ed(m,b,_,C,L,n),Ed(x,w,T,k,L,i),m=n[3],x=i[3],d.push(n[1],i[1],n[2],i[2],m,x),b=n[5],w=i[5],_=n[6],T=i[6]}h-=A-1}return o===t?[d,e]:[t,d]}function P7(t,e){for(var r=t.length,a=t[r-2],n=t[r-1],i=[],o=0;o<e.length;)i[o++]=a,i[o++]=n;return i}function gLe(t,e){for(var r,a,n,i=[],o=[],s=0;s<Math.max(t.length,e.length);s++){var l=t[s],u=e[s],c=void 0,d=void 0;l?u?(r=mLe(l,u),c=r[0],d=r[1],a=c,n=d):(d=P7(n||l,l),c=l):(c=P7(a||u,u),d=u),i.push(c),o.push(d)}return[i,o]}function I7(t){for(var e=0,r=0,a=0,n=t.length,i=0,o=n-2;i<n;o=i,i+=2){var s=t[o],l=t[o+1],u=t[i],c=t[i+1],d=s*c-u*l;e+=d,r+=(s+u)*d,a+=(l+c)*d}return e===0?[t[0]||0,t[1]||0]:[r/e/3,a/e/3,e]}function yLe(t,e,r,a){for(var n=(t.length-2)/6,i=1/0,o=0,s=t.length,l=s-2,u=0;u<n;u++){for(var c=u*6,d=0,h=0;h<s;h+=2){var v=h===0?c:(c+h-2)%l+2,m=t[v]-r[0],x=t[v+1]-r[1],b=e[h]-a[0],w=e[h+1]-a[1],_=b-m,T=w-x;d+=_*_+T*T}d<i&&(i=d,o=u)}return o}function xLe(t){for(var e=[],r=t.length,a=0;a<r;a+=2)e[a]=t[r-a-2],e[a+1]=t[r-a-1];return e}function bLe(t,e,r,a){for(var n=[],i,o=0;o<t.length;o++){var s=t[o],l=e[o],u=I7(s),c=I7(l);i==null&&(i=u[2]<0!=c[2]<0);var d=[],h=[],v=0,m=1/0,x=[],b=s.length;i&&(s=xLe(s));for(var w=yLe(s,l,u,c)*6,_=b-2,T=0;T<_;T+=2){var C=(w+T)%_+2;d[T+2]=s[C]-u[0],d[T+3]=s[C+1]-u[1]}d[0]=s[w]-u[0],d[1]=s[w+1]-u[1];for(var k=a/r,A=-a/2;A<=a/2;A+=k){for(var M=Math.sin(A),L=Math.cos(A),R=0,T=0;T<s.length;T+=2){var P=d[T],j=d[T+1],V=l[T]-c[0],I=l[T+1]-c[1],F=V*L-I*M,G=V*M+I*L;x[T]=F,x[T+1]=G;var O=F-P,U=G-j;R+=O*O+U*U}if(R<m){m=R,v=A;for(var $=0;$<x.length;$++)h[$]=x[$]}}n.push({from:d,to:h,fromCp:u,toCp:c,rotation:-v})}return n}function KS(t){return t.__isCombineMorphing}var dQ="__mOriginal_";function QS(t,e,r){var a=dQ+e,n=t[a]||t[e];t[a]||(t[a]=t[e]);var i=r.replace,o=r.after,s=r.before;t[e]=function(){var l=arguments,u;return s&&s.apply(this,l),i?u=i.apply(this,l):u=n.apply(this,l),o&&o.apply(this,l),u}}function H0(t,e){var r=dQ+e;t[r]&&(t[e]=t[r],t[r]=null)}function j7(t,e){for(var r=0;r<t.length;r++)for(var a=t[r],n=0;n<a.length;){var i=a[n],o=a[n+1];a[n++]=e[0]*i+e[2]*o+e[4],a[n++]=e[1]*i+e[3]*o+e[5]}}function fQ(t,e){var r=t.getUpdatedPathProxy(),a=e.getUpdatedPathProxy(),n=gLe(wL(r),wL(a)),i=n[0],o=n[1],s=t.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&j7(i,s),l&&j7(o,l),QS(e,"updateTransform",{replace:u}),e.transform=null;var c=bLe(i,o,10,Math.PI),d=[];QS(e,"buildPath",{replace:function(h){for(var v=e.__morphT,m=1-v,x=[],b=0;b<c.length;b++){var w=c[b],_=w.from,T=w.to,C=w.rotation*v,k=w.fromCp,A=w.toCp,M=Math.sin(C),L=Math.cos(C);uw(x,k,A,v);for(var R=0;R<_.length;R+=2){var P=_[R],j=_[R+1],V=T[R],I=T[R+1],F=P*m+V*v,G=j*m+I*v;d[R]=F*L-G*M+x[0],d[R+1]=F*M+G*L+x[1]}var O=d[0],U=d[1];h.moveTo(O,U);for(var R=2;R<_.length;){var V=d[R++],I=d[R++],$=d[R++],K=d[R++],q=d[R++],H=d[R++];O===V&&U===I&&$===q&&K===H?h.lineTo(q,H):h.bezierCurveTo(V,I,$,K,q,H),O=q,U=H}}}})}function nP(t,e,r){if(!t||!e)return e;var a=r.done,n=r.during;fQ(t,e),e.__morphT=0;function i(){H0(e,"buildPath"),H0(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},nt({during:function(o){e.dirtyShape(),n&&n(o)},done:function(){i(),a&&a()}},r)),e}function wLe(t,e,r,a,n,i){var o=16;t=n===r?0:Math.round(32767*(t-r)/(n-r)),e=i===a?0:Math.round(32767*(e-a)/(i-a));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,d=0;(t&u)>0&&(c=1),(e&u)>0&&(d=1),s+=u*u*(3*c^d),d===0&&(c===1&&(t=u-1-t,e=u-1-e),l=t,t=e,e=l)}return s}function JS(t){var e=1/0,r=1/0,a=-1/0,n=-1/0,i=Se(t,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),d=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),r=Math.min(d,r),a=Math.max(c,a),n=Math.max(d,n),[c,d]}),o=Se(i,function(s,l){return{cp:s,z:wLe(s[0],s[1],e,r,a,n),path:t[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function hQ(t){return pLe(t.path,t.count)}function _L(){return{fromIndividuals:[],toIndividuals:[],count:0}}function SLe(t,e,r){var a=[];function n(k){for(var A=0;A<k.length;A++){var M=k[A];KS(M)?n(M.childrenRef()):M instanceof zt&&a.push(M)}}n(t);var i=a.length;if(!i)return _L();var o=r.dividePath||hQ,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),_L();a=JS(a),s=JS(s);for(var l=r.done,u=r.during,c=r.individualDelay,d=new Gu,h=0;h<i;h++){var v=a[h],m=s[h];m.parent=e,m.copyTransform(d),c||fQ(v,m)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function x(k){for(var A=0;A<s.length;A++)s[A].addSelfToZr(k)}QS(e,"addSelfToZr",{after:function(k){x(k)}}),QS(e,"removeSelfFromZr",{after:function(k){for(var A=0;A<s.length;A++)s[A].removeSelfFromZr(k)}});function b(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,H0(e,"addSelfToZr"),H0(e,"removeSelfFromZr")}var w=s.length;if(c)for(var _=w,T=function(){_--,_===0&&(b(),l&&l())},h=0;h<w;h++){var C=c?nt({delay:(r.delay||0)+c(h,w,a[h],s[h]),done:T},r):r;nP(a[h],s[h],C)}else e.__morphT=0,e.animateTo({__morphT:1},nt({during:function(k){for(var A=0;A<w;A++){var M=s[A];M.__morphT=e.__morphT,M.dirtyShape()}u&&u(k)},done:function(){b();for(var k=0;k<t.length;k++)H0(t[k],"updateTransform");l&&l()}},r));return e.__zr&&x(e.__zr),{fromIndividuals:a,toIndividuals:s,count:w}}function _Le(t,e,r){var a=e.length,n=[],i=r.dividePath||hQ;function o(v){for(var m=0;m<v.length;m++){var x=v[m];KS(x)?o(x.childrenRef()):x instanceof zt&&n.push(x)}}if(KS(t)){o(t.childrenRef());var s=n.length;if(s<a)for(var l=0,u=s;u<a;u++)n.push(d5(n[l++%s]));n.length=a}else{n=i({path:t,count:a});for(var c=t.getComputedTransform(),u=0;u<n.length;u++)n[u].setLocalTransform(c);if(n.length!==a)return console.error("Invalid morphing: unmatched splitted path"),_L()}n=JS(n),e=JS(e);for(var d=r.individualDelay,u=0;u<a;u++){var h=d?nt({delay:(r.delay||0)+d(u,a,n[u],e[u])},r):r;nP(n[u],e[u],h)}return{fromIndividuals:n,toIndividuals:e,count:e.length}}function O7(t){return be(t[0])}function z7(t,e){for(var r=[],a=t.length,n=0;n<a;n++)r.push({one:t[n],many:[]});for(var n=0;n<e.length;n++){var i=e[n].length,o=void 0;for(o=0;o<i;o++)r[o%a].many.push(e[n][o])}for(var s=0,n=a-1;n>=0;n--)if(!r[n].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var i=l.length,u=Math.ceil(i/2);r[n].many=l.slice(u,i),r[s].many=l.slice(0,u),s++}return r}var TLe={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),a=0;a<t.count;a++){var n=d5(t.path);n.setStyle("opacity",r),e.push(n)}return e},split:null};function oA(t,e,r,a,n,i){if(!t.length||!e.length)return;var o=xm("update",a,n);if(!(o&&o.duration>0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;O7(t)&&(u=t,c=e),O7(e)&&(u=e,c=t);function d(w,_,T,C,k){var A=w.many,M=w.one;if(A.length===1&&!k){var L=_?A[0]:M,R=_?M:A[0];if(KS(L))d({many:[L],one:R},!0,T,C,!0);else{var P=s?nt({delay:s(T,C)},l):l;nP(L,R,P),i(L,R,L,R,P)}}else for(var j=nt({dividePath:TLe[r],individualDelay:s&&function(U,$,K,q){return s(U+T,C)}},l),V=_?SLe(A,M,j):_Le(M,A,j),I=V.fromIndividuals,F=V.toIndividuals,G=I.length,O=0;O<G;O++){var P=s?nt({delay:s(O,G)},l):l;i(I[O],F[O],_?A[O]:w.one,_?w.one:A[O],P)}}for(var h=u?u===t:t.length>e.length,v=u?z7(c,u):z7(h?e:t,[h?t:e]),m=0,x=0;x<v.length;x++)m+=v[x].many.length;for(var b=0,x=0;x<v.length;x++)d(v[x],h,b,m),b+=v[x].many.length}function Zf(t){if(!t)return[];if(be(t)){for(var e=[],r=0;r<t.length;r++)e.push(Zf(t[r]));return e}var a=[];return t.traverse(function(n){n instanceof zt&&!n.disableMorphing&&!n.invisible&&!n.ignore&&a.push(n)}),a}var vQ=1e4,CLe=0,B7=1,V7=2,kLe=jt();function NLe(t,e){for(var r=t.dimensions,a=0;a<r.length;a++){var n=t.getDimensionInfo(r[a]);if(n&&n.otherDims[e]===0)return r[a]}}function ALe(t,e,r){var a=t.getDimensionInfo(r),n=a&&a.ordinalMeta;if(a){var i=t.get(a.name,e);return n&&n.categories[i]||i+""}}function F7(t,e,r,a){var n=a?"itemChildGroupId":"itemGroupId",i=NLe(t,n);if(i){var o=ALe(t,e,i);return o}var s=t.getRawDataItem(e),l=a?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!a)return r||t.getId(e)}function G7(t){var e=[];return z(t,function(r){var a=r.data,n=r.dataGroupId;if(!(a.count()>vQ))for(var i=a.getIndices(),o=0;o<i.length;o++)e.push({data:a,groupId:F7(a,o,n,!1),childGroupId:F7(a,o,n,!0),divide:r.divide,dataIndex:o})}),e}function sA(t,e,r){t.traverse(function(a){a instanceof zt&&na(a,{style:{opacity:0}},e,{dataIndex:r,isFrom:!0})})}function lA(t){if(t.parent){var e=t.getComputedTransform();t.setLocalTransform(e),t.parent.remove(t)}}function Jv(t){t.stopAnimation(),t.isGroup&&t.traverse(function(e){e.stopAnimation()})}function MLe(t,e,r){var a=xm("update",r,e);a&&t.traverse(function(n){if(n instanceof xs){var i=spe(n);i&&n.animateFrom({style:i},a)}})}function DLe(t,e){var r=t.length;if(r!==e.length)return!1;for(var a=0;a<r;a++){var n=t[a],i=e[a];if(n.data.getId(n.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function pQ(t,e,r){var a=G7(t),n=G7(e);function i(T,C,k,A,M){(k||T)&&C.animateFrom({style:k&&k!==T?ve(ve({},k.style),T.style):T.style},M)}var o=!1,s=CLe,l=He(),u=He();a.forEach(function(T){T.groupId&&l.set(T.groupId,!0),T.childGroupId&&u.set(T.childGroupId,!0)});for(var c=0;c<n.length;c++){var d=n[c].groupId;if(u.get(d)){s=B7;break}var h=n[c].childGroupId;if(h&&l.get(h)){s=V7;break}}function v(T,C){return function(k){var A=k.data,M=k.dataIndex;return C?A.getId(M):T?s===B7?k.childGroupId:k.groupId:s===V7?k.childGroupId:k.groupId}}var m=DLe(a,n),x={};if(!m)for(var c=0;c<n.length;c++){var b=n[c],w=b.data.getItemGraphicEl(b.dataIndex);w&&(x[w.id]=!0)}function _(T,C){var k=a[C],A=n[T],M=A.data.hostModel,L=k.data.getItemGraphicEl(k.dataIndex),R=A.data.getItemGraphicEl(A.dataIndex);if(L===R){R&&MLe(R,A.dataIndex,M);return}L&&x[L.id]||R&&(Jv(R),L?(Jv(L),lA(L),o=!0,oA(Zf(L),Zf(R),A.divide,M,T,i)):sA(R,M,T))}new nc(a,n,v(!0,m),v(!1,m),null,"multiple").update(_).updateManyToOne(function(T,C){var k=n[T],A=k.data,M=A.hostModel,L=A.getItemGraphicEl(k.dataIndex),R=mr(Se(C,function(P){return a[P].data.getItemGraphicEl(a[P].dataIndex)}),function(P){return P&&P!==L&&!x[P.id]});L&&(Jv(L),R.length?(z(R,function(P){Jv(P),lA(P)}),o=!0,oA(Zf(R),Zf(L),k.divide,M,T,i)):sA(L,M,k.dataIndex))}).updateOneToMany(function(T,C){var k=a[C],A=k.data.getItemGraphicEl(k.dataIndex);if(!(A&&x[A.id])){var M=mr(Se(T,function(R){return n[R].data.getItemGraphicEl(n[R].dataIndex)}),function(R){return R&&R!==A}),L=n[T[0]].data.hostModel;M.length&&(z(M,function(R){return Jv(R)}),A?(Jv(A),lA(A),o=!0,oA(Zf(A),Zf(M),k.divide,L,T[0],i)):z(M,function(R){return sA(R,L,T[0])}))}}).updateManyToMany(function(T,C){new nc(C,T,function(k){return a[k].data.getId(a[k].dataIndex)},function(k){return n[k].data.getId(n[k].dataIndex)}).update(function(k,A){_(T[k],C[A])}).execute()}).execute(),o&&z(e,function(T){var C=T.data,k=C.hostModel,A=k&&r.getViewOfSeriesModel(k),M=xm("update",k,0);A&&k.isAnimationEnabled()&&M&&M.duration>0&&A.group.traverse(function(L){L instanceof zt&&!L.animators.length&&L.animateFrom({style:{opacity:0}},M)})})}function H7(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function U7(t){return be(t)?t.sort().join(","):t}function od(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function LLe(t,e){var r=He(),a=He(),n=He();return z(t.oldSeries,function(i,o){var s=t.oldDataGroupIds[o],l=t.oldData[o],u=H7(i),c=U7(u);a.set(c,{dataGroupId:s,data:l}),be(u)&&z(u,function(d){n.set(d,{key:c,dataGroupId:s,data:l})})}),z(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=H7(i),u=U7(l),c=a.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:od(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:od(s),data:s}]});else if(be(l)){var d=[];z(l,function(m){var x=a.get(m);x.data&&d.push({dataGroupId:x.dataGroupId,divide:od(x.data),data:x.data})}),d.length&&r.set(u,{oldSeries:d,newSeries:[{dataGroupId:o,data:s,divide:od(s)}]})}else{var h=n.get(l);if(h){var v=r.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:od(h.data)}],newSeries:[]},r.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:od(s)})}}}}),r}function $7(t,e){for(var r=0;r<t.length;r++){var a=e.seriesIndex!=null&&e.seriesIndex===t[r].seriesIndex||e.seriesId!=null&&e.seriesId===t[r].id;if(a)return r}}function ELe(t,e,r,a){var n=[],i=[];z(Ir(t.from),function(o){var s=$7(e.oldSeries,o);s>=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:od(e.oldData[s]),groupIdDim:o.dimension})}),z(Ir(t.to),function(o){var s=$7(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:od(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&pQ(n,i,a)}function RLe(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,a){z(Ir(a.seriesTransition),function(n){z(Ir(n.to),function(i){for(var o=a.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][ww]=!0)})})}),t.registerUpdateLifecycle("series:transition",function(e,r,a){var n=kLe(r);if(n.oldSeries&&a.updatedSeries&&a.optionChanged){var i=a.seriesTransition;if(i)z(Ir(i),function(v){ELe(v,n,a,r)});else{var o=LLe(n,a);z(o.keys(),function(v){var m=o.get(v);pQ(m.oldSeries,m.newSeries,r)})}z(a.updatedSeries,function(v){v[ww]&&(v[ww]=!1)})}for(var s=e.getSeries(),l=n.oldSeries=[],u=n.oldDataGroupIds=[],c=n.oldData=[],d=0;d<s.length;d++){var h=s[d].getData();h.count()<vQ&&(l.push(s[d]),u.push(s[d].get("dataGroupId")),c.push(h))}})}var PLe=(function(){function t(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return t.prototype.setBreaks=function(e){this.breaks=e.breaks},t.prototype.update=function(e){jLe(this,e);var r=this._elapsedExtent;r[0]=this.elapse(e[0]),r[1]=this.elapse(e[1])},t.prototype.hasBreaks=function(){return!!this.breaks.length},t.prototype.calcNiceTickMultiple=function(e,r){for(var a=0;a<this.breaks.length;a++){var n=this.breaks[a];if(n.vmin<e&&e<n.vmax){var i=r(e,n.vmax);return i}}return 0},t.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},t.prototype.normalize=function(e){var r=this._elapsedExtent[1]-this._elapsedExtent[0];return r===0?.5:(this.elapse(e)-this._elapsedExtent[0])/r},t.prototype.scale=function(e){return this.unelapse(e*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},t.prototype.elapse=function(e){for(var r=W7,a=Y7,n=!0,i=0;i<this.breaks.length;i++){var o=this.breaks[i];if(e<=o.vmax){e>o.vmin?r+=o.vmin-a+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=e-a,a=o.vmax,n=!1;break}r+=o.vmin-a+o.gapReal,a=o.vmax}return n&&(r+=e-a),r},t.prototype.unelapse=function(e){for(var r=W7,a=Y7,n=!0,i=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],l=r+s.vmin-a,u=l+s.gapReal;if(e<=u){e>l?i=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):i=a+e-r,a=s.vmax,n=!1;break}r=u,a=s.vmax}return n&&(i=a+e-r),i},t})();function ILe(){return new PLe}var W7=0,Y7=0;function jLe(t,e){var r=0,a={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},n=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},i={S:{tpAbs:n(),tpPrct:n()},E:{tpAbs:n(),tpPrct:n()}};z(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=iP(s,e);if(u){var c=u.vmin!==s.vmin,d=u.vmax!==s.vmax,h=u.vmax-u.vmin;if(!(c&&d))if(c||d){var v=c?"S":"E";i[v][l.type].has=!0,i[v][l.type].span=h,i[v][l.type].inExtFrac=h/(s.vmax-s.vmin),i[v][l.type].val=l.val}else a[l.type].span+=h,a[l.type].val+=l.val}});var o=r*(0+(e[1]-e[0])+(a.tpAbs.val-a.tpAbs.span)+(i.S.tpAbs.has?(i.S.tpAbs.val-i.S.tpAbs.span)*i.S.tpAbs.inExtFrac:0)+(i.E.tpAbs.has?(i.E.tpAbs.val-i.E.tpAbs.span)*i.E.tpAbs.inExtFrac:0)-a.tpPrct.span-(i.S.tpPrct.has?i.S.tpPrct.span*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.span*i.E.tpPrct.inExtFrac:0))/(1-a.tpPrct.val-(i.S.tpPrct.has?i.S.tpPrct.val*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.val*i.E.tpPrct.inExtFrac:0));z(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function OLe(t,e,r,a,n,i){t!=="no"&&z(r,function(o){var s=iP(o,i);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],c=a(u),d=n*3/4;c>s.vmin-d&&c<s.vmax+d&&(t!=="preserve_extent_bound"||c!==i[0]&&c!==i[1])&&e.splice(l,1)}})}function zLe(t,e,r,a){z(e,function(n){var i=iP(n,r);i&&(t.push({value:i.vmin,break:{type:"vmin",parsedBreak:i},time:a?a(i):void 0}),t.push({value:i.vmax,break:{type:"vmax",parsedBreak:i},time:a?a(i):void 0}))}),e.length&&t.sort(function(n,i){return n.value-i.value})}function iP(t,e){var r=Math.max(t.vmin,e[0]),a=Math.min(t.vmax,e[1]);return r<a||r===a&&r>e[0]&&r<e[1]?{vmin:r,vmax:a,breakOption:t.breakOption,gapParsed:t.gapParsed,gapReal:t.gapReal}:null}function TL(t,e,r){var a=[];if(!t)return{breaks:a};function n(o,s){return o>=0&&o<1-1e-5}z(t,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:et(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(Ie(o.gap)){var u=vs(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;n(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var d=e(o.gap);(!isFinite(d)||d<0)&&(d=0),s.gapParsed.type="tpAbs",s.gapParsed.val=d}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&z(["vmin","vmax"],function(v){s[v]<0&&(s[v]=0)}),s.vmin>s.vmax){var h=s.vmax;s.vmax=s.vmin,s.vmin=h}a.push(s)}}),a.sort(function(o,s){return o.vmin-s.vmin});var i=-1/0;return z(a,function(o,s){i>o.vmin&&(a[s]=null),i=o.vmax}),{breaks:a.filter(function(o){return!!o})}}function oP(t,e){return CL(e)===CL(t)}function CL(t){return t.start+"_\0_"+t.end}function BLe(t,e,r){var a=[];z(t,function(i,o){var s=e(i);s&&s.type==="vmin"&&a.push([o])}),z(t,function(i,o){var s=e(i);if(s&&s.type==="vmax"){var l=Gh(a,function(u){return oP(e(t[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var n=[];return z(a,function(i){i.length===2&&n.push(r?i:[t[i[0]],t[i[1]]])}),n}function VLe(t,e,r,a){var n,i;if(t.break){var o=t.break.parsedBreak,s=Gh(r,function(d){return oP(d.breakOption,t.break.parsedBreak.breakOption)}),l=a(Math.pow(e,o.vmin),s.vmin),u=a(Math.pow(e,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?dn(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};n={type:t.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},i=s[t.break.type]}return{brkRoundingCriterion:i,vBreak:n}}function FLe(t,e,r){var a={noNegative:!0},n=TL(t,r,a),i=TL(t,r,a),o=Math.log(e);return i.breaks=Se(i.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:n,parsedLogged:i}}var GLe={vmin:"start",vmax:"end"};function HLe(t,e){return e&&(t=t||{},t.break={type:GLe[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),t}function ULe(){Dpe({createScaleBreakContext:ILe,pruneTicksByBreak:OLe,addBreaksToTicks:zLe,parseAxisBreakOption:TL,identifyAxisBreak:oP,serializeAxisBreakIdentifier:CL,retrieveAxisBreakPairs:BLe,getTicksLogTransformBreak:VLe,logarithmicParseBreaksFromOption:FLe,makeAxisLabelFormatterParamBreak:HLe})}var X7=jt();function $Le(t,e){var r=Gh(t,function(a){return hn().identifyAxisBreak(a.parsedBreak.breakOption,e.breakOption)});return r||t.push(r={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),r}function WLe(t){z(t,function(e){return e.shouldRemove=!0})}function YLe(t){for(var e=t.length-1;e>=0;e--)t[e].shouldRemove&&t.splice(e,1)}function XLe(t,e,r,a,n){var i=r.axis;if(i.scale.isBlank()||!hn())return;var o=hn().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(R){return R.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var d=s.get("expandOnClick"),h=s.get("zigzagZ"),v=s.getModel("itemStyle"),m=v.getItemStyle(),x=m.stroke,b=m.lineWidth,w=m.lineDash,_=m.fill,T=new Qe({ignoreModelZ:!0}),C=i.isHorizontal(),k=X7(e).visualList||(X7(e).visualList=[]);WLe(k);for(var A=function(R){var P=o[R][0].break.parsedBreak,j=[];j[0]=i.toGlobalCoord(i.dataToCoord(P.vmin,!0)),j[1]=i.toGlobalCoord(i.dataToCoord(P.vmax,!0)),j[1]<j[0]&&j.reverse();var V=$Le(k,P);V.shouldRemove=!1;var I=new Qe;L(V.zigzagRandomList,I,j[0],j[1],C,P),d&&I.on("click",function(){var F={type:a2,breaks:[{start:P.breakOption.start,end:P.breakOption.end}]};F[i.dim+"AxisIndex"]=r.componentIndex,n.dispatchAction(F)}),I.silent=!d,T.add(I)},M=0;M<o.length;M++)A(M);t.add(T),YLe(k);function L(R,P,j,V,I,F){var G={stroke:x,lineWidth:b,lineDash:w,fill:"none"},O=I?0:1,U=1-O,$=a[gt[U]]+a[vn[U]];function K(xt){var Ye=[],st=[];Ye[O]=st[O]=xt,Ye[U]=a[gt[U]],st[U]=$;var We={x1:Ye[0],y1:Ye[1],x2:st[0],y2:st[1]};return B_(We,We,{lineWidth:1}),Ye[0]=We.x1,Ye[1]=We.y1,Ye[O]}j=K(j),V=K(V);for(var q=[],H=[],Z=!0,te=a[gt[U]],ie=0;;ie++){var ce=te===a[gt[U]],me=te>=$;me&&(te=$);var ze=[],Ce=[];ze[O]=j,Ce[O]=V,!ce&&!me&&(ze[O]+=Z?-l:l,Ce[O]-=Z?l:-l),ze[U]=te,Ce[U]=te,q.push(ze),H.push(Ce);var ge=void 0;if(ie<R.length?ge=R[ie]:(ge=Math.random(),R.push(ge)),te+=ge*(c-u)+u,Z=!Z,me)break}var Be=hn().serializeAxisBreakIdentifier(F.breakOption);if(P.add(new xi({anid:"break_a_"+Be,shape:{points:q},style:G,z:h})),F.gapReal!==0){P.add(new xi({anid:"break_b_"+Be,shape:{points:H},style:G,z:h}));var _e=H.slice();_e.reverse();var Oe=q.concat(_e);P.add(new ji({anid:"break_c_"+Be,shape:{points:Oe},style:{fill:_,opacity:m.opacity},z:h}))}}}function qLe(t,e,r,a){var n=t.axis,i=r.transform;Pi(a.style);var o=n.getExtent();n.inverse&&(o=o.slice(),o.reverse());var s=hn().retrieveAxisBreakPairs(n.scale.getTicks({breakTicks:"only_break"}),function(b){return b.break},!1),l=Se(s,function(b){var w=b[0].break.parsedBreak,_=[n.dataToCoord(w.vmin,!0),n.dataToCoord(w.vmax,!0)];return _[0]>_[1]&&_.reverse(),{coordPair:_,brkId:hn().serializeAxisBreakIdentifier(w.breakOption)}});l.sort(function(b,w){return b.coordPair[0]-w.coordPair[0]});for(var u=o[0],c=null,d=0;d<l.length;d++){var h=l[d],v=Math.max(h.coordPair[0],o[0]),m=Math.min(h.coordPair[1],o[1]);u<=v&&x(u,v,c,h),u=m,c=h}u<=o[1]&&x(u,o[1],c,null);function x(b,w,_,T){function C(j,V){i&&(tn(j,j,i),tn(V,V,i))}function k(j,V){var I={x1:j[0],y1:j[1],x2:V[0],y2:V[1]};B_(I,I,a.style),j[0]=I.x1,j[1]=I.y1,V[0]=I.x2,V[1]=I.y2}var A=[b,0],M=[w,0],L=[b,5],R=[w,5];C(A,L),k(A,L),C(M,R),k(M,R),k(A,M);var P=new fn(ve({shape:{x1:A[0],y1:A[1],x2:M[0],y2:M[1]}},a));e.add(P),P.anid="breakLine_"+(_?_.brkId:"\0")+"_\0_"+(T?T.brkId:"\0")}}function ZLe(t,e,r){if(Gh(r,function(_){return!_}))return;var a=new at;if(!t2(r[0],r[1],a,{direction:-(t?e+Math.PI:e),touchThreshold:0,bidirectional:!1}))return;var n=oi();Hd(n,n,-e);var i=Se(r,function(_){return _.transform?Ul(oi(),n,_.transform):n});function o(_){var T=r[0].localRect,C=new at(T[vn[_]]*i[0][0],T[vn[_]]*i[0][1]);return Math.abs(C.y)<1e-5}var s=.5;if(o(0)||o(1)){var l=Se(r,function(_,T){var C=_.localRect.clone();return C.applyTransform(i[T]),C}),u=new at;u.copy(r[0].label).add(r[1].label).scale(.5),u.transform(n);var c=a.clone().transform(n),d=l[0].x+l[1].x+(c.x>=0?l[0].width:l[1].width),h=(d+c.x)/2-u.x,v=Math.min(h,h-c.x),m=Math.max(h,h-c.x),x=m<0?m:v>0?v:0;s=(h-x)/c.x}var b=new at,w=new at;at.scale(b,a,-s),at.scale(w,a,1-s),kD(r[0],b),kD(r[1],w)}function KLe(t,e){var r={breaks:[]};return z(e.breaks,function(a){if(a){var n=Gh(t.get("breaks",!0),function(s){return hn().identifyAxisBreak(s,a)});if(n){var i=e.type,o={isExpanded:!!n.isExpanded};n.isExpanded=i===a2?!0:i===jq?!1:i===Oq?!n.isExpanded:n.isExpanded,r.breaks.push({start:n.start,end:n.end,isExpanded:!!n.isExpanded,old:o})}}}),r}function QLe(){Ybe({adjustBreakLabelPair:ZLe,buildAxisBreakLine:qLe,rectCoordBuildBreakAxis:XLe,updateModelAxisBreak:KLe})}function JLe(t){Jbe(t),ULe(),QLe()}function eEe(){b1e(tEe)}function tEe(t,e){z(t,function(r){if(!r.model.get(["axisLabel","inside"])){var a=rEe(r);if(a){var n=r.isHorizontal()?"height":"width",i=r.model.get(["axisLabel","margin"]);e[n]-=a[n]+i,r.position==="top"?e.y+=a.height+i:r.position==="left"&&(e.x+=a.width+i)}}})}function rEe(t){var e=t.model,r=t.scale;if(!e.get(["axisLabel","show"])||r.isBlank())return;var a,n,i=r.getExtent();r instanceof Wp?n=r.count():(a=r.getTicks(),n=a.length);var o=t.getLabelModel(),s=Cm(t),l,u=1;n>40&&(u=Math.ceil(n/40));for(var c=0;c<n;c+=u){var d=a?a[c]:{value:i[0]+c},h=s(d,c),v=o.getTextRect(h),m=x(v,o.get("rotate")||0);l?l.union(m):l=m}return l;function x(b,w){var _=w*Math.PI/180,T=b.width,C=b.height,k=T*Math.abs(Math.cos(_))+Math.abs(C*Math.sin(_)),A=T*Math.abs(Math.sin(_))+Math.abs(C*Math.cos(_)),M=new ot(b.x,b.y,k,A);return M}}Nt([$xe]);Nt([Vxe]);Nt([dbe,kbe,jbe,B1e,Z1e,Bwe,fSe,qSe,m_e,__e,M_e,O_e,D2e,eTe,dTe,NTe,LTe,FTe,XTe,iCe,dCe,wCe,ike]);Nt(Tke);Nt(qke);Nt(uZ);Nt(sNe);Nt(qZ);Nt(dNe);Nt(LNe);Nt(VNe);Nt(kAe);Nt($Ae);Nt(sx);Nt(sMe);Nt(cMe);Nt(bMe);Nt(AMe);Nt(PMe);Nt(VMe);Nt(ZMe);Nt(pDe);Nt(tQ);Nt(rQ);Nt(IDe);Nt(sQ);Nt(lQ);Nt(BDe);Nt(UDe);Nt(aLe);Nt(oLe);Nt(RLe);Nt(oxe);Nt(JLe);Nt(eEe);Nt(V1e);const cs=["#2563eb","#7c3aed","#db2777","#f59e0b","#10b981","#0ea5e9","#f97316","#8b5cf6"],aEe=new Set(["top","bottom","left","right"]),nEe=new Set(["horizontal","vertical"]),iEe=new Set(["ascending","descending"]),oEe={line:{折线图:"line-basic",平滑折线图:"line-smooth",面积图:"line-area",堆积折线图:"line-stacked"},bar:{柱状图:"bar-basic",条形图:"bar-horizontal",堆积柱状图:"bar-stacked",堆积条形图:"bar-horizontal-stacked",横向堆积柱状图:"bar-horizontal-stacked"},pie:{饼图:"pie-basic",环形图:"pie-doughnut",玫瑰图:"pie-rose"},ring:{圆环图:"ring-basic",环形图:"ring-basic",玫瑰图:"ring-rose"},funnel:{漏斗图:"funnel-basic"}};function uA(t){return t==="pie"||t==="ring"||t==="funnel"}function sEe(t,e){var n;if(typeof t!="string")return;const r=t.trim();return r?(e?(n=oEe[e])==null?void 0:n[r]:void 0)||r:void 0}function cA(t){if(typeof t=="boolean")return t;if(typeof t=="number"){if(t===1)return!0;if(t===0)return!1}if(typeof t!="string")return;const e=t.trim().toLowerCase();if(["true","1","yes","y","on","是"].includes(e))return!0;if(["false","0","no","n","off","否"].includes(e))return!1}function lEe(t){if(t==="total"||t==="只显示总数")return"total"}function uEe(t){const e=Number(t??"");return Number.isFinite(e)?e:0}function kn(t){const e=Number(t);return Number.isFinite(e)?e:void 0}function mQ(t){return Array.isArray(t)?t.map(e=>typeof e=="string"?e.trim():"").filter(Boolean):typeof t=="string"?t.split(/[\n,,、]+/).map(e=>e.trim()).filter(Boolean):[]}function cEe(t,e){if(!t)return{showDataLabels:uA(e)||void 0};try{const r=JSON.parse(t),a=typeof r.legendPosition=="string"&&aEe.has(r.legendPosition)?r.legendPosition:void 0,n=typeof r.legendOrient=="string"&&nEe.has(r.legendOrient)?r.legendOrient:void 0,i=typeof r.funnelSort=="string"&&iEe.has(r.funnelSort)?r.funnelSort:void 0;return{emptyText:typeof r.emptyText=="string"?r.emptyText:void 0,centerLabel:typeof r.centerLabel=="string"?r.centerLabel:void 0,peakPrefix:typeof r.peakPrefix=="string"?r.peakPrefix:void 0,sharePrefix:typeof r.sharePrefix=="string"?r.sharePrefix:void 0,chartPreset:sEe(r.chartPreset,e),seriesField:typeof r.seriesField=="string"?r.seriesField:void 0,legendSeriesOrder:mQ(r.legendSeriesOrder),frameField:typeof r.frameField=="string"?r.frameField:void 0,stepPosition:typeof r.stepPosition=="string"?r.stepPosition:void 0,lineStyleType:typeof r.lineStyleType=="string"?r.lineStyleType:void 0,showLegend:cA(r.showLegend),showDataLabels:cA(r.showDataLabels)??uA(e)??void 0,dataLabelMode:lEe(r.dataLabelMode),optionOverrides:typeof r.optionOverrides=="string"?r.optionOverrides:void 0,legendPosition:a,legendOrient:n,labelPosition:typeof r.labelPosition=="string"?r.labelPosition:void 0,gridTop:kn(r.gridTop),gridRight:kn(r.gridRight),gridBottom:kn(r.gridBottom),gridLeft:kn(r.gridLeft),categoryBoundaryGap:cA(r.categoryBoundaryGap),axisLabelRotate:kn(r.axisLabelRotate),valueAxisMin:kn(r.valueAxisMin),valueAxisMax:kn(r.valueAxisMax),lineWidth:kn(r.lineWidth),symbolSize:kn(r.symbolSize),barMaxWidth:kn(r.barMaxWidth),barBorderRadius:kn(r.barBorderRadius),pieRadiusOuter:kn(r.pieRadiusOuter),pieRadiusInner:kn(r.pieRadiusInner),pieCenterX:kn(r.pieCenterX),pieCenterY:kn(r.pieCenterY),pieLabelEdgeDistance:kn(r.pieLabelEdgeDistance),pieLabelBleedMargin:kn(r.pieLabelBleedMargin),pieLabelLineLength:kn(r.pieLabelLineLength),pieLabelLineLength2:kn(r.pieLabelLineLength2),funnelSort:i,funnelGap:kn(r.funnelGap)}}catch{return{showDataLabels:uA(e)||void 0}}}function dEe(t){if(!(t!=null&&t.trim()))return null;try{const e=JSON.parse(t);return e&&typeof e=="object"?e:null}catch{return null}}function gQ(t,e){if(!e||typeof e!="object"||Array.isArray(e))return e??t;const r=Array.isArray(t)?[...t]:{...t||{}};return Object.entries(e).forEach(([a,n])=>{if(Array.isArray(n)){r[a]=n;return}if(n&&typeof n=="object"){r[a]=gQ(r[a],n);return}r[a]=n}),r}function tm(t,e){return{trigger:t,confine:!1,appendToBody:!0,position(r,a,n,i,o){const[s,l]=o.contentSize,[u,c]=o.viewSize,d=e?10:14,h=e?r[0]-s-12:r[0]+14,v=r[1]-l/2,m=Math.max(d,Math.min(u-s-d,h)),x=Math.max(d,Math.min(c-l-d,v));return[m,x]}}}function fEe(t,e,r){return t==="funnel"?r?360:e?280:320:t==="pie"||t==="ring"?r?360:e?320:340:r?340:e?260:280}function hEe(t){const e=new Set;return t.forEach(r=>{e.add(r.label)}),e.size}function vEe(t,e,r,a,n,i){const o=i&&i>0?i:fEe(t,a,n),s=e.chartPreset||(t==="ring"?"ring-basic":t==="pie"?"pie-basic":"");if(!(t==="bar"&&(s==="bar-horizontal"||s==="bar-horizontal-stacked")))return o;const u=hEe(r);if(u<=0)return o;const c=a?28:32,d=a?92:108;return Math.max(o,u*c+d)}function pEe(t){return t.map((e,r)=>{var a,n,i;return{label:((a=e.label)==null?void 0:a.trim())||"未命名",value:uEe(e.value),valueText:e.valueText||e.value||"0",color:e.color||cs[r%cs.length],seriesName:((n=e.seriesName)==null?void 0:n.trim())||"默认系列",frameName:((i=e.frameName)==null?void 0:i.trim())||""}})}function mEe(t){const e=[],r=new Set;return t.forEach(a=>{!a.frameName||r.has(a.frameName)||(r.add(a.frameName),e.push(a.frameName))}),e}function lx(t){const e=[],r=new Set,a=[],n=new Set,i=new Map,o=new Map,s=new Map;return t.forEach(l=>{r.has(l.label)||(r.add(l.label),e.push(l.label)),n.has(l.seriesName)||(n.add(l.seriesName),a.push(l.seriesName),o.set(l.seriesName,l.color)),i.set(`${l.seriesName}::${l.label}`,l.value),s.has(l.label)||s.set(l.label,l.color)}),{labels:e,seriesNames:a,valueMap:i,seriesColorMap:o,labelColorMap:s}}function yQ(t,e){const r=mQ(e.legendSeriesOrder);if(r.length===0)return t;const a=new Map(t.map(o=>[o.trim().toLowerCase(),o])),n=new Set,i=[];return r.forEach(o=>{const s=a.get(o.trim().toLowerCase());s&&!n.has(s)&&(n.add(s),i.push(s))}),t.forEach(o=>{n.has(o)||i.push(o)}),i}function xQ(t,e,r,a){const n=new Map,i=new Map;return t.forEach(o=>{let s=0,l=-1,u=-1;e.forEach((c,d)=>{const h=(a==null?void 0:a[c])!==!1;h&&(u=d);const v=r.get(`${c}::${o}`)??0;h&&(s+=v,v!==0&&(l=d))}),n.set(o,s),i.set(o,l>=0?l:u)}),{totalsByLabel:n,lastSeriesIndexByLabel:i}}function gEe(t,e,r,a){return[...t].map((n,i)=>({label:n,index:i,total:e.reduce((o,s)=>(a==null?void 0:a[s])===!1?o:o+(r.get(`${s}::${n}`)??0),0)})).sort((n,i)=>i.total!==n.total?i.total-n.total:n.index-i.index).map(n=>n.label)}function Js(t){if(!Number.isFinite(t))return"0";const e=Math.abs(t),r=e!==0&&e<1?4:Number.isInteger(t)?0:2;return new Intl.NumberFormat("zh-CN",{minimumFractionDigits:0,maximumFractionDigits:r}).format(t)}function yEe(t,e,r){const a=r==null?void 0:r.trim();return a?a==="%"||/%$/.test(a)?`${t}${a}`:`${t} ${a}`:e==="percent"?`${t}%`:t}function bQ(t,e,r){return yEe(Js(t),e,r)}function e_(t,e){return r=>{var o,s;const a=Array.isArray(r)?r:[r];if(a.length===0)return"";const n=((o=a[0])==null?void 0:o.axisValueLabel)||((s=a[0])==null?void 0:s.axisValue)||"",i=a.filter(l=>l).map(l=>{var c;const u=Array.isArray(l.value)?Number(l.value.at(-1)??0):Number(((c=l.data)==null?void 0:c.value)??l.value??0);return`${l.marker||""}${l.seriesName||""}${bQ(u,t,e)}`});return[n,...i].filter(Boolean).join("<br/>")}}function t_(t,e){return r=>{const a=r.name||r.seriesName||"",n=bQ(Number(r.value??0),t,e);return[r.seriesName&&r.seriesName!=="数据分布"?r.seriesName:"",`${r.marker||""}${a}${n}`].filter(Boolean).join("<br/>")}}function xEe(t,e,r,a,n,i,o,s){return l=>{const u=Number(l.value??0),c=t[l.dataIndex]||"";if(r&&a.dataLabelMode==="total"){if(i.get(c)!==e)return"";const d=n.get(c)??0;return d===0?"":Js(d)}return u===0?"":Js(u)}}function bEe(t,e,r,a,n,i,o,s){return l=>{const u=Array.isArray(l.value)?Number(l.value[1]??0):Number(l.value??0),c=t[l.dataIndex]||"";if(r&&a.dataLabelMode==="total"){if(i.get(c)!==e)return"";const d=n.get(c)??0;return d===0?"":Js(d)}return u===0?"":Js(u)}}function rm(t,e){if(t.showLegend===!1)return{show:!1};const r=t.legendPosition||"top",a=t.legendOrient||(r==="left"||r==="right"?"vertical":"horizontal"),n={show:!0,orient:a,textStyle:{color:"#64748b"}};return r==="top"?(n.top=0,n.left=a==="horizontal"?"center":0):r==="bottom"?(n.bottom=0,n.left=a==="horizontal"?"center":0):r==="left"?(n.left=0,n.top="middle"):r==="right"&&(n.right=0,n.top="middle"),e&&Object.keys(e).length>0&&(n.selected=e),n}function r_(t,e){const r={...t};if(e.showLegend!==!1){const a=e.legendPosition||"top";a==="top"?r.top=Math.max(r.top,44):a==="bottom"?r.bottom=Math.max(r.bottom,44):a==="left"?r.left=Math.max(r.left,104):a==="right"&&(r.right=Math.max(r.right,104))}return e.gridTop!==void 0&&(r.top=e.gridTop),e.gridRight!==void 0&&(r.right=e.gridRight),e.gridBottom!==void 0&&(r.bottom=e.gridBottom),e.gridLeft!==void 0&&(r.left=e.gridLeft),r}function U0(t,e,r){return{...t,boundaryGap:e.categoryBoundaryGap??r,axisLabel:{...t.axisLabel,rotate:e.axisLabelRotate??0}}}function $0(t,e){const r={...t};return e.valueAxisMin!==void 0&&(r.min=e.valueAxisMin),e.valueAxisMax!==void 0&&(r.max=e.valueAxisMax),r}function qu(t,e){var r;return((r=t.labelPosition)==null?void 0:r.trim())||e}function q7(t,e){return t===void 0?e:`${t}%`}function wEe(t,e){const r=qu(t,"outside"),a=!["inside","center"].includes(r);return{labelPosition:r,outsideLabel:a,labelWidth:a?e?84:132:void 0,labelOverflow:a?e?"breakAll":"break":void 0,labelLineHeight:e?11:13,labelFontSize:e?10:11,edgeDistance:a?t.pieLabelEdgeDistance??(e?6:12):void 0,bleedMargin:a?t.pieLabelBleedMargin??(e?2:8):void 0,lineLength:t.pieLabelLineLength??(e?8:14),lineLength2:t.pieLabelLineLength2??(e?6:14),outerRadiusFallback:a?e?"62%":"58%":"68%"}}function SEe(t){if(t.pieCenterX!==void 0||t.pieCenterY!==void 0)return[`${t.pieCenterX??50}%`,`${t.pieCenterY??52}%`];if(t.showLegend===!1)return["50%","52%"];switch(t.legendPosition||"right"){case"left":return["68%","52%"];case"top":return["50%","58%"];case"bottom":return["50%","44%"];case"right":default:return["32%","52%"]}}function Z7(t){const e=t.pieCenterY;return e!==void 0?`${Math.max(16,e-10)}%`:"42%"}function _Ee(t,e,r,a,n){const i=r.chartPreset||"line-basic",{labels:o,seriesNames:s,valueMap:l,seriesColorMap:u}=lx(e),c=yQ(s,r),{totalsByLabel:d,lastSeriesIndexByLabel:h}=xQ(o,c,l,n),v=r.lineStyleType||"solid",m=i==="line-stacked",x=i==="line-smooth"||i==="line-area",b=m&&r.dataLabelMode==="total",w=i.startsWith("line-step")?i.replace("line-step-","")||r.stepPosition||"middle":!1,_=i==="line-area"||m,T=r.lineWidth||3,C=r.symbolSize||7;return{color:c.map((k,A)=>u.get(k)||cs[A%cs.length]),tooltip:{...tm("axis",a),formatter:e_(t.valueType,t.unit)},legend:rm(r,n),grid:r_({left:a?36:44,right:18,top:20,bottom:30},r),xAxis:U0({type:"category",data:o,axisTick:{show:!1},axisLine:{lineStyle:{color:"#cbd5e1"}},axisLabel:{color:"#94a3b8",fontSize:11}},r,!1),yAxis:$0({type:"value",axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:"#e2e8f0",type:"dashed"}},axisLabel:{color:"#94a3b8",fontSize:11}},r),series:c.map((k,A)=>({name:k,type:"line",smooth:x,step:w,stack:m?"total":void 0,areaStyle:_?{}:void 0,symbolSize:C,label:{show:!!r.showDataLabels,position:b?"top":qu(r,"top"),color:u.get(k)||cs[A%cs.length],formatter:bEe(o,A,m,r,d,h,t.valueType,t.unit)},lineStyle:{width:T,type:v},data:o.map(M=>l.get(`${k}::${M}`)??null)})),animationDuration:500}}function TEe(t,e,r,a=8){const{labels:n,seriesNames:i,valueMap:o,labelColorMap:s}=lx(t),l=i[0]||"默认系列",u=n.map(c=>({label:c,value:o.get(`${l}::${c}`)??0,color:s.get(c)||"#2563eb"})).sort((c,d)=>d.value-c.value).slice(0,Math.max(a,3));return{color:u.map(c=>c.color),title:r?{text:r,left:"right",top:0,textStyle:{color:"#94a3b8",fontSize:12,fontWeight:600}}:void 0,tooltip:{...tm("axis",!1),axisPointer:{type:"shadow"},formatter:e_("number")},grid:r_({left:84,right:32,top:r?32:16,bottom:16},e),xAxis:$0({type:"value",max:"dataMax",axisLabel:{color:"#94a3b8",fontSize:11},splitLine:{lineStyle:{color:"#e2e8f0",type:"dashed"}}},e),yAxis:U0({type:"category",inverse:!0,data:u.map(c=>c.label),axisTick:{show:!1},axisLine:{show:!1},axisLabel:{color:"#64748b",fontSize:12},animationDuration:300,animationDurationUpdate:300},e,!0),series:[{type:"bar",realtimeSort:!0,data:u.map(c=>c.value),label:{show:e.showDataLabels!==!1,position:qu(e,"right"),valueAnimation:!0,color:"#334155",formatter:({value:c})=>Js(Number(c??0))},itemStyle:{borderRadius:[0,e.barBorderRadius||8,e.barBorderRadius||8,0]},animationDuration:0,animationDurationUpdate:1e3}],animationDuration:0,animationDurationUpdate:1e3,animationEasing:"linear",animationEasingUpdate:"linear"}}function CEe(t,e,r,a,n,i){const o=r.chartPreset||"bar-basic",{labels:s,seriesNames:l,valueMap:u,seriesColorMap:c,labelColorMap:d}=lx(t),h=yQ(l,r),v=o==="bar-stacked"||o==="bar-horizontal-stacked",m=o==="bar-horizontal"||o==="bar-horizontal-stacked",x=r.barBorderRadius||8,b=v&&r.dataLabelMode==="total",{totalsByLabel:w,lastSeriesIndexByLabel:_}=xQ(s,h,u,i),T=m?gEe(s,h,u,i):s;if(o==="bar-race"||o==="bar-race-timeline")return TEe(t,r,n,e.displayLimit||s.length||8);if(o==="bar-waterfall"){const C=s.map(M=>u.get(`${h[0]}::${M}`)??0);let k=0;const A=C.map(M=>{const L=k;return k+=M,M>=0?L:k});return{color:["rgba(0,0,0,0)","#2563eb","#f97316"],tooltip:{...tm("axis",a),axisPointer:{type:"shadow"},formatter:e_(e.valueType,e.unit)},legend:{show:!1},grid:r_({left:a?36:44,right:18,top:20,bottom:30},r),xAxis:U0({type:"category",data:s,axisTick:{show:!1},axisLine:{lineStyle:{color:"#cbd5e1"}},axisLabel:{color:"#94a3b8",fontSize:11}},r,!0),yAxis:$0({type:"value",axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:"#e2e8f0",type:"dashed"}},axisLabel:{color:"#94a3b8",fontSize:11}},r),series:[{type:"bar",stack:"total",silent:!0,itemStyle:{color:"rgba(0,0,0,0)"},emphasis:{itemStyle:{color:"rgba(0,0,0,0)"}},data:A},{name:e.title||"增加",type:"bar",stack:"total",label:{show:!!r.showDataLabels,position:qu(r,"top"),formatter:({value:M})=>{const L=Number(M??0);return L===0?"":Js(L)}},data:C.map(M=>M>=0?M:"-"),itemStyle:{color:"#2563eb",borderRadius:[x,x,0,0]}},{name:"减少",type:"bar",stack:"total",label:{show:!!r.showDataLabels,position:qu(r,"bottom"),formatter:({value:M})=>{const L=Number(M??0);return L===0?"":Js(L)}},data:C.map(M=>M<0?M:"-"),itemStyle:{color:"#f97316",borderRadius:[0,0,x,x]}}]}}return{color:h.map((C,k)=>c.get(C)||cs[k%cs.length]),tooltip:{...tm("axis",a),axisPointer:{type:"shadow"},formatter:e_(e.valueType,e.unit)},legend:rm(r,i),grid:r_({left:a?44:52,right:18,top:20,bottom:30},r),xAxis:m?$0({type:"value",axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:"#e2e8f0",type:"dashed"}},axisLabel:{color:"#94a3b8",fontSize:11}},r):U0({type:"category",data:T,axisTick:{show:!1},axisLine:{lineStyle:{color:"#cbd5e1"}},axisLabel:{color:"#94a3b8",fontSize:11}},r,!0),yAxis:m?U0({type:"category",inverse:!0,data:T,axisTick:{show:!1},axisLine:{lineStyle:{color:"#cbd5e1"}},axisLabel:{color:"#64748b",fontSize:12,interval:0}},r,!0):$0({type:"value",axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:"#e2e8f0",type:"dashed"}},axisLabel:{color:"#94a3b8",fontSize:11}},r),series:h.map((C,k)=>({name:C,type:"bar",stack:v?"total":void 0,barMaxWidth:r.barMaxWidth||34,label:{show:!!r.showDataLabels,position:b?m?"right":"top":qu(r,m?"right":"top"),color:b?"#334155":void 0,formatter:xEe(T,k,v,r,w,_,e.valueType,e.unit)},itemStyle:{borderRadius:m?[0,x,x,0]:[x,x,0,0],color:h.length===1?void 0:c.get(C)||cs[k%cs.length]},data:T.map(A=>{const M=u.get(`${C}::${A}`)??0;return h.length===1?{value:M,itemStyle:{color:d.get(A)||cs[k%cs.length]}}:M})})),animationDuration:500}}function kEe(t,e,r,a,n,i){const o=a.chartPreset||(r==="ring"?"ring-basic":"pie-basic"),{seriesNames:s}=lx(e),l=o==="pie-nested"||o==="ring-nested",u=r==="ring"||o==="pie-doughnut"||o==="ring-basic"||o==="ring-rose"||o==="ring-nested",c=o==="pie-rose"||o==="ring-rose"?"area":void 0,d=e.reduce((A,M)=>A+Math.max(M.value,0),0),h=SEe(a),v=wEe(a,n),{labelPosition:m,outsideLabel:x}=v,b=a.pieRadiusOuter,w=a.pieRadiusInner,_={show:!!a.showDataLabels,position:m,formatter:A=>{const M=Number(A.percent??0);return`${A.name||""}: ${Js(M)}%`},width:v.labelWidth,overflow:v.labelOverflow,lineHeight:v.labelLineHeight,fontSize:v.labelFontSize,alignTo:x?"edge":void 0,edgeDistance:v.edgeDistance,bleedMargin:v.bleedMargin},T={show:!!a.showDataLabels&&x,length:v.lineLength,length2:v.lineLength2,maxSurfaceAngle:80};if(l&&s.length>1){const A=w??(u?24:0),R=Math.max((b??(u?78:80))-A,s.length*10)/s.length,P=s.map((j,V)=>{const I=A+V*R,F=A+(V+1)*R-4,G=e.filter(U=>U.seriesName===j).map(U=>({value:Math.max(U.value,0),name:U.label,itemStyle:{color:U.color}})),O=qu(a,V===s.length-1?"outside":"inside");return{name:j,type:"pie",radius:u||I>0?[`${Math.max(I,0)}%`,`${Math.max(F,I+6)}%`]:`${Math.max(F,12)}%`,center:h,roseType:c,avoidLabelOverlap:!0,label:V===s.length-1?{..._,position:O,show:!!a.showDataLabels}:{show:!1,position:O,formatter:_.formatter},labelLine:{...T,show:!!a.showDataLabels&&!["inside","center"].includes(O)},labelLayout:{moveOverlap:"shiftY",hideOverlap:!1},data:G}});return{tooltip:{...tm("item",n),formatter:t_(t.valueType,t.unit)},legend:rm(a,i),title:u?{text:a.centerLabel||"总计",subtext:String(d),left:h[0],top:Z7(a),textAlign:"center",textStyle:{fontSize:12,fontWeight:600,color:"#94a3b8"},subtextStyle:{fontSize:24,fontWeight:700,color:"#0f172a"}}:void 0,series:P,animationDuration:500}}const C=q7(b,v.outerRadiusFallback),k=q7(w,u?"42%":"0%");return{color:e.map(A=>A.color),tooltip:{...tm("item",n),formatter:t_(t.valueType,t.unit)},legend:rm(a,i),title:u?{text:a.centerLabel||"总计",subtext:String(d),left:h[0],top:Z7(a),textAlign:"center",textStyle:{fontSize:12,fontWeight:600,color:"#94a3b8"},subtextStyle:{fontSize:24,fontWeight:700,color:"#0f172a"}}:void 0,series:[{name:"数据分布",type:"pie",roseType:c,radius:u?[k,C]:C,center:h,avoidLabelOverlap:!0,label:_,labelLine:T,labelLayout:{moveOverlap:"shiftY",hideOverlap:!1},data:e.map(A=>({value:Math.max(A.value,0),name:A.label,itemStyle:{color:A.color}}))}],animationDuration:500}}function NEe(t,e,r){const a=e.chartPreset||"funnel-basic",{seriesNames:n}=lx(t),i=e.funnelSort||"descending",o=e.funnelGap??2;if((a==="funnel-contrast"||a==="funnel-multiple")&&n.length>1){const l=Math.max(...t.map(h=>h.value),0),u=n.length<=2?36:Math.max(24,80/n.length),c=n.length<=2?10:4,d=6;return{tooltip:{trigger:"item",formatter:t_("number")},legend:rm(e,r),series:n.map((h,v)=>{const m=`${d+v*(u+c)}%`,x=t.filter(w=>w.seriesName===h).map(w=>({value:Math.max(w.value,0),name:w.label,itemStyle:{color:w.color}})),b=qu(e,e.showDataLabels?"inside":v===n.length-1?"right":"left");return{name:h,type:"funnel",left:m,top:e.showLegend===!1?12:38,bottom:12,width:`${u}%`,min:0,max:l,minSize:"20%",maxSize:"100%",sort:i,gap:o,label:{show:!0,position:b,formatter:({name:w,percent:_})=>`${w||""}
${Js(Number(_??0))}%`},labelLine:{show:!["inside","center"].includes(b),length:14,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{fontSize:15}},data:x}}),animationDuration:500}}const s=qu(e,e.showDataLabels?"inside":"right");return{color:t.map(l=>l.color),tooltip:{trigger:"item",formatter:t_("number")},legend:rm(e,r),series:[{name:"漏斗分析",type:"funnel",left:"10%",top:e.showLegend===!1?12:38,bottom:12,width:"80%",min:0,max:Math.max(...t.map(l=>l.value),0),minSize:"20%",maxSize:"100%",sort:i,gap:o,label:{show:!0,position:s,formatter:({name:l,percent:u})=>`${l||""}
${Js(Number(u??0))}%`},labelLine:{show:!["inside","center"].includes(s),length:16,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{fontSize:15}},data:t.map(l=>({value:Math.max(l.value,0),name:l.label,itemStyle:{color:l.color}}))}],animationDuration:500}}function AEe(t,e,r,a,n,i){const o=t.renderType;let s;o==="line"?s=_Ee(t,e,r,a,i):o==="bar"?s=CEe(e,t,r,a,n,i):o==="pie"||o==="ring"?s=kEe(t,e,o,r,a,i):s=NEe(e,r,i);const l=dEe(r.optionOverrides);return l?gQ(s,l):s}function MEe({text:t,height:e}){return g.jsx("div",{className:"flex items-center justify-center rounded-[24px] border border-dashed border-slate-200 bg-slate-50/60 px-6 text-center text-sm text-slate-400",style:{minHeight:e},children:t||"暂无图表数据"})}function DEe({card:t,expanded:e,heightOverride:r}){const a=E.useRef(null),n=E.useRef(null),i=au(),o=t.renderType||"bar",s=E.useMemo(()=>cEe(t.displayTextConfig,o),[t.displayTextConfig,o]),l=E.useMemo(()=>pEe(t.chartData??[]),[t.chartData]),u=E.useMemo(()=>mEe(l),[l]),[c,d]=E.useState(0),[h,v]=E.useState({});E.useEffect(()=>{d(0)},[t.cardKey,u.join("|"),s.chartPreset]),E.useEffect(()=>{v({})},[t.cardKey,s.chartPreset,u.join("|")]),E.useEffect(()=>{if(s.chartPreset!=="bar-race-timeline"||u.length<=1)return;const w=window.setInterval(()=>{d(_=>(_+1)%u.length)},2200);return()=>window.clearInterval(w)},[u,s.chartPreset]);const m=E.useMemo(()=>{if(s.chartPreset==="bar-race-timeline"&&u.length){const w=u[Math.min(c,u.length-1)];return l.filter(_=>_.frameName===w)}return l},[c,u,l,s.chartPreset]),x=E.useMemo(()=>vEe(o,s,m,i,e,r),[e,r,i,o,s,m]),b=E.useMemo(()=>AEe(t,m,s,i,s.chartPreset==="bar-race-timeline"?u[Math.min(c,Math.max(u.length-1,0))]:void 0,h),[c,t,u,i,h,s,m]);return E.useEffect(()=>{if(!a.current||!m.length)return;const w=T0e(a.current);n.current=w;const _=()=>{w.resize()},T=typeof ResizeObserver<"u"?new ResizeObserver(_):null;T?T.observe(a.current):typeof window<"u"&&window.addEventListener("resize",_);const C=k=>{v(k.selected||{})};return w.on("legendselectchanged",C),()=>{w.off("legendselectchanged",C),T?T.disconnect():typeof window<"u"&&window.removeEventListener("resize",_),w.dispose(),n.current=null}},[m.length]),E.useEffect(()=>{!n.current||!m.length||n.current.setOption(b,!0)},[b,m.length]),m.length?g.jsx("div",{ref:a,style:{width:"100%",height:x}}):g.jsx(MEe,{text:s.emptyText,height:x})}const LEe=new Set(["line","bar","pie","ring","funnel"]);function EEe(t){return t==="pie"||t==="ring"||t==="funnel"}function REe(t){if(typeof t=="boolean")return t;if(typeof t=="number"){if(t===1)return!0;if(t===0)return!1}if(typeof t!="string")return;const e=t.trim().toLowerCase();if(["true","1","yes","y","on","是"].includes(e))return!0;if(["false","0","no","n","off","否"].includes(e))return!1}function PEe(t,e){if(!t)return{};try{const r=JSON.parse(t);if(!r||typeof r!="object")return{};const a=r;return{emptyText:typeof a.emptyText=="string"?a.emptyText:void 0,showDataLabels:REe(a.showDataLabels)??EEe(e)??void 0,labelPosition:typeof a.labelPosition=="string"?a.labelPosition:void 0,pcLayout:a.pcLayout&&typeof a.pcLayout=="object"?a.pcLayout:void 0,mobileLayout:a.mobileLayout&&typeof a.mobileLayout=="object"?a.mobileLayout:void 0}}catch{return{}}}function K7({text:t}){return g.jsx("div",{className:"flex min-h-[220px] items-center justify-center rounded-[24px] border border-dashed border-slate-200 bg-slate-50/60 px-6 text-center text-sm text-slate-400",children:t||"暂无图表数据"})}function IEe(t){switch(t){case"left":case"right":case"top":case"bottom":case"center":return t;default:return"auto"}}function jEe(t){if(Number.isFinite(t))return Math.max(40,Math.min(100,t))}function OEe(t,e,r){var n;return r||t==="line"||t==="bar"||(t==="pie"||t==="ring")&&e.showDataLabels!==!1&&!["inside","center"].includes(((n=e.labelPosition)==null?void 0:n.trim())||"outside")?100:78}function zEe(t,e,r){const a=t.renderType,n=r?e.mobileLayout:e.pcLayout,i=IEe(n==null?void 0:n.preset),o=jEe(n==null?void 0:n.chartWidthPercent)??OEe(a,e,r),s=Number.isFinite(n==null?void 0:n.chartHeight)?Math.max(180,Math.min(520,Number(n==null?void 0:n.chartHeight))):void 0;let l="center",u="flex-start";return i==="left"?l="flex-start":i==="right"?l="flex-end":i==="top"?u="flex-start":i==="bottom"&&(u="flex-end"),{chartHeight:s,containerStyle:{width:"100%",minHeight:s,display:"flex",justifyContent:l,alignItems:u},innerStyle:{width:`${o}%`,maxWidth:"100%"}}}function Q7({card:t,expanded:e}){var o;const r=au(),a=t.renderType,n=PEe(t.displayTextConfig,a),i=zEe(t,n,r);return!a||!LEe.has(a)?g.jsx(K7,{text:n.emptyText}):(o=t.chartData)!=null&&o.length?g.jsx("div",{style:i.containerStyle,children:g.jsx("div",{style:i.innerStyle,children:g.jsx(DEe,{card:t,expanded:e,heightOverride:i.chartHeight})})}):g.jsx(K7,{text:n.emptyText})}function BEe(t){var e;return((e=t.contentType)==null?void 0:e.startsWith("image/"))||/\.(png|jpe?g|webp|gif|bmp)$/i.test(t.name||t.url||"")}function VEe(t){return t.contentType==="application/pdf"||/\.pdf$/i.test(t.name||t.url||"")}function J7(t){const e=t.contentType||"",r=t.name||t.url||"";return e.startsWith("text/")||["application/json","application/xml","application/javascript","application/x-javascript"].includes(e)||/\.(md|markdown|txt|csv|json|xml|yaml|yml|log|sql)$/i.test(r)}function sP({attachment:t,onClose:e}){const[r,a]=E.useState(""),[n,i]=E.useState(""),[o,s]=E.useState(""),l=t.name||"附件";E.useEffect(()=>{let d=!0,h="";return a(""),i(""),s(""),(async()=>{try{const v=await YU(t.url||"");if(!v.ok)throw new Error(`附件加载失败(${v.status})`);const m=await v.blob();h=URL.createObjectURL(m);const x=J7(t)?await m.text():"";d?(a(h),i(x)):URL.revokeObjectURL(h)}catch(v){d&&s(v instanceof Error?v.message:"附件加载失败")}})(),()=>{d=!1,h&&URL.revokeObjectURL(h)}},[t]);const u=()=>{if(!r)return;const d=document.createElement("a");d.href=r,d.download=l,document.body.appendChild(d),d.click(),document.body.removeChild(d)},c=()=>{r&&window.open(r,"_blank","noopener,noreferrer")};return g.jsxs("div",{className:"fixed inset-0 z-[110]",children:[g.jsx("button",{type:"button",onClick:e,className:"absolute inset-0 bg-slate-950/82 backdrop-blur-sm","aria-label":"关闭附件预览"}),g.jsx("div",{className:"absolute inset-0 flex items-center justify-center px-4 py-6",children:g.jsxs("div",{className:"flex h-[min(760px,90dvh)] w-[min(960px,94vw)] flex-col overflow-hidden rounded-2xl border border-white/10 bg-white shadow-2xl dark:bg-slate-950",children:[g.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-slate-100 px-4 py-3 dark:border-slate-800",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("p",{className:"truncate text-sm font-semibold text-slate-900 dark:text-white",children:l}),g.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500",children:ux(t.size)})]}),g.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[g.jsx("button",{type:"button",onClick:c,disabled:!r,className:"inline-flex h-9 w-9 items-center justify-center rounded-full text-slate-500 transition-colors hover:bg-slate-100 disabled:opacity-40 dark:text-slate-300 dark:hover:bg-slate-800",title:"新窗口打开","aria-label":"新窗口打开",children:g.jsx(xae,{className:"h-4 w-4"})}),g.jsx("button",{type:"button",onClick:u,disabled:!r,className:"inline-flex h-9 w-9 items-center justify-center rounded-full text-slate-500 transition-colors hover:bg-slate-100 disabled:opacity-40 dark:text-slate-300 dark:hover:bg-slate-800",title:"下载附件","aria-label":"下载附件",children:g.jsx(By,{className:"h-4 w-4"})}),g.jsx("button",{type:"button",onClick:e,className:"inline-flex h-9 w-9 items-center justify-center rounded-full text-slate-500 transition-colors hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800","aria-label":"关闭",children:g.jsx(Oa,{className:"h-4 w-4"})})]})]}),g.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center bg-slate-100/70 p-3 dark:bg-slate-900",children:o?g.jsx("div",{className:"rounded-xl border border-rose-200 bg-white px-4 py-3 text-sm text-rose-600 dark:border-rose-500/30 dark:bg-slate-950 dark:text-rose-300",children:o}):r?BEe(t)?g.jsx("img",{src:r,alt:l,className:"max-h-full max-w-full rounded-xl object-contain shadow-lg"}):VEe(t)?g.jsx("iframe",{title:l,src:r,className:"h-full w-full rounded-xl border border-slate-200 bg-white dark:border-slate-800"}):J7(t)?n?g.jsx("pre",{className:"h-full w-full overflow-auto rounded-xl border border-slate-200 bg-white p-4 text-left text-sm leading-6 text-slate-800 shadow-inner dark:border-slate-800 dark:bg-slate-950 dark:text-slate-100",children:n}):g.jsx("div",{className:"rounded-xl border border-slate-200 bg-white px-4 py-3 text-sm text-slate-500 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-300",children:"文本附件内容为空,可新窗口打开或下载查看。"}):g.jsxs("div",{className:Ne("flex flex-col items-center rounded-2xl border border-slate-200 bg-white px-6 py-8 text-center dark:border-slate-800 dark:bg-slate-950"),children:[g.jsx(um,{className:"mb-3 h-10 w-10 text-violet-500"}),g.jsx("p",{className:"max-w-sm text-sm font-medium text-slate-900 dark:text-white",children:l}),g.jsx("p",{className:"mt-2 text-xs text-slate-500 dark:text-slate-400",children:"该类型不支持内嵌预览,可新窗口打开或下载查看。"})]}):g.jsx("div",{className:"h-20 w-20 animate-pulse rounded-2xl bg-slate-200 dark:bg-slate-800"})})]})})]})}function ux(t){return!t||t<=0?"未知大小":t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/1024/1024).toFixed(1)} MB`}const eF=5,tF=3,FEe=[{name:"本月新增商机",metricKey:"monthlyOpportunities",icon:LG,color:"text-emerald-600 dark:text-emerald-400",bg:"bg-emerald-100 dark:bg-emerald-500/20"},{name:"本月已签单商机金额",metricKey:"monthlyWonOpportunities",icon:TG,color:"text-amber-600 dark:text-amber-400",bg:"bg-amber-100 dark:bg-amber-500/20"},{name:"已推送OMS项目",metricKey:"pushedOmsProjects",icon:x_,color:"text-blue-600 dark:text-blue-400",bg:"bg-blue-100 dark:bg-blue-500/20"},{name:"本月新增渠道",metricKey:"monthlyChannels",icon:q0,color:"text-violet-600 dark:text-violet-400",bg:"bg-violet-100 dark:bg-violet-500/20"}],GEe={monthlyOpportunities:{pathname:"/opportunities"},pushedOmsProjects:{pathname:"/opportunities"},monthlyChannels:{pathname:"/expansion",state:{tab:"channel"}},monthlyWonOpportunities:{pathname:"/opportunities"}},HEe=new Set(["monthlyOpportunities","pushedOmsProjects","monthlyWonOpportunities"]),ad="__all__",rF="crm-dashboard-analytics-tab";function UEe(t,e){const r=e??0;return HEe.has(t)?{value:r.toFixed(2).replace(/\.?0+$/,""),unit:"万元"}:{value:String(r),unit:"个"}}function $Ee(t){const e=t.length;return e>=8?"text-[17px] min-[380px]:text-[18px] min-[430px]:text-[20px] min-[520px]:text-[28px]":e>=7?"text-[18px] min-[380px]:text-[20px] min-[430px]:text-[22px] min-[520px]:text-[30px]":"text-[20px] min-[380px]:text-[22px] min-[430px]:text-[24px] min-[520px]:text-[34px]"}function lP(t){return t.renderType!==void 0&&t.renderType!=="metric"}function dA(t){return!!(t!=null&&t.hasMore)&&t.renderType!=="metric"}function WEe(t){var a;const e=((a=t.chartData)==null?void 0:a.length)??0,r=t.totalCount??e;return!t.hasMore||r<=e?"":`已展示 ${e} / 共 ${r} 条`}function cx(t){if(!t)return{};try{const e=JSON.parse(t);if(!e||typeof e!="object")return{};const r=e,a=n=>Array.isArray(n)?n.map(i=>{if(typeof i=="string"){const u=i.trim();return u?{value:u,label:u}:null}if(!i||typeof i!="object")return null;const o=i,s=typeof o.value=="string"?o.value.trim():"";if(!s)return null;const l=typeof o.label=="string"?o.label.trim():s;return{value:s,label:l}}).filter(Boolean):[];return{...r,dimensionSwitchEnabled:!!r.dimensionSwitchEnabled,defaultDimension:typeof r.defaultDimension=="string"?r.defaultDimension:void 0,dimensionOptions:a(r.dimensionOptions),pcLayout:r.pcLayout&&typeof r.pcLayout=="object"?r.pcLayout:void 0,mobileLayout:r.mobileLayout&&typeof r.mobileLayout=="object"?r.mobileLayout:void 0}}catch{return{}}}function wQ(t){const e=cx(t.displayTextConfig);return e.dimensionSwitchEnabled?(e.dimensionOptions||[]).filter(r=>!!(r!=null&&r.value)):[]}function aF(t){var n,i;const e=cx(t.displayTextConfig),r=wQ(t),a=(n=e.defaultDimension)==null?void 0:n.trim();return a&&r.some(o=>o.value===a)?a:((i=r[0])==null?void 0:i.value)||""}function a_(t){const e=cx(t.displayTextConfig),r=Number(e.horizontalColumns);return Number.isFinite(r)?Math.max(1,Math.min(4,r)):2}const YEe=[{key:"dollar-sign",icon:IA,iconClassName:"text-blue-600",backgroundClassName:"bg-blue-50"},{key:"circle-dollar-sign",icon:sae,iconClassName:"text-cyan-600",backgroundClassName:"bg-cyan-50"},{key:"badge-dollar-sign",icon:Vre,iconClassName:"text-indigo-600",backgroundClassName:"bg-indigo-50"},{key:"hand-coins",icon:Tae,iconClassName:"text-teal-600",backgroundClassName:"bg-teal-50"},{key:"wallet",icon:Pne,iconClassName:"text-blue-600",backgroundClassName:"bg-blue-50"},{key:"shopping-cart",icon:vne,iconClassName:"text-amber-600",backgroundClassName:"bg-amber-50"},{key:"store",icon:yne,iconClassName:"text-orange-600",backgroundClassName:"bg-orange-50"},{key:"package",icon:Xae,iconClassName:"text-yellow-600",backgroundClassName:"bg-yellow-50"},{key:"users",icon:x_,iconClassName:"text-purple-600",backgroundClassName:"bg-purple-50"},{key:"building-2",icon:q0,iconClassName:"text-violet-600",backgroundClassName:"bg-violet-50"},{key:"trending-up",icon:LG,iconClassName:"text-emerald-600",backgroundClassName:"bg-emerald-50"},{key:"bar-chart-3",icon:TG,iconClassName:"text-sky-600",backgroundClassName:"bg-sky-50"},{key:"pie-chart",icon:tae,iconClassName:"text-fuchsia-600",backgroundClassName:"bg-fuchsia-50"},{key:"target",icon:_ne,iconClassName:"text-rose-600",backgroundClassName:"bg-rose-50"},{key:"trophy",icon:Ane,iconClassName:"text-yellow-700",backgroundClassName:"bg-yellow-50"},{key:"briefcase-business",icon:g_,iconClassName:"text-slate-600",backgroundClassName:"bg-slate-100"},{key:"landmark",icon:Mae,iconClassName:"text-stone-600",backgroundClassName:"bg-stone-100"},{key:"megaphone",icon:Gae,iconClassName:"text-pink-600",backgroundClassName:"bg-pink-50"},{key:"phone-call",icon:Kae,iconClassName:"text-green-600",backgroundClassName:"bg-green-50"},{key:"clipboard-list",icon:fae,iconClassName:"text-slate-600",backgroundClassName:"bg-slate-100"},{key:"file-text",icon:um,iconClassName:"text-zinc-600",backgroundClassName:"bg-zinc-100"},{key:"calendar-days",icon:Zre,iconClassName:"text-red-600",backgroundClassName:"bg-red-50"},{key:"activity",icon:SG,iconClassName:"text-lime-600",backgroundClassName:"bg-lime-50"},{key:"zap",icon:One,iconClassName:"text-yellow-600",backgroundClassName:"bg-yellow-50"},{key:"rocket",icon:rne,iconClassName:"text-violet-600",backgroundClassName:"bg-violet-50"}],Ao=Object.fromEntries(YEe.map(t=>[t.key,t])),XEe={revenue:"dollar-sign",customers:"users",orders:"shopping-cart",growth:"trending-up",analytics:"bar-chart-3",channel:"building-2"},SQ={blue:{accent:"#2563eb",soft:"#dbeafe",pale:"#eff6ff",dark:"#1d4ed8"},green:{accent:"#059669",soft:"#a7f3d0",pale:"#ecfdf5",dark:"#047857"},orange:{accent:"#ea580c",soft:"#fdba74",pale:"#fff7ed",dark:"#c2410c"},purple:{accent:"#7c3aed",soft:"#c4b5fd",pale:"#f5f3ff",dark:"#6d28d9"},red:{accent:"#dc2626",soft:"#fca5a5",pale:"#fef2f2",dark:"#b91c1c"},slate:{accent:"#475569",soft:"#cbd5e1",pale:"#f8fafc",dark:"#334155"}};function xa(t,e){const r=t.replace("#",""),a=r.length===3?r.split("").map(l=>`${l}${l}`).join(""):r,n=Number.parseInt(a,16);if(!Number.isFinite(n))return`rgba(37, 99, 235, ${e})`;const i=n>>16&255,o=n>>8&255,s=n&255;return`rgba(${i}, ${o}, ${s}, ${e})`}function qEe(t){return t?Ao[t]?t:XEe[t]||"":""}function ZEe(t,e){return t.metricTheme&&t.metricTheme in SQ?t.metricTheme:e&&["shopping-cart","store","package","trophy"].includes(e)?"orange":e&&["users","building-2","rocket","pie-chart"].includes(e)?"purple":e&&["trending-up","activity","phone-call","hand-coins"].includes(e)?"green":e&&["calendar-days","target","megaphone"].includes(e)?"red":e&&["briefcase-business","file-text","landmark","clipboard-list"].includes(e)?"slate":"blue"}function KEe(t,e){const r=SQ[ZEe(t,e)],a=t.metricStylePreset||"classic",n=t.metricIconShape||"rounded-square",i=n==="circle"?999:n==="pill"?24:18;return a==="contrast"?{container:{border:`1px solid ${xa("#ffffff",.08)}`,background:`linear-gradient(135deg, #0f172a 0%, ${r.dark} 100%)`,boxShadow:`0 16px 36px ${xa(r.accent,.2)}`},iconShell:{background:xa("#ffffff",.14),borderRadius:i,boxShadow:`inset 0 0 0 1px ${xa("#ffffff",.1)}`},iconColor:"#ffffff",titleColor:xa("#ffffff",.72),valueColor:"#ffffff",metaColor:xa("#ffffff",.84),badgeStyle:{background:xa("#ffffff",.12),color:"#ffffff",border:`1px solid ${xa("#ffffff",.16)}`}}:a==="gradient"?{container:{border:`1px solid ${xa(r.soft,.42)}`,background:`linear-gradient(135deg, ${xa(r.accent,.14)} 0%, #ffffff 52%, ${xa(r.soft,.62)} 100%)`,boxShadow:`0 12px 28px ${xa(r.accent,.08)}`},iconShell:{background:`linear-gradient(135deg, ${r.accent} 0%, ${r.dark} 100%)`,borderRadius:i,boxShadow:`0 14px 28px ${xa(r.accent,.22)}`},iconColor:"#ffffff",titleColor:r.dark,valueColor:"#0f172a",metaColor:"#475569",badgeStyle:{background:xa(r.accent,.1),color:r.dark,border:`1px solid ${xa(r.accent,.16)}`}}:a==="soft"?{container:{border:`1px solid ${xa(r.accent,.12)}`,background:`radial-gradient(circle at top right, ${xa(r.soft,.68)} 0%, #ffffff 58%)`,boxShadow:`0 12px 28px ${xa(r.accent,.06)}`},iconShell:{background:xa(r.accent,.12),borderRadius:i},iconColor:r.accent,titleColor:"#64748b",valueColor:"#0f172a",metaColor:"#64748b",badgeStyle:{background:xa(r.accent,.08),color:r.dark,border:`1px solid ${xa(r.accent,.14)}`}}:{container:{border:`1px solid ${xa(r.accent,.12)}`,background:`linear-gradient(180deg, #ffffff 0%, ${r.pale} 100%)`,boxShadow:`0 12px 28px ${xa(r.accent,.06)}`},iconShell:{background:xa(r.accent,.12),borderRadius:i},iconColor:r.accent,titleColor:"#64748b",valueColor:"#0f172a",metaColor:"#475569",badgeStyle:{background:xa(r.accent,.08),color:r.dark,border:`1px solid ${xa(r.accent,.14)}`}}}function QEe(t,e){if(t.fullRow||e&&lP(t)||t.layoutType!=="horizontal")return"col-span-12";if(e)switch(a_(t)){case 1:return"col-span-12";case 3:return"col-span-4";case 4:return"col-span-3";case 2:default:return"col-span-6"}switch(a_(t)){case 1:return"col-span-12";case 3:return"col-span-6 min-[420px]:col-span-4";case 4:return"col-span-6 min-[420px]:col-span-4 min-[520px]:col-span-3";case 2:default:return"col-span-6"}}function JEe(t,e){const r=qEe(cx(t.displayTextConfig).metricIconKey);if(r&&Ao[r])return Ao[r];const a=`${t.title||""}${t.subtitle||""}${t.description||""}`.toLowerCase(),n=[Ao["dollar-sign"],Ao.users,Ao["shopping-cart"],Ao["trending-up"]];return a.includes("金额")||a.includes("营收")||a.includes("收入")||a.includes("业绩")||a.includes("回款")||a.includes("销售额")?Ao["dollar-sign"]:a.includes("用户")||a.includes("客户")||a.includes("成员")||a.includes("人员")?Ao.users:a.includes("订单")||a.includes("签约")||a.includes("成交")||a.includes("商机")?Ao["shopping-cart"]:a.includes("渠道")||a.includes("组织")||a.includes("区域")||a.includes("网点")?Ao["building-2"]:a.includes("分析")||a.includes("排行")||a.includes("报表")||a.includes("统计")?Ao["bar-chart-3"]:a.includes("达成")||a.includes("增长")||a.includes("转化")||a.includes("完成率")||a.includes("效率")?Ao["trending-up"]:n[e%n.length]}function e5e(t){const e=new Map;return t.forEach(r=>{var o;const a=((o=r.groupName)==null?void 0:o.trim())||"",n=a||"__default__",i=e.get(n);if(i){i.cards.push(r);return}e.set(n,{key:n,title:a,isDefault:!a,cards:[r]})}),Array.from(e.values())}function t5e(t){return t.length<=1?[]:[{key:ad,title:"全部"},...t.map(e=>({key:e.key,title:e.title||"未分组"}))]}function r5e(t,e){if(!e||t.layoutType!=="horizontal"||t.fullRow||lP(t))return 1;const r=a_(t);return r<=2?1:Number((2/r).toFixed(4))}function a5e(t){return t<=.68?2:t<1?1:0}function n5e(){var Da,Tr,lr,Ba,Dr,Va,ua,Ze,wr;const t=ru(),e=au(),r=Gd(),a=e||r,[n,i]=E.useState({}),[o,s]=E.useState(!0),[l,u]=E.useState(!1),[c,d]=E.useState(!1),[h,v]=E.useState(!1),[m,x]=E.useState(!1),[b,w]=E.useState("todo"),[_,T]=E.useState(null),[C,k]=E.useState(null),[A,M]=E.useState(null),[L,R]=E.useState(null),[P,j]=E.useState(!1),[V,I]=E.useState(""),[F,G]=E.useState(null),[O,U]=E.useState(null),[$,K]=E.useState(!1),[q,H]=E.useState(""),[Z,te]=E.useState({}),[ie,ce]=E.useState({}),[me,ze]=E.useState(""),[Ce,ge]=E.useState(null),Be=E.useRef(null),[_e,Oe]=E.useState(()=>typeof window>"u"?ad:window.localStorage.getItem(rF)||ad);E.useEffect(()=>{let le=!1;async function tt(){try{const Ot=await Gce();le||i(Ot??{})}catch{le||i({})}finally{le||s(!1)}}return tt(),()=>{le=!0}},[]),E.useEffect(()=>{u(!1),d(!1),v(!1),x(!1)},[n.activities,n.todos,n.messages]);const xt=new Map((n.stats??[]).map(le=>[le.metricKey,le.value])),Ye=FEe.map(le=>({...le,value:xt.get(le.metricKey)})),st=E.useMemo(()=>(n.todos??[]).filter(le=>le.status!=="done"),[n.todos]),We=E.useMemo(()=>(n.todos??[]).filter(le=>le.status==="done"),[n.todos]),At=n.messages??[],kt=E.useMemo(()=>At.filter(le=>!le.readAt),[At]),Jt=E.useMemo(()=>At.filter(le=>le.readAt),[At]),Nr=c?We:We.slice(0,tF),rr=(Da=n.activities)!=null&&Da.length?n.activities:[{id:"0",title:"无",content:"无",timeText:"无"}],Fe=l?rr:rr.slice(0,eF),Mt=rr.length>eF&&((Tr=rr[0])==null?void 0:Tr.id)!=="0",dr=We.length>tF,ar=n.statsCardVisible!==!1,sa=n.todoCardVisible!==!1,va=n.activityCardVisible!==!1,rn=n.analyticsCardVisible!==!1&&((lr=n.analyticsPanel)==null?void 0:lr.enabled)===!0,wa=sa||At.length>0,En=sa?b:"message",pa=E.useMemo(()=>{var le;return(((le=n.analyticsPanel)==null?void 0:le.cards)??[]).filter(tt=>!tt.errorMessage).map(tt=>{const Ot=tt.cardKey?Z[tt.cardKey]:void 0;return Ot?{...tt,...Ot}:tt})},[Z,(Ba=n.analyticsPanel)==null?void 0:Ba.cards]),an=E.useMemo(()=>e5e(pa),[pa]),gr=E.useMemo(()=>t5e(an),[an]),Ar=E.useMemo(()=>_e===ad||!gr.length?an:an.filter(le=>le.key===_e),[_e,an,gr.length]);E.useEffect(()=>{if(!gr.length){_e!==ad&&Oe(ad);return}gr.some(le=>le.key===_e)||Oe(ad)},[_e,gr]),E.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(rF,_e)},[_e]),E.useEffect(()=>{if(!Ce)return;const le=tt=>{var Ot;(Ot=Be.current)!=null&&Ot.contains(tt.target)||ge(null)};return window.addEventListener("mousedown",le),()=>window.removeEventListener("mousedown",le)},[Ce]);const Hr=async le=>{if(!(!le||_===le)){T(le);try{await Hce(le),i(tt=>({...tt,todos:(tt.todos??[]).map(Ot=>Ot.id===le?{...Ot,status:"done",updatedAt:new Date().toISOString()}:Ot)}))}catch{}finally{T(null)}}},ye=async le=>{if(!(!(le!=null&&le.id)||C===le.id)){k(le.id),M(le),R(null),I(""),j(!0);try{if(!le.readAt){const tt=new Date().toISOString();try{await Uce(le.id);const Ot={...le,readAt:tt};i(pt=>({...pt,messages:(pt.messages??[]).map(nn=>nn.id===le.id?{...nn,readAt:tt}:nn)})),M(Ot)}catch{}}if(le.reportId){const tt=await e$(le.reportId);R(tt)}else I("未找到关联日报")}catch(tt){I(tt instanceof Error?tt.message:"日报详情加载失败")}finally{k(null),j(!1)}}},Rt=()=>{M(null),R(null),j(!1),I("")},Te=(L==null?void 0:L.content)||(A==null?void 0:A.content)||"",xe=(L==null?void 0:L.date)||(A==null?void 0:A.reportDate)||"",Pt=(L==null?void 0:L.time)||(A==null?void 0:A.timeText)||"",bt=l5e(A),Vt=((L==null?void 0:L.lineItems)??[]).filter((le,tt)=>bt.size>0&&bt.has(tt)),Zt=Vt.length>0,nr=(L==null?void 0:L.attachments)??[],_r=le=>{const tt=GEe[le];tt&&t(tt.pathname,tt.state?{state:tt.state}:void 0)},ma=le=>{if(!(!(le!=null&&le.bizId)||!le.bizType)){if(le.bizType==="opportunity"){const tt=le.targetTab==="archived"?"archived":"active";t("/opportunities",{state:{selectedId:le.bizId,archiveTab:tt}});return}if(le.bizType==="sales"||le.bizType==="channel"){const tt=le.targetTab==="channel"?"channel":"sales";t("/expansion",{state:{tab:tt,selectedId:le.bizId}})}}},Mr=le=>{dA(le)&&za(le)},Zr=async(le,tt)=>{if(!(!(le!=null&&le.cardKey)||!tt||me===le.cardKey)){ge(null),ze(le.cardKey),ce(Ot=>({...Ot,[le.cardKey]:tt}));try{const Ot=await d4(le.cardKey,tt);te(pt=>({...pt,[le.cardKey]:Ot})),(O==null?void 0:O.cardKey)===le.cardKey&&U(Ot)}catch{ce(Ot=>{const pt={...Ot};return delete pt[le.cardKey],pt})}finally{ze("")}}},za=async le=>{if(!(le!=null&&le.cardKey)||!dA(le))return;const tt=ie[le.cardKey]||aF(le);K(!0),H(""),U({...le,chartData:[]});try{const Ot=await d4(le.cardKey,tt||void 0);U(Ot)}catch(Ot){H(Ot instanceof Error?Ot.message:"加载完整卡片详情失败")}finally{K(!1)}},la=()=>{U(null),H(""),K(!1)};return g.jsxs("div",{className:"crm-page-stack",children:[g.jsx("header",{className:"crm-page-header",children:g.jsxs("div",{className:"crm-page-heading",children:[g.jsx("h1",{className:"crm-page-title",children:"工作台"}),g.jsxs("p",{className:"crm-page-subtitle",children:["欢迎回来,",n.realName||"无","。"]})]})}),o?g.jsx(Xt.div,{initial:a?!1:{opacity:0},animate:{opacity:1},transition:{duration:a?0:.22,ease:"easeOut"},children:g.jsx(i5e,{})},"dashboard-skeleton"):g.jsxs(Xt.div,{initial:a?!1:{opacity:0},animate:{opacity:1},transition:{duration:a?0:.24,ease:"easeOut"},children:[ar?g.jsx("div",{className:"grid grid-cols-2 gap-x-3 gap-y-4 min-[520px]:grid-cols-2 sm:gap-4 xl:grid-cols-4",children:Ye.map((le,tt)=>{const Ot=UEe(le.metricKey,le.value),pt=$Ee(Ot.value);return g.jsxs(Xt.button,{type:"button",onClick:()=>_r(le.metricKey),initial:a?!1:{opacity:0,y:20},animate:{opacity:1,y:0},transition:a?{duration:0}:{delay:tt*.1},className:"crm-card group min-h-[104px] overflow-hidden rounded-xl border border-slate-200/80 bg-white/95 p-3 text-left shadow-[0_14px_40px_-28px_rgba(15,23,42,0.35)] transition-all duration-200 hover:-translate-y-0.5 hover:border-violet-200 hover:shadow-[0_18px_44px_-24px_rgba(109,40,217,0.22)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-violet-500 focus-visible:ring-offset-2 dark:hover:bg-slate-900 min-[520px]:min-h-[128px] sm:rounded-2xl sm:p-5",whileTap:a?void 0:{scale:.98},"aria-label":`查看${le.name}`,children:[g.jsx("div",{className:"absolute inset-x-0 top-0 h-1 bg-gradient-to-r from-transparent via-violet-200/70 to-transparent opacity-0 transition-opacity duration-200 group-hover:opacity-100"}),g.jsxs("div",{className:"flex h-full flex-col justify-between gap-3 min-[520px]:gap-4",children:[g.jsxs("div",{className:"flex items-start gap-3 sm:gap-4",children:[g.jsx("div",{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-xl ${le.bg} shadow-inner shadow-white/60 min-[400px]:h-10 min-[400px]:w-10 min-[520px]:h-12 min-[520px]:w-12`,children:g.jsx(le.icon,{className:`h-4.5 w-4.5 ${le.color} min-[400px]:h-5 min-[400px]:w-5 min-[520px]:h-6 min-[520px]:w-6`})}),g.jsx("div",{className:"min-w-0 pt-0.5",children:g.jsx("p",{className:"max-h-10 overflow-hidden text-[11px] font-semibold leading-5 text-slate-500 dark:text-slate-400 min-[400px]:text-xs min-[520px]:text-sm",children:le.name})})]}),g.jsxs("div",{className:"flex items-end justify-between gap-2 min-[520px]:gap-3",children:[g.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:g.jsx("p",{className:`overflow-hidden text-ellipsis whitespace-nowrap font-bold leading-none tracking-[-0.05em] text-slate-900 dark:text-white ${pt}`,children:Ot.value})}),g.jsx("span",{className:"shrink-0 rounded-full bg-slate-100 px-1.5 py-1 text-[10px] font-medium tracking-wide text-slate-500 dark:bg-slate-800 dark:text-slate-300 min-[430px]:px-2 min-[520px]:px-2.5 min-[520px]:text-xs",children:Ot.unit})]})]})]},le.name)})}):null,g.jsxs("div",{className:`${ar?"mt-5 md:mt-6 ":""}grid gap-5 grid-cols-1 md:gap-6`,children:[wa?g.jsxs(Xt.div,{initial:a?!1:{opacity:0,y:20},animate:{opacity:1,y:0},transition:a?{duration:0}:{delay:.4},className:"overflow-hidden rounded-[30px] border border-slate-100 bg-white p-5 shadow-[0_16px_38px_-30px_rgba(15,23,42,0.14)]",children:[g.jsxs("div",{className:"crm-dashboard-panel-header",children:[g.jsxs("div",{className:"crm-dashboard-panel-heading",children:[g.jsx("h2",{className:"crm-dashboard-panel-title",children:"待办事项"}),g.jsx("p",{className:"crm-dashboard-panel-subtitle",children:"集中处理个人待办和日报推送消息"})]}),g.jsxs("span",{className:"crm-dashboard-panel-meta",children:["待办 ",st.length+We.length," · 消息 ",At.length]})]}),sa?g.jsxs("div",{className:"mb-4 grid grid-cols-2 gap-1 rounded-2xl bg-slate-100 p-1",children:[g.jsx("button",{type:"button",onClick:()=>w("todo"),className:`rounded-xl px-4 py-2 text-sm font-semibold transition-colors ${b==="todo"?"bg-white text-violet-600 shadow-sm":"text-slate-500 hover:text-slate-700"}`,"aria-pressed":b==="todo",children:"待办"}),g.jsx("button",{type:"button",onClick:()=>w("message"),className:`rounded-xl px-4 py-2 text-sm font-semibold transition-colors ${b==="message"?"bg-white text-violet-600 shadow-sm":"text-slate-500 hover:text-slate-700"}`,"aria-pressed":b==="message",children:"消息"})]}):null,En==="todo"?g.jsxs("div",{className:"crm-section-stack sm:gap-5",children:[g.jsxs("div",{className:"rounded-[24px] border border-slate-100 bg-slate-50/70 p-4",children:[g.jsxs("div",{className:"mb-2 flex items-center gap-2 sm:mb-3",children:[g.jsx("span",{className:"rounded-full border border-slate-200 bg-white px-3 py-1 text-[11px] font-semibold text-slate-500",children:"待办"}),g.jsxs("span",{className:"text-xs text-slate-400 dark:text-slate-500",children:[st.length," 条未完成"]})]}),st.length?g.jsx("ul",{className:"space-y-2.5 sm:space-y-3",children:st.map(le=>g.jsxs("li",{className:"group flex items-start gap-3 rounded-[20px] border border-slate-100 bg-white px-4 py-3 transition-all hover:border-slate-200 hover:bg-slate-50/70",children:[g.jsx("button",{type:"button",onClick:()=>void Hr(le.id),disabled:_===le.id,className:"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border-2 border-slate-300 text-transparent transition-colors hover:border-blue-500 disabled:cursor-not-allowed disabled:opacity-60","aria-label":`完成待办:${fA(le)}`,children:g.jsx(Fu,{className:"h-3 w-3"})}),g.jsx("div",{className:"min-w-0 flex-1",children:g.jsx("p",{className:"truncate text-sm font-medium text-slate-700 transition-colors group-hover:text-slate-900",children:fA(le)})})]},le.id))}):g.jsx("div",{className:"crm-empty-panel",children:"暂无未完成待办"})]}),g.jsxs("div",{className:"rounded-[24px] border border-slate-100 bg-slate-50/70 p-4",children:[g.jsxs("button",{type:"button",onClick:()=>v(le=>!le),className:"flex w-full items-center justify-between rounded-[20px] border border-slate-200 bg-white px-4 py-3 text-left transition-colors hover:border-slate-300 hover:bg-slate-50",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"rounded-full border border-slate-200 bg-white px-3 py-1 text-[11px] font-semibold text-slate-500",children:"历史"}),g.jsxs("span",{className:"text-xs text-slate-400 dark:text-slate-500",children:[We.length," 条已完成"]})]}),g.jsx("span",{className:"text-sm font-medium text-slate-500",children:h?"收起":"展开"})]}),h?We.length?g.jsxs(g.Fragment,{children:[g.jsx("ul",{className:"mt-3 space-y-2.5 sm:space-y-3",children:Nr.map(le=>g.jsxs("li",{className:"flex items-start gap-3 rounded-[20px] border border-slate-100 bg-white px-4 py-3",children:[g.jsx("div",{className:"mt-1 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-emerald-500 text-white",children:g.jsx(Fu,{className:"h-3 w-3"})}),g.jsx("div",{className:"min-w-0 flex-1",children:g.jsx("p",{className:"truncate text-sm text-slate-500 line-through",children:fA(le)})})]},le.id))}),dr?g.jsx("button",{type:"button",onClick:()=>d(le=>!le),className:"mt-3 w-full rounded-[18px] border border-dashed border-slate-200 px-3 py-2 text-sm font-medium text-slate-500 transition-colors hover:border-slate-300 hover:text-slate-700",children:c?"收起历史明细":`展开更多 (${We.length})`}):null]}):g.jsx("div",{className:"crm-empty-panel mt-3",children:"暂无历史待办"}):null]})]}):g.jsx("div",{className:"rounded-[24px] border border-slate-100 bg-slate-50/70 p-4",children:At.length?g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"mb-2 flex items-center gap-2 sm:mb-3",children:[g.jsx("span",{className:"rounded-full border border-slate-200 bg-white px-3 py-1 text-[11px] font-semibold text-slate-500",children:"未查阅"}),g.jsxs("span",{className:"text-xs text-slate-400 dark:text-slate-500",children:[kt.length," 条"]})]}),kt.length?g.jsx("ul",{className:"space-y-2.5 sm:space-y-3",children:kt.map(le=>g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:()=>void ye(le),disabled:C===le.id,className:"w-full rounded-[20px] border border-slate-100 bg-white px-4 py-3 text-left transition-all hover:border-violet-200 hover:bg-violet-50/50 disabled:cursor-wait disabled:opacity-70",children:[g.jsxs("div",{className:"flex items-start justify-between gap-3",children:[g.jsxs("p",{className:"min-w-0 flex-1 text-sm font-semibold text-slate-900",children:[le.senderName||"同事"," 提交日报并通知了你"]}),g.jsx("span",{className:"shrink-0 text-[10px] text-slate-400",children:le.timeText||le.reportDate||""})]}),le.bizName?g.jsx("p",{className:"mt-1 truncate text-xs font-medium text-violet-600",children:le.bizName}):null,g.jsx("p",{className:"crm-field-note mt-1 line-clamp-2 whitespace-pre-line",children:le.content||"无"})]})},le.id))}):g.jsx("div",{className:"crm-empty-panel",children:"暂无未查阅消息"})]}),g.jsxs("div",{children:[g.jsxs("button",{type:"button",onClick:()=>x(le=>!le),className:"flex w-full items-center justify-between rounded-[20px] border border-slate-200 bg-white px-4 py-3 text-left transition-colors hover:border-slate-300 hover:bg-slate-50",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"rounded-full border border-slate-200 bg-white px-3 py-1 text-[11px] font-semibold text-slate-500",children:"已查阅"}),g.jsxs("span",{className:"text-xs text-slate-400 dark:text-slate-500",children:[Jt.length," 条"]})]}),g.jsx("span",{className:"text-sm font-medium text-slate-500",children:m?"收起":"展开"})]}),m?Jt.length?g.jsx("ul",{className:"mt-3 space-y-2.5 sm:space-y-3",children:Jt.map(le=>g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:()=>void ye(le),disabled:C===le.id,className:"w-full rounded-[20px] border border-slate-100 bg-white px-4 py-3 text-left transition-colors hover:border-slate-200 hover:bg-slate-50 disabled:cursor-wait disabled:opacity-70",children:[g.jsxs("div",{className:"flex items-start justify-between gap-3",children:[g.jsxs("p",{className:"min-w-0 flex-1 truncate text-sm text-slate-500",children:[le.senderName||"同事"," 提交日报并通知了你"]}),g.jsx(Fu,{className:"mt-0.5 h-4 w-4 shrink-0 text-emerald-500"})]}),g.jsx("p",{className:"crm-field-note mt-1 line-clamp-2 whitespace-pre-line",children:le.content||"无"})]})},le.id))}):g.jsx("div",{className:"crm-empty-panel mt-3",children:"暂无已查阅消息"}):null]})]}):g.jsx("div",{className:"crm-empty-panel",children:"暂无日报通知"})})]}):null,rn?g.jsx(Xt.div,{initial:a?!1:{opacity:0,y:20},animate:{opacity:1,y:0},transition:a?{duration:0}:{delay:.45},children:pa.length?g.jsxs("div",{className:"space-y-3 min-[420px]:space-y-4",children:[g.jsxs("div",{className:"space-y-3",children:[(Dr=n.analyticsPanel)!=null&&Dr.title||(Va=n.analyticsPanel)!=null&&Va.subtitle?g.jsx("div",{className:"crm-dashboard-panel-header",children:g.jsxs("div",{className:"crm-dashboard-panel-heading",children:[(ua=n.analyticsPanel)!=null&&ua.title?g.jsx("h2",{className:"crm-dashboard-panel-title",children:n.analyticsPanel.title}):null,(Ze=n.analyticsPanel)!=null&&Ze.subtitle?g.jsx("p",{className:"crm-dashboard-panel-subtitle",children:n.analyticsPanel.subtitle}):null]})}):null,gr.length?g.jsx("div",{className:"crm-filter-bar overflow-x-auto px-1 py-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:g.jsx("div",{className:"flex min-w-full gap-1",children:gr.map(le=>{const tt=le.key===_e;return g.jsx("button",{type:"button",onClick:()=>Oe(le.key),className:`rounded-lg px-4 py-2 text-sm font-medium transition-colors duration-200 max-sm:min-w-[84px] max-sm:flex-none sm:flex-1 ${tt?"bg-white text-violet-600 shadow-sm":"text-slate-600 hover:text-slate-900"}`,"aria-pressed":tt,children:le.title},le.key)})})}):null]}),Ar.map(le=>{const tt=!le.isDefault||an.length>1,Ot=tt&&_e===ad;return g.jsxs("section",{className:tt?"rounded-[28px] border border-slate-100 bg-white/96 p-4 shadow-[0_16px_36px_-28px_rgba(15,23,42,0.16)] min-[420px]:p-5":"",children:[Ot?g.jsx("div",{className:"mb-3 min-[420px]:mb-4",children:g.jsx("h3",{className:"truncate text-sm font-bold text-slate-900 min-[420px]:text-[15px]",children:le.title||"未分组"})}):null,g.jsx("div",{className:`grid grid-cols-12 gap-3 min-[420px]:gap-4 ${e?"":"sm:gap-4"}`,children:le.cards.map((pt,nn)=>{var jr,zi,xn;const Sa=dA(pt),Zn=lP(pt);a_(pt);const Ur=r5e(pt,e),Rn=a5e(Ur),Kr=e&&pt.layoutType==="horizontal"&&!pt.fullRow&&!Zn&&Rn>=1,$a=Kr&&Rn>=2,fr=cx(pt.displayTextConfig),Vo=JEe(pt,nn),bi=KEe(fr,Vo.key),Pn=Vo.icon,Qr=WEe(pt),Ss=wQ(pt),Ji=pt.cardKey?ie[pt.cardKey]||aF(pt):"",Oi=pt.cardKey?me===pt.cardKey:!1,mo=e&&Ur<=.82,In=!(e&&Ur<=.68),Wa=!!((jr=fr.metricBadgeText)!=null&&jr.trim())&&!mo,La=!!pt.subtitle&&!mo,wi=Ur<1?{zoom:Ur,width:`${100/Ur}%`}:void 0;return g.jsx("div",{onClick:()=>Mr(pt),onKeyDown:Or=>{Sa&&(Or.key==="Enter"||Or.key===" ")&&(Or.preventDefault(),Mr(pt))},role:Sa?"button":void 0,tabIndex:Sa?0:void 0,className:`${QEe(pt,e)} ${Zn?"overflow-visible":"overflow-hidden"} text-left transition-all ${Sa?"cursor-pointer hover:-translate-y-0.5":""} ${Zn?`${Kr?"rounded-[24px] p-4":"rounded-[32px] p-6"} border border-slate-100 bg-white shadow-sm ${Sa?"hover:shadow-md":""}`:$a?"rounded-[18px] p-3":Kr?"rounded-[20px] p-4":"rounded-[24px] p-5"}`,style:Zn?void 0:bi.container,children:Zn?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:`${Kr?"mb-4 gap-2":"mb-6 gap-4"} flex items-start justify-between`,children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("h3",{className:`${Kr?"text-sm":"text-base"} truncate font-bold text-slate-800`,children:pt.title||"未命名卡片"}),pt.subtitle?g.jsx("p",{className:`${Kr?"text-[9px]":"text-[10px]"} mt-1 font-medium text-slate-400`,children:pt.subtitle}):null]}),Ss.length?g.jsxs("div",{ref:Ce===pt.cardKey?Be:void 0,className:"relative shrink-0",onClick:Or=>Or.stopPropagation(),onKeyDown:Or=>Or.stopPropagation(),children:[g.jsxs("button",{type:"button",disabled:Oi,"aria-haspopup":"listbox","aria-expanded":Ce===pt.cardKey,"aria-label":`${pt.title||"图表"}维度筛选`,onClick:()=>ge(Or=>Or===pt.cardKey?null:pt.cardKey||null),className:`inline-flex h-[12px] items-center gap-0 rounded-sm bg-transparent px-0 text-[4px] font-medium text-slate-400 shadow-none transition-all ${Oi?"opacity-70":"hover:text-slate-600"}`,children:[g.jsx("span",{className:"max-w-[18px] truncate leading-none",children:((zi=Ss.find(Or=>Or.value===Ji))==null?void 0:zi.label)||Ji}),g.jsx(zy,{className:`h-1.5 w-1.5 text-slate-300 transition-transform ${Ce===pt.cardKey?"rotate-180":""}`})]}),Ce===pt.cardKey?g.jsx("div",{role:"listbox",className:"absolute right-0 top-[calc(100%+4px)] z-20 min-w-[60px] overflow-hidden rounded-md bg-white/92 p-0.5 shadow-[0_14px_24px_-18px_rgba(15,23,42,0.22)] backdrop-blur",children:Ss.map(Or=>{const Kn=Or.value===Ji;return g.jsxs("button",{type:"button",role:"option","aria-selected":Kn,onClick:()=>void Zr(pt,Or.value),className:`flex w-full items-center justify-between rounded-sm px-1 py-[2px] text-left text-[4px] font-medium leading-none transition-colors ${Kn?"bg-slate-900 text-white":"text-slate-500 hover:bg-slate-50 hover:text-slate-700"}`,children:[g.jsx("span",{children:Or.label}),Kn?g.jsx(Fu,{className:"h-1.5 w-1.5"}):null]},Or.value)})}):null]}):g.jsx("span",{className:`${Kr?"p-1.5":"p-2"} rounded-xl text-slate-300`,children:g.jsx(gae,{className:"h-4 w-4"})})]}),g.jsx(Q7,{card:pt}),Qr?g.jsx("div",{className:`${Kr?"mt-4 pt-3 text-[10px]":"mt-5 pt-4 text-[11px]"} border-t border-slate-100 text-center text-slate-400`,children:Qr}):null]}):g.jsxs("div",{style:wi,children:[g.jsxs("div",{className:"flex items-start justify-between gap-3",children:[In?g.jsx("div",{className:`${$a?"h-8 w-8":Kr?"h-9 w-9":"h-10 w-10"} flex items-center justify-center`,style:bi.iconShell,children:g.jsx(Pn,{className:$a?"h-4 w-4":"h-[18px] w-[18px]",style:{color:bi.iconColor}})}):g.jsx("span",{}),Wa?g.jsx("span",{className:`${$a?"px-2 py-1 text-[8px]":"px-2.5 py-1 text-[10px]"} inline-flex items-center rounded-full font-bold`,style:bi.badgeStyle,children:(xn=fr.metricBadgeText)==null?void 0:xn.trim()}):null]}),g.jsx("p",{className:`${$a?"text-[9px] leading-4":"text-[10px]"} ${In?"mt-3":"mt-1.5"} line-clamp-2 font-bold uppercase tracking-wider`,style:{color:bi.titleColor},children:pt.title||"未命名卡片"}),g.jsx("h3",{className:`${$a?"mt-1 text-lg leading-tight":Kr?"mt-1 text-[19px]":"mt-1 text-xl"} font-bold`,style:{color:bi.valueColor},children:pt.valueText||pt.value||"0"}),La?g.jsx("p",{className:`${$a?"mt-1 text-[9px]":"mt-1.5 text-[10px]"} font-medium`,style:{color:bi.metaColor},children:pt.subtitle}):null]})},pt.cardKey||pt.id||pt.title)})})]},le.key)})]}):g.jsx("div",{className:"crm-empty-panel",children:((wr=n.analyticsPanel)==null?void 0:wr.emptyStateText)||"暂无可展示的经营分析卡片"})}):null,va?g.jsxs(Xt.div,{initial:a?!1:{opacity:0,y:20},animate:{opacity:1,y:0},transition:a?{duration:0}:{delay:.5},className:"overflow-hidden rounded-[30px] border border-slate-100 bg-white p-5 shadow-[0_16px_38px_-30px_rgba(15,23,42,0.14)]",children:[g.jsxs("div",{className:"crm-dashboard-panel-header",children:[g.jsxs("div",{className:"crm-dashboard-panel-heading",children:[g.jsx("h2",{className:"crm-dashboard-panel-title",children:"最新动态"}),g.jsx("p",{className:"crm-dashboard-panel-subtitle",children:"追踪最近业务流转和状态变化"})]}),g.jsxs("span",{className:"crm-dashboard-panel-meta",children:[Fe.length," 条动态"]})]}),g.jsxs("div",{className:"rounded-[24px] border border-slate-100 bg-slate-50/70 p-4",children:[g.jsx("div",{className:"crm-section-stack sm:gap-5",children:Fe.map((le,tt)=>g.jsxs("button",{type:"button",onClick:()=>ma(le),disabled:!(le!=null&&le.bizId)||!(le!=null&&le.bizType),className:"group flex w-full gap-4 rounded-[20px] border border-slate-100 bg-white px-4 py-3 text-left transition-colors hover:border-slate-200 hover:bg-slate-50/70 disabled:cursor-default disabled:hover:border-slate-100 disabled:hover:bg-white",children:[g.jsxs("div",{className:"relative mt-1 flex h-3 w-3 shrink-0 items-center justify-center",children:[g.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-violet-400 opacity-20"}),g.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-violet-500"})]}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-start justify-between gap-3",children:[g.jsx("p",{className:"text-sm font-semibold text-slate-900 transition-colors group-hover:text-slate-700",children:le.title||"无"}),le.bizId?g.jsx("span",{className:"shrink-0 rounded-full border border-slate-200 bg-white px-2.5 py-1 text-[10px] font-medium text-slate-500",children:"查看"}):null]}),g.jsx("p",{className:"crm-field-note mt-0.5 line-clamp-2",children:le.content||"无"}),g.jsxs("div",{className:"mt-1 flex items-center gap-2 text-[10px] text-slate-400",children:[g.jsx("span",{children:le.timeText||"无"}),le.operatorName?g.jsxs("span",{children:["· ",le.operatorName]}):null]})]})]},le.id??tt))}),Mt&&!l?g.jsx("button",{type:"button",onClick:()=>u(!0),className:"mt-4 w-full rounded-[18px] border border-dashed border-slate-200 px-3 py-2 text-sm font-medium text-slate-500 transition-colors hover:border-slate-300 hover:text-slate-700",children:"..."}):null]})]}):null]})]},"dashboard-content"),A?g.jsx("div",{className:"fixed inset-0 z-50 flex items-end justify-center bg-slate-950/45 p-3 sm:items-center sm:p-6",onClick:Rt,children:g.jsxs("div",{className:"flex max-h-[88vh] w-full max-w-2xl flex-col overflow-hidden rounded-[28px] bg-white shadow-[0_28px_80px_-28px_rgba(15,23,42,0.45)]",onClick:le=>le.stopPropagation(),children:[g.jsxs("div",{className:"flex min-h-[88px] items-start justify-between gap-4 border-b border-slate-200 px-5 py-5 sm:px-6",children:[g.jsxs("div",{className:"min-w-0 space-y-1.5",children:[g.jsx("h3",{className:"text-[17px] font-semibold text-slate-900 sm:text-[19px]",children:"日报详情"}),g.jsxs("p",{className:"text-xs leading-5 text-slate-500 sm:text-sm",children:[A.senderName||"同事"," · ",xe||"无日期",Pt?` ${Pt}`:""]})]}),g.jsx("button",{type:"button",onClick:Rt,className:"rounded-full border border-slate-200 bg-white p-2 text-slate-500 transition-colors hover:border-slate-300 hover:text-slate-700","aria-label":"关闭日报详情",children:g.jsx(Oa,{className:"h-4 w-4"})})]}),g.jsx("div",{className:"overflow-y-auto px-5 py-5 sm:px-6 sm:py-6",children:P?g.jsx("div",{className:"crm-empty-panel",children:"正在加载日报详情..."}):V?g.jsx("div",{className:"rounded-2xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-600",children:V}):g.jsxs("div",{className:"space-y-4",children:[A.bizName?g.jsxs("div",{className:"rounded-2xl border border-violet-100 bg-violet-50/60 px-4 py-3",children:[g.jsx("p",{className:"text-xs font-medium text-violet-500",children:"关联对象"}),g.jsx("p",{className:"mt-1 text-sm font-semibold text-violet-700",children:A.bizName})]}):null,Zt?g.jsxs("div",{className:"space-y-3",children:[g.jsx("p",{className:"text-xs font-medium text-slate-500",children:"日报内容"}),Vt.map((le,tt)=>{const Ot=le.attachments??[];return g.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-slate-50/80 px-4 py-3",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsxs("span",{className:"rounded-full bg-violet-50 px-2.5 py-1 text-xs font-semibold text-violet-600",children:["记录 ",tt+1]}),le.bizName?g.jsxs("span",{className:"text-xs font-medium text-slate-500",children:[o5e(le.bizType)," · ",le.bizName]}):null]}),g.jsx("p",{className:"mt-3 whitespace-pre-line text-sm leading-7 text-slate-700",children:s5e(le)||"无"}),Ot.length?g.jsxs("div",{className:"mt-3 border-t border-slate-200/80 pt-3",children:[g.jsxs("p",{className:"mb-2 text-xs font-medium text-slate-500",children:["附件 · ",Ot.length," 个"]}),g.jsx(nF,{attachments:Ot,onPreview:G})]}):null]},`${A.id}-message-line-${tt}`)})]}):g.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-slate-50/80 px-4 py-3",children:[g.jsx("p",{className:"text-xs font-medium text-slate-500",children:"日报内容"}),g.jsx("p",{className:"mt-2 whitespace-pre-line text-sm leading-7 text-slate-700",children:Te||"无"})]}),nr.length?g.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-slate-50/80 px-4 py-3",children:[g.jsxs("p",{className:"mb-2 text-xs font-medium text-slate-500",children:["日报附件 · ",nr.length," 个"]}),g.jsx(nF,{attachments:nr,onPreview:G})]}):null,L!=null&&L.comment?g.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white px-4 py-3",children:[g.jsx("p",{className:"text-xs font-medium text-slate-500",children:"主管点评"}),g.jsx("p",{className:"mt-2 whitespace-pre-line text-sm leading-7 text-slate-700",children:L.comment})]}):null]})})]})}):null,F?g.jsx(sP,{attachment:F,onClose:()=>G(null)}):null,O?g.jsx("div",{className:"fixed inset-0 z-50 flex items-end justify-center bg-slate-950/45 p-3 sm:items-center sm:p-6",onClick:la,children:g.jsxs("div",{className:"flex max-h-[88vh] w-full max-w-3xl flex-col overflow-hidden rounded-[28px] bg-white shadow-[0_28px_80px_-28px_rgba(15,23,42,0.45)]",onClick:le=>le.stopPropagation(),children:[g.jsxs("div",{className:"flex min-h-[88px] items-start justify-between gap-4 border-b border-slate-200 px-5 py-5 sm:px-6",children:[g.jsxs("div",{className:"min-w-0 space-y-1.5",children:[g.jsx("h3",{className:"text-[17px] font-semibold text-slate-900 sm:text-[19px]",children:O.title||"经营分析详情"}),O.subtitle?g.jsx("p",{className:"text-xs leading-5 text-slate-500 sm:text-sm",children:O.subtitle}):null]}),g.jsx("button",{type:"button",onClick:la,className:"rounded-full border border-slate-200 bg-white p-2 text-slate-500 transition-colors hover:border-slate-300 hover:text-slate-700","aria-label":"关闭经营分析详情",children:g.jsx(Oa,{className:"h-4 w-4"})})]}),g.jsx("div",{className:"overflow-y-auto px-5 py-5 sm:px-6 sm:py-6",children:$?g.jsx("div",{className:"rounded-3xl bg-slate-50/80 p-4 sm:p-5",children:g.jsx("div",{className:"crm-empty-panel",children:"正在加载完整数据..."})}):q?g.jsx("div",{className:"rounded-3xl bg-slate-50/80 p-4 sm:p-5",children:g.jsx("div",{className:"rounded-2xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-600",children:q})}):g.jsx("div",{className:"rounded-3xl bg-slate-50/80 p-4 sm:p-5",children:g.jsx(Q7,{card:O,expanded:!0})})})]})}):null]})}function i5e(){return g.jsxs("div",{className:"animate-[fadeIn_220ms_ease-out]",children:[g.jsx("div",{className:"grid grid-cols-2 gap-x-3 gap-y-4 sm:gap-4 xl:grid-cols-4",children:[0,1,2,3].map(t=>g.jsx("div",{className:"crm-card min-h-[88px] rounded-xl p-3 sm:min-h-[104px] sm:rounded-2xl sm:p-5",children:g.jsxs("div",{className:"flex items-center gap-2.5 sm:gap-4",children:[g.jsx("div",{className:"h-9 w-9 animate-pulse rounded-lg bg-slate-100 dark:bg-slate-800 sm:h-12 sm:w-12 sm:rounded-xl"}),g.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[g.jsx("div",{className:"h-3 w-20 animate-pulse rounded bg-slate-100 dark:bg-slate-800 sm:h-4"}),g.jsx("div",{className:"h-6 w-10 animate-pulse rounded bg-slate-100 dark:bg-slate-800 sm:h-8"})]})]})},`dashboard-stat-skeleton-${t}`))}),g.jsxs("div",{className:"mt-5 grid gap-5 md:mt-6 md:grid-cols-2 md:gap-6",children:[g.jsxs("div",{className:"crm-card crm-card-pad-lg rounded-2xl",children:[g.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[g.jsx("div",{className:"h-5 w-20 animate-pulse rounded bg-slate-100 dark:bg-slate-800"}),g.jsx("div",{className:"h-3 w-12 animate-pulse rounded bg-slate-100 dark:bg-slate-800"})]}),g.jsxs("div",{className:"crm-section-stack sm:gap-5",children:[g.jsxs("div",{className:"crm-card-subtle rounded-xl p-3 sm:p-4",children:[g.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[g.jsx("div",{className:"h-6 w-10 animate-pulse rounded-full bg-slate-100 dark:bg-slate-800"}),g.jsx("div",{className:"h-3 w-20 animate-pulse rounded bg-slate-100 dark:bg-slate-800"})]}),g.jsx("div",{className:"space-y-3",children:[0,1].map(t=>g.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-white/80 bg-white px-3 py-3 dark:border-slate-700/60 dark:bg-slate-900/40",children:[g.jsx("div",{className:"mt-0.5 h-5 w-5 animate-pulse rounded-full bg-slate-100 dark:bg-slate-800"}),g.jsxs("div",{className:"flex-1 space-y-2",children:[g.jsx("div",{className:"h-3 w-11/12 animate-pulse rounded bg-slate-100 dark:bg-slate-800"}),g.jsx("div",{className:"h-3 w-2/3 animate-pulse rounded bg-slate-100 dark:bg-slate-800"})]})]},`todo-skeleton-${t}`))})]}),g.jsx("div",{className:"crm-card-subtle rounded-xl p-3 sm:p-4",children:g.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-slate-200 bg-white px-4 py-3 dark:border-slate-700 dark:bg-slate-900/40",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"h-6 w-10 animate-pulse rounded-full bg-slate-100 dark:bg-slate-800"}),g.jsx("div",{className:"h-3 w-20 animate-pulse rounded bg-slate-100 dark:bg-slate-800"})]}),g.jsx("div",{className:"h-4 w-10 animate-pulse rounded bg-slate-100 dark:bg-slate-800"})]})})]})]}),g.jsxs("div",{className:"crm-card crm-card-pad-lg rounded-2xl",children:[g.jsx("div",{className:"mb-4 h-5 w-24 animate-pulse rounded bg-slate-100 dark:bg-slate-800"}),g.jsx("div",{className:"crm-section-stack sm:gap-5",children:[0,1,2].map(t=>g.jsxs("div",{className:"flex gap-4",children:[g.jsx("div",{className:"mt-1 h-3 w-3 animate-pulse rounded-full bg-violet-100 dark:bg-violet-500/20"}),g.jsxs("div",{className:"flex-1 space-y-2",children:[g.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-slate-100 dark:bg-slate-800"}),g.jsx("div",{className:"h-3 w-full animate-pulse rounded bg-slate-100 dark:bg-slate-800"}),g.jsx("div",{className:"h-3 w-10 animate-pulse rounded bg-slate-100 dark:bg-slate-800"})]})]},`activity-skeleton-${t}`))})]})]})]})}function fA(t){var r;const e=(r=t.title)==null?void 0:r.trim();return e?t.bizType==="report"&&e.startsWith("明日工作计划:")?e.slice(7).trim()||"明日工作计划":e:"无"}function o5e(t){return t==="sales"?"人员拓展":t==="channel"?"渠道拓展":t==="opportunity"?"商机":"记录"}function s5e(t){var r,a;const e=((r=t.content)==null?void 0:r.trim())||((a=t.editorText)==null?void 0:a.trim())||"";return e?e.replace(/\r/g,"").split(`
`).filter(n=>{const i=n.trim();return i&&!i.startsWith("#")&&!/^to\s*[:]/i.test(i)}).join(`
`).replace(/[;]?\s*附件:\s*\d+\s*个\s*$/u,"").trim():""}function l5e(t){var a;const e=new Set,r=((a=t==null?void 0:t.lineIndexes)==null?void 0:a.split(","))??[];for(const n of r){const i=Number(n);Number.isInteger(i)&&i>=0&&e.add(i)}return e}function nF({attachments:t,onPreview:e}){return t.length?g.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(r=>g.jsxs("button",{type:"button",onClick:()=>e(r),className:"inline-flex max-w-full items-center gap-1.5 rounded-full border border-slate-200 bg-white px-2.5 py-1.5 text-xs font-medium text-slate-600 transition-colors hover:border-violet-200 hover:bg-violet-50 hover:text-violet-700",title:"预览附件",children:[g.jsx(y_,{className:"h-3.5 w-3.5 shrink-0"}),g.jsx("span",{className:"max-w-[180px] truncate",children:r.name||"附件"}),g.jsx("span",{className:"shrink-0 text-slate-400",children:ux(r.size)})]},r.url))}):null}const u5e="modulepreload",c5e=function(t){return"/"+t},iF={},f2=function(e,r,a){let n=Promise.resolve();if(r&&r.length>0){let o=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));n=o(r.map(u=>{if(u=c5e(u),u in iF)return;iF[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":u5e,c||(h.as="script"),h.crossOrigin="",h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),c)return new Promise((v,m)=>{h.addEventListener("load",v),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return n.then(o=>{for(const s of o||[])s.status==="rejected"&&i(s.reason);return e().catch(i)})};function hA(t){const e=typeof t.label=="string"?t.label.trim():"";return e||t.value}function d5e(){const[t,e]=E.useState(()=>typeof window>"u"?!1:window.matchMedia("(max-width: 639px)").matches);return E.useEffect(()=>{if(typeof window>"u")return;const r=window.matchMedia("(max-width: 639px)"),a=()=>e(r.matches);return a(),typeof r.addEventListener=="function"?(r.addEventListener("change",a),()=>r.removeEventListener("change",a)):(r.addListener(a),()=>r.removeListener(a))},[]),t}function Tt({options:t,placeholder:e="请选择",sheetTitle:r,disabled:a=!1,className:n,searchable:i=!1,searchPlaceholder:o="请输入关键字搜索",value:s,multiple:l=!1,onChange:u}){const[c,d]=E.useState(!1),[h,v]=E.useState(""),m=E.useRef(null),x=E.useRef(null),b=d5e(),[w,_]=E.useState("bottom"),[T,C]=E.useState(288),[k,A]=E.useState(null),M=l?Array.isArray(s)?s:[]:typeof s=="string"&&s?[s]:[],L=M.length>0?M.map(F=>{const G=t.find(O=>O.value===F);return G?hA(G):F}).filter(F=>!!F).join("、"):e,R=h.trim().toLowerCase(),P=i&&R?t.filter(F=>{const G=hA(F).toLowerCase(),O=F.value.toLowerCase();return G.includes(R)||O.includes(R)}):t,j=E.useCallback(()=>{if(b||!c||!m.current)return;const F=m.current.getBoundingClientRect(),G=window.innerHeight,O=24,U=(i?72:16)+24,$=Math.max(180,G-F.bottom-O-U),K=Math.max(180,F.top-O-U),q=$<280&&K>$,H=Math.min(360,q?K:$);_(q?"top":"bottom"),C(H),A({left:F.left,width:F.width,top:q?Math.max(O,F.top-8-(H+U)):F.bottom+8})},[b,l,c,i]);E.useEffect(()=>{if(!c||b)return;const F=O=>{var $,K;const U=O.target;!(($=m.current)!=null&&$.contains(U))&&!((K=x.current)!=null&&K.contains(U))&&d(!1)},G=O=>{O.key==="Escape"&&d(!1)};return document.addEventListener("mousedown",F),document.addEventListener("keydown",G),()=>{document.removeEventListener("mousedown",F),document.removeEventListener("keydown",G)}},[b,c]),E.useEffect(()=>{if(!c||b){A(null);return}j();const F=()=>j();return window.addEventListener("resize",F),window.addEventListener("scroll",F,!0),()=>{window.removeEventListener("resize",F),window.removeEventListener("scroll",F,!0)}},[b,c,j]),E.useEffect(()=>{if(!c||!b)return;const F=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=F}},[b,c]),E.useEffect(()=>{!c&&h&&v("")},[c,h]);const V=F=>{if(l){const G=Array.isArray(s)?s:[],O=G.includes(F)?G.filter(U=>U!==F):[...G,F];u(O);return}u(F),d(!1)},I=F=>{const G=l?M.includes(F.value):F.value===s,O=hA(F);return g.jsxs("button",{type:"button",disabled:F.disabled,onClick:()=>V(F.value),className:Ne("flex w-full items-center justify-between rounded-xl px-3 py-3 text-left text-sm transition-colors",G?"bg-violet-600 text-white shadow-sm":"text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-slate-800",F.disabled?"cursor-not-allowed opacity-50":""),children:[g.jsx("span",{className:"break-anywhere",children:O}),G?g.jsx(Fu,{className:"h-4 w-4 shrink-0"}):null]},`${F.value}-${O}`)};return g.jsxs("div",{ref:m,className:"relative",children:[g.jsxs("button",{type:"button",disabled:a,onClick:()=>{a||d(F=>!F)},className:Ne("crm-btn-sm crm-input-text flex w-full items-center justify-between border border-slate-200 bg-white text-left outline-none transition-colors hover:border-slate-300 focus:border-violet-500 focus:ring-1 focus:ring-violet-500 disabled:cursor-not-allowed disabled:opacity-60 dark:border-slate-800 dark:bg-slate-900/50 dark:hover:border-slate-700",n),children:[g.jsx("span",{className:M.length>0?"break-anywhere text-slate-900 dark:text-white":"crm-field-note",children:L}),g.jsx(zy,{className:Ne("h-4 w-4 shrink-0 text-slate-400 transition-transform",c?"rotate-180":"")})]}),c&&!b&&k&&typeof document<"u"?X0.createPortal(g.jsx("div",{className:"pointer-events-none fixed inset-0 z-[220]",children:g.jsxs("div",{ref:x,style:{position:"absolute",left:k.left,width:k.width,top:k.top},className:"pointer-events-auto rounded-2xl border border-slate-200 bg-white p-2 shadow-2xl dark:border-slate-800 dark:bg-slate-900",children:[i?g.jsx("div",{className:"mb-2",children:g.jsx("input",{type:"text",value:h,onChange:F=>v(F.target.value),placeholder:o,className:"w-full rounded-xl border border-slate-200 bg-slate-50 px-3 py-2 text-sm text-slate-700 outline-none transition-colors focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-700 dark:bg-slate-800/70 dark:text-slate-100"})}):null,g.jsx("div",{style:{maxHeight:`${T}px`},className:"space-y-1 overflow-y-auto pr-1",children:P.length>0?P.map(I):g.jsx("div",{className:"rounded-xl px-3 py-6 text-center text-sm text-slate-500 dark:text-slate-400",children:"未找到匹配选项"})})]})}),document.body):null,g.jsx(co,{children:c&&b?g.jsxs(g.Fragment,{children:[g.jsx(Xt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[120] bg-slate-900/35 backdrop-blur-sm dark:bg-slate-950/70",onClick:()=>d(!1)}),g.jsx(Xt.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:24},className:"fixed inset-x-0 bottom-0 z-[130] px-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))] pt-3",children:g.jsxs("div",{className:"mx-auto w-full max-w-lg rounded-3xl border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900",children:[g.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4 dark:border-slate-800",children:[g.jsxs("div",{children:[g.jsx("p",{className:"text-base font-semibold text-slate-900 dark:text-white",children:r||e}),g.jsx("p",{className:"crm-field-note mt-1",children:l?"可多选":"请选择一个选项"})]}),g.jsx("button",{type:"button",onClick:()=>d(!1),className:"rounded-full p-2 text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"h-5 w-5"})})]}),g.jsxs("div",{className:"max-h-[60vh] space-y-2 overflow-y-auto px-4 py-4 pb-[calc(1rem+env(safe-area-inset-bottom))]",children:[i?g.jsx("input",{type:"text",value:h,onChange:F=>v(F.target.value),placeholder:o,className:"w-full rounded-2xl border border-slate-200 bg-slate-50 px-4 py-3 text-sm text-slate-700 outline-none transition-colors focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-700 dark:bg-slate-800/70 dark:text-slate-100"}):null,P.length>0?P.map(I):g.jsx("div",{className:"rounded-2xl border border-dashed border-slate-200 px-4 py-6 text-center text-sm text-slate-500 dark:border-slate-700 dark:text-slate-400",children:"未找到匹配选项"}),l?g.jsx("button",{type:"button",onClick:()=>d(!1),className:"mt-2 w-full rounded-2xl bg-violet-600 px-4 py-3 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-violet-500",children:"完成"}):null]})]})})]}):null})]})}const z1=10;function T0(){return{name:"",mobile:"",title:""}}const kL="年度营业额(万元)",f5e="expansion:create",_Q="crm:expansion-export-preferences",B1={employeeNo:"",candidateName:"",officeName:"",mobile:"",industry:"",title:"",intentLevel:"medium",hasDesktopExp:!1,employmentStatus:"active"},V1={channelCode:"",channelName:"",province:"",city:"",officeAddress:"",channelIndustry:[],certificationLevel:"",contactEstablishedDate:"",intentLevel:"medium",hasDesktopExp:!1,channelAttribute:[],channelAttributeCustom:"",internalAttribute:[],stage:"initial_contact",remark:"",contacts:[T0()]};function h5e(t){const e=`${(t==null?void 0:t.label)??""}${(t==null?void 0:t.value)??""}`.toLowerCase();return e.includes("其他")||e.includes("其它")||e.includes("other")}function Ra(t){const e=t==null?void 0:t.trim();return e||void 0}function v5e(){if(typeof window>"u")return{};try{const t=window.localStorage.getItem(_Q);if(!t)return{};const e=JSON.parse(t);return typeof e=="object"&&e?e:{}}catch{return{}}}function p5e(t){if(!(typeof window>"u"))try{window.localStorage.setItem(_Q,JSON.stringify(t))}catch{}}function ep(t){const e=new Set;return t.filter(r=>r.id===null||r.id===void 0?!0:e.has(r.id)?!1:(e.add(r.id),!0))}function js(t){return Ne("crm-input-box crm-input-text w-full border bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:bg-slate-900/50",t?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":"border-slate-200 dark:border-slate-800")}function Ft(t){if(t==null)return"";const e=String(t).replace(/\r?\n/g," ").trim();return!e||e==="无"?"":e}function oF(t){if(t==null)return;if(typeof t=="number")return Number.isFinite(t)?t:void 0;const e=t.replace(/[¥,\s]|人/g,"").trim();if(!e)return;const r=Number(e);return Number.isFinite(r)?r:void 0}function NL(t){return Ft(t).toLowerCase()}function TQ(t,e){const r=NL(e);return!r||t.toLowerCase().includes(r)}function ld(t,e){const r=NL(e);return r?NL(t).includes(r):!0}function m5e(t,e,r){const a=Ft(t).slice(0,10);return a?!(e&&a<e||r&&a>r):!e&&!r}function sF(t){return!!(t!=null&&t.length)}function CQ(t,e){return e==="yes"?sF(t):e==="no"?!sF(t):!0}function zh(t){return Array.from(new Set((t??[]).map(e=>e==null?void 0:e.trim()).filter(e=>!!e)))}function n_(t){var r,a;return((r=t==null?void 0:t.value)==null?void 0:r.trim())||((a=t==null?void 0:t.label)==null?void 0:a.trim())||""}function kQ(t){var e,r;return((e=t==null?void 0:t.label)==null?void 0:e.trim())||((r=t==null?void 0:t.value)==null?void 0:r.trim())||""}function g5e(t){const e=n_(t).toLowerCase(),r=kQ(t).toLowerCase();return e==="lost"||e.includes("丢单")||r.includes("丢单")||e.includes("放弃")||r.includes("放弃")}function NQ(t){const e=t.map(n_).filter(Boolean),r=t.filter(a=>!g5e(a)).map(n_).filter(Boolean);return zh(r.length>0?r:e)}function Dp(t,e){return t.relatedProjectStageCodes!==void 0?{...t,relatedProjectStageCodes:zh(t.relatedProjectStageCodes)}:e.length<=0?t:{...t,relatedProjectStageCodes:NQ(e)}}function y5e(t,e){const r=zh(t).sort(),a=zh(e).sort();return r.length===a.length&&r.every((n,i)=>n===a[i])}function AQ(t,e){const r=t??[];if(e===void 0)return r;const a=new Set(zh(e));return a.size<=0?[]:r.filter(n=>{var s,l;const i=(s=n.stageCode)==null?void 0:s.trim(),o=(l=n.stage)==null?void 0:l.trim();return i&&a.has(i)||o&&a.has(o)})}function x5e(t,e){return{...t,relatedProjects:AQ(t.relatedProjects,e.relatedProjectStageCodes)}}function b5e(t,e){return{...t,relatedProjects:AQ(t.relatedProjects,e.relatedProjectStageCodes)}}function w5e(t,e){var a,n;const r=[t.employeeNo,t.name,t.owner,t.phone,t.officeName,t.dept,t.title,t.industry,t.intent,(a=t.relatedProjects)==null?void 0:a.map(i=>`${i.opportunityCode??""} ${i.opportunityName??""}`).join(" "),(n=t.followUps)==null?void 0:n.map(i=>`${i.content??""} ${i.evaluationContent??""} ${i.nextPlan??""}`).join(" ")].map(Ft).filter(Boolean).join(" ");return!TQ(r,e.keyword)||!ld(t.intent||t.intentLevel,e.intent)||!ld(t.officeName,e.officeName)||!ld(t.industry,e.industry)||e.employmentStatus==="active"&&t.active!==!0&&t.employmentStatus!=="active"||e.employmentStatus==="inactive"&&t.active!==!1&&t.employmentStatus!=="inactive"?!1:CQ(t.relatedProjects,e.hasRelatedProject)}function S5e(t,e){var a,n,i;const r=[t.channelCode,t.name,t.owner,t.province,t.city,t.officeAddress,t.certificationLevel,t.channelIndustry,t.channelAttribute,t.internalAttribute,t.intent,t.primaryContactName,t.primaryContactMobile,(a=t.contacts)==null?void 0:a.map(o=>`${o.name??""} ${o.mobile??""} ${o.title??""}`).join(" "),(n=t.relatedProjects)==null?void 0:n.map(o=>`${o.opportunityCode??""} ${o.opportunityName??""}`).join(" "),(i=t.followUps)==null?void 0:i.map(o=>`${o.content??""} ${o.evaluationContent??""} ${o.nextPlan??""}`).join(" ")].map(Ft).filter(Boolean).join(" ");return!TQ(r,e.keyword)||!ld(t.intent||t.intentLevel,e.intent)||!ld(t.province,e.province)||!ld(t.certificationLevel,e.certificationLevel)||!ld(t.channelIndustry,e.channelIndustry)||!ld(t.channelAttribute,e.channelAttribute)||!m5e(t.establishedDate,e.establishedStartDate,e.establishedEndDate)?!1:CQ(t.relatedProjects,e.hasRelatedProject)}function MQ(t,e="是",r="否"){return t==null?"":t?e:r}function DQ(t){return t!=null&&t.length?t.map(e=>{const r=PQ(e);return[[Ft(e.date),Ft(e.type)].filter(Boolean).join(" "),Ft(r.visitStartTime)?`拜访时间:${Ft(r.visitStartTime)}`:"",Ft(r.evaluationContent)?`沟通内容:${Ft(r.evaluationContent)}`:"",Ft(r.nextPlan)?`后续规划:${Ft(r.nextPlan)}`:""].filter(Boolean).join(`
`)}).filter(Boolean).join(`
`):""}function _5e(t){return t?[Ft(t.opportunityCode)?`编码:${Ft(t.opportunityCode)}`:"",Ft(t.opportunityName)?`项目名称:${Ft(t.opportunityName)}`:"",t.amount===null||t.amount===void 0?"":`金额:${RQ(Number(t.amount))}`].filter(Boolean).join(""):""}function LQ(t){return t!=null&&t.length?t.map(e=>_5e(e)||"").filter(Boolean).join(`
`):""}function T5e(t){return t?[Ft(t.name)?`姓名:${Ft(t.name)}`:"",Ft(t.mobile)?`联系电话:${Ft(t.mobile)}`:"",Ft(t.title)?`职位:${Ft(t.title)}`:""].filter(Boolean).join(""):""}function C5e(t){return t!=null&&t.length?t.map(e=>T5e(e)||"").filter(Boolean).join(`
`):""}function AL(t){return t?Array.from(t).reduce((e,r)=>e+(/[\u4e00-\u9fff\u3400-\u4dbf\uff00-\uffef]/.test(r)?2:1),0):0}function k5e(t,e){if(!t)return 1;const r=Math.max(1,Math.floor(e));return t.split(`
`).reduce((a,n)=>{const i=Math.max(1,AL(n));return a+Math.max(1,Math.ceil(i/r))},0)}function N5e(t=new Date){const e=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),n=String(t.getHours()).padStart(2,"0"),i=String(t.getMinutes()).padStart(2,"0"),o=String(t.getSeconds()).padStart(2,"0");return`${e}${r}${a}_${n}${i}${o}`}function A5e(t,e){const r=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),a=window.URL.createObjectURL(r),n=document.createElement("a");n.href=a,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(a)}const ML=[{key:"employeeNo",label:"工号",value:t=>Ft(t.employeeNo)},{key:"name",label:"姓名",value:t=>Ft(t.name)},{key:"phone",label:"联系方式",value:t=>Ft(t.phone)},{key:"officeName",label:"代表处/办事处",value:t=>Ft(t.officeName)},{key:"dept",label:"所属部门",value:t=>Ft(t.dept)},{key:"title",label:"职务",value:t=>Ft(t.title)},{key:"industry",label:"所属行业",value:t=>Ft(t.industry)},{key:"intent",label:"合作意向",value:t=>Ft(t.intent)},{key:"active",label:"销售是否在职",value:t=>t.active===null||t.active===void 0?"":t.active?"是":"否"},{key:"hasExp",label:"销售以前是否做过云桌面项目",value:t=>MQ(t.hasExp)},{key:"relatedProjects",label:"跟进的云桌面项目",kind:"project",value:t=>LQ(t.relatedProjects)},{key:"relatedProjectAmount",label:"跟进项目金额",numFmt:"#,##0.00",value:t=>uP(t.relatedProjects)??""},{key:"owner",label:"创建人",value:t=>Ft(t.owner)},{key:"createdAt",label:"创建时间",value:t=>Ft(t.createdAt)},{key:"updatedAt",label:"更新修改时间",value:t=>Ft(t.updatedAt)},{key:"followUps",label:"跟进记录",kind:"followup",value:t=>DQ(t.followUps)}],sp=["employeeNo","name","phone","officeName","dept","title","industry","intent","active","hasExp","relatedProjects","followUps"],DL=[{key:"name",label:"渠道名称",value:t=>Ft(t.name)},{key:"province",label:"省份",value:t=>Ft(t.province)},{key:"officeAddress",label:"办公地址",kind:"longText",value:t=>Ft(t.officeAddress)},{key:"channelIndustry",label:"聚焦行业",value:t=>Ft(t.channelIndustry)},{key:"certificationLevel",label:"汇智内部认证级别",value:t=>Ft(t.certificationLevel)},{key:"channelAttribute",label:"渠道属性",value:t=>Ft(t.channelAttribute)},{key:"internalAttribute",label:"新华三内部属性",value:t=>Ft(t.internalAttribute)},{key:"intent",label:"合作意向",value:t=>Ft(t.intent)},{key:"establishedDate",label:"建立联系时间",value:t=>Ft(t.establishedDate)},{key:"revenue",label:"年度营业额",numFmt:"#,##0.00",value:t=>oF(t.revenue??t.annualRevenue)??""},{key:"size",label:"人员规模",numFmt:"#,##0",value:t=>oF(t.size)??""},{key:"hasDesktopExp",label:"以前是否做过云桌面项目",value:t=>MQ(t.hasDesktopExp)},{key:"relatedProjects",label:"跟进的云桌面项目",kind:"project",value:t=>LQ(t.relatedProjects)},{key:"contacts",label:"人员信息",kind:"contact",value:t=>C5e(t.contacts)},{key:"followUps",label:"跟进记录",kind:"followup",value:t=>DQ(t.followUps)},{key:"channelCode",label:"编码",value:t=>Ft(t.channelCode)},{key:"city",label:"市",value:t=>Ft(t.city)},{key:"relatedProjectAmount",label:"跟进项目金额",numFmt:"#,##0.00",value:t=>uP(t.relatedProjects)??""},{key:"notes",label:"备注说明",kind:"longText",value:t=>Ft(t.notes)},{key:"owner",label:"创建人",value:t=>Ft(t.owner)},{key:"createdAt",label:"创建时间",value:t=>Ft(t.createdAt)},{key:"updatedAt",label:"更新修改时间",value:t=>Ft(t.updatedAt)}],lp=["name","province","officeAddress","channelIndustry","certificationLevel","channelAttribute","internalAttribute","intent","establishedDate","revenue","size","hasDesktopExp","relatedProjects","contacts","followUps"];function sd(t,e){return t===void 0?e:t}function lF(t,e){return t.map(r=>e.map(a=>a.value(r)))}function uF(t){var r,a,n,i,o,s,l,u,c;const e={};return(r=t.employeeNo)!=null&&r.trim()||(e.employeeNo="请填写工号"),(a=t.officeName)!=null&&a.trim()||(e.officeName="请选择代表处 / 办事处"),(n=t.candidateName)!=null&&n.trim()||(e.candidateName="请填写姓名"),(i=t.mobile)!=null&&i.trim()||(e.mobile="请填写联系方式"),(o=t.targetDept)!=null&&o.trim()||(e.targetDept="请填写所属部门"),(s=t.industry)!=null&&s.trim()||(e.industry="请选择所属行业"),(l=t.title)!=null&&l.trim()||(e.title="请填写职务"),(u=t.intentLevel)!=null&&u.trim()||(e.intentLevel="请选择合作意向"),(c=t.employmentStatus)!=null&&c.trim()||(e.employmentStatus="请选择销售是否在职"),e}function cF(t,e){var i,o,s,l,u,c,d,h,v,m,x,b;const r={},a=[];(i=t.channelName)!=null&&i.trim()||(r.channelName="请填写渠道名称"),(o=t.province)!=null&&o.trim()||(r.province="请选择省份"),(s=t.city)!=null&&s.trim()||(r.city="请选择市"),(l=t.officeAddress)!=null&&l.trim()||(r.officeAddress="请填写办公地址"),(u=t.certificationLevel)!=null&&u.trim()||(r.certificationLevel="请选择汇智内部认证级别"),(((c=t.channelIndustry)==null?void 0:c.length)??0)<=0&&(r.channelIndustry="请选择聚焦行业"),(!t.annualRevenue||t.annualRevenue<=0)&&(r.annualRevenue=`请填写${kL}`),(!t.staffSize||t.staffSize<=0)&&(r.staffSize="请填写人员规模"),(d=t.contactEstablishedDate)!=null&&d.trim()||(r.contactEstablishedDate="请选择建立联系时间"),(h=t.intentLevel)!=null&&h.trim()||(r.intentLevel="请选择合作意向"),(((v=t.channelAttribute)==null?void 0:v.length)??0)<=0&&(r.channelAttribute="请选择渠道属性"),e&&((m=t.channelAttribute)!=null&&m.includes(e))&&!((x=t.channelAttributeCustom)!=null&&x.trim())&&(r.channelAttributeCustom="请选择“其它”后请补充具体渠道属性"),(((b=t.internalAttribute)==null?void 0:b.length)??0)<=0&&(r.internalAttribute="请选择新华三内部属性");const n=t.contacts??[];return n.length<=0?(r.contacts="请至少填写一位渠道联系人",a.push(0)):(n.forEach((w,_)=>{var A,M,L;const T=!!((A=w.name)!=null&&A.trim()),C=!!((M=w.mobile)!=null&&M.trim()),k=!!((L=w.title)!=null&&L.trim());(!T||!C||!k)&&a.push(_)}),a.length>0&&(r.contacts="请完整填写每位渠道联系人的姓名、联系电话和职位")),{errors:r,invalidContactRows:a}}function dF(t){return{employeeNo:t.employeeNo.trim(),candidateName:t.candidateName.trim(),officeName:Ra(t.officeName),mobile:Ra(t.mobile),email:Ra(t.email),targetDept:Ra(t.targetDept),industry:Ra(t.industry),title:Ra(t.title),intentLevel:Ra(t.intentLevel)??"medium",stage:Ra(t.stage)??"initial_contact",hasDesktopExp:!!t.hasDesktopExp,inProgress:t.inProgress??!0,employmentStatus:Ra(t.employmentStatus)??"active",expectedJoinDate:Ra(t.expectedJoinDate),remark:Ra(t.remark)}}function fF(t){return{channelCode:Ra(t.channelCode),officeAddress:Ra(t.officeAddress),channelIndustry:Array.from(new Set((t.channelIndustry??[]).map(e=>e==null?void 0:e.trim()).filter(e=>!!e))),channelName:t.channelName.trim(),province:Ra(t.province),city:Ra(t.city),certificationLevel:Ra(t.certificationLevel),annualRevenue:t.annualRevenue||void 0,staffSize:t.staffSize||void 0,contactEstablishedDate:Ra(t.contactEstablishedDate),intentLevel:Ra(t.intentLevel)??"medium",hasDesktopExp:!!t.hasDesktopExp,channelAttribute:Array.from(new Set((t.channelAttribute??[]).map(e=>e==null?void 0:e.trim()).filter(e=>!!e))),channelAttributeCustom:Ra(t.channelAttributeCustom),internalAttribute:Array.from(new Set((t.internalAttribute??[]).map(e=>e==null?void 0:e.trim()).filter(e=>!!e))),stage:Ra(t.stage)??"initial_contact",remark:Ra(t.remark),contacts:(t.contacts??[]).map(e=>({name:Ra(e.name),mobile:Ra(e.mobile),title:Ra(e.title)})).filter(e=>e.name||e.mobile||e.title)}}function EQ(t,e){const r=t==null?void 0:t.trim();if(!r)return"";const a=e.find(n=>n.value===r||n.label===r);return(a==null?void 0:a.value)??r}function M5e(t,e){const{values:r}=cM(t);return Array.from(new Set(r.map(a=>EQ(a,e)).filter(Boolean)))}function LL({title:t,subtitle:e,onClose:r,children:a,footer:n}){const i=au(),o=Gd(),s=i||o;return g.jsxs(g.Fragment,{children:[g.jsx(Xt.div,{initial:s?!1:{opacity:0},animate:{opacity:1},exit:s?void 0:{opacity:0},onClick:r,className:Ne("fixed inset-0 z-[70] bg-slate-900/35 dark:bg-slate-950/70",!s&&"backdrop-blur-sm")}),g.jsx(Xt.div,{initial:s?!1:{opacity:0,y:20},animate:{opacity:1,y:0},exit:s?void 0:{opacity:0,y:20},transition:s?{duration:0}:void 0,className:"fixed inset-0 z-[80] px-0 pb-0 pt-[env(safe-area-inset-top)] sm:p-6",children:g.jsx("div",{className:"mx-auto flex h-[calc(100dvh-env(safe-area-inset-top))] w-full items-end sm:h-full sm:max-w-3xl sm:items-center",children:g.jsxs("div",{className:"flex h-[92dvh] w-full flex-col overflow-hidden rounded-t-3xl border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900 sm:h-full sm:rounded-3xl",children:[g.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4 dark:border-slate-800 sm:px-6",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-base font-semibold text-slate-900 dark:text-white sm:text-lg",children:t}),g.jsx("p",{className:"mt-1 text-xs leading-5 text-slate-500 dark:text-slate-400",children:e})]}),g.jsx("button",{onClick:r,className:"rounded-full p-2 text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"h-5 w-5"})})]}),g.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-5 sm:px-6",children:a}),g.jsx("div",{className:"border-t border-slate-100 px-5 pb-[calc(1rem+env(safe-area-inset-bottom))] pt-4 dark:border-slate-800 sm:px-6 sm:pb-4",children:n})]})})})]})}function Yr({label:t,value:e,icon:r,className:a=""}){return g.jsxs("div",{className:`crm-detail-item ${a}`.trim(),children:[g.jsxs("p",{className:"crm-detail-label",children:[r,t]}),g.jsx("div",{className:"crm-detail-value",children:e})]})}function Ha(){return g.jsx("span",{className:"ml-1 text-rose-500",children:"*"})}function D5e({activeTab:t,initialFilters:e,exporting:r,exportError:a,officeOptions:n,industryOptions:i,provinceOptions:o,certificationLevelOptions:s,channelAttributeOptions:l,relatedProjectStageOptions:u,onClose:c,onConfirm:d}){const h=Dp(e,u),[v,m]=E.useState(h),x=t==="sales",b=sd(v.selectedSalesFields,sp),w=sd(v.selectedChannelFields,lp),_=x?ML:DL,T=x?b:w,C=NQ(u),k=u.map(I=>{const F=n_(I),G=kQ(I);return F&&G?{value:F,label:G}:null}).filter(I=>!!I),A=zh(v.relatedProjectStageCodes);E.useEffect(()=>{m(Dp(e,u))},[e,u]);const M=!!(v.keyword||v.intent||v.officeName||v.industry||v.employmentStatus||v.province||v.certificationLevel||v.channelIndustry||v.channelAttribute||v.establishedStartDate||v.establishedEndDate||v.hasRelatedProject)||!y5e(A,C)||(x?JSON.stringify(b)!==JSON.stringify(sp):JSON.stringify(w)!==JSON.stringify(lp)),L=T.length>0,R=I=>{if(x){m(F=>{const G=sd(F.selectedSalesFields,sp),O=G.includes(I)?G.filter(U=>U!==I):[...G,I];return{...F,selectedSalesFields:O}});return}m(F=>{const G=sd(F.selectedChannelFields,lp),O=G.includes(I)?G.filter(U=>U!==I):[...G,I];return{...F,selectedChannelFields:O}})},P=I=>{m(F=>{const G=zh(F.relatedProjectStageCodes),O=G.includes(I)?new Set(G.filter($=>$!==I)):new Set([...G,I]),U=k.map($=>$.value).filter($=>O.has($));return{...F,relatedProjectStageCodes:U}})},j=(I,F)=>{m(G=>({...G,[I]:F}))},V=(I,F)=>[{value:"",label:F},...I.map(G=>{const O=G.label||G.value||"";return O?{value:O,label:O}:null}).filter(G=>!!G)];return g.jsxs(LL,{title:`导出${x?"销售人员拓展":"渠道拓展"}记录`,subtitle:"选择条件后导出 Excel不填条件则导出全部可见权限范围内的数据。",onClose:c,footer:g.jsxs("div",{className:"flex flex-col-reverse gap-3 sm:flex-row sm:justify-between",children:[g.jsx("button",{type:"button",onClick:()=>m(I=>({...Dp({},u),selectedSalesFields:sd(I.selectedSalesFields,sp),selectedChannelFields:sd(I.selectedChannelFields,lp)})),disabled:!M,className:"crm-btn crm-btn-secondary disabled:cursor-not-allowed disabled:opacity-60",children:"清空条件"}),g.jsx("button",{type:"button",onClick:()=>d(v),disabled:r||!L,className:"crm-btn crm-btn-primary disabled:cursor-not-allowed disabled:opacity-60",children:r?"导出中...":"确认导出"})]}),children:[g.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[g.jsxs("label",{className:"space-y-1.5 sm:col-span-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"关键词"}),g.jsx("input",{value:v.keyword??"",onChange:I=>j("keyword",I.target.value),placeholder:x?"搜索姓名、工号、电话、行业、项目":"搜索渠道、联系人、地区、项目",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50"})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"合作意向"}),g.jsx(Tt,{value:v.intent??"",options:[{value:"",label:"全部合作意向"},{value:"高",label:"高意向"},{value:"中",label:"中意向"},{value:"低",label:"低意向"}],placeholder:"全部合作意向",sheetTitle:"选择合作意向",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:I=>j("intent",I)})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"关联项目"}),g.jsx(Tt,{value:v.hasRelatedProject??"",options:[{value:"",label:"全部"},{value:"yes",label:"有关联项目"},{value:"no",label:"无关联项目"}],placeholder:"全部",sheetTitle:"选择关联项目",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:I=>j("hasRelatedProject",I)})]}),g.jsxs("div",{className:"space-y-3 rounded-2xl border border-slate-200 bg-slate-50 p-4 dark:border-slate-800 dark:bg-slate-900/40 sm:col-span-2",children:[g.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[g.jsxs("div",{children:[g.jsx("p",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"关联项目阶段"}),g.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"多选,默认排除已丢单/已放弃阶段。"})]}),k.length>0?g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",onClick:()=>m(I=>({...I,relatedProjectStageCodes:C})),className:"rounded-full border border-slate-200 px-3 py-1 text-xs font-medium text-slate-600 transition-colors hover:bg-white dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",children:"恢复默认"}),g.jsx("button",{type:"button",onClick:()=>m(I=>({...I,relatedProjectStageCodes:k.map(F=>F.value)})),className:"rounded-full border border-slate-200 px-3 py-1 text-xs font-medium text-slate-600 transition-colors hover:bg-white dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",children:"全选阶段"}),g.jsx("button",{type:"button",onClick:()=>m(I=>({...I,relatedProjectStageCodes:[]})),className:"rounded-full border border-slate-200 px-3 py-1 text-xs font-medium text-slate-600 transition-colors hover:bg-white dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",children:"全部取消"})]}):null]}),k.length>0?g.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:k.map(I=>{const F=A.includes(I.value);return g.jsxs("label",{className:Ne("flex items-center gap-3 rounded-xl border px-3 py-2 text-sm transition-colors",F?"border-violet-200 bg-violet-50 text-violet-700 dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-300":"border-slate-200 bg-white text-slate-600 dark:border-slate-800 dark:bg-slate-900 dark:text-slate-300"),children:[g.jsx("input",{type:"checkbox",checked:F,onChange:()=>P(I.value),className:"h-4 w-4 rounded border-slate-300 text-violet-600 focus:ring-violet-500"}),g.jsx("span",{children:I.label})]},I.value)})}):g.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"未加载到阶段字典,导出时不会按关联项目阶段过滤。"})]}),g.jsxs("div",{className:"space-y-3 rounded-2xl border border-slate-200 bg-slate-50 p-4 dark:border-slate-800 dark:bg-slate-900/40 sm:col-span-2",children:[g.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[g.jsxs("div",{children:[g.jsx("p",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"导出字段"}),g.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"默认已按模板字段勾选,可取消不需要导出的字段。"})]}),g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",onClick:()=>m(I=>({...I,selectedSalesFields:x?ML.map(F=>F.key):I.selectedSalesFields,selectedChannelFields:x?I.selectedChannelFields:DL.map(F=>F.key)})),className:"rounded-full border border-slate-200 px-3 py-1 text-xs font-medium text-slate-600 transition-colors hover:bg-white dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",children:"全选字段"}),g.jsx("button",{type:"button",onClick:()=>m(I=>({...I,selectedSalesFields:x?sp:I.selectedSalesFields,selectedChannelFields:x?I.selectedChannelFields:lp})),className:"rounded-full border border-slate-200 px-3 py-1 text-xs font-medium text-slate-600 transition-colors hover:bg-white dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",children:"恢复模板默认"})]})]}),g.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:_.map(I=>{const F=T.includes(I.key);return g.jsxs("label",{className:Ne("flex items-center gap-3 rounded-xl border px-3 py-2 text-sm transition-colors",F?"border-violet-200 bg-violet-50 text-violet-700 dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-300":"border-slate-200 bg-white text-slate-600 dark:border-slate-800 dark:bg-slate-900 dark:text-slate-300"),children:[g.jsx("input",{type:"checkbox",checked:F,onChange:()=>R(I.key),className:"h-4 w-4 rounded border-slate-300 text-violet-600 focus:ring-violet-500"}),g.jsx("span",{children:I.label})]},I.key)})}),L?null:g.jsx("p",{className:"text-xs text-rose-500",children:"请至少保留一个导出字段"})]}),x?g.jsxs(g.Fragment,{children:[g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"代表处 / 办事处"}),g.jsx(Tt,{value:v.officeName??"",options:V(n,"全部代表处 / 办事处"),placeholder:"全部代表处 / 办事处",sheetTitle:"选择代表处 / 办事处",searchable:!0,searchPlaceholder:"搜索代表处 / 办事处",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:I=>j("officeName",I)})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"所属行业"}),g.jsx(Tt,{value:v.industry??"",options:V(i,"全部行业"),placeholder:"全部行业",sheetTitle:"选择所属行业",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:I=>j("industry",I)})]}),g.jsxs("label",{className:"space-y-1.5 sm:col-span-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"销售是否在职"}),g.jsx(Tt,{value:v.employmentStatus??"",options:[{value:"",label:"全部"},{value:"active",label:"在职"},{value:"inactive",label:"离职"}],placeholder:"全部",sheetTitle:"选择在职状态",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:I=>j("employmentStatus",I)})]})]}):g.jsxs(g.Fragment,{children:[g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"省份"}),g.jsx(Tt,{value:v.province??"",options:V(o,"全部省份"),placeholder:"全部省份",sheetTitle:"选择省份",searchable:!0,searchPlaceholder:"搜索省份",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:I=>j("province",I)})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"汇智内部认证级别"}),g.jsx(Tt,{value:v.certificationLevel??"",options:V(s,"全部汇智内部认证级别"),placeholder:"全部汇智内部认证级别",sheetTitle:"选择汇智内部认证级别",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:I=>j("certificationLevel",I)})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"聚焦行业"}),g.jsx(Tt,{value:v.channelIndustry??"",options:V(i,"全部行业"),placeholder:"全部行业",sheetTitle:"选择聚焦行业",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:I=>j("channelIndustry",I)})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"渠道属性"}),g.jsx(Tt,{value:v.channelAttribute??"",options:V(l,"全部渠道属性"),placeholder:"全部渠道属性",sheetTitle:"选择渠道属性",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:I=>j("channelAttribute",I)})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"建立联系开始日期"}),g.jsx("input",{type:"date",value:v.establishedStartDate??"",onChange:I=>j("establishedStartDate",I.target.value),className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50"})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"建立联系结束日期"}),g.jsx("input",{type:"date",value:v.establishedEndDate??"",onChange:I=>j("establishedEndDate",I.target.value),className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50"})]})]})]}),a?g.jsx("div",{className:"crm-alert crm-alert-error mt-4",children:a}):null]})}function L5e(){var zi,xn,Or,Kn,_a,_s,Si;const t=IE(),e=po(),r=au(),a=Gd(),n=r||a,[i,o]=E.useState("sales"),[s,l]=E.useState(null),[u,c]=E.useState(""),[d,h]=E.useState([]),[v,m]=E.useState([]),[x,b]=E.useState(z1),w=E.useRef(null),_=E.useRef(!1),[T,C]=E.useState([]),[k,A]=E.useState([]),[M,L]=E.useState([]),[R,P]=E.useState([]),[j,V]=E.useState([]),[I,F]=E.useState([]),[G,O]=E.useState([]),[U,$]=E.useState([]),[K,q]=E.useState([]),[H,Z]=E.useState(""),te=((zi=G.find(h5e))==null?void 0:zi.value)??"",[ie,ce]=E.useState(0),[me,ze]=E.useState(!1),[Ce,ge]=E.useState(!1),[Be,_e]=E.useState(!1),[Oe,xt]=E.useState(!1),[Ye,st]=E.useState(!1),[We,At]=E.useState(()=>v5e()),[kt,Jt]=E.useState(null),[Nr,rr]=E.useState(!1),[Fe,Mt]=E.useState(!1),[dr,ar]=E.useState(""),[sa,va]=E.useState(""),[rn,wa]=E.useState(""),[En,pa]=E.useState(""),[an,gr]=E.useState(""),[Ar,Hr]=E.useState({}),[ye,Rt]=E.useState({}),[Te,xe]=E.useState({}),[Pt,bt]=E.useState({}),[Vt,Zt]=E.useState([]),[nr,_r]=E.useState([]),[ma,Mr]=E.useState("projects"),[Zr,za]=E.useState("projects"),la=!!(s&&t!==void 0&&s.ownerUserId===t),[ut,Da]=E.useState(B1),[Tr,lr]=E.useState(V1),[Ba,Dr]=E.useState(B1),[Va,ua]=E.useState(V1),Ze=me||Ce||Ye,wr=kt!==null&&KU(f5e,kt),le=E.useCallback(async()=>{const J=await jE();return C(J.officeOptions??[]),A(J.industryOptions??[]),L(J.provinceOptions??[]),P(J.certificationLevelOptions??[]),O(J.channelAttributeOptions??[]),$(J.internalAttributeOptions??[]),Z(J.nextChannelCode??""),J},[]);E.useEffect(()=>{let J=!1;async function Me(){try{const re=await ZU();J||Jt(re.filter(de=>de.status!==0).map(de=>de.code).filter(Boolean))}catch{J||Jt(null)}}return Me(),()=>{J=!0}},[]),E.useEffect(()=>{let J=!1;async function Me(){try{const re=await pp();J||q(re.stageOptions??[])}catch{J||q([])}}return Me(),()=>{J=!0}},[]),E.useEffect(()=>{K.length<=0||At(J=>J.relatedProjectStageCodes===void 0?Dp(J,K):J)},[K]);const tt=E.useCallback(async(J,Me=!1)=>{const re=Me?F:V,de=J==null?void 0:J.trim();if(!de)return re([]),[];try{const ct=await OE(de);return re(ct??[]),ct??[]}catch{return re([]),[]}},[]);E.useEffect(()=>{var Me;const J=(Me=e.state)==null?void 0:Me.tab;(J==="sales"||J==="channel")&&o(J)},[e.state]),E.useEffect(()=>{const J=e.state,Me=J==null?void 0:J.tab,re=J==null?void 0:J.selectedId;if(!re)return;if(Me==="sales"){const ct=d.find(ir=>ir.id===re);ct&&l(ct);return}if(Me==="channel"){const ct=v.find(ir=>ir.id===re);ct&&l(ct);return}const de=d.find(ct=>ct.id===re)??v.find(ct=>ct.id===re)??null;de&&l(de)},[e.state,d,v]),E.useEffect(()=>{let J=!1;async function Me(){try{const re=await le();J||(C(re.officeOptions??[]),A(re.industryOptions??[]),L(re.provinceOptions??[]),P(re.certificationLevelOptions??[]),O(re.channelAttributeOptions??[]),$(re.internalAttributeOptions??[]),Z(re.nextChannelCode??""))}catch{J||(C([]),A([]),L([]),P([]),O([]),$([]),Z(""))}}return Me(),()=>{J=!0}},[le]),E.useEffect(()=>{let J=!1;async function Me(){try{const re=await mp(u,!1,z1+1);if(J)return;h(ep(re.salesItems??[])),m(ep(re.channelItems??[])),l(null)}catch{J||(h([]),m([]),l(null))}}return Me(),()=>{J=!0}},[u,ie]),E.useEffect(()=>{b(z1)},[u,i]);const Ot=i==="sales"?d:v,pt=x<Ot.length,nn=async()=>{if(!pt||_.current)return;_.current=!0;const J=x+z1;try{const Me=await mp(u,!1,J+1);h(ep(Me.salesItems??[])),m(ep(Me.channelItems??[])),b(J)}finally{_.current=!1}};E.useEffect(()=>{if(!pt)return;const J=()=>{const Me=w.current;Me&&Me.getBoundingClientRect().top<=window.innerHeight+120&&nn()};return window.addEventListener("scroll",J,!0),()=>window.removeEventListener("scroll",J,!0)},[pt,x,Ot.length,u,i]);const Sa=(s==null?void 0:s.followUps)??[],Zn=J=>{l(J),mp(u,!0).then(Me=>{const re=J.type==="sales"?(Me.salesItems??[]).find(de=>de.id===J.id):(Me.channelItems??[]).find(de=>de.id===J.id);re&&l(de=>(de==null?void 0:de.id)===J.id?re:de)}).catch(()=>{})};E.useEffect(()=>{(s==null?void 0:s.type)==="sales"?Mr("projects"):(s==null?void 0:s.type)==="channel"&&za("projects")},[s]),E.useEffect(()=>{if(!me||i!=="sales"){rr(!1);return}const J=ut.employeeNo.trim();if(!J){rr(!1),pa("");return}let Me=!1;const re=window.setTimeout(async()=>{rr(!0);try{const de=await Ww(J);Me||pa(de.duplicated?de.message||"工号重复,请确认该人员是否已存在!":"")}catch{Me||pa("")}finally{Me||rr(!1)}},400);return()=>{Me=!0,window.clearTimeout(re)}},[i,me,ut.employeeNo]),E.useEffect(()=>{if(!me||i!=="channel"){Mt(!1);return}const J=Tr.channelName.trim();if(!J){Mt(!1),gr("");return}let Me=!1;const re=window.setTimeout(async()=>{Mt(!0);try{const de=await Yw(J);Me||gr(de.duplicated?de.message||"渠道重复,请确认该渠道是否已存在!":"")}catch{Me||gr("")}finally{Me||Mt(!1)}},400);return()=>{Me=!0,window.clearTimeout(re)}},[i,Tr.channelName,me]);const Ur=(J,Me)=>{Da(re=>({...re,[J]:Me})),J==="employeeNo"&&(pa(""),rr(!1)),J in Ar&&Hr(re=>{const de={...re};return delete de[J],de})},Rn=(J,Me)=>{lr(re=>({...re,[J]:Me})),J==="channelName"&&(gr(""),Mt(!1)),J in Te&&xe(re=>{const de={...re};return delete de[J],de})},Kr=(J,Me)=>{Dr(re=>({...re,[J]:Me})),J in ye&&Rt(re=>{const de={...re};return delete de[J],de})},$a=(J,Me)=>{ua(re=>({...re,[J]:Me})),J in Pt&&bt(re=>{const de={...re};return delete de[J],de})},fr=(J,Me,re,de=!1)=>{if((de?ua:lr)(ir=>{const zr=[...ir.contacts??[]],Qn={...zr[J]??T0(),[Me]:re};return zr[J]=Qn,{...ir,contacts:zr}}),de){bt(ir=>{if(!ir.contacts)return ir;const zr={...ir};return delete zr.contacts,zr}),_r(ir=>ir.filter(zr=>zr!==J));return}xe(ir=>{if(!ir.contacts)return ir;const zr={...ir};return delete zr.contacts,zr}),Zt(ir=>ir.filter(zr=>zr!==J))},Vo=(J=!1)=>{(J?ua:lr)(re=>({...re,contacts:[...re.contacts??[],T0()]}))},bi=(J,Me=!1)=>{(Me?ua:lr)(de=>{const ir=(de.contacts??[]).filter((zr,Qn)=>Qn!==J);return{...de,contacts:ir.length>0?ir:[T0()]}})},Pn=()=>{ze(!1),ar(""),rr(!1),Mt(!1),pa(""),gr(""),Hr({}),xe({}),Zt([]),Da(B1),lr(V1),V([])},Qr=()=>{ge(!1),va(""),Rt({}),bt({}),_r([]),Dr(B1),ua(V1),F([])},Ss=async()=>{ar(""),Hr({}),xe({}),Zt([]);try{await le()}catch{}V([]),ze(!0)},Ji=async()=>{var re,de;if(!s||!la)return;va("");let J=k,Me=R;try{const ct=await le();J=ct.industryOptions??[],Me=ct.certificationLevelOptions??[]}catch{}if(s.type==="sales")Rt({}),Dr({employeeNo:s.employeeNo==="无"?"":s.employeeNo??"",candidateName:s.name??"",officeName:s.officeCode??"",mobile:s.phone==="无"?"":s.phone??"",targetDept:s.dept==="无"?"":s.dept??s.targetDept??"",industry:s.industryCode??"",title:s.title==="无"?"":s.title??"",intentLevel:s.intentLevel??"medium",hasDesktopExp:!!s.hasExp,employmentStatus:s.active?"active":"left"});else{const ct=cM(s.channelAttributeCode),ir=cM(s.internalAttributeCode),zr=s.province==="无"?"":s.province??"",Qn=s.city==="无"?"":s.city??"";bt({}),_r([]),ua({channelCode:s.channelCode??"",channelName:s.name??"",province:zr,city:Qn,officeAddress:s.officeAddress==="无"?"":s.officeAddress??"",channelIndustry:M5e(s.channelIndustryCode??(s.channelIndustry==="无"?"":s.channelIndustry),J),certificationLevel:EQ(s.certificationLevel==="无"?"":s.certificationLevel,Me)||"",annualRevenue:s.annualRevenue?Number(s.annualRevenue):void 0,staffSize:s.size??void 0,contactEstablishedDate:s.establishedDate==="无"?"":s.establishedDate??"",intentLevel:s.intentLevel??"medium",hasDesktopExp:!!s.hasDesktopExp,channelAttribute:ct.values,channelAttributeCustom:ct.customText,internalAttribute:ir.values,stage:s.stageCode??"initial_contact",remark:s.notes==="无"?"":s.notes??"",contacts:(((re=s.contacts)==null?void 0:re.length)??0)>0?(de=s.contacts)==null?void 0:de.map(Xe=>({name:Xe.name==="无"?"":Xe.name??"",mobile:Xe.mobile==="无"?"":Xe.mobile??"",title:Xe.title==="无"?"":Xe.title??""})):[T0()]}),tt(zr,!0)}ge(!0)},Oi=async()=>{if(!Be){if(ar(""),i==="sales"){const J=uF(ut);if(Object.keys(J).length>0){Hr(J),ar("请先完整填写销售人员拓展必填字段");return}}else{const{errors:J,invalidContactRows:Me}=cF(Tr,te);if(Object.keys(J).length>0){xe(J),Zt(Me),ar("请先完整填写渠道拓展必填字段");return}}if(i==="sales"){const J=await Ww(ut.employeeNo.trim());if(J.duplicated){const Me=J.message||"工号重复,请确认该人员是否已存在!";pa(Me),Hr(re=>({...re,employeeNo:Me})),ar(Me);return}}else{const J=await Yw(Tr.channelName.trim());if(J.duplicated){const Me=J.message||"渠道重复,请确认该渠道是否已存在!";gr(Me),xe(re=>({...re,channelName:Me})),ar(Me);return}}_e(!0);try{i==="sales"?await zE(dF(ut)):await BE(fF(Tr)),Pn(),ce(J=>J+1)}catch(J){ar(J instanceof Error?J.message:"新增失败")}finally{_e(!1)}}},mo=async()=>{if(!(!s||Be)){if(!la){va("仅可编辑本人创建的数据");return}if(va(""),s.type==="sales"){const J=uF(Ba);if(Object.keys(J).length>0){Rt(J),va("请先完整填写销售人员拓展必填字段");return}}else{const{errors:J,invalidContactRows:Me}=cF(Va,te);if(Object.keys(J).length>0){bt(J),_r(Me),va("请先完整填写渠道拓展必填字段");return}}_e(!0);try{s.type==="sales"?await dde(s.id,dF(Ba)):await fde(s.id,fF(Va)),Qr(),l(null),ce(J=>J+1)}catch(J){va(J instanceof Error?J.message:"编辑失败")}finally{_e(!1)}}},yn=()=>g.jsx("div",{className:"crm-empty-panel",children:"暂无拓展数据,先新增一条试试。"}),In=()=>Sa.length<=0?g.jsx("div",{className:"crm-empty-panel",children:"暂无跟进记录"}):g.jsx("div",{className:"relative space-y-6 border-l-2 border-slate-100 pl-4 dark:border-slate-800",children:Sa.map(J=>{const Me=PQ(J);return g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"absolute -left-[21px] mt-1.5 h-2.5 w-2.5 rounded-full bg-violet-500 ring-4 ring-white dark:ring-slate-900"}),g.jsxs("div",{className:"rounded-xl border border-slate-100 bg-slate-50/50 p-4 dark:border-slate-800 dark:bg-slate-800/20",children:[g.jsxs("div",{className:"grid grid-cols-1 gap-3 rounded-xl border border-amber-200 bg-amber-50 p-3 text-sm dark:border-amber-500/20 dark:bg-amber-500/10 sm:grid-cols-3",children:[g.jsxs("div",{children:[g.jsx("p",{className:"mb-1 text-xs text-amber-700 dark:text-amber-300",children:"拜访时间"}),g.jsx("p",{className:"break-anywhere font-medium text-slate-900 dark:text-white",children:Me.visitStartTime})]}),g.jsxs("div",{children:[g.jsx("p",{className:"mb-1 text-xs text-amber-700 dark:text-amber-300",children:"沟通内容"}),g.jsx("p",{className:"break-anywhere font-medium text-slate-900 dark:text-white",children:Me.evaluationContent})]}),g.jsxs("div",{children:[g.jsx("p",{className:"mb-1 text-xs text-amber-700 dark:text-amber-300",children:"后续规划"}),g.jsx("p",{className:"break-anywhere font-medium text-slate-900 dark:text-white",children:Me.nextPlan})]})]}),g.jsxs("p",{className:"mt-2 text-xs text-slate-400",children:["跟进人: ",J.user||"无",g.jsx("span",{className:"ml-3",children:J.date||"无"})]})]})]},J.id)})}),Wa=J=>{o(J),l(null),wa("")},La=async J=>{if(Oe)return;const Me=i==="sales",re=Dp(J,K);xt(!0),wa(""),At(re),p5e(re);try{const de=await mp(""),ct=ep(de.salesItems??[]).map(Dt=>x5e(Dt,re)).filter(Dt=>w5e(Dt,re)),ir=ep(de.channelItems??[]).map(Dt=>b5e(Dt,re)).filter(Dt=>S5e(Dt,re)),zr=Me?ct:ir,Qn=sd(re.selectedSalesFields,sp),Xe=sd(re.selectedChannelFields,lp),jn=Me?Qn:Xe;if(zr.length<=0)throw new Error(`当前筛选条件下暂无可导出的${Me?"销售人员拓展":"渠道拓展"}数据`);if(jn.length<=0)throw new Error("请至少选择一个导出字段");const Bi=await f2(()=>import("./exceljs.min-_FHOiBEn.js").then(Dt=>Dt.e),[]),Ts=new Bi.Workbook,Ya=Ts.addWorksheet(Me?"销售人员拓展":"渠道拓展"),go=ML.filter(Dt=>Qn.includes(Dt.key)),Ue=DL.filter(Dt=>Xe.includes(Dt.key)),On=Me?go:Ue,_i=On.map(Dt=>Dt.label),yo=Me?lF(ct,go):lF(ir,Ue);Ya.addRow(_i),yo.forEach(Dt=>{Ya.addRow(Dt)}),Ya.views=[{state:"frozen",ySplit:1}],Ya.getRow(1).height=24,Ya.getRow(1).font={bold:!0},Ya.getRow(1).alignment={vertical:"middle",horizontal:"center"};const xo=On.map((Dt,zn)=>{const bn=yo.map(Ta=>Ta[zn]).filter(Ta=>typeof Ta=="string");return Dt.kind==="followup"?42:Dt.kind==="project"||Dt.kind==="contact"?Math.min(80,Math.max(16,AL(Dt.label)+2,bn.reduce((Ta,Bn)=>{const Jn=Bn.split(`
`).reduce((ca,Fo)=>Math.max(ca,AL(Fo)),0);return Math.max(Ta,Jn+2)},0))):Dt.kind==="longText"?24:Dt.label.includes("渠道属性")||Dt.label.includes("内部属性")||Dt.label.includes("聚焦行业")?18:16});On.forEach((Dt,zn)=>{const bn=Ya.getColumn(zn+1);bn.width=xo[zn],Dt.numFmt&&(bn.numFmt=Dt.numFmt),bn.alignment={vertical:"top",horizontal:"left",wrapText:Dt.kind==="followup"||Dt.kind==="project"||Dt.kind==="contact"}}),Ya.eachRow((Dt,zn)=>{if(Dt.eachCell((bn,Ta)=>{var Bn,Jn,ca;bn.border={top:{style:"thin",color:{argb:"FFE2E8F0"}},left:{style:"thin",color:{argb:"FFE2E8F0"}},bottom:{style:"thin",color:{argb:"FFE2E8F0"}},right:{style:"thin",color:{argb:"FFE2E8F0"}}},bn.alignment={vertical:"top",horizontal:zn===1?"center":"left",wrapText:zn>1&&(((Bn=On[Ta-1])==null?void 0:Bn.kind)==="followup"||((Jn=On[Ta-1])==null?void 0:Jn.kind)==="project"||((ca=On[Ta-1])==null?void 0:ca.kind)==="contact")}}),zn>1){const bn=On.reduce((Ta,Bn,Jn)=>{if(Bn.kind!=="project"&&Bn.kind!=="contact"&&Bn.kind!=="followup")return Ta;const ca=Dt.getCell(Jn+1).value;return Math.max(Ta,k5e(typeof ca=="string"?ca:"",xo[Jn]))},1);Dt.height=Math.max(22,bn*16)}});const il=await Ts.xlsx.writeBuffer(),eo=`${Me?"销售人员拓展":"渠道拓展"}_${N5e()}.xlsx`;A5e(eo,il),st(!1)}catch(de){wa(de instanceof Error?de.message:"导出失败,请稍后重试")}finally{xt(!1)}},wi=(J,Me,re,de=!1)=>g.jsxs("div",{className:"crm-form-grid",children:[g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["工号",g.jsx(Ha,{})]}),g.jsx("input",{value:J.employeeNo,onChange:ct=>Me("employeeNo",ct.target.value),className:js(!!(re!=null&&re.employeeNo))}),re!=null&&re.employeeNo?g.jsx("p",{className:"text-xs text-rose-500",children:re.employeeNo}):null,!(re!=null&&re.employeeNo)&&!de&&En?g.jsx("p",{className:"text-xs text-rose-500",children:En}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["代表处 / 办事处",g.jsx(Ha,{})]}),g.jsx(Tt,{value:J.officeName||"",placeholder:"请选择",sheetTitle:"代表处 / 办事处",searchable:!0,searchPlaceholder:"搜索代表处 / 办事处",options:[{value:"",label:"请选择"},...T.map(ct=>({value:ct.value??"",label:ct.label||"无"}))],className:Ne(re!=null&&re.officeName?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:ct=>Me("officeName",ct||void 0)}),re!=null&&re.officeName?g.jsx("p",{className:"text-xs text-rose-500",children:re.officeName}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["姓名",g.jsx(Ha,{})]}),g.jsx("input",{value:J.candidateName,onChange:ct=>Me("candidateName",ct.target.value),className:js(!!(re!=null&&re.candidateName))}),re!=null&&re.candidateName?g.jsx("p",{className:"text-xs text-rose-500",children:re.candidateName}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["联系方式",g.jsx(Ha,{})]}),g.jsx("input",{value:J.mobile,onChange:ct=>Me("mobile",ct.target.value),className:js(!!(re!=null&&re.mobile))}),re!=null&&re.mobile?g.jsx("p",{className:"text-xs text-rose-500",children:re.mobile}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["所属部门",g.jsx(Ha,{})]}),g.jsx("input",{value:J.targetDept||"",onChange:ct=>Me("targetDept",ct.target.value),placeholder:"办事处/地市",className:js(!!(re!=null&&re.targetDept))}),re!=null&&re.targetDept?g.jsx("p",{className:"text-xs text-rose-500",children:re.targetDept}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["所属行业",g.jsx(Ha,{})]}),g.jsx(Tt,{value:J.industry||"",placeholder:"请选择",sheetTitle:"所属行业",options:[{value:"",label:"请选择"},...k.map(ct=>({value:ct.value??"",label:ct.label||"无"}))],className:Ne(re!=null&&re.industry?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:ct=>Me("industry",ct||void 0)}),re!=null&&re.industry?g.jsx("p",{className:"text-xs text-rose-500",children:re.industry}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["职务",g.jsx(Ha,{})]}),g.jsx("input",{value:J.title,onChange:ct=>Me("title",ct.target.value),className:js(!!(re!=null&&re.title))}),re!=null&&re.title?g.jsx("p",{className:"text-xs text-rose-500",children:re.title}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["合作意向",g.jsx(Ha,{})]}),g.jsx(Tt,{value:J.intentLevel,sheetTitle:"合作意向",options:[{value:"high",label:"高"},{value:"medium",label:"中"},{value:"low",label:"低"}],className:Ne(re!=null&&re.intentLevel?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:ct=>Me("intentLevel",ct)}),re!=null&&re.intentLevel?g.jsx("p",{className:"text-xs text-rose-500",children:re.intentLevel}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["销售是否在职",g.jsx(Ha,{})]}),g.jsx(Tt,{value:J.employmentStatus,sheetTitle:"销售是否在职",options:[{value:"active",label:"是"},{value:"left",label:"否"}],className:Ne(re!=null&&re.employmentStatus?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:ct=>Me("employmentStatus",ct)}),re!=null&&re.employmentStatus?g.jsx("p",{className:"text-xs text-rose-500",children:re.employmentStatus}):null]}),g.jsxs("label",{className:"flex items-center justify-between rounded-xl border border-slate-200 px-4 py-3 dark:border-slate-800",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"销售以前是否做过云桌面项目"}),g.jsx("input",{type:"checkbox",checked:!!J.hasDesktopExp,onChange:ct=>Me("hasDesktopExp",ct.target.checked)})]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"跟进的云桌面项目"}),g.jsx("div",{className:"rounded-xl border border-dashed border-slate-200 bg-slate-50 px-4 py-3 text-sm text-slate-500 dark:border-slate-800 dark:bg-slate-900/30 dark:text-slate-400",children:"首次新增不需要填写,关联商机后会自动按列表展示项目编码、项目名称和项目金额。"})]})]}),jr=(J,Me,re=!1,de,ct=[])=>{var Qn;const ir=re?I:j,zr=!((Qn=J.province)!=null&&Qn.trim());return g.jsxs("div",{className:"crm-form-grid",children:[g.jsxs("label",{className:"space-y-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"编码"}),g.jsx("input",{value:J.channelCode||(re?"":H||"系统自动生成"),readOnly:!0,className:"crm-input-box-readonly crm-input-text w-full border border-slate-200 bg-slate-50 text-slate-500 outline-none dark:border-slate-800 dark:bg-slate-900/30 dark:text-slate-400"})]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["渠道名称",g.jsx(Ha,{})]}),g.jsx("input",{value:J.channelName,onChange:Xe=>Me("channelName",Xe.target.value),className:js(!!(de!=null&&de.channelName))}),de!=null&&de.channelName?g.jsx("p",{className:"text-xs text-rose-500",children:de.channelName}):null,!(de!=null&&de.channelName)&&!re&&an?g.jsx("p",{className:"text-xs text-rose-500",children:an}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["省份",g.jsx(Ha,{})]}),g.jsx(Tt,{value:J.province||"",placeholder:"请选择",sheetTitle:"省份",searchable:!0,searchPlaceholder:"搜索省份",options:[{value:"",label:"请选择"},...M.map(Xe=>({value:Xe.value??"",label:Xe.label||"无"}))],className:Ne(de!=null&&de.province?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:Xe=>{const jn=Xe||void 0;Me("province",jn),Me("city",void 0),tt(jn,re)}}),de!=null&&de.province?g.jsx("p",{className:"text-xs text-rose-500",children:de.province}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["市",g.jsx(Ha,{})]}),g.jsx(Tt,{value:J.city||"",placeholder:zr?"请先选择省份":"请选择",sheetTitle:"市",searchable:!0,searchPlaceholder:"搜索市",disabled:zr,options:[{value:"",label:"请选择"},...ir.map(Xe=>({value:Xe.value??"",label:Xe.label||"无"}))],className:Ne(de!=null&&de.city?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:Xe=>Me("city",Xe||void 0)}),de!=null&&de.city?g.jsx("p",{className:"text-xs text-rose-500",children:de.city}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["办公地址",g.jsx(Ha,{})]}),g.jsx("input",{value:J.officeAddress||"",onChange:Xe=>Me("officeAddress",Xe.target.value),className:js(!!(de!=null&&de.officeAddress))}),de!=null&&de.officeAddress?g.jsx("p",{className:"text-xs text-rose-500",children:de.officeAddress}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["聚焦行业",g.jsx(Ha,{})]}),g.jsx(Tt,{multiple:!0,value:J.channelIndustry||[],placeholder:"请选择",sheetTitle:"聚焦行业",options:k.map(Xe=>({value:Xe.value??"",label:Xe.label||"无"})),className:Ne(de!=null&&de.channelIndustry?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:Xe=>Me("channelIndustry",Xe)}),de!=null&&de.channelIndustry?g.jsx("p",{className:"text-xs text-rose-500",children:de.channelIndustry}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["汇智内部认证级别",g.jsx(Ha,{})]}),g.jsx(Tt,{value:J.certificationLevel||"",placeholder:"请选择",sheetTitle:"汇智内部认证级别",options:[{value:"",label:"请选择"},...R.map(Xe=>({value:Xe.value??"",label:Xe.label||"无"}))],className:Ne(de!=null&&de.certificationLevel?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:Xe=>Me("certificationLevel",Xe||void 0)}),de!=null&&de.certificationLevel?g.jsx("p",{className:"text-xs text-rose-500",children:de.certificationLevel}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:[kL,g.jsx(Ha,{})]}),g.jsx("input",{type:"number",min:"0.01",step:"0.01",placeholder:"请输入万元",value:J.annualRevenue??"",onChange:Xe=>Me("annualRevenue",Xe.target.value?Number(Xe.target.value):void 0),className:js(!!(de!=null&&de.annualRevenue))}),de!=null&&de.annualRevenue?g.jsx("p",{className:"text-xs text-rose-500",children:de.annualRevenue}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["人员规模",g.jsx(Ha,{})]}),g.jsx("input",{type:"number",value:J.staffSize??"",onChange:Xe=>Me("staffSize",Xe.target.value?Number(Xe.target.value):void 0),className:js(!!(de!=null&&de.staffSize))}),de!=null&&de.staffSize?g.jsx("p",{className:"text-xs text-rose-500",children:de.staffSize}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["建立联系时间",g.jsx(Ha,{})]}),g.jsx("input",{type:"date",value:J.contactEstablishedDate||"",onChange:Xe=>Me("contactEstablishedDate",Xe.target.value),className:js(!!(de!=null&&de.contactEstablishedDate))}),de!=null&&de.contactEstablishedDate?g.jsx("p",{className:"text-xs text-rose-500",children:de.contactEstablishedDate}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["合作意向",g.jsx(Ha,{})]}),g.jsx(Tt,{value:J.intentLevel||"medium",sheetTitle:"合作意向",options:[{value:"high",label:"高"},{value:"medium",label:"中"},{value:"low",label:"低"}],className:Ne(de!=null&&de.intentLevel?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:Xe=>Me("intentLevel",Xe)}),de!=null&&de.intentLevel?g.jsx("p",{className:"text-xs text-rose-500",children:de.intentLevel}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["渠道属性",g.jsx(Ha,{})]}),g.jsx(Tt,{multiple:!0,value:J.channelAttribute||[],placeholder:"请选择",sheetTitle:"渠道属性",options:G.map(Xe=>({value:Xe.value??"",label:Xe.label||"无"})),className:Ne(de!=null&&de.channelAttribute?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:Xe=>{Me("channelAttribute",Xe),(!te||!Xe.includes(te))&&Me("channelAttributeCustom","")}}),de!=null&&de.channelAttribute?g.jsx("p",{className:"text-xs text-rose-500",children:de.channelAttribute}):null]}),te&&(J.channelAttribute??[]).includes(te)?g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["其它渠道属性",g.jsx(Ha,{})]}),g.jsx("input",{value:J.channelAttributeCustom||"",onChange:Xe=>Me("channelAttributeCustom",Xe.target.value),placeholder:"请输入具体渠道属性",className:js(!!(de!=null&&de.channelAttributeCustom))}),de!=null&&de.channelAttributeCustom?g.jsx("p",{className:"text-xs text-rose-500",children:de.channelAttributeCustom}):null]}):null,g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["新华三内部属性",g.jsx(Ha,{})]}),g.jsx(Tt,{multiple:!0,value:J.internalAttribute||[],placeholder:"请选择",sheetTitle:"新华三内部属性",options:U.map(Xe=>({value:Xe.value??"",label:Xe.label||"无"})),className:Ne(de!=null&&de.internalAttribute?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:Xe=>Me("internalAttribute",Xe)}),de!=null&&de.internalAttribute?g.jsx("p",{className:"text-xs text-rose-500",children:de.internalAttribute}):null]}),g.jsxs("label",{className:"flex items-center justify-between rounded-xl border border-slate-200 px-4 py-3 dark:border-slate-800",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"以前是否做过云桌面项目"}),g.jsx("input",{type:"checkbox",checked:!!J.hasDesktopExp,onChange:Xe=>Me("hasDesktopExp",Xe.target.checked)})]}),g.jsxs("div",{className:"crm-form-section sm:col-span-2",children:[g.jsxs("div",{className:"crm-form-section-header",children:[g.jsxs("span",{className:"text-sm font-semibold text-slate-800 dark:text-slate-200",children:["人员信息",g.jsx(Ha,{})]}),g.jsx("button",{type:"button",onClick:()=>Vo(re),className:"rounded-lg bg-white px-3 py-1.5 text-xs font-medium text-violet-600 shadow-sm dark:bg-slate-800 dark:text-violet-400",children:"添加人员"})]}),g.jsx("div",{className:"crm-section-stack",children:(J.contacts??[]).map((Xe,jn)=>g.jsxs("div",{className:"grid grid-cols-1 gap-3 rounded-xl border border-slate-200 bg-white p-3 sm:grid-cols-[1fr_1fr_1fr_auto] dark:border-slate-700 dark:bg-slate-900/50",children:[g.jsx("input",{value:Xe.name||"",onChange:Bi=>fr(jn,"name",Bi.target.value,re),placeholder:"人员姓名",className:Ne("w-full rounded-lg border bg-white px-3 py-2 text-sm outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:bg-slate-900/50",ct.includes(jn)?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":"border-slate-200 dark:border-slate-800")}),g.jsx("input",{value:Xe.mobile||"",onChange:Bi=>fr(jn,"mobile",Bi.target.value,re),placeholder:"联系电话",className:Ne("w-full rounded-lg border bg-white px-3 py-2 text-sm outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:bg-slate-900/50",ct.includes(jn)?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":"border-slate-200 dark:border-slate-800")}),g.jsx("input",{value:Xe.title||"",onChange:Bi=>fr(jn,"title",Bi.target.value,re),placeholder:"职位",className:Ne("w-full rounded-lg border bg-white px-3 py-2 text-sm outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:bg-slate-900/50",ct.includes(jn)?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":"border-slate-200 dark:border-slate-800")}),g.jsx("button",{type:"button",onClick:()=>bi(jn,re),className:"crm-btn-danger rounded-lg px-3 py-2 text-sm font-medium",children:"删除"})]},`${re?"edit":"create"}-${jn}`))}),de!=null&&de.contacts?g.jsx("p",{className:"text-xs text-rose-500",children:de.contacts}):null]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"跟进的云桌面项目"}),g.jsx("div",{className:"rounded-xl border border-dashed border-slate-200 bg-slate-50 px-4 py-3 text-sm text-slate-500 dark:border-slate-800 dark:bg-slate-900/30 dark:text-slate-400",children:"通过商机里的“关联渠道”自动带入项目编码、项目名称和项目金额。"})]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"备注说明"}),g.jsx("textarea",{rows:4,value:J.remark,onChange:Xe=>Me("remark",Xe.target.value),className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50"})]})]})};return g.jsxs("div",{className:"crm-page-stack",children:[g.jsxs("header",{className:"crm-page-header",children:[g.jsx("div",{className:"crm-page-heading",children:g.jsx("h1",{className:"crm-page-title",children:"拓展管理"})}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("button",{onClick:()=>{wa(""),st(!0)},disabled:Oe,className:Ne("crm-btn-sm crm-btn-secondary flex items-center gap-2 disabled:cursor-not-allowed disabled:opacity-60",n?"active:scale-100":"active:scale-95"),children:[g.jsx(By,{className:"crm-icon-md"}),g.jsx("span",{className:"hidden sm:inline",children:Oe?"导出中...":"导出"})]}),wr?g.jsxs("button",{onClick:Ss,className:Ne("crm-btn-sm crm-btn-primary flex items-center gap-2",n?"active:scale-100":"active:scale-95"),children:[g.jsx(Rw,{className:"crm-icon-md"}),g.jsx("span",{className:"hidden sm:inline",children:"新增"})]}):null]})]}),g.jsxs("div",{className:Ne("crm-filter-bar flex",!n&&"backdrop-blur-sm"),children:[g.jsx("button",{onClick:()=>Wa("sales"),className:`flex-1 rounded-lg py-2 text-sm font-medium transition-colors duration-200 ${i==="sales"?"bg-white text-violet-600 shadow-sm dark:bg-slate-800 dark:text-violet-400":"text-slate-600 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white"}`,children:"销售人员拓展"}),g.jsx("button",{onClick:()=>Wa("channel"),className:`flex-1 rounded-lg py-2 text-sm font-medium transition-colors duration-200 ${i==="channel"?"bg-white text-violet-600 shadow-sm dark:bg-slate-800 dark:text-violet-400":"text-slate-600 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white"}`,children:"渠道拓展"})]}),g.jsxs("div",{className:"group relative",children:[g.jsx(Qu,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400 transition-colors group-focus-within:text-violet-500"}),g.jsx("input",{type:"text",placeholder:"搜索工号、姓名、渠道名称、行业...",value:u,onChange:J=>{c(J.target.value),wa("")},className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white pl-10 text-slate-900 outline-none transition-all focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50 dark:text-white"})]}),rn?g.jsx("div",{className:"crm-alert crm-alert-error",children:rn}):null,g.jsxs("div",{className:"crm-list-stack",children:[i==="sales"?d.length>0?d.slice(0,x).map((J,Me)=>{const re=t!==void 0&&J.ownerUserId===t;return g.jsxs(Xt.div,{initial:n?!1:{opacity:0,y:10},animate:{opacity:1,y:0},transition:n?{duration:0}:{delay:Me*.05},onClick:()=>Zn(J),className:Ne("crm-card crm-card-pad relative rounded-2xl transition-shadow transition-colors",re?"cursor-pointer hover:border-violet-100 hover:shadow-md dark:hover:border-violet-900/50":"cursor-pointer border-slate-100 bg-slate-50/45 hover:border-slate-200 hover:shadow-sm dark:border-slate-800/80 dark:bg-slate-900/35 dark:hover:border-slate-700"),children:[re?g.jsx("div",{className:"pointer-events-none absolute inset-x-5 top-0 h-1.5 rounded-b-full bg-gradient-to-r from-violet-400/85 via-fuchsia-400/70 to-indigo-400/85 shadow-[0_6px_16px_rgba(124,58,237,0.18)] dark:from-violet-400/70 dark:via-fuchsia-400/55 dark:to-indigo-400/70"}):null,g.jsx("div",{className:"flex items-start gap-3",children:g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("h3",{className:"break-anywhere text-base font-semibold text-slate-900 dark:text-white sm:text-lg",children:J.name||"无"}),g.jsxs("p",{className:"break-anywhere mt-1 text-xs leading-5 text-slate-500 dark:text-slate-400 sm:text-sm",children:[J.officeName||"无"," · ",J.dept||"无"," · ",J.title||"无"]}),g.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[g.jsx("span",{className:Ne("rounded-full border px-2.5 py-1 text-[11px] font-semibold leading-none",re?"border-emerald-200 bg-emerald-50 text-emerald-600 dark:border-emerald-500/20 dark:bg-emerald-500/10 dark:text-emerald-300":"border-slate-200 bg-slate-50 text-slate-500 dark:border-slate-700 dark:bg-slate-800/60 dark:text-slate-300"),children:re?"我的":"只读"}),g.jsx("span",{className:`crm-pill shrink-0 ${J.active?"crm-pill-emerald":"crm-pill-neutral"}`,children:J.active?"在职":"离职"})]})]})}),g.jsxs("div",{className:"mt-4 grid grid-cols-1 gap-y-3 text-xs sm:grid-cols-2 sm:text-sm",children:[g.jsxs("div",{className:"flex items-center gap-2 text-slate-600 dark:text-slate-300",children:[g.jsx("span",{className:"text-slate-400 dark:text-slate-500",children:"意向:"}),g.jsx("span",{className:J.intent==="高"?"font-medium text-rose-600 dark:text-rose-400":"",children:J.intent||"无"})]}),g.jsxs("div",{className:"flex items-center gap-2 text-slate-600 dark:text-slate-300",children:[g.jsx("span",{className:"text-slate-400 dark:text-slate-500",children:"跟进项目金额:"}),hF(J.relatedProjects)]}),g.jsxs("div",{className:"flex items-center gap-2 text-slate-600 dark:text-slate-300",children:[g.jsx("span",{className:"text-slate-400 dark:text-slate-500",children:"创建人:"}),g.jsx("span",{className:"font-medium text-slate-900 dark:text-white",children:J.owner||"无"})]})]})]},J.id)}):yn():v.length>0?v.slice(0,x).map((J,Me)=>{const re=t!==void 0&&J.ownerUserId===t;return g.jsxs(Xt.div,{initial:n?!1:{opacity:0,y:10},animate:{opacity:1,y:0},transition:n?{duration:0}:{delay:Me*.05},onClick:()=>Zn(J),className:Ne("crm-card crm-card-pad relative rounded-2xl transition-shadow transition-colors",re?"cursor-pointer hover:border-violet-100 hover:shadow-md dark:hover:border-violet-900/50":"cursor-pointer border-slate-100 bg-slate-50/45 hover:border-slate-200 hover:shadow-sm dark:border-slate-800/80 dark:bg-slate-900/35 dark:hover:border-slate-700"),children:[re?g.jsx("div",{className:"pointer-events-none absolute inset-x-5 top-0 h-1.5 rounded-b-full bg-gradient-to-r from-violet-400/85 via-fuchsia-400/70 to-indigo-400/85 shadow-[0_6px_16px_rgba(124,58,237,0.18)] dark:from-violet-400/70 dark:via-fuchsia-400/55 dark:to-indigo-400/70"}):null,g.jsx("div",{className:"flex items-start gap-3",children:g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("h3",{className:"break-anywhere text-base font-semibold text-slate-900 dark:text-white sm:text-lg",children:J.name||"无"}),g.jsxs("p",{className:"break-anywhere mt-1 text-xs leading-5 text-slate-500 dark:text-slate-400 sm:text-sm",children:[J.province||"无"," · ",J.city||"无"," · ",J.certificationLevel||"无"]}),g.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[g.jsx("span",{className:Ne("rounded-full border px-2.5 py-1 text-[11px] font-semibold leading-none",re?"border-emerald-200 bg-emerald-50 text-emerald-600 dark:border-emerald-500/20 dark:bg-emerald-500/10 dark:text-emerald-300":"border-slate-200 bg-slate-50 text-slate-500 dark:border-slate-700 dark:bg-slate-800/60 dark:text-slate-300"),children:re?"我的":"只读"}),g.jsx("span",{className:`crm-pill shrink-0 ${J.intent==="高"?"crm-pill-rose":J.intent==="中"?"crm-pill-amber":"crm-pill-neutral"}`,children:J.intent?`${J.intent}意向`:"未评估"})]})]})}),g.jsxs("div",{className:"mt-4 grid grid-cols-1 gap-y-3 text-xs sm:grid-cols-2 sm:text-sm",children:[g.jsxs("div",{className:"flex items-center gap-2 text-slate-600 dark:text-slate-300",children:[g.jsx("span",{className:"text-slate-400 dark:text-slate-500",children:"建立联系:"}),J.establishedDate||"无"]}),g.jsxs("div",{className:"flex items-center gap-2 text-slate-600 dark:text-slate-300",children:[g.jsx("span",{className:"text-slate-400 dark:text-slate-500",children:"跟进项目金额:"}),hF(J.relatedProjects)]}),g.jsxs("div",{className:"flex items-center gap-2 text-slate-600 dark:text-slate-300",children:[g.jsx("span",{className:"text-slate-400 dark:text-slate-500",children:"创建人:"}),g.jsx("span",{className:"font-medium text-slate-900 dark:text-white",children:J.owner||"无"})]})]})]},J.id)}):yn(),pt?g.jsx("div",{ref:w,role:"button",tabIndex:0,onClick:()=>void nn(),onKeyDown:J=>{(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),nn())},className:"cursor-pointer rounded-lg border border-slate-200 bg-white py-3 text-center text-sm font-medium text-violet-600 shadow-sm dark:border-slate-700 dark:bg-slate-900 dark:text-violet-300",children:"展示更多"}):null]}),g.jsxs(co,{children:[Ye&&g.jsx(D5e,{activeTab:i,initialFilters:Dp(We,K),exporting:Oe,exportError:rn,officeOptions:T,industryOptions:k,provinceOptions:M,certificationLevelOptions:R,channelAttributeOptions:G,relatedProjectStageOptions:K,onClose:()=>st(!1),onConfirm:J=>void La(J)}),me&&g.jsxs(LL,{title:`新增${i==="sales"?"销售人员拓展":"渠道拓展"}`,subtitle:"支持电脑和手机填写,提交后自动刷新列表。",onClose:Pn,footer:g.jsxs("div",{className:"flex flex-col-reverse gap-3 sm:flex-row sm:justify-end",children:[g.jsx("button",{onClick:Pn,className:"crm-btn crm-btn-secondary",children:"取消"}),g.jsx("button",{onClick:()=>void Oi(),disabled:Be,className:"crm-btn crm-btn-primary disabled:cursor-not-allowed disabled:opacity-60",children:Be?"提交中...":"确认新增"})]}),children:[i==="sales"?wi(ut,Ur,Ar,!1):jr(Tr,Rn,!1,Te,Vt),dr?g.jsx("div",{className:"crm-alert crm-alert-error mt-4",children:dr}):null]})]}),g.jsx(co,{children:Ce&&s&&g.jsxs(LL,{title:`编辑${s.type==="sales"?"销售人员拓展":"渠道拓展"}`,subtitle:"修改后会实时更新本人名下的拓展资料。",onClose:Qr,footer:g.jsxs("div",{className:"flex flex-col-reverse gap-3 sm:flex-row sm:justify-end",children:[g.jsx("button",{onClick:Qr,className:"crm-btn crm-btn-secondary",children:"取消"}),g.jsx("button",{onClick:()=>void mo(),disabled:Be,className:"crm-btn crm-btn-primary disabled:cursor-not-allowed disabled:opacity-60",children:Be?"保存中...":"保存修改"})]}),children:[s.type==="sales"?wi(Ba,Kr,ye,!0):jr(Va,$a,!0,Pt,nr),sa?g.jsx("div",{className:"crm-alert crm-alert-error mt-4",children:sa}):null]})}),g.jsx(co,{children:s&&g.jsxs(g.Fragment,{children:[g.jsx(Xt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>l(null),className:`fixed inset-0 z-40 bg-slate-900/20 backdrop-blur-sm transition-opacity dark:bg-slate-900/60 ${Ze?"pointer-events-none opacity-30":""}`}),g.jsxs(Xt.div,{initial:{x:"100%",y:0},animate:{x:0,y:0},exit:{x:"100%",y:0},transition:{type:"spring",damping:25,stiffness:200},className:`fixed inset-x-0 bottom-0 z-50 flex h-[88dvh] w-full flex-col overflow-hidden rounded-t-3xl border border-slate-200 bg-white shadow-2xl transition-opacity dark:border-slate-800 dark:bg-slate-900 sm:inset-y-0 sm:right-0 sm:left-auto sm:h-full sm:max-w-2xl lg:max-w-3xl sm:rounded-none sm:rounded-l-3xl sm:border-l ${Ze?"pointer-events-none opacity-20":""}`,children:[g.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4 dark:border-slate-800 sm:px-6",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"h-1.5 w-10 rounded-full bg-slate-200 sm:hidden dark:bg-slate-700"}),g.jsx("h2",{className:"text-base font-semibold text-slate-900 dark:text-white sm:text-lg",children:s.type==="sales"?"销售拓展详情":"渠道拓展详情"})]}),g.jsx("button",{onClick:()=>l(null),className:"rounded-full p-2 text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"crm-icon-lg"})})]}),g.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-5 sm:px-6",children:g.jsxs("div",{className:"crm-modal-stack",children:[g.jsxs("div",{children:[s.type==="sales"?g.jsxs("p",{className:"text-xs font-medium uppercase tracking-[0.18em] text-slate-400 dark:text-slate-500",children:["工号 ",s.employeeNo||"无"]}):g.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.18em] text-slate-400 dark:text-slate-500",children:s.channelCode||"未编码"}),g.jsx("h3",{className:"break-anywhere text-lg font-bold text-slate-900 dark:text-white sm:text-xl",children:s.name||"无"}),g.jsx("p",{className:"break-anywhere mt-1 text-xs leading-5 text-slate-500 dark:text-slate-400 sm:text-sm",children:s.type==="sales"?`${s.officeName||"无"} · ${s.dept||"无"} · ${s.title||"无"}`:`${s.province||"无"} · ${s.city||"无"} · ${s.channelIndustry||"无"} · ${s.certificationLevel||"无"}`}),g.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:s.type==="sales"?g.jsx("span",{className:`crm-pill ${s.active?"crm-pill-emerald":"crm-pill-neutral"}`,children:s.active?"在职":"离职"}):null})]}),g.jsxs("div",{className:"crm-section-stack",children:[g.jsxs("h4",{className:"flex items-center gap-2 text-sm font-semibold text-slate-900 dark:text-white",children:[g.jsx(um,{className:"crm-icon-md text-violet-500"}),"基本信息"]}),g.jsxs("div",{className:"crm-detail-grid text-sm sm:grid-cols-2",children:[s.type==="sales"?g.jsxs(g.Fragment,{children:[g.jsx(Yr,{label:"工号",value:s.employeeNo||"无"}),g.jsx(Yr,{label:"代表处 / 办事处",value:s.officeName||"无"}),g.jsx(Yr,{label:"联系方式",value:s.phone||"无",icon:g.jsx(MG,{className:"h-3 w-3"})}),g.jsx(Yr,{label:"所属部门",value:s.dept||"无"}),g.jsx(Yr,{label:"所属行业",value:s.industry||"无",icon:g.jsx(q0,{className:"h-3 w-3"})}),g.jsx(Yr,{label:"职务",value:s.title||"无"}),g.jsx(Yr,{label:"合作意向",value:s.intent||"无"}),g.jsx(Yr,{label:"销售以前是否做过云桌面项目",value:s.hasExp?"是":"否"}),g.jsx(Yr,{label:"销售是否在职",value:s.active?"是":"否"})]}):g.jsxs(g.Fragment,{children:[g.jsx(Yr,{label:"编码",value:s.channelCode||"无"}),g.jsx(Yr,{label:"省份",value:s.province||"无"}),g.jsx(Yr,{label:"市",value:s.city||"无"}),g.jsx(Yr,{label:"汇智内部认证级别",value:s.certificationLevel||"无"}),g.jsx(Yr,{label:"办公地址",value:s.officeAddress||"无",className:"sm:col-span-2"}),g.jsx(Yr,{label:"聚焦行业",value:s.channelIndustry||"无",icon:g.jsx(q0,{className:"h-3 w-3"})}),g.jsx(Yr,{label:kL,value:s.revenue||"无"}),g.jsx(Yr,{label:"人员规模",value:`${s.size??0}人`}),g.jsx(Yr,{label:"建立联系时间",value:s.establishedDate||"无",icon:g.jsx(_G,{className:"h-3 w-3"})}),g.jsx(Yr,{label:"合作意向",value:s.intent||"无"}),g.jsx(Yr,{label:"以前是否做过云桌面项目",value:s.hasDesktopExp?"是":"否"}),g.jsx(Yr,{label:"渠道属性",value:s.channelAttribute||"无"}),g.jsx(Yr,{label:"新华三内部属性",value:s.internalAttribute||"无"})]}),s.type!=="sales"?g.jsx(Yr,{label:"备注说明",value:s.notes||"无",className:"sm:col-span-2"}):null]})]}),s.type==="sales"?g.jsxs("div",{className:"crm-section-stack",children:[g.jsxs("div",{className:"flex rounded-2xl border border-slate-200 bg-slate-50 p-1 dark:border-slate-800 dark:bg-slate-800/40",children:[g.jsx("button",{type:"button",onClick:()=>Mr("projects"),className:`flex-1 rounded-xl px-4 py-2 text-sm font-medium transition-colors ${ma==="projects"?"bg-white text-violet-600 shadow-sm dark:bg-slate-900 dark:text-violet-400":"text-slate-500 dark:text-slate-400"}`,children:"跟进项目"}),g.jsx("button",{type:"button",onClick:()=>Mr("followups"),className:`flex-1 rounded-xl px-4 py-2 text-sm font-medium transition-colors ${ma==="followups"?"bg-white text-violet-600 shadow-sm dark:bg-slate-900 dark:text-violet-400":"text-slate-500 dark:text-slate-400"}`,children:"跟进记录"})]}),ma==="projects"?g.jsx("div",{className:"crm-section-stack",children:(((xn=s.relatedProjects)==null?void 0:xn.length)??0)>0?g.jsx("div",{className:"crm-list-stack",children:(Or=s.relatedProjects)==null?void 0:Or.map(J=>g.jsxs("div",{className:"crm-detail-grid text-sm sm:grid-cols-3",children:[g.jsx(Yr,{label:"项目编码",value:J.opportunityCode||"无"}),g.jsx(Yr,{label:"项目名称",value:J.opportunityName||"未命名项目"}),g.jsx(Yr,{label:"项目金额",value:`¥${new Intl.NumberFormat("zh-CN").format(Number(J.amount||0))}`})]},J.opportunityId))}):g.jsx("div",{className:"crm-empty-panel",children:"暂无关联项目"})}):g.jsxs("div",{className:"crm-section-stack",children:[g.jsxs("h4",{className:"flex items-center gap-2 text-sm font-semibold text-slate-900 dark:text-white",children:[g.jsx(kG,{className:"crm-icon-md text-violet-500"}),"跟进记录"]}),In()]})]}):g.jsxs("div",{className:"crm-section-stack",children:[g.jsxs("div",{className:"flex rounded-2xl border border-slate-200 bg-slate-50 p-1 dark:border-slate-800 dark:bg-slate-800/40",children:[g.jsx("button",{type:"button",onClick:()=>za("projects"),className:`flex-1 rounded-xl px-3 py-2 text-sm font-medium transition-colors ${Zr==="projects"?"bg-white text-violet-600 shadow-sm dark:bg-slate-900 dark:text-violet-400":"text-slate-500 dark:text-slate-400"}`,children:"跟进项目"}),g.jsx("button",{type:"button",onClick:()=>za("contacts"),className:`flex-1 rounded-xl px-3 py-2 text-sm font-medium transition-colors ${Zr==="contacts"?"bg-white text-violet-600 shadow-sm dark:bg-slate-900 dark:text-violet-400":"text-slate-500 dark:text-slate-400"}`,children:"人员信息"}),g.jsx("button",{type:"button",onClick:()=>za("followups"),className:`flex-1 rounded-xl px-3 py-2 text-sm font-medium transition-colors ${Zr==="followups"?"bg-white text-violet-600 shadow-sm dark:bg-slate-900 dark:text-violet-400":"text-slate-500 dark:text-slate-400"}`,children:"跟进记录"})]}),Zr==="projects"?(((Kn=s.relatedProjects)==null?void 0:Kn.length)??0)>0?g.jsx("div",{className:"crm-list-stack",children:(_a=s.relatedProjects)==null?void 0:_a.map(J=>g.jsxs("div",{className:"crm-detail-grid text-sm sm:grid-cols-3",children:[g.jsx(Yr,{label:"项目编码",value:J.opportunityCode||"无"}),g.jsx(Yr,{label:"项目名称",value:J.opportunityName||"未命名项目"}),g.jsx(Yr,{label:"项目金额",value:`¥${new Intl.NumberFormat("zh-CN").format(Number(J.amount||0))}`})]},J.opportunityId))}):g.jsx("div",{className:"crm-empty-panel",children:"暂无关联项目"}):null,Zr==="contacts"?(((_s=s.contacts)==null?void 0:_s.length)??0)>0?g.jsx("div",{className:"space-y-3",children:(Si=s.contacts)==null?void 0:Si.map((J,Me)=>g.jsxs("div",{className:"grid grid-cols-1 gap-3 rounded-xl border border-slate-100 bg-slate-50/50 p-4 text-sm dark:border-slate-800 dark:bg-slate-800/20 sm:grid-cols-3",children:[g.jsxs("div",{children:[g.jsx("p",{className:"mb-1 text-slate-500 dark:text-slate-400",children:"人员姓名"}),g.jsx("p",{className:"break-anywhere font-medium text-slate-900 dark:text-white",children:J.name||"无"})]}),g.jsxs("div",{children:[g.jsx("p",{className:"mb-1 text-slate-500 dark:text-slate-400",children:"联系电话"}),g.jsx("p",{className:"break-anywhere font-medium text-slate-900 dark:text-white",children:J.mobile||"无"})]}),g.jsxs("div",{children:[g.jsx("p",{className:"mb-1 text-slate-500 dark:text-slate-400",children:"职位"}),g.jsx("p",{className:"break-anywhere font-medium text-slate-900 dark:text-white",children:J.title||"无"})]})]},`${J.name||"contact"}-${Me}`))}):g.jsx("div",{className:"crm-empty-panel",children:"暂无人员信息"}):null,Zr==="followups"?In():null]})]})}),g.jsx("div",{className:"w-full shrink-0 border-t border-slate-200/80 bg-slate-50/95 backdrop-blur dark:border-slate-800/80 dark:bg-slate-900/90",children:g.jsxs("div",{className:"px-4 pb-[calc(1rem+env(safe-area-inset-bottom))] pt-4 sm:p-4",children:[la?null:g.jsx("p",{className:"mb-3 text-xs text-slate-400 dark:text-slate-500",children:"当前记录非本人创建,仅支持查看详情,不能编辑。"}),g.jsx("div",{className:"grid grid-cols-1 gap-3",children:g.jsx("button",{type:"button",onClick:()=>void Ji(),disabled:!la,title:la?"编辑资料":"仅本人可操作",className:"crm-btn crm-btn-secondary inline-flex h-11 w-full items-center justify-center disabled:cursor-not-allowed disabled:opacity-60",children:la?"编辑资料":"仅本人可操作"})})]})})]})]})})]})}function RQ(t){return`¥${new Intl.NumberFormat("zh-CN").format(t)}`}function uP(t){if(!t||t.length===0)return;const e=t.reduce((r,a)=>r+Number(a.amount||0),0);return Number.isFinite(e)?e:void 0}function hF(t){const e=uP(t);return e===void 0?"无":RQ(e)}function PQ(t){const e=t.content||"",r=pA(e,"拜访时间"),a=pA(e,"沟通内容"),n=pA(e,"后续规划"),i=t.type==="工作日报"&&t.date?t.date.slice(0,10):void 0;return{visitStartTime:mA(E5e(vA(t.visitStartTime,r,i))),evaluationContent:mA(vA(t.evaluationContent,a)),nextPlan:mA(vA(t.nextPlan,n))}}function vA(...t){return t.find(e=>{const r=e==null?void 0:e.trim();return r&&r!=="无"})}function E5e(t){const e=t==null?void 0:t.trim();if(!e)return;const r=e.match(/^(\d{4}-\d{2}-\d{2})/);return r?r[1]:e}function pA(t,e){var i;const r=t.replace(/\r/g,""),a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=r.match(new RegExp(`${a}([^\\n]+)`));return(i=n==null?void 0:n[1])==null?void 0:i.trim()}function mA(t){const e=t==null?void 0:t.trim();return e||"无"}const Lp={employeeNo:"",candidateName:"",officeName:"",mobile:"",industry:"",title:"",intentLevel:"medium",hasDesktopExp:!1,employmentStatus:"active"},kh=()=>({name:"",mobile:"",title:""}),Ep={channelCode:"",channelName:"",province:"",city:"",officeAddress:"",channelIndustry:[],certificationLevel:"",contactEstablishedDate:"",intentLevel:"medium",hasDesktopExp:!1,channelAttribute:[],channelAttributeCustom:"",internalAttribute:[],stage:"initial_contact",remark:"",contacts:[kh()]};function Pa(t){const e=t==null?void 0:t.trim();return e||void 0}function i_(t){const e=`${(t==null?void 0:t.label)??""}${(t==null?void 0:t.value)??""}`.toLowerCase();return e.includes("其他")||e.includes("其它")||e.includes("other")}function Gs(t){return Ne("crm-input-box crm-input-text w-full border bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:bg-slate-900/50",t?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":"border-slate-200 dark:border-slate-800")}function IQ(t){var r,a,n,i,o,s,l,u,c;const e={};return(r=t.employeeNo)!=null&&r.trim()||(e.employeeNo="请填写工号"),(a=t.officeName)!=null&&a.trim()||(e.officeName="请选择代表处 / 办事处"),(n=t.candidateName)!=null&&n.trim()||(e.candidateName="请填写姓名"),(i=t.mobile)!=null&&i.trim()||(e.mobile="请填写联系方式"),(o=t.targetDept)!=null&&o.trim()||(e.targetDept="请填写所属部门"),(s=t.industry)!=null&&s.trim()||(e.industry="请选择所属行业"),(l=t.title)!=null&&l.trim()||(e.title="请填写职务"),(u=t.intentLevel)!=null&&u.trim()||(e.intentLevel="请选择合作意向"),(c=t.employmentStatus)!=null&&c.trim()||(e.employmentStatus="请选择销售是否在职"),e}function jQ(t,e){var i,o,s,l,u,c,d,h,v,m,x,b;const r={},a=[];(i=t.channelName)!=null&&i.trim()||(r.channelName="请填写渠道名称"),(o=t.province)!=null&&o.trim()||(r.province="请选择省份"),(s=t.city)!=null&&s.trim()||(r.city="请选择市"),(l=t.officeAddress)!=null&&l.trim()||(r.officeAddress="请填写办公地址"),(((u=t.channelIndustry)==null?void 0:u.length)??0)<=0&&(r.channelIndustry="请选择聚焦行业"),(c=t.certificationLevel)!=null&&c.trim()||(r.certificationLevel="请选择汇智内部认证级别"),(!t.annualRevenue||t.annualRevenue<=0)&&(r.annualRevenue="请填写年度营业额"),(!t.staffSize||t.staffSize<=0)&&(r.staffSize="请填写人员规模"),(d=t.contactEstablishedDate)!=null&&d.trim()||(r.contactEstablishedDate="请选择建立联系时间"),(h=t.intentLevel)!=null&&h.trim()||(r.intentLevel="请选择合作意向"),(((v=t.channelAttribute)==null?void 0:v.length)??0)<=0&&(r.channelAttribute="请选择渠道属性"),e&&((m=t.channelAttribute)!=null&&m.includes(e))&&!((x=t.channelAttributeCustom)!=null&&x.trim())&&(r.channelAttributeCustom="请选择“其它”后请补充具体渠道属性"),(((b=t.internalAttribute)==null?void 0:b.length)??0)<=0&&(r.internalAttribute="请选择新华三内部属性");const n=t.contacts??[];return n.length<=0?(r.contacts="请至少填写一位渠道联系人",a.push(0)):(n.forEach((w,_)=>{var A,M,L;const T=!!((A=w.name)!=null&&A.trim()),C=!!((M=w.mobile)!=null&&M.trim()),k=!!((L=w.title)!=null&&L.trim());(!T||!C||!k)&&a.push(_)}),a.length>0&&(r.contacts="请完整填写每位渠道联系人的姓名、联系电话和职位")),{errors:r,invalidContactRows:a}}function OQ(t){return{employeeNo:t.employeeNo.trim(),candidateName:t.candidateName.trim(),officeName:Pa(t.officeName),mobile:Pa(t.mobile),email:Pa(t.email),targetDept:Pa(t.targetDept),industry:Pa(t.industry),title:Pa(t.title),intentLevel:Pa(t.intentLevel)??"medium",stage:Pa(t.stage)??"initial_contact",hasDesktopExp:!!t.hasDesktopExp,inProgress:t.inProgress??!0,employmentStatus:Pa(t.employmentStatus)??"active",expectedJoinDate:Pa(t.expectedJoinDate),remark:Pa(t.remark)}}function zQ(t){return{channelCode:Pa(t.channelCode),officeAddress:Pa(t.officeAddress),channelIndustry:Array.from(new Set((t.channelIndustry??[]).map(e=>e==null?void 0:e.trim()).filter(e=>!!e))),channelName:t.channelName.trim(),province:Pa(t.province),city:Pa(t.city),certificationLevel:Pa(t.certificationLevel),annualRevenue:t.annualRevenue||void 0,staffSize:t.staffSize||void 0,contactEstablishedDate:Pa(t.contactEstablishedDate),intentLevel:Pa(t.intentLevel)??"medium",hasDesktopExp:!!t.hasDesktopExp,channelAttribute:Array.from(new Set((t.channelAttribute??[]).map(e=>e==null?void 0:e.trim()).filter(e=>!!e))),channelAttributeCustom:Pa(t.channelAttributeCustom),internalAttribute:Array.from(new Set((t.internalAttribute??[]).map(e=>e==null?void 0:e.trim()).filter(e=>!!e))),stage:Pa(t.stage)??"initial_contact",remark:Pa(t.remark),contacts:(t.contacts??[]).map(e=>({name:Pa(e.name),mobile:Pa(e.mobile),title:Pa(e.title)})).filter(e=>e.name||e.mobile||e.title)}}function BQ({form:t,fieldErrors:e,officeOptions:r,industryOptions:a,duplicateMessage:n,requiredMark:i,onChange:o}){return g.jsxs("div",{className:"crm-form-grid",children:[g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["工号",i]}),g.jsx("input",{value:t.employeeNo,onChange:s=>o("employeeNo",s.target.value),className:Gs(!!e.employeeNo)}),e.employeeNo?g.jsx("p",{className:"text-xs text-rose-500",children:e.employeeNo}):null,!e.employeeNo&&n?g.jsx("p",{className:"text-xs text-rose-500",children:n}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["代表处 / 办事处",i]}),g.jsx(Tt,{value:t.officeName||"",placeholder:"请选择",sheetTitle:"代表处 / 办事处",searchable:!0,searchPlaceholder:"搜索代表处 / 办事处",options:[{value:"",label:"请选择"},...r.map(s=>({value:s.value??"",label:s.label||"无"}))],className:Ne(e.officeName?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:s=>o("officeName",s||void 0)}),e.officeName?g.jsx("p",{className:"text-xs text-rose-500",children:e.officeName}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["姓名",i]}),g.jsx("input",{value:t.candidateName,onChange:s=>o("candidateName",s.target.value),className:Gs(!!e.candidateName)}),e.candidateName?g.jsx("p",{className:"text-xs text-rose-500",children:e.candidateName}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["联系方式",i]}),g.jsx("input",{value:t.mobile,onChange:s=>o("mobile",s.target.value),className:Gs(!!e.mobile)}),e.mobile?g.jsx("p",{className:"text-xs text-rose-500",children:e.mobile}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["所属部门",i]}),g.jsx("input",{value:t.targetDept||"",onChange:s=>o("targetDept",s.target.value),placeholder:"办事处/地市",className:Gs(!!e.targetDept)}),e.targetDept?g.jsx("p",{className:"text-xs text-rose-500",children:e.targetDept}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["所属行业",i]}),g.jsx(Tt,{value:t.industry||"",placeholder:"请选择",sheetTitle:"所属行业",options:[{value:"",label:"请选择"},...a.map(s=>({value:s.value??"",label:s.label||"无"}))],className:Ne(e.industry?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:s=>o("industry",s||void 0)}),e.industry?g.jsx("p",{className:"text-xs text-rose-500",children:e.industry}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["职务",i]}),g.jsx("input",{value:t.title||"",onChange:s=>o("title",s.target.value),className:Gs(!!e.title)}),e.title?g.jsx("p",{className:"text-xs text-rose-500",children:e.title}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["合作意向",i]}),g.jsx(Tt,{value:t.intentLevel||"medium",sheetTitle:"合作意向",options:[{value:"high",label:"高"},{value:"medium",label:"中"},{value:"low",label:"低"}],className:Ne(e.intentLevel?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:s=>o("intentLevel",s)}),e.intentLevel?g.jsx("p",{className:"text-xs text-rose-500",children:e.intentLevel}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["销售是否在职",i]}),g.jsx(Tt,{value:t.employmentStatus||"active",sheetTitle:"销售是否在职",options:[{value:"active",label:"是"},{value:"left",label:"否"}],className:Ne(e.employmentStatus?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:s=>o("employmentStatus",s)}),e.employmentStatus?g.jsx("p",{className:"text-xs text-rose-500",children:e.employmentStatus}):null]}),g.jsxs("label",{className:"flex items-center justify-between rounded-xl border border-slate-200 px-4 py-3 dark:border-slate-800",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"销售以前是否做过云桌面项目"}),g.jsx("input",{type:"checkbox",checked:!!t.hasDesktopExp,onChange:s=>o("hasDesktopExp",s.target.checked)})]})]})}function VQ({form:t,fieldErrors:e,invalidContactRows:r,provinceOptions:a,cityOptions:n,industryOptions:i,certificationLevelOptions:o,channelAttributeOptions:s,internalAttributeOptions:l,channelOtherOptionValue:u,duplicateMessage:c,requiredMark:d,onChange:h,onContactChange:v,onAddContact:m,onRemoveContact:x,onProvinceChange:b}){var _;const w=!((_=t.province)!=null&&_.trim());return g.jsxs("div",{className:"crm-form-grid",children:[g.jsxs("label",{className:"space-y-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"编码"}),g.jsx("input",{value:t.channelCode||"系统自动生成",readOnly:!0,className:"crm-input-box-readonly crm-input-text w-full border border-slate-200 bg-slate-50 text-slate-500 outline-none dark:border-slate-800 dark:bg-slate-900/30 dark:text-slate-400"})]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["渠道名称",d]}),g.jsx("input",{value:t.channelName,onChange:T=>h("channelName",T.target.value),className:Gs(!!e.channelName)}),e.channelName?g.jsx("p",{className:"text-xs text-rose-500",children:e.channelName}):null,!e.channelName&&c?g.jsx("p",{className:"text-xs text-rose-500",children:c}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["省份",d]}),g.jsx(Tt,{value:t.province||"",placeholder:"请选择",sheetTitle:"省份",searchable:!0,searchPlaceholder:"搜索省份",options:[{value:"",label:"请选择"},...a.map(T=>({value:T.value??"",label:T.label||"无"}))],className:Ne(e.province?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:T=>b(T)}),e.province?g.jsx("p",{className:"text-xs text-rose-500",children:e.province}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["市",d]}),g.jsx(Tt,{value:t.city||"",placeholder:w?"请先选择省份":"请选择",sheetTitle:"市",searchable:!0,searchPlaceholder:"搜索市",disabled:w,options:[{value:"",label:"请选择"},...n.map(T=>({value:T.value??"",label:T.label||"无"}))],className:Ne(e.city?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:T=>h("city",T||void 0)}),e.city?g.jsx("p",{className:"text-xs text-rose-500",children:e.city}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["办公地址",d]}),g.jsx("input",{value:t.officeAddress||"",onChange:T=>h("officeAddress",T.target.value),className:Gs(!!e.officeAddress)}),e.officeAddress?g.jsx("p",{className:"text-xs text-rose-500",children:e.officeAddress}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["聚焦行业",d]}),g.jsx(Tt,{multiple:!0,value:t.channelIndustry||[],placeholder:"请选择",sheetTitle:"聚焦行业",options:i.map(T=>({value:T.value??"",label:T.label||"无"})),className:Ne(e.channelIndustry?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:T=>h("channelIndustry",T)}),e.channelIndustry?g.jsx("p",{className:"text-xs text-rose-500",children:e.channelIndustry}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["汇智内部认证级别",d]}),g.jsx(Tt,{value:t.certificationLevel||"",placeholder:"请选择",sheetTitle:"汇智内部认证级别",options:[{value:"",label:"请选择"},...o.map(T=>({value:T.value??"",label:T.label||"无"}))],className:Ne(e.certificationLevel?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:T=>h("certificationLevel",T||void 0)}),e.certificationLevel?g.jsx("p",{className:"text-xs text-rose-500",children:e.certificationLevel}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["年度营业额(万元)",d]}),g.jsx("input",{type:"number",min:"0.01",step:"0.01",placeholder:"请输入万元",value:t.annualRevenue??"",onChange:T=>h("annualRevenue",T.target.value?Number(T.target.value):void 0),className:Gs(!!e.annualRevenue)}),e.annualRevenue?g.jsx("p",{className:"text-xs text-rose-500",children:e.annualRevenue}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["人员规模",d]}),g.jsx("input",{type:"number",value:t.staffSize??"",onChange:T=>h("staffSize",T.target.value?Number(T.target.value):void 0),className:Gs(!!e.staffSize)}),e.staffSize?g.jsx("p",{className:"text-xs text-rose-500",children:e.staffSize}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["建立联系时间",d]}),g.jsx("input",{type:"date",value:t.contactEstablishedDate||"",onChange:T=>h("contactEstablishedDate",T.target.value),className:Gs(!!e.contactEstablishedDate)}),e.contactEstablishedDate?g.jsx("p",{className:"text-xs text-rose-500",children:e.contactEstablishedDate}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["合作意向",d]}),g.jsx(Tt,{value:t.intentLevel||"medium",sheetTitle:"合作意向",options:[{value:"high",label:"高"},{value:"medium",label:"中"},{value:"low",label:"低"}],className:Ne(e.intentLevel?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:T=>h("intentLevel",T)}),e.intentLevel?g.jsx("p",{className:"text-xs text-rose-500",children:e.intentLevel}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["渠道属性",d]}),g.jsx(Tt,{multiple:!0,value:t.channelAttribute||[],placeholder:"请选择",sheetTitle:"渠道属性",options:s.map(T=>({value:T.value??"",label:T.label||"无"})),className:Ne(e.channelAttribute?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:T=>{h("channelAttribute",T),(!u||!T.includes(u))&&h("channelAttributeCustom","")}}),e.channelAttribute?g.jsx("p",{className:"text-xs text-rose-500",children:e.channelAttribute}):null]}),u&&(t.channelAttribute??[]).includes(u)?g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["其它渠道属性",d]}),g.jsx("input",{value:t.channelAttributeCustom||"",onChange:T=>h("channelAttributeCustom",T.target.value),placeholder:"请输入具体渠道属性",className:Gs(!!e.channelAttributeCustom)}),e.channelAttributeCustom?g.jsx("p",{className:"text-xs text-rose-500",children:e.channelAttributeCustom}):null]}):null,g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["新华三内部属性",d]}),g.jsx(Tt,{multiple:!0,value:t.internalAttribute||[],placeholder:"请选择",sheetTitle:"新华三内部属性",options:l.map(T=>({value:T.value??"",label:T.label||"无"})),className:Ne(e.internalAttribute?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:T=>h("internalAttribute",T)}),e.internalAttribute?g.jsx("p",{className:"text-xs text-rose-500",children:e.internalAttribute}):null]}),g.jsxs("label",{className:"flex items-center justify-between rounded-xl border border-slate-200 px-4 py-3 dark:border-slate-800",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"以前是否做过云桌面项目"}),g.jsx("input",{type:"checkbox",checked:!!t.hasDesktopExp,onChange:T=>h("hasDesktopExp",T.target.checked)})]}),g.jsxs("div",{className:"crm-form-section sm:col-span-2",children:[g.jsxs("div",{className:"crm-form-section-header",children:[g.jsxs("span",{className:"text-sm font-semibold text-slate-800 dark:text-slate-200",children:["人员信息",d]}),g.jsx("button",{type:"button",onClick:m,className:"rounded-lg bg-white px-3 py-1.5 text-xs font-medium text-violet-600 shadow-sm dark:bg-slate-800 dark:text-violet-400",children:"添加人员"})]}),g.jsx("div",{className:"crm-section-stack",children:(t.contacts??[]).map((T,C)=>g.jsxs("div",{className:"grid grid-cols-1 gap-3 rounded-xl border border-slate-200 bg-white p-3 sm:grid-cols-[1fr_1fr_1fr_auto] dark:border-slate-700 dark:bg-slate-900/50",children:[g.jsx("input",{value:T.name||"",onChange:k=>v(C,"name",k.target.value),placeholder:"人员姓名",className:Ne("w-full rounded-lg border bg-white px-3 py-2 text-sm outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:bg-slate-900/50",r.includes(C)?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":"border-slate-200 dark:border-slate-800")}),g.jsx("input",{value:T.mobile||"",onChange:k=>v(C,"mobile",k.target.value),placeholder:"联系电话",className:Ne("w-full rounded-lg border bg-white px-3 py-2 text-sm outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:bg-slate-900/50",r.includes(C)?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":"border-slate-200 dark:border-slate-800")}),g.jsx("input",{value:T.title||"",onChange:k=>v(C,"title",k.target.value),placeholder:"职位",className:Ne("w-full rounded-lg border bg-white px-3 py-2 text-sm outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:bg-slate-900/50",r.includes(C)?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":"border-slate-200 dark:border-slate-800")}),g.jsx("button",{type:"button",onClick:()=>x(C),className:"crm-btn-danger rounded-lg px-3 py-2 text-sm font-medium",children:"删除"})]},`quick-channel-${C}`))}),e.contacts?g.jsx("p",{className:"text-xs text-rose-500",children:e.contacts}):null]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"跟进的云桌面项目"}),g.jsx("div",{className:"rounded-xl border border-dashed border-slate-200 bg-slate-50 px-4 py-3 text-sm text-slate-500 dark:border-slate-800 dark:bg-slate-900/30 dark:text-slate-400",children:"通过商机里的“关联渠道”自动带入项目编码、项目名称和项目金额。"})]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"备注说明"}),g.jsx("textarea",{rows:4,value:t.remark||"",onChange:T=>h("remark",T.target.value),className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50"})]})]})}const R5e=[{value:"A",label:"A"},{value:"B",label:"B"},{value:"C",label:"C"}],P5e=[{value:"新建",label:"新建"},{value:"扩容",label:"扩容"},{value:"替换",label:"替换"}],I5e=20,vF=300,xd="下一步销售计划",j5e="后续规划",O5e="opportunity:create",F1=10,FQ="crm:opportunity-export-preferences",GQ=["深信服","锐捷","华为","中兴","噢易云","无","其他"],gA={opportunityName:"",customerName:"",projectLocation:"",projectOwnershipLocation:"",operatorName:"",amount:0,expectedCloseDate:"",confidencePct:"C",stage:"",opportunityType:"",productType:"VDI云桌面",source:"主动开发",salesExpansionId:void 0,channelExpansionId:void 0,competitorName:"",latestProgress:"",nextPlan:"",description:""};function yA(t){return t==null||Number.isNaN(Number(t))?"0":new Intl.NumberFormat("zh-CN").format(Number(t))}function xA(t,e="是",r="否"){return t==null?"":t?e:r}function z5e(t,e){const r=t?"1":"0",a=t?"是":"否",n=e.find(o=>Ly(o)===r);return n?cP(n):a}function B5e(){if(typeof window>"u")return{};try{const t=window.localStorage.getItem(FQ);if(!t)return{};const e=JSON.parse(t);return typeof e=="object"&&e?HQ(e):{}}catch{return{}}}function V5e(t){if(!(typeof window>"u"))try{window.localStorage.setItem(FQ,JSON.stringify(HQ(t)))}catch{}}function HQ(t){return t.selectedFields?{...t,selectedFields:UQ(t.selectedFields)}:t}function Cr(t){if(t==null)return"";const e=String(t).replace(/\r?\n/g," ").trim();return!e||e==="无"||e==="待定"||e==="未关联"?"":e}function F5e(t,e){const r=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),a=window.URL.createObjectURL(r),n=document.createElement("a");n.href=a,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(a)}function G5e(t=new Date){const e=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),n=String(t.getHours()).padStart(2,"0"),i=String(t.getMinutes()).padStart(2,"0"),o=String(t.getSeconds()).padStart(2,"0");return`${e}${r}${a}_${n}${i}${o}`}function pF(t){if(t==null)return;if(typeof t=="number")return Number.isFinite(t)?t:void 0;const e=t.replace(/,/g,"").trim();if(!e)return;const r=Number(e);return Number.isFinite(r)?r:void 0}const o_=[{key:"code",label:"项目编码",value:t=>Cr(t.code)},{key:"name",label:"项目名称",value:t=>Cr(t.name)},{key:"projectLocation",label:"项目地",value:t=>Cr(t.projectLocation)},{key:"projectOwnershipLocation",label:"业绩归属地",value:t=>Cr(t.projectOwnershipLocationName||t.projectOwnershipLocation)},{key:"client",label:"最终用户",value:t=>Cr(t.client)},{key:"type",label:"建设类型",value:t=>Cr(t.type||"新建")},{key:"operatorName",label:"运作方",value:t=>Cr(t.operatorName)},{key:"h3cOwner",label:"新华三负责人",value:(t,e)=>Cr(t.salesExpansionName||(e==null?void 0:e.name))},{key:"channelName",label:"渠道名称",value:(t,e,r)=>Cr(t.channelExpansionName||(r==null?void 0:r.name))},{key:"stage",label:"项目阶段",value:t=>Cr(t.stage)},{key:"confidence",label:"项目把握度",value:t=>Cr(t.confidence)},{key:"amount",label:"预计金额(元)",numFmt:"#,##0.00",value:t=>pF(t.amount)??""},{key:"date",label:"预计下单时间",value:t=>Cr(t.date)},{key:"competitorName",label:"竞争对手",value:t=>Cr(t.competitorName)},{key:"latestProgress",label:"项目最新进展",kind:"longText",value:t=>Cr(t.latestProgress)},{key:"nextPlan",label:xd,kind:"longText",value:t=>Cr(t.nextPlan)},{key:"salesFollowUps",label:"销售跟进记录",kind:"followup",value:t=>n0(t,"XS_COL")},{key:"preSalesFollowUps",label:"售前跟进记录",kind:"followup",value:t=>n0(t,"SQ_COL")},{key:"afterSalesFollowUps",label:"售后跟进记录",kind:"followup",value:t=>n0(t,"SH_COL")},{key:"productFollowUps",label:"产品跟进记录",kind:"followup",value:t=>n0(t,"CP_COL")},{key:"businessFollowUps",label:"商务跟进记录",kind:"followup",value:t=>n0(t,"SW_COL")},{key:"salesExpansionName",label:"销售拓展人员姓名",value:(t,e)=>Cr(t.salesExpansionName||(e==null?void 0:e.name))},{key:"salesExpansionIntent",label:"销售拓展人员合作意向",value:(t,e)=>Cr(t.salesExpansionIntent||(e==null?void 0:e.intent))},{key:"salesExpansionActive",label:"销售拓展人员是否在职",value:(t,e)=>{const r=t.salesExpansionActive??(e==null?void 0:e.active);return r===void 0?"":r?"是":"否"}},{key:"channelExpansionNameExtended",label:"拓展渠道名称",value:(t,e,r)=>Cr(t.channelExpansionName||(r==null?void 0:r.name))},{key:"channelExpansionIntent",label:"拓展渠道合作意向",value:(t,e,r)=>Cr(t.channelExpansionIntent||(r==null?void 0:r.intent))},{key:"channelExpansionEstablishedDate",label:"拓展渠道建立联系时间",value:(t,e,r)=>Cr(t.channelExpansionEstablishedDate||(r==null?void 0:r.establishedDate))},{key:"preSalesName",label:"售前",value:t=>Cr(t.preSalesName)},{key:"notes",label:"备注说明",kind:"longText",value:t=>Cr(t.notes)},{key:"owner",label:"创建人",value:t=>Cr(t.owner)},{key:"createdAt",label:"创建时间",value:t=>Cr(t.createdAt)},{key:"updatedAt",label:"更新修改时间",value:t=>Cr(t.updatedAt)},{key:"archivedAt",label:"签单时间",value:t=>Cr(t.archivedAt)},{key:"archived",label:"是否签单",value:t=>xA(t.archived,"已签单","未签单")},{key:"pushedToOms",label:"是否推送OMS",value:t=>xA(t.pushedToOms,"已推送","未推送")},{key:"actualSignedAmount",label:"实际签约金额(元)",numFmt:"#,##0.00",value:t=>pF(t.actualSignedAmount)??""},{key:"isPoc",label:"是否POC测试项目",value:t=>xA(t.isPoc,"是","否")}],EL=["code","name","projectLocation","client","type","operatorName","h3cOwner","channelName","stage","confidence","amount","date","competitorName","latestProgress","nextPlan","salesFollowUps","isPoc"];function Mw(t){return t===void 0?EL:UQ(t)}function UQ(t){const e=new Set(o_.map(a=>a.key)),r=t.map(a=>a==="followUps"?"salesFollowUps":a);return Array.from(new Set(r)).filter(a=>e.has(a))}function n0(t,e){return(t.followUps??[]).filter(r=>H5e(r,e)).map(r=>{const a=YQ(r);return[[Cr(r.date),Cr(r.user)].filter(Boolean).join(" / "),Cr(a.communicationContent)].filter(Boolean).join(`
`)}).filter(Boolean).join(`
`)}function H5e(t,e){const r=e.trim().toUpperCase();return(t.roleCodes??"").split(",").map(a=>a.trim().toUpperCase()).includes(r)}function RL(t){return Cr(t).toLowerCase()}function U5e(t,e){const r=RL(e);return!r||t.toLowerCase().includes(r)}function bA(t,e){const r=RL(e);return r?t.some(a=>RL(a).includes(r)):!0}function $5e(t,e,r){const a=Cr(t).slice(0,10);return a?!(e&&a<e||r&&a>r):!e&&!r}function mF(t,e){return e==="yes"?t:e==="no"?!t:!0}function Bh(t){return Array.from(new Set((t??[]).map(e=>e==null?void 0:e.trim()).filter(e=>!!e)))}function Ly(t){var e,r;return((e=t==null?void 0:t.value)==null?void 0:e.trim())||((r=t==null?void 0:t.label)==null?void 0:r.trim())||""}function cP(t){var e,r;return((e=t==null?void 0:t.label)==null?void 0:e.trim())||((r=t==null?void 0:t.value)==null?void 0:r.trim())||""}function W5e(t){const e=Ly(t).toLowerCase(),r=cP(t).toLowerCase();return e==="lost"||e.includes("丢单")||r.includes("丢单")||e.includes("放弃")||r.includes("放弃")}function $Q(t){const e=t.map(Ly).filter(Boolean),r=t.filter(a=>!W5e(a)).map(Ly).filter(Boolean);return Bh(r.length>0?r:e)}function Rp(t,e){var a;if(t.stageCodes!==void 0)return{...t,stage:void 0,stageCodes:Bh(t.stageCodes)};const r=(a=t.stage)==null?void 0:a.trim();return r?{...t,stage:void 0,stageCodes:[r]}:e.length<=0?{...t,stage:void 0}:{...t,stage:void 0,stageCodes:$Q(e)}}function Y5e(t,e){const r=Bh(t).sort(),a=Bh(e).sort();return r.length===a.length&&r.every((n,i)=>n===a[i])}function X5e(t,e,r){var n,i,o;const a=[t.code,t.name,t.client,t.owner,t.projectLocation,t.projectOwnershipLocationName,t.projectOwnershipLocation,t.operatorName,t.stage,t.type,t.salesExpansionName,t.channelExpansionName,t.preSalesName,t.competitorName,t.latestProgress,t.nextPlan,t.notes,(n=t.followUps)==null?void 0:n.map(s=>`${s.content??""} ${s.latestProgress??""} ${s.nextAction??""}`).join(" ")].map(Cr).filter(Boolean).join(" ");if(!U5e(a,e.keyword)||!$5e(t.date,e.expectedStartDate,e.expectedEndDate))return!1;if(e.stageCodes!==void 0){const s=new Set(Bh(e.stageCodes));if(s.size<=0)return!1;const l=(i=t.stageCode)==null?void 0:i.trim(),u=(o=t.stage)==null?void 0:o.trim();if(!(l&&s.has(l))&&!(u&&s.has(u)))return!1}return e.confidence&&bd(t.confidence,r)!==e.confidence||!bA([t.projectLocation],e.projectLocation)||!bA([t.type],e.opportunityType)||!bA([t.operatorCode,t.operatorName],e.operatorName)||!mF(!!(t.salesExpansionId||t.salesExpansionName),e.hasSalesExpansion)?!1:mF(!!(t.channelExpansionId||t.channelExpansionName),e.hasChannelExpansion)}function q5e(t,e){return{opportunityName:t.name||"",customerName:t.client||"",projectLocation:t.projectLocation||"",projectOwnershipLocation:t.projectOwnershipLocation||"",amount:t.amount||0,expectedCloseDate:t.date||"",confidencePct:bd(t.confidence,e),stage:t.stageCode||t.stage||"",opportunityType:t.type||"",productType:t.product||"VDI云桌面",source:t.source||"主动开发",salesExpansionId:t.salesExpansionId,channelExpansionId:t.channelExpansionId,operatorName:t.operatorCode||t.operatorName||"",competitorName:t.competitorName||"",latestProgress:t.latestProgress||"",nextPlan:t.nextPlan||"",description:t.notes||""}}function Z5e(t){if(t==null)return"";if(typeof t=="number")return t>=80?"A":t>=60?"B":"C";const e=t.trim().toUpperCase();return e==="A"||e==="B"||e==="C"?e:e==="80"?"A":e==="60"?"B":""}function am(t){return t.length>0?t:[...R5e]}function bd(t,e){const r=typeof t=="string"?t.trim():typeof t=="number"?String(t):"",a=am(e);if(!r)return"";const n=a.find(u=>(u.value||"").trim()===r);if(n!=null&&n.value)return n.value;const i=a.find(u=>(u.label||"").trim()===r);if(i!=null&&i.value)return i.value;const o=Z5e(t);if(!o)return r;const s=a.find(u=>(u.value||"").trim().toUpperCase()===o);if(s!=null&&s.value)return s.value;const l=a.find(u=>(u.label||"").trim().toUpperCase()===o);return l!=null&&l.value?l.value:o}function G1(t,e){const r=bd(t,e),a=am(e).find(n=>(n.value||"")===r);return(a==null?void 0:a.label)||(a==null?void 0:a.value)||r||"无"}function K5e(t,e){const r=am(e),a=bd(t,e),n=r.findIndex(i=>(i.value||"")===a);return n<0?"crm-pill crm-pill-rose":n===0?"crm-pill crm-pill-emerald":n===1?"crm-pill crm-pill-amber":"crm-pill crm-pill-rose"}function dP(t){const e=Array.from(new Set(t));return e.includes("无")?["无"]:e}function Q5e(t){const e=(t==null?void 0:t.trim())||"";if(!e)return{selections:[],customName:""};const r=e.split(/[,、;\n]+/).map(i=>i.trim()).filter(Boolean),a=[],n=[];return r.forEach(i=>{if(GQ.includes(i)&&i!=="其他"){a.push(i);return}n.push(i)}),n.length>0&&a.push("其他"),{selections:dP(a),customName:n.join("、")}}function J5e(t,e){const r=dP(t);if(!r.length)return;if(r.includes("无"))return"无";const a=r.filter(i=>i!=="其他").map(i=>i.trim());if(r.includes("其他")){const i=e==null?void 0:e.trim();i&&a.push(i)}const n=Array.from(new Set(a.filter(Boolean)));return n.length?n.join("、"):void 0}function eRe(t){return(t||"").trim().toLowerCase().replace(/\s+/g,"").replace(//g,"+")}function tRe(t,e){const r=e.find(o=>(o.value||"")===(t||"")),a=[r==null?void 0:r.label,r==null?void 0:r.value,t].filter(Boolean).map(o=>eRe(o));if(!a.length||a.every(o=>!o))return"none";const n=a.some(o=>o.includes("新华三")||o.includes("h3c")),i=a.some(o=>o.includes("渠道")||o.includes("channel"));return n&&i?"both":n?"h3c":i?"channel":"none"}function gF(t,e,r,a){return{...t,salesExpansionId:a==="h3c"||a==="both"?t.salesExpansionId:void 0,channelExpansionId:a==="channel"||a==="both"?t.channelExpansionId:void 0,competitorName:J5e(e,r)}}function ju(t){return Ne("crm-input-box crm-input-text w-full border bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:bg-slate-900/50",t?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":"border-slate-200 dark:border-slate-800")}function ai(){return g.jsx("span",{className:"ml-1 text-rose-500",children:"*"})}function yF(t,e,r,a){var i,o,s,l,u,c,d,h,v,m,x;const n={};return(i=t.projectLocation)!=null&&i.trim()||(n.projectLocation="请选择项目地"),(o=t.projectOwnershipLocation)!=null&&o.trim()||(n.projectOwnershipLocation="请选择业绩归属地"),(s=t.opportunityName)!=null&&s.trim()||(n.opportunityName="请填写项目名称"),(l=t.customerName)!=null&&l.trim()||(n.customerName="请填写最终用户"),(u=t.operatorName)!=null&&u.trim()||(n.operatorName="请选择运作方"),(!t.amount||t.amount<=0)&&(n.amount="请填写预计金额"),(c=t.expectedCloseDate)!=null&&c.trim()||(n.expectedCloseDate="请选择预计下单时间"),(d=t.confidencePct)!=null&&d.trim()||(n.confidencePct="请选择项目把握度"),(h=t.stage)!=null&&h.trim()||(n.stage="请选择项目阶段"),(v=t.opportunityType)!=null&&v.trim()||(n.opportunityType="请选择建设类型"),(m=t.latestProgress)!=null&&m.trim()||(n.latestProgress="请填写项目最新进展"),(x=t.nextPlan)!=null&&x.trim()||(n.nextPlan=`请填写${xd}`),e.length===0?n.competitorName="请至少选择一个竞争对手":e.includes("其他")&&!r.trim()&&(n.competitorName="已选择“其他”,请填写其他竞争对手"),a==="h3c"&&!t.salesExpansionId&&(n.salesExpansionId="请选择新华三负责人"),a==="channel"&&!t.channelExpansionId&&(n.channelExpansionId="请选择渠道名称"),a==="both"&&!t.salesExpansionId&&(n.salesExpansionId="请选择新华三负责人"),a==="both"&&!t.channelExpansionId&&(n.channelExpansionId="请选择渠道名称"),n}function PL({title:t,subtitle:e,onClose:r,children:a,footer:n}){const i=h2(),o=Gd(),s=i||o;return g.jsxs(g.Fragment,{children:[g.jsx(Xt.div,{initial:s?!1:{opacity:0},animate:{opacity:1},exit:s?void 0:{opacity:0},onClick:r,className:Ne("fixed inset-0 z-[70] bg-slate-900/35 dark:bg-slate-950/70",!s&&"backdrop-blur-sm")}),g.jsx(Xt.div,{initial:s?!1:{opacity:0,y:20},animate:{opacity:1,y:0},exit:s?void 0:{opacity:0,y:20},transition:s?{duration:0}:void 0,className:"fixed inset-0 z-[80] px-0 pb-0 pt-[env(safe-area-inset-top)] sm:p-6",children:g.jsx("div",{className:"mx-auto flex h-[calc(100dvh-env(safe-area-inset-top))] w-full items-end sm:h-full sm:max-w-3xl sm:items-center",children:g.jsxs("div",{className:"flex h-[92dvh] w-full flex-col overflow-hidden rounded-t-3xl border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900 sm:h-full sm:rounded-3xl",children:[g.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4 dark:border-slate-800 sm:px-6",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-base font-semibold text-slate-900 dark:text-white sm:text-lg",children:t}),g.jsx("p",{className:"mt-1 text-xs leading-5 text-slate-500 dark:text-slate-400",children:e})]}),g.jsx("button",{onClick:r,className:"rounded-full p-2 text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"h-5 w-5"})})]}),g.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-5 sm:px-6",children:a}),g.jsx("div",{className:"border-t border-slate-100 px-5 pb-[calc(1rem+env(safe-area-inset-bottom))] pt-4 dark:border-slate-800 sm:px-6 sm:pb-4",children:n})]})})})]})}function Ma({label:t,value:e,icon:r,className:a=""}){return g.jsxs("div",{className:`crm-detail-item ${a}`.trim(),children:[g.jsxs("p",{className:"crm-detail-label",children:[r,t]}),g.jsx("div",{className:"crm-detail-value",children:e})]})}function rRe({initialFilters:t,exporting:e,exportError:r,archiveTab:a,stageOptions:n,confidenceOptions:i,projectLocationOptions:o,opportunityTypeOptions:s,operatorOptions:l,onClose:u,onConfirm:c}){const d=Rp(t,n),[h,v]=E.useState(d),m=Mw(h.selectedFields),x=$Q(n),b=n.map(L=>{const R=Ly(L),P=cP(L);return R&&P?{value:R,label:P}:null}).filter(L=>!!L),w=Bh(h.stageCodes);E.useEffect(()=>{v(Rp(t,n))},[t,n]);const _=!!(h.keyword||h.expectedStartDate||h.expectedEndDate||h.confidence||h.projectLocation||h.opportunityType||h.operatorName||h.hasSalesExpansion||h.hasChannelExpansion)||!Y5e(w,x)||JSON.stringify(m)!==JSON.stringify(EL),T=m.length>0,C=(L,R)=>{v(P=>({...P,[L]:R}))},k=L=>{v(R=>{const P=Bh(R.stageCodes),j=P.includes(L)?new Set(P.filter(I=>I!==L)):new Set([...P,L]),V=b.map(I=>I.value).filter(I=>j.has(I));return{...R,stage:void 0,stageCodes:V}})},A=L=>{v(R=>{const P=Mw(R.selectedFields),j=P.includes(L)?P.filter(V=>V!==L):[...P,L];return{...R,selectedFields:j}})},M=(L,R)=>[{value:"",label:R},...L.map(P=>{const j=P.value||P.label||"",V=P.label||P.value||"";return j?{value:j,label:V}:null}).filter(P=>!!P)];return g.jsxs(PL,{title:`导出${a==="active"?"未签单":"已签单"}商机`,subtitle:"选择条件后导出 Excel不填条件则导出当前签单页签下的全部可见商机。",onClose:u,footer:g.jsxs("div",{className:"flex flex-col-reverse gap-3 sm:flex-row sm:justify-between",children:[g.jsx("button",{type:"button",onClick:()=>v(L=>({...Rp({},n),selectedFields:Mw(L.selectedFields)})),disabled:!_,className:"crm-btn crm-btn-secondary disabled:cursor-not-allowed disabled:opacity-60",children:"清空条件"}),g.jsx("button",{type:"button",onClick:()=>c(h),disabled:e||!T,className:"crm-btn crm-btn-primary disabled:cursor-not-allowed disabled:opacity-60",children:e?"导出中...":"确认导出"})]}),children:[g.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[g.jsxs("label",{className:"space-y-1.5 sm:col-span-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"关键词"}),g.jsx("input",{value:h.keyword??"",onChange:L=>C("keyword",L.target.value),placeholder:"搜索项目编号、项目名称、最终用户、负责人、售前",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50"})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"预计下单开始日期"}),g.jsx("input",{type:"date",value:h.expectedStartDate??"",onChange:L=>C("expectedStartDate",L.target.value),className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50"})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"预计下单结束日期"}),g.jsx("input",{type:"date",value:h.expectedEndDate??"",onChange:L=>C("expectedEndDate",L.target.value),className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50"})]}),g.jsxs("div",{className:"space-y-3 rounded-2xl border border-slate-200 bg-slate-50 p-4 dark:border-slate-800 dark:bg-slate-900/40 sm:col-span-2",children:[g.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[g.jsxs("div",{children:[g.jsx("p",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"项目阶段"}),g.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"多选,默认排除已丢单/已放弃阶段。"})]}),b.length>0?g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",onClick:()=>v(L=>({...L,stage:void 0,stageCodes:x})),className:"rounded-full border border-slate-200 px-3 py-1 text-xs font-medium text-slate-600 transition-colors hover:bg-white dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",children:"恢复默认"}),g.jsx("button",{type:"button",onClick:()=>v(L=>({...L,stage:void 0,stageCodes:b.map(R=>R.value)})),className:"rounded-full border border-slate-200 px-3 py-1 text-xs font-medium text-slate-600 transition-colors hover:bg-white dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",children:"全选阶段"}),g.jsx("button",{type:"button",onClick:()=>v(L=>({...L,stage:void 0,stageCodes:[]})),className:"rounded-full border border-slate-200 px-3 py-1 text-xs font-medium text-slate-600 transition-colors hover:bg-white dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",children:"全部取消"})]}):null]}),b.length>0?g.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:b.map(L=>{const R=w.includes(L.value);return g.jsxs("label",{className:Ne("flex items-center gap-3 rounded-xl border px-3 py-2 text-sm transition-colors",R?"border-violet-200 bg-violet-50 text-violet-700 dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-300":"border-slate-200 bg-white text-slate-600 dark:border-slate-800 dark:bg-slate-900 dark:text-slate-300"),children:[g.jsx("input",{type:"checkbox",checked:R,onChange:()=>k(L.value),className:"h-4 w-4 rounded border-slate-300 text-violet-600 focus:ring-violet-500"}),g.jsx("span",{children:L.label})]},L.value)})}):g.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"未加载到阶段字典,导出时不会按项目阶段过滤。"})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"项目把握度"}),g.jsx(Tt,{value:h.confidence??"",options:[{value:"",label:"全部把握度"},...am(i).map(L=>({value:L.value||"",label:L.label||L.value||""}))],placeholder:"全部把握度",sheetTitle:"选择项目把握度",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:L=>C("confidence",L)})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"项目地"}),g.jsx(Tt,{value:h.projectLocation??"",options:M(o,"全部项目地"),placeholder:"全部项目地",sheetTitle:"选择项目地",searchable:!0,searchPlaceholder:"搜索项目地",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:L=>C("projectLocation",L)})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"建设类型"}),g.jsx(Tt,{value:h.opportunityType??"",options:M(s,"全部建设类型"),placeholder:"全部建设类型",sheetTitle:"选择建设类型",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:L=>C("opportunityType",L)})]}),g.jsxs("label",{className:"space-y-1.5 sm:col-span-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"运作方"}),g.jsx(Tt,{value:h.operatorName??"",options:M(l,"全部运作方"),placeholder:"全部运作方",sheetTitle:"选择运作方",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:L=>C("operatorName",L)})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"新华三负责人"}),g.jsx(Tt,{value:h.hasSalesExpansion??"",options:[{value:"",label:"全部"},{value:"yes",label:"已关联"},{value:"no",label:"未关联"}],placeholder:"全部",sheetTitle:"选择新华三负责人关联状态",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:L=>C("hasSalesExpansion",L)})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"拓展渠道"}),g.jsx(Tt,{value:h.hasChannelExpansion??"",options:[{value:"",label:"全部"},{value:"yes",label:"已关联"},{value:"no",label:"未关联"}],placeholder:"全部",sheetTitle:"选择拓展渠道关联状态",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",onChange:L=>C("hasChannelExpansion",L)})]}),g.jsxs("div",{className:"space-y-3 rounded-2xl border border-slate-200 bg-slate-50 p-4 dark:border-slate-800 dark:bg-slate-900/40 sm:col-span-2",children:[g.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[g.jsxs("div",{children:[g.jsx("p",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"导出字段"}),g.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"默认已按模板字段勾选,可取消不需要导出的字段。"})]}),g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",onClick:()=>v(L=>({...L,selectedFields:o_.map(R=>R.key)})),className:"rounded-full border border-slate-200 px-3 py-1 text-xs font-medium text-slate-600 transition-colors hover:bg-white dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",children:"全选字段"}),g.jsx("button",{type:"button",onClick:()=>v(L=>({...L,selectedFields:EL})),className:"rounded-full border border-slate-200 px-3 py-1 text-xs font-medium text-slate-600 transition-colors hover:bg-white dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",children:"恢复模板默认"})]})]}),g.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:o_.map(L=>{const R=m.includes(L.key);return g.jsxs("label",{className:Ne("flex items-center gap-3 rounded-xl border px-3 py-2 text-sm transition-colors",R?"border-violet-200 bg-violet-50 text-violet-700 dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-300":"border-slate-200 bg-white text-slate-600 dark:border-slate-800 dark:bg-slate-900 dark:text-slate-300"),children:[g.jsx("input",{type:"checkbox",checked:R,onChange:()=>A(L.key),className:"h-4 w-4 rounded border-slate-300 text-violet-600 focus:ring-violet-500"}),g.jsx("span",{children:L.label})]},L.key)})}),T?null:g.jsx("p",{className:"text-xs text-rose-500",children:"请至少保留一个导出字段"})]})]}),r?g.jsx("div",{className:"crm-alert crm-alert-error mt-4",children:r}):null]})}function wA(t){const e=typeof t.label=="string"?t.label.trim():"";return e||String(t.value??"")}function H1(t){var a,n;if(!t)return"";const e=((a=t.name)==null?void 0:a.trim())||`拓展人员#${t.id}`,r=((n=t.phone)==null?void 0:n.trim())||"";return r?`${e}${r}`:e}function WQ(t){const e=new Set;return t.filter(r=>e.has(r.value)?!1:(e.add(r.value),!0))}function xF(t,e){return e?WQ([...t,e]):t}function h2(){const[t,e]=E.useState(()=>typeof window>"u"?!1:window.matchMedia("(max-width: 639px)").matches);return E.useEffect(()=>{if(typeof window>"u")return;const r=window.matchMedia("(max-width: 639px)"),a=()=>e(r.matches);return a(),typeof r.addEventListener=="function"?(r.addEventListener("change",a),()=>r.removeEventListener("change",a)):(r.addListener(a),()=>r.removeListener(a))},[]),t}function SA({value:t,options:e,placeholder:r,searchPlaceholder:a,emptyText:n,loading:i=!1,createActionLabel:o,className:s,onChange:l,onCreate:u,onQueryChange:c}){const[d,h]=E.useState(!1),[v,m]=E.useState(""),[x,b]=E.useState("bottom"),[w,_]=E.useState(256),T=E.useRef(null),C=E.useRef(null),k=h2(),[A,M]=E.useState(null),L=WQ(e),R=L.find(F=>F.value===t),P=v.trim().toLowerCase(),j=L.filter(F=>P?[wA(F),...F.keywords??[]].filter(Boolean).map(O=>O.toLowerCase()).some(O=>O.includes(P)):!0),V=()=>{m(""),c==null||c("")};E.useEffect(()=>{if(!d||k){M(null);return}const F=()=>{var ie;const U=(ie=T.current)==null?void 0:ie.getBoundingClientRect();if(!U||typeof window>"u")return;const $=window.innerHeight,K=24,q=96,H=Math.max(160,$-U.bottom-K-q),Z=Math.max(160,U.top-K-q),te=H<280&&Z>H;b(te?"top":"bottom"),_(Math.min(320,te?Z:H)),M({top:te?Math.max(K,U.top-8):U.bottom+8,left:U.left,width:U.width})};F();const G=U=>{var K,q;const $=U.target;!((K=T.current)!=null&&K.contains($))&&!((q=C.current)!=null&&q.contains($))&&(h(!1),V())},O=()=>{F()};return document.addEventListener("mousedown",G),window.addEventListener("resize",O),window.addEventListener("scroll",O,!0),()=>{document.removeEventListener("mousedown",G),window.removeEventListener("resize",O),window.removeEventListener("scroll",O,!0)}},[k,d]),E.useEffect(()=>{if(!d||!k)return;const F=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=F}},[k,d]);const I=()=>g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"relative",children:[g.jsx(Qu,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"}),g.jsx("input",{autoFocus:!0,value:v,onChange:F=>{const G=F.target.value;m(G),c==null||c(G)},placeholder:a,className:"crm-input-text w-full rounded-xl border border-slate-200 bg-slate-50 py-2.5 pl-10 pr-3 text-slate-900 outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-800/60 dark:text-white"})]}),g.jsxs("div",{className:"mt-3 max-h-64 space-y-1 overflow-y-auto overscroll-contain pr-1",children:[g.jsx("button",{type:"button",onClick:()=>{l(void 0),h(!1),V()},className:"w-full rounded-xl px-3 py-2 text-left text-sm text-slate-500 transition-colors hover:bg-slate-50 dark:text-slate-400 dark:hover:bg-slate-800",children:"不选择"}),j.length>0?j.map(F=>g.jsxs("button",{type:"button",onClick:()=>{l(F.value),h(!1),V()},className:`flex w-full items-center justify-between rounded-xl px-3 py-2 text-left text-sm transition-colors ${F.value===t?"bg-violet-50 text-violet-700 dark:bg-violet-500/10 dark:text-violet-300":"text-slate-700 hover:bg-slate-50 dark:text-slate-200 dark:hover:bg-slate-800"}`,children:[g.jsx("span",{children:wA(F)}),F.value===t?g.jsx(Fu,{className:"h-4 w-4 shrink-0"}):null]},F.value)):i?g.jsx("div",{className:"crm-empty-state px-3 py-6",children:g.jsx("p",{children:"搜索中..."})}):g.jsxs("div",{className:"crm-empty-state px-3 py-6",children:[g.jsx("p",{children:n}),u?g.jsx("button",{type:"button",onClick:()=>{u(v),h(!1),V()},className:"mt-3 rounded-xl bg-violet-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-violet-700",children:o||"新增并选中"}):null]})]})]});return g.jsxs("div",{ref:T,className:"relative",children:[g.jsxs("button",{type:"button",onClick:()=>{h(F=>{const G=!F;return G||V(),G})},className:Ne("crm-btn-sm crm-input-text flex w-full items-center justify-between rounded-xl border border-slate-200 bg-white text-left outline-none transition-colors hover:border-slate-300 focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50 dark:hover:border-slate-700",s),children:[g.jsx("span",{className:R?"text-slate-900 dark:text-white":"text-slate-400 dark:text-slate-500",children:R?wA(R):r}),g.jsx(zy,{className:`h-4 w-4 shrink-0 text-slate-400 transition-transform ${d?"rotate-180":""}`})]}),d&&!k&&A&&typeof document<"u"?X0.createPortal(g.jsx("div",{className:"pointer-events-none fixed inset-0 z-[220]",children:g.jsx("div",{ref:C,style:{position:"absolute",top:x==="top"?Math.max(24,A.top-Math.min(w,320)):A.top,left:A.left,width:A.width},className:"pointer-events-auto rounded-2xl border border-slate-200 bg-white p-3 shadow-2xl dark:border-slate-800 dark:bg-slate-900",children:g.jsx("div",{style:{maxHeight:`${w}px`},className:"overflow-y-auto overscroll-contain pr-1",children:I()})})}),document.body):null,g.jsx(co,{children:d&&k?g.jsxs(g.Fragment,{children:[g.jsx(Xt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[120] bg-slate-900/35 backdrop-blur-sm dark:bg-slate-950/70",onClick:()=>{h(!1),m("")}}),g.jsx(Xt.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:24},className:"fixed inset-x-0 bottom-0 z-[130] px-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))] pt-3",children:g.jsxs("div",{className:"mx-auto w-full max-w-lg rounded-3xl border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900",children:[g.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4 dark:border-slate-800",children:[g.jsxs("div",{children:[g.jsx("p",{className:"text-base font-semibold text-slate-900 dark:text-white",children:r}),g.jsx("p",{className:"crm-field-note mt-1",children:"搜索并选择一个对象"})]}),g.jsx("button",{type:"button",onClick:()=>{h(!1),m("")},className:"rounded-full p-2 text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"h-5 w-5"})})]}),g.jsx("div",{className:"px-4 py-4 pb-[calc(1rem+env(safe-area-inset-bottom))]",children:I()})]})})]}):null})]})}function aRe({value:t,options:e,placeholder:r,className:a,onChange:n}){const[i,o]=E.useState(!1),s=E.useRef(null),l=E.useRef(null),u=h2(),[c,d]=E.useState("bottom"),[h,v]=E.useState(320),[m,x]=E.useState(null),b=t.length>0?t.join("、"):r;E.useEffect(()=>{if(!i||u){x(null);return}const T=()=>{var I;const k=(I=s.current)==null?void 0:I.getBoundingClientRect();if(!k)return;const A=window.innerHeight,M=24,L=132,R=Math.max(180,A-k.bottom-M-L),P=Math.max(180,k.top-M-L),j=R<300&&P>R,V=Math.min(360,j?P:R);d(j?"top":"bottom"),v(V),x({left:k.left,width:k.width,top:j?Math.max(M,k.top-8-(V+L)):k.bottom+8})};T();const C=k=>{var M,L;const A=k.target;!((M=s.current)!=null&&M.contains(A))&&!((L=l.current)!=null&&L.contains(A))&&o(!1)};return window.addEventListener("resize",T),window.addEventListener("scroll",T,!0),document.addEventListener("mousedown",C),()=>{window.removeEventListener("resize",T),window.removeEventListener("scroll",T,!0),document.removeEventListener("mousedown",C)}},[u,i]),E.useEffect(()=>{if(!i||!u)return;const T=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=T}},[u,i]);const w=T=>{const C=t.includes(T);if(T==="无"){n(C?[]:["无"]);return}const k=C?t.filter(A=>A!==T):dP([...t.filter(A=>A!=="无"),T]);n(k)},_=()=>g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"space-y-1",children:e.map(T=>{const C=t.includes(T);return g.jsxs("button",{type:"button",onClick:()=>w(T),className:Ne("flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-left text-sm transition-colors",C?"bg-violet-50 text-violet-700 dark:bg-violet-500/10 dark:text-violet-300":"text-slate-700 hover:bg-slate-50 dark:text-slate-200 dark:hover:bg-slate-800"),children:[g.jsx("span",{children:T}),C?g.jsx(Fu,{className:"h-4 w-4 shrink-0"}):null]},T)})}),g.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2 border-t border-slate-100 pt-3 dark:border-slate-800",children:[g.jsx("button",{type:"button",onClick:()=>n([]),className:"rounded-xl px-3 py-2 text-sm text-slate-500 transition-colors hover:bg-slate-50 dark:text-slate-400 dark:hover:bg-slate-800",children:"清空"}),g.jsx("button",{type:"button",onClick:()=>o(!1),className:"rounded-xl bg-violet-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-violet-700",children:"完成"})]})]});return g.jsxs("div",{ref:s,className:"relative",children:[g.jsxs("button",{type:"button",onClick:()=>o(T=>!T),className:Ne("crm-btn-sm crm-input-text flex w-full items-center justify-between rounded-xl border border-slate-200 bg-white text-left outline-none transition-colors hover:border-slate-300 focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50 dark:hover:border-slate-700",a),children:[g.jsx("span",{className:t.length>0?"truncate text-slate-900 dark:text-white":"text-slate-400 dark:text-slate-500",children:b}),g.jsx(zy,{className:Ne("h-4 w-4 shrink-0 text-slate-400 transition-transform",i&&"rotate-180")})]}),i&&!u&&m&&typeof document<"u"?X0.createPortal(g.jsx("div",{className:"pointer-events-none fixed inset-0 z-[220]",children:g.jsxs("div",{ref:l,style:{position:"absolute",left:m.left,width:m.width,top:m.top},className:"pointer-events-auto rounded-2xl border border-slate-200 bg-white p-3 shadow-2xl dark:border-slate-800 dark:bg-slate-900",children:[g.jsxs("div",{className:"mb-3 shrink-0",children:[g.jsx("p",{className:"text-sm font-semibold text-slate-900 dark:text-white",children:"竞争对手"}),g.jsx("p",{className:"crm-field-note mt-1",children:"支持多选,选择“其他”后可手动录入。"})]}),g.jsx("div",{style:{maxHeight:`${h}px`},className:"overflow-y-auto pr-1",children:_()})]})}),document.body):null,g.jsx(co,{children:i&&u?g.jsxs(g.Fragment,{children:[g.jsx(Xt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[120] bg-slate-900/35 backdrop-blur-sm dark:bg-slate-950/70",onClick:()=>o(!1)}),g.jsx(Xt.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:24},className:"fixed inset-x-0 bottom-0 z-[130] px-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))] pt-3",children:g.jsxs("div",{className:"mx-auto w-full max-w-lg rounded-3xl border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900",children:[g.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4 dark:border-slate-800",children:[g.jsxs("div",{children:[g.jsx("p",{className:"text-base font-semibold text-slate-900 dark:text-white",children:"竞争对手"}),g.jsx("p",{className:"crm-field-note mt-1",children:"支持多选,选择“其他”后可手动录入。"})]}),g.jsx("button",{type:"button",onClick:()=>o(!1),className:"rounded-full p-2 text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"h-5 w-5"})})]}),g.jsx("div",{className:"px-4 py-4 pb-[calc(1rem+env(safe-area-inset-bottom))]",children:_()})]})})]}):null})]})}function nRe(){var hu,cl,dl,fl,tv;const t=po(),e=IE(),r=h2(),a=Gd(),n=r||a,[i,o]=E.useState("active"),[s,l]=E.useState("全部"),[u,c]=E.useState(!1),[d,h]=E.useState(""),[v,m]=E.useState(null),[x,b]=E.useState(null),[w,_]=E.useState(!1),[T,C]=E.useState(""),[k,A]=E.useState(null),[M,L]=E.useState(!1),[R,P]=E.useState(!1),[j,V]=E.useState(!1),[I,F]=E.useState(!1),[G,O]=E.useState(!1),[U,$]=E.useState(!1),[K,q]=E.useState(!1),[H,Z]=E.useState(()=>B5e()),[te,ie]=E.useState(null),[ce,me]=E.useState(""),[ze,Ce]=E.useState(""),[ge,Be]=E.useState([]),[_e,Oe]=E.useState(F1),xt=E.useRef(null),Ye=E.useRef(!1),[st,We]=E.useState([]),[At,kt]=E.useState([]),[Jt,Nr]=E.useState(null),[rr,Fe]=E.useState(null),[Mt,dr]=E.useState([]),[ar,sa]=E.useState([]),[va,rn]=E.useState([]),[wa,En]=E.useState([]),[pa,an]=E.useState([]),[gr,Ar]=E.useState([]),[Hr,ye]=E.useState([]),[Rt,Te]=E.useState([]),[xe,Pt]=E.useState(gA),[bt,Vt]=E.useState(void 0),[Zt,nr]=E.useState(""),[_r,ma]=E.useState(!1),[Mr,Zr]=E.useState([]),[za,la]=E.useState(""),[ut,Da]=E.useState({}),[Tr,lr]=E.useState("sales"),[Ba,Dr]=E.useState(!1),[Va,ua]=E.useState("sales"),[Ze,wr]=E.useState(!1),[le,tt]=E.useState(""),[Ot,pt]=E.useState(Lp),[nn,Sa]=E.useState(Ep),[Zn,Ur]=E.useState({}),[Rn,Kr]=E.useState({}),[$a,fr]=E.useState([]),[Vo,bi]=E.useState([]),[Pn,Qr]=E.useState([]),[Ss,Ji]=E.useState([]),[Oi,mo]=E.useState([]),[yn,In]=E.useState([]),[Wa,La]=E.useState([]),[wi,jr]=E.useState([]),[zi,xn]=E.useState(""),[Or,Kn]=E.useState(""),[_a,_s]=E.useState(""),[Si,J]=E.useState(""),[Me,re]=E.useState(!1),[de,ct]=E.useState(!1),ir=E.useRef(!1),zr=M||R||j||K||Ba,Qn=te!==null&&KU(O5e,te),Xe=async X=>cde({keyword:X,limit:I5e});E.useEffect(()=>{let X=!1;async function Le(){try{const Re=await ZU();X||ie(Re.filter(Ge=>Ge.status!==0).map(Ge=>Ge.code).filter(Boolean))}catch{X||ie(null)}}return Le(),()=>{X=!0}},[]),E.useEffect(()=>{let X=!1;async function Le(){try{const Re=await vp(d,s,!1,F1+1,i==="archived");X||(Be(Re.items??[]),m(null))}catch{X||(Be([]),m(null))}}return Le(),()=>{X=!0}},[d,s,i]),E.useEffect(()=>{Oe(F1)},[d,s,i]),E.useEffect(()=>{const X=t.state,Le=X==null?void 0:X.archiveTab;(Le==="active"||Le==="archived")&&o(Le)},[t.state]),E.useEffect(()=>{const X=t.state,Le=X==null?void 0:X.selectedId;if(!Le)return;const Re=ge.find(Ge=>Ge.id===Le);Re&&m(Re)},[t.state,ge]),E.useEffect(()=>{if(!(v!=null&&v.id)){b(null),C(""),_(!1);return}let X=!1;return _(!0),b(null),C(""),ode(v.id).then(Le=>{X||b(Le)}).catch(Le=>{X||(b(null),C(Le instanceof Error?Le.message:"加载商机详情失败"))}).finally(()=>{X||_(!1)}),()=>{X=!0}},[v==null?void 0:v.id,v==null?void 0:v.updatedAt]),E.useEffect(()=>{let X=!1;async function Le(){re(!0),ct(!0);try{const Re=await Xe();X||(ir.current=!0,We(Re.salesItems??[]),kt(Re.channelItems??[]))}catch{X||(We([]),kt([]))}finally{X||(re(!1),ct(!1))}}return Le(),()=>{X=!0}},[]);const jn=async()=>{const X=await Xe();return We(X.salesItems??[]),kt(X.channelItems??[]),X};E.useEffect(()=>{if(!ir.current)return;let X=!1;const Le=window.setTimeout(async()=>{re(!0);try{const Re=await Xe(_a);X||We(Re.salesItems??[])}catch{X||We([])}finally{X||re(!1)}},vF);return()=>{X=!0,window.clearTimeout(Le)}},[_a]),E.useEffect(()=>{if(!ir.current)return;let X=!1;const Le=window.setTimeout(async()=>{ct(!0);try{const Re=await Xe(Si);X||kt(Re.channelItems??[])}catch{X||kt([])}finally{X||ct(!1)}},vF);return()=>{X=!0,window.clearTimeout(Le)}},[Si]),E.useEffect(()=>{let X=!1;async function Le(){try{const Re=await pp();X||(sa((Re.stageOptions??[]).filter(Ge=>Ge.value)),rn((Re.operatorOptions??[]).filter(Ge=>Ge.value)),En((Re.projectLocationOptions??[]).filter(Ge=>Ge.value)),an((Re.projectOwnershipLocationOptions??[]).filter(Ge=>Ge.value)),Ar((Re.opportunityTypeOptions??[]).filter(Ge=>Ge.value)),ye((Re.confidenceOptions??[]).filter(Ge=>Ge.value)),Te((Re.sysIsOptions??[]).filter(Ge=>Ge.value)))}catch{X||(sa([]),rn([]),En([]),an([]),Ar([]),ye([]),Te([]))}}return Le(),()=>{X=!0}},[]),E.useEffect(()=>{var Le;if(!ar.length)return;const X=((Le=ar[0])==null?void 0:Le.value)||"";Pt(Re=>Re.stage?Re:{...Re,stage:X})},[ar]),E.useEffect(()=>{ar.length<=0||Z(X=>X.stageCodes===void 0?Rp(X,ar):X)},[ar]),E.useEffect(()=>{var Le;if(!gr.length)return;const X=((Le=gr[0])==null?void 0:Le.value)||"";Pt(Re=>Re.opportunityType?Re:{...Re,opportunityType:X})},[gr]),E.useEffect(()=>{var Re;const X=am(Hr);if(!X.length)return;const Le=((Re=X[0])==null?void 0:Re.value)||"";Pt(Ge=>({...Ge,confidencePct:Ge.confidencePct?bd(Ge.confidencePct,X):Le}))},[Hr]);const Bi=()=>{Dr(!1),wr(!1),tt(""),pt(Lp),Sa(Ep),Ur({}),Kr({}),fr([]),mo([]),xn(""),Kn("")},Ts=async()=>{const X=await jE();return bi(X.officeOptions??[]),Qr(X.industryOptions??[]),Ji(X.provinceOptions??[]),In(X.certificationLevelOptions??[]),La(X.channelAttributeOptions??[]),jr(X.internalAttributeOptions??[]),Sa(Le=>({...Le,channelCode:Le.channelCode||X.nextChannelCode||""})),X},Ya=async X=>{const Le=X==null?void 0:X.trim();if(!Le)return mo([]),[];const Re=await OE(Le);return mo(Re??[]),Re??[]},go=async(X,Le)=>{ua(X),tt(""),Ur({}),Kr({}),fr([]),xn(""),Kn("");const Re=(Le==null?void 0:Le.trim())||"";try{const Ge=await Ts();X==="channel"?Sa({...Ep,channelCode:Ge.nextChannelCode||"",channelName:Re}):pt({...Lp,candidateName:Re})}catch(Ge){tt(Ge instanceof Error?Ge.message:"加载拓展配置失败")}Dr(!0)},Ue=v?x??v:null,On=(Ue==null?void 0:Ue.followUps)??[],_i=ge.filter(X=>i==="active"?!X.archived:!!X.archived),yo=_i.slice(0,_e),xo=yo.length<_i.length,il=async()=>{if(!xo||Ye.current)return;Ye.current=!0;const X=_e+F1;try{const Le=await vp(d,s,!1,X+1,i==="archived");Be(Le.items??[]),Oe(X)}finally{Ye.current=!1}};E.useEffect(()=>{if(!xo)return;const X=()=>{const Le=xt.current;Le&&Le.getBoundingClientRect().top<=window.innerHeight+120&&il()};return window.addEventListener("scroll",X,!0),()=>window.removeEventListener("scroll",X,!0)},[xo,_e,_i.length,d,s,i]);const eo=[{label:"全部",value:"全部"},...ar.map(X=>({label:X.label||X.value||"",value:X.value||""}))].filter(X=>X.value),Dt=((hu=xe.projectLocation)==null?void 0:hu.trim())||"",zn=((cl=xe.projectOwnershipLocation)==null?void 0:cl.trim())||"",bn=[{value:"",label:"请选择"},...wa.map(X=>({label:X.label||X.value||"",value:X.value||""})),...Dt&&!wa.some(X=>(X.value||"").trim()===Dt)?[{value:Dt,label:Dt}]:[]],Ta=[{value:"",label:"请选择"},...pa.map(X=>({label:X.label||X.value||"",value:X.value||""})),...zn&&!pa.some(X=>(X.value||"").trim()===zn)?[{value:zn,label:zn}]:[]],Bn=((dl=xe.opportunityType)==null?void 0:dl.trim())||"",Jn=gr.length>0?gr:P5e,ca=am(Hr),Fo=()=>{var X;return{...gA,confidencePct:((X=ca[0])==null?void 0:X.value)||gA.confidencePct}},dc=[{value:"",label:"请选择"},...Jn.map(X=>({label:X.label||X.value||"",value:X.value||""})),...Bn&&!Jn.some(X=>(X.value||"").trim()===Bn)?[{value:Bn,label:Bn}]:[]],iu=((fl=eo.find(X=>X.value===s))==null?void 0:fl.label)||"全部",Jr=Ue!=null&&Ue.salesExpansionId?st.find(X=>X.id===Ue.salesExpansionId)??null:null,Fa=Ue!=null&&Ue.channelExpansionId?At.find(X=>X.id===Ue.channelExpansionId)??null:null,Vi=H1(Jr)||(Ue==null?void 0:Ue.salesExpansionName)||"",ou=(Ue==null?void 0:Ue.salesExpansionIntent)||(Jr==null?void 0:Jr.intent)||"",ol=(Ue==null?void 0:Ue.salesExpansionActive)??(Jr==null?void 0:Jr.active),ur=(Ue==null?void 0:Ue.channelExpansionName)||(Fa==null?void 0:Fa.name)||"",Go=(Ue==null?void 0:Ue.channelExpansionIntent)||(Fa==null?void 0:Fa.intent)||"",Ti=(Ue==null?void 0:Ue.channelExpansionEstablishedDate)||(Fa==null?void 0:Fa.establishedDate)||"",Vn=!!Vi,yr=!!ur,Ho=(Ue==null?void 0:Ue.preSalesName)||"无",ga=!!(Ue&&e!==void 0&&Ue.ownerUserId===e),Fi=!!(Ue!=null&&Ue.archived),Cs=ga&&!Fi,su=ga&&!Fi,Uo=tRe(xe.operatorName,va),Jh=Uo==="h3c"||Uo==="both",Mm=Uo==="channel"||Uo==="both",Yd=Mr.includes("其他"),ui=xe.salesExpansionId?st.find(X=>X.id===xe.salesExpansionId)??null:null,Ci=xe.channelExpansionId?At.find(X=>X.id===xe.channelExpansionId)??null:null,Xd=ui?{value:ui.id,label:H1(ui),keywords:[ui.employeeNo||"",ui.officeName||"",ui.phone||"",ui.title||""]}:xe.salesExpansionId&&(Jt==null?void 0:Jt.value)===xe.salesExpansionId?Jt:null,qd=Ci?{value:Ci.id,label:Ci.name||`渠道#${Ci.id}`,keywords:[Ci.channelCode||"",Ci.province||"",Ci.primaryContactName||"",Ci.primaryContactMobile||""]}:xe.channelExpansionId&&(rr==null?void 0:rr.value)===xe.channelExpansionId?rr:null,Zd=xF(st.map(X=>({value:X.id,label:H1(X),keywords:[X.employeeNo||"",X.officeName||"",X.phone||"",X.title||""]})),Xd),ks=xF(At.map(X=>({value:X.id,label:X.name||`渠道#${X.id}`,keywords:[X.channelCode||"",X.province||"",X.primaryContactName||"",X.primaryContactMobile||""]})),qd),Kd=(tv=Wa.find(i_))==null?void 0:tv.value,Ns=[...bt&&Zt&&!Mt.some(X=>X.userId===bt)?[{value:bt,label:Zt,keywords:[]}]:[],...Mt.map(X=>({value:X.userId,label:X.userName||X.loginName||`售前#${X.userId}`,keywords:[X.loginName||""]}))];E.useEffect(()=>{v?lr("sales"):(V(!1),Vt(void 0),nr(""))},[v]),E.useEffect(()=>{v&&!yo.some(X=>X.id===v.id)&&m(null)},[i,v,yo]);const ei=X=>{const Le=bd(X,ca),Re=ca.findIndex(Ge=>(Ge.value||"")===Le);return Re<0?"text-rose-600 dark:text-rose-400 bg-rose-50 dark:bg-rose-500/10 border-rose-200 dark:border-rose-500/20":Re===0?"text-emerald-600 dark:text-emerald-400 bg-emerald-50 dark:bg-emerald-500/10 border-emerald-200 dark:border-emerald-500/20":Re===1?"text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-500/10 border-amber-200 dark:border-amber-500/20":"text-rose-600 dark:text-rose-400 bg-rose-50 dark:bg-rose-500/10 border-rose-200 dark:border-rose-500/20"},lu=async X=>{if(U)return;const Le=Rp(X,ar);$(!0),Ce(""),Z(Le),V5e(Le);try{const Ge=((await vp("","全部")).items??[]).filter(Ht=>i==="active"?!Ht.archived:!!Ht.archived).filter(Ht=>X5e(Ht,Le,ca)),Br=Mw(Le.selectedFields);if(Ge.length<=0)throw new Error(`当前筛选条件下暂无可导出的${i==="active"?"未签单":"已签单"}商机`);if(Br.length<=0)throw new Error("请至少选择一个导出字段");const or=await f2(()=>import("./exceljs.min-_FHOiBEn.js").then(Ht=>Ht.e),[]),Fn=new or.Workbook,on=Fn.addWorksheet("商机储备"),Ds=o_.filter(Ht=>Br.includes(Ht.key)),Im=Ds.map(Ht=>Ht.label);on.addRow(Im),Ge.forEach(Ht=>{const ki=Ht.salesExpansionId?st.find(sn=>sn.id===Ht.salesExpansionId)??null:null,bo=Ht.channelExpansionId?At.find(sn=>sn.id===Ht.channelExpansionId)??null:null;on.addRow(Ds.map(sn=>sn.key==="confidence"?G1(Ht.confidence,ca):sn.value(Ht,ki,bo)))}),on.views=[{state:"frozen",ySplit:1}],on.getRow(1).height=24,on.getRow(1).font={bold:!0},on.getRow(1).alignment={vertical:"middle",horizontal:"center"};const jm=Ds.map(Ht=>Ht.kind==="followup"?42:Ht.kind==="longText"?24:Ht.label.includes("项目名称")||Ht.label.includes("最终用户")?20:16);Ds.forEach((Ht,ki)=>{const bo=on.getColumn(ki+1);bo.width=jm[ki],Ht.numFmt&&(bo.numFmt=Ht.numFmt),bo.alignment={vertical:"top",horizontal:"left",wrapText:Ht.kind==="followup"}}),on.eachRow((Ht,ki)=>{Ht.eachCell((sn,hl)=>{var vu;sn.border={top:{style:"thin",color:{argb:"FFE2E8F0"}},left:{style:"thin",color:{argb:"FFE2E8F0"}},bottom:{style:"thin",color:{argb:"FFE2E8F0"}},right:{style:"thin",color:{argb:"FFE2E8F0"}}},sn.alignment={vertical:"top",horizontal:ki===1?"center":"left",wrapText:ki>1&&((vu=Ds[hl-1])==null?void 0:vu.kind)==="followup"}});const bo=Ds.map((sn,hl)=>sn.kind==="followup"?hl+1:0).filter(sn=>sn>0);if(ki>1&&bo.length>0){const sn=bo.reduce((hl,vu)=>{const pc=Cr(Ht.getCell(vu).value);return Math.max(hl,pc?pc.split(`
`).length:1)},1);Ht.height=Math.max(22,sn*16)}});const Om=await Fn.xlsx.writeBuffer(),zm=`商机储备_${i==="active"?"未签单":"已签单"}_${G5e()}.xlsx`;F5e(zm,Om),q(!1)}catch(Re){Ce(Re instanceof Error?Re.message:"导出失败,请稍后重试")}finally{$(!1)}},Ca=(X,Le)=>{Pt(Re=>({...Re,[X]:Le})),X in ut&&Da(Re=>{const Ge={...Re};return delete Ge[X],Ge})},uu=X=>{Nr(X?Zd.find(Le=>Le.value===X)??null:null),Ca("salesExpansionId",X)},sl=X=>{Fe(X?ks.find(Le=>Le.value===X)??null:null),Ca("channelExpansionId",X)},Qd=(X,Le)=>{pt(Re=>({...Re,[X]:Le})),X in Zn&&Ur(Re=>{const Ge={...Re};return delete Ge[X],Ge}),X==="employeeNo"&&xn("")},cu=(X,Le)=>{Sa(Re=>({...Re,[X]:Le})),X in Rn&&Kr(Re=>{const Ge={...Re};return delete Ge[X],Ge}),X==="channelName"&&Kn("")},Dm=(X,Le,Re)=>{Sa(Ge=>{const Br=[...Ge.contacts??[]];return Br[X]={...Br[X]??kh(),[Le]:Re},{...Ge,contacts:Br}}),$a.includes(X)&&fr(Ge=>Ge.filter(Br=>Br!==X)),Rn.contacts&&Kr(Ge=>{const Br={...Ge};return delete Br.contacts,Br})},Lm=()=>{Sa(X=>({...X,contacts:[...X.contacts??[],kh()]}))},ll=X=>{Sa(Le=>{const Ge=(Le.contacts??[]).filter((Br,or)=>or!==X);return{...Le,contacts:Ge.length>0?Ge:[kh()]}}),fr(Le=>Le.filter(Re=>Re!==X).map(Re=>Re>X?Re-1:Re))},fc=X=>{const Le=X||"";cu("province",Le||void 0),cu("city",void 0),Ya(Le)},du=async()=>{var X,Le,Re;if(!Ze){if(tt(""),xn(""),Kn(""),Va==="sales"){const Ge=IQ(Ot);if(Object.keys(Ge).length>0){Ur(Ge),tt("请先完整填写销售人员拓展必填字段");return}}else{const Ge=(X=Wa.find(i_))==null?void 0:X.value,{errors:Br,invalidContactRows:or}=jQ(nn,Ge);if(Object.keys(Br).length>0){Kr(Br),fr(or),tt("请先完整填写渠道拓展必填字段");return}}wr(!0);try{let Ge;if(Va==="sales"){const or=await Ww(Ot.employeeNo.trim());if(or.duplicated){const Fn=or.message||"工号重复,请确认该人员是否已存在!";xn(Fn),Ur(on=>({...on,employeeNo:Fn})),tt(Fn),wr(!1);return}Ge=await zE(OQ(Ot))}else{const or=await Yw(nn.channelName.trim());if(or.duplicated){const Fn=or.message||"渠道重复,请确认该渠道是否已存在!";Kn(Fn),Kr(on=>({...on,channelName:Fn})),tt(Fn),wr(!1);return}Ge=await BE(zQ(nn))}const Br=await jn();if(Va==="sales"){const or=(Br.salesItems??[]).find(on=>on.id===Ge),Fn=or?{value:or.id,label:H1(or),keywords:[or.employeeNo||"",or.officeName||"",or.phone||"",or.title||""]}:{value:Ge,label:((Le=Ot.candidateName)==null?void 0:Le.trim())||`拓展人员#${Ge}`,keywords:[]};Nr(Fn),Ca("salesExpansionId",(or==null?void 0:or.id)??Ge)}else{const or=(Br.channelItems??[]).find(on=>on.id===Ge),Fn=or?{value:or.id,label:or.name||`渠道#${or.id}`,keywords:[or.channelCode||"",or.province||"",or.primaryContactName||"",or.primaryContactMobile||""]}:{value:Ge,label:((Re=nn.channelName)==null?void 0:Re.trim())||`渠道#${Ge}`,keywords:[]};Fe(Fn),Ca("channelExpansionId",(or==null?void 0:or.id)??Ge)}Bi()}catch(Ge){tt(Ge instanceof Error?Ge.message:"新增失败"),wr(!1)}}},As=()=>{me(""),Da({}),Pt(Fo()),Nr(null),Fe(null),Zr([]),la(""),L(!0)},hc=()=>{L(!1),P(!1),F(!1),me(""),Da({}),Pt(Fo()),Nr(null),Fe(null),Zr([]),la("")},ul=async X=>{const Re=(await vp(d,s,!1)).items??[];Be(Re),X&&m(Re.find(Ge=>Ge.id===X)??null)},vc=async()=>{if(I)return;me("");const X=yF(xe,Mr,za,Uo);if(Object.keys(X).length>0){Da(X),me("请先完整填写商机必填字段");return}F(!0);try{await r$(gF(xe,Mr,za,Uo)),await ul(),hc()}catch(Le){me(Le instanceof Error?Le.message:"新增商机失败"),F(!1)}},fu=()=>{if(!v)return;const X=Ue??v;if(!ga){me("仅可编辑本人负责的商机");return}if(Fi){me("已签单商机不允许编辑");return}me(""),Da({}),Pt(q5e(X,ca)),Nr(X.salesExpansionId&&X.salesExpansionName?{value:X.salesExpansionId,label:X.salesExpansionName,keywords:[]}:null),Fe(X.channelExpansionId&&X.channelExpansionName?{value:X.channelExpansionId,label:X.channelExpansionName,keywords:[]}:null);const Le=Q5e(X.competitorName);Zr(Le.selections),la(Le.customName),P(!0)},Jd=async()=>{if(!v||I)return;if(!ga){me("仅可编辑本人负责的商机");return}if(Fi){me("已签单商机不允许编辑");return}me("");const X=yF(xe,Mr,za,Uo);if(Object.keys(X).length>0){Da(X),me("请先完整填写商机必填字段");return}F(!0);try{await lde(v.id,gF(xe,Mr,za,Uo)),await ul(v.id),hc()}catch(Le){me(Le instanceof Error?Le.message:"编辑商机失败"),F(!1)}},ev=async()=>{if(!(!v||G)){if(!ga){me("仅可推送本人负责的商机");return}if(Fi){me("已签单商机不允许推送");return}O(!0),me("");try{const X={preSalesId:bt,preSalesName:Zt.trim()||void 0};await ude(v.id,X),await ul(v.id)}catch(X){me(X instanceof Error?X.message:"推送 OMS 失败")}finally{O(!1)}}},Ms=(X,Le)=>{if(!X){Vt(void 0),nr("");return}const Re=X.preSalesId?Le.find(Br=>Br.userId===X.preSalesId):void 0;if(Re){Vt(Re.userId),nr(Re.userName||Re.loginName||"");return}const Ge=X.preSalesName?Le.find(Br=>(Br.userName||"")===X.preSalesName):void 0;if(Ge){Vt(Ge.userId),nr(Ge.userName||Ge.loginName||"");return}Vt(X.preSalesId),nr(X.preSalesName||"")},Em=async()=>{if(!v||G)return;const X=Ue??v;if(!ga){me("仅可推送本人负责的商机");return}if(Fi){me("已签单商机不允许推送");return}me(""),Ms(X,Mt),V(!0),ma(!0);try{const Le=await sde();dr(Le),Ms(X,Le)}catch(Le){dr([]),me(Le instanceof Error?Le.message:"加载售前人员失败")}finally{ma(!1)}},Rm=async()=>{if(!ga){me("仅可推送本人负责的商机");return}if(Fi){me("已签单商机不允许推送");return}if(!bt&&!Zt.trim()){me("请选择售前人员");return}V(!1),await ev()},Pm=()=>g.jsx("div",{className:"crm-empty-panel",children:i==="active"?"暂无未签单商机,先新增一条试试。":"暂无已签单商机。"});return g.jsxs("div",{className:"crm-page-stack",children:[g.jsxs("header",{className:"crm-page-header",children:[g.jsx("div",{className:"crm-page-heading",children:g.jsx("h1",{className:"crm-page-title",children:"商机储备"})}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("button",{onClick:()=>{Ce(""),q(!0)},disabled:U,className:Ne("crm-btn-sm crm-btn-secondary flex items-center gap-2 disabled:cursor-not-allowed disabled:opacity-60",n?"active:scale-100":"active:scale-95"),children:[g.jsx(By,{className:"crm-icon-md"}),g.jsx("span",{className:"hidden sm:inline",children:U?"导出中...":"导出"})]}),Qn?g.jsxs("button",{onClick:As,className:Ne("crm-btn-sm crm-btn-primary flex items-center gap-2",n?"active:scale-100":"active:scale-95"),children:[g.jsx(Rw,{className:"crm-icon-md"}),g.jsx("span",{className:"hidden sm:inline",children:"新增商机"})]}):null]})]}),g.jsxs("div",{className:Ne("crm-filter-bar flex",!n&&"backdrop-blur-sm"),children:[g.jsx("button",{onClick:()=>{o("active"),Ce("")},className:`flex-1 rounded-lg py-2 text-sm font-medium transition-colors duration-200 ${i==="active"?"bg-white text-violet-600 shadow-sm dark:bg-slate-800 dark:text-violet-400":"text-slate-600 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white"}`,children:"未签单"}),g.jsx("button",{onClick:()=>{o("archived"),Ce("")},className:`flex-1 rounded-lg py-2 text-sm font-medium transition-colors duration-200 ${i==="archived"?"bg-white text-violet-600 shadow-sm dark:bg-slate-800 dark:text-violet-400":"text-slate-600 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white"}`,children:"已签单"})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsxs("div",{className:"relative group min-w-0 flex-1",children:[g.jsx(Qu,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400 group-focus-within:text-violet-500 transition-colors"}),g.jsx("input",{type:"text",placeholder:"搜索项目名称、最终用户、编码...",value:d,onChange:X=>{h(X.target.value),Ce("")},className:"crm-input-text w-full rounded-xl border border-slate-200 bg-white py-2.5 pl-10 pr-4 text-slate-900 outline-none transition-all focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50 dark:text-white"})]}),g.jsxs("button",{type:"button",onClick:()=>c(!0),className:`relative inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border transition-all ${s!=="全部"?"border-violet-200 bg-violet-50 text-violet-600 shadow-sm dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-300":"border-slate-200 bg-white text-slate-500 hover:bg-slate-50 dark:border-slate-800 dark:bg-slate-900/50 dark:text-slate-400 dark:hover:bg-slate-800"}`,"aria-label":`项目阶段筛选,当前:${iu}`,title:`项目阶段筛选:${iu}`,children:[g.jsx(Lae,{className:"h-5 w-5"}),s!=="全部"?g.jsx("span",{className:"absolute right-2 top-2 h-2 w-2 rounded-full bg-violet-500"}):null]})]}),ze?g.jsx("div",{className:"crm-alert crm-alert-error",children:ze}):null,g.jsxs("div",{className:"crm-list-stack",children:[yo.length>0?yo.map((X,Le)=>{const Re=e!==void 0&&X.ownerUserId===e,Ge=i==="archived"?"实际签约金额":"预计金额",Br=i==="archived"?X.actualSignedAmount:X.amount;return g.jsxs(Xt.div,{initial:n?!1:{opacity:0,y:10},animate:{opacity:1,y:0},transition:n?{duration:0}:{delay:Le*.05},onClick:()=>m(X),className:Ne("crm-card crm-card-pad group relative rounded-2xl transition-shadow transition-colors",Re?"cursor-pointer hover:border-violet-100 hover:shadow-md dark:hover:border-violet-900/50":"cursor-pointer border-slate-100 bg-slate-50/45 hover:border-slate-200 hover:shadow-sm dark:border-slate-800/80 dark:bg-slate-900/35 dark:hover:border-slate-700"),children:[Re?g.jsx("div",{className:"pointer-events-none absolute inset-x-5 top-0 h-1.5 rounded-b-full bg-gradient-to-r from-violet-400/85 via-fuchsia-400/70 to-indigo-400/85 shadow-[0_6px_16px_rgba(124,58,237,0.18)] dark:from-violet-400/70 dark:via-fuchsia-400/55 dark:to-indigo-400/70"}):null,g.jsx("div",{className:"flex items-start gap-3",children:g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("h3",{className:"truncate text-base font-semibold text-slate-900 dark:text-white sm:text-lg",children:X.name||"未命名商机"}),g.jsxs("p",{className:"mt-1 truncate text-xs leading-5 text-slate-500 dark:text-slate-400 sm:text-sm",children:["项目编号:",X.code||"待生成"]}),g.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[g.jsx("span",{className:K5e(X.confidence,ca),children:G1(X.confidence,ca)}),g.jsx("span",{className:"crm-pill crm-pill-neutral",children:X.stage||"初步沟通"}),g.jsx("span",{className:Ne("rounded-full border px-2.5 py-1 text-[11px] font-semibold leading-none",X.pushedToOms?"border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-500/20 dark:bg-emerald-500/10 dark:text-emerald-300":"border-slate-200 bg-slate-50 text-slate-500 dark:border-slate-700 dark:bg-slate-800/60 dark:text-slate-300"),children:X.pushedToOms?"已推送 OMS":"未推送 OMS"})]})]})}),g.jsxs("div",{className:"mt-4 space-y-3 text-xs sm:text-sm",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-slate-600 dark:text-slate-300",children:[g.jsx("span",{className:"shrink-0 text-slate-400 dark:text-slate-500",children:"预计下单时间:"}),g.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-slate-900 dark:text-white",children:X.date||"待定"})]}),g.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-slate-600 dark:text-slate-300",children:[g.jsxs("span",{className:"shrink-0 text-slate-400 dark:text-slate-500",children:[Ge,":"]}),g.jsxs("span",{className:"min-w-0 flex-1 truncate font-medium text-slate-900 dark:text-white",children:["¥",yA(Br)]})]}),g.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-slate-600 dark:text-slate-300",children:[g.jsx("span",{className:"shrink-0 text-slate-400 dark:text-slate-500",children:"项目最新进展:"}),g.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-slate-900 dark:text-white",children:X.latestProgress||"暂无进展"})]}),g.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-slate-600 dark:text-slate-300",children:[g.jsxs("span",{className:"shrink-0 text-slate-400 dark:text-slate-500",children:[xd,":"]}),g.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-slate-900 dark:text-white",children:X.nextPlan||"暂无销售计划"})]}),g.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-slate-600 dark:text-slate-300",children:[g.jsx("span",{className:"shrink-0 text-slate-400 dark:text-slate-500",children:"创建人:"}),g.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-slate-900 dark:text-white",children:X.owner||"无"})]})]})]},X.id)}):Pm(),xo?g.jsx("div",{ref:xt,role:"button",tabIndex:0,onClick:()=>void il(),onKeyDown:X=>{(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),il())},className:"cursor-pointer rounded-lg border border-slate-200 bg-white py-3 text-center text-sm font-medium text-violet-600 shadow-sm dark:border-slate-700 dark:bg-slate-900 dark:text-violet-300",children:"展示更多"}):null]}),g.jsxs(co,{children:[K?g.jsx(rRe,{initialFilters:Rp(H,ar),exporting:U,exportError:ze,archiveTab:i,stageOptions:ar,confidenceOptions:ca,projectLocationOptions:wa,opportunityTypeOptions:gr,operatorOptions:va,onClose:()=>q(!1),onConfirm:X=>void lu(X)}):null,u?g.jsxs(g.Fragment,{children:[g.jsx(Xt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>c(!1),className:"fixed inset-0 z-[90] bg-slate-900/35 backdrop-blur-sm dark:bg-slate-950/70"}),g.jsx(Xt.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:24},className:"fixed inset-x-0 bottom-0 z-[100] px-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))] pt-3 sm:inset-0 sm:flex sm:items-center sm:justify-center sm:p-6",children:g.jsxs("div",{className:"mx-auto w-full max-w-md rounded-3xl border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900",children:[g.jsxs("div",{className:"border-b border-slate-100 px-5 py-4 dark:border-slate-800 sm:px-6",children:[g.jsx("div",{className:"mx-auto mb-3 h-1.5 w-10 rounded-full bg-slate-200 dark:bg-slate-700 sm:hidden"}),g.jsxs("div",{className:"flex items-start justify-between gap-3",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("h3",{className:"text-base font-semibold text-slate-900 dark:text-white",children:"项目阶段筛选"}),g.jsx("p",{className:"mt-1 text-sm leading-6 text-slate-500 dark:text-slate-400",children:"按项目阶段字典筛选商机数据。"})]}),g.jsx("button",{type:"button",onClick:()=>c(!1),className:"rounded-full p-2 text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"h-5 w-5"})})]})]}),g.jsx("div",{className:"px-4 py-4",children:g.jsx("div",{className:"space-y-2",children:eo.map(X=>g.jsxs("button",{type:"button",onClick:()=>{l(X.value),Ce(""),c(!1)},className:`flex w-full items-center justify-between rounded-2xl border px-4 py-3 text-left text-sm font-medium transition-colors ${s===X.value?"border-violet-200 bg-violet-50 text-violet-700 dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-300":"border-slate-200 bg-white text-slate-700 hover:bg-slate-50 dark:border-slate-800 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800"}`,children:[g.jsx("span",{children:X.label}),s===X.value?g.jsx(Fu,{className:"h-4 w-4 shrink-0"}):null]},X.value))})})]})})]}):null]}),g.jsx(co,{children:(M||R)&&g.jsxs(PL,{title:R?"编辑商机":"新增商机",subtitle:R?"支持手机与电脑端修改商机资料,保存后会同步刷新详情与列表。":"支持手机与电脑端填写,提交后会自动刷新商机列表。",onClose:hc,footer:g.jsxs("div",{className:"flex flex-col-reverse gap-3 sm:flex-row sm:justify-end",children:[g.jsx("button",{onClick:hc,className:"crm-btn crm-btn-secondary",children:"取消"}),g.jsx("button",{onClick:()=>void(R?Jd():vc()),disabled:I,className:"crm-btn crm-btn-primary disabled:cursor-not-allowed disabled:opacity-60",children:I?"提交中...":R?"保存修改":"确认新增"})]}),children:[g.jsxs("div",{className:"crm-form-grid",children:[g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["项目地",g.jsx(ai,{})]}),g.jsx(Tt,{value:xe.projectLocation||"",placeholder:"请选择",sheetTitle:"项目地",searchable:!0,searchPlaceholder:"搜索项目地",options:bn,className:ju(!!ut.projectLocation),onChange:X=>Ca("projectLocation",X)}),ut.projectLocation?g.jsx("p",{className:"text-xs text-rose-500",children:ut.projectLocation}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["业绩归属地",g.jsx(ai,{})]}),g.jsx(Tt,{value:xe.projectOwnershipLocation||"",placeholder:"请选择",sheetTitle:"业绩归属地",searchable:!0,searchPlaceholder:"搜索业绩归属地",options:Ta,className:ju(!!ut.projectOwnershipLocation),onChange:X=>Ca("projectOwnershipLocation",X)}),ut.projectOwnershipLocation?g.jsx("p",{className:"text-xs text-rose-500",children:ut.projectOwnershipLocation}):null]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["项目名称",g.jsx(ai,{})]}),g.jsx("input",{value:xe.opportunityName,onChange:X=>Ca("opportunityName",X.target.value),className:ju(!!ut.opportunityName)}),ut.opportunityName?g.jsx("p",{className:"text-xs text-rose-500",children:ut.opportunityName}):null]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["最终用户",g.jsx(ai,{})]}),g.jsx("input",{value:xe.customerName,onChange:X=>Ca("customerName",X.target.value),className:ju(!!ut.customerName)}),ut.customerName?g.jsx("p",{className:"text-xs text-rose-500",children:ut.customerName}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["运作方",g.jsx(ai,{})]}),g.jsx(Tt,{value:xe.operatorName||"",placeholder:"请选择",sheetTitle:"运作方",options:[{value:"",label:"请选择"},...va.map(X=>({value:X.value||"",label:X.label||X.value||"无"}))],className:Ne(ut.operatorName?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:X=>Ca("operatorName",X)}),ut.operatorName?g.jsx("p",{className:"text-xs text-rose-500",children:ut.operatorName}):null]}),Jh?g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["新华三负责人",g.jsx(ai,{})]}),g.jsx(SA,{value:xe.salesExpansionId,options:Zd,placeholder:"请选择新华三负责人",searchPlaceholder:"搜索姓名、工号、办事处、电话",emptyText:"未找到匹配的销售拓展人员",loading:Me,createActionLabel:_a.trim()?`新增负责人“${_a.trim()}”并选中`:"新增负责人并选中",className:Ne(ut.salesExpansionId?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:uu,onQueryChange:_s,onCreate:X=>void go("sales",X)}),g.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500",children:"默认展示前 20 条,输入关键词可继续搜索;未找到负责人时,可直接新增并自动回填。"}),ut.salesExpansionId?g.jsx("p",{className:"text-xs text-rose-500",children:ut.salesExpansionId}):null]}):null,Mm?g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["渠道名称",g.jsx(ai,{})]}),g.jsx(SA,{value:xe.channelExpansionId,options:ks,placeholder:"请选择渠道名称",searchPlaceholder:"搜索渠道名称、编码、省份、联系人",emptyText:"未找到匹配的渠道",loading:de,createActionLabel:Si.trim()?`新增渠道“${Si.trim()}”并选中`:"新增渠道并选中",className:Ne(ut.channelExpansionId?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:sl,onQueryChange:J,onCreate:X=>void go("channel",X)}),g.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500",children:"默认展示前 20 条,输入关键词可继续搜索;未找到渠道时,可直接新增并自动回填。"}),ut.channelExpansionId?g.jsx("p",{className:"text-xs text-rose-500",children:ut.channelExpansionId}):null]}):null,g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["预计金额(元)",g.jsx(ai,{})]}),g.jsx("input",{type:"number",min:"0",value:xe.amount||"",onChange:X=>Ca("amount",Number(X.target.value)||0),className:ju(!!ut.amount)}),ut.amount?g.jsx("p",{className:"text-xs text-rose-500",children:ut.amount}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["预计下单时间",g.jsx(ai,{})]}),g.jsx("input",{type:"date",value:xe.expectedCloseDate,onChange:X=>Ca("expectedCloseDate",X.target.value),className:`${ju(!!ut.expectedCloseDate)} min-w-0`}),ut.expectedCloseDate?g.jsx("p",{className:"text-xs text-rose-500",children:ut.expectedCloseDate}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["项目把握度",g.jsx(ai,{})]}),g.jsx(Tt,{value:bd(xe.confidencePct,ca),placeholder:"请选择",sheetTitle:"项目把握度",options:ca.map(X=>({value:X.value||"",label:X.label||X.value||""})),className:Ne(ut.confidencePct?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:X=>Ca("confidencePct",bd(X,ca))}),ut.confidencePct?g.jsx("p",{className:"text-xs text-rose-500",children:ut.confidencePct}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["项目阶段",g.jsx(ai,{})]}),g.jsx(Tt,{value:xe.stage,placeholder:"请选择",sheetTitle:"项目阶段",options:ar.map(X=>({value:X.value||"",label:X.label||X.value||"无"})),className:Ne(ut.stage?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:X=>Ca("stage",X)}),ut.stage?g.jsx("p",{className:"text-xs text-rose-500",children:ut.stage}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["竞争对手",g.jsx(ai,{})]}),g.jsx(aRe,{value:Mr,options:GQ,placeholder:"请选择竞争对手",className:Ne(ut.competitorName?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:X=>{Da(Le=>{if(!Le.competitorName)return Le;const Re={...Le};return delete Re.competitorName,Re}),Zr(X),X.includes("其他")||la("")}}),ut.competitorName&&!Yd?g.jsx("p",{className:"text-xs text-rose-500",children:ut.competitorName}):null]}),Yd?g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["其他竞争对手",g.jsx(ai,{})]}),g.jsx("input",{value:za,onChange:X=>la(X.target.value),placeholder:"请输入其他竞争对手",className:ju(!!ut.competitorName)}),ut.competitorName?g.jsx("p",{className:"text-xs text-rose-500",children:ut.competitorName}):null]}):null,g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["建设类型",g.jsx(ai,{})]}),g.jsx(Tt,{value:xe.opportunityType,placeholder:"请选择",sheetTitle:"建设类型",options:dc,className:Ne(ut.opportunityType?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":""),onChange:X=>Ca("opportunityType",X)}),ut.opportunityType?g.jsx("p",{className:"text-xs text-rose-500",children:ut.opportunityType}):null]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["项目最新进展",g.jsx(ai,{})]}),g.jsx("textarea",{rows:3,value:xe.latestProgress||"",onChange:X=>Ca("latestProgress",X.target.value),placeholder:"可直接填写项目当前推进情况;日报回写时也会同步更新这里。",className:ju(!!ut.latestProgress)}),ut.latestProgress?g.jsx("p",{className:"text-xs text-rose-500",children:ut.latestProgress}):null,g.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500",children:"新建、编辑商机时可直接维护;日报回写后也会同步更新。"})]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:[xd,g.jsx(ai,{})]}),g.jsx("textarea",{rows:3,value:xe.nextPlan||"",onChange:X=>Ca("nextPlan",X.target.value),placeholder:`可直接填写${xd};日报回写时也会同步更新这里。`,className:ju(!!ut.nextPlan)}),ut.nextPlan?g.jsx("p",{className:"text-xs text-rose-500",children:ut.nextPlan}):null,g.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500",children:"新建、编辑商机时可直接维护;日报回写后也会同步更新。"})]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"备注说明"}),g.jsx("textarea",{rows:4,value:xe.description||"",onChange:X=>Ca("description",X.target.value),className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50"})]})]}),ce?g.jsx("div",{className:"crm-alert crm-alert-error mt-4",children:ce}):null]})}),g.jsx(co,{children:Ba?g.jsxs(PL,{title:Va==="sales"?"新增负责人并回填商机":"新增渠道并回填商机",subtitle:Va==="sales"?"保存成功后会自动选中当前负责人,并回填到商机表单。":"保存成功后会自动选中当前渠道,并回填到商机表单。",onClose:Bi,footer:g.jsxs("div",{className:"flex flex-col-reverse gap-3 sm:flex-row sm:justify-end",children:[g.jsx("button",{onClick:Bi,className:"crm-btn crm-btn-secondary",children:"取消"}),g.jsx("button",{onClick:()=>void du(),disabled:Ze,className:"crm-btn crm-btn-primary disabled:cursor-not-allowed disabled:opacity-60",children:Ze?"提交中...":Va==="sales"?"确认新增负责人并回填":"确认新增渠道并回填"})]}),children:[Va==="sales"?g.jsx(BQ,{form:Ot,fieldErrors:Zn,officeOptions:Vo,industryOptions:Pn,duplicateMessage:zi,requiredMark:g.jsx(ai,{}),onChange:Qd}):g.jsx(VQ,{form:nn,fieldErrors:Rn,invalidContactRows:$a,provinceOptions:Ss,cityOptions:Oi,industryOptions:Pn,certificationLevelOptions:yn,channelAttributeOptions:Wa,internalAttributeOptions:wi,channelOtherOptionValue:Kd,duplicateMessage:Or,requiredMark:g.jsx(ai,{}),onChange:cu,onContactChange:Dm,onAddContact:Lm,onRemoveContact:ll,onProvinceChange:fc}),le?g.jsx("div",{className:"crm-alert crm-alert-error mt-4",children:le}):null]}):null}),g.jsx(co,{children:j&&Ue?g.jsxs(g.Fragment,{children:[g.jsx(Xt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>V(!1),className:"fixed inset-0 z-[90] bg-slate-900/40 backdrop-blur-sm dark:bg-slate-950/70"}),g.jsx(Xt.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:24},className:"fixed inset-x-0 bottom-0 z-[100] px-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))] pt-3 sm:inset-0 sm:flex sm:items-center sm:justify-center sm:p-6",children:g.jsxs("div",{className:"mx-auto w-full max-w-md rounded-3xl border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900",children:[g.jsxs("div",{className:"border-b border-slate-100 px-5 py-4 dark:border-slate-800 sm:px-6",children:[g.jsx("div",{className:"mx-auto mb-3 h-1.5 w-10 rounded-full bg-slate-200 dark:bg-slate-700 sm:hidden"}),g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx("div",{className:"crm-tone-warning mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-2xl",children:g.jsx(EG,{className:"crm-icon-lg"})}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("h3",{className:"text-base font-semibold text-slate-900 dark:text-white",children:"确认推送 OMS"}),g.jsx("p",{className:"mt-1 text-sm leading-6 text-slate-500 dark:text-slate-400",children:"请选择售前后同步到 OMS系统会携带当前商机编码供 OMS 判断。"})]})]})]}),g.jsxs("div",{className:"px-5 py-4 text-sm text-slate-600 dark:text-slate-300 sm:px-6",children:[g.jsxs("div",{className:"crm-form-section",children:[g.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500",children:"当前商机"}),g.jsx("p",{className:"mt-1 font-medium text-slate-900 dark:text-white",children:Ue.name||Ue.code||`#${Ue.id}`})]}),g.jsxs("div",{className:"crm-form-section mt-4",children:[g.jsx("p",{className:"mb-2 text-xs text-slate-400 dark:text-slate-500",children:"售前人员"}),g.jsx(SA,{value:bt,options:Ns,placeholder:_r?"售前人员加载中...":"请选择售前人员",searchPlaceholder:"搜索售前姓名或登录账号",emptyText:_r?"正在加载售前人员...":"未找到匹配的售前人员",onChange:X=>{const Le=Mt.find(Re=>Re.userId===X);Vt(X),nr((Le==null?void 0:Le.userName)||(Le==null?void 0:Le.loginName)||""),me("")}}),g.jsx("p",{className:"mt-2 text-xs text-slate-400 dark:text-slate-500",children:_r?"正在从 OMS 拉取售前人员列表。":"推送前必须选择售前系统会把售前ID和姓名回写到 CRM 商机表。"})]}),ce?g.jsx("div",{className:"crm-alert crm-alert-error mt-4",children:ce}):null]}),g.jsxs("div",{className:"flex flex-col-reverse gap-3 px-5 pb-[calc(1rem+env(safe-area-inset-bottom))] pt-1 sm:flex-row sm:justify-end sm:px-6 sm:pb-5",children:[g.jsx("button",{type:"button",onClick:()=>V(!1),className:"crm-btn crm-btn-secondary min-h-0 rounded-2xl px-4 py-3",children:"取消"}),g.jsx("button",{type:"button",onClick:()=>void Rm(),disabled:G,className:"crm-btn crm-btn-primary min-h-0 rounded-2xl px-4 py-3 disabled:cursor-not-allowed disabled:opacity-60",children:G?"推送中...":"确认推送"})]})]})})]}):null}),g.jsx(co,{children:Ue&&g.jsxs(g.Fragment,{children:[g.jsx(Xt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>m(null),className:`fixed inset-0 z-40 bg-slate-900/20 backdrop-blur-sm transition-opacity dark:bg-slate-900/60 ${zr?"pointer-events-none opacity-30":""}`}),g.jsxs(Xt.div,{initial:{x:"100%",y:0},animate:{x:0,y:0},exit:{x:"100%",y:0},transition:{type:"spring",damping:25,stiffness:200},className:`fixed inset-x-0 bottom-0 z-50 flex h-[90dvh] w-full flex-col overflow-hidden rounded-t-3xl border border-slate-200 bg-white shadow-2xl transition-opacity dark:border-slate-800 dark:bg-slate-900 sm:inset-y-0 sm:right-0 sm:left-auto sm:h-full sm:w-[min(840px,92vw)] sm:max-w-none sm:rounded-none sm:rounded-l-3xl sm:border-l lg:w-[min(960px,90vw)] ${zr?"pointer-events-none opacity-20":""}`,children:[g.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4 dark:border-slate-800 sm:px-6",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"h-1.5 w-10 rounded-full bg-slate-200 sm:hidden dark:bg-slate-700"}),g.jsx("h2",{className:"text-base font-semibold text-slate-900 dark:text-white sm:text-lg",children:"商机详情"})]}),g.jsx("button",{onClick:()=>m(null),className:"rounded-full p-2 text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"crm-icon-lg"})})]}),g.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 py-4 sm:px-6 sm:py-5",children:g.jsxs("div",{className:"crm-modal-stack",children:[g.jsxs("div",{children:[g.jsx("div",{className:"mb-2 flex items-center gap-2",children:g.jsx("span",{className:"text-xs font-medium text-slate-400 dark:text-slate-500",children:Ue.code||`#${Ue.id}`})}),g.jsx("h3",{className:"line-clamp-1 text-lg font-bold leading-tight text-slate-900 dark:text-white sm:break-anywhere sm:line-clamp-none sm:text-xl",children:Ue.name||"未命名商机"}),g.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[g.jsx("span",{className:"crm-pill crm-pill-neutral",children:Ue.stage||"初步沟通"}),g.jsxs("span",{className:`rounded-full px-2.5 py-1 text-xs font-medium ${ei(Ue.confidence)}`,children:["项目把握度 ",G1(Ue.confidence,ca)]})]})]}),g.jsxs("div",{className:"crm-section-stack",children:[g.jsxs("h4",{className:"flex items-center gap-2 text-sm font-semibold text-slate-900 dark:text-white",children:[g.jsx(um,{className:"crm-icon-md text-violet-500"}),"基本信息"]}),w?g.jsx("p",{className:"crm-field-note",children:"正在加载最新商机详情..."}):null,T?g.jsx("div",{className:"crm-alert crm-alert-error",children:T}):null,g.jsxs("div",{className:"crm-detail-grid text-sm md:grid-cols-2",children:[g.jsx(Ma,{label:"项目地",value:Ue.projectLocation||"无"}),g.jsx(Ma,{label:"业绩归属地",value:Ue.projectOwnershipLocationName||Ue.projectOwnershipLocation||"无"}),g.jsx(Ma,{label:"最终用户",value:Ue.client||"无",icon:g.jsx(zO,{className:"h-3 w-3"})}),g.jsx(Ma,{label:"运作方",value:Ue.operatorName||"无"}),yr?g.jsx(Ma,{label:"渠道名称",value:ur,icon:g.jsx(zO,{className:"h-3 w-3"})}):null,Vn?g.jsx(Ma,{label:"新华三负责人",value:Vi,icon:g.jsx(Pw,{className:"h-3 w-3"})}):null,g.jsx(Ma,{label:"售前",value:Ho,icon:g.jsx(Pw,{className:"h-3 w-3"})}),g.jsx(Ma,{label:"预计金额(元)",value:g.jsxs("span",{className:"text-rose-600 dark:text-rose-400",children:["¥",yA(Ue.amount)]}),icon:g.jsx(IA,{className:"h-3 w-3"})}),Ue.archived?g.jsx(Ma,{label:"实际签约金额(元)",value:g.jsxs("span",{className:"text-rose-600 dark:text-rose-400",children:["¥",yA(Ue.actualSignedAmount)]}),icon:g.jsx(IA,{className:"h-3 w-3"})}):null,g.jsx(Ma,{label:"预计下单时间",value:Ue.date||"待定",icon:g.jsx(_G,{className:"h-3 w-3"})}),g.jsx(Ma,{label:"项目把握度",value:G1(Ue.confidence,ca)}),g.jsx(Ma,{label:"项目阶段",value:Ue.stage||"无",icon:g.jsx(SG,{className:"h-3 w-3"})}),g.jsx(Ma,{label:"是否已推送OMS",value:g.jsx("span",{className:Ne("inline-flex rounded-full px-2.5 py-1 text-xs font-semibold",Ue.pushedToOms?"bg-emerald-50 text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-300":"bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-300"),children:Ue.pushedToOms?"已推送":"未推送"})}),Ue.pushedToOms||Ue.archived?g.jsx(Ma,{label:"POC测试项目",value:z5e(Ue.isPoc,Rt),icon:g.jsx(Fu,{className:"h-3 w-3"})}):null,g.jsx(Ma,{label:"竞争对手",value:Ue.competitorName||"无"}),g.jsx(Ma,{label:"建设类型",value:Ue.type||"新建",icon:g.jsx(wne,{className:"h-3 w-3"})}),g.jsx(Ma,{label:"项目最新进展",value:Ue.latestProgress||"暂无进展",className:"md:col-span-2"}),g.jsx(Ma,{label:xd,value:Ue.nextPlan||"暂无销售计划",className:"md:col-span-2"}),g.jsx(Ma,{label:"备注说明",value:Ue.notes||"无",className:"md:col-span-2"})]})]}),g.jsxs("div",{className:"crm-section-stack",children:[g.jsxs("div",{className:"flex rounded-2xl border border-slate-200 bg-slate-50 p-1 dark:border-slate-800 dark:bg-slate-800/40",children:[g.jsx("button",{type:"button",onClick:()=>lr("sales"),className:`flex-1 rounded-xl px-2 py-2 text-xs font-medium transition-colors sm:px-4 sm:text-sm ${Tr==="sales"?"bg-white text-violet-600 shadow-sm dark:bg-slate-900 dark:text-violet-400":"text-slate-500 dark:text-slate-400"}`,children:"销售拓展人员"}),g.jsx("button",{type:"button",onClick:()=>lr("channel"),className:`flex-1 rounded-xl px-2 py-2 text-xs font-medium transition-colors sm:px-4 sm:text-sm ${Tr==="channel"?"bg-white text-violet-600 shadow-sm dark:bg-slate-900 dark:text-violet-400":"text-slate-500 dark:text-slate-400"}`,children:"拓展渠道"}),g.jsx("button",{type:"button",onClick:()=>lr("followups"),className:`flex-1 rounded-xl px-2 py-2 text-xs font-medium transition-colors sm:px-4 sm:text-sm ${Tr==="followups"?"bg-white text-violet-600 shadow-sm dark:bg-slate-900 dark:text-violet-400":"text-slate-500 dark:text-slate-400"}`,children:"跟进记录"})]}),Tr==="sales"?Jr||Vi?g.jsxs("div",{className:"crm-detail-grid text-sm sm:grid-cols-3",children:[g.jsx(Ma,{label:"姓名",value:(Jr==null?void 0:Jr.name)||Vi||"无"}),g.jsx(Ma,{label:"合作意向",value:ou||"无"}),g.jsx(Ma,{label:"是否在职",value:ol===void 0?"待同步":ol?"是":"否"})]}):g.jsx("div",{className:"crm-empty-panel",children:"暂无关联销售拓展人员"}):null,Tr==="channel"?Fa||ur?g.jsxs("div",{className:"crm-detail-grid text-sm sm:grid-cols-3",children:[g.jsx(Ma,{label:"渠道名称",value:(Fa==null?void 0:Fa.name)||ur||"无"}),g.jsx(Ma,{label:"合作意向",value:Go||"无"}),g.jsx(Ma,{label:"建立联系时间",value:Ti||"无"})]}):g.jsx("div",{className:"crm-empty-panel",children:"暂无关联拓展渠道"}):null,Tr==="followups"?g.jsxs("div",{className:"crm-section-stack",children:[g.jsx("p",{className:"crm-field-note",children:"工作台日报里关联到该商机的工作内容,会自动回写到这里。"}),g.jsxs("div",{className:"crm-section-stack",children:[g.jsxs("h4",{className:"flex items-center gap-2 text-sm font-semibold text-slate-900 dark:text-white",children:[g.jsx(kG,{className:"crm-icon-md text-violet-500"}),"交流记录"]}),On.length>0?g.jsx("div",{className:"relative space-y-6 border-l-2 border-slate-100 pl-4 dark:border-slate-800",children:On.map(X=>{var Re;const Le=YQ(X);return g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"absolute -left-[21px] mt-1.5 h-2.5 w-2.5 rounded-full bg-violet-500 ring-4 ring-white dark:ring-slate-900"}),g.jsxs("div",{className:"crm-form-section",children:[g.jsxs("div",{className:"rounded-xl border border-amber-200 bg-amber-50 p-3 text-sm dark:border-amber-500/20 dark:bg-amber-500/10",children:[g.jsx("p",{className:"mb-1 text-xs text-amber-700 dark:text-amber-300",children:"沟通内容"}),g.jsx("p",{className:"whitespace-pre-wrap font-medium leading-6 text-slate-900 dark:text-white",children:Le.communicationContent})]}),(Re=X.attachments)!=null&&Re.length?g.jsx(iRe,{attachments:X.attachments,onPreview:A}):null,g.jsxs("p",{className:"mt-2 text-xs text-slate-400",children:["跟进人: ",X.user||"无",g.jsx("span",{className:"ml-3",children:X.date||"无"})]})]})]},X.id)})}):g.jsx("div",{className:"crm-empty-panel",children:"暂无交流记录"})]})]}):null]})]})}),g.jsx("div",{className:"w-full shrink-0 border-t border-slate-200/80 bg-slate-50/95 backdrop-blur dark:border-slate-800/80 dark:bg-slate-900/90",children:g.jsxs("div",{className:"px-4 pb-[calc(1rem+env(safe-area-inset-bottom))] pt-4 sm:p-4",children:[ce?g.jsx("div",{className:"crm-alert crm-alert-error mb-3",children:ce}):null,Cs?null:g.jsx("p",{className:"mb-3 text-xs text-slate-400 dark:text-slate-500",children:ga?"当前商机已签单,不允许编辑或推送。":"当前商机非本人负责,仅支持查看详情,不能编辑或推送。"}),g.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[g.jsx("button",{type:"button",onClick:fu,disabled:!Cs,title:Cs?"编辑商机":ga?"已签单不可编辑":"仅本人可操作",className:"crm-btn crm-btn-secondary inline-flex h-11 items-center justify-center disabled:cursor-not-allowed disabled:opacity-60",children:Cs?"编辑商机":ga?"已签单不可编辑":"仅本人可操作"}),g.jsx("button",{type:"button",onClick:()=>void Em(),disabled:!su||G,title:su?Ue.pushedToOms?"重新推送 OMS":"推送 OMS":ga?"已签单不可推送":"仅本人可操作",className:Ne("crm-btn inline-flex h-11 items-center justify-center disabled:cursor-not-allowed disabled:opacity-60",su?"crm-btn-primary":"cursor-not-allowed rounded-2xl border border-slate-200 bg-slate-50 text-slate-400 dark:border-slate-800 dark:bg-slate-800/40 dark:text-slate-500"),children:su?G?"推送中...":Ue.pushedToOms?"重新推送 OMS":"推送 OMS":ga?"已签单不可推送":"仅本人可操作"})]})]})})]})]})}),k?g.jsx(sP,{attachment:k,onClose:()=>A(null)}):null]})}function iRe({attachments:t,onPreview:e}){return g.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:t.map(r=>g.jsxs("button",{type:"button",onClick:()=>e(r),className:"inline-flex max-w-full items-center gap-1.5 rounded-xl border border-slate-200 bg-white px-2.5 py-1.5 text-left text-xs text-slate-600 shadow-sm transition-colors hover:border-violet-200 hover:text-violet-600 dark:border-slate-800 dark:bg-slate-900/60 dark:text-slate-300 dark:hover:border-violet-500/30 dark:hover:text-violet-300",title:"预览附件",children:[g.jsx(y_,{className:"h-3.5 w-3.5 shrink-0"}),g.jsx("span",{className:"max-w-[180px] truncate",children:r.name||"附件"}),g.jsx("span",{className:"shrink-0 text-slate-400",children:ux(r.size)})]},r.url))})}function YQ(t){const e=t.content||"",r=s_(e,"项目最新进展"),a=oRe(e),n=lRe(_A(t.latestProgress,r),_A(t.nextAction,a),_A(t.communicationContent,sRe(s_(e,"交流记录"))));return{communicationContent:uRe(n)}}function s_(t,e){var i;const r=t.replace(/\r/g,""),a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=r.match(new RegExp(`${a}([^\\n]+)`));return(i=n==null?void 0:n[1])==null?void 0:i.trim()}function oRe(t){return s_(t,xd)||s_(t,j5e)}function sRe(t){const e=t==null?void 0:t.trim();if(!e||e==="无")return;const r=e.match(/^(\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2})\s+(.+)$/);return r?r[2].trim():e}function _A(...t){return t.find(e=>{const r=e==null?void 0:e.trim();return r&&r!=="无"})}function lRe(t,e,r){const a=[t!=null&&t.trim()?`项目最新进展:${t.trim()}`:"",e!=null&&e.trim()?`${xd}${e.trim()}`:""].filter(Boolean);return a.length>0?a.join(`
`):r==null?void 0:r.trim()}function uRe(t){const e=t==null?void 0:t.trim();return e||"无"}const XQ=6048e5,cRe=864e5,bF=Symbol.for("constructDateFrom");function Bd(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&bF in t?t[bF](e):t instanceof Date?new t.constructor(e):new Date(e)}function nl(t,e){return Bd(e||t,t)}let dRe={};function v2(){return dRe}function Vh(t,e){var s,l,u,c;const r=v2(),a=(e==null?void 0:e.weekStartsOn)??((l=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((c=(u=r.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,n=nl(t,e==null?void 0:e.in),i=n.getDay(),o=(i<a?7:0)+i-a;return n.setDate(n.getDate()-o),n.setHours(0,0,0,0),n}function l_(t,e){return Vh(t,{...e,weekStartsOn:1})}function qQ(t,e){const r=nl(t,e==null?void 0:e.in),a=r.getFullYear(),n=Bd(r,0);n.setFullYear(a+1,0,4),n.setHours(0,0,0,0);const i=l_(n),o=Bd(r,0);o.setFullYear(a,0,4),o.setHours(0,0,0,0);const s=l_(o);return r.getTime()>=i.getTime()?a+1:r.getTime()>=s.getTime()?a:a-1}function wF(t){const e=nl(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}function ZQ(t,...e){const r=Bd.bind(null,t||e.find(a=>typeof a=="object"));return e.map(r)}function SF(t,e){const r=nl(t,e==null?void 0:e.in);return r.setHours(0,0,0,0),r}function fRe(t,e,r){const[a,n]=ZQ(r==null?void 0:r.in,t,e),i=SF(a),o=SF(n),s=+i-wF(i),l=+o-wF(o);return Math.round((s-l)/cRe)}function hRe(t,e){const r=qQ(t,e),a=Bd(t,0);return a.setFullYear(r,0,4),a.setHours(0,0,0,0),l_(a)}function vRe(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function pRe(t){return!(!vRe(t)&&typeof t!="number"||isNaN(+nl(t)))}function mRe(t,e){const r=nl(t,e==null?void 0:e.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const gRe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},yRe=(t,e,r)=>{let a;const n=gRe[t];return typeof n=="string"?a=n:e===1?a=n.one:a=n.other.replace("{{count}}",e.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+a:a+" ago":a};function Pp(t){return(e={})=>{const r=e.width?String(e.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}const xRe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},bRe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wRe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},SRe={date:Pp({formats:xRe,defaultWidth:"full"}),time:Pp({formats:bRe,defaultWidth:"full"}),dateTime:Pp({formats:wRe,defaultWidth:"full"})},_Re={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},TRe=(t,e,r,a)=>_Re[t];function Pl(t){return(e,r)=>{const a=r!=null&&r.context?String(r.context):"standalone";let n;if(a==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=r!=null&&r.width?String(r.width):o;n=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=r!=null&&r.width?String(r.width):t.defaultWidth;n=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return n[i]}}const CRe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},kRe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},NRe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ARe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},MRe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},DRe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},LRe=(t,e)=>{const r=Number(t),a=r%100;if(a>20||a<10)switch(a%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},ERe={ordinalNumber:LRe,era:Pl({values:CRe,defaultWidth:"wide"}),quarter:Pl({values:kRe,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Pl({values:NRe,defaultWidth:"wide"}),day:Pl({values:ARe,defaultWidth:"wide"}),dayPeriod:Pl({values:MRe,defaultWidth:"wide",formattingValues:DRe,defaultFormattingWidth:"wide"})};function Il(t){return(e,r={})=>{const a=r.width,n=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],i=e.match(n);if(!i)return null;const o=i[0],s=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(s)?PRe(s,d=>d.test(o)):RRe(s,d=>d.test(o));let u;u=t.valueCallback?t.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;const c=e.slice(o.length);return{value:u,rest:c}}}function RRe(t,e){for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return r}function PRe(t,e){for(let r=0;r<t.length;r++)if(e(t[r]))return r}function KQ(t){return(e,r={})=>{const a=e.match(t.matchPattern);if(!a)return null;const n=a[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;const s=e.slice(n.length);return{value:o,rest:s}}}const IRe=/^(\d+)(th|st|nd|rd)?/i,jRe=/\d+/i,ORe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},zRe={any:[/^b/i,/^(a|c)/i]},BRe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},VRe={any:[/1/i,/2/i,/3/i,/4/i]},FRe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},GRe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},HRe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},URe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},$Re={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},WRe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},YRe={ordinalNumber:KQ({matchPattern:IRe,parsePattern:jRe,valueCallback:t=>parseInt(t,10)}),era:Il({matchPatterns:ORe,defaultMatchWidth:"wide",parsePatterns:zRe,defaultParseWidth:"any"}),quarter:Il({matchPatterns:BRe,defaultMatchWidth:"wide",parsePatterns:VRe,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Il({matchPatterns:FRe,defaultMatchWidth:"wide",parsePatterns:GRe,defaultParseWidth:"any"}),day:Il({matchPatterns:HRe,defaultMatchWidth:"wide",parsePatterns:URe,defaultParseWidth:"any"}),dayPeriod:Il({matchPatterns:$Re,defaultMatchWidth:"any",parsePatterns:WRe,defaultParseWidth:"any"})},XRe={code:"en-US",formatDistance:yRe,formatLong:SRe,formatRelative:TRe,localize:ERe,match:YRe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function qRe(t,e){const r=nl(t,e==null?void 0:e.in);return fRe(r,mRe(r))+1}function ZRe(t,e){const r=nl(t,e==null?void 0:e.in),a=+l_(r)-+hRe(r);return Math.round(a/XQ)+1}function QQ(t,e){var c,d,h,v;const r=nl(t,e==null?void 0:e.in),a=r.getFullYear(),n=v2(),i=(e==null?void 0:e.firstWeekContainsDate)??((d=(c=e==null?void 0:e.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((v=(h=n.locale)==null?void 0:h.options)==null?void 0:v.firstWeekContainsDate)??1,o=Bd((e==null?void 0:e.in)||t,0);o.setFullYear(a+1,0,i),o.setHours(0,0,0,0);const s=Vh(o,e),l=Bd((e==null?void 0:e.in)||t,0);l.setFullYear(a,0,i),l.setHours(0,0,0,0);const u=Vh(l,e);return+r>=+s?a+1:+r>=+u?a:a-1}function KRe(t,e){var s,l,u,c;const r=v2(),a=(e==null?void 0:e.firstWeekContainsDate)??((l=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((c=(u=r.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,n=QQ(t,e),i=Bd((e==null?void 0:e.in)||t,0);return i.setFullYear(n,0,a),i.setHours(0,0,0,0),Vh(i,e)}function QRe(t,e){const r=nl(t,e==null?void 0:e.in),a=+Vh(r,e)-+KRe(r,e);return Math.round(a/XQ)+1}function Xr(t,e){const r=t<0?"-":"",a=Math.abs(t).toString().padStart(e,"0");return r+a}const Kc={y(t,e){const r=t.getFullYear(),a=r>0?r:1-r;return Xr(e==="yy"?a%100:a,e.length)},M(t,e){const r=t.getMonth();return e==="M"?String(r+1):Xr(r+1,2)},d(t,e){return Xr(t.getDate(),e.length)},a(t,e){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(t,e){return Xr(t.getHours()%12||12,e.length)},H(t,e){return Xr(t.getHours(),e.length)},m(t,e){return Xr(t.getMinutes(),e.length)},s(t,e){return Xr(t.getSeconds(),e.length)},S(t,e){const r=e.length,a=t.getMilliseconds(),n=Math.trunc(a*Math.pow(10,r-3));return Xr(n,e.length)}},tp={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},_F={G:function(t,e,r){const a=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return r.era(a,{width:"abbreviated"});case"GGGGG":return r.era(a,{width:"narrow"});case"GGGG":default:return r.era(a,{width:"wide"})}},y:function(t,e,r){if(e==="yo"){const a=t.getFullYear(),n=a>0?a:1-a;return r.ordinalNumber(n,{unit:"year"})}return Kc.y(t,e)},Y:function(t,e,r,a){const n=QQ(t,a),i=n>0?n:1-n;if(e==="YY"){const o=i%100;return Xr(o,2)}return e==="Yo"?r.ordinalNumber(i,{unit:"year"}):Xr(i,e.length)},R:function(t,e){const r=qQ(t);return Xr(r,e.length)},u:function(t,e){const r=t.getFullYear();return Xr(r,e.length)},Q:function(t,e,r){const a=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(a);case"QQ":return Xr(a,2);case"Qo":return r.ordinalNumber(a,{unit:"quarter"});case"QQQ":return r.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,e,r){const a=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(a);case"qq":return Xr(a,2);case"qo":return r.ordinalNumber(a,{unit:"quarter"});case"qqq":return r.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,e,r){const a=t.getMonth();switch(e){case"M":case"MM":return Kc.M(t,e);case"Mo":return r.ordinalNumber(a+1,{unit:"month"});case"MMM":return r.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(a,{width:"wide",context:"formatting"})}},L:function(t,e,r){const a=t.getMonth();switch(e){case"L":return String(a+1);case"LL":return Xr(a+1,2);case"Lo":return r.ordinalNumber(a+1,{unit:"month"});case"LLL":return r.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(a,{width:"wide",context:"standalone"})}},w:function(t,e,r,a){const n=QRe(t,a);return e==="wo"?r.ordinalNumber(n,{unit:"week"}):Xr(n,e.length)},I:function(t,e,r){const a=ZRe(t);return e==="Io"?r.ordinalNumber(a,{unit:"week"}):Xr(a,e.length)},d:function(t,e,r){return e==="do"?r.ordinalNumber(t.getDate(),{unit:"date"}):Kc.d(t,e)},D:function(t,e,r){const a=qRe(t);return e==="Do"?r.ordinalNumber(a,{unit:"dayOfYear"}):Xr(a,e.length)},E:function(t,e,r){const a=t.getDay();switch(e){case"E":case"EE":case"EEE":return r.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(a,{width:"short",context:"formatting"});case"EEEE":default:return r.day(a,{width:"wide",context:"formatting"})}},e:function(t,e,r,a){const n=t.getDay(),i=(n-a.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return Xr(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(n,{width:"short",context:"formatting"});case"eeee":default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(t,e,r,a){const n=t.getDay(),i=(n-a.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return Xr(i,e.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});case"cccc":default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(t,e,r){const a=t.getDay(),n=a===0?7:a;switch(e){case"i":return String(n);case"ii":return Xr(n,e.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(a,{width:"short",context:"formatting"});case"iiii":default:return r.day(a,{width:"wide",context:"formatting"})}},a:function(t,e,r){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(t,e,r){const a=t.getHours();let n;switch(a===12?n=tp.noon:a===0?n=tp.midnight:n=a/12>=1?"pm":"am",e){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(t,e,r){const a=t.getHours();let n;switch(a>=17?n=tp.evening:a>=12?n=tp.afternoon:a>=4?n=tp.morning:n=tp.night,e){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(t,e,r){if(e==="ho"){let a=t.getHours()%12;return a===0&&(a=12),r.ordinalNumber(a,{unit:"hour"})}return Kc.h(t,e)},H:function(t,e,r){return e==="Ho"?r.ordinalNumber(t.getHours(),{unit:"hour"}):Kc.H(t,e)},K:function(t,e,r){const a=t.getHours()%12;return e==="Ko"?r.ordinalNumber(a,{unit:"hour"}):Xr(a,e.length)},k:function(t,e,r){let a=t.getHours();return a===0&&(a=24),e==="ko"?r.ordinalNumber(a,{unit:"hour"}):Xr(a,e.length)},m:function(t,e,r){return e==="mo"?r.ordinalNumber(t.getMinutes(),{unit:"minute"}):Kc.m(t,e)},s:function(t,e,r){return e==="so"?r.ordinalNumber(t.getSeconds(),{unit:"second"}):Kc.s(t,e)},S:function(t,e){return Kc.S(t,e)},X:function(t,e,r){const a=t.getTimezoneOffset();if(a===0)return"Z";switch(e){case"X":return CF(a);case"XXXX":case"XX":return Kf(a);case"XXXXX":case"XXX":default:return Kf(a,":")}},x:function(t,e,r){const a=t.getTimezoneOffset();switch(e){case"x":return CF(a);case"xxxx":case"xx":return Kf(a);case"xxxxx":case"xxx":default:return Kf(a,":")}},O:function(t,e,r){const a=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+TF(a,":");case"OOOO":default:return"GMT"+Kf(a,":")}},z:function(t,e,r){const a=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+TF(a,":");case"zzzz":default:return"GMT"+Kf(a,":")}},t:function(t,e,r){const a=Math.trunc(+t/1e3);return Xr(a,e.length)},T:function(t,e,r){return Xr(+t,e.length)}};function TF(t,e=""){const r=t>0?"-":"+",a=Math.abs(t),n=Math.trunc(a/60),i=a%60;return i===0?r+String(n):r+String(n)+e+Xr(i,2)}function CF(t,e){return t%60===0?(t>0?"-":"+")+Xr(Math.abs(t)/60,2):Kf(t,e)}function Kf(t,e=""){const r=t>0?"-":"+",a=Math.abs(t),n=Xr(Math.trunc(a/60),2),i=Xr(a%60,2);return r+n+e+i}const kF=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},JQ=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},JRe=(t,e)=>{const r=t.match(/(P+)(p+)?/)||[],a=r[1],n=r[2];if(!n)return kF(t,e);let i;switch(a){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",kF(a,e)).replace("{{time}}",JQ(n,e))},ePe={p:JQ,P:JRe},tPe=/^D+$/,rPe=/^Y+$/,aPe=["D","DD","YY","YYYY"];function nPe(t){return tPe.test(t)}function iPe(t){return rPe.test(t)}function oPe(t,e,r){const a=sPe(t,e,r);if(console.warn(a),aPe.includes(t))throw new RangeError(a)}function sPe(t,e,r){const a=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${a} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const lPe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uPe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cPe=/^'([^]*?)'?$/,dPe=/''/g,fPe=/[a-zA-Z]/;function fP(t,e,r){var c,d,h,v,m,x,b,w;const a=v2(),n=(r==null?void 0:r.locale)??a.locale??XRe,i=(r==null?void 0:r.firstWeekContainsDate)??((d=(c=r==null?void 0:r.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??a.firstWeekContainsDate??((v=(h=a.locale)==null?void 0:h.options)==null?void 0:v.firstWeekContainsDate)??1,o=(r==null?void 0:r.weekStartsOn)??((x=(m=r==null?void 0:r.locale)==null?void 0:m.options)==null?void 0:x.weekStartsOn)??a.weekStartsOn??((w=(b=a.locale)==null?void 0:b.options)==null?void 0:w.weekStartsOn)??0,s=nl(t,r==null?void 0:r.in);if(!pRe(s))throw new RangeError("Invalid time value");let l=e.match(uPe).map(_=>{const T=_[0];if(T==="p"||T==="P"){const C=ePe[T];return C(_,n.formatLong)}return _}).join("").match(lPe).map(_=>{if(_==="''")return{isToken:!1,value:"'"};const T=_[0];if(T==="'")return{isToken:!1,value:hPe(_)};if(_F[T])return{isToken:!0,value:_};if(T.match(fPe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:_}});n.localize.preprocessor&&(l=n.localize.preprocessor(s,l));const u={firstWeekContainsDate:i,weekStartsOn:o,locale:n};return l.map(_=>{if(!_.isToken)return _.value;const T=_.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&iPe(T)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&nPe(T))&&oPe(T,e,String(t));const C=_F[T[0]];return C(s,T,n.localize,u)}).join("")}function hPe(t){const e=t.match(cPe);return e?e[1].replace(dPe,"'"):t}function vPe(t,e,r){const[a,n]=ZQ(r==null?void 0:r.in,t,e);return+Vh(a,r)==+Vh(n,r)}const pPe={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},mPe=(t,e,r)=>{let a;const n=pPe[t];return typeof n=="string"?a=n:e===1?a=n.one:a=n.other.replace("{{count}}",String(e)),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?a+"内":a+"前":a},gPe={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},yPe={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},xPe={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},bPe={date:Pp({formats:gPe,defaultWidth:"full"}),time:Pp({formats:yPe,defaultWidth:"full"}),dateTime:Pp({formats:xPe,defaultWidth:"full"})};function NF(t,e,r){const a="eeee p";return vPe(t,e,r)?a:t.getTime()>e.getTime()?"'下个'"+a:"'上个'"+a}const wPe={lastWeek:NF,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:NF,other:"PP p"},SPe=(t,e,r,a)=>{const n=wPe[t];return typeof n=="function"?n(e,r,a):n},_Pe={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},TPe={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},CPe={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},kPe={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},NPe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},APe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},MPe=(t,e)=>{const r=Number(t);switch(e==null?void 0:e.unit){case"date":return r.toString()+"日";case"hour":return r.toString()+"时";case"minute":return r.toString()+"分";case"second":return r.toString()+"秒";default:return"第 "+r.toString()}},DPe={ordinalNumber:MPe,era:Pl({values:_Pe,defaultWidth:"wide"}),quarter:Pl({values:TPe,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Pl({values:CPe,defaultWidth:"wide"}),day:Pl({values:kPe,defaultWidth:"wide"}),dayPeriod:Pl({values:NPe,defaultWidth:"wide",formattingValues:APe,defaultFormattingWidth:"wide"})},LPe=/^(第\s*)?\d+(日|时|分|秒)?/i,EPe=/\d+/i,RPe={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},PPe={any:[/^(前)/i,/^(公元)/i]},IPe={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},jPe={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},OPe={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},zPe={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},BPe={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},VPe={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},FPe={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},GPe={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},HPe={ordinalNumber:KQ({matchPattern:LPe,parsePattern:EPe,valueCallback:t=>parseInt(t,10)}),era:Il({matchPatterns:RPe,defaultMatchWidth:"wide",parsePatterns:PPe,defaultParseWidth:"any"}),quarter:Il({matchPatterns:IPe,defaultMatchWidth:"wide",parsePatterns:jPe,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Il({matchPatterns:OPe,defaultMatchWidth:"wide",parsePatterns:zPe,defaultParseWidth:"any"}),day:Il({matchPatterns:BPe,defaultMatchWidth:"wide",parsePatterns:VPe,defaultParseWidth:"any"}),dayPeriod:Il({matchPatterns:FPe,defaultMatchWidth:"any",parsePatterns:GPe,defaultParseWidth:"any"})},eJ={code:"zh-CN",formatDistance:mPe,formatLong:bPe,formatRelative:SPe,localize:DPe,match:HPe,options:{weekStartsOn:1,firstWeekContainsDate:4}};function p2({alt:t,className:e,src:r,...a}){const[n,i]=E.useState(),[o,s]=E.useState(!1);return E.useEffect(()=>{let l=!0,u;return i(void 0),s(!1),(async()=>{try{const c=await YU(r);if(!c.ok)throw new Error(`图片加载失败(${c.status})`);const d=await c.blob();if(u=URL.createObjectURL(d),!l){URL.revokeObjectURL(u);return}i(u)}catch{l&&s(!0)}})(),()=>{l=!1,u&&URL.revokeObjectURL(u)}},[r]),o?g.jsx("div",{"aria-label":t,className:Ne(e,"flex items-center justify-center bg-slate-100 text-xs text-slate-400 dark:bg-slate-800 dark:text-slate-500"),role:"img",children:"加载失败"}):n?g.jsx("img",{...a,alt:t,className:e,src:n}):g.jsx("div",{"aria-label":t,className:Ne(e,"animate-pulse bg-slate-100 dark:bg-slate-800")})}const UPe="LJYBZ-HCQCV-N37PU-5FIOX-QFA26-FPB6U",$Pe="unis-crm-work",AF="tencent-geolocation-sdk",WPe="https://mapapi.qq.com/web/lbs/h5-components/geolocation/geolocation.min.js",MF=6378245,DF=.006693421622965943;let i0=null;async function YPe(){return ZPe()}async function XPe(){return qPe()}async function qPe(){const t=await KPe();try{const r=await LF(t,{timeout:12e3,highAccuracy:!0,maximumAge:0});if(r.type!=="ip")return EF(r)}catch{}const e=await LF(t,{timeout:15e3,highAccuracy:!1,maximumAge:3e5});return EF(e)}async function ZPe(){const t=await eIe({enableHighAccuracy:!0,timeout:18e3,maximumAge:0},{targetAccuracy:25,totalTimeout:15e3,maxSamples:6}).catch(async e=>{try{return await JPe({enableHighAccuracy:!1,timeout:18e3,maximumAge:3e4})}catch{throw e}});return{latitude:Number(t.coords.latitude.toFixed(6)),longitude:Number(t.coords.longitude.toFixed(6)),address:"",accuracy:t.coords.accuracy,sourceType:"browser"}}function KPe(){var t,e;return(e=(t=window.LBS)==null?void 0:t.WebComponent)!=null&&e.Geolocation?Promise.resolve(window.LBS.WebComponent.Geolocation):i0||(tJ(),i0=new Promise((r,a)=>{var s,l;const n=()=>{var c,d;const u=(d=(c=window.LBS)==null?void 0:c.WebComponent)==null?void 0:d.Geolocation;if(!u){a(new Error("腾讯地图定位组件加载失败,请刷新页面重试。"));return}r(u)},i=document.getElementById(AF);if(i){if((l=(s=window.LBS)==null?void 0:s.WebComponent)!=null&&l.Geolocation){n();return}i.addEventListener("load",n,{once:!0}),i.addEventListener("error",()=>a(new Error("腾讯地图定位组件加载失败,请检查网络后重试。")),{once:!0});return}const o=document.createElement("script");o.id=AF,o.src=WPe,o.async=!0,o.defer=!0,o.onload=n,o.onerror=()=>a(new Error("腾讯地图定位组件加载失败,请检查网络后重试。")),document.head.appendChild(o)}).catch(r=>{throw i0=null,r}),i0)}function LF(t,e){const r=new t({key:tJ(),referer:$Pe});return new Promise((a,n)=>{r.getLocation(i=>a(i),i=>n(new Error(tIe(i))),e)})}function tJ(){const t=UPe.trim();if(!t)throw new Error("未配置腾讯地图 Key无法完成定位。");return t}function EF(t){const e=aJ(t.lat,t.lng);return{latitude:Number(e.latitude.toFixed(6)),longitude:Number(e.longitude.toFixed(6)),address:QPe(t),accuracy:t.accuracy,sourceType:"tencent"}}function QPe(t){return[RF(t.addr),[t.province,t.city,t.district].map(RF).filter(Boolean).join("")].find(Boolean)||""}function JPe(t){if(!("geolocation"in navigator))throw new Error("当前浏览器不支持定位,请更换浏览器后重试。");return new Promise((e,r)=>{navigator.geolocation.getCurrentPosition(a=>e(a),a=>r(new Error(rJ(a))),t)})}function eIe(t,e){if(!("geolocation"in navigator))throw new Error("当前浏览器不支持定位,请更换浏览器后重试。");const r=e.targetAccuracy,a=e.totalTimeout,n=e.maxSamples;return new Promise((i,o)=>{let s=!1,l=0,u=null,c=null;const d=m=>{if(!s){if(s=!0,clearTimeout(h),navigator.geolocation.clearWatch(v),m){i(m);return}if(u){i(u);return}o(new Error(rJ(c)))}},h=window.setTimeout(()=>d(),a),v=navigator.geolocation.watchPosition(m=>{l+=1,(!u||m.coords.accuracy<u.coords.accuracy)&&(u=m),(m.coords.accuracy<=r||l>=n)&&d(u??m)},m=>{c=m,u||d()},t)})}function RF(t){return(t==null?void 0:t.trim())||""}function tIe(t){var e;switch(t.status){case 10101:case 10302:case 10305:return"定位权限被拒绝,请在手机浏览器里允许位置权限后再重试。";case 10103:case 10002:case 10402:case 10502:return"腾讯地图定位超时,请重试。";case 10104:return"当前浏览器不支持腾讯地图定位,请更换浏览器后重试。";case 10001:return"当前位置暂时不可用,请移动到开阔区域后重试。";case 10601:case 10602:return"腾讯地图地址解析失败,请稍后重试。";default:return((e=t.message)==null?void 0:e.trim())||"腾讯地图定位失败,请稍后重试。"}}function rJ(t){var e;if(!t)return"定位失败,请稍后重试。";switch(t.code){case t.PERMISSION_DENIED:return"定位权限被拒绝,请在手机浏览器里允许位置权限后再重试。";case t.POSITION_UNAVAILABLE:return"当前位置暂时不可用,请移动到开阔区域后重试。";case t.TIMEOUT:return"定位超时,请重试。";default:return((e=t.message)==null?void 0:e.trim())||"定位失败,请稍后重试。"}}function IL(t,e){if(nJ(t,e))return{latitude:t,longitude:e};let r=rIe(e-105,t-35),a=aIe(e-105,t-35);const n=t/180*Math.PI;let i=Math.sin(n);i=1-DF*i*i;const o=Math.sqrt(i);return r=r*180/(MF*(1-DF)/(i*o)*Math.PI),a=a*180/(MF/o*Math.cos(n)*Math.PI),{latitude:t+r,longitude:e+a}}function aJ(t,e){if(nJ(t,e))return{latitude:t,longitude:e};const r=IL(t,e);return{latitude:t*2-r.latitude,longitude:e*2-r.longitude}}function nJ(t,e){return e<72.004||e>137.8347||t<.8293||t>55.8271}function rIe(t,e){let r=-100+2*t+3*e+.2*e*e+.1*t*e+.2*Math.sqrt(Math.abs(t));return r+=(20*Math.sin(6*t*Math.PI)+20*Math.sin(2*t*Math.PI))*2/3,r+=(20*Math.sin(e*Math.PI)+40*Math.sin(e/3*Math.PI))*2/3,r+=(160*Math.sin(e/12*Math.PI)+320*Math.sin(e*Math.PI/30))*2/3,r}function aIe(t,e){let r=300+t+2*e+.1*t*t+.1*t*e+.1*Math.sqrt(Math.abs(t));return r+=(20*Math.sin(6*t*Math.PI)+20*Math.sin(2*t*Math.PI))*2/3,r+=(20*Math.sin(t*Math.PI)+40*Math.sin(t/3*Math.PI))*2/3,r+=(150*Math.sin(t/12*Math.PI)+300*Math.sin(t/30*Math.PI))*2/3,r}const nIe="LJYBZ-HCQCV-N37PU-5FIOX-QFA26-FPB6U",PF="tencent-map-gl-sdk";let o0=null;async function iIe(){if(window.TMap)return window.TMap;if(o0)return o0;const t=nIe.trim();if(!t)throw new Error("未配置腾讯地图 Key无法展示地图。");return o0=new Promise((e,r)=>{const a=()=>{if(!window.TMap){r(new Error("腾讯地图组件加载失败,请刷新页面后重试。"));return}e(window.TMap)},n=document.getElementById(PF);if(n){if(window.TMap){a();return}n.addEventListener("load",a,{once:!0}),n.addEventListener("error",()=>r(new Error("腾讯地图组件加载失败,请检查网络后重试。")),{once:!0});return}const i=document.createElement("script");i.id=PF,i.src=`https://map.qq.com/api/gljs?v=1.exp&key=${encodeURIComponent(t)}`,i.async=!0,i.defer=!0,i.onload=a,i.onerror=()=>r(new Error("腾讯地图组件加载失败,请检查网络后重试。")),document.head.appendChild(i)}).catch(e=>{throw o0=null,e}),o0}const oIe="wecom-jssdk-script",sIe="wecom-jxwork-script",lIe="https://res.wx.qq.com/open/js/jweixin-1.2.0.js",uIe="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js";let U1=null,TA="",s0=null;function cIe(){return"".trim().toLowerCase()==="true"}function iJ(){return typeof navigator>"u"?!1:/wxwork/i.test(navigator.userAgent)}async function dIe(t=zce){if(!iJ())throw new Error("当前不是企业微信内置浏览器,无法调用企业微信定位。");const e=window.location.href.split("#")[0],r=await hIe();return await fIe(r,e,t),new Promise((a,n)=>{r.getLocation({type:"wgs84",success:i=>{const o=typeof i.latitude=="number"?Number(i.latitude.toFixed(6)):NaN,s=typeof i.longitude=="number"?Number(i.longitude.toFixed(6)):NaN;if(!Number.isFinite(o)||!Number.isFinite(s)){n(new Error("企业微信返回的定位结果无效,请重试。"));return}a({latitude:o,longitude:s,address:"",accuracy:typeof i.accuracy=="number"?i.accuracy:void 0,sourceType:"wecom"})},cancel:()=>n(new Error("企业微信定位已取消,请允许定位权限后重试。")),fail:i=>n(new Error(oJ(i==null?void 0:i.errMsg)))})})}async function fIe(t,e,r){if(TA!==e&&!(s0&&(await s0,TA===e))){s0=(async()=>{const a=await r(e);await new Promise((n,i)=>{let o=!1;const s=l=>{o||(o=!0,l())};t.ready(()=>s(()=>n())),t.error(l=>s(()=>i(new Error(oJ(l==null?void 0:l.errMsg))))),t.config({beta:!0,debug:!1,appId:a.corpId,timestamp:a.timestamp,nonceStr:a.nonceStr,signature:a.signature,jsApiList:["getLocation"]})}),TA=e})();try{await s0}finally{s0=null}}}async function hIe(){return window.wx?window.wx:(U1||(U1=(async()=>{if(await IF(oIe,lIe),await IF(sIe,uIe),!window.wx)throw new Error("企业微信 JS-SDK 加载失败,请检查企业微信内网访问后重试。");return window.wx})().catch(t=>{throw U1=null,t})),U1)}function IF(t,e){return new Promise((r,a)=>{const n=document.getElementById(t);if(n){if(n.dataset.loaded==="true"){r();return}n.addEventListener("load",()=>r(),{once:!0}),n.addEventListener("error",()=>a(new Error("企业微信 JS-SDK 脚本加载失败。")),{once:!0});return}const i=document.createElement("script");i.id=t,i.src=e,i.async=!0,i.defer=!0,i.onload=()=>{i.dataset.loaded="true",r()},i.onerror=()=>a(new Error("企业微信 JS-SDK 脚本加载失败。")),document.head.appendChild(i)})}function oJ(t){const e=(t||"").trim();return e?e.includes("permission")||e.includes("denied")?"企业微信定位权限被拒绝,请在手机系统和企业微信中允许定位权限后重试。":e.includes("cancel")?"企业微信定位已取消,请允许定位权限后重试。":e.includes("config:fail")||e.includes("signature")?"企业微信 JS-SDK 鉴权失败,请检查可信域名和签名配置。":e.includes("function not exist")?"当前企业微信版本过低,不支持定位接口,请升级后重试。":`企业微信定位失败:${e}`:"企业微信定位失败,请稍后重试。"}const Xs="后续规划",Zu="下一步销售计划",u_="项目阶段",jF="后续规划 / 下一步销售计划",OF=500*1024*1024,zF=1e3,vIe={sales:["沟通内容",Xs],channel:["沟通内容",Xs],opportunity:["项目最新进展",Zu]},pIe=["深信服","锐捷","华为","中兴","噢易云","无","其他"],sJ=[{key:"checkin",label:"打卡",title:"外勤打卡",description:"定位、拍照并提交现场记录",path:"/work/checkin",accent:"bg-emerald-500",icon:KL},{key:"report",label:"日报",title:"日报",description:"记录跟进内容与明日计划",path:"/work/report",accent:"bg-violet-600",icon:AG}],BF={locationText:"",remark:"",photoUrls:[]},mIe={workContent:"",lineItems:[],planItems:[],tomorrowPlan:"",sourceType:"manual"},jL=120,rh=80,c_="work:location-display-cache",gIe=4320*60*1e3,$1=new Map;function OL(t){var a,n;if(!t)return"";const e=((a=t.name)==null?void 0:a.trim())||`人员拓展#${t.id}`,r=((n=t.phone)==null?void 0:n.trim())||"";return r?`${e}${r}`:e}const W1={opportunityName:"",customerName:"",projectLocation:"",projectOwnershipLocation:"",operatorName:"",amount:0,expectedCloseDate:"",confidencePct:"C",stage:"",opportunityType:"",productType:"VDI云桌面",source:"主动开发",salesExpansionId:void 0,channelExpansionId:void 0,competitorName:"",description:""},yIe=[{value:"A",label:"A"},{value:"B",label:"B"},{value:"C",label:"C"}],VF=[{value:"新建",label:"新建"},{value:"扩容",label:"扩容"},{value:"替换",label:"替换"}];function lJ(t=new Date){const e=new Intl.DateTimeFormat("en-CA",{timeZone:"Asia/Shanghai",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",hourCycle:"h23"}).formatToParts(t),r=Object.fromEntries(e.map(n=>[n.type,n.value])),a=new Date(Date.UTC(Number(r.year),Number(r.month)-1,Number(r.day)));return Number(r.hour)<10&&a.setUTCDate(a.getUTCDate()-1),[a.getUTCFullYear(),String(a.getUTCMonth()+1).padStart(2,"0"),String(a.getUTCDate()).padStart(2,"0")].join("-")}function fh(){return{workDate:lJ(),bizType:"sales",bizId:"",bizName:"",editorText:"",content:"",visitStartTime:"",evaluationContent:"",nextPlan:"",latestProgress:"",stage:"",communicationTime:"",communicationContent:"",toUsers:[]}}function xIe(t,e,r,a){const n=dx(e).trim();return{...fh(),workDate:t,editorText:Py(n,a),content:n,attachments:r??[],toUsers:Nh(a)}}function CA(){return{content:""}}function bIe(t){return(t||"").trim().toLowerCase().replace(/\s+/g,"").replace(//g,"+")}function wIe(t,e){const r=e.find(o=>(o.value||"")===(t||"")),a=[r==null?void 0:r.label,r==null?void 0:r.value,t].filter(Boolean).map(o=>bIe(o));if(!a.length||a.every(o=>!o))return"none";const n=a.some(o=>o.includes("新华三")||o.includes("h3c")),i=a.some(o=>o.includes("渠道")||o.includes("channel"));return n&&i?"both":n?"h3c":i?"channel":"none"}function zL(t){return t.length>0?t:[...yIe]}function FF(t,e){const r=typeof t=="string"?t.trim():"",a=zL(e);if(!r)return"";const n=a.find(o=>(o.value||"").trim()===r);if(n!=null&&n.value)return n.value;const i=a.find(o=>(o.label||"").trim()===r);return i!=null&&i.value?i.value:r}function uJ(t){const e=Array.from(new Set(t));return e.includes("无")?["无"]:e}function SIe(t,e){const r=uJ(t);if(!r.length)return;if(r.includes("无"))return"无";const a=r.filter(i=>i!=="其他").map(i=>i.trim());if(r.includes("其他")){const i=e==null?void 0:e.trim();i&&a.push(i)}const n=Array.from(new Set(a.filter(Boolean)));return n.length?n.join("、"):void 0}function so(t){return Ne("crm-input-box crm-input-text w-full border bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:bg-slate-900/50",t?"border-rose-400 bg-rose-50/60 focus:border-rose-500 focus:ring-rose-500 dark:border-rose-500/70 dark:bg-rose-500/10":"border-slate-200 dark:border-slate-800")}function Di(){return g.jsx("span",{className:"ml-1 text-rose-500",children:"*"})}function _Ie(t,e,r,a){var i,o,s,l,u,c,d,h,v;const n={};return(i=t.projectLocation)!=null&&i.trim()||(n.projectLocation="请选择项目地"),(o=t.projectOwnershipLocation)!=null&&o.trim()||(n.projectOwnershipLocation="请选择业绩归属地"),(s=t.opportunityName)!=null&&s.trim()||(n.opportunityName="请填写项目名称"),(l=t.customerName)!=null&&l.trim()||(n.customerName="请填写最终用户"),(u=t.operatorName)!=null&&u.trim()||(n.operatorName="请选择运作方"),(!t.amount||t.amount<=0)&&(n.amount="请填写预计金额"),(c=t.expectedCloseDate)!=null&&c.trim()||(n.expectedCloseDate="请选择预计下单时间"),(d=t.confidencePct)!=null&&d.trim()||(n.confidencePct="请选择项目把握度"),(h=t.stage)!=null&&h.trim()||(n.stage="请选择项目阶段"),(v=t.opportunityType)!=null&&v.trim()||(n.opportunityType="请选择建设类型"),r.length===0?n.competitorName="请至少选择一个竞争对手":r.includes("其他")&&!a.trim()&&(n.competitorName="已选择“其他”,请填写其他竞争对手"),e==="h3c"&&!t.salesExpansionId&&(n.salesExpansionId="请选择新华三负责人"),e==="channel"&&!t.channelExpansionId&&(n.channelExpansionId="请选择渠道名称"),e==="both"&&!t.salesExpansionId&&(n.salesExpansionId="请选择新华三负责人"),e==="both"&&!t.channelExpansionId&&(n.channelExpansionId="请选择渠道名称"),n}function TIe(t,e,r,a){return{...t,salesExpansionId:e==="h3c"||e==="both"?t.salesExpansionId:void 0,channelExpansionId:e==="channel"||e==="both"?t.channelExpansionId:void 0,competitorName:SIe(r,a)}}async function CIe(t){const e=await f2(()=>import("./exceljs.min-_FHOiBEn.js").then(o=>o.e),[]),r=new e.Workbook,a=r.addWorksheet("打卡记录"),n=["序号","打卡日期","打卡时间","打卡人","所属部门","关联类型","关联对象","打卡地点","现场照片","备注","打卡状态"];a.addRow(n),t.forEach((o,s)=>{var l;a.addRow([s+1,kr(o.checkinDate),kr(o.checkinTime),kr(o.userName),kr(o.deptName),pP(o.bizType),kr(o.bizName),kr(o.locationText),((l=o.photoUrls)==null?void 0:l.map(kr).filter(Boolean).join(`
`))||"",kr(o.remark),DIe(o.status)])}),Dw(a,n,["现场照片","备注","打卡地点"]);const i=await r.xlsx.writeBuffer();await fJ(`打卡记录_${dJ()}.xlsx`,i)}async function kIe(t){const e=await f2(()=>import("./exceljs.min-_FHOiBEn.js").then(c=>c.e),[]),r=new e.Workbook,a=r.addWorksheet("日报汇总"),n=r.addWorksheet("日报明细"),i=r.addWorksheet("附件清单"),o=["序号","日报日期","提交时间","提交人","所属部门","今日工作内容","明日工作计划","今日工作条数","明日计划条数","日报附件"],s=["序号","日报日期","提交时间","提交人","明细序号","工作日期","跟进对象类型","跟进对象名称","工作内容/项目进展",jF,"本条附件"],l=["序号","日报日期","提交时间","提交人","所属部门","附件来源","明细序号","跟进对象类型","跟进对象名称","附件名称","附件链接"];a.addRow(o),n.addRow(s),i.addRow(l),t.forEach((c,d)=>{var m,x,b;const h=a.addRow([d+1,kr(c.reportDate),kr(c.submitTime),kr(c.userName),kr(c.deptName),cJ(c.workContent),kr(c.tomorrowPlan),((m=c.lineItems)==null?void 0:m.length)??0,((x=c.planItems)==null?void 0:x.length)??0,""]);GF(h.getCell(o.length),c.attachments),HF(i,c,c.attachments,"日报附件"),((b=c.lineItems)!=null&&b.length?c.lineItems:[void 0]).forEach((w,_)=>{const T=n.addRow([n.rowCount,kr(c.reportDate),kr(c.submitTime),kr(c.userName),_+1,kr(w==null?void 0:w.workDate),pP(w==null?void 0:w.bizType),kr(w==null?void 0:w.bizName),AIe(w),xje(w),""]);GF(T.getCell(s.length),w==null?void 0:w.attachments),HF(i,c,w==null?void 0:w.attachments,"记录附件",_,w)})}),Dw(a,o,["今日工作内容","明日工作计划","日报附件"]),Dw(n,s,["工作内容/项目进展",jF,"本条附件"]),Dw(i,l,["附件链接"]);const u=await r.xlsx.writeBuffer();await fJ(`日报_${dJ()}.xlsx`,u)}function NIe(t){return t?t==="reviewed"||t==="已点评"?"已点评":"已提交":"待提交"}function kr(t){if(t==null)return"";const e=String(t).replace(/\r\n/g,`
`).trim();return!e||e==="无"?"":e}function cJ(t){return kr(t).replace(/[;]?\s*附件:\s*\d+\s*个/g,"").trim()}function AIe(t){return cJ((t==null?void 0:t.latestProgress)||Sd(t==null?void 0:t.content,"项目最新进展")||(t==null?void 0:t.evaluationContent)||Sd(t==null?void 0:t.content,"沟通内容")||(t==null?void 0:t.editorText)||(t==null?void 0:t.content))}function hP(t,e){return kr(t.name)||`附件${e+1}`}function vP(t){const e=kr(t.url);if(!e||typeof window>"u")return e;try{return new URL(e,window.location.origin).href}catch{return e}}function MIe(t){return(t??[]).map((e,r)=>{const a=hP(e,r),n=vP(e);return n?`${a}${n}`:a}).filter(Boolean).join(`
`)}function GF(t,e){const r=(e==null?void 0:e.filter(a=>kr(a.url)))??[];if(!r.length){t.value="";return}if(r.length===1){const[a]=r,n=hP(a,0),i=vP(a);t.value=i?{text:n,hyperlink:i}:n,t.font=i?{color:{argb:"FF2563EB"},underline:!0}:void 0;return}t.value=MIe(r)}function HF(t,e,r,a="日报附件",n,i){((r==null?void 0:r.filter(s=>kr(s.url)))??[]).forEach((s,l)=>{const u=hP(s,l),c=vP(s),h=t.addRow([t.rowCount,kr(e.reportDate),kr(e.submitTime),kr(e.userName),kr(e.deptName),a,n===void 0?"":n+1,i?pP(i.bizType):"",kr(i==null?void 0:i.bizName),u,""]).getCell(11);h.value=c?{text:c,hyperlink:c}:"",c&&(h.font={color:{argb:"FF2563EB"},underline:!0})})}function pP(t){return t==="sales"?"销售人员拓展":t==="channel"?"渠道拓展":t==="opportunity"?"商机":kr(t)}function DIe(t){return t==="normal"?"正常":t==="abnormal"?"异常":t==="reissue"?"补卡":t==="updated"?"已更新":kr(t)}function dJ(t=new Date){const e=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),n=String(t.getHours()).padStart(2,"0"),i=String(t.getMinutes()).padStart(2,"0");return`${e}${r}${a}_${n}${i}`}async function fJ(t,e){const r=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});if(LIe()){const n=await EIe(r);UF(t,n);return}const a=window.URL.createObjectURL(r);UF(t,a),window.URL.revokeObjectURL(a)}function UF(t,e){const r=document.createElement("a");r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}function LIe(){if(typeof window>"u")return!1;const t=window.location.hostname,e=new Set(["localhost","127.0.0.1","::1","[::1]"]);return window.location.protocol==="http:"&&!e.has(t)}function EIe(t){return new Promise((e,r)=>{const a=new FileReader;a.onload=()=>{typeof a.result=="string"?e(a.result):r(new Error("导出文件生成失败,请稍后重试"))},a.onerror=()=>r(a.error??new Error("导出文件生成失败,请稍后重试")),a.readAsDataURL(t)})}function Dw(t,e,r){t.views=[{state:"frozen",ySplit:1}],t.getRow(1).height=24,t.getRow(1).font={bold:!0},t.getRow(1).alignment={vertical:"middle",horizontal:"center"},e.forEach((a,n)=>{const i=t.getColumn(n+1);r.includes(a)?i.width=32:a.includes("内容")||a.includes("计划")||a.includes("地点")?i.width=24:a.includes("时间")||a.includes("日期")?i.width=18:i.width=16}),t.eachRow((a,n)=>{if(a.eachCell((i,o)=>{i.border={top:{style:"thin",color:{argb:"FFE2E8F0"}},left:{style:"thin",color:{argb:"FFE2E8F0"}},bottom:{style:"thin",color:{argb:"FFE2E8F0"}},right:{style:"thin",color:{argb:"FFE2E8F0"}}},i.alignment={vertical:"top",horizontal:n===1?"center":"left",wrapText:r.includes(e[o-1])}}),n>1){const i=e.reduce((o,s,l)=>{if(!r.includes(s))return o;const u=kr(a.getCell(l+1).value);return Math.max(o,u?u.split(`
`).length:1)},1);a.height=Math.max(22,i*16)}})}function RIe(){var Fm,vl;const t=po(),e=au(),r=Gd(),a=e||r,n=lJ(),i=E.useRef(!1),o=E.useRef(null),s=E.useRef(null),l=E.useRef(null),u=E.useRef(null),c=E.useRef(null),d=E.useRef(new Map),h=E.useRef(null),[v,m]=E.useState(!0),[x,b]=E.useState(!1),[w,_]=E.useState(!1),[T,C]=E.useState(!1),[k,A]=E.useState(!1),[M,L]=E.useState(null),[R,P]=E.useState({}),[j,V]=E.useState({}),I=E.useRef({}),[F,G]=E.useState("entry"),[O,U]=E.useState(""),[$,K]=E.useState(!1),[q,H]=E.useState(null),[Z,te]=E.useState(),[ie,ce]=E.useState(!1),[me,ze]=E.useState(""),[Ce,ge]=E.useState(""),[Be,_e]=E.useState(""),[Oe,xt]=E.useState(""),[Ye,st]=E.useState(""),[We,At]=E.useState([]),[kt,Jt]=E.useState(!0),[Nr,rr]=E.useState(!1),[Fe,Mt]=E.useState(!1),[dr,ar]=E.useState(1),[sa,va]=E.useState(!1),[rn,wa]=E.useState(""),[En,pa]=E.useState({}),[an,gr]=E.useState(!1),[Ar,Hr]=E.useState(!1),[ye,Rt]=E.useState("all"),[Te,xe]=E.useState(""),[Pt,bt]=E.useState(!1),[Vt,Zt]=E.useState(null),[nr,_r]=E.useState(),[ma,Mr]=E.useState(!1),[Zr,za]=E.useState(!0),[la,ut]=E.useState(!1),[Da,Tr]=E.useState(!1),[lr,Ba]=E.useState(()=>lje()),[Dr,Va]=E.useState(null),[ua,Ze]=E.useState([]),[wr,le]=E.useState([]),[tt,Ot]=E.useState([]),[pt,nn]=E.useState([]),[Sa,Zn]=E.useState([]),[Ur,Rn]=E.useState([]),[Kr,$a]=E.useState(!1),[fr,Vo]=E.useState(!1),[bi,Pn]=E.useState(!1),[Qr,Ss]=E.useState("sales"),[Ji,Oi]=E.useState(!1),[mo,yn]=E.useState(""),[In,Wa]=E.useState(Lp),[La,wi]=E.useState(Ep),[jr,zi]=E.useState(W1),[xn,Or]=E.useState([]),[Kn,_a]=E.useState(""),[_s,Si]=E.useState({}),[J,Me]=E.useState({}),[re,de]=E.useState({}),[ct,ir]=E.useState([]),[zr,Qn]=E.useState([]),[Xe,jn]=E.useState([]),[Bi,Ts]=E.useState([]),[Ya,go]=E.useState([]),[Ue,On]=E.useState([]),[_i,yo]=E.useState([]),[xo,il]=E.useState([]),[eo,Dt]=E.useState([]),[zn,bn]=E.useState([]),[Ta,Bn]=E.useState([]),[Jn,ca]=E.useState([]),[Fo,dc]=E.useState([]),[iu,Jr]=E.useState([]),[Fa,Vi]=E.useState(""),[ou,ol]=E.useState(""),[ur,Go]=E.useState(BF),[Ti,Vn]=E.useState(mIe),[yr,Ho]=E.useState(null),[ga,Fi]=E.useState(null),[Cs,su]=E.useState([]),[Uo,Jh]=E.useState(!1),[Mm,Yd]=E.useState(""),[ui,Ci]=E.useState(null),[Xd,qd]=E.useState(null),[Zd,ks]=E.useState(null),Kd=ru(),Ns=sje(t.pathname),ei=Ns??"checkin",lu=Ns?sJ.find(Y=>Y.key===Ns):null,Ca=uje(lr),uu=!Ca,sl=E.useMemo(()=>{const Y=t.state,ee=Y==null?void 0:Y.openReportId;return typeof ee=="string"&&ee.trim()?ee.trim():typeof ee=="number"&&Number.isSafeInteger(ee)&&ee>0?ee:null},[t.state]),Qd=E.useMemo(()=>{if(!yr)return[];const Y=KF(yr.bizType,wr,tt,pt),ee=QF(yr.query).toLowerCase();return ee?Y.filter(oe=>oe.label.toLowerCase().includes(ee)):Y},[yr,wr,tt,pt]),cu=E.useMemo(()=>{var ee;if(!ga)return[];const Y=new Set((((ee=Ti.lineItems[ga.lineIndex])==null?void 0:ee.toUsers)??[]).map(oe=>oe.userId));return Cs.map(oe=>({...oe,selected:Y.has(oe.userId)}))},[Ti.lineItems,Cs,ga]),Dm=ga?Nh((Fm=Ti.lineItems[ga.lineIndex])==null?void 0:Fm.toUsers).length:0,Lm=E.useMemo(()=>{const Y=Sa.filter(ee=>m2(ee.id)).map(ee=>[ee.id,ee]);return new Map(Y)},[Sa]),ll=E.useMemo(()=>wIe(jr.operatorName,eo),[jr.operatorName,eo]),fc=E.useMemo(()=>{const Y=new Map;for(const ee of We){const oe=f_(ee.content),ke=oe.name.trim();if(!oe.label||!ke)continue;const qe=Y.get(ke);if(qe){qe.count+=1;continue}Y.set(ke,{label:`${oe.label}${ke}`,count:1})}return Array.from(Y.entries()).map(([ee,oe])=>({value:ee,label:oe.label,count:oe.count})).sort((ee,oe)=>oe.count-ee.count||ee.value.localeCompare(oe.value,"zh-CN"))},[We]),du=E.useMemo(()=>ye==="all"?We:We.filter(Y=>f_(Y.content).name.trim()===ye),[We,ye]),As=E.useMemo(()=>{const Y=[];for(const ee of du){const oe=ee.date||"未标注日期",ke=Y[Y.length-1];if(ke&&ke.date===oe){ke.items.push(ee);continue}const qe=ee.id!=null?`${ee.type}-${ee.id}`:`${ee.type}-${Y.length}`;Y.push({key:`${oe}-${qe}`,date:oe,items:[ee]})}return Y},[du]),hc=E.useCallback(async()=>{if(Kr||fr)return;Vo(!0);const[Y,ee,oe]=await Promise.allSettled([mp(""),vp(),pp()]);if(Y.status==="fulfilled"&&(le(XF(Y.value.salesItems??[])),Ot(qF(Y.value.channelItems??[]))),ee.status==="fulfilled"){const ke=ee.value.items??[];nn(ZF(ke)),Zn(ke)}oe.status==="fulfilled"&&Rn((oe.value.stageOptions??[]).filter(ke=>ke.value)),Y.status==="fulfilled"&&ee.status==="fulfilled"&&$a(!0),Vo(!1)},[Kr,fr]),ul=E.useCallback(async()=>{const[Y,ee,oe]=await Promise.all([mp(""),vp(),pp()]);return le(XF(Y.salesItems??[])),Ot(qF(Y.channelItems??[])),nn(ZF(ee.items??[])),Zn(ee.items??[]),Rn((oe.stageOptions??[]).filter(ke=>ke.value)),$a(!0),{salesItems:Y.salesItems??[],channelItems:Y.channelItems??[],opportunityItems:ee.items??[]}},[]);E.useEffect(()=>{vc()},[]),E.useEffect(()=>{if(!ga)return;let Y=!1;return Jh(!0),Yd(""),Zce(ga.query).then(ee=>{Y||su(ee??[])}).catch(()=>{Y||(su([]),Yd("系统用户加载失败,请稍后重试"))}).finally(()=>{Y||Jh(!1)}),()=>{Y=!0}},[ga]),E.useEffect(()=>{fu(ei,1,!0)},[ei]),E.useEffect(()=>{if(ei!=="report"||!sl||h.current===sl)return;let Y=!1;h.current=sl,G("history"),Zt(null),Rt("all");const ee=We.find(oe=>oe.id===sl&&oe.type==="日报");if(ee){Ci(ee),Kd(t.pathname,{replace:!0,state:null});return}return e$(sl).then(oe=>{Y||(At(ke=>BL([oe,...ke])),Ci(oe),Kd(t.pathname,{replace:!0,state:null}))}).catch(oe=>{Y||(h.current=null,ze(oe instanceof Error?oe.message:"日报详情加载失败"))}),()=>{Y=!0}},[We,ei,Kd,sl,t.pathname]),E.useEffect(()=>{const Y=s.current;if(!Y||!Fe||kt||Nr)return;const ee=new IntersectionObserver(oe=>{oe.some(ke=>ke.isIntersecting)&&fu(ei,dr+1,!1)},{rootMargin:"120px 0px"});return ee.observe(Y),()=>ee.disconnect()},[Fe,kt,Nr,dr,ei]),E.useEffect(()=>{const Y=l.current;if(!Y)return;const ee=()=>{if(!(Y.scrollTop>280)){Hr(!1),u.current!==null&&(window.clearTimeout(u.current),u.current=null);return}Hr(!1),u.current!==null&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>{Hr(!0)},180)};return ee(),Y.addEventListener("scroll",ee,{passive:!0}),()=>{Y.removeEventListener("scroll",ee),u.current!==null&&(window.clearTimeout(u.current),u.current=null)}},[F,We,kt]),E.useEffect(()=>{if(!ui)return;const Y=We.find(ee=>ee.id===ui.id&&ee.type===ui.type)??null;Ci(Y)},[We,ui]),E.useEffect(()=>{if(ye==="all")return;fc.some(ee=>ee.value===ye)||Rt("all")},[ye,fc]),E.useEffect(()=>{!Pt&&Te&&xe("")},[Te,Pt]),E.useEffect(()=>{Zt(null)},[ei,ye]),E.useEffect(()=>{if(!Vt)return;As.some(ee=>ee.key===Vt)||Zt(null)},[Vt,As]),E.useEffect(()=>{let Y=!1;async function ee(){var oe;try{const[ke,qe,lt]=await Promise.all([((((oe=lr==null?void 0:lr.roleCodes)==null?void 0:oe.length)??0)>0?mh():Fce()).catch(()=>null),ow().catch(()=>null),qce().catch(()=>null)]);if(Y)return;Ba(ke),Va(qe),lt&&typeof lt.objectSelectionRequired=="boolean"&&za(lt.objectSelectionRequired),lt&&typeof lt.notifyUsersVisible=="boolean"&&ut(lt.notifyUsersVisible),lt&&typeof lt.attachmentsVisible=="boolean"&&Tr(lt.attachmentsVisible),Mr(!0)}catch{Y||(Ba(null),Va(null),Mr(!0))}}return ee(),()=>{Y=!0}},[]),E.useEffect(()=>{v||i.current||(i.current=!0,Jd())},[v]);async function vc(){var Y,ee,oe,ke,qe,lt,It,Ga,Gn,ka,tf,Ls,rv;m(!0),ze("");try{const[ea,gc]=await Promise.all([JU(),pp().catch(()=>null)]),Ni=(((gc==null?void 0:gc.stageOptions)??Ur)||[]).filter($o=>$o.value);Ni.length>0&&Rn(Ni),_r((Y=ea.todayReport)==null?void 0:Y.status),Go({...BF,locationText:"",remark:"",bizType:(ee=ea.todayCheckIn)==null?void 0:ee.bizType,bizId:(oe=ea.todayCheckIn)==null?void 0:oe.bizId,bizName:(ke=ea.todayCheckIn)==null?void 0:ke.bizName,userName:(qe=ea.todayCheckIn)==null?void 0:qe.userName,deptName:(lt=ea.todayCheckIn)==null?void 0:lt.deptName}),Ze([]),U(""),te(void 0),ce(!1),Vn({workContent:((It=ea.todayReport)==null?void 0:It.workContent)||"",lineItems:(Gn=(Ga=ea.todayReport)==null?void 0:Ga.lineItems)!=null&&Gn.length?ea.todayReport.lineItems.map($o=>hje($o,Ni)):[fh()],planItems:(tf=(ka=ea.todayReport)==null?void 0:ka.planItems)!=null&&tf.length?ea.todayReport.planItems.map($o=>({content:$o.content||""})):[CA()],tomorrowPlan:((Ls=ea.todayReport)==null?void 0:Ls.tomorrowPlan)??"",sourceType:((rv=ea.todayReport)==null?void 0:rv.sourceType)??"manual"})}catch(ea){ze(ea instanceof Error?ea.message:"工作台数据加载失败"),At([]),_r(void 0)}finally{m(!1)}}async function fu(Y,ee=1,oe=!1){var qe;const ke=`${Y}:${ee}`;if(c.current!==ke){if(oe)d.current.set(Y,new Set);else if((qe=d.current.get(Y))!=null&&qe.has(ee))return;c.current=ke,oe?(ze(""),At([]),Jt(!0)):rr(!0);try{const lt=await Kce(Y,ee,8),It=lt.items??[];ze(""),At(Gn=>oe?BL(It):aje(Gn,It));const Ga=d.current.get(Y)??new Set;Ga.add(ee),d.current.set(Y,Ga),Mt(!!lt.hasMore),ar(lt.page??ee)}catch(lt){oe&&(At([]),ze(lt instanceof Error?lt.message:"历史记录加载失败")),Mt(!1)}finally{c.current===ke&&(c.current=null),Jt(!1),rr(!1)}}}const Jd=async()=>{if(ge(""),b(!0),!window.isSecureContext&&location.hostname!=="localhost"&&location.hostname!=="127.0.0.1"){U("当前页面未被浏览器视为安全环境,常见原因是 HTTP 或证书未被手机信任。请使用已信任的 HTTPS 地址打开。"),b(!1);return}U("正在获取当前位置...");try{let Y=null,ee=null,oe=null,ke=null;if(iJ()&&cIe()&&(Y=await dIe().catch(ka=>(ee=ka instanceof Error?ka:new Error("企业微信定位失败"),null))),Y||(Y=await YPe().catch(ka=>(oe=ka instanceof Error?ka:new Error("浏览器定位失败"),null))),Y||(Y=await XPe().catch(ka=>(ke=ka instanceof Error?ka:new Error("腾讯定位失败"),null))),!Y){const ka=[ee&&`企业微信定位:${ee.message}`,oe&&`浏览器定位:${oe.message}`,ke&&`腾讯定位:${ke.message}`].filter(Boolean).join("");throw new Error(ka||"定位获取失败,请稍后重试。")}const qe=Y.latitude,lt=Y.longitude,It=await VL(qe,lt,Y.address);Go(ka=>({...ka,locationText:It||W0(),latitude:qe,longitude:lt})),H({latitude:qe,longitude:lt}),te(Y.accuracy),ce(!1);const Ga=Y.accuracy?`当前精度约 ${Math.round(Y.accuracy)} 米`:"定位已刷新",Gn=Y.sourceType==="wecom"?"企业微信定位":Y.sourceType==="tencent"?"腾讯定位":"浏览器定位";U(Y.accuracy&&Y.accuracy>rh?`${Gn} ${Ga},当前精度超过 ${rh} 米,不能直接打卡,请先重新定位或调整位置确认。`:`${Gn} ${Ga},已通过腾讯地图解析当前位置;地图可在附近 ${jL} 米内精调。`)}catch(Y){Go(ee=>({...ee,locationText:"",latitude:void 0,longitude:void 0})),H(null),te(void 0),ce(!1),U(Y instanceof Error?Y.message:"定位获取失败,请开启定位权限后重试。")}finally{b(!1)}},ev=()=>{if(!ur.latitude||!ur.longitude){ge("请先刷新定位,再调整打卡位置。");return}ge(""),K(!0)},Ms=async(Y,ee)=>{const oe=nd(ee)?wd(ee):await VL(Y.latitude,Y.longitude),ke=q??{latitude:ur.latitude??Y.latitude,longitude:ur.longitude??Y.longitude},qe=FL(ke,Y);Go(lt=>({...lt,latitude:Y.latitude,longitude:Y.longitude,locationText:oe||W0()})),ce(!0),K(!1),U(`已调整约 ${Math.round(qe)} 米,位置已确认,可继续打卡。`)},Em=()=>{var Y;if(!Ca){if(ge(""),!GL()){ge("现场照片仅支持手机端直接拍照,请使用手机打开当前页面。");return}if(!ur.locationText.trim()){ge("请先完成定位,再进行现场拍照。");return}(Y=o.current)==null||Y.click()}},Rm=async Y=>{var oe;const ee=(oe=Y.target.files)==null?void 0:oe[0];if(ee){ge(""),xt(""),A(!0);try{if(!GL())throw new Error("现场照片仅支持手机端直接拍照,请使用手机打开当前页面。");if(!ur.locationText.trim())throw new Error("请先完成定位,再进行现场拍照。");const ke=await bje(ee,ur.locationText),qe=await rde(ke);Ze([qe])}catch(ke){ge(ke instanceof Error?ke.message:"现场照片上传失败")}finally{A(!1),Y.target.value=""}}},Pm=()=>{Ze([])},hu=(Y,ee,oe="sales")=>{if(Ca)return;!KF(oe,wr,tt,pt).length&&!fr&&hc(),Ho({mode:Y,lineIndex:ee,bizType:oe,query:""})},cl=()=>{Pn(!1),Oi(!1),yn(""),Wa(Lp),wi(Ep),zi(W1),Or([]),_a(""),Si({}),Me({}),de({}),ir([]),go([]),Vi(""),ol("")},dl=async()=>{const[Y,ee]=await Promise.all([jE(),pp()]);return Qn(Y.officeOptions??[]),jn(Y.industryOptions??[]),Ts(Y.provinceOptions??[]),On(Y.certificationLevelOptions??[]),yo(Y.channelAttributeOptions??[]),il(Y.internalAttributeOptions??[]),Dt((ee.operatorOptions??[]).filter(oe=>oe.value)),bn((ee.projectLocationOptions??[]).filter(oe=>oe.value)),Bn((ee.projectOwnershipLocationOptions??[]).filter(oe=>oe.value)),ca((ee.opportunityTypeOptions??[]).filter(oe=>oe.value)),dc((ee.stageOptions??[]).filter(oe=>oe.value)),Jr((ee.confidenceOptions??[]).filter(oe=>oe.value)),{expansionMeta:Y,opportunityMeta:ee}},fl=async Y=>{const ee=Y==null?void 0:Y.trim();if(!ee){go([]);return}const oe=await OE(ee);go(oe??[])},tv=async(Y,ee)=>{var ke,qe,lt;const oe=(ee==null?void 0:ee.trim())||"";Ss(Y),yn(""),Si({}),Me({}),ir([]),Vi(""),ol("");try{const{expansionMeta:It,opportunityMeta:Ga}=await dl();if(Y==="sales")Wa({...Lp,candidateName:oe});else if(Y==="channel")wi({...Ep,channelCode:It.nextChannelCode||"",channelName:oe});else{const Gn=(Ga.opportunityTypeOptions??[]).filter(Ls=>Ls.value),ka=(Ga.stageOptions??[]).filter(Ls=>Ls.value),tf=zL((Ga.confidenceOptions??[]).filter(Ls=>Ls.value));zi({...W1,opportunityName:oe,stage:((ke=ka[0])==null?void 0:ke.value)||"",opportunityType:((qe=(Gn.length>0?Gn:[...VF])[0])==null?void 0:qe.value)||"",confidencePct:((lt=tf[0])==null?void 0:lt.value)||W1.confidencePct}),Or([]),_a("")}Pn(!0)}catch(It){ge(It instanceof Error?It.message:"加载新增表单失败")}},X=(Y,ee)=>{Wa(oe=>({...oe,[Y]:ee})),Y in _s&&Si(oe=>{const ke={...oe};return delete ke[Y],ke}),Y==="employeeNo"&&Vi("")},Le=(Y,ee)=>{wi(oe=>({...oe,[Y]:ee})),Y in J&&Me(oe=>{const ke={...oe};return delete ke[Y],ke}),Y==="channelName"&&ol("")},Re=(Y,ee)=>{zi(oe=>({...oe,[Y]:ee})),Y in re&&de(oe=>{const ke={...oe};return delete ke[Y],ke})},Ge=(Y,ee,oe)=>{wi(ke=>{const qe=[...ke.contacts??[]];return qe[Y]={...qe[Y]??kh(),[ee]:oe},{...ke,contacts:qe}})},Br=()=>{wi(Y=>({...Y,contacts:[...Y.contacts??[],kh()]}))},or=Y=>{wi(ee=>{const oe=(ee.contacts??[]).filter((ke,qe)=>qe!==Y);return{...ee,contacts:oe.length>0?oe:[kh()]}}),ir(ee=>ee.filter(oe=>oe!==Y).map(oe=>oe>Y?oe-1:oe))},Fn=Y=>{const ee=Y||"";Le("province",ee||void 0),Le("city",void 0),fl(ee)},on=async()=>{var Y;if(!Ji){if(yn(""),Vi(""),ol(""),Qr==="sales"){const ee=IQ(In);if(Object.keys(ee).length>0){Si(ee),yn("请先完整填写销售人员拓展必填字段");return}}else if(Qr==="channel"){const ee=(Y=_i.find(i_))==null?void 0:Y.value,{errors:oe,invalidContactRows:ke}=jQ(La,ee);if(Object.keys(oe).length>0){Me(oe),ir(ke),yn("请先完整填写渠道拓展必填字段");return}}else{const ee=_Ie(jr,ll,xn,Kn);if(Object.keys(ee).length>0){de(ee),yn("请先完整填写商机必填字段");return}}Oi(!0);try{let ee=null;if(Qr==="sales"){const oe=await Ww(In.employeeNo.trim());if(oe.duplicated){const It=oe.message||"工号重复,请确认该人员是否已存在!";Vi(It),Si(Ga=>({...Ga,employeeNo:It})),yn(It),Oi(!1);return}const ke=await zE(OQ(In)),lt=(await ul()).salesItems.find(It=>It.id===ke);ee={id:ke,label:OL(lt)||OL({id:ke,name:In.candidateName.trim(),phone:In.mobile})}}else if(Qr==="channel"){const oe=await Yw(La.channelName.trim());if(oe.duplicated){const It=oe.message||"渠道重复,请确认该渠道是否已存在!";ol(It),Me(Ga=>({...Ga,channelName:It})),yn(It),Oi(!1);return}const ke=await BE(zQ(La)),lt=(await ul()).channelItems.find(It=>It.id===ke);ee={id:ke,label:(lt==null?void 0:lt.name)||La.channelName.trim()}}else{const oe=await r$(TIe(jr,ll,xn,Kn)),qe=(await ul()).opportunityItems.find(lt=>lt.id===oe);ee={id:oe,label:(qe==null?void 0:qe.name)||jr.opportunityName.trim()}}cl(),ee&&Ds(ee)}catch(ee){yn(ee instanceof Error?ee.message:"新增失败"),Oi(!1)}}},Ds=Y=>{if(!yr)return;if(yr.mode==="checkin"){Go(lt=>({...lt,bizType:yr.bizType,bizId:Y.id,bizName:Y.label,userName:(lr==null?void 0:lr.displayName)||(Dr==null?void 0:Dr.realName)||(lr==null?void 0:lr.username)||"",deptName:(Dr==null?void 0:Dr.deptName)||""})),Ho(null);return}const ee=yr.lineIndex??0,oe=yr.bizType==="opportunity"?Lm.get(Y.id):void 0,ke=g2((oe==null?void 0:oe.stageCode)||(oe==null?void 0:oe.stage),Ur),qe=im((oe==null?void 0:oe.stageCode)||(oe==null?void 0:oe.stage),Ur)||(oe==null?void 0:oe.stageCode)||(oe==null?void 0:oe.stage)||"";Vn(lt=>({...lt,lineItems:lt.lineItems.map((It,Ga)=>Ga!==ee?It:{...fh(),bizType:yr.bizType,bizId:Y.id,bizName:Y.label,workDate:n,attachments:It.attachments??[],toUsers:It.toUsers??[],stage:yr.bizType==="opportunity"?qe:"",editorText:Ah(yr.bizType,Y.label,yr.bizType==="opportunity"&&ke?{[u_]:ke}:void 0,It.toUsers),content:""})})),Ho(null)},Im=Y=>{Fi({lineIndex:Y,query:""})},jm=(Y,ee)=>{const oe=Nh([ee])[0];oe&&Vn(ke=>({...ke,lineItems:ke.lineItems.map((qe,lt)=>{if(lt!==Y)return qe;const It=Nh(qe.toUsers),Gn=It.some(ka=>ka.userId===oe.userId)?It.filter(ka=>ka.userId!==oe.userId):[...It,oe];return{...qe,toUsers:Gn,editorText:qe.bizName?Lw(qe.bizType,qe.bizName,qe.editorText||Ah(qe.bizType,qe.bizName),Gn):Py(qe.editorText||"",Gn,!1)}})}))},Om=(Y,ee)=>{const oe=Ti.lineItems[Y];ee.key!=="#"||oe!=null&&oe.bizName||(ee.preventDefault(),hu("report",Y,(oe==null?void 0:oe.bizType)||"sales"))},zm=(Y,ee)=>{Vn(oe=>({...oe,lineItems:oe.lineItems.map((ke,qe)=>{var It;return qe!==Y?ke:!ke.bizId||!ke.bizName?{...ke,editorText:Py(ee,ke.toUsers,!1)}:(((It=ee.replace(/\r/g,"").split(`
`)[0])==null?void 0:It.trim())||"")!==h_(ke.bizType,ke.bizName)?dje(ke):{...ke,editorText:Lw(ke.bizType,ke.bizName,ee,ke.toUsers)}})}))},Ht=(Y,ee)=>{Vn(oe=>({...oe,lineItems:oe.lineItems.map((ke,qe)=>{if(qe!==Y||ke.bizType!=="opportunity"||!ke.bizName)return ke;const lt=im(ee,Ur)||ee.trim();return{...ke,stage:lt,editorText:Lw(ke.bizType,ke.bizName,ke.editorText||Ah(ke.bizType,ke.bizName),ke.toUsers)}})}))},ki=()=>{Vn(Y=>({...Y,lineItems:[...Y.lineItems,fh()]}))},bo=Y=>{Vn(ee=>({...ee,lineItems:ee.lineItems.length===1?[fh()]:ee.lineItems.filter((oe,ke)=>ke!==Y)})),Ho(ee=>ee&&ee.mode==="report"&&ee.lineIndex===Y?null:ee)},sn=async(Y,ee)=>{var ke;const oe=(ke=ee.target.files)==null?void 0:ke[0];if(oe){if(oe.size>OF){const qe=`单个附件不能超过${ux(OF)}`;_e(qe),V(lt=>({...lt,[Y]:qe})),ee.target.value="";return}I.current[Y]=oe,_e(""),st(""),L(Y),V(qe=>{const lt={...qe};return delete lt[Y],lt}),P(qe=>({...qe,[Y]:0}));try{const qe=await ade(oe,{onProgress:lt=>{P(It=>({...It,[Y]:lt}))}});Vn(lt=>({...lt,lineItems:lt.lineItems.map((It,Ga)=>{if(Ga!==Y)return It;const Gn=It.attachments??[];return Gn.some(ka=>ka.url===qe.url)?It:{...It,attachments:[...Gn,qe]}})})),I.current[Y]=null}catch(qe){const lt=qe instanceof Error?qe.message:"附件上传失败";_e(lt),V(It=>({...It,[Y]:lt}))}finally{L(null),P(qe=>{const lt={...qe};return delete lt[Y],lt}),ee.target.value=""}}},hl=(Y,ee)=>{Vn(oe=>({...oe,lineItems:oe.lineItems.map((ke,qe)=>qe===Y?{...ke,attachments:(ke.attachments??[]).filter(lt=>lt.url!==ee)}:ke)}))},vu=Y=>{const ee=I.current[Y];if(!ee){_e("请重新选择附件后再试");return}sn(Y,{target:{files:[ee],value:""}})},pc=(Y,ee)=>{Vn(oe=>({...oe,planItems:oe.planItems.map((ke,qe)=>qe===Y?{...ke,content:ee}:ke)}))},y2=()=>{Vn(Y=>({...Y,planItems:[...Y.planItems,CA()]}))},mc=Y=>{Vn(ee=>({...ee,planItems:ee.planItems.length===1?[CA()]:ee.planItems.filter((oe,ke)=>ke!==Y)}))},Bm=async()=>{var Y,ee;if(!w){ge(""),xt(""),_(!0);try{if(Ca)throw new Error("当前角色仅可查看打卡历史记录");if(!ur.latitude||!ur.longitude||!ur.locationText.trim())throw new Error("请先完成定位后再提交打卡");if(Z&&Z>rh&&!ie)throw new Error(`当前定位精度约 ${Math.round(Z)} 米,超过 ${rh} 米;请先重新定位或完成位置确认后再打卡`);if(!ur.bizType||!ur.bizId)throw new Error("请先关联本次打卡对象");if(!ua.length)throw new Error("请先上传现场照片");if(!((Y=ur.remark)!=null&&Y.trim()))throw new Error("请填写打卡备注");await tde({locationText:ur.locationText.trim(),remark:((ee=ur.remark)==null?void 0:ee.trim())||void 0,longitude:ur.longitude,latitude:ur.latitude,photoUrls:ua,bizType:ur.bizType,bizId:ur.bizId,bizName:ur.bizName,userName:(lr==null?void 0:lr.displayName)||(Dr==null?void 0:Dr.realName)||(lr==null?void 0:lr.username)||"",deptName:(Dr==null?void 0:Dr.deptName)||""}),await Promise.all([vc(),fu(ei,1,!0)]),Ze([]),xt("打卡已记录。")}catch(oe){ge(oe instanceof Error?oe.message:"打卡提交失败")}finally{_(!1)}}},ef=async()=>{if(!T){_e(""),st(""),C(!0);try{if(!ma)throw new Error("日报功能配置加载中,请稍后重试");if(Ca)throw new Error("当前角色仅可查看日报历史记录");const Y=Ti.lineItems.map(oe=>vje(oe,n,Ur)).map(oe=>pje(oe,la,Da)),ee=Ti.planItems.map(oe=>({content:oe.content.trim()})).filter(oe=>oe.content);if(!Y.length)throw new Error("请至少填写一条今日工作内容");mje(Y,Ur,Zr),await ide({workContent:gje(Y),lineItems:Y,planItems:ee,tomorrowPlan:yje(ee),sourceType:Ti.sourceType||"manual"}),await Promise.all([vc(),fu(ei,1,!0)]),st("日报已保存,今日再次提交会覆盖当天内容。")}catch(Y){_e(Y instanceof Error?Y.message:"日报提交失败")}finally{C(!1)}}},Vm=async Y=>{if(!sa){va(!0),wa(""),pa(Y);try{if(ei==="checkin"){const ee=await Qce(Y);if(!ee.length)throw new Error("当前筛选条件下暂无可导出数据");await CIe(ee)}else{const ee=await Jce(Y);if(!ee.length)throw new Error("当前筛选条件下暂无可导出数据");await kIe(ee)}gr(!1)}catch(ee){wa(ee instanceof Error?ee.message:"导出失败,请稍后重试")}finally{va(!1)}}};return!Ns||!lu?g.jsx(XL,{to:"/work/checkin",replace:!0}):g.jsxs("div",{className:"crm-page-stack",children:[g.jsx("header",{className:"crm-page-header",children:g.jsxs("div",{className:"crm-page-heading",children:[g.jsx("h1",{className:"crm-page-title",children:"工作台"}),g.jsxs("p",{className:"crm-page-subtitle",children:["今天是 ",fP(new Date,"yyyy年MM月dd日 EEEE",{locale:eJ})]})]})}),g.jsx(IIe,{activeWorkSection:Ns,disableMobileMotion:a}),g.jsxs("div",{className:"grid grid-cols-1 items-start gap-5 lg:grid-cols-12 lg:gap-6",children:[uu?g.jsxs("div",{className:`min-w-0 crm-page-stack lg:col-span-7 xl:col-span-8 ${F==="entry"?"block lg:flex":"hidden lg:flex"}`,children:[g.jsxs("div",{className:"mb-2 flex items-center justify-between gap-3",children:[g.jsx(WF,{title:lu.title,accent:lu.accent,compact:!0}),g.jsx($F,{mobilePanel:F,onChange:G})]}),v?g.jsx(jIe,{section:Ns}):Ns==="checkin"?g.jsx(HIe,{loading:v,checkInForm:ur,refreshingLocation:x,onOpenObjectPicker:()=>hu("checkin",void 0,ur.bizType||"sales"),onRefreshLocation:()=>void Jd(),onOpenLocationAdjust:ev,locationAccuracyMeters:Z,locationAdjustmentConfirmed:ie,requiresLocationConfirmation:!!(Z&&Z>rh&&!ie),locationHint:O,onRemarkChange:Y=>Go(ee=>({...ee,remark:Y})),photoInputRef:o,onPhotoChange:Y=>void Rm(Y),onPickPhoto:Em,uploadingPhoto:k,checkInPhotoUrls:ua,onRemovePhoto:Pm,checkInError:Ce,checkInSuccess:Oe,pageError:me,submittingCheckIn:w,onSubmit:()=>void Bm(),disableMobileMotion:a}):g.jsx(UIe,{loading:v,reportStatus:nr,currentWorkDate:n,reportForm:Ti,reportOpportunityStageOptions:Ur,onAddReportLine:ki,onRemoveReportLine:bo,onOpenObjectPicker:(Y,ee)=>hu("report",Y,ee),onOpenUserPicker:Im,onReportLineKeyDown:Om,onReportLineChange:zm,onReportLineStageChange:Ht,uploadingReportAttachmentIndex:M,uploadingReportAttachmentProgress:R,reportAttachmentUploadErrors:j,dailyReportFeatureLoaded:ma,objectSelectionRequired:Zr,notifyUsersVisible:la,attachmentsVisible:Da,onReportAttachmentChange:(Y,ee)=>void sn(Y,ee),onRetryReportAttachment:vu,onRemoveReportAttachment:hl,onPreviewAttachment:ks,onAddPlanItem:y2,onPlanItemChange:pc,onRemovePlanItem:mc,reportError:Be,reportSuccess:Ye,pageError:me,submittingReport:T,onSubmit:()=>void ef(),disableMobileMotion:a})]}):null,g.jsxs("div",{className:Ne("min-w-0 crm-page-stack",uu?F==="history"?"block lg:flex lg:col-span-5 lg:sticky lg:top-6 xl:col-span-4":"hidden lg:flex lg:col-span-5 lg:sticky lg:top-6 xl:col-span-4":"block lg:col-span-12 xl:col-span-12"),children:[g.jsxs("div",{className:"mb-2 flex items-start justify-between gap-3",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx(WF,{title:uu?"历史记录":`${lu.label}历史记录`,accent:"bg-slate-300 dark:bg-slate-700",compact:!0}),!e&&rn?g.jsx("p",{className:"mt-1 text-xs text-rose-500 dark:text-rose-300",children:rn}):null]}),g.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[e?null:g.jsx("button",{type:"button",onClick:()=>{wa(""),gr(!0)},disabled:sa,className:"inline-flex h-9 w-9 items-center justify-center rounded-xl border border-slate-200 bg-white text-slate-500 shadow-sm transition-colors hover:border-violet-200 hover:bg-violet-50 hover:text-violet-600 disabled:cursor-not-allowed disabled:border-slate-100 disabled:bg-slate-50 disabled:text-slate-300 dark:border-slate-700 dark:bg-slate-900/70 dark:text-slate-400 dark:hover:border-violet-500/40 dark:hover:bg-slate-800 dark:hover:text-violet-300 dark:disabled:border-slate-800 dark:disabled:bg-slate-900/50 dark:disabled:text-slate-700","aria-label":sa?"导出中":"导出 Excel",title:sa?"导出中":"导出 Excel",children:g.jsx(By,{className:"h-4 w-4"})}),uu?g.jsx($F,{mobilePanel:F,onChange:G}):null]})]}),g.jsxs("div",{ref:l,className:Ne("relative space-y-4 overflow-y-auto scrollbar-hide",uu?"max-h-[calc(100vh-12rem)] pr-2":"max-h-[calc(100vh-10rem)]"),children:[kt&&We.length===0?g.jsx(OIe,{}):null,!kt||We.length>0?g.jsx(zIe,{presenterFilter:ye,presenterOptions:fc,onOpenPresenterPicker:()=>bt(!0)}):null,As.map(Y=>{const ee=ye!=="all"||Vt===Y.key,oe=ye==="all";return g.jsxs("div",{className:"space-y-3",children:[g.jsx(FIe,{date:Y.date,count:Y.items.length,expanded:ee,canToggle:oe,onToggle:()=>{oe&&Zt(ke=>ke===Y.key?null:Y.key)}}),ee?Y.items.map((ke,qe)=>g.jsx("div",{children:g.jsx(GIe,{item:ke,index:qe,onOpen:()=>Ci(ke),onPreviewPhoto:(lt,It)=>qd({url:lt,alt:It}),onPreviewAttachment:ks,disableMobileMotion:a})},vJ(ke))):null]},Y.key)}),!kt&&du.length===0?g.jsx("div",{className:"crm-empty-panel",children:ye==="all"?`当前没有${Ry(ei)}记录`:`当前筛选条件下没有${Ry(ei)}记录`}):null,Fe?g.jsx("div",{ref:s,className:"crm-empty-panel flex items-center justify-center px-3 py-3",children:Nr?"加载更多记录中...":"下拉到底自动加载更多"}):null,g.jsx(Xt.button,{type:"button",initial:!1,animate:{opacity:Ar?1:0,scale:a||Ar?1:.92,y:a||Ar?0:8},transition:a?{duration:0}:{duration:.18,ease:"easeOut"},onClick:()=>{var Y;return(Y=l.current)==null?void 0:Y.scrollTo({top:0,behavior:"smooth"})},className:Ne("sticky bottom-4 ml-auto flex h-10 w-10 items-center justify-center rounded-full border border-violet-200 text-violet-600 shadow-lg transition-colors hover:bg-violet-50 dark:border-violet-500/30 dark:text-violet-300 dark:hover:bg-slate-800",a?"bg-white dark:bg-slate-900":"bg-white/92 backdrop-blur dark:bg-slate-900/92"),style:{pointerEvents:Ar?"auto":"none"},"aria-label":"回到历史记录顶部",children:g.jsx(zre,{className:"crm-icon-md"})})]})]})]}),ga?g.jsxs("div",{className:"fixed inset-0 z-[92]",children:[g.jsx("button",{type:"button",onClick:()=>Fi(null),className:Ne("absolute inset-0 bg-slate-900/35",!a&&"backdrop-blur-sm"),"aria-label":"关闭选择通知用户"}),g.jsxs("div",{className:"absolute inset-x-0 bottom-0 max-h-[82dvh] overflow-hidden rounded-t-3xl border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900 md:inset-x-auto md:left-1/2 md:top-1/2 md:bottom-auto md:w-[min(640px,88vw)] md:max-h-[72vh] md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-3xl",children:[g.jsxs("div",{className:"border-b border-slate-100 px-5 py-4 dark:border-slate-800 md:px-6",children:[g.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[g.jsxs("div",{children:[g.jsx("h3",{className:"text-base font-semibold text-slate-900 dark:text-white",children:"选择通知用户"}),g.jsx("p",{className:"crm-field-note mt-1",children:"日报提交后,对方会在待办事项里看到这条消息"})]}),g.jsx("button",{type:"button",onClick:()=>Fi(null),className:"inline-flex h-9 w-9 items-center justify-center rounded-full text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800","aria-label":"关闭选择通知用户",children:g.jsx(Oa,{className:"crm-icon-md"})})]}),g.jsxs("div",{className:"relative",children:[g.jsx(Qu,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"}),g.jsx("input",{value:ga.query,onChange:Y=>Fi(ee=>ee&&{...ee,query:Y.target.value}),placeholder:"搜索系统用户",className:"crm-input-text min-h-11 w-full rounded-xl border border-slate-200 bg-white py-2.5 pl-10 pr-3 text-base text-slate-900 outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50 dark:text-white md:text-sm"})]})]}),g.jsx("div",{className:"max-h-[calc(82dvh-214px)] overflow-y-auto px-3 py-3 md:max-h-[calc(72vh-214px)] md:px-4 md:py-4",children:Uo&&!cu.length?g.jsx("div",{className:"crm-empty-panel px-4 py-8",children:"正在加载系统用户..."}):cu.length?g.jsx("div",{className:"space-y-2",children:cu.map(Y=>g.jsxs("button",{type:"button",onClick:()=>jm(ga.lineIndex,Y),className:Ne("flex w-full items-center justify-between rounded-2xl border px-4 py-3 text-left transition-colors",Y.selected?"border-violet-200 bg-violet-50/80 text-violet-700 dark:border-violet-500/40 dark:bg-violet-500/15 dark:text-violet-200":"border-slate-200 bg-white text-slate-900 hover:border-violet-200 hover:bg-violet-50/70 dark:border-slate-800 dark:bg-slate-900/40 dark:text-white dark:hover:border-violet-500/30 dark:hover:bg-slate-800"),children:[g.jsxs("span",{className:"min-w-0",children:[g.jsx("span",{className:"block truncate text-sm font-medium",children:Y.name||Y.username||`用户${Y.userId}`}),Y.username?g.jsx("span",{className:"block truncate text-xs text-slate-400",children:Y.username}):null]}),g.jsx("span",{className:"ml-3 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full border border-current",children:Y.selected?g.jsx(Ip,{className:"h-4 w-4"}):null})]},Y.userId))}):g.jsx("div",{className:"crm-empty-panel px-4 py-8",children:Mm||"没有找到匹配用户"})}),g.jsxs("div",{className:"flex items-center justify-between gap-3 border-t border-slate-100 px-5 py-4 pb-[calc(env(safe-area-inset-bottom)+16px)] dark:border-slate-800 md:px-6 md:pb-4",children:[g.jsxs("span",{className:"text-sm text-slate-500 dark:text-slate-400",children:["已选择 ",Dm," 人"]}),g.jsx("button",{type:"button",onClick:()=>Fi(null),className:"inline-flex h-10 min-w-24 items-center justify-center rounded-xl bg-violet-600 px-4 text-sm font-medium text-white shadow-sm transition-colors hover:bg-violet-700 focus:outline-none focus:ring-2 focus:ring-violet-500 focus:ring-offset-2 dark:focus:ring-offset-slate-900",children:"确认选择"})]})]})]}):null,yr?g.jsxs("div",{className:"fixed inset-0 z-[90]",children:[g.jsx("button",{type:"button",onClick:()=>Ho(null),className:Ne("absolute inset-0 bg-slate-900/35",!a&&"backdrop-blur-sm"),"aria-label":"关闭选择对象"}),g.jsxs("div",{className:"absolute inset-x-0 bottom-0 max-h-[82dvh] overflow-hidden rounded-t-3xl border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900 md:inset-x-auto md:left-1/2 md:top-1/2 md:bottom-auto md:w-[min(720px,88vw)] md:max-h-[72vh] md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-3xl",children:[g.jsxs("div",{className:"border-b border-slate-100 px-5 py-4 dark:border-slate-800 md:px-6",children:[g.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[g.jsxs("div",{children:[g.jsx("h3",{className:"text-base font-semibold text-slate-900 dark:text-white",children:"选择关联对象"}),g.jsx("p",{className:"crm-field-note mt-1",children:"先选类型,再搜索具体对象"})]}),g.jsx("button",{type:"button",onClick:()=>Ho(null),className:"inline-flex h-9 w-9 items-center justify-center rounded-full text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"crm-icon-md"})})]}),g.jsx("div",{className:"mb-3 flex flex-wrap gap-2",children:["sales","channel","opportunity"].map(Y=>g.jsx("button",{type:"button",onClick:()=>Ho(ee=>ee&&{...ee,bizType:Y,query:""}),className:`rounded-full px-3 py-1.5 text-xs font-medium transition-colors ${yr.bizType===Y?"bg-violet-600 text-white":"bg-slate-100 text-slate-600 hover:bg-slate-200 dark:bg-slate-800 dark:text-slate-300 dark:hover:bg-slate-700"}`,children:nm(Y)},Y))}),g.jsxs("div",{className:"relative",children:[g.jsx(Qu,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"}),g.jsx("input",{autoFocus:!0,value:yr.query,onChange:Y=>Ho(ee=>ee&&{...ee,query:QF(Y.target.value)}),placeholder:`搜索${nm(yr.bizType)}名称`,className:"crm-input-text min-h-11 w-full rounded-xl border border-slate-200 bg-white py-2.5 pl-10 pr-3 text-base text-slate-900 outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50 dark:text-white md:text-sm"})]})]}),g.jsx("div",{className:"max-h-[calc(82dvh-180px)] overflow-y-auto px-3 py-3 pb-[calc(env(safe-area-inset-bottom)+16px)] md:max-h-[calc(72vh-180px)] md:px-4 md:py-4",children:fr&&!Qd.length?g.jsx("div",{className:"crm-empty-panel px-4 py-8",children:"正在加载可选对象..."}):Qd.length?g.jsx("div",{className:"space-y-2",children:Qd.map(Y=>g.jsxs("button",{type:"button",onClick:()=>Ds(Y),className:"flex w-full items-center justify-between rounded-2xl border border-slate-200 bg-white px-4 py-3 text-left transition-colors hover:border-violet-200 hover:bg-violet-50/70 dark:border-slate-800 dark:bg-slate-900/40 dark:hover:border-violet-500/30 dark:hover:bg-slate-800",children:[g.jsx("span",{className:"text-sm font-medium text-slate-900 dark:text-white",children:Y.label}),g.jsx("span",{className:"text-xs text-slate-400",children:"选择"})]},`${yr.bizType}-${Y.id}`))}):g.jsxs("div",{className:"crm-empty-panel px-4 py-8",children:[g.jsx("p",{children:"没有找到匹配对象,请换个关键词试试"}),yr.bizType==="sales"||yr.bizType==="channel"||yr.bizType==="opportunity"?g.jsx("button",{type:"button",onClick:()=>void tv(yr.bizType,yr.query),className:"mt-3 rounded-xl bg-violet-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-violet-700",children:yr.bizType==="sales"?yr.query.trim()?`新增负责人“${yr.query.trim()}”并选中`:"新增负责人并选中":yr.bizType==="channel"?yr.query.trim()?`新增渠道“${yr.query.trim()}”并选中`:"新增渠道并选中":yr.query.trim()?`新增商机“${yr.query.trim()}”并选中`:"新增商机并选中"}):null]})})]})]}):null,bi?g.jsxs("div",{className:"fixed inset-0 z-[96]",children:[g.jsx("button",{type:"button",onClick:cl,className:Ne("absolute inset-0 bg-slate-900/35",!a&&"backdrop-blur-sm"),"aria-label":"关闭新增对象"}),g.jsxs("div",{className:"absolute inset-x-0 bottom-0 max-h-[88dvh] overflow-hidden rounded-t-3xl border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900 md:inset-x-auto md:left-1/2 md:top-1/2 md:bottom-auto md:w-[min(760px,88vw)] md:max-h-[78vh] md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-3xl",children:[g.jsx("div",{className:"border-b border-slate-100 px-5 py-4 dark:border-slate-800 md:px-6",children:g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsxs("div",{children:[g.jsx("h3",{className:"text-base font-semibold text-slate-900 dark:text-white",children:Qr==="sales"?"新增负责人并选中":Qr==="channel"?"新增渠道并选中":"新增商机并选中"}),g.jsx("p",{className:"mt-1 text-xs leading-5 text-slate-500 dark:text-slate-400",children:Qr==="sales"?"保存成功后会自动选中当前负责人。":Qr==="channel"?"保存成功后会自动选中当前渠道。":"保存成功后会自动选中当前商机。"})]}),g.jsx("button",{type:"button",onClick:cl,className:"inline-flex h-9 w-9 items-center justify-center rounded-full text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"crm-icon-md"})})]})}),g.jsxs("div",{className:"max-h-[calc(88dvh-132px)] overflow-y-auto px-5 py-5 pb-[calc(env(safe-area-inset-bottom)+16px)] md:max-h-[calc(78vh-132px)] md:px-6",children:[g.jsx("div",{className:"crm-form-grid",children:Qr==="sales"?g.jsx(BQ,{form:In,fieldErrors:_s,officeOptions:zr,industryOptions:Xe,duplicateMessage:Fa,requiredMark:g.jsx(Di,{}),onChange:X}):Qr==="channel"?g.jsx(VQ,{form:La,fieldErrors:J,invalidContactRows:ct,provinceOptions:Bi,cityOptions:Ya,industryOptions:Xe,certificationLevelOptions:Ue,channelAttributeOptions:_i,internalAttributeOptions:xo,channelOtherOptionValue:(vl=_i.find(i_))==null?void 0:vl.value,duplicateMessage:ou,requiredMark:g.jsx(Di,{}),onChange:Le,onContactChange:Ge,onAddContact:Br,onRemoveContact:or,onProvinceChange:Fn}):g.jsxs(g.Fragment,{children:[g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["项目地",g.jsx(Di,{})]}),g.jsx(Tt,{value:jr.projectLocation||"",placeholder:"请选择",sheetTitle:"项目地",searchable:!0,searchPlaceholder:"搜索项目地",options:[{value:"",label:"请选择"},...zn.map(Y=>({value:Y.value||"",label:Y.label||Y.value||""}))],className:so(!!re.projectLocation),onChange:Y=>Re("projectLocation",Y)}),re.projectLocation?g.jsx("p",{className:"text-xs text-rose-500",children:re.projectLocation}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["业绩归属地",g.jsx(Di,{})]}),g.jsx(Tt,{value:jr.projectOwnershipLocation||"",placeholder:"请选择",sheetTitle:"业绩归属地",searchable:!0,searchPlaceholder:"搜索业绩归属地",options:[{value:"",label:"请选择"},...Ta.map(Y=>({value:Y.value||"",label:Y.label||Y.value||""}))],className:so(!!re.projectOwnershipLocation),onChange:Y=>Re("projectOwnershipLocation",Y)}),re.projectOwnershipLocation?g.jsx("p",{className:"text-xs text-rose-500",children:re.projectOwnershipLocation}):null]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["项目名称",g.jsx(Di,{})]}),g.jsx("input",{value:jr.opportunityName,onChange:Y=>Re("opportunityName",Y.target.value),className:so(!!re.opportunityName)}),re.opportunityName?g.jsx("p",{className:"text-xs text-rose-500",children:re.opportunityName}):null]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["最终用户",g.jsx(Di,{})]}),g.jsx("input",{value:jr.customerName,onChange:Y=>Re("customerName",Y.target.value),className:so(!!re.customerName)}),re.customerName?g.jsx("p",{className:"text-xs text-rose-500",children:re.customerName}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["运作方",g.jsx(Di,{})]}),g.jsx(Tt,{value:jr.operatorName||"",placeholder:"请选择",sheetTitle:"运作方",options:[{value:"",label:"请选择"},...eo.map(Y=>({value:Y.value||"",label:Y.label||Y.value||""}))],className:so(!!re.operatorName),onChange:Y=>Re("operatorName",Y)}),re.operatorName?g.jsx("p",{className:"text-xs text-rose-500",children:re.operatorName}):null]}),ll==="h3c"||ll==="both"?g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["新华三负责人",g.jsx(Di,{})]}),g.jsx(Tt,{value:jr.salesExpansionId?String(jr.salesExpansionId):"",placeholder:"请选择",sheetTitle:"新华三负责人",searchable:!0,searchPlaceholder:"搜索负责人",options:[{value:"",label:"请选择"},...wr.map(Y=>({value:String(Y.id),label:Y.label}))],className:so(!!re.salesExpansionId),onChange:Y=>Re("salesExpansionId",Y||void 0)}),re.salesExpansionId?g.jsx("p",{className:"text-xs text-rose-500",children:re.salesExpansionId}):null]}):null,ll==="channel"||ll==="both"?g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["渠道名称",g.jsx(Di,{})]}),g.jsx(Tt,{value:jr.channelExpansionId?String(jr.channelExpansionId):"",placeholder:"请选择",sheetTitle:"渠道名称",searchable:!0,searchPlaceholder:"搜索渠道",options:[{value:"",label:"请选择"},...tt.map(Y=>({value:String(Y.id),label:Y.label}))],className:so(!!re.channelExpansionId),onChange:Y=>Re("channelExpansionId",Y||void 0)}),re.channelExpansionId?g.jsx("p",{className:"text-xs text-rose-500",children:re.channelExpansionId}):null]}):null,g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["预计金额(元)",g.jsx(Di,{})]}),g.jsx("input",{type:"number",min:"0",value:jr.amount||"",onChange:Y=>Re("amount",Number(Y.target.value)||0),className:so(!!re.amount)}),re.amount?g.jsx("p",{className:"text-xs text-rose-500",children:re.amount}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["预计下单时间",g.jsx(Di,{})]}),g.jsx("input",{type:"date",value:jr.expectedCloseDate,onChange:Y=>Re("expectedCloseDate",Y.target.value),className:so(!!re.expectedCloseDate)}),re.expectedCloseDate?g.jsx("p",{className:"text-xs text-rose-500",children:re.expectedCloseDate}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["项目把握度",g.jsx(Di,{})]}),g.jsx(Tt,{value:FF(jr.confidencePct,iu),placeholder:"请选择",sheetTitle:"项目把握度",options:zL(iu).map(Y=>({value:Y.value||"",label:Y.label||Y.value||""})),className:so(!!re.confidencePct),onChange:Y=>Re("confidencePct",FF(Y,iu))}),re.confidencePct?g.jsx("p",{className:"text-xs text-rose-500",children:re.confidencePct}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["项目阶段",g.jsx(Di,{})]}),g.jsx(Tt,{value:jr.stage||"",placeholder:"请选择",sheetTitle:"项目阶段",options:Fo.map(Y=>({value:Y.value||"",label:Y.label||Y.value||""})),className:so(!!re.stage),onChange:Y=>Re("stage",Y)}),re.stage?g.jsx("p",{className:"text-xs text-rose-500",children:re.stage}):null]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["建设类型",g.jsx(Di,{})]}),g.jsx(Tt,{value:jr.opportunityType||"",placeholder:"请选择",sheetTitle:"建设类型",options:(Jn.length>0?Jn:[...VF]).map(Y=>({value:Y.value||"",label:Y.label||Y.value||""})),className:so(!!re.opportunityType),onChange:Y=>Re("opportunityType",Y)}),re.opportunityType?g.jsx("p",{className:"text-xs text-rose-500",children:re.opportunityType}):null]}),g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["竞争对手",g.jsx(Di,{})]}),g.jsx(Tt,{multiple:!0,value:xn,placeholder:"请选择竞争对手",sheetTitle:"竞争对手",options:pIe.map(Y=>({value:Y,label:Y})),className:so(!!re.competitorName),onChange:Y=>{de(oe=>{if(!oe.competitorName)return oe;const ke={...oe};return delete ke.competitorName,ke});const ee=uJ(Y);Or(ee),ee.includes("其他")||_a("")}}),re.competitorName&&!xn.includes("其他")?g.jsx("p",{className:"text-xs text-rose-500",children:re.competitorName}):null]}),xn.includes("其他")?g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsxs("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:["其他竞争对手",g.jsx(Di,{})]}),g.jsx("input",{value:Kn,onChange:Y=>_a(Y.target.value),placeholder:"请输入其他竞争对手",className:so(!!re.competitorName)}),re.competitorName?g.jsx("p",{className:"text-xs text-rose-500",children:re.competitorName}):null]}):null,g.jsxs("label",{className:"space-y-2 sm:col-span-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"备注说明"}),g.jsx("textarea",{rows:4,value:jr.description||"",onChange:Y=>Re("description",Y.target.value),className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50"})]})]})}),mo?g.jsx("p",{className:"mt-4 text-sm text-rose-500 dark:text-rose-300",children:mo}):null]}),g.jsxs("div",{className:"flex items-center justify-end gap-3 border-t border-slate-100 px-5 py-4 dark:border-slate-800 md:px-6",children:[g.jsx("button",{type:"button",onClick:cl,className:"h-10 rounded-xl border border-slate-200 bg-white px-4 text-sm font-medium text-slate-600 transition-colors hover:border-violet-200 hover:text-violet-600 dark:border-slate-700 dark:bg-slate-900/60 dark:text-slate-300 dark:hover:border-violet-500/40 dark:hover:text-violet-200",children:"取消"}),g.jsx("button",{type:"button",onClick:()=>void on(),disabled:Ji,className:"inline-flex h-10 items-center justify-center rounded-xl bg-violet-600 px-4 text-sm font-semibold text-white transition-colors hover:bg-violet-700 disabled:cursor-not-allowed disabled:bg-violet-300 dark:bg-violet-500 dark:hover:bg-violet-400 dark:disabled:bg-violet-500/40",children:Ji?"提交中...":Qr==="sales"?"确认新增负责人并选中":Qr==="channel"?"确认新增渠道并选中":"确认新增商机并选中"})]})]})]}):null,$&&ur.latitude&&ur.longitude?g.jsx(PIe,{origin:q??{latitude:ur.latitude,longitude:ur.longitude},currentPoint:{latitude:ur.latitude,longitude:ur.longitude},radius:jL,currentAddress:ur.locationText,disableMobileMotion:a,onClose:()=>K(!1),onConfirm:(Y,ee)=>void Ms(Y,ee)}):null,ui?g.jsx($Ie,{item:ui,onClose:()=>Ci(null),onPreviewPhoto:(Y,ee)=>qd({url:Y,alt:ee}),onPreviewAttachment:ks,disableMobileMotion:a}):null,Pt?g.jsx(VIe,{section:ei,presenterFilter:ye,presenterKeyword:Te,presenterOptions:fc,onClose:()=>bt(!1),onPresenterFilterChange:Y=>{Rt(Y),bt(!1)},onPresenterKeywordChange:xe}):null,an&&!e?g.jsx(BIe,{section:ei,initialFilters:En,exporting:sa,exportError:rn,onClose:()=>gr(!1),onConfirm:Y=>void Vm(Y)}):null,Xd?g.jsx(eje,{url:Xd.url,alt:Xd.alt,onClose:()=>qd(null),disableMobileMotion:a}):null,Zd?g.jsx(sP,{attachment:Zd,onClose:()=>ks(null)}):null]})}function PIe({origin:t,currentPoint:e,radius:r,currentAddress:a,onClose:n,onConfirm:i,disableMobileMotion:o}){const s=E.useRef(null),l=E.useRef({}),[u,c]=E.useState(e),[d,h]=E.useState(a),[v,m]=E.useState(!0),[x,b]=E.useState(""),[w,_]=E.useState(""),[T,C]=E.useState(!1),[k,A]=E.useState(!1),M=E.useMemo(()=>IL(t.latitude,t.longitude),[t.latitude,t.longitude]),L=E.useMemo(()=>IL(e.latitude,e.longitude),[e.latitude,e.longitude]);E.useEffect(()=>{let P=!1;async function j(){if(s.current){m(!0),b("");try{const V=await iIe();if(P||!s.current)return;const I=(U,$)=>new V.LatLng(U,$),F=new V.Map(s.current,{center:I(L.latitude,L.longitude),zoom:18,pitch:0,rotation:0,mapStyleId:"style1"}),G=new V.MultiMarker({map:F,styles:{origin:new V.MarkerStyle({width:18,height:18,anchor:{x:9,y:9},src:"data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3e%3ccircle cx='9' cy='9' r='7' fill='%23ffffff' fill-opacity='0.95' stroke='%237c3aed' stroke-width='2'/%3e%3ccircle cx='9' cy='9' r='2.5' fill='%237c3aed'/%3e%3c/svg%3e"})},geometries:[{id:"origin",styleId:"origin",position:I(M.latitude,M.longitude)}]});new V.MultiCircle({map:F,styles:{allowed:new V.CircleStyle({color:"rgba(124, 58, 237, 0.14)",showBorder:!0,borderColor:"rgba(124, 58, 237, 0.55)",borderWidth:2})},geometries:[{id:"range",styleId:"allowed",center:I(M.latitude,M.longitude),radius:r}]});const O=()=>{var te,ie,ce;const U=(te=F.getCenter)==null?void 0:te.call(F),$=((ie=U==null?void 0:U.getLat)==null?void 0:ie.call(U))??(U==null?void 0:U.lat),K=((ce=U==null?void 0:U.getLng)==null?void 0:ce.call(U))??(U==null?void 0:U.lng);if(typeof $!="number"||typeof K!="number")return;const q=aJ($,K),H={latitude:Number(q.latitude.toFixed(6)),longitude:Number(q.longitude.toFixed(6))},Z=FL(t,H);Z>r?_(`仅可在原始定位附近 ${r} 米内微调,当前超出约 ${Math.round(Z-r)} 米。`):_(`当前准星距原始定位约 ${Math.round(Z)} 米。`),c(H)};F.on("moveend",O),F.on("dragend",O),O(),l.current={map:F,originMarker:G,createLatLng:I,moveHandler:O}}catch(V){P||b(V instanceof Error?V.message:"地图加载失败,请稍后重试。")}finally{P||m(!1)}}}return j(),()=>{var V,I,F,G,O,U;P=!0,(I=(V=l.current.map)==null?void 0:V.off)==null||I.call(V,"moveend",l.current.moveHandler??(()=>{})),(G=(F=l.current.map)==null?void 0:F.off)==null||G.call(F,"dragend",l.current.moveHandler??(()=>{})),(U=(O=l.current.map)==null?void 0:O.destroy)==null||U.call(O),l.current={}}},[L.latitude,L.longitude,M.latitude,M.longitude,t.latitude,t.longitude,r]),E.useEffect(()=>{let P=!1;const j=window.setTimeout(async()=>{C(!0);try{const V=await VL(u.latitude,u.longitude);P||h(V||W0())}catch{P||h(W0())}finally{P||C(!1)}},350);return()=>{P=!0,window.clearTimeout(j)}},[u.latitude,u.longitude]);const R=Math.round(FL(t,u));return g.jsxs("div",{className:"fixed inset-0 z-[95]",children:[g.jsx("button",{type:"button",onClick:n,className:Ne("absolute inset-0 bg-slate-900/40",!o&&"backdrop-blur-sm"),"aria-label":"关闭调整位置"}),g.jsxs("div",{className:"absolute inset-x-0 bottom-0 flex max-h-[92dvh] flex-col overflow-hidden rounded-t-3xl border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900 md:inset-x-auto md:left-1/2 md:top-1/2 md:bottom-auto md:w-[min(860px,92vw)] md:max-h-[84vh] md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-3xl",children:[g.jsxs("div",{className:"shrink-0 border-b border-slate-100 px-5 py-4 dark:border-slate-800 md:px-6",children:[g.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[g.jsxs("div",{children:[g.jsx("h3",{className:"text-base font-semibold text-slate-900 dark:text-white",children:"调整打卡位置"}),g.jsxs("p",{className:"crm-field-note mt-1",children:["拖动地图,让中间准星对准目标位置;仅允许在当前定位附近 ",r," 米范围内精调。"]})]}),g.jsx("button",{type:"button",onClick:n,className:"inline-flex h-9 w-9 items-center justify-center rounded-full text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"h-4 w-4"})})]}),g.jsxs("div",{className:"rounded-2xl bg-slate-50 px-4 py-3 text-xs text-slate-500 dark:bg-slate-800/70 dark:text-slate-400",children:[g.jsxs("p",{children:["原始定位:",a||W0()]}),g.jsxs("p",{className:"mt-1",children:["当前位置:距原点约 ",R," 米"]})]})]}),g.jsxs("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto px-4 py-4 md:px-6",children:[g.jsx("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-slate-100 dark:border-slate-800 dark:bg-slate-950",children:g.jsxs("div",{className:"relative h-[260px] w-full md:h-[420px]",children:[g.jsx("div",{ref:s,className:"h-full w-full"}),v?null:g.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:g.jsxs("div",{className:"relative h-12 w-12",children:[g.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-violet-500/65 bg-violet-500/10 shadow-[0_0_0_6px_rgba(139,92,246,0.12)]"}),g.jsx("div",{className:"absolute left-1/2 top-1/2 h-5 w-5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white bg-violet-600 shadow-lg"}),g.jsx("div",{className:"absolute left-1/2 top-1/2 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white"})]})}),v?g.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-sm text-slate-500",children:"地图加载中..."}):null]})}),x?g.jsx("p",{className:"text-sm text-rose-500",children:x}):null,w?g.jsx("p",{className:"text-sm text-violet-600 dark:text-violet-300",children:w}):null,g.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-slate-50 px-4 py-3 dark:border-slate-800 dark:bg-slate-900/60",children:[g.jsx("p",{className:"crm-field-note",children:"调整后地址"}),g.jsx("p",{className:"mt-1 text-sm text-slate-900 dark:text-white",children:T?"正在解析地址...":d})]})]}),g.jsx("div",{className:"shrink-0 border-t border-slate-100 bg-white px-4 py-4 pb-[calc(env(safe-area-inset-bottom)+16px)] dark:border-slate-800 dark:bg-slate-900 md:px-6",children:g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("button",{type:"button",onClick:()=>{var P,j;c(t),_("已恢复到原始定位。"),l.current.createLatLng&&((j=(P=l.current.map)==null?void 0:P.panTo)==null||j.call(P,l.current.createLatLng(M.latitude,M.longitude)))},className:"crm-btn min-w-0 flex-1 rounded-xl border border-slate-200 bg-white text-slate-700 transition-colors hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-300 dark:hover:bg-slate-700",children:"恢复原点"}),g.jsx("button",{type:"button",onClick:async()=>{A(!0);try{await i(u,d)}finally{A(!1)}},disabled:k||T||R>r||!!x,className:"crm-btn min-w-0 flex-1 rounded-xl bg-violet-600 text-white transition-colors hover:bg-violet-700 disabled:cursor-not-allowed disabled:opacity-60",children:k?"保存中...":T?"解析中...":"确认使用此位置"})]})})]})]})}function IIe({activeWorkSection:t,disableMobileMotion:e}){return g.jsx("div",{className:Ne("crm-filter-bar flex",!e&&"backdrop-blur-sm"),children:sJ.map(r=>{const a=r.key===t;return g.jsx(hh,{to:r.path,className:Ne("flex-1 rounded-lg px-4 py-2 text-center text-sm font-medium transition-colors duration-200",a?"bg-white text-violet-600 shadow-sm dark:bg-slate-800 dark:text-violet-400":"text-slate-600 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white"),children:r.label},r.path)})})}function $F({mobilePanel:t,onChange:e}){return g.jsxs("div",{className:"crm-filter-bar flex lg:hidden",children:[g.jsx("button",{type:"button",onClick:()=>e("entry"),className:Ne("rounded-lg px-4 py-1.5 text-sm font-medium transition-colors duration-200",t==="entry"?"bg-white text-violet-600 shadow-sm dark:bg-slate-800 dark:text-violet-400":"text-slate-600 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white"),children:"填写"}),g.jsx("button",{type:"button",onClick:()=>e("history"),className:Ne("rounded-lg px-4 py-1.5 text-sm font-medium transition-colors duration-200",t==="history"?"bg-white text-violet-600 shadow-sm dark:bg-slate-800 dark:text-violet-400":"text-slate-600 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white"),children:"历史"})]})}function jIe({section:t}){return g.jsxs("div",{className:"crm-card crm-card-pad rounded-2xl",children:[g.jsxs("div",{className:"mb-4 flex items-center justify-between border-b border-slate-100 pb-4 dark:border-slate-800/60",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:Ne("h-5 w-5 rounded-full",t==="checkin"?"bg-emerald-100":"bg-violet-100")}),g.jsx("div",{className:"h-5 w-24 animate-pulse rounded bg-slate-100 dark:bg-slate-800"})]}),g.jsx("div",{className:"h-6 w-14 animate-pulse rounded-full bg-slate-100 dark:bg-slate-800"})]}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-slate-50/70 p-4 dark:border-slate-800 dark:bg-slate-900/40",children:[g.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-slate-100 dark:bg-slate-800"}),g.jsx("div",{className:"mt-3 h-14 animate-pulse rounded-xl bg-slate-100 dark:bg-slate-800"})]}),g.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-slate-50/70 p-4 dark:border-slate-800 dark:bg-slate-900/40",children:[g.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[g.jsx("div",{className:"h-4 w-16 animate-pulse rounded bg-slate-100 dark:bg-slate-800"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("div",{className:"h-8 w-20 animate-pulse rounded-full bg-slate-100 dark:bg-slate-800"}),g.jsx("div",{className:"h-8 w-16 animate-pulse rounded-full bg-slate-100 dark:bg-slate-800"})]})]}),g.jsx("div",{className:"h-24 animate-pulse rounded-2xl bg-slate-100 dark:bg-slate-800"})]}),g.jsx("div",{className:"h-11 animate-pulse rounded-xl bg-slate-100 dark:bg-slate-800"})]})]})}function OIe(){return g.jsx("div",{className:"space-y-4",children:[0,1,2].map(t=>g.jsxs("div",{className:"crm-card crm-card-pad rounded-2xl",children:[g.jsxs("div",{className:"mb-3 flex items-start justify-between",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"h-8 w-8 animate-pulse rounded-full bg-slate-100 dark:bg-slate-800"}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-slate-100 dark:bg-slate-800"}),g.jsx("div",{className:"h-3 w-24 animate-pulse rounded bg-slate-100 dark:bg-slate-800"})]})]}),g.jsx("div",{className:"h-5 w-12 animate-pulse rounded-full bg-slate-100 dark:bg-slate-800"})]}),g.jsx("div",{className:"pl-11",children:g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"h-3 animate-pulse rounded bg-slate-100 dark:bg-slate-800"}),g.jsx("div",{className:"h-3 w-11/12 animate-pulse rounded bg-slate-100 dark:bg-slate-800"}),g.jsx("div",{className:"h-3 w-3/4 animate-pulse rounded bg-slate-100 dark:bg-slate-800"})]})})]},`history-skeleton-${t}`))})}function zIe({presenterFilter:t,presenterOptions:e,onOpenPresenterPicker:r}){var n;const a=t==="all"?"全部人员":((n=e.find(i=>i.value===t))==null?void 0:n.value)??t;return g.jsx("div",{className:"overflow-hidden rounded-2xl border border-slate-200/80 bg-gradient-to-br from-white via-slate-50/92 to-slate-100/85 shadow-sm dark:border-slate-800 dark:from-slate-900 dark:via-slate-900/96 dark:to-slate-950",children:g.jsx("div",{className:"flex flex-col gap-2.5 p-2.5 sm:gap-3 sm:p-3",children:g.jsxs("div",{className:"rounded-2xl border border-white/80 bg-white/95 p-2 shadow-sm dark:border-slate-700 dark:bg-slate-900/80 sm:p-2.5",children:[g.jsxs("div",{className:"mb-1.5 flex items-center justify-between gap-3 px-1",children:[g.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-slate-500 dark:text-slate-400",children:[g.jsx(Qu,{className:"h-3.5 w-3.5"}),"人员搜索"]}),g.jsxs("span",{className:"hidden text-[11px] text-slate-400 dark:text-slate-500 sm:inline",children:[e.length," 人可选"]})]}),g.jsxs("button",{type:"button",onClick:r,className:"flex w-full items-center justify-between gap-3 rounded-xl border border-slate-200 bg-slate-50 px-3 py-2.5 text-left transition-colors hover:border-violet-300 hover:bg-white dark:border-slate-700 dark:bg-slate-800/70 dark:hover:border-violet-500/40 dark:hover:bg-slate-800",children:[g.jsx("p",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-slate-900 dark:text-white",children:a}),g.jsx("span",{className:"shrink-0 rounded-full bg-violet-50 px-2 py-1 text-[11px] font-medium text-violet-600 dark:bg-violet-500/10 dark:text-violet-300",children:"筛选"})]})]})})})}function BIe({section:t,initialFilters:e,exporting:r,exportError:a,onClose:n,onConfirm:i}){const[o,s]=E.useState({...e,deptName:void 0,status:void 0}),l=!!(o.keyword||o.startDate||o.endDate||o.bizType),u=(c,d)=>{s(h=>({...h,[c]:d}))};return E.useEffect(()=>{const c=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=c}},[]),g.jsxs("div",{className:"fixed inset-0 z-[92]",children:[g.jsx("button",{type:"button",onClick:n,className:"absolute inset-0 bg-slate-900/35 backdrop-blur-sm dark:bg-slate-950/70","aria-label":"关闭导出条件"}),g.jsxs("div",{className:"absolute left-1/2 top-1/2 flex max-h-[82vh] w-[min(560px,calc(100vw-32px))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-3xl border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900",children:[g.jsx("div",{className:"shrink-0 border-b border-slate-100 px-5 py-4 dark:border-slate-800",children:g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsxs("div",{className:"px-1",children:[g.jsxs("h3",{className:"text-base font-semibold text-slate-900 dark:text-white",children:["导出",Ry(t),"记录"]}),g.jsx("p",{className:"mt-1 text-xs leading-5 text-slate-500 dark:text-slate-400",children:"选择条件后导出 Excel不填条件则导出全部可见记录。"})]}),g.jsx("button",{type:"button",onClick:n,className:"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"h-4 w-4"})})]})}),g.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-4",children:[g.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[g.jsxs("label",{className:"space-y-1.5 sm:col-span-2",children:[g.jsx("span",{className:"text-xs font-medium text-slate-500 dark:text-slate-400",children:"人员/对象/内容关键词"}),g.jsx("input",{type:"text",value:o.keyword??"",onChange:c=>u("keyword",c.target.value),placeholder:"输入人员、对象、地点或内容关键词",className:"h-10 w-full rounded-xl border border-slate-200 bg-slate-50 px-3 text-sm text-slate-700 outline-none transition-colors placeholder:text-slate-400 focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-700 dark:bg-slate-800/70 dark:text-slate-100 dark:placeholder:text-slate-500"})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-xs font-medium text-slate-500 dark:text-slate-400",children:"开始日期"}),g.jsx("input",{type:"date",value:o.startDate??"",onChange:c=>u("startDate",c.target.value),className:"h-10 w-full rounded-xl border border-slate-200 bg-slate-50 px-3 text-sm text-slate-700 outline-none transition-colors focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-700 dark:bg-slate-800/70 dark:text-slate-100","aria-label":"导出开始日期"})]}),g.jsxs("label",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-xs font-medium text-slate-500 dark:text-slate-400",children:"结束日期"}),g.jsx("input",{type:"date",value:o.endDate??"",onChange:c=>u("endDate",c.target.value),className:"h-10 w-full rounded-xl border border-slate-200 bg-slate-50 px-3 text-sm text-slate-700 outline-none transition-colors focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-700 dark:bg-slate-800/70 dark:text-slate-100","aria-label":"导出结束日期"})]}),g.jsxs("label",{className:"space-y-1.5 sm:col-span-2",children:[g.jsx("span",{className:"text-xs font-medium text-slate-500 dark:text-slate-400",children:"关联对象类型"}),g.jsx(Tt,{value:o.bizType??"",options:[{value:"",label:"全部对象类型"},{value:"sales",label:"销售人员拓展"},{value:"channel",label:"渠道拓展"},{value:"opportunity",label:"商机"}],placeholder:"全部对象类型",sheetTitle:"选择关联对象类型",className:"h-10 w-full rounded-xl border border-slate-200 bg-slate-50 px-3 text-sm text-slate-700 outline-none transition-colors focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-700 dark:bg-slate-800/70 dark:text-slate-100",onChange:c=>u("bizType",c)})]})]}),a?g.jsx("p",{className:"mt-3 text-xs text-rose-500 dark:text-rose-300",children:a}):null]}),g.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3 border-t border-slate-100 px-5 py-4 dark:border-slate-800",children:[g.jsx("button",{type:"button",onClick:()=>s({}),disabled:!l,className:"h-10 rounded-xl border border-slate-200 bg-white px-3 text-sm font-medium text-slate-600 transition-colors hover:border-violet-200 hover:text-violet-600 disabled:cursor-not-allowed disabled:text-slate-300 dark:border-slate-700 dark:bg-slate-900/60 dark:text-slate-300 dark:hover:border-violet-500/40 dark:hover:text-violet-200 dark:disabled:text-slate-600",children:"清空条件"}),g.jsxs("button",{type:"button",onClick:()=>i(o),disabled:r,className:"inline-flex h-10 items-center justify-center gap-2 rounded-xl bg-violet-600 px-4 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-violet-700 disabled:cursor-not-allowed disabled:bg-violet-300 dark:bg-violet-500 dark:hover:bg-violet-400 dark:disabled:bg-violet-500/40",children:[g.jsx(By,{className:"h-4 w-4"}),r?"导出中...":"确认导出"]})]})]})]})}function VIe({section:t,presenterFilter:e,presenterKeyword:r,presenterOptions:a,onClose:n,onPresenterFilterChange:i,onPresenterKeywordChange:o}){const s=au(),l=r.trim().toLowerCase(),u=l?a.filter(c=>c.label.toLowerCase().includes(l)||c.value.toLowerCase().includes(l)):a;return E.useEffect(()=>{const c=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=c}},[]),g.jsxs("div",{className:"fixed inset-0 z-[92]",children:[g.jsx("button",{type:"button",onClick:n,className:"absolute inset-0 bg-slate-900/35 backdrop-blur-sm dark:bg-slate-950/70","aria-label":"关闭人员筛选"}),g.jsxs("div",{className:Ne("absolute flex flex-col overflow-hidden border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900",s?"inset-x-0 bottom-0 max-h-[86dvh] rounded-t-3xl":"left-1/2 top-1/2 h-[min(72vh,720px)] w-[min(520px,calc(100vw-32px))] -translate-x-1/2 -translate-y-1/2 rounded-3xl"),children:[g.jsxs("div",{className:"shrink-0 border-b border-slate-100 px-5 py-4 dark:border-slate-800",children:[g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsxs("h3",{className:"text-base font-semibold text-slate-900 dark:text-white",children:[Ry(t),"人员筛选"]}),g.jsx("p",{className:"mt-1 text-xs leading-5 text-slate-500 dark:text-slate-400",children:"输入姓名快速搜索,人员再多也不会把历史区域挤乱。"})]}),g.jsx("button",{type:"button",onClick:n,className:"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"h-4 w-4"})})]}),g.jsxs("div",{className:"relative mt-4",children:[g.jsx(Qu,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400 dark:text-slate-500"}),g.jsx("input",{autoFocus:!0,type:"text",value:r,onChange:c=>o(c.target.value),placeholder:"搜索打卡人或提交人",className:"h-11 w-full rounded-2xl border border-slate-200 bg-slate-50 pl-10 pr-3 text-sm text-slate-900 outline-none transition-colors focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-700 dark:bg-slate-800/70 dark:text-white"})]})]}),g.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:g.jsxs("div",{className:"space-y-2",children:[g.jsxs("button",{type:"button",onClick:()=>i("all"),className:Ne("flex w-full items-center justify-between rounded-2xl border px-4 py-3 text-left transition-colors",e==="all"?"border-violet-500 bg-violet-50 text-violet-700 dark:border-violet-500/50 dark:bg-violet-500/10 dark:text-violet-200":"border-slate-200 bg-white text-slate-700 hover:border-violet-200 hover:bg-violet-50/70 dark:border-slate-800 dark:bg-slate-900/40 dark:text-slate-200 dark:hover:border-violet-500/30 dark:hover:bg-slate-800"),children:[g.jsxs("div",{children:[g.jsx("p",{className:"text-sm font-semibold",children:"全部人员"}),g.jsxs("p",{className:"mt-1 text-xs opacity-70",children:["查看全部",Ry(t),"记录"]})]}),e==="all"?g.jsx(Ip,{className:"h-4 w-4 shrink-0"}):null]}),u.map(c=>g.jsxs("button",{type:"button",onClick:()=>i(c.value),className:Ne("flex w-full items-center justify-between gap-3 rounded-2xl border px-4 py-3 text-left transition-colors",e===c.value?"border-violet-500 bg-violet-50 text-violet-700 dark:border-violet-500/50 dark:bg-violet-500/10 dark:text-violet-200":"border-slate-200 bg-white text-slate-700 hover:border-violet-200 hover:bg-violet-50/70 dark:border-slate-800 dark:bg-slate-900/40 dark:text-slate-200 dark:hover:border-violet-500/30 dark:hover:bg-slate-800"),children:[g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("p",{className:"truncate text-sm font-semibold",children:c.value}),g.jsxs("p",{className:"mt-1 text-xs opacity-70",children:[c.count," 条记录"]})]}),g.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[g.jsx("span",{className:"rounded-full bg-slate-100 px-2.5 py-1 text-[11px] font-medium text-slate-500 dark:bg-slate-800 dark:text-slate-300",children:c.count}),e===c.value?g.jsx(Ip,{className:"h-4 w-4"}):null]})]},c.value)),l&&u.length===0?g.jsx("div",{className:"crm-empty-panel px-4 py-10",children:"未找到匹配人员"}):null]})})]})]})}function FIe({date:t,count:e,expanded:r,canToggle:a,onToggle:n}){return g.jsxs("button",{type:"button",onClick:n,className:Ne("sticky top-0 z-[1] flex w-full items-center justify-between gap-3 rounded-xl border border-slate-200 bg-slate-50/96 px-3 py-2 text-left shadow-sm backdrop-blur transition-colors dark:border-slate-800 dark:bg-slate-900/96",a?"hover:border-violet-200 hover:bg-white dark:hover:border-violet-500/30 dark:hover:bg-slate-900":"cursor-default"),children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("p",{className:"text-sm font-semibold text-slate-900 dark:text-white",children:rje(t)}),g.jsx("p",{className:"text-[11px] text-slate-500 dark:text-slate-400",children:t==="未标注日期"?"未补充日期信息":`共 ${e} 条记录`})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("span",{className:"rounded-full bg-white px-2.5 py-1 text-[11px] font-medium text-slate-500 shadow-sm dark:bg-slate-800 dark:text-slate-300",children:[e," 条"]}),a?g.jsx("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full bg-white text-slate-400 shadow-sm dark:bg-slate-800 dark:text-slate-300",children:g.jsx(zy,{className:Ne("h-4 w-4 transition-transform",r?"rotate-180":"")})}):null]})]})}function GIe({item:t,index:e,onOpen:r,onPreviewPhoto:a,onPreviewAttachment:n,disableMobileMotion:i}){var u,c;const o=f_(t.content),s=o.content||"无",l=t.type==="日报"?"border-violet-200 bg-violet-50/90 text-violet-900 dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-100":"border-emerald-200 bg-emerald-50/90 text-emerald-900 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-100";return g.jsxs(Xt.div,{initial:i?!1:{opacity:0,x:20},animate:{opacity:1,x:0},transition:i?{duration:0}:{delay:e*.06},role:"button",tabIndex:0,onClick:r,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),r())},className:"crm-card crm-card-pad cursor-pointer rounded-2xl transition-shadow transition-colors hover:border-violet-100 hover:shadow-md dark:hover:border-violet-900/50",children:[g.jsxs("div",{className:"mb-3 flex items-start justify-between",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:`flex h-8 w-8 items-center justify-center rounded-full ${t.type==="日报"?"crm-tone-brand":"crm-tone-success"}`,children:t.type==="日报"?g.jsx(um,{className:"crm-icon-md"}):g.jsx(KL,{className:"crm-icon-md"})}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-sm font-semibold text-slate-900 dark:text-white",children:t.type}),g.jsx("p",{className:"text-[10px] text-slate-500 dark:text-slate-400",children:t.type==="日报"?`日报日期:${t.date||"未标注日期"}`:[t.date,t.time].filter(Boolean).join(" ")})]})]}),g.jsxs("div",{className:"flex flex-col items-end gap-1",children:[g.jsx("span",{className:`crm-pill px-2 py-0.5 text-[10px] ${t.status==="已点评"?"crm-pill-violet":t.status==="已阅"||t.status==="已提交"?"crm-pill-neutral":"crm-pill-emerald"}`,children:t.status}),t.score?g.jsxs("span",{className:"text-[10px] font-bold text-rose-600 dark:text-rose-400",children:[t.score,"分"]}):null]})]}),g.jsxs("div",{className:"pl-11",children:[o.label&&o.name?g.jsxs("div",{className:Ne("mb-3 rounded-xl border px-3 py-2.5",l),children:[g.jsx("p",{className:"text-[11px] font-semibold tracking-[0.08em] opacity-75",children:o.label}),g.jsx("p",{className:"mt-1 text-sm font-bold",children:o.name})]}):null,g.jsx("p",{className:"whitespace-pre-line text-xs leading-relaxed text-slate-700 dark:text-slate-300",children:s}),(u=t.photoUrls)!=null&&u.length?g.jsx("div",{className:"mt-3 flex gap-2 overflow-x-auto pb-1",children:t.photoUrls.map((d,h)=>g.jsx("button",{type:"button",onClick:v=>{v.stopPropagation(),a(d,`打卡照片${h+1}`)},className:"shrink-0",children:g.jsx(p2,{src:d,alt:`打卡照片${h+1}`,className:"h-16 w-16 rounded-lg border border-slate-200 object-cover dark:border-slate-700"})},`${t.id}-photo-${h}`))}):null,(c=t.attachments)!=null&&c.length?g.jsx("div",{className:"mt-3",children:g.jsx(Ey,{attachments:t.attachments,onPreview:n})}):null,t.comment?g.jsxs("div",{className:"mt-2 rounded-lg border border-slate-100 bg-slate-50 p-2.5 dark:border-slate-800/50 dark:bg-slate-800/50",children:[g.jsx("p",{className:"mb-0.5 text-[10px] font-medium text-slate-900 dark:text-white",children:"主管点评:"}),g.jsx("p",{className:"text-[10px] text-slate-600 dark:text-slate-400",children:t.comment})]}):null,g.jsx("p",{className:"mt-3 text-[11px] font-medium text-violet-600 dark:text-violet-400",children:"点击查看详情"})]})]})}function Ey({attachments:t,onPreview:e,onRemove:r,uploadProgress:a,uploadError:n,onRetryUpload:i}){return!(t!=null&&t.length)&&typeof a!="number"&&!n?null:g.jsxs("div",{className:"flex flex-wrap gap-2",children:[typeof a=="number"?g.jsxs("div",{className:"inline-flex items-center gap-2 rounded-xl border border-violet-200 bg-violet-50 px-2.5 py-1.5 text-xs text-violet-700 shadow-sm dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-200",children:[g.jsx(C0,{className:"h-3.5 w-3.5 animate-spin"}),g.jsxs("span",{children:["上传中 ",a,"%"]}),g.jsx("div",{className:"h-1.5 w-20 overflow-hidden rounded-full bg-violet-100 dark:bg-violet-500/20",children:g.jsx("div",{className:"h-full rounded-full bg-violet-600 transition-[width] dark:bg-violet-300",style:{width:`${Math.max(3,a)}%`}})})]}):null,n?g.jsxs("div",{className:"inline-flex max-w-full items-center gap-2 rounded-xl border border-rose-200 bg-rose-50 px-2.5 py-1.5 text-xs text-rose-700 shadow-sm dark:border-rose-500/30 dark:bg-rose-500/10 dark:text-rose-200",children:[g.jsx("span",{className:"max-w-[180px] truncate",children:n}),i?g.jsxs("button",{type:"button",onClick:i,className:"inline-flex shrink-0 items-center gap-1 rounded-full px-2 py-0.5 font-medium transition-colors hover:bg-rose-100 dark:hover:bg-rose-500/20",title:"重试上传",children:[g.jsx(nne,{className:"h-3 w-3"}),"重试"]}):null]}):null,(t??[]).map(o=>g.jsxs("div",{className:"inline-flex max-w-full items-center gap-2 rounded-xl border border-slate-200 bg-white px-2.5 py-1.5 text-xs text-slate-600 shadow-sm dark:border-slate-800 dark:bg-slate-900/60 dark:text-slate-300",children:[g.jsxs("button",{type:"button",onClick:()=>e(o),className:"inline-flex min-w-0 items-center gap-1.5 text-left transition-colors hover:text-violet-600 dark:hover:text-violet-300",title:"预览附件",children:[g.jsx(y_,{className:"h-3.5 w-3.5 shrink-0"}),g.jsx("span",{className:"max-w-[180px] truncate",children:o.name||"附件"}),g.jsx("span",{className:"shrink-0 text-slate-400",children:ux(o.size)})]}),r?g.jsx("button",{type:"button",onClick:()=>r(o),className:"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-slate-400 transition-colors hover:bg-rose-50 hover:text-rose-500 dark:hover:bg-rose-500/10 dark:hover:text-rose-300",title:"移除附件","aria-label":"移除附件",children:g.jsx(Oa,{className:"h-3 w-3"})}):null]},o.url))]})}function HIe({loading:t,checkInForm:e,refreshingLocation:r,onOpenObjectPicker:a,onRefreshLocation:n,onOpenLocationAdjust:i,locationAccuracyMeters:o,locationAdjustmentConfirmed:s,requiresLocationConfirmation:l,locationHint:u,onRemarkChange:c,photoInputRef:d,onPhotoChange:h,onPickPhoto:v,uploadingPhoto:m,checkInPhotoUrls:x,onRemovePhoto:b,checkInError:w,checkInSuccess:_,pageError:T,submittingCheckIn:C,onSubmit:k,disableMobileMotion:A}){const M=GL();return g.jsxs(Xt.div,{initial:A?!1:{opacity:0,y:10},animate:{opacity:1,y:0},transition:A?{duration:0}:void 0,className:"crm-card crm-card-pad rounded-2xl",children:[g.jsx("div",{className:"mb-4 flex items-center justify-between border-b border-slate-100 pb-4 dark:border-slate-800/60",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(KL,{className:"h-5 w-5 text-emerald-500 dark:text-emerald-400"}),g.jsx("h3",{className:"text-base font-semibold text-slate-900 dark:text-white",children:"外勤打卡"})]})}),g.jsx("div",{children:g.jsxs("div",{children:[g.jsx("p",{className:"mb-1 text-sm font-medium text-slate-900 dark:text-white",children:"关联对象"}),g.jsxs("button",{type:"button",onClick:a,className:"crm-btn crm-input-text flex w-full items-center justify-between rounded-xl border border-slate-200 bg-slate-50 text-left transition-colors hover:border-violet-300 hover:bg-violet-50 dark:border-slate-800 dark:bg-slate-900/60 dark:hover:border-violet-500/30",children:[g.jsxs("div",{children:[g.jsx("p",{className:"crm-field-note",children:"人员拓展 / 渠道拓展 / 商机"}),g.jsx("p",{className:`mt-1 text-sm font-medium ${e.bizName?"text-slate-900 dark:text-white":"text-slate-400 dark:text-slate-500"}`,children:e.bizName||"点击选择本次打卡关联对象"})]}),g.jsx(NG,{className:"crm-icon-md text-violet-500"})]})]})}),g.jsxs("div",{className:"mt-4",children:[g.jsxs("div",{className:"mb-2 flex items-center justify-between gap-3",children:[g.jsx("p",{className:"text-sm font-medium text-slate-900 dark:text-white",children:"当前位置"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{type:"button",onClick:i,disabled:!e.latitude||!e.longitude||r,className:"crm-btn-chip inline-flex h-8 shrink-0 items-center justify-center border-slate-200 px-3 text-slate-600 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700 dark:text-slate-200",children:"调整位置"}),g.jsxs("button",{type:"button",onClick:n,disabled:r,className:"crm-btn-chip inline-flex h-8 shrink-0 items-center justify-center gap-1.5 px-3 disabled:cursor-not-allowed disabled:opacity-60",children:[g.jsx(C0,{className:`crm-icon-sm ${r?"animate-spin":""}`}),r?"定位中":"刷新"]})]})]}),g.jsx("textarea",{rows:3,value:e.locationText,readOnly:!0,placeholder:"系统会自动定位当前位置",className:"crm-input-box-readonly crm-input-text w-full border border-slate-200 bg-slate-50 text-slate-900 outline-none dark:border-slate-800 dark:bg-slate-900/60 dark:text-white"}),u?g.jsx("p",{className:"crm-field-note mt-2",children:u}):null,o&&o>rh?g.jsx("div",{className:"mt-3 rounded-xl border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-700 dark:border-amber-500/20 dark:bg-amber-500/10 dark:text-amber-300",children:s?`当前原始定位精度约 ${Math.round(o)} 米,已完成位置确认,可以提交打卡。`:`当前原始定位精度约 ${Math.round(o)} 米,超过 ${rh} 米,暂不允许直接打卡。请先重新定位或完成位置确认。`}):null,g.jsx("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:g.jsxs("span",{className:"text-[11px] text-slate-400 dark:text-slate-500",children:["仅支持在当前位置附近 ",jL," 米内精调"]})})]}),g.jsxs("div",{className:"mt-4 rounded-2xl border border-slate-200 bg-slate-50/70 p-4 dark:border-slate-800 dark:bg-slate-900/40",children:[g.jsx("div",{className:"mb-3",children:g.jsx("p",{className:"text-sm font-medium text-slate-900 dark:text-white",children:"现场照片"})}),M?g.jsx("input",{ref:d,type:"file",accept:"image/*",capture:"environment",className:"hidden",onChange:h}):null,x.length?g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"relative overflow-hidden rounded-xl border border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-900/50",children:[g.jsx(p2,{src:x[0],alt:"打卡现场照片",className:"h-52 w-full object-cover"}),g.jsx("button",{type:"button",onClick:b,className:"absolute right-3 top-3 inline-flex h-8 w-8 items-center justify-center rounded-full bg-slate-900/75 text-white transition-colors hover:bg-slate-900",children:g.jsx(Oa,{className:"h-4 w-4"})})]}),g.jsxs("button",{type:"button",onClick:v,disabled:m||!M,className:"crm-btn crm-btn-secondary flex w-full items-center justify-center gap-2 disabled:cursor-not-allowed disabled:opacity-60",children:[g.jsx(BO,{className:"crm-icon-md"}),m?"处理中...":"重新拍照"]})]}):g.jsxs("button",{type:"button",onClick:v,disabled:m||!M,className:"flex min-h-36 w-full flex-col items-center justify-center rounded-xl border border-dashed border-slate-300 bg-white px-4 py-6 text-center transition-colors hover:border-violet-300 hover:bg-violet-50/50 disabled:cursor-not-allowed disabled:opacity-60 dark:border-slate-700 dark:bg-slate-900/50 dark:hover:border-violet-500/40 dark:hover:bg-slate-900",children:[g.jsx("div",{className:"crm-tone-brand mb-3 flex h-12 w-12 items-center justify-center rounded-full",children:g.jsx(BO,{className:"crm-icon-lg"})}),g.jsx("p",{className:"text-sm font-medium text-slate-900 dark:text-white",children:m?"照片处理中...":M?"点击拍摄现场照片":"请使用手机端拍照打卡"}),g.jsx("p",{className:"crm-field-note mt-1",children:M?"仅支持手机端直接拍照,系统会自动叠加拍摄时间和当前位置水印。":"当前设备不支持拍照打卡,请使用手机浏览器打开后现场拍照。"})]})]}),g.jsxs("div",{className:"mt-4",children:[g.jsx("p",{className:"mb-1 text-sm font-medium text-slate-900 dark:text-white",children:"打卡备注 (必填)"}),g.jsx("textarea",{rows:2,value:e.remark??"",onChange:L=>c(L.target.value),placeholder:"补充说明现场情况...",className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white text-slate-900 outline-none transition-colors focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/60 dark:text-white"})]}),w?g.jsx("div",{className:"crm-alert crm-alert-error mt-4",children:w}):null,_?g.jsx("div",{className:"crm-alert crm-alert-success mt-4",children:_}):null,T?g.jsx("div",{className:"crm-alert crm-alert-error mt-4",children:T}):null,g.jsxs("button",{type:"button",onClick:k,disabled:C||t||l,className:Ne("crm-btn crm-btn-success mt-6 flex w-full items-center justify-center gap-2 disabled:cursor-not-allowed disabled:opacity-60",A?"active:scale-100":"active:scale-[0.98]"),children:[g.jsx(Ip,{className:"crm-icon-md"}),C?"提交中...":l?"请先确认位置":"确认打卡"]})]},"checkin")}function UIe({loading:t,reportStatus:e,currentWorkDate:r,reportForm:a,reportOpportunityStageOptions:n,onAddReportLine:i,onRemoveReportLine:o,onOpenObjectPicker:s,onOpenUserPicker:l,onReportLineKeyDown:u,onReportLineChange:c,onReportLineStageChange:d,uploadingReportAttachmentIndex:h,uploadingReportAttachmentProgress:v,reportAttachmentUploadErrors:m,dailyReportFeatureLoaded:x,objectSelectionRequired:b,notifyUsersVisible:w,attachmentsVisible:_,onReportAttachmentChange:T,onRetryReportAttachment:C,onRemoveReportAttachment:k,onPreviewAttachment:A,onAddPlanItem:M,onPlanItemChange:L,onRemovePlanItem:R,reportError:P,reportSuccess:j,pageError:V,submittingReport:I,onSubmit:F,disableMobileMotion:G}){const[O,U]=E.useState(null),[$,K]=E.useState(null),[q,H]=E.useState(null),[Z,te]=E.useState(0),ie=E.useRef([]),ce=E.useRef({}),me=E.useRef(null),ze=E.useRef([]),Ce=E.useRef([]),ge=E.useRef(a.lineItems),Be=E.useRef(null),_e=E.useRef(null),Oe=E.useRef(null),xt=E.useRef(null),Ye=E.useRef([]),st=E.useRef(0),We=E.useRef(null),At=E.useRef(!1),kt=E.useRef(0),Jt=E.useRef(a.lineItems.length),Nr=E.useRef(a.planItems.length),rr=E.useRef(null),Fe=E.useRef(null);E.useEffect(()=>{ge.current=a.lineItems},[a.lineItems]);const Mt=E.useCallback(Te=>{if(!Te)return;Te instanceof HTMLTextAreaElement&&X1(Te),Te.focus();const xe=Te.value.length;Te.setSelectionRange(xe,xe)},[]),dr=E.useCallback(()=>{const Te=document.activeElement;(Te instanceof HTMLTextAreaElement||Te instanceof HTMLInputElement)&&Te.blur()},[]),ar=E.useCallback((Te,xe)=>{xe&&(ce.current[Te]={start:xe.selectionStart??xe.value.length,end:xe.selectionEnd??xe.selectionStart??xe.value.length})},[]),sa=E.useCallback(Te=>{const xe=ie.current[Te];if(xe)return document.activeElement===xe?{start:xe.selectionStart??xe.value.length,end:xe.selectionEnd??xe.selectionStart??xe.value.length}:ce.current[Te]??{start:xe.value.length,end:xe.value.length}},[]),va=E.useCallback((Te,xe)=>{if(X0.flushSync(()=>{K(null),U(Te)}),(xe==null?void 0:xe.focus)===!1)return;const Pt=ie.current[Te];if(Pt){Mt(Pt);return}requestAnimationFrame(()=>Mt(ie.current[Te]))},[Mt]),rn=E.useCallback(Te=>{X0.flushSync(()=>{U(null),K(Te)});const xe=Ce.current[Te];if(xe){Mt(xe);return}requestAnimationFrame(()=>Mt(Ce.current[Te]))},[Mt]),wa=E.useCallback(()=>{We.current!==null&&(window.clearInterval(We.current),We.current=null)},[]),En=E.useCallback(()=>{Ye.current=[],st.current=0},[]),pa=E.useCallback(()=>{var xe,Pt,bt;(xe=xt.current)==null||xe.disconnect(),(Pt=Oe.current)==null||Pt.disconnect(),xt.current=null,Oe.current=null;const Te=_e.current;_e.current=null,Te&&Te.state!=="closed"&&Te.close(),(bt=Be.current)==null||bt.getTracks().forEach(Vt=>Vt.stop()),Be.current=null,wa()},[wa]),an=E.useCallback((Te,xe,Pt)=>{const bt=ge.current[Te],Vt=xe.trim();if(!bt||!Vt)return;const Zt=ie.current[Te];let nr=(Zt==null?void 0:Zt.value)??"";bt.bizName?nr=nr||(bt.editorText?bt.editorText.replace(/\r/g,"").split(`
`).slice(1).join(`
`):Ah(bt.bizType,bt.bizName).split(`
`).slice(1).join(`
`)):nr=nr||bt.editorText||"";const _r=KIe(nr,Vt,Pt),ma=bt.bizName?`${h_(bt.bizType,bt.bizName)}
${_r}`:_r,Mr=[...ge.current];Mr[Te]={...bt,editorText:ma},ge.current=Mr,c(Te,ma);const Zr=QIe(nr,Vt,Pt);ce.current[Te]={start:Zr,end:Zr},dr()},[dr,c]),gr=E.useCallback(async(Te,xe)=>{var Vt;const Pt=ge.current[Te];if(!Pt||!Pt.bizName&&b)return;dr(),va(Te,{focus:!1});const bt=YIe();if(!((Vt=navigator.mediaDevices)!=null&&Vt.getUserMedia)||!bt){H({lineIndex:Te,targetField:"",insertionStart:xe==null?void 0:xe.start,insertionEnd:xe==null?void 0:xe.end,status:"error",error:"当前浏览器不支持语音录音,请使用新版 Chrome、Edge 或企业微信内置浏览器。"});return}try{At.current=!1,En();const Zt=await navigator.mediaDevices.getUserMedia({audio:!0}),nr=new bt;nr.state==="suspended"&&await nr.resume();const _r=nr.createMediaStreamSource(Zt),ma=nr.createScriptProcessor(4096,1,1);ma.onaudioprocess=Mr=>{if(Mr.outputBuffer.getChannelData(0).fill(0),At.current)return;const Zr=Mr.inputBuffer.getChannelData(0);Ye.current.push(new Float32Array(Zr)),st.current+=Zr.length},_r.connect(ma),ma.connect(nr.destination),Be.current=Zt,_e.current=nr,Oe.current=_r,xt.current=ma,kt.current=Date.now(),te(0),We.current=window.setInterval(()=>{te(Mr=>Mr+1)},1e3),H({lineIndex:Te,targetField:"",insertionStart:xe==null?void 0:xe.start,insertionEnd:xe==null?void 0:xe.end,status:"recording",error:""})}catch(Zt){pa(),H({lineIndex:Te,targetField:"",insertionStart:xe==null?void 0:xe.start,insertionEnd:xe==null?void 0:xe.end,status:"error",error:Zt instanceof Error?Zt.message:"无法访问麦克风,请检查浏览器权限。"})}},[va,dr,b,En,pa]),Ar=E.useCallback(()=>{const Te=q;if(!Te||Te.status!=="recording")return;const xe=Date.now()-kt.current,Pt=_e.current,bt=(Pt==null?void 0:Pt.sampleRate)||16e3,Vt=st.current,Zt=Vt?XIe(Ye.current,Vt):null;if(pa(),En(),!Zt||Vt/bt*1e3<zF){H({lineIndex:Te.lineIndex,targetField:Te.targetField,status:"error",error:xe<zF?"录音时间太短,请至少录制 1 秒后再识别。":"没有录到声音,请检查麦克风后重试。"});return}H({lineIndex:Te.lineIndex,targetField:Te.targetField,status:"transcribing",error:""});const nr=qIe(Zt,bt);nde(nr).then(_r=>{var Mr;const ma=((Mr=_r.text)==null?void 0:Mr.trim())||"";if(!ma){H({lineIndex:Te.lineIndex,targetField:Te.targetField,status:"error",error:"语音识别结果为空,请重新录音。"});return}an(Te.lineIndex,ma,Te.insertionStart!==void 0?{start:Te.insertionStart,end:Te.insertionEnd??Te.insertionStart}:void 0),H(null),te(0)}).catch(_r=>{H({lineIndex:Te.lineIndex,targetField:Te.targetField,status:"error",error:_r instanceof Error?_r.message:"语音识别失败,请重试。"})})},[q,En,pa,an]),Hr=E.useCallback(Te=>{var bt;const xe=((bt=me.current)==null?void 0:bt.lineIndex)===Te?me.current:void 0;me.current=null;const Pt=xe??sa(Te);if(dr(),(q==null?void 0:q.lineIndex)===Te&&q.status==="recording"){Ar();return}(q==null?void 0:q.status)==="recording"||(q==null?void 0:q.status)==="transcribing"||gr(Te,Pt)},[dr,sa,q,gr,Ar]);E.useEffect(()=>()=>{At.current=!0,pa()},[pa]);const ye=E.useCallback(()=>{rr.current=a.lineItems.length,i()},[i,a.lineItems.length]),Rt=E.useCallback(()=>{Fe.current=a.planItems.length,M()},[M,a.planItems.length]);return E.useEffect(()=>{if(a.lineItems.length>Jt.current){if(rr.current!==null){const Te=Math.min(rr.current,a.lineItems.length-1);U(Te),K(null),rr.current=null}}else O!==null&&O>=a.lineItems.length&&U(a.lineItems.length?a.lineItems.length-1:null);Jt.current=a.lineItems.length},[O,a.lineItems.length]),E.useEffect(()=>{if(a.planItems.length>Nr.current){if(Fe.current!==null){const Te=Math.min(Fe.current,a.planItems.length-1);K(Te),U(null),Fe.current=null}}else $!==null&&$>=a.planItems.length&&K(a.planItems.length?a.planItems.length-1:null);Nr.current=a.planItems.length},[$,a.planItems.length]),E.useEffect(()=>{ie.current.forEach(X1)},[a.lineItems]),E.useEffect(()=>{O!==null&&requestAnimationFrame(()=>Mt(ie.current[O]))},[O,Mt]),E.useEffect(()=>{$!==null&&requestAnimationFrame(()=>Mt(Ce.current[$]))},[$,Mt]),g.jsxs(Xt.div,{initial:G?!1:{opacity:0,y:10},animate:{opacity:1,y:0},transition:G?{duration:0}:void 0,className:"crm-card crm-card-pad rounded-2xl",children:[g.jsxs("div",{className:"mb-4 flex items-center justify-between border-b border-slate-100 pb-4 dark:border-slate-800/60",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(AG,{className:"h-5 w-5 text-violet-600 dark:text-violet-400"}),g.jsx("h3",{className:"text-base font-semibold text-slate-900 dark:text-white",children:"日报"})]}),g.jsx("span",{className:"crm-pill crm-pill-amber",children:t?"加载中...":NIe(e)})]}),g.jsxs("div",{children:[g.jsxs("div",{className:"mb-3 flex flex-col items-start justify-between gap-2 sm:flex-row sm:items-center",children:[g.jsxs("div",{children:[g.jsxs("label",{className:"flex items-center gap-2 text-sm font-medium text-slate-900 dark:text-white",children:[g.jsx(um,{className:"crm-icon-md text-slate-400 dark:text-slate-500"}),"今日工作内容"]}),g.jsxs("p",{className:"crm-field-note mt-1",children:["输入 ",g.jsx("span",{className:"font-semibold text-violet-600",children:"#"})," 选择对象,系统会自动补齐 ",g.jsx("span",{className:"font-semibold text-violet-600",children:"+字段"}),";也可以直接填写文字。"]})]}),g.jsxs("div",{className:"flex w-full items-center justify-between gap-2 lg:w-auto lg:justify-end",children:[g.jsxs("span",{className:"crm-pill crm-pill-neutral text-[11px]",children:["日报日期 ",r]}),g.jsx("button",{type:"button",onClick:ye,"aria-label":"添加一行今日工作内容",className:"crm-pill crm-pill-violet inline-flex h-8 w-8 items-center justify-center rounded-full p-0 transition-colors hover:bg-violet-100 dark:hover:bg-violet-500/20",children:g.jsx(Rw,{className:"crm-icon-md"})})]})]}),g.jsx("div",{className:"space-y-3",children:a.lineItems.map((Te,xe)=>{var ua;const Pt=O===xe,bt=tje(Te.editorText,"输入工作内容,或输入 # 选择对象生成字段。"),Vt=im(Te.stage,n)||Te.stage||"",Zt=g2(Te.stage,n),nr=Te.bizName?h_(Te.bizType,Te.bizName):"",_r=!Te.bizName&&!!((ua=Te.editorText)!=null&&ua.trim()),ma=_r?bt[0]:"",Mr=Te.bizName||_r?bt.slice(1):[],Zr=Te.editorText?Te.editorText.replace(/\r/g,"").split(`
`).slice(1).join(`
`):"",za=Te.attachments??[],la=h===xe,ut=v[xe]??0,Da=m[xe],Tr=(q==null?void 0:q.lineIndex)===xe?q:null,lr=b&&!Te.bizName,Ba=(Tr==null?void 0:Tr.status)==="recording",Dr=(Tr==null?void 0:Tr.status)==="transcribing",Va=!!q&&q.lineIndex!==xe&&(q.status==="recording"||q.status==="transcribing");return g.jsxs("div",{className:"relative rounded-2xl border border-slate-100/90 bg-slate-50/30 p-3 dark:border-slate-800/70 dark:bg-slate-900/20",children:[g.jsx("span",{className:"absolute -left-2 -top-2 z-10 inline-flex h-6 min-w-6 items-center justify-center rounded-full bg-violet-600 px-2 text-xs font-semibold leading-none text-white shadow-sm ring-2 ring-white dark:ring-slate-950","aria-label":`第 ${xe+1} 条`,children:xe+1}),g.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-start sm:gap-3",children:[Pt?g.jsxs("div",{className:"min-w-0 flex-1 space-y-2.5",children:[Te.bizName?g.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-2xl border border-slate-200/80 bg-slate-50/80 px-3.5 py-2.5 dark:border-slate-800 dark:bg-slate-900/30",children:[g.jsx("p",{className:"min-w-0 flex-1 text-sm font-semibold leading-6 text-slate-900 dark:text-white",children:nr}),Te.bizType==="opportunity"?g.jsx("div",{className:"w-full sm:w-[180px]",children:g.jsx(Tt,{value:Vt,placeholder:"项目阶段",sheetTitle:"项目阶段",searchable:!0,searchPlaceholder:"搜索项目阶段",options:n.map(Ze=>({value:Ze.value||"",label:Ze.label||Ze.value||""})),className:Ne("min-h-9 rounded-full border-violet-200 bg-white px-3 py-2 text-sm font-medium text-violet-700 shadow-none hover:border-violet-300 dark:border-violet-500/30 dark:bg-slate-950/40 dark:text-violet-200 dark:hover:border-violet-400",Vt?"":"text-slate-400 dark:text-slate-500"),onChange:Ze=>d(xe,Ze)})}):null,Te.bizType!=="opportunity"&&Zt?g.jsx("span",{className:"inline-flex rounded-full bg-violet-100 px-2.5 py-1 text-xs font-medium text-violet-700 dark:bg-violet-500/15 dark:text-violet-300",children:Zt}):null]}):Te.bizType==="opportunity"?g.jsx("div",{className:"w-full sm:w-[180px]",children:g.jsx(Tt,{value:Vt,placeholder:"项目阶段",sheetTitle:"项目阶段",searchable:!0,searchPlaceholder:"搜索项目阶段",options:n.map(Ze=>({value:Ze.value||"",label:Ze.label||Ze.value||""})),className:Ne("min-h-9 rounded-full border-violet-200 bg-white px-3 py-2 text-sm font-medium text-violet-700 shadow-none hover:border-violet-300 dark:border-violet-500/30 dark:bg-slate-950/40 dark:text-violet-200 dark:hover:border-violet-400",Vt?"":"text-slate-400 dark:text-slate-500"),onChange:Ze=>d(xe,Ze)})}):null,g.jsxs("div",{className:"relative",children:[g.jsx("textarea",{rows:2,ref:Ze=>{ie.current[xe]=Ze,X1(Ze)},value:Te.bizName?Zr:Te.editorText||"",onKeyDown:Ze=>u(xe,Ze),onChange:Ze=>{X1(Ze.currentTarget),c(xe,Te.bizName?`${nr}
${Ze.target.value}`:Ze.target.value),ar(xe,Ze.currentTarget)},onSelect:Ze=>ar(xe,Ze.currentTarget),onClick:Ze=>ar(xe,Ze.currentTarget),onKeyUp:Ze=>ar(xe,Ze.currentTarget),placeholder:"输入工作内容,或输入 # 选择对象生成字段。",className:"crm-input-box crm-input-text min-h-[88px] w-full resize-none overflow-hidden rounded-2xl border border-slate-200 bg-white pb-11 pr-12 leading-7 text-slate-900 outline-none transition-colors focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/60 dark:text-white"}),g.jsx("button",{type:"button",onPointerDown:Ze=>{Ze.preventDefault();const wr=sa(xe);wr&&(me.current={lineIndex:xe,...wr}),dr()},onClick:()=>Hr(xe),disabled:lr||Dr||Va,className:Ne("absolute bottom-2.5 right-2.5 inline-flex h-8 w-8 items-center justify-center rounded-full border shadow-sm transition-colors disabled:cursor-not-allowed disabled:opacity-45",Ba?"border-rose-200 bg-rose-50 text-rose-600 dark:border-rose-500/30 dark:bg-rose-500/10 dark:text-rose-300":"border-violet-200 bg-violet-50 text-violet-600 hover:bg-violet-100 dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-300 dark:hover:bg-violet-500/20"),title:lr?"请先选择关联对象":Dr?"语音识别中":Va?"其他行正在语音输入":Ba?"停止录音并识别":"语音输入到光标位置","aria-label":lr?"请先选择关联对象":"语音输入到光标位置",children:Dr?g.jsx(C0,{className:"h-4 w-4 animate-spin"}):Ba?g.jsx(mne,{className:"h-3.5 w-3.5 fill-current"}):g.jsx(Uae,{className:"h-4 w-4"})})]}),Ba||Dr||(Tr==null?void 0:Tr.status)==="error"?g.jsx("div",{className:Ne("flex items-center gap-2 rounded-xl px-3 py-2 text-xs font-medium",Ba?"bg-rose-50 text-rose-600 dark:bg-rose-500/10 dark:text-rose-300":Dr?"bg-violet-50 text-violet-600 dark:bg-violet-500/10 dark:text-violet-300":"bg-amber-50 text-amber-700 dark:bg-amber-500/10 dark:text-amber-200"),children:Ba?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"h-2 w-2 rounded-full bg-rose-500"}),g.jsxs("span",{children:["录音中 ",JIe(Z),",再次点击麦克风停止并识别"]})]}):Dr?g.jsxs(g.Fragment,{children:[g.jsx(C0,{className:"h-3.5 w-3.5 animate-spin"}),g.jsx("span",{children:"正在识别,完成后会自动写入光标位置"})]}):g.jsx("span",{children:(Tr==null?void 0:Tr.error)||"语音识别失败,请重新录音。"})}):null,_?g.jsx(Ey,{attachments:za,onPreview:A,onRemove:Ze=>k(xe,Ze.url),uploadProgress:la?ut:void 0,uploadError:Da,onRetryUpload:Da?()=>C(xe):void 0}):null]}):g.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[g.jsx("button",{type:"button",onClick:()=>va(xe),className:"min-h-[68px] w-full rounded-2xl border border-slate-200 bg-slate-50/80 px-3.5 py-3 text-left transition-colors hover:border-violet-300 dark:border-slate-800 dark:bg-slate-900/50 dark:hover:border-violet-500",children:g.jsxs("div",{className:"space-y-1.5",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx("p",{className:Ne("min-w-0 flex-1 truncate text-sm font-semibold leading-6",Te.bizName||_r?"text-slate-900 dark:text-white":"text-slate-400 dark:text-slate-500"),children:Te.bizName?nr:ma||"输入工作内容,或输入 # 选择对象生成字段。"}),Te.bizType==="opportunity"&&Zt?g.jsx("span",{className:"inline-flex rounded-full bg-violet-100 px-2.5 py-1 text-xs font-medium text-violet-700 dark:bg-violet-500/15 dark:text-violet-300",children:Zt}):null]}),g.jsx("div",{className:"space-y-0.5",children:Mr.map((Ze,wr)=>g.jsx("p",{className:Ne("truncate text-sm leading-6",Te.editorText?"text-slate-900 dark:text-white":"text-slate-400 dark:text-slate-500"),children:Ze},`report-line-preview-${xe}-${wr}`))})]})}),_?g.jsx(Ey,{attachments:za,onPreview:A,onRemove:Ze=>k(xe,Ze.url),uploadProgress:la?ut:void 0,uploadError:Da,onRetryUpload:Da?()=>C(xe):void 0}):null]}),g.jsxs("div",{className:"flex w-full shrink-0 items-center justify-end gap-2 sm:w-auto sm:self-center lg:grid lg:w-[88px] lg:grid-cols-2 lg:self-start",children:[_?g.jsx("input",{ref:Ze=>{ze.current[xe]=Ze},type:"file",className:"hidden",onChange:Ze=>T(xe,Ze)}):null,g.jsx("button",{type:"button",onClick:()=>s(xe,Te.bizType||"sales"),className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-violet-200 bg-white text-violet-600 shadow-sm transition-colors hover:bg-violet-50 hover:text-violet-700 dark:border-violet-500/30 dark:bg-slate-900/60 dark:text-violet-300 dark:hover:bg-violet-500/10",title:"选择关联对象","aria-label":"选择关联对象",children:g.jsx(NG,{className:"h-4.5 w-4.5"})}),w?g.jsx("button",{type:"button",onClick:()=>l(xe),className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-violet-200 bg-violet-50 text-violet-600 shadow-sm transition-colors hover:bg-violet-100 hover:text-violet-700 dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-300 dark:hover:bg-violet-500/20",title:"选择通知用户","aria-label":"选择通知用户",children:g.jsx(Dne,{className:"h-4.5 w-4.5"})}):null,_?g.jsx("button",{type:"button",onClick:()=>{var Ze;return(Ze=ze.current[xe])==null?void 0:Ze.click()},disabled:la,className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-slate-200 bg-white text-slate-500 shadow-sm transition-colors hover:border-violet-200 hover:bg-violet-50 hover:text-violet-600 disabled:opacity-50 dark:border-slate-700 dark:bg-slate-900/60 dark:text-slate-300 dark:hover:border-violet-500/30 dark:hover:bg-violet-500/10 dark:hover:text-violet-300",title:la?`附件上传中 ${ut}%`:"上传附件","aria-label":la?`附件上传中 ${ut}%`:"上传附件",children:la?g.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[g.jsx(C0,{className:"h-4.5 w-4.5 animate-spin"}),g.jsxs("span",{className:"text-[10px] font-medium leading-none text-slate-400",children:[ut,"%"]})]}):g.jsx(y_,{className:"h-4.5 w-4.5"})}):null,g.jsx("button",{type:"button",onClick:()=>o(xe),className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-rose-200 bg-rose-50 text-rose-500 shadow-sm transition-colors hover:bg-rose-100 hover:text-rose-600 dark:border-rose-500/30 dark:bg-rose-500/10 dark:text-rose-300 dark:hover:bg-rose-500/20",title:"删除本行",children:g.jsx(FO,{className:"h-4.5 w-4.5"})})]})]})]},`report-line-${xe}`)})})]}),g.jsx("div",{className:"my-6 border-t border-slate-100/90 dark:border-slate-800/70","aria-hidden":"true"}),g.jsxs("div",{children:[g.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[g.jsxs("label",{className:"flex items-center gap-2 text-sm font-medium text-slate-900 dark:text-white",children:[g.jsx(Rae,{className:"crm-icon-md text-slate-400 dark:text-slate-500"}),"明日工作计划"]}),g.jsx("button",{type:"button",onClick:Rt,"aria-label":"添加一行明日工作计划",className:"inline-flex h-8 w-8 items-center justify-center rounded-full bg-violet-50 text-violet-600 transition-colors hover:bg-violet-100 dark:bg-violet-500/10 dark:text-violet-400 dark:hover:bg-violet-500/20",children:g.jsx(Rw,{className:"crm-icon-md"})})]}),g.jsx("div",{className:"space-y-3",children:a.planItems.map((Te,xe)=>{const Pt=$===xe,bt=Te.content.trim()||"输入明日工作计划";return g.jsxs("div",{className:"flex items-center gap-3",children:[Pt?g.jsx("input",{type:"text",ref:Vt=>{Ce.current[xe]=Vt},value:Te.content,onChange:Vt=>L(xe,Vt.target.value),onBlur:()=>K(Vt=>Vt===xe?null:Vt),placeholder:"输入明日工作计划",className:"crm-input-box crm-input-text h-10 flex-1 rounded-xl border border-slate-200 bg-slate-50 text-slate-900 outline-none transition-colors focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/60 dark:text-white"}):g.jsx("button",{type:"button",onClick:()=>rn(xe),className:"crm-btn-sm crm-input-text flex h-10 flex-1 items-center rounded-xl border border-slate-200 bg-slate-50 text-left transition-colors hover:border-violet-300 dark:border-slate-800 dark:bg-slate-900/60 dark:hover:border-violet-500",children:g.jsx("p",{className:Ne("w-full truncate text-sm leading-6",Te.content?"text-slate-900 dark:text-white":"text-slate-400 dark:text-slate-500"),children:bt})}),g.jsx("div",{className:"flex shrink-0 items-center",children:g.jsx("button",{type:"button",onClick:()=>R(xe),className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-rose-200 bg-rose-50 text-rose-500 shadow-sm transition-colors hover:bg-rose-100 hover:text-rose-600 dark:border-rose-500/30 dark:bg-rose-500/10 dark:text-rose-300 dark:hover:bg-rose-500/20",title:"删除本行",children:g.jsx(FO,{className:"h-4.5 w-4.5"})})})]},`plan-${xe}`)})})]}),P?g.jsx("div",{className:"crm-alert crm-alert-error mt-4",children:P}):null,j?g.jsx("div",{className:"crm-alert crm-alert-success mt-4",children:j}):null,V?g.jsx("div",{className:"crm-alert crm-alert-error mt-4",children:V}):null,g.jsxs("button",{type:"button",onClick:F,disabled:I||t||!x,className:Ne("crm-btn crm-btn-primary mt-6 flex w-full items-center justify-center gap-2 disabled:cursor-not-allowed disabled:opacity-60",G?"active:scale-100":"active:scale-[0.98]"),children:[g.jsx(sne,{className:"crm-icon-md"}),I?"提交中...":"提交日报"]})]},"report")}function $Ie({item:t,onClose:e,onPreviewPhoto:r,onPreviewAttachment:a,disableMobileMotion:n}){var c,d,h;const i=f_(t.content),o=i.content||"无",s=t.type==="日报"?t.lineItems??[]:[],l=s.length>0,u=t.type==="日报"?"border-violet-200 bg-violet-50/90 text-violet-900 dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-100":"border-emerald-200 bg-emerald-50/90 text-emerald-900 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-100";return g.jsxs(g.Fragment,{children:[g.jsx(Xt.button,{type:"button",onClick:e,initial:{opacity:0},animate:{opacity:1},className:Ne("fixed inset-0 z-[95] bg-slate-900/45",!n&&"backdrop-blur-sm"),"aria-label":"关闭历史详情"}),g.jsxs(Xt.div,{initial:{x:"100%",y:0},animate:{x:0,y:0},transition:{type:"spring",damping:25,stiffness:200},className:"fixed inset-x-0 bottom-0 z-[96] flex h-[90dvh] w-full flex-col rounded-t-3xl border border-slate-200 bg-white shadow-2xl transition-opacity dark:border-slate-800 dark:bg-slate-900 sm:inset-y-0 sm:right-0 sm:left-auto sm:h-full sm:w-[min(760px,92vw)] sm:max-w-none sm:rounded-none sm:rounded-l-3xl sm:border-l lg:w-[min(820px,88vw)]",children:[g.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4 dark:border-slate-800 sm:px-6",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"h-1.5 w-10 rounded-full bg-slate-200 sm:hidden dark:bg-slate-700"}),g.jsx("h3",{className:"text-base font-semibold text-slate-900 dark:text-white sm:text-lg",children:t.type||"历史记录详情"})]}),g.jsx("button",{type:"button",onClick:e,className:"inline-flex h-9 w-9 items-center justify-center rounded-full text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800","aria-label":"关闭",children:g.jsx(Oa,{className:"crm-icon-md"})})]}),g.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-4 pb-[calc(env(safe-area-inset-bottom)+20px)] sm:px-6 sm:py-5",children:[g.jsx("div",{children:g.jsx("p",{className:"text-xs font-medium text-slate-400 dark:text-slate-500",children:t.type==="日报"?`日报日期:${t.date||"未标注日期"}`:[t.date,t.time].filter(Boolean).join(" ")||"无时间信息"})}),g.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[t.status?g.jsx("span",{className:Ne("rounded-full px-2.5 py-1 text-xs font-medium",t.status==="已点评"?"bg-violet-50 text-violet-600 dark:bg-violet-500/10 dark:text-violet-400":t.status==="已阅"||t.status==="已提交"?"bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-400":"bg-emerald-50 text-emerald-600 dark:bg-emerald-500/10 dark:text-emerald-400"),children:t.status}):null,t.score?g.jsxs("span",{className:"text-xs font-bold text-rose-600 dark:text-rose-400",children:[t.score,"分"]}):null,(c=t.photoUrls)!=null&&c.length?g.jsxs("span",{className:"rounded-full bg-slate-100 px-2.5 py-1 text-xs text-slate-500 dark:bg-slate-800 dark:text-slate-400",children:[t.photoUrls.length," 张照片"]}):null]}),i.label&&i.name?g.jsxs("section",{className:Ne("mt-4 rounded-2xl border px-4 py-3.5",u),children:[g.jsx("p",{className:"text-xs font-semibold tracking-[0.08em] opacity-75",children:i.label}),g.jsx("p",{className:"mt-1.5 text-lg font-bold",children:i.name})]}):null,l?g.jsxs("section",{className:"mt-4",children:[g.jsx("p",{className:"mb-3 text-xs font-medium text-slate-500 dark:text-slate-400",children:"记录内容"}),g.jsx("div",{className:"space-y-3",children:s.map((v,m)=>{const x=v.attachments??[];return g.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-slate-50/70 p-4 dark:border-slate-800 dark:bg-slate-900/40",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsxs("span",{className:"rounded-full bg-violet-50 px-2.5 py-1 text-xs font-semibold text-violet-600 dark:bg-violet-500/10 dark:text-violet-300",children:["记录 ",m+1]}),v.bizName?g.jsxs("span",{className:"text-xs font-medium text-slate-500 dark:text-slate-400",children:[nm(v.bizType)," · ",v.bizName]}):null]}),g.jsx("p",{className:"mt-3 whitespace-pre-line text-sm leading-7 text-slate-800 dark:text-slate-200",children:WIe(v)||"无"}),x.length?g.jsxs("div",{className:"mt-3 border-t border-slate-200/70 pt-3 dark:border-slate-800",children:[g.jsxs("p",{className:"mb-2 text-xs font-medium text-slate-500 dark:text-slate-400",children:["本条附件 · ",x.length," 个"]}),g.jsx(Ey,{attachments:x,onPreview:a})]}):null]},`${t.id}-report-line-${m}`)})})]}):g.jsxs("section",{className:"mt-4 rounded-2xl border border-slate-100 bg-slate-50/70 p-4 dark:border-slate-800 dark:bg-slate-900/40",children:[g.jsx("p",{className:"text-xs font-medium text-slate-500 dark:text-slate-400",children:"记录内容"}),g.jsx("p",{className:"mt-2 whitespace-pre-line text-sm leading-7 text-slate-800 dark:text-slate-200",children:o})]}),(d=t.photoUrls)!=null&&d.length?g.jsxs("section",{className:"mt-4",children:[g.jsx("p",{className:"mb-3 text-sm font-medium text-slate-900 dark:text-white",children:"现场照片"}),g.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:t.photoUrls.map((v,m)=>g.jsxs("button",{type:"button",onClick:()=>r(v,`${t.type||"历史"}照片${m+1}`),className:Ne("overflow-hidden rounded-2xl border border-slate-200 bg-white text-left dark:border-slate-700 dark:bg-slate-900/50",n?"transition-colors":"transition-transform hover:scale-[1.01]"),children:[g.jsx(p2,{src:v,alt:`${t.type||"历史"}照片${m+1}`,className:"h-28 w-full object-cover"}),g.jsx("div",{className:"crm-field-note px-3 py-2",children:"点击查看大图"})]},`${t.id}-detail-photo-${m}`))})]}):null,(h=t.attachments)!=null&&h.length?g.jsxs("section",{className:"mt-4",children:[g.jsx("p",{className:"mb-3 text-sm font-medium text-slate-900 dark:text-white",children:"日报附件"}),g.jsx(Ey,{attachments:t.attachments,onPreview:a})]}):null,t.comment?g.jsxs("section",{className:"mt-4 rounded-2xl border border-slate-100 bg-white p-4 dark:border-slate-800 dark:bg-slate-900/40",children:[g.jsx("p",{className:"text-xs font-medium text-slate-500 dark:text-slate-400",children:"主管点评"}),g.jsx("p",{className:"mt-2 whitespace-pre-line text-sm leading-7 text-slate-800 dark:text-slate-200",children:t.comment})]}):null]})]})]})}function WIe(t){var a;const e=(a=t.content)==null?void 0:a.trim();if(e)return e;const r=dx(t.editorText).trim();return r?r.replace(/\r/g,"").split(`
`).filter(n=>!n.trim().startsWith("#")).join(`
`).trim():""}function YIe(){return window.AudioContext||window.webkitAudioContext||null}function XIe(t,e){const r=new Float32Array(e);let a=0;for(const n of t)r.set(n,a),a+=n.length;return r}function qIe(t,e){const r=ZIe(t,e);return new File([r],`report-speech-${Date.now()}.wav`,{type:"audio/wav"})}function ZIe(t,e){const n=new ArrayBuffer(44+t.length*2),i=new DataView(n);Y1(i,0,"RIFF"),i.setUint32(4,36+t.length*2,!0),Y1(i,8,"WAVE"),Y1(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,e,!0),i.setUint32(28,e*2,!0),i.setUint16(32,2,!0),i.setUint16(34,16,!0),Y1(i,36,"data"),i.setUint32(40,t.length*2,!0);let o=44;for(let s=0;s<t.length;s+=1){const l=Math.max(-1,Math.min(1,t[s]));i.setInt16(o,l<0?l*32768:l*32767,!0),o+=2}return new Blob([n],{type:"audio/wav"})}function Y1(t,e,r){for(let a=0;a<r.length;a+=1)t.setUint8(e+a,r.charCodeAt(a))}function KIe(t,e,r){const a=e.replace(/\s+/g," ").trim();if(!a)return t;const n=t.replace(/\r/g,"");if(!n.trim())return a;const{start:i,end:o}=hJ(r,n.length),s=n.slice(0,i),l=n.slice(o),u=s&&!d_(s,a)?" ":"",c=l&&!d_(a,l)?" ":"";return`${s}${u}${a}${c}${l}`}function QIe(t,e,r){const a=e.replace(/\s+/g," ").trim(),n=t.replace(/\r/g,""),{start:i,end:o}=hJ(r,n.length),s=n.slice(0,i),l=n.slice(o),u=s&&!d_(s,a)?" ":"",c=l&&!d_(a,l)?" ":"";return s.length+u.length+a.length+c.length}function hJ(t,e){if(!t)return{start:e,end:e};const r=Math.max(0,Math.min(e,t.start)),a=Math.max(r,Math.min(e,t.end));return{start:r,end:a}}function d_(t,e){const r=t.slice(-1),a=e.charAt(0);return!r||!a||/\s/.test(r)||/^[,。!?;:、,.!?;:)]/.test(a)||/[,。!?;:、]$/.test(r)?!0:/[\u4e00-\u9fff]/.test(r)&&/[\u4e00-\u9fff]/.test(a)}function JIe(t){const e=Math.floor(t/60),r=t%60;return`${String(e).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function eje({url:t,alt:e,onClose:r,disableMobileMotion:a}){return g.jsxs("div",{className:"fixed inset-0 z-[100]",children:[g.jsx("button",{type:"button",onClick:r,className:Ne("absolute inset-0 bg-slate-950/82",!a&&"backdrop-blur-sm"),"aria-label":"关闭照片预览"}),g.jsxs("div",{className:"absolute inset-0 flex items-center justify-center px-4 py-6",children:[g.jsx("button",{type:"button",onClick:r,className:"absolute right-4 top-4 inline-flex h-10 w-10 items-center justify-center rounded-full bg-white/10 text-white transition-colors hover:bg-white/20","aria-label":"关闭",children:g.jsx(Oa,{className:"h-5 w-5"})}),g.jsx(p2,{src:t,alt:e,className:"max-h-full max-w-full rounded-2xl object-contain shadow-2xl"})]})]})}function X1(t){if(!t)return;t.style.height="auto";const e=Number.parseFloat(window.getComputedStyle(t).minHeight||"0"),r=Number.isFinite(e)&&e>0?e:88;t.style.height=`${Math.max(t.scrollHeight,r)}px`}function tje(t,e){if(!(t!=null&&t.trim()))return[e];const r=t.replace(/\r/g,"").split(`
`).map(n=>n.trim()).filter(Boolean);if(!r.length)return[e];const a=r.slice(0,3);if(r.length>a.length){const n=a.length-1;a[n]=`${a[n]} …`}return a}function f_(t){if(!(t!=null&&t.trim()))return{label:"",name:"",content:""};let e="",r="";const a=t.replace(/\r/g,"").split(`
`).filter(n=>{const o=n.trim().match(/^(提交人|打卡人)\s*(.+)$/);return!o||e?!0:(e=o[1],r=o[2].trim(),!1)});return{label:e,name:r,content:a.join(`
`).trim()}}function rje(t){if(!t||t==="未标注日期")return"未标注日期";const e=new Date(`${t}T00:00:00`);return Number.isNaN(e.getTime())?t:fP(e,"M月d日 EEEE",{locale:eJ})}function vJ(t){return[t.type||"unknown",t.id??"no-id",t.date||"no-date",t.time||"no-time",t.status||"no-status",t.content||""].join("::")}function BL(t){const e=new Map;for(const r of t)e.set(vJ(r),r);return Array.from(e.values())}function aje(t,e){return BL([...t,...e])}function WF({title:t,accent:e,compact:r=!1}){return g.jsxs("div",{className:`flex items-center gap-2 ${r?"mb-0":"mb-2"}`,children:[g.jsx("div",{className:`h-6 w-1 rounded-full ${e}`}),g.jsx("h2",{className:"text-base font-semibold text-slate-900 dark:text-white sm:text-lg",children:t})]})}function wd(t){return typeof t=="string"?t.trim():""}function nje(t){return/[-+]?\d+\.\d+\s*,\s*[-+]?\d+\.\d+/.test(t)}function nd(t){const e=wd(t);return!e||e.includes("坐标")||nje(e)?!1:e.length>=6}function kA(t){const e=wd(t);return e?/(街道|大道|路|街|巷|号|栋|座|室|园区|商务区|广场|大厦|中心|大楼|社区)/.test(e):!1}function ije(t,e){return`${t.toFixed(5)},${e.toFixed(5)}`}function oje(t){if(typeof window>"u")return"";try{const e=window.localStorage.getItem(c_);if(!e)return"";const r=JSON.parse(e),a=r==null?void 0:r[t];return!a||typeof a.expiresAt!="number"||a.expiresAt<=Date.now()?(a&&(delete r[t],window.localStorage.setItem(c_,JSON.stringify(r))),""):wd(a.value)}catch{return""}}function YF(t,e){if(!(typeof window>"u"||!e))try{const r=window.localStorage.getItem(c_),a=r?JSON.parse(r):{};a[t]={value:e,expiresAt:Date.now()+gIe},window.localStorage.setItem(c_,JSON.stringify(a))}catch{}}async function VL(t,e,r){const a=ije(t,e),n=wd(r);if(nd(n)&&kA(n))return $1.set(a,n),YF(a,n),n;const i=$1.get(a);if(nd(i)&&kA(i))return i;const o=oje(a);if(nd(o)&&kA(o))return $1.set(a,o),o;for(let s=0;s<2;s+=1)try{const l=await ede(t,e);if(nd(l)){const u=wd(l);return $1.set(a,u),YF(a,u),u}}catch{}return nd(o)?wd(o):nd(i)?wd(i):nd(n)?n:""}function W0(){return"当前位置待补充,请点击“刷新定位”重新解析地点名称"}function FL(t,e){const r=u=>u*Math.PI/180,n=r(e.latitude-t.latitude),i=r(e.longitude-t.longitude),o=r(t.latitude),s=r(e.latitude),l=Math.sin(n/2)**2+Math.cos(o)*Math.cos(s)*Math.sin(i/2)**2;return 2*6371e3*Math.asin(Math.sqrt(l))}function sje(t){return t==="/work"||t==="/work/"?null:t.startsWith("/work/checkin")?"checkin":t.startsWith("/work/report")?"report":null}function Ry(t){return t==="checkin"?"打卡":"日报"}function lje(){if(typeof window>"u")return null;try{const t=window.sessionStorage.getItem("userProfile");return t?JSON.parse(t):null}catch{return null}}function uje(t){return((t==null?void 0:t.roleCodes)??[]).some(e=>(e==null?void 0:e.trim().toLowerCase())==="only_see")}function XF(t){const e=new Set;return t.filter(r=>m2(r.id)).filter(r=>e.has(r.id)?!1:(e.add(r.id),!0)).map(r=>({id:r.id,label:OL(r)}))}function qF(t){const e=new Set;return t.filter(r=>m2(r.id)).filter(r=>e.has(r.id)?!1:(e.add(r.id),!0)).map(r=>({id:r.id,label:r.name||`拓展渠道#${r.id}`}))}function ZF(t){const e=new Set;return t.filter(r=>m2(r.id)).filter(r=>e.has(r.id)?!1:(e.add(r.id),!0)).map(r=>({id:r.id,label:r.name||`商机#${r.id}`}))}function m2(t){return typeof t=="string"?!!t.trim():typeof t=="number"&&Number.isSafeInteger(t)&&t>0}function nm(t){return t==="sales"?"人员拓展":t==="channel"?"渠道拓展":"商机"}function KF(t,e,r,a){return t==="sales"?e:t==="channel"?r:a}function QF(t){return t.replace(/[#@]+/g,"").trimStart()}function im(t,e){const r=(t==null?void 0:t.trim())||"";if(!r)return"";const a=e.find(i=>(i.value||"").trim()===r);if(a!=null&&a.value)return a.value;const n=e.find(i=>(i.label||"").trim()===r);return n!=null&&n.value?n.value:""}function g2(t,e){const r=(t==null?void 0:t.trim())||"";if(!r)return"";const a=e.find(i=>(i.value||"").trim()===r);if(a!=null&&a.label)return a.label;const n=e.find(i=>(i.label||"").trim()===r);return n!=null&&n.label?n.label:r}function pJ(t){return[...vIe[t]]}function cje(t,e){return t==="opportunity"&&e===Zu?[Zu,Xs]:[e]}function h_(t,e){return`#${nm(t)} ${e}`}function Nh(t){var r;const e=[];for(const a of t??[]){if(!(a!=null&&a.userId)||e.some(i=>i.userId===a.userId))continue;const n=(a.name||a.username||`用户${a.userId}`).trim();e.push({userId:a.userId,name:n,username:((r=a.username)==null?void 0:r.trim())||void 0})}return e}function mJ(t){const e=Nh(t).map(r=>r.name).filter(Boolean);return e.length?`To${e.join("、")}`:""}function gJ(t){return/^\s*to\s*[:]/i.test(t)}function dx(t,e=!0){const r=(t||"").replace(/\r/g,"").split(`
`).filter(a=>!gJ(a)).join(`
`);return e?r.trim():r}function Py(t,e,r=!0){const a=dx(t,r),n=mJ(e);return n?a.trim().length>0?`${a}${a.endsWith(`
`)?"":`
`}${n}`:n:a}function Ah(t,e,r,a){const n=[h_(t,e)];for(const o of pJ(t)){const s=(r==null?void 0:r[o])||"";n.push(`+ ${o}${s}`)}const i=mJ(a);return i&&n.push(i),n.join(`
`)}function dje(t){return{...fh(),bizType:t.bizType,workDate:t.workDate,attachments:t.attachments??[],toUsers:t.toUsers??[],editorText:Py("",t.toUsers)}}function Iy(t,e){const r={},a=pJ(t);let n=null;for(const i of e.replace(/\r/g,"").split(`
`)){const o=fje(i,t,a);if(o){n=o.field,o.field&&(r[o.field]=o.value);continue}if(gJ(i)){n=null;continue}if(i.startsWith("#")||i.startsWith("@")){n=null;continue}if(n){const s=i.trim();if(!s)continue;r[n]=r[n]?`${r[n]}
${s}`:s}}return r}function fje(t,e,r){const a=t.match(/^[+#]\s*(.*)$/);if(!a)return null;const n=a[1].trim();for(const i of r)for(const o of cje(e,i)){if(!n.startsWith(o))continue;const s=n.slice(o.length).trimStart();return s?s.startsWith("")||s.startsWith(":")?{field:i,value:s.slice(1).trim()}:{field:null,value:""}:{field:i,value:""}}return{field:null,value:""}}function Lw(t,e,r,a){return Ah(t,e,Iy(t,r),a)}function hje(t,e){const r={...fh(),...t};if(r.toUsers=Nh(r.toUsers),!r.bizId||!r.bizName){const i=dx(r.editorText||r.content||"");return{...r,editorText:Py(i,r.toUsers),content:i}}const a={};if(r.bizType==="sales"||r.bizType==="channel")a.沟通内容=r.evaluationContent||Sd(r.content,"沟通内容")||"",a[Xs]=r.nextPlan||Sd(r.content,Xs)||"";else{a.项目最新进展=r.latestProgress||Sd(r.content,"项目最新进展")||"";const i=r.stage||Sd(r.content,u_)||"";a[u_]=g2(i,e),a[Zu]=r.nextPlan||xJ(r.content,[Zu,Xs])||"",r.stage=im(i,e)||r.stage||""}const n=r.bizName||"未命名对象";return r.editorText=Lw(r.bizType,n,r.editorText||Ah(r.bizType,n,a),r.toUsers),r}function vje(t,e,r){var u,c;const a=((u=t.bizName)==null?void 0:u.trim())||"",n=Nh(t.toUsers);if(!t.bizId||!a)return xIe(e,t.editorText||t.content||"",t.attachments,n);const i=Iy(t.bizType,t.editorText||""),o=a?Ah(t.bizType,a,i,n):"",s=Iy(t.bizType,o),l=t.bizType==="opportunity"?im(t.stage,r)||((c=t.stage)==null?void 0:c.trim())||"":t.stage;return{...t,workDate:e,bizName:a,stage:l,attachments:t.attachments??[],toUsers:n,editorText:o,content:yJ(t.bizType,s,l,r)}}function pje(t,e,r){if(e&&r)return t;const a={...t};return e||(a.toUsers=[],a.editorText=dx(a.editorText)),r||(a.attachments=[]),a}function mje(t,e,r){var a,n,i,o,s;for(const l of t){if(!l.bizId||!l.bizName){if(r)throw new Error("请使用 # 选择日报关联对象");if(!((a=l.editorText)!=null&&a.trim())&&!((n=l.content)!=null&&n.trim()))throw new Error("请填写今日工作内容");continue}if(!l.editorText)throw new Error("请完整填写选择对象后的工作内容");const u=Iy(l.bizType,l.editorText);if(l.bizType==="opportunity"){if(!((i=u.项目最新进展)!=null&&i.trim()))throw new Error(`商机“${l.bizName}”请填写项目最新进展`);if(!((o=l.stage)!=null&&o.trim()))throw new Error(`商机“${l.bizName}”请选择项目阶段`);if(e.length>0&&!im(l.stage,e))throw new Error(`商机“${l.bizName}”的项目阶段无效,请按字典选择`);continue}if(!((s=u.沟通内容)!=null&&s.trim()))throw new Error(`${nm(l.bizType)}“${l.bizName}”请填写沟通内容`)}}function yJ(t,e,r,a=[]){if(t==="opportunity"){const n=g2(r,a);return[e.项目最新进展?`项目最新进展:${e.项目最新进展}`:"",n?`${u_}${n}`:"",e[Zu]?`${Zu}${e[Zu]}`:""].filter(Boolean).join(`
`)}return[e.沟通内容?`沟通内容:${e.沟通内容}`:"",e[Xs]?`${Xs}${e[Xs]}`:""].filter(Boolean).join(`
`)}function gje(t){return t.map((e,r)=>{if(!e.bizId||!e.bizName)return`${r+1}. ${e.workDate} ${e.content||e.editorText||""}`;const a=Iy(e.bizType,e.editorText||""),n=yJ(e.bizType,a,e.stage).replace(/\n/g,"");return`${r+1}. ${e.workDate} 跟进${nm(e.bizType)}“${e.bizName||""}”:${n}`}).join(`
`)}function yje(t){return t.map((e,r)=>`${r+1}. ${e.content.trim()}`).join(`
`)}function Sd(t,e){var a;if(!t)return"";const r=t.match(new RegExp(`${e}([^
]+)`));return((a=r==null?void 0:r[1])==null?void 0:a.trim())||""}function xJ(t,e){for(const r of e){const a=Sd(t,r);if(a)return a}return""}function xje(t){return t?t.bizType==="opportunity"?kr(t.nextPlan||xJ(t.content,[Zu,Xs])):kr(t.nextPlan||Sd(t.content,Xs)):""}async function bje(t,e){const r=URL.createObjectURL(t);try{const a=await _je(r),n=document.createElement("canvas");n.width=a.naturalWidth,n.height=a.naturalHeight;const i=n.getContext("2d");if(!i)throw new Error("图片处理失败");i.drawImage(a,0,0);const o=fP(new Date,"yyyy-MM-dd HH:mm:ss"),s=wje(e),l=[o,s],u=Math.max(28,Math.round(n.width/28));i.font=`${u}px sans-serif`,i.textBaseline="bottom";const c=n.width*.58,d=l.flatMap(k=>Sje(i,k,c)),h=Math.round(u*.6),v=Math.round(u*.45),m=Math.round(u*1.35),x=d.reduce((k,A)=>Math.max(k,i.measureText(A).width),0),b=Math.ceil(x+h*2),w=Math.ceil(m*d.length+v*2),_=n.width-b-h,T=n.height-v;i.fillStyle="rgba(15, 23, 42, 0.68)",i.fillRect(_-h,T-w+v,b,w),i.fillStyle="#ffffff",d.forEach((k,A)=>{const M=T-m*(d.length-1-A);i.fillText(k,_,M)});const C=await new Promise((k,A)=>{n.toBlob(M=>{if(!M){A(new Error("图片处理失败"));return}k(M)},"image/jpeg",.92)});return new File([C],t.name.replace(/\.[^.]+$/,"")+"-stamped.jpg",{type:"image/jpeg"})}finally{URL.revokeObjectURL(r)}}function wje(t){const e=t.replace(/\s+/g," ").trim();return e?e.length>48?`${e.slice(0,48)}...`:e:"位置待补充"}function Sje(t,e,r){if(!e)return[""];if(t.measureText(e).width<=r)return[e];const a=[];let n="";for(const i of e){const o=`${n}${i}`;n&&t.measureText(o).width>r?(a.push(n),n=i):n=o}return n&&a.push(n),a}function GL(){if(typeof navigator>"u")return!1;const t=navigator.userAgent||"";return/Android|iPhone|iPod|Mobile|HarmonyOS/i.test(t)}function _je(t){return new Promise((e,r)=>{const a=new Image;a.onload=()=>e(a),a.onerror=()=>r(new Error("图片读取失败")),a.src=t})}const Tje={violet:{halo:"from-violet-500/18 via-fuchsia-500/10 to-cyan-400/10 dark:from-violet-400/16 dark:via-fuchsia-400/10 dark:to-cyan-300/10",iconWrap:"bg-violet-100 text-violet-700 ring-violet-200 dark:bg-violet-500/15 dark:text-violet-200 dark:ring-violet-400/20",accentText:"text-violet-600 dark:text-violet-300",confirmButton:"bg-violet-600 text-white shadow-[0_14px_34px_rgba(124,58,237,0.28)] hover:bg-violet-700 dark:bg-violet-500 dark:hover:bg-violet-400"},amber:{halo:"from-amber-400/20 via-orange-400/12 to-rose-400/10 dark:from-amber-300/18 dark:via-orange-300/12 dark:to-rose-300/10",iconWrap:"bg-amber-100 text-amber-700 ring-amber-200 dark:bg-amber-500/15 dark:text-amber-100 dark:ring-amber-400/20",accentText:"text-amber-700 dark:text-amber-200",confirmButton:"bg-amber-500 text-slate-950 shadow-[0_14px_34px_rgba(245,158,11,0.28)] hover:bg-amber-400 dark:bg-amber-400 dark:hover:bg-amber-300"},emerald:{halo:"from-emerald-400/20 via-teal-400/12 to-cyan-400/10 dark:from-emerald-300/18 dark:via-teal-300/12 dark:to-cyan-300/10",iconWrap:"bg-emerald-100 text-emerald-700 ring-emerald-200 dark:bg-emerald-500/15 dark:text-emerald-100 dark:ring-emerald-400/20",accentText:"text-emerald-700 dark:text-emerald-200",confirmButton:"bg-emerald-600 text-white shadow-[0_14px_34px_rgba(5,150,105,0.28)] hover:bg-emerald-700 dark:bg-emerald-500 dark:hover:bg-emerald-400"},slate:{halo:"from-slate-400/18 via-slate-300/12 to-slate-200/8 dark:from-slate-500/18 dark:via-slate-400/12 dark:to-slate-300/8",iconWrap:"bg-slate-100 text-slate-700 ring-slate-200 dark:bg-slate-800 dark:text-slate-100 dark:ring-slate-700",accentText:"text-slate-700 dark:text-slate-200",confirmButton:"bg-slate-900 text-white shadow-[0_14px_34px_rgba(15,23,42,0.24)] hover:bg-slate-800 dark:bg-slate-100 dark:text-slate-950 dark:hover:bg-white"}};function bJ({title:t,description:e,icon:r,tone:a="violet",children:n,confirmText:i="确认",cancelText:o="取消",onConfirm:s,onClose:l,loading:u=!1,hideCancel:c=!1}){const d=E.useId(),h=E.useId(),v=Tje[a];return E.useEffect(()=>{const m=x=>{x.key==="Escape"&&!u&&l()};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[u,l]),g.jsxs(g.Fragment,{children:[g.jsx(Xt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:u?void 0:l,className:"fixed inset-0 z-[160] bg-slate-900/45 backdrop-blur-sm dark:bg-slate-950/78"}),g.jsx("div",{className:"fixed inset-0 z-[170] flex items-center justify-center p-4",children:g.jsxs(Xt.div,{initial:{opacity:0,y:18,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:18,scale:.98},transition:{duration:.18},role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":e?h:void 0,className:"relative w-full max-w-lg overflow-hidden rounded-[30px] border border-white/60 bg-white/95 shadow-[0_28px_90px_rgba(15,23,42,0.28)] dark:border-slate-700/80 dark:bg-slate-950/96",children:[g.jsx("div",{className:Ne("pointer-events-none absolute inset-x-6 top-0 h-32 rounded-full bg-gradient-to-r blur-3xl",v.halo)}),g.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-white/80 to-transparent dark:via-slate-400/30"}),g.jsxs("div",{className:"relative px-5 pb-5 pt-5 sm:px-6 sm:pb-6 sm:pt-6",children:[g.jsxs("div",{className:"flex items-start gap-4",children:[g.jsx("div",{className:Ne("flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl ring-1",v.iconWrap),children:r}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("p",{className:Ne("text-xs font-semibold uppercase tracking-[0.22em]",v.accentText),children:"操作确认"}),g.jsx("h3",{id:d,className:"mt-2 text-xl font-semibold tracking-tight text-slate-900 dark:text-white",children:t}),e?g.jsx("p",{id:h,className:"mt-2 text-sm leading-6 text-slate-600 dark:text-slate-300",children:e}):null]}),g.jsx("button",{type:"button","aria-label":"关闭弹窗",onClick:u?void 0:l,className:"rounded-full p-2 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700 disabled:cursor-not-allowed disabled:opacity-60 dark:hover:bg-slate-800 dark:hover:text-slate-200",disabled:u,children:g.jsx(Oa,{className:"h-5 w-5"})})]}),n?g.jsx("div",{className:"mt-5 rounded-[24px] border border-slate-200/80 bg-slate-50/90 p-4 shadow-inner shadow-white/40 dark:border-slate-800/80 dark:bg-slate-900/70 dark:shadow-none",children:n}):null,g.jsxs("div",{className:"mt-6 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end",children:[c?null:g.jsx("button",{type:"button",onClick:l,disabled:u,className:"inline-flex h-11 items-center justify-center rounded-2xl border border-slate-200 bg-white px-4 text-sm font-medium text-slate-700 transition-colors hover:border-slate-300 hover:bg-slate-50 disabled:cursor-not-allowed disabled:opacity-60 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:border-slate-600 dark:hover:bg-slate-800",children:o}),g.jsx("button",{type:"button",onClick:()=>void s(),disabled:u,className:Ne("inline-flex h-11 items-center justify-center rounded-2xl px-5 text-sm font-semibold transition-all disabled:cursor-not-allowed disabled:opacity-60",v.confirmButton),children:u?"处理中...":i})]})]})]})})]})}const JF=[{key:"opportunities",label:"商机",icon:g_},{key:"sales",label:"拓展销售人员",icon:x_},{key:"channels",label:"拓展渠道",icon:q0}];function Cje(){const t=localStorage.getItem("activeTenantId"),e=Number(t||0);return Number.isSafeInteger(e)?e:0}function Qc(t){return t?`${t.displayName||t.username} (${t.username})`:"未选择"}function NA(t,e){const r=e.trim().toLowerCase();return r?t.filter(a=>`${a.name||""} ${a.code||""}`.toLowerCase().includes(r)):t}function rs(t){return typeof t=="number"&&Number.isFinite(t)?t:0}function eG(t){const e=t==null?void 0:t.trim();if(!(!e||e==="0"))return e}function l0(t,e){return t!=null&&e!==void 0&&e!==null&&String(t)===String(e)}function AA(){return{opportunityIds:[],salesExpansionIds:[],channelExpansionIds:[]}}function MA(t){return t==="sales"?"salesExpansionIds":t==="channel"?"channelExpansionIds":"opportunityIds"}function DA(t){return t==="sales"?"sales":t==="channels"?"channel":"opportunity"}function wJ({embedded:t=!1,onClose:e,onFooterChange:r}){var Hr;const a=ru(),n=au(),[i,o]=E.useState([]),[s,l]=E.useState(null),[u,c]=E.useState(!1),[d,h]=E.useState(!1),[v,m]=E.useState(!1),[x,b]=E.useState(""),[w,_]=E.useState(""),[T,C]=E.useState(null),[k,A]=E.useState(()=>{const ye=IE();return ye?String(ye):""}),[M,L]=E.useState(""),[R,P]=E.useState(!1),[j,V]=E.useState(""),[I,F]=E.useState("opportunities"),[G,O]=E.useState(""),[U,$]=E.useState(AA),[K,q]=E.useState(!1),[H,Z]=E.useState(null),te=Cje(),ie=te>0,ce=eG(k),me=eG(M),ze=E.useMemo(()=>i.find(ye=>l0(ye.userId,ce))??s,[s,ce,i]),Ce=E.useMemo(()=>i.find(ye=>l0(ye.userId,me))??null,[me,i]),ge=!!((Hr=T==null?void 0:T.salesConflicts)!=null&&Hr.length),Be=E.useCallback(async()=>{try{const ye=await mh(),Rt={userId:ye.userId,username:ye.username,displayName:ye.displayName||ye.username,status:ye.status,tenantId:ye.tenantId};l(Rt),ye.userId&&A(String(ye.userId))}catch(ye){l(null),b(ye instanceof Error?ye.message:"获取当前登录账号失败")}},[]),_e=E.useCallback(async()=>{if(!ie){o([]);return}c(!0),b("");try{const ye=await QU();o(ye??[])}catch(ye){o([]),b(ye instanceof Error?ye.message:"加载用户列表失败")}finally{c(!1)}},[te,ie]),Oe=E.useCallback(async(ye,Rt)=>{if(!(s!=null&&s.userId)){C(null);return}if(!ie||!ye||!Rt||l0(ye,Rt)||!l0(ye,s.userId)){C(null);return}h(!0),b("");try{const Te=await Yce(ye,Rt);C(Te)}catch(Te){C(null),b(Te instanceof Error?Te.message:"加载转移预检失败")}finally{h(!1)}},[s==null?void 0:s.userId,ie]);E.useEffect(()=>{Be()},[Be]),E.useEffect(()=>{_e()},[_e]),E.useEffect(()=>{Oe(ce,me)},[Oe,ce,me]),E.useEffect(()=>{O("")},[I,T==null?void 0:T.fromUserId,T==null?void 0:T.toUserId]),E.useEffect(()=>{$(AA())},[T==null?void 0:T.fromUserId,T==null?void 0:T.toUserId]),E.useEffect(()=>{if(!n){q(!0);return}q(!1)},[n,T==null?void 0:T.fromUserId,T==null?void 0:T.toUserId]);const xt=E.useMemo(()=>i.filter(ye=>String(ye.userId)!==k&&ye.status!==0),[k,i]),Ye=E.useMemo(()=>{const ye=j.trim().toLowerCase();return ye?xt.filter(Rt=>`${Rt.displayName||""} ${Rt.username||""}`.toLowerCase().includes(ye)):xt},[xt,j]),st=E.useMemo(()=>T?NA(I==="sales"?T.salesExpansions||[]:I==="channels"?T.channelExpansions||[]:T.opportunities||[],G):[],[I,T,G]),We=E.useMemo(()=>I==="sales"?U.salesExpansionIds:I==="channels"?U.channelExpansionIds:U.opportunityIds,[I,U.channelExpansionIds,U.opportunityIds,U.salesExpansionIds]),At=E.useMemo(()=>I==="sales"?st.filter(ye=>!ye.conflict):st,[I,st]),kt=U.opportunityIds.length+U.salesExpansionIds.length+U.channelExpansionIds.length,Jt=We.length,Nr=U.opportunityIds.length,rr=U.salesExpansionIds.length,Fe=U.channelExpansionIds.length,Mt=At.map(ye=>ye.id),dr=Mt.length>0&&Mt.every(ye=>We.includes(ye));rs(I==="sales"?T==null?void 0:T.salesExpansionCount:I==="channels"?T==null?void 0:T.channelExpansionCount:T==null?void 0:T.opportunityCount);const ar=v?"执行中...":kt>0?`转移已勾选 ${kt} 条`:"请选择转移数据",sa=kt>0?`已勾选 ${kt} 条待转移数据`:"请先勾选需要转移的数据",va=E.useCallback(async(ye,Rt)=>{m(!0),b(""),_("");try{const Te=await Xce(ye);_(`${Rt} 本次共转移:商机 ${rs(Te.transferredOpportunityCount)} 条、拓展销售人员 ${rs(Te.transferredSalesExpansionCount)} 条、拓展渠道 ${rs(Te.transferredChannelExpansionCount)} 条。`),$(AA()),await _e(),await Oe(ye.fromUserId,ye.toUserId)}catch(Te){b(Te instanceof Error?Te.message:"执行归属人转移失败")}finally{m(!1)}},[Oe,_e]),rn=E.useCallback(async()=>{H&&(await va(H.payload,H.successText),Z(null))},[H,va]),wa=async()=>{if(!ce||!me){b("请先选择原归属人和新归属人");return}if(l0(ce,me)){b("原归属人和新归属人不能相同");return}if(kt<=0){b("请先勾选需要转移的数据");return}Z({title:"确认执行转移?",description:"",payload:{fromUserId:ce,toUserId:me,transferOpportunities:U.opportunityIds.length>0,transferSalesExpansions:U.salesExpansionIds.length>0,transferChannelExpansions:U.channelExpansionIds.length>0,selection:{opportunityIds:U.opportunityIds,salesExpansionIds:U.salesExpansionIds,channelExpansionIds:U.channelExpansionIds}},successText:"已勾选数据转移完成。",confirmText:"确认转移",sourceLabel:Qc(ze),targetLabel:Qc(Ce),badges:[Nr>0?`商机 ${Nr} 条`:"",rr>0?`拓展销售 ${rr} 条`:"",Fe>0?`拓展渠道 ${Fe} 条`:""].filter(Boolean)})},En=async(ye,Rt)=>{if(!ce||!me){b("请先选择原归属人和新归属人");return}if(ye==="sales"&&Rt.conflict){b("目标归属人下已存在相同工号的拓展销售人员,请先处理冲突后再试");return}const Te=ye==="sales"?"拓展销售人员":ye==="channel"?"拓展渠道":"商机";Z({title:"确认转移当前数据?",description:"",payload:{fromUserId:ce,toUserId:me,transferOpportunities:ye==="opportunity",transferSalesExpansions:ye==="sales",transferChannelExpansions:ye==="channel",selection:{opportunityIds:ye==="opportunity"?[Rt.id]:[],salesExpansionIds:ye==="sales"?[Rt.id]:[],channelExpansionIds:ye==="channel"?[Rt.id]:[]}},successText:"单条归属人转移已完成。",confirmText:"确认单条转移",sourceLabel:Qc(ze),targetLabel:Qc(Ce),subjectLabel:`${Te} · ${Rt.name||"未命名对象"}`,badges:[Te]})},pa=(ye,Rt)=>{const Te=MA(ye);$(xe=>{const Pt=xe[Te],bt=Pt.includes(Rt)?Pt.filter(Vt=>Vt!==Rt):[...Pt,Rt];return{...xe,[Te]:bt}})},an=()=>{const ye=DA(I),Rt=MA(ye);$(Te=>{const xe=Te[Rt],Pt=dr?xe.filter(bt=>!Mt.includes(bt)):Array.from(new Set([...xe,...Mt]));return{...Te,[Rt]:Pt}})},gr=()=>{const ye=DA(I),Rt=MA(ye);$(Te=>({...Te,[Rt]:[]}))},Ar=E.useMemo(()=>t?g.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[g.jsxs("div",{className:"min-w-0 sm:flex-1",children:[g.jsx("p",{className:"truncate text-sm font-semibold text-slate-900 dark:text-white",children:Ce?`转移给 ${Ce.displayName||Ce.username}`:"请选择新归属人"}),g.jsx("p",{className:"mt-1 text-xs text-slate-500 dark:text-slate-400",children:sa})]}),g.jsxs("div",{className:"flex flex-col-reverse gap-3 sm:flex-row sm:justify-end",children:[g.jsx("button",{type:"button",onClick:()=>e==null?void 0:e(),className:"crm-btn crm-btn-secondary",children:"取消"}),g.jsx("button",{type:"button",onClick:()=>void wa(),disabled:!ie||v||d||kt<=0,className:"crm-btn crm-btn-primary disabled:cursor-not-allowed disabled:opacity-60",children:ar})]})]}):null,[sa,t,v,wa,e,d,ar,ie,Ce,kt]);return E.useEffect(()=>{if(!(!t||!r))return r(Ar),()=>r(null)},[t,Ar,r]),g.jsxs("div",{className:t?"crm-section-stack":"crm-page-stack",children:[t?null:g.jsx("header",{className:"crm-page-header",children:g.jsxs("div",{className:"crm-page-heading",children:[g.jsxs("button",{type:"button",onClick:()=>a("/profile"),className:"mb-3 inline-flex items-center gap-2 text-sm font-medium text-slate-500 transition-colors hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200",children:[g.jsx(Ire,{className:"h-4 w-4"}),"返回我的"]}),g.jsx("h1",{className:"crm-page-title",children:"项目归属转移"})]})}),ie?null:g.jsx("div",{className:"crm-alert crm-alert-info",children:"请先切换到具体租户后再操作归属人转移。"}),x?g.jsx("div",{className:"crm-alert crm-alert-error",children:x}):null,w?g.jsx("div",{className:"crm-alert crm-alert-success",children:w}):null,g.jsx(Xt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"crm-card crm-card-pad-lg rounded-2xl",children:g.jsxs("div",{className:"crm-section-stack",children:[g.jsxs("div",{className:"flex items-start justify-between gap-3",children:[g.jsx("div",{children:g.jsx("h2",{className:"text-base font-semibold text-slate-900 dark:text-white",children:"转移设置"})}),g.jsx("div",{className:Ne("flex items-center justify-center rounded-2xl bg-violet-50 text-violet-600 dark:bg-violet-500/10 dark:text-violet-300",n?"h-10 w-10":"h-11 w-11"),children:g.jsx(pb,{className:"h-5 w-5"})})]}),g.jsx("div",{className:"crm-form-grid",children:g.jsxs("label",{className:"space-y-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"新归属人"}),g.jsxs("button",{type:"button",onClick:()=>P(!0),disabled:!ie||u,className:"crm-btn-sm crm-input-text flex w-full items-center justify-between border border-slate-200 bg-white text-left outline-none transition-colors hover:border-slate-300 focus:border-violet-500 focus:ring-1 focus:ring-violet-500 disabled:cursor-not-allowed disabled:opacity-60 dark:border-slate-800 dark:bg-slate-900/50 dark:hover:border-slate-700",children:[g.jsx("span",{className:Ce?"break-anywhere text-slate-900 dark:text-white":"crm-field-note",children:Ce?Qc(Ce):"请选择新的归属人"}),g.jsx("span",{className:"text-slate-400",children:"⌄"})]})]})}),ge?g.jsx("div",{className:"rounded-2xl border border-amber-200 bg-amber-50/80 px-4 py-3 text-sm text-amber-900 dark:border-amber-500/20 dark:bg-amber-500/10 dark:text-amber-100",children:"存在拓展销售人员工号冲突,请先处理冲突,或仅勾选下方可转移的数据后再执行。"}):null]})}),g.jsx(Xt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.05},className:"crm-card crm-card-pad-lg rounded-2xl",children:g.jsxs("div",{className:"crm-section-stack",children:[g.jsx("div",{className:"flex items-start justify-between gap-3",children:g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-center justify-between gap-3",children:[g.jsx("h2",{className:"text-base font-semibold text-slate-900 dark:text-white",children:"转移预检"}),g.jsxs("div",{className:"flex shrink-0 items-center gap-3 text-sm",children:[T?g.jsxs(g.Fragment,{children:[g.jsx("button",{type:"button",onClick:an,disabled:Mt.length===0,className:"inline-flex h-8 items-center justify-center rounded-full border border-slate-200 bg-white px-3 text-sm font-medium text-slate-600 transition-colors hover:border-slate-300 hover:bg-slate-50 hover:text-slate-900 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700 dark:bg-slate-900/50 dark:text-slate-300 dark:hover:border-slate-600 dark:hover:bg-slate-800 dark:hover:text-white",children:dr?"取消全选":"全选"}),g.jsx("button",{type:"button",onClick:gr,disabled:Jt===0,className:"inline-flex h-8 items-center justify-center rounded-full border border-slate-200 bg-white px-3 text-sm font-medium text-slate-600 transition-colors hover:border-slate-300 hover:bg-slate-50 hover:text-slate-900 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700 dark:bg-slate-900/50 dark:text-slate-300 dark:hover:border-slate-600 dark:hover:bg-slate-800 dark:hover:text-white",children:"清空"})]}):null,d?g.jsx("p",{className:"text-sm text-slate-400 dark:text-slate-500",children:"加载中..."}):null]})]}),g.jsxs("p",{className:"mt-1 text-sm text-slate-500 dark:text-slate-400",children:["从 ",(T==null?void 0:T.fromUserName)||Qc(ze)," 转移到 ",(T==null?void 0:T.toUserName)||Qc(Ce)," 的预检结果。"]})]})}),!T&&!d?g.jsx("div",{className:"crm-empty-panel",children:"选择原归属人和新归属人后,系统会显示当前可转移数量及冲突检查结果。"}):null,T?g.jsxs(g.Fragment,{children:[n?g.jsx("div",{className:"grid grid-cols-3 gap-2",children:JF.map(ye=>{const Rt=ye.key==="sales"?rs(T.salesExpansionCount):ye.key==="channels"?rs(T.channelExpansionCount):rs(T.opportunityCount);return g.jsxs("button",{type:"button",onClick:()=>F(ye.key),className:Ne("rounded-xl border px-3 py-2.5 text-left shadow-sm transition-all",I===ye.key?"border-violet-400 bg-violet-50 shadow-[0_8px_20px_rgba(124,58,237,0.12)] ring-1 ring-violet-200 dark:border-violet-400/50 dark:bg-violet-500/15 dark:ring-violet-500/20":"border-slate-200 bg-slate-50/40 opacity-75 dark:border-slate-800 dark:bg-slate-800/20 dark:opacity-80"),children:[g.jsx("p",{className:Ne("text-[11px] font-medium",I===ye.key?"text-violet-600 dark:text-violet-300":"text-slate-400 dark:text-slate-500"),children:ye.key==="opportunities"?"商机":ye.key==="sales"?"销售":"渠道"}),g.jsx("p",{className:Ne("mt-1 text-xl font-bold leading-none",I===ye.key?"text-violet-700 dark:text-violet-100":"text-slate-500 dark:text-slate-300"),children:Rt})]},ye.key)})}):g.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:JF.map(ye=>{const Rt=ye.key==="sales"?rs(T.salesExpansionCount):ye.key==="channels"?rs(T.channelExpansionCount):rs(T.opportunityCount);return g.jsxs("button",{type:"button",onClick:()=>F(ye.key),className:Ne("rounded-2xl border p-4 text-left shadow-sm transition-all",I===ye.key?"border-violet-400 bg-violet-50 shadow-[0_10px_24px_rgba(124,58,237,0.12)] ring-1 ring-violet-200 dark:border-violet-400/50 dark:bg-violet-500/15 dark:ring-violet-500/20":"border-slate-200 bg-slate-50/50 dark:border-slate-800 dark:bg-slate-800/20"),children:[g.jsx("p",{className:Ne("text-xs font-medium uppercase tracking-[0.16em]",I===ye.key?"text-violet-500 dark:text-violet-300":"text-slate-400 dark:text-slate-500"),children:ye.key==="opportunities"?"商机数量":ye.key==="sales"?"拓展销售":"拓展渠道"}),g.jsx("p",{className:Ne("mt-2 text-2xl font-bold",I===ye.key?"text-violet-700 dark:text-violet-100":"text-slate-900 dark:text-white"),children:Rt})]},ye.key)})}),!n||K||n?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:Ne("gap-2",n?"space-y-2":"grid grid-cols-[minmax(0,1fr)_auto] items-center"),children:[g.jsxs("div",{className:"relative",children:[g.jsx(Qu,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"}),g.jsx("input",{type:"text",value:G,onChange:ye=>O(ye.target.value),placeholder:"搜索名称或工号",className:Ne("crm-input-text w-full border border-slate-200 bg-white pl-10 outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50",n?"crm-input-box":"h-10 rounded-xl px-3 text-sm")})]}),n?null:g.jsx("div",{})]}),I==="sales"&&T.salesConflicts.length>0?g.jsx("div",{className:"rounded-2xl border border-amber-200 bg-amber-50/80 p-4 dark:border-amber-500/20 dark:bg-amber-500/10",children:g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx(dne,{className:"mt-0.5 h-5 w-5 shrink-0 text-amber-600 dark:text-amber-300"}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("p",{className:"text-sm font-semibold text-amber-900 dark:text-amber-100",children:"拓展销售人员工号冲突"}),g.jsx("p",{className:"mt-1 text-sm text-amber-800 dark:text-amber-200",children:"目标归属人名下已存在相同工号时,系统会阻止执行“拓展销售人员”转移。"}),g.jsx("div",{className:"mt-3 space-y-2",children:T.salesConflicts.map(ye=>g.jsxs("div",{className:"rounded-xl bg-white/80 px-3 py-2 text-sm text-amber-900 dark:bg-slate-900/40 dark:text-amber-100",children:["工号 ",ye.employeeNo||"-"," · 人员姓名 ",ye.candidateName||"-"]},`${ye.employeeNo}-${ye.candidateName}`))})]})]})}):null,g.jsxs("div",{className:"px-1 text-xs leading-5 text-slate-500 dark:text-slate-400",children:["当前页签已选 ",Jt," 条,全部已选 ",kt," 条。"]}),g.jsx("div",{className:"space-y-3",children:st.length>0?st.map(ye=>g.jsx("div",{className:Ne("rounded-xl border px-3 py-3 transition-colors sm:px-4 sm:py-3",We.includes(ye.id)&&!ye.conflict?"ring-2 ring-violet-400/40":"",ye.conflict?"border-amber-200 bg-amber-50/70 dark:border-amber-500/20 dark:bg-amber-500/10":"border-slate-200 bg-white dark:border-slate-800 dark:bg-slate-900/50"),children:g.jsxs("div",{className:"flex items-center justify-between gap-3",children:[g.jsx("div",{className:"min-w-0 flex-1",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("input",{type:"checkbox",checked:We.includes(ye.id),disabled:ye.conflict,onChange:()=>pa(DA(I),ye.id),className:"h-4 w-4 accent-violet-600 disabled:cursor-not-allowed"}),g.jsx("p",{className:"min-w-0 break-anywhere text-sm font-semibold text-slate-900 dark:text-white",children:ye.name||"未命名对象"}),I==="sales"?g.jsxs("span",{className:"shrink-0 text-xs text-slate-500 dark:text-slate-400",children:["工号 ",ye.code||"-"]}):null,ye.conflict?g.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-amber-100 px-2 py-0.5 text-[11px] font-medium text-amber-800 dark:bg-amber-500/15 dark:text-amber-200",children:[g.jsx(EG,{className:"h-3.5 w-3.5"}),"有冲突"]}):g.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-emerald-100 px-2 py-0.5 text-[11px] font-medium text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-300",children:[g.jsx(Ip,{className:"h-3.5 w-3.5"}),"可转移"]})]})}),g.jsx("button",{type:"button",onClick:()=>void En(I==="sales"?"sales":I==="channels"?"channel":"opportunity",ye),disabled:v||ye.conflict,title:"单条转移","aria-label":"单条转移",className:"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-700 transition-colors hover:border-violet-300 hover:text-violet-700 disabled:cursor-not-allowed disabled:opacity-60 dark:border-slate-700 dark:bg-slate-900/50 dark:text-slate-300 dark:hover:border-violet-500/40 dark:hover:text-violet-300",children:g.jsx(pb,{className:"h-4 w-4"})})]})},`${I}-${ye.id}`)):g.jsx("div",{className:"crm-empty-panel",children:"暂无数据"})})]}):null]}):null]})}),R?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"fixed inset-0 z-[140] bg-slate-900/35 backdrop-blur-sm dark:bg-slate-950/70",onClick:()=>P(!1)}),g.jsx("div",{className:"fixed inset-0 z-[150] flex items-center justify-center p-4",children:g.jsxs("div",{className:"w-full max-w-xl rounded-3xl border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900",children:[g.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4 dark:border-slate-800",children:[g.jsxs("div",{children:[g.jsx("p",{className:"text-base font-semibold text-slate-900 dark:text-white",children:"选择新归属人"}),g.jsx("p",{className:"mt-1 text-xs text-slate-500 dark:text-slate-400",children:"搜索并选择接收归属数据的账号"})]}),g.jsx("button",{type:"button",onClick:()=>P(!1),className:"rounded-full p-2 text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"h-5 w-5"})})]}),g.jsxs("div",{className:"space-y-3 px-5 py-4",children:[g.jsxs("div",{className:"relative",children:[g.jsx(Qu,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"}),g.jsx("input",{type:"text",value:j,onChange:ye=>V(ye.target.value),placeholder:"搜索姓名或账号",className:"w-full rounded-2xl border border-slate-200 bg-slate-50 px-4 py-3 pl-10 pr-24 text-sm text-slate-700 outline-none transition-colors focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-700 dark:bg-slate-800/70 dark:text-slate-100"}),j?g.jsx("button",{type:"button",onClick:()=>V(""),className:"absolute right-3 top-1/2 -translate-y-1/2 rounded-full px-2 py-1 text-xs font-medium text-slate-500 transition-colors hover:bg-slate-100 hover:text-slate-800 dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-slate-200",children:"清空搜索"}):null]}),g.jsx("div",{className:"max-h-[min(60vh,28rem)] space-y-2 overflow-y-auto pr-1",children:Ye.length>0?Ye.map(ye=>{const Rt=String(ye.userId)===M;return g.jsxs("button",{type:"button",onClick:()=>{L(String(ye.userId)),P(!1)},className:Ne("flex w-full items-center justify-between rounded-2xl px-4 py-3 text-left text-sm transition-colors",Rt?"bg-violet-600 text-white shadow-sm":"border border-transparent text-slate-700 hover:bg-slate-50 dark:text-slate-200 dark:hover:bg-slate-800"),children:[g.jsx("span",{className:"break-anywhere",children:Qc(ye)}),Rt?g.jsx(Ip,{className:"h-4 w-4 shrink-0"}):null]},ye.userId)}):g.jsx("div",{className:"rounded-2xl border border-dashed border-slate-200 px-4 py-8 text-center text-sm text-slate-500 dark:border-slate-700 dark:text-slate-400",children:"未找到匹配的归属人"})})]})]})})]}):null,g.jsx(co,{children:H?g.jsx(bJ,{title:H.title,description:H.description,tone:"violet",icon:g.jsx(pb,{className:"h-6 w-6"}),confirmText:H.confirmText,loading:v,onClose:()=>Z(null),onConfirm:rn,children:g.jsxs("div",{className:"space-y-3",children:[H.subjectLabel?g.jsxs("div",{className:"rounded-2xl border border-slate-200/80 bg-white/90 px-4 py-3 dark:border-slate-800 dark:bg-slate-950/60",children:[g.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.18em] text-slate-400 dark:text-slate-500",children:"转移对象"}),g.jsx("p",{className:"mt-1 break-anywhere text-sm font-semibold text-slate-900 dark:text-white",children:H.subjectLabel})]}):null,g.jsxs("div",{className:"grid gap-2 sm:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] sm:items-center",children:[g.jsxs("div",{className:"rounded-2xl border border-slate-200/80 bg-white/90 px-4 py-3 dark:border-slate-800 dark:bg-slate-950/60",children:[g.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500",children:"原归属人"}),g.jsx("p",{className:"mt-1 break-anywhere text-sm font-semibold text-slate-900 dark:text-white",children:H.sourceLabel})]}),g.jsx("div",{className:"flex justify-center py-1 text-violet-500 dark:text-violet-300",children:g.jsx(pb,{className:"h-4 w-4"})}),g.jsxs("div",{className:"rounded-2xl border border-violet-200/80 bg-violet-50/80 px-4 py-3 dark:border-violet-500/20 dark:bg-violet-500/10",children:[g.jsx("p",{className:"text-xs text-violet-600 dark:text-violet-300",children:"新归属人"}),g.jsx("p",{className:"mt-1 break-anywhere text-sm font-semibold text-slate-900 dark:text-white",children:H.targetLabel})]})]}),H.badges.length>0?g.jsx("div",{className:"flex flex-wrap gap-2",children:H.badges.map(ye=>g.jsx("span",{className:"inline-flex items-center rounded-full bg-slate-100 px-3 py-1 text-xs font-medium text-slate-600 dark:bg-slate-800 dark:text-slate-300",children:ye},ye))}):null,g.jsx("div",{className:"text-xs leading-5 text-slate-500 dark:text-slate-400",children:"确认后将立即生效,请确保选择无误。"})]})}):null}),!t&&!n?g.jsx("div",{className:"w-full shrink-0 border-t border-slate-200/80 bg-slate-50/95 backdrop-blur dark:border-slate-800/80 dark:bg-slate-900/90",children:g.jsx("div",{className:"px-4 py-4 sm:px-0",children:g.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-200 bg-white px-4 py-4 dark:border-slate-800 dark:bg-slate-900/60",children:[g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("p",{className:"truncate text-sm font-semibold text-slate-900 dark:text-white",children:Ce?`转移给 ${Ce.displayName||Ce.username}`:"请选择新归属人"}),g.jsx("p",{className:"mt-1 text-xs text-slate-500 dark:text-slate-400",children:sa})]}),g.jsx("button",{type:"button",onClick:()=>void wa(),disabled:!ie||v||d||kt<=0,className:"crm-btn crm-btn-primary shrink-0 px-5 disabled:cursor-not-allowed disabled:opacity-60",children:ar})]})})}):null,!t&&n?g.jsx("div",{className:"h-28","aria-hidden":"true"}):null,!t&&n?g.jsx("div",{className:"fixed inset-x-0 bottom-0 z-40 border-t border-slate-200 bg-white/95 px-4 pb-[calc(0.9rem+env(safe-area-inset-bottom))] pt-3 shadow-[0_-10px_30px_rgba(15,23,42,0.08)] backdrop-blur dark:border-slate-800 dark:bg-slate-950/92",children:g.jsxs("div",{className:"mx-auto flex max-w-screen-sm items-center gap-3",children:[g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("p",{className:"truncate text-sm font-semibold text-slate-900 dark:text-white",children:Ce?`转移给 ${Ce.displayName||Ce.username}`:"请选择新归属人"}),g.jsx("p",{className:"mt-1 text-xs text-slate-500 dark:text-slate-400",children:sa})]}),g.jsx("button",{type:"button",onClick:()=>void wa(),disabled:!ie||v||d||kt<=0,className:"crm-btn crm-btn-primary shrink-0 px-5 disabled:cursor-not-allowed disabled:opacity-60",children:ar})]})}):null]})}const kje=[{key:"personal",icon:Pw,label:"个人资料",color:"text-blue-500 dark:text-blue-400",bg:"bg-blue-50 dark:bg-blue-500/10"},{key:"security",icon:DG,label:"账号安全",color:"text-emerald-500 dark:text-emerald-400",bg:"bg-emerald-50 dark:bg-emerald-500/10"},{key:"ownerTransfer",icon:g_,label:"项目归属转移",color:"text-amber-500 dark:text-amber-400",bg:"bg-amber-50 dark:bg-amber-500/10"},{key:"help",icon:CG,label:"帮助中心",color:"text-violet-500 dark:text-violet-400",bg:"bg-violet-50 dark:bg-violet-500/10"}],Nje={displayName:"",email:"",phone:""},tG={oldPassword:"",newPassword:"",confirmPassword:""};function Ou(t){return t&&t.trim()?t:"无"}function Aje(t){return typeof t=="number"&&Number.isFinite(t)?t:0}function LA({title:t,subtitle:e,onClose:r,children:a,footer:n}){return g.jsxs(g.Fragment,{children:[g.jsx(Xt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:r,className:"fixed inset-0 z-40 bg-slate-900/25 backdrop-blur-sm dark:bg-slate-900/70"}),g.jsx(Xt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},className:"fixed inset-0 z-50 px-0 pb-0 pt-[env(safe-area-inset-top)] sm:p-6",children:g.jsx("div",{className:"mx-auto h-[calc(100dvh-env(safe-area-inset-top))] w-full sm:h-full sm:max-w-3xl",children:g.jsxs("div",{className:"flex h-full flex-col overflow-hidden border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-900 sm:rounded-3xl",children:[g.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4 dark:border-slate-800 sm:px-6",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-base font-semibold text-slate-900 dark:text-white sm:text-lg",children:t}),e?g.jsx("p",{className:"mt-1 text-xs leading-5 text-slate-500 dark:text-slate-400",children:e}):null]}),g.jsx("button",{onClick:r,className:"rounded-full p-2 text-slate-400 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",children:g.jsx(Oa,{className:"h-5 w-5"})})]}),g.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-5 sm:px-6",children:a}),n?g.jsx("div",{className:"border-t border-slate-100 px-5 pb-[calc(1rem+env(safe-area-inset-bottom))] pt-4 dark:border-slate-800 sm:px-6 sm:pb-4",children:n}):null]})})})]})}function Mje(){const{theme:t,setTheme:e}=qG(),r=ru(),a=au(),n=Gd(),i=a||n,[o,s]=E.useState(null),[l,u]=E.useState(null),[c,d]=E.useState(!1),[h,v]=E.useState(!1),[m,x]=E.useState(!1),[b,w]=E.useState(null),[_,T]=E.useState(Nje),[C,k]=E.useState(!1),[A,M]=E.useState(!1),[L,R]=E.useState(""),[P,j]=E.useState(tG),[V,I]=E.useState(!1),[F,G]=E.useState(""),[O,U]=E.useState(""),[$,K]=E.useState(!1),[q,H]=E.useState(!1),[Z,te]=E.useState(!1),[ie,ce]=E.useState(!1);E.useEffect(()=>{let Fe=!1;async function Mt(){try{const dr=await mh(),ar=await ow().catch(()=>null);if(Fe)return;u(dr),s(ar)}catch{if(Fe)return;s(null),u(null)}}return Mt(),()=>{Fe=!0}},[]);const me=()=>{zp(),r("/login",{replace:!0})},ze=async()=>{k(!0),R("");try{const Fe=l??await mh(),Mt=o??await ow().catch(()=>null);u(Fe),s(Mt),T({userId:Fe.userId,username:Fe.username,displayName:Fe.displayName||"",email:Fe.email||"",phone:Fe.phone||"",pwdResetRequired:Fe.pwdResetRequired,isPlatformAdmin:Fe.isPlatformAdmin,orgId:void 0}),d(!0)}catch(Fe){R(Fe instanceof Error?Fe.message:"获取个人资料失败"),d(!0)}finally{k(!1)}},Ce=()=>{A||(d(!1),R(""))},ge=async()=>{if(!A){M(!0),R("");try{await $ce({..._,email:_.email||void 0,phone:_.phone||void 0});const Fe=await mh(),Mt=await ow().catch(()=>o);u(Fe),s(Mt),T({userId:Fe.userId,username:Fe.username,displayName:Fe.displayName||"",email:Fe.email||"",phone:Fe.phone||"",pwdResetRequired:Fe.pwdResetRequired,isPlatformAdmin:Fe.isPlatformAdmin,orgId:void 0}),sessionStorage.setItem("userProfile",JSON.stringify(Fe)),d(!1)}catch(Fe){R(Fe instanceof Error?Fe.message:"保存失败")}finally{M(!1)}}},Be=()=>{j(tG),G(""),U(""),K(!1),H(!1),te(!1),v(!0)},_e=()=>{V||(v(!1),G(""),U(""))},Oe=()=>{ce(!0)},xt=()=>{x(!0)},Ye=()=>{x(!1),w(null)},st=async()=>{if(!V){if(!P.oldPassword||!P.newPassword||!P.confirmPassword){G("请完整填写旧密码、新密码和确认密码"),U("");return}if(P.newPassword!==P.confirmPassword){G("两次输入的新密码不一致"),U("");return}if(P.newPassword.length<6){G("新密码长度不能少于6位"),U("");return}I(!0),G(""),U("");try{await Wce({oldPassword:P.oldPassword,newPassword:P.newPassword}),zp(),r("/login",{replace:!0})}catch(Fe){G(Fe instanceof Error?Fe.message:"密码修改失败")}finally{I(!1)}}},We=Ou(o==null?void 0:o.jobTitle),At=Ou(o==null?void 0:o.deptName),kt=Ou((l==null?void 0:l.displayName)||(o==null?void 0:o.realName)),Jt=kt==="无"?"无":kt.slice(0,1),Nr=Ou(l==null?void 0:l.email),rr=Ou(l==null?void 0:l.phone);return g.jsxs("div",{className:"crm-page-stack",children:[g.jsx("header",{className:"crm-page-header",children:g.jsxs("div",{className:"crm-page-heading",children:[g.jsx("h1",{className:"crm-page-title",children:"我的"}),g.jsx("p",{className:"crm-page-subtitle",children:"查看个人信息、账号安全设置和本月工作概览。"})]})}),g.jsxs(Xt.div,{initial:i?!1:{opacity:0,y:10},animate:{opacity:1,y:0},transition:i?{duration:0}:void 0,className:"crm-card crm-card-pad-lg relative rounded-2xl transition-shadow transition-colors",children:[g.jsx("button",{onClick:()=>void ze(),className:"absolute right-4 top-4 rounded-full bg-slate-50 p-2 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600 dark:bg-slate-800 dark:text-slate-500 dark:hover:bg-slate-700 dark:hover:text-slate-300 sm:right-6 sm:top-6",children:g.jsx(une,{className:"crm-icon-lg"})}),g.jsx("div",{className:"flex flex-col gap-5 pr-12 sm:flex-row sm:items-start",children:g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsx("div",{className:"flex h-16 w-16 shrink-0 items-center justify-center rounded-full bg-violet-100 text-2xl font-bold text-violet-600 dark:bg-violet-500/20 dark:text-violet-400",children:Jt}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("h2",{className:"truncate text-lg font-bold text-slate-900 dark:text-white sm:text-xl",children:kt}),g.jsxs("div",{className:"mt-1 text-xs leading-5 text-slate-500 dark:text-slate-400 sm:text-sm",children:[g.jsxs("p",{children:["部门:",At]}),g.jsxs("p",{children:["岗位:",We]})]})]})]})})]}),g.jsx(Xt.div,{initial:i?!1:{opacity:0,y:10},animate:{opacity:1,y:0},transition:i?{duration:0}:{delay:.1},className:"crm-card overflow-hidden rounded-2xl transition-shadow transition-colors",children:g.jsxs("ul",{className:"divide-y divide-slate-50 dark:divide-slate-800/50",children:[g.jsx("li",{children:g.jsxs("button",{onClick:()=>e(t==="dark"?"light":"dark"),className:"flex w-full items-center justify-between p-4 transition-colors hover:bg-slate-50 dark:hover:bg-slate-800/50 md:hidden",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-slate-100 dark:bg-slate-800",children:t==="dark"?g.jsx(OA,{className:"crm-icon-lg text-amber-500"}):g.jsx(jA,{className:"crm-icon-lg text-indigo-500"})}),g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:t==="dark"?"切换亮色模式":"切换暗色模式"})]}),g.jsx(VO,{className:"crm-icon-lg text-slate-300 dark:text-slate-600"})]})}),kje.map(Fe=>g.jsx("li",{children:g.jsxs("button",{onClick:Fe.key==="personal"?()=>void ze():Fe.key==="security"?Be:Fe.key==="ownerTransfer"?xt:Fe.key==="help"?Oe:void 0,className:"flex w-full items-center justify-between p-4 text-left transition-colors hover:bg-slate-50 dark:hover:bg-slate-800/50",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:`flex h-10 w-10 items-center justify-center rounded-xl ${Fe.bg}`,children:g.jsx(Fe.icon,{className:`crm-icon-lg ${Fe.color}`})}),g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:Fe.label})]}),g.jsx(VO,{className:"crm-icon-lg text-slate-300 dark:text-slate-600"})]})},Fe.key))]})}),g.jsxs(Xt.button,{initial:i?!1:{opacity:0,y:10},animate:{opacity:1,y:0},transition:i?{duration:0}:{delay:.2},onClick:me,className:"crm-btn crm-btn-danger flex w-full items-center justify-center gap-2 active:scale-100 sm:active:scale-[0.98]",children:[g.jsx(Iae,{className:"crm-icon-lg"}),"退出登录"]}),g.jsxs(co,{children:[c?g.jsx(LA,{title:"个人资料",onClose:Ce,footer:g.jsxs("div",{className:"flex flex-col-reverse gap-3 sm:flex-row sm:justify-end",children:[g.jsx("button",{onClick:Ce,className:"crm-btn crm-btn-secondary",children:"取消"}),g.jsx("button",{onClick:()=>void ge(),disabled:A||C,className:"crm-btn crm-btn-primary disabled:cursor-not-allowed disabled:opacity-60",children:A?"保存中...":"保存资料"})]}),children:L&&!l?g.jsx("div",{className:"crm-alert crm-alert-error",children:L}):g.jsxs("div",{className:"crm-modal-stack",children:[g.jsxs("div",{className:"crm-form-section sm:flex-row sm:items-center",children:[g.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-violet-100 text-2xl font-bold text-violet-600 dark:bg-violet-500/20 dark:text-violet-400",children:(_.displayName||(l==null?void 0:l.displayName)||"无").slice(0,1)}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("div",{className:"text-lg font-semibold text-slate-900 dark:text-white",children:Ou(l==null?void 0:l.displayName)}),g.jsxs("div",{className:"mt-1 text-sm text-slate-500 dark:text-slate-400",children:[g.jsxs("p",{children:["部门:",At]}),g.jsxs("p",{children:["岗位:",We]})]}),g.jsxs("div",{className:"mt-2 text-xs text-slate-400 dark:text-slate-500",children:["账号:",Ou(l==null?void 0:l.username)]})]})]}),g.jsxs("div",{className:"crm-form-grid",children:[g.jsxs("label",{className:"space-y-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"显示名称"}),g.jsx("input",{value:_.displayName||"",onChange:Fe=>T(Mt=>({...Mt,displayName:Fe.target.value})),className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50"})]}),g.jsxs("label",{className:"space-y-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"用户名"}),g.jsx("div",{className:"crm-input-box-readonly crm-input-text w-full border border-slate-200 bg-slate-50 text-slate-500 dark:border-slate-800 dark:bg-slate-800/40 dark:text-slate-400",children:Ou(l==null?void 0:l.username)})]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"flex items-center gap-2 text-sm font-medium text-slate-700 dark:text-slate-300",children:[g.jsx(MG,{className:"crm-icon-md text-slate-400"}),"手机号"]}),g.jsx("input",{value:_.phone||"",onChange:Fe=>T(Mt=>({...Mt,phone:Fe.target.value})),className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50"})]}),g.jsxs("label",{className:"space-y-2",children:[g.jsxs("span",{className:"flex items-center gap-2 text-sm font-medium text-slate-700 dark:text-slate-300",children:[g.jsx(Oae,{className:"crm-icon-md text-slate-400"}),"邮箱"]}),g.jsx("input",{value:_.email||"",onChange:Fe=>T(Mt=>({...Mt,email:Fe.target.value})),className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white outline-none focus:border-violet-500 focus:ring-1 focus:ring-violet-500 dark:border-slate-800 dark:bg-slate-900/50"})]})]}),g.jsxs("div",{className:"crm-form-grid",children:[g.jsxs("div",{className:"crm-form-section",children:[g.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-slate-900 dark:text-white",children:[g.jsx(g_,{className:"crm-icon-md text-violet-500"}),"岗位信息"]}),g.jsxs("div",{className:"mt-3 space-y-2 text-sm text-slate-500 dark:text-slate-400",children:[g.jsxs("p",{children:["岗位:",We]}),g.jsxs("p",{children:["状态:",Ou(o==null?void 0:o.accountStatus)]})]})]}),g.jsxs("div",{className:"crm-form-section",children:[g.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-slate-900 dark:text-white",children:[g.jsx(Vae,{className:"crm-icon-md text-emerald-500"}),"组织信息"]}),g.jsxs("div",{className:"mt-3 space-y-2 text-sm text-slate-500 dark:text-slate-400",children:[g.jsxs("p",{children:["部门:",At]}),g.jsxs("p",{className:"flex items-center gap-2",children:[g.jsx(cae,{className:"crm-icon-md text-slate-400"}),"入职天数:",Aje(o==null?void 0:o.onboardingDays)]})]})]})]}),g.jsxs("div",{className:"crm-form-grid",children:[g.jsxs("div",{className:"rounded-xl border border-slate-100 bg-slate-50/70 px-4 py-3 text-sm text-slate-500 dark:border-slate-800 dark:bg-slate-800/20 dark:text-slate-400",children:["当前手机号:",rr]}),g.jsxs("div",{className:"rounded-xl border border-slate-100 bg-slate-50/70 px-4 py-3 text-sm text-slate-500 dark:border-slate-800 dark:bg-slate-800/20 dark:text-slate-400",children:["当前邮箱:",Nr]})]}),C?g.jsx("div",{className:"crm-alert crm-alert-info",children:"正在加载个人资料..."}):null,L?g.jsx("div",{className:"crm-alert crm-alert-error",children:L}):null]})}):null,h?g.jsx(LA,{title:"账号安全",onClose:_e,footer:g.jsxs("div",{className:"flex flex-col-reverse gap-3 sm:flex-row sm:justify-end",children:[g.jsx("button",{onClick:_e,className:"crm-btn crm-btn-secondary",children:"关闭"}),g.jsx("button",{onClick:()=>void st(),disabled:V,className:"crm-btn crm-btn-success disabled:cursor-not-allowed disabled:opacity-60",children:V?"提交中...":"更新密码"})]}),children:g.jsxs("div",{className:"crm-modal-stack",children:[g.jsx("div",{className:"crm-form-section",children:g.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-300",children:"为了账号安全,请先输入当前密码,再设置新密码。"})}),g.jsxs("div",{className:"crm-section-stack",children:[g.jsxs("label",{className:"space-y-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"当前密码"}),g.jsxs("div",{className:"relative",children:[g.jsx("input",{type:$?"text":"password",autoComplete:"current-password",value:P.oldPassword,onChange:Fe=>j(Mt=>({...Mt,oldPassword:Fe.target.value})),className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white pr-12 outline-none focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500 dark:border-slate-800 dark:bg-slate-900/50"}),g.jsx("button",{type:"button",onClick:()=>K(Fe=>!Fe),className:"absolute inset-y-0 right-0 flex w-12 items-center justify-center text-slate-400 transition-colors hover:text-slate-600 dark:text-slate-500 dark:hover:text-slate-300","aria-label":$?"隐藏当前密码":"显示当前密码",children:$?g.jsx(vC,{className:"crm-icon-md"}):g.jsx(pC,{className:"crm-icon-md"})})]})]}),g.jsxs("label",{className:"space-y-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"新密码"}),g.jsxs("div",{className:"relative",children:[g.jsx("input",{type:q?"text":"password",autoComplete:"new-password",value:P.newPassword,onChange:Fe=>j(Mt=>({...Mt,newPassword:Fe.target.value})),className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white pr-12 outline-none focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500 dark:border-slate-800 dark:bg-slate-900/50"}),g.jsx("button",{type:"button",onClick:()=>H(Fe=>!Fe),className:"absolute inset-y-0 right-0 flex w-12 items-center justify-center text-slate-400 transition-colors hover:text-slate-600 dark:text-slate-500 dark:hover:text-slate-300","aria-label":q?"隐藏新密码":"显示新密码",children:q?g.jsx(vC,{className:"crm-icon-md"}):g.jsx(pC,{className:"crm-icon-md"})})]})]}),g.jsxs("label",{className:"space-y-2",children:[g.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"确认新密码"}),g.jsxs("div",{className:"relative",children:[g.jsx("input",{type:Z?"text":"password",autoComplete:"new-password",value:P.confirmPassword,onChange:Fe=>j(Mt=>({...Mt,confirmPassword:Fe.target.value})),className:"crm-input-box crm-input-text w-full border border-slate-200 bg-white pr-12 outline-none focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500 dark:border-slate-800 dark:bg-slate-900/50"}),g.jsx("button",{type:"button",onClick:()=>te(Fe=>!Fe),className:"absolute inset-y-0 right-0 flex w-12 items-center justify-center text-slate-400 transition-colors hover:text-slate-600 dark:text-slate-500 dark:hover:text-slate-300","aria-label":Z?"隐藏确认密码":"显示确认密码",children:Z?g.jsx(vC,{className:"crm-icon-md"}):g.jsx(pC,{className:"crm-icon-md"})})]})]})]}),F?g.jsx("div",{className:"crm-alert crm-alert-error",children:F}):null,O?g.jsx("div",{className:"crm-alert crm-alert-success",children:O}):null]})}):null,m?g.jsx(LA,{title:"项目归属转移",subtitle:"先确认归属双方,再查看预检结果并执行转移。",onClose:Ye,footer:b||void 0,children:g.jsx(wJ,{embedded:!0,onClose:Ye,onFooterChange:w})}):null,ie?g.jsx(bJ,{title:"帮助中心",tone:"violet",icon:g.jsx(CG,{className:"h-6 w-6"}),confirmText:"我知道了",hideCancel:!0,onClose:()=>ce(!1),onConfirm:()=>ce(!1),children:g.jsxs("div",{className:"space-y-4",children:[g.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:g.jsxs("div",{className:"rounded-2xl border border-slate-200/80 bg-white/90 p-4 dark:border-slate-800 dark:bg-slate-950/60",children:[g.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-slate-900 dark:text-white",children:[g.jsx(DG,{className:"h-4 w-4 text-violet-500"}),"权限与账号"]}),g.jsx("p",{className:"mt-2 text-sm leading-6 text-slate-500 dark:text-slate-400",children:"无法访问页面、按钮灰掉、看不到数据时,通常是角色权限或租户范围未开通。"})]})}),g.jsx("div",{className:"rounded-2xl border border-dashed border-slate-200 bg-slate-50/90 px-4 py-3 text-sm leading-6 text-slate-600 dark:border-slate-700 dark:bg-slate-900/60 dark:text-slate-300",children:"当前系统暂未内置在线客服入口。如需支持,请联系系统管理员。"})]})}):null]})]})}const Tp="rememberedLoginCredentials",SJ="rememberedUsername",Dje=7200*60*1e3,Lje={username:"",password:"",tenantCode:"",captchaCode:"",remember:!0};function Eje(){const t=localStorage.getItem(Tp);if(!t)return null;try{const e=JSON.parse(t);return typeof e.username!="string"||typeof e.password!="string"||typeof e.tenantCode!="string"||typeof e.expiresAt!="number"||e.expiresAt<=Date.now()?(localStorage.removeItem(Tp),null):e}catch{return localStorage.removeItem(Tp),null}}function Rje(t){const e={username:t.username,password:t.password,tenantCode:t.tenantCode,expiresAt:Date.now()+Dje};localStorage.setItem(Tp,JSON.stringify(e))}function Pje(){localStorage.removeItem(Tp),localStorage.removeItem(SJ)}function Ije(){const t=ru(),[e,r]=bG(),[a,n]=E.useState(Lje),[i,o]=E.useState(null),[s,l]=E.useState(!0),[u,c]=E.useState(null),[d,h]=E.useState(!1),[v,m]=E.useState(!0),[x,b]=E.useState(""),w="紫光汇智CRM系统",_=(u==null?void 0:u.systemDescription)||"聚焦客户拓展、商机推进与销售协同,让团队每天的工作节奏更清晰。",T=E.useMemo(()=>u!=null&&u.loginBgUrl?{backgroundImage:`linear-gradient(180deg, rgba(248, 250, 252, 0.82), rgba(241, 245, 249, 0.94)), url(${u.loginBgUrl})`}:void 0,[u==null?void 0:u.loginBgUrl]),C=async()=>{if(!s)return;const M=await Ice();o(M)};if(E.useEffect(()=>{const M=Eje();if(M){n(R=>({...R,username:M.username,password:M.password,tenantCode:M.tenantCode,remember:!0}));return}const L=localStorage.getItem(SJ);L&&n(R=>({...R,username:L,remember:!0}))},[]),E.useEffect(()=>{(async()=>{try{const[L,R]=await Promise.all([Bce("security.captcha.enabled","true").catch(()=>"true"),Vce().catch(()=>null)]);c(R);const P=L!=="false";l(P),P&&await C()}catch{l(!0);try{await C()}catch{o(null)}}finally{m(!1)}})()},[]),E.useEffect(()=>{if(e.get("timeout")==="1"){b("登录超时,请重新登录");const M=new URLSearchParams(e);M.delete("timeout"),r(M,{replace:!0})}},[e,r]),XU())return g.jsx(XL,{to:"/",replace:!0});const k=(M,L)=>{n(R=>({...R,[M]:L})),b("")},A=async M=>{if(M.preventDefault(),!d){if(!a.username.trim()||!a.password.trim()){b("请输入用户名和密码");return}if(s&&!a.captchaCode.trim()){b("请输入验证码");return}h(!0),b("");try{const L=await jce({username:a.username.trim(),password:a.password,tenantCode:a.tenantCode.trim()||void 0,captchaId:s?i==null?void 0:i.captchaId:void 0,captchaCode:s?a.captchaCode.trim():void 0});qU(L,a.username.trim()),a.remember?Rje({username:a.username.trim(),password:a.password,tenantCode:a.tenantCode.trim()}):Pje();try{const R=await mh();sessionStorage.setItem("userProfile",JSON.stringify(R))}catch{sessionStorage.removeItem("userProfile")}t("/",{replace:!0})}catch(L){if(zp(),b(L instanceof Error?L.message:"登录失败,请稍后重试"),n(R=>({...R,captchaCode:""})),s)try{await C()}catch{o(null)}}finally{h(!1)}}};return g.jsxs("div",{className:"login-page-shell",style:T,children:[g.jsx("div",{className:"login-page-backdrop"}),g.jsx("div",{className:"login-page-grid",children:g.jsx("section",{className:"login-panel",children:g.jsx("div",{className:"login-panel-card",children:g.jsxs("div",{className:"login-panel-layout",children:[g.jsx("div",{className:"login-panel-intro",children:g.jsxs("div",{className:"login-brand-lockup",children:[g.jsx("div",{className:"login-brand-mark",children:g.jsx("img",{src:"/crm-favicon.svg",alt:w})}),g.jsxs("div",{children:[g.jsx("p",{className:"login-brand-kicker",children:"智慧销售协同平台"}),g.jsx("h1",{children:w})]})]})}),g.jsxs("div",{className:"login-panel-formWrap",children:[g.jsxs("div",{className:"login-mobile-brand",children:[g.jsxs("div",{className:"login-brand-lockup",children:[g.jsx("div",{className:"login-brand-mark",children:g.jsx("img",{src:"/crm-favicon.svg",alt:w})}),g.jsxs("div",{children:[g.jsx("p",{className:"login-brand-kicker",children:"智慧销售协同平台"}),g.jsx("h1",{children:w})]})]}),g.jsx("p",{className:"login-mobile-description",children:_})]}),g.jsxs("div",{className:"login-panel-header",children:[g.jsx("p",{className:"login-panel-eyebrow",children:"欢迎回来"}),g.jsx("h3",{children:"账号登录"}),g.jsx("p",{children:"输入账号信息后进入 CRM 工作台,继续处理拓展、商机与日报。"})]}),g.jsxs("form",{className:"login-form",onSubmit:A,children:[g.jsxs("label",{className:"login-field",children:[g.jsx("span",{children:"用户名"}),g.jsx("input",{autoComplete:"username",value:a.username,onChange:M=>k("username",M.target.value),placeholder:"请输入用户名"})]}),g.jsxs("label",{className:"login-field",children:[g.jsx("span",{children:"密码"}),g.jsx("input",{type:"password",autoComplete:"current-password",value:a.password,onChange:M=>k("password",M.target.value),placeholder:"请输入密码"})]}),g.jsxs("label",{className:"login-field",children:[g.jsx("span",{children:"租户编码"}),g.jsx("input",{value:a.tenantCode,onChange:M=>k("tenantCode",M.target.value),placeholder:"可选,不填则按后端默认租户登录"})]}),s?g.jsxs("div",{className:"login-field",children:[g.jsx("span",{children:"验证码"}),g.jsxs("div",{className:"login-captcha-row",children:[g.jsx("input",{value:a.captchaCode,onChange:M=>k("captchaCode",M.target.value),placeholder:"请输入验证码"}),g.jsx("button",{className:"login-captcha-button",type:"button",onClick:()=>void C(),disabled:v,children:i!=null&&i.imageBase64?g.jsx("img",{src:i.imageBase64,alt:"验证码"}):g.jsx("span",{children:v?"加载中...":"刷新验证码"})})]})]}):null,g.jsx("div",{className:"login-form-meta",children:g.jsxs("label",{className:"login-checkbox",children:[g.jsx("input",{type:"checkbox",checked:a.remember,onChange:M=>k("remember",M.target.checked)}),g.jsx("span",{children:"记住密码"})]})}),x?g.jsx("div",{className:"login-error",children:x}):null,g.jsx("button",{className:"login-submit",type:"submit",disabled:d||v,children:d?"登录中...":"立即登录"})]})]})]})})})})]})}const jje={wecom_config_error:"企业微信登录配置不完整,请联系管理员。",wecom_state_invalid:"企业微信登录状态已失效,请从企业微信应用重新进入。",wecom_code_invalid:"企业微信授权失败,请重新从应用进入。",wecom_userid_not_found:"未识别到企业微信成员身份,请确认应用可见范围。",wecom_mobile_missing:"企业微信账号未维护手机号,无法自动登录。",crm_user_not_found:"企业微信手机号未开通CRM账号。",crm_user_disabled:"CRM账号已停用无法自动登录。",wecom_login_failed:"企业微信自动登录失败,请稍后重试。"};function Oje(){var c,d,h;const t=ru(),[e]=bG(),[r,a]=E.useState("loading"),[n,i]=E.useState(""),o=((c=e.get("ticket"))==null?void 0:c.trim())||"",s=((d=e.get("redirect"))==null?void 0:d.trim())||"/",l=((h=e.get("error"))==null?void 0:h.trim())||"",u=E.useMemo(()=>!s.startsWith("/")||s.startsWith("//")?"/":s,[s]);return E.useEffect(()=>{if(l){a("error"),i(jje[l]||"企业微信自动登录失败,请稍后重试。");return}if(!o){a("error"),i("缺少登录票据,请从企业微信应用重新进入。");return}let v=!1;return(async()=>{var x;try{zp();const b=await Oce({ticket:o});qU(b,"");try{const w=await mh();sessionStorage.setItem("userProfile",JSON.stringify(w));const _=(x=w.username)==null?void 0:x.trim();_&&localStorage.setItem("username",_)}catch{sessionStorage.removeItem("userProfile")}v||t(u||"/",{replace:!0})}catch(b){zp(),v||(a("error"),i(b instanceof Error?b.message:"企业微信自动登录失败,请稍后重试。"))}})(),()=>{v=!0}},[l,t,u,o]),g.jsxs("div",{className:"login-page-shell",children:[g.jsx("div",{className:"login-page-backdrop"}),g.jsx("div",{className:"login-page-grid",style:{gridTemplateColumns:"minmax(0, 460px)"},children:g.jsx("section",{className:"login-panel",children:g.jsxs("div",{className:"login-panel-card",children:[g.jsxs("div",{className:"login-panel-header",children:[g.jsx("p",{className:"login-panel-eyebrow",children:"企业微信登录"}),g.jsx("h3",{children:r==="loading"?"正在自动登录...":"自动登录失败"})]}),r==="loading"?g.jsx("div",{className:"login-form",children:g.jsx("div",{className:"login-error",style:{marginTop:0},children:"正在校验企业微信身份并进入CRM请稍候。"})}):g.jsxs("div",{className:"login-form",children:[g.jsx("div",{className:"login-error",style:{marginTop:0},children:n}),g.jsx(hh,{className:"login-submit",to:"/login",children:"返回普通登录"})]})]})})})]})}function zje({children:t}){return XU()?t:g.jsx(XL,{to:"/login",replace:!0})}function Bje(){return E.useEffect(()=>Pce(),[]),g.jsx(Mie,{defaultTheme:"light",storageKey:"crm-theme",children:g.jsx(yre,{children:g.jsxs(Yte,{children:[g.jsx(kl,{path:"/login",element:g.jsx(Ije,{})}),g.jsx(kl,{path:"/login/wecom",element:g.jsx(Oje,{})}),g.jsxs(kl,{path:"/",element:g.jsx(zje,{children:g.jsx(pde,{})}),children:[g.jsx(kl,{index:!0,element:g.jsx(n5e,{})}),g.jsx(kl,{path:"expansion",element:g.jsx(L5e,{})}),g.jsx(kl,{path:"opportunities",element:g.jsx(nRe,{})}),g.jsx(kl,{path:"work/*",element:g.jsx(RIe,{})}),g.jsx(kl,{path:"profile",element:g.jsx(Mje,{})}),g.jsx(kl,{path:"owner-transfer",element:g.jsx(wJ,{})})]})]})})})}Xee.createRoot(document.getElementById("root")).render(g.jsx(E.StrictMode,{children:g.jsx(Bje,{})}));